;(function(e) {
  function t(n) {
    if (o[n]) return o[n].exports
    var r = (o[n] = { i: n, l: !1, exports: {} })
    return e[n].call(r.exports, r, r.exports, t), (r.l = !0), r.exports
  }
  var o = {}
  return (
    (t.m = e),
    (t.c = o),
    (t.i = function(e) {
      return e
    }),
    (t.d = function(e, o, n) {
      t.o(e, o) ||
        Object.defineProperty(e, o, {
          configurable: !1,
          enumerable: !0,
          get: n
        })
    }),
    (t.n = function(e) {
      var o =
        e && e.__esModule
          ? function() {
              return e['default']
            }
          : function() {
              return e
            }
      return t.d(o, 'a', o), o
    }),
    (t.o = function(e, t) {
      return Object.prototype.hasOwnProperty.call(e, t)
    }),
    (t.p = ''),
    t((t.s = 272))
  )
})([
  ,
  ,
  function(e) {
    function t(e) {
      ;(u = e ? e : u),
        (d = new a(c, u)),
        (d.onopen = function() {
          let e = [].concat(g)
          ;(g = []),
            e.forEach(e => {
              o(e)
            })
        }),
        (d.onclose = function() {
          ;(d = null),
            setTimeout(() => {
              t(e)
            })
        }),
        (d.onmessage = function(e) {
          try {
            let t = JSON.parse(e.data)
            n(t)
          } catch (t) {}
        })
    }
    function o(e) {
      d && d.readyState === a.OPEN ? d.send(JSON.stringify(e)) : g.push(e)
    }
    function n() {
      p.forEach(e => {
        try {
          e.apply(this, arguments)
        } catch (t) {
          console.error(t)
        }
      })
    }
    var r = window.navigator || window.__global.navigator,
      a = window.WebSocket || window.__global.WebSocket,
      i = r.userAgent,
      s = i.match(/port\/(\d*)/),
      l = s ? parseInt(s[1]) : 9974,
      d = null,
      c = `ws://127.0.0.1:${l}`,
      u = null,
      p = [],
      g = []
    e.exports = {
      connect: t,
      send: o,
      registerCallback: e => {
        p.push(e)
      },
      getWs() {
        return d
      }
    }
  },
  ,
  function(e) {
    var t = (function() {
      return this
    })()
    try {
      t = t || Function('return this')() || (1, eval)('this')
    } catch (o) {
      'object' == typeof window && (t = window)
    }
    e.exports = t
  },
  ,
  ,
  ,
  ,
  ,
  function(e, t, o) {
    'use strict'
    function n(e, t, o) {
      var n = o ? ' !== ' : ' === ',
        r = o ? ' || ' : ' && ',
        a = o ? '!' : '',
        i = o ? '' : '!'
      return 'null' === e
        ? t + n + 'null'
        : 'array' === e
          ? a + 'Array.isArray(' + t + ')'
          : 'object' === e
            ? '(' +
              a +
              t +
              r +
              'typeof ' +
              t +
              n +
              '"object"' +
              r +
              i +
              'Array.isArray(' +
              t +
              '))'
            : 'integer' === e
              ? '(typeof ' +
                t +
                n +
                '"number"' +
                r +
                i +
                '(' +
                t +
                ' % 1)' +
                r +
                t +
                n +
                t +
                ')'
              : 'typeof ' + t + n + '"' + e + '"'
    }
    function r(e) {
      for (var t = {}, o = 0; o < e.length; o++) t[e[o]] = !0
      return t
    }
    function a(e) {
      return 'number' == typeof e
        ? '[' + e + ']'
        : p.test(e)
          ? '.' + e
          : "['" + i(e) + "']"
    }
    function i(e) {
      return e
        .replace(g, '\\$&')
        .replace(/\n/g, '\\n')
        .replace(/\r/g, '\\r')
        .replace(/\f/g, '\\f')
        .replace(/\t/g, '\\t')
    }
    function s(e) {
      return "'" + i(e) + "'"
    }
    function l(e, t) {
      return '""' == e ? t : (e + ' + ' + t).replace(/' \+ '/g, '')
    }
    function d(e) {
      return e.replace(/~/g, '~0').replace(/\//g, '~1')
    }
    function c(e) {
      return e.replace(/~1/g, '/').replace(/~0/g, '~')
    }
    e.exports = {
      copy: function(e, t) {
        for (var o in ((t = t || {}), e)) t[o] = e[o]
        return t
      },
      checkDataType: n,
      checkDataTypes: function(e, o) {
        switch (e.length) {
          case 1:
            return n(e[0], o, !0)
          default:
            var a = '',
              i = r(e)
            for (var s in (i.array &&
              i.object &&
              ((a = i.null ? '(' : '(!' + o + ' || '),
              (a += 'typeof ' + o + ' !== "object")'),
              delete i.null,
              delete i.array,
              delete i.object),
            i.number && delete i.integer,
            i))
              a += (a ? ' && ' : '') + n(s, o, !0)
            return a
        }
      },
      coerceToTypes: function(e, o) {
        if (Array.isArray(o)) {
          for (var n = [], r = 0, a; r < o.length; r++)
            (a = o[r]),
              u[a]
                ? (n[n.length] = a)
                : 'array' === e && 'array' === a && (n[n.length] = a)
          if (n.length) return n
        } else {
          if (u[o]) return [o]
          if ('array' === e && 'array' === o) return ['array']
        }
      },
      toHash: r,
      getProperty: a,
      escapeQuotes: i,
      ucs2length: o(345),
      varOccurences: function(e, t) {
        t += '[^0-9]'
        var o = e.match(new RegExp(t, 'g'))
        return o ? o.length : 0
      },
      varReplace: function(e, t, o) {
        return (
          (t += '([^0-9])'),
          (o = o.replace(/\$/g, '$$$$')),
          e.replace(new RegExp(t, 'g'), o + '$1')
        )
      },
      cleanUpCode: function(e) {
        return e
          .replace(h, '')
          .replace(m, '')
          .replace(f, 'if (!($1))')
      },
      cleanUpVarErrors: function(e, t) {
        var o = e.match(y)
        return o && 2 === o.length
          ? t
            ? e.replace(C, '').replace(b, v)
            : e.replace(A, '').replace(w, E)
          : e
      },
      schemaHasRules: function(e, t) {
        for (var o in e) if (t[o]) return !0
      },
      schemaHasRulesExcept: function(e, t, o) {
        for (var n in e) if (n != o && t[n]) return !0
      },
      stableStringify: o(44),
      toQuotedString: s,
      getPathExpr: function(e, t, o, n) {
        var r = o
          ? "'/' + " +
            t +
            (n ? '' : ".replace(/~/g, '~0').replace(/\\//g, '~1')")
          : n
            ? "'[' + " + t + " + ']'"
            : "'[\\'' + " + t + " + '\\']'"
        return l(e, r)
      },
      getPath: function(e, t, o) {
        var n = o ? s('/' + d(t)) : s(a(t))
        return l(e, n)
      },
      getData: function(e, t, o) {
        var n, r, s, l
        if ('' === e) return 'rootData'
        if ('/' == e[0]) {
          if (!F.test(e)) throw new Error('Invalid JSON-pointer: ' + e)
          ;(r = e), (s = 'rootData')
        } else {
          if (((l = e.match(x)), !l))
            throw new Error('Invalid JSON-pointer: ' + e)
          if (((n = +l[1]), (r = l[2]), '#' == r)) {
            if (n >= t)
              throw new Error(
                'Cannot access property/index ' +
                  n +
                  ' levels up, current level is ' +
                  t
              )
            return o[t - n]
          }
          if (n > t)
            throw new Error(
              'Cannot access data ' + n + ' levels up, current level is ' + t
            )
          if (((s = 'data' + (t - n || '')), !r)) return s
        }
        for (var d = s, u = r.split('/'), p = 0, i; p < u.length; p++)
          (i = u[p]), i && ((s += a(c(i))), (d += ' && ' + s))
        return d
      },
      unescapeFragment: function(e) {
        return c(decodeURIComponent(e))
      },
      escapeFragment: function(e) {
        return encodeURIComponent(d(e))
      },
      escapeJsonPointer: d
    }
    var u = r(['string', 'number', 'integer', 'boolean', 'null']),
      p = /^[a-z$_][a-z$_0-9]*$/i,
      g = /'|\\/g,
      h = /else\s*{\s*}/g,
      m = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,
      f = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,
      y = /[^v\.]errors/g,
      A = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,
      C = /var errors = 0;|var vErrors = null;/g,
      w = 'return errors === 0;',
      E = 'validate.errors = null; return true;',
      b = /if \(errors === 0\) return true;\s*else throw new ValidationError\(vErrors\);/,
      v = 'return true;',
      F = /^\/(?:[^~]|~0|~1)*$/,
      x = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/
  },
  function(e, t, o) {
    'use strict'
    var n = o(377)
    ;(t.parse = function(e) {
      try {
        return JSON.parse(e)
      } catch (o) {
        throw (t.validate(e), o)
      }
    }),
      (t.sanitize = function(e) {
        function t() {
          return e.charAt(p)
        }
        function o() {
          return e.charAt(p + 1)
        }
        function n() {
          return e.charAt(p - 1)
        }
        function r() {
          for (var e = u.length - 1; 0 <= e; ) {
            var t = u[e]
            if (' ' !== t && '\n' !== t && '\r' !== t && '\t' !== t) return t
            e--
          }
          return ''
        }
        function a() {
          for (p += 2; p < e.length && ('*' !== t() || '/' !== o()); ) p++
          p += 2
        }
        function s() {
          for (p += 2; p < e.length && '\n' !== t(); ) p++
        }
        function l(o) {
          u.push('"'), p++
          for (var r = t(); p < e.length && r !== o; )
            '"' === r && '\\' !== n() && u.push('\\'),
              '\\' === r && (p++, (r = t()), "'" !== r && u.push('\\')),
              u.push(r),
              p++,
              (r = t())
          r === o && (u.push('"'), p++)
        }
        function d() {
          for (
            var e = ['null', 'true', 'false'],
              o = '',
              n = t(),
              r = /[a-zA-Z_$\d]/;
            r.test(n);

          )
            (o += n), p++, (n = t())
          ;-1 === e.indexOf(o) ? u.push('"' + o + '"') : u.push(o)
        }
        var u = [],
          p = 0,
          i = e.match(
            /^\s*(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/
          )
        for (i && (e = i[3]); p < e.length; ) {
          var g = t()
          '/' === g && '*' === o()
            ? a()
            : '/' === g && '/' === o()
              ? s()
              : "'" === g || '"' === g
                ? l(g)
                : /[a-zA-Z_$]/.test(g) && -1 !== ['{', ','].indexOf(r())
                  ? d()
                  : (u.push(g), p++)
        }
        return u.join('')
      }),
      (t.escapeUnicodeChars = function(e) {
        return e.replace(/[\u007F-\uFFFF]/g, function(e) {
          return '\\u' + ('0000' + e.charCodeAt(0).toString(16)).slice(-4)
        })
      }),
      (t.validate = function(e) {
        'undefined' == typeof n ? JSON.parse(e) : n.parse(e)
      }),
      (t.extend = function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o])
        return e
      }),
      (t.clear = function(e) {
        for (var t in e) e.hasOwnProperty(t) && delete e[t]
        return e
      }),
      (t.type = function(e) {
        return null === e
          ? 'null'
          : void 0 === e
            ? 'undefined'
            : e instanceof Number || 'number' == typeof e
              ? 'number'
              : e instanceof String || 'string' == typeof e
                ? 'string'
                : e instanceof Boolean || 'boolean' == typeof e
                  ? 'boolean'
                  : e instanceof RegExp || 'regexp' == typeof e
                    ? 'regexp'
                    : t.isArray(e)
                      ? 'array'
                      : 'object'
      })
    var r = /^https?:\/\/\S+$/
    ;(t.isUrl = function(e) {
      return ('string' == typeof e || e instanceof String) && r.test(e)
    }),
      (t.isArray = function(e) {
        return '[object Array]' === Object.prototype.toString.call(e)
      }),
      (t.getAbsoluteLeft = function(e) {
        var t = e.getBoundingClientRect()
        return t.left + window.pageXOffset || document.scrollLeft || 0
      }),
      (t.getAbsoluteTop = function(e) {
        var t = e.getBoundingClientRect()
        return t.top + window.pageYOffset || document.scrollTop || 0
      }),
      (t.addClassName = function(e, t) {
        var o = e.className.split(' ')
        ;-1 == o.indexOf(t) && (o.push(t), (e.className = o.join(' ')))
      }),
      (t.removeClassName = function(e, t) {
        var o = e.className.split(' '),
          n = o.indexOf(t)
        ;-1 != n && (o.splice(n, 1), (e.className = o.join(' ')))
      }),
      (t.stripFormatting = function(e) {
        for (var o = e.childNodes, n = 0, r = o.length, a; n < r; n++) {
          ;(a = o[n]), a.style && a.removeAttribute('style')
          var i = a.attributes
          if (i)
            for (var s = i.length - 1, l; 0 <= s; s--)
              (l = i[s]), !0 === l.specified && a.removeAttribute(l.name)
          t.stripFormatting(a)
        }
      }),
      (t.setEndOfContentEditable = function(e) {
        var t, o
        document.createRange &&
          ((t = document.createRange()),
          t.selectNodeContents(e),
          t.collapse(!1),
          (o = window.getSelection()),
          o.removeAllRanges(),
          o.addRange(t))
      }),
      (t.selectContentEditable = function(e) {
        if (e && 'DIV' == e.nodeName) {
          var t, o
          window.getSelection &&
            document.createRange &&
            ((o = document.createRange()),
            o.selectNodeContents(e),
            (t = window.getSelection()),
            t.removeAllRanges(),
            t.addRange(o))
        }
      }),
      (t.getSelection = function() {
        if (window.getSelection) {
          var e = window.getSelection()
          if (e.getRangeAt && e.rangeCount) return e.getRangeAt(0)
        }
        return null
      }),
      (t.setSelection = function(e) {
        if (e && window.getSelection) {
          var t = window.getSelection()
          t.removeAllRanges(), t.addRange(e)
        }
      }),
      (t.getSelectionOffset = function() {
        var e = t.getSelection()
        return e &&
          'startOffset' in e &&
          'endOffset' in e &&
          e.startContainer &&
          e.startContainer == e.endContainer
          ? {
              startOffset: e.startOffset,
              endOffset: e.endOffset,
              container: e.startContainer.parentNode
            }
          : null
      }),
      (t.setSelectionOffset = function(e) {
        if (document.createRange && window.getSelection) {
          var o = window.getSelection()
          if (o) {
            var n = document.createRange()
            e.container.firstChild ||
              e.container.appendChild(document.createTextNode('')),
              n.setStart(e.container.firstChild, e.startOffset),
              n.setEnd(e.container.firstChild, e.endOffset),
              t.setSelection(n)
          }
        }
      }),
      (t.getInnerText = function(e, o) {
        var n = void 0 == o
        if (
          (n &&
            (o = {
              text: '',
              flush: function() {
                var e = this.text
                return (this.text = ''), e
              },
              set: function(e) {
                this.text = e
              }
            }),
          e.nodeValue)
        )
          return o.flush() + e.nodeValue
        if (e.hasChildNodes()) {
          for (var r = e.childNodes, a = '', s = 0, i = r.length, l; s < i; s++)
            if (((l = r[s]), 'DIV' == l.nodeName || 'P' == l.nodeName)) {
              var d = r[s - 1],
                c = d ? d.nodeName : void 0
              c &&
                'DIV' != c &&
                'P' != c &&
                'BR' != c &&
                ((a += '\n'), o.flush()),
                (a += t.getInnerText(l, o)),
                o.set('\n')
            } else
              'BR' == l.nodeName
                ? ((a += o.flush()), o.set('\n'))
                : (a += t.getInnerText(l, o))
          return a
        }
        return 'P' == e.nodeName && -1 != t.getInternetExplorerVersion()
          ? o.flush()
          : ''
      }),
      (t.getInternetExplorerVersion = function() {
        if (-1 == a) {
          var e = -1
          if ('Microsoft Internet Explorer' == navigator.appName) {
            var t = navigator.userAgent,
              o = /MSIE ([0-9]{1,}[.0-9]{0,})/
            null != o.exec(t) && (e = parseFloat(RegExp.$1))
          }
          a = e
        }
        return a
      }),
      (t.isFirefox = function() {
        return -1 != navigator.userAgent.indexOf('Firefox')
      })
    var a = -1
    ;(t.addEventListener = function(e, o, n, r) {
      if (e.addEventListener)
        return (
          void 0 === r && (r = !1),
          'mousewheel' === o && t.isFirefox() && (o = 'DOMMouseScroll'),
          e.addEventListener(o, n, r),
          n
        )
      if (e.attachEvent) {
        var a = function() {
          return n.call(e, window.event)
        }
        return e.attachEvent('on' + o, a), a
      }
    }),
      (t.removeEventListener = function(e, o, n, r) {
        e.removeEventListener
          ? (r === void 0 && (r = !1),
            'mousewheel' === o && t.isFirefox() && (o = 'DOMMouseScroll'),
            e.removeEventListener(o, n, r))
          : e.detachEvent && e.detachEvent('on' + o, n)
      }),
      (t.parsePath = function e(t) {
        var o, n
        if (0 === t.length) return []
        var r = t.match(/^\.(\w+)/)
        if (r) (o = r[1]), (n = t.substr(o.length + 1))
        else if ('[' === t[0]) {
          var a = t.indexOf(']')
          if (-1 === a) throw new SyntaxError('Character ] expected in path')
          if (1 === a) throw new SyntaxError('Index expected after [')
          var i = t.substring(1, a)
          "'" === i[0] && (i = '"' + i.substring(1, i.length - 1) + '"'),
            (o = '*' === i ? i : JSON.parse(i)),
            (n = t.substr(a + 1))
        } else throw new SyntaxError('Failed to parse path')
        return [o].concat(e(n))
      }),
      (t.improveSchemaError = function(e) {
        if ('enum' === e.keyword && Array.isArray(e.schema)) {
          var t = e.schema
          if (t) {
            if (
              ((t = t.map(function(e) {
                return JSON.stringify(e)
              })),
              5 < t.length)
            ) {
              var o = ['(' + (t.length - 5) + ' more...)']
              ;(t = t.slice(0, 5)), t.push(o)
            }
            e.message = 'should be equal to one of: ' + t.join(', ')
          }
        }
        return (
          'additionalProperties' === e.keyword &&
            (e.message =
              'should NOT have additional property: ' +
              e.params.additionalProperty),
          e
        )
      }),
      (t.insideRect = function(e, t, o) {
        var n = o === void 0 ? 0 : o
        return (
          t.left - n >= e.left &&
          t.right + n <= e.right &&
          t.top - n >= e.top &&
          t.bottom + n <= e.bottom
        )
      }),
      (t.debounce = function(e, t, o) {
        var n
        return function() {
          var r = this,
            a = arguments,
            i = o && !n
          clearTimeout(n),
            (n = setTimeout(function() {
              ;(n = null), o || e.apply(r, a)
            }, t)),
            i && e.apply(r, a)
        }
      }),
      (t.textDiff = function(e, t) {
        for (
          var o = t.length, n = 0, r = e.length, a = t.length;
          t.charAt(n) === e.charAt(n) && n < o;

        )
          n++
        for (; t.charAt(a - 1) === e.charAt(r - 1) && a > n && 0 < r; ) a--, r--
        return { start: n, end: a }
      })
  },
  function(e) {
    e.exports = function(e) {
      return (
        e.webpackPolyfill ||
          ((e.deprecate = function() {}),
          (e.paths = []),
          !e.children && (e.children = []),
          Object.defineProperty(e, 'loaded', {
            enumerable: !0,
            get: function() {
              return e.l
            }
          }),
          Object.defineProperty(e, 'id', {
            enumerable: !0,
            get: function() {
              return e.i
            }
          }),
          (e.webpackPolyfill = 1)),
        e
      )
    }
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e) {
    e.exports = function() {
      throw new Error('define cannot be used indirect')
    }
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e, t, o) {
    'use strict'
    function n(e, t) {
      function o(e, t, r) {
        r.forEach(function(r) {
          if ('separator' == r.type) {
            var a = document.createElement('div')
            ;(a.className = 'jsoneditor-separator'),
              (s = document.createElement('li')),
              s.appendChild(a),
              e.appendChild(s)
          } else {
            var i = {},
              s = document.createElement('li')
            e.appendChild(s)
            var l = document.createElement('button')
            if (
              ((l.type = 'button'),
              (l.className = r.className),
              (i.button = l),
              r.title && (l.title = r.title),
              r.click &&
                (l.onclick = function(e) {
                  e.preventDefault(), n.hide(), r.click()
                }),
              s.appendChild(l),
              r.submenu)
            ) {
              var d = document.createElement('div')
              ;(d.className = 'jsoneditor-icon'),
                l.appendChild(d),
                l.appendChild(document.createTextNode(r.text))
              var c
              if (r.click) {
                l.className += ' jsoneditor-default'
                var u = document.createElement('button')
                ;(u.type = 'button'),
                  (i.buttonExpand = u),
                  (u.className = 'jsoneditor-expand'),
                  (u.innerHTML = '<div class="jsoneditor-expand"></div>'),
                  s.appendChild(u),
                  r.submenuTitle && (u.title = r.submenuTitle),
                  (c = u)
              } else {
                var p = document.createElement('div')
                ;(p.className = 'jsoneditor-expand'), l.appendChild(p), (c = l)
              }
              c.onclick = function(e) {
                e.preventDefault(), n._onExpandItem(i), c.focus()
              }
              var g = []
              i.subItems = g
              var h = document.createElement('ul')
              ;(i.ul = h),
                (h.className = 'jsoneditor-menu'),
                (h.style.height = '0'),
                s.appendChild(h),
                o(h, g, r.submenu)
            } else l.innerHTML = '<div class="jsoneditor-icon"></div>' + r.text
            t.push(i)
          }
        })
      }
      this.dom = {}
      var n = this,
        r = this.dom
      ;(this.anchor = void 0),
        (this.items = e),
        (this.eventListeners = {}),
        (this.selection = void 0),
        (this.onClose = t ? t.close : void 0)
      var a = document.createElement('div')
      ;(a.className = 'jsoneditor-contextmenu-root'), (r.root = a)
      var i = document.createElement('div')
      ;(i.className = 'jsoneditor-contextmenu'), (r.menu = i), a.appendChild(i)
      var s = document.createElement('ul')
      ;(s.className = 'jsoneditor-menu'),
        i.appendChild(s),
        (r.list = s),
        (r.items = [])
      var l = document.createElement('button')
      ;(l.type = 'button'), (r.focusButton = l)
      var d = document.createElement('li')
      ;(d.style.overflow = 'hidden'),
        (d.style.height = '0'),
        d.appendChild(l),
        s.appendChild(d),
        o(s, this.dom.items, e),
        (this.maxHeight = 0),
        e.forEach(function(t) {
          var o = 24 * (e.length + (t.submenu ? t.submenu.length : 0))
          n.maxHeight = Math.max(n.maxHeight, o)
        })
    }
    var r = o(11)
    ;(n.prototype._getVisibleButtons = function() {
      var e = [],
        t = this
      return (
        this.dom.items.forEach(function(o) {
          e.push(o.button),
            o.buttonExpand && e.push(o.buttonExpand),
            o.subItems &&
              o == t.expandedItem &&
              o.subItems.forEach(function(t) {
                e.push(t.button), t.buttonExpand && e.push(t.buttonExpand)
              })
        }),
        e
      )
    }),
      (n.visibleMenu = void 0),
      (n.prototype.show = function(e, t) {
        this.hide()
        var o = !0
        if (t) {
          var a = e.getBoundingClientRect(),
            i = t.getBoundingClientRect()
          a.bottom + this.maxHeight < i.bottom ||
            (a.top - this.maxHeight > i.top && (o = !1))
        }
        if (o) {
          var s = e.offsetHeight
          ;(this.dom.menu.style.left = '0px'),
            (this.dom.menu.style.top = s + 'px'),
            (this.dom.menu.style.bottom = '')
        } else
          (this.dom.menu.style.left = '0px'),
            (this.dom.menu.style.top = ''),
            (this.dom.menu.style.bottom = '0px')
        var l = e.parentNode
        l.insertBefore(this.dom.root, l.firstChild)
        var d = this,
          c = this.dom.list
        ;(this.eventListeners.mousedown = r.addEventListener(
          window,
          'mousedown',
          function(e) {
            var t = e.target
            t == c ||
              d._isChildOf(t, c) ||
              (d.hide(), e.stopPropagation(), e.preventDefault())
          }
        )),
          (this.eventListeners.keydown = r.addEventListener(
            window,
            'keydown',
            function(e) {
              d._onKeyDown(e)
            }
          )),
          (this.selection = r.getSelection()),
          (this.anchor = e),
          setTimeout(function() {
            d.dom.focusButton.focus()
          }, 0),
          n.visibleMenu && n.visibleMenu.hide(),
          (n.visibleMenu = this)
      }),
      (n.prototype.hide = function() {
        for (var e in (this.dom.root.parentNode &&
          (this.dom.root.parentNode.removeChild(this.dom.root),
          this.onClose && this.onClose()),
        this.eventListeners))
          if (this.eventListeners.hasOwnProperty(e)) {
            var t = this.eventListeners[e]
            t && r.removeEventListener(window, e, t),
              delete this.eventListeners[e]
          }
        n.visibleMenu == this && (n.visibleMenu = void 0)
      }),
      (n.prototype._onExpandItem = function(e) {
        var t = this,
          o = e == this.expandedItem,
          n = this.expandedItem
        if (
          (n &&
            ((n.ul.style.height = '0'),
            (n.ul.style.padding = ''),
            setTimeout(function() {
              t.expandedItem != n &&
                ((n.ul.style.display = ''),
                r.removeClassName(n.ul.parentNode, 'jsoneditor-selected'))
            }, 300),
            (this.expandedItem = void 0)),
          !o)
        ) {
          var a = e.ul
          a.style.display = 'block'
          a.clientHeight
          setTimeout(function() {
            if (t.expandedItem == e) {
              for (var o = 0, n = 0; n < a.childNodes.length; n++)
                o += a.childNodes[n].clientHeight
              ;(a.style.height = o + 'px'), (a.style.padding = '5px 10px')
            }
          }, 0),
            r.addClassName(a.parentNode, 'jsoneditor-selected'),
            (this.expandedItem = e)
        }
      }),
      (n.prototype._onKeyDown = function(e) {
        var t = e.target,
          o = e.which,
          n = !1,
          a,
          i,
          s,
          l
        27 == o
          ? (this.selection && r.setSelection(this.selection),
            this.anchor && this.anchor.focus(),
            this.hide(),
            (n = !0))
          : 9 == o
            ? e.shiftKey
              ? ((a = this._getVisibleButtons()),
                (i = a.indexOf(t)),
                0 == i && (a[a.length - 1].focus(), (n = !0)))
              : ((a = this._getVisibleButtons()),
                (i = a.indexOf(t)),
                i == a.length - 1 && (a[0].focus(), (n = !0)))
            : 37 == o
              ? ('jsoneditor-expand' == t.className &&
                  ((a = this._getVisibleButtons()),
                  (i = a.indexOf(t)),
                  (s = a[i - 1]),
                  s && s.focus()),
                (n = !0))
              : 38 == o
                ? ((a = this._getVisibleButtons()),
                  (i = a.indexOf(t)),
                  (s = a[i - 1]),
                  s && 'jsoneditor-expand' == s.className && (s = a[i - 2]),
                  !s && (s = a[a.length - 1]),
                  s && s.focus(),
                  (n = !0))
                : 39 == o
                  ? ((a = this._getVisibleButtons()),
                    (i = a.indexOf(t)),
                    (l = a[i + 1]),
                    l && 'jsoneditor-expand' == l.className && l.focus(),
                    (n = !0))
                  : 40 == o &&
                    ((a = this._getVisibleButtons()),
                    (i = a.indexOf(t)),
                    (l = a[i + 1]),
                    l && 'jsoneditor-expand' == l.className && (l = a[i + 2]),
                    !l && (l = a[0]),
                    l && (l.focus(), (n = !0)),
                    (n = !0)),
          n && (e.stopPropagation(), e.preventDefault())
      }),
      (n.prototype._isChildOf = function(t, o) {
        for (var n = t.parentNode; n; ) {
          if (n == o) return !0
          n = n.parentNode
        }
        return !1
      }),
      (e.exports = n)
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e, t, o) {
    var n = 'undefined' == typeof JSON ? o(380) : JSON
    e.exports = function(e, t) {
      t || (t = {}), 'function' == typeof t && (t = { cmp: t })
      var o = t.space || ''
      'number' == typeof o && (o = Array(o + 1).join(' '))
      var i = !('boolean' != typeof t.cycles) && t.cycles,
        s =
          t.replacer ||
          function(e, t) {
            return t
          },
        l =
          t.cmp &&
          (function(e) {
            return function(t) {
              return function(o, n) {
                var r = { key: o, value: t[o] },
                  i = { key: n, value: t[n] }
                return e(r, i)
              }
            }
          })(t.cmp),
        d = []
      return (function e(t, c, u, p) {
        var g = o ? '\n' + Array(p + 1).join(o) : '',
          h = o ? ': ' : ':'
        if (
          (u && u.toJSON && 'function' == typeof u.toJSON && (u = u.toJSON()),
          (u = s.call(t, c, u)),
          void 0 !== u)
        ) {
          if ('object' != typeof u || null === u) return n.stringify(u)
          if (r(u)) {
            for (var m = [], f = 0, y; f < u.length; f++)
              (y = e(u, f, u[f], p + 1) || n.stringify(null)), m.push(g + o + y)
            return '[' + m.join(',') + g + ']'
          }
          if (-1 !== d.indexOf(u)) {
            if (i) return n.stringify('__cycle__')
            throw new TypeError('Converting circular structure to JSON')
          } else d.push(u)
          for (var A = a(u).sort(l && l(u)), m = [], f = 0; f < A.length; f++) {
            var c = A[f],
              C = e(u, c, u[c], p + 1)
            if (C) {
              var w = n.stringify(c) + h + C
              m.push(g + o + w)
            }
          }
          return d.splice(d.indexOf(u), 1), '{' + m.join(',') + g + '}'
        }
      })({ '': e }, '', e, 0)
    }
    var r =
        Array.isArray ||
        function(e) {
          return '[object Array]' === {}.toString.call(e)
        },
      a =
        Object.keys ||
        function(e) {
          var t =
              Object.prototype.hasOwnProperty ||
              function() {
                return !0
              },
            o = []
          for (var n in e) t.call(e, n) && o.push(n)
          return o
        }
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e) {
    function t(e) {
      var t = this,
        n = c.call(arguments, 1)
      return new Promise(function(r, a) {
        function i(t) {
          var o
          try {
            o = e.next(t)
          } catch (t) {
            return a(t)
          }
          d(o)
        }
        function l(t) {
          var o
          try {
            o = e.throw(t)
          } catch (t) {
            return a(t)
          }
          d(o)
        }
        function d(e) {
          if (e.done) return r(e.value)
          var n = o.call(t, e.value)
          return n && s(n)
            ? n.then(i, l)
            : l(
                new TypeError(
                  'You may only yield a function, promise, generator, array, or object, but the following object was passed: "' +
                    (e.value + '"')
                )
              )
        }
        return (
          'function' == typeof e && (e = e.apply(t, n)),
          e && 'function' == typeof e.next ? void i() : r(e)
        )
      })
    }
    function o(e) {
      return e
        ? s(e)
          ? e
          : l(e) || i(e)
            ? t.call(this, e)
            : 'function' == typeof e
              ? n.call(this, e)
              : Array.isArray(e)
                ? r.call(this, e)
                : d(e)
                  ? a.call(this, e)
                  : e
        : e
    }
    function n(e) {
      var t = this
      return new Promise(function(o, n) {
        e.call(t, function(e, t) {
          return e
            ? n(e)
            : void (2 < arguments.length && (t = c.call(arguments, 1)), o(t))
        })
      })
    }
    function r(e) {
      return Promise.all(e.map(o, this))
    }
    function a(e) {
      function t(e, t) {
        ;(n[t] = void 0),
          a.push(
            e.then(function(e) {
              n[t] = e
            })
          )
      }
      for (
        var n = new e.constructor(), r = Object.keys(e), a = [], l = 0;
        l < r.length;
        l++
      ) {
        var i = r[l],
          d = o.call(this, e[i])
        d && s(d) ? t(d, i) : (n[i] = e[i])
      }
      return Promise.all(a).then(function() {
        return n
      })
    }
    function s(e) {
      return 'function' == typeof e.then
    }
    function i(e) {
      return 'function' == typeof e.next && 'function' == typeof e.throw
    }
    function l(e) {
      var t = e.constructor
      return (
        !!t &&
        ('GeneratorFunction' === t.name ||
          'GeneratorFunction' === t.displayName ||
          i(t.prototype))
      )
    }
    function d(e) {
      return Object == e.constructor
    }
    var c = Array.prototype.slice
    ;(e.exports = t['default'] = t.co = t),
      (t.wrap = function(e) {
        function o() {
          return t.call(this, e.apply(this, arguments))
        }
        return (o.__generatorFunction__ = e), o
      })
  },
  ,
  ,
  ,
  function(e, t, o) {
    e.exports = o(371)
  },
  function(e) {
    function t(e) {
      throw new Error("Cannot find module '" + e + "'.")
    }
    ;(t.keys = function() {
      return []
    }),
      (t.resolve = t),
      (e.exports = t),
      (t.id = 98)
  },
  function(e, t, o) {
    'use strict'
    function n(e, t) {
      !1 !== t && (t = !0)
      var o = e.async,
        r = e.transpile,
        a
      switch (typeof r) {
        case 'string':
          var u = d[r]
          if (!u) throw new Error('bad transpiler: ' + r)
          return (e._transpileFunc = u(e, t))
        case 'undefined':
        case 'boolean':
          if ('string' == typeof o) {
            if (((a = l[o]), !a)) throw new Error('bad async mode: ' + o)
            return (e.transpile = a(e, t))
          }
          for (var p = 0, i; p < c.length; p++)
            if (((i = c[p]), n(i, !1))) return s.copy(i, e), e.transpile
          throw new Error(
            'generators, nodent and regenerator are not available'
          )
        case 'function':
          return (e._transpileFunc = e.transpile)
        default:
          throw new Error('bad transpiler: ' + r)
      }
    }
    function r(e, t) {
      try {
        return new Function('(function*(){})()')(), !0
      } catch (o) {
        if (t) throw new Error('generators not supported')
      }
    }
    function a(e) {
      return u.compile(e).code
    }
    function i(e) {
      return p.compile(e, '', { promises: !0, sourcemap: !1 }).code
    }
    e.exports = {
      setup: n,
      compile: function(e, t) {
        function o(e, t, r) {
          function a(r) {
            function a(r, a) {
              if (r) return t(r)
              if (!(n._refs[s] || n._schemas[s]))
                try {
                  n.addSchema(a, s)
                } catch (o) {
                  return void t(o)
                }
              o(e, t)
            }
            var s = r.missingSchema
            if (n._refs[s] || n._schemas[s])
              return t(
                new Error(
                  'Schema ' +
                    s +
                    ' is loaded but ' +
                    r.missingRef +
                    ' cannot be resolved'
                )
              )
            var i = n._loadingSchemas[s]
            i
              ? 'function' == typeof i
                ? (n._loadingSchemas[s] = [i, a])
                : (i[i.length] = a)
              : ((n._loadingSchemas[s] = a),
                n._opts.loadSchema(s, function(e, t) {
                  var o = n._loadingSchemas[s]
                  if ((delete n._loadingSchemas[s], 'function' == typeof o))
                    o(e, t)
                  else for (var r = 0; r < o.length; r++) o[r](e, t)
                }))
          }
          function i(e, o) {
            return r
              ? void setTimeout(function() {
                  t(e, o)
                })
              : t(e, o)
          }
          var s
          try {
            s = n.compile(e)
          } catch (t) {
            return void (t.missingSchema ? a(t) : i(t))
          }
          i(null, s)
        }
        var n = this,
          r
        try {
          r = this._addSchema(e)
        } catch (o) {
          return void setTimeout(function() {
            t(o)
          })
        }
        if (r.validate)
          setTimeout(function() {
            t(null, r.validate)
          })
        else {
          if ('function' != typeof this._opts.loadSchema)
            throw new Error('options.loadSchema should be a function')
          o(e, t, !0)
        }
      }
    }
    var s = o(10),
      l = {
        '*': r,
        'co*': r,
        es7: function(e, t) {
          try {
            return new Function('(async function(){})()')(), !0
          } catch (o) {
            if (t) throw new Error('es7 async functions not supported')
          }
        }
      },
      d = {
        nodent: function(e, t) {
          try {
            if (!p) {
              p = !(function() {
                var t = new Error('Cannot find module "."')
                throw ((t.code = 'MODULE_NOT_FOUND'), t)
              })()({ log: !1, dontInstallRequireHook: !0 })
            }
            return (
              'es7' != e.async &&
                (e.async &&
                  !0 !== e.async &&
                  console.warn('nodent transpiles only es7 async functions'),
                (e.async = 'es7')),
              i
            )
          } catch (o) {
            if (t) throw new Error('nodent not available')
          }
        },
        regenerator: function(e, t) {
          try {
            if (!u) {
              ;(u = !(function() {
                var t = new Error('Cannot find module "."')
                throw ((t.code = 'MODULE_NOT_FOUND'), t)
              })()),
                u.runtime()
            }
            return (e.async && !0 !== e.async) || (e.async = 'es7'), a
          } catch (o) {
            if (t) throw new Error('regenerator not available')
          }
        }
      },
      c = [
        { async: 'co*' },
        { async: 'es7', transpile: 'nodent' },
        { async: 'co*', transpile: 'regenerator' }
      ],
      u,
      p
  },
  function(e) {
    'use strict'
    e.exports = function e(t, o) {
      if (t === o) return !0
      var n = Array.isArray(t),
        r = Array.isArray(o),
        s
      if (n && r) {
        if (t.length != o.length) return !1
        for (s = 0; s < t.length; s++) if (!e(t[s], o[s])) return !1
        return !0
      }
      if (n != r) return !1
      if (t && o && 'object' == typeof t && 'object' == typeof o) {
        var i = Object.keys(t)
        if (i.length !== Object.keys(o).length) return !1
        var l = t instanceof Date,
          d = o instanceof Date
        if (l && d) return t.getTime() == o.getTime()
        if (l != d) return !1
        var c = t instanceof RegExp,
          u = o instanceof RegExp
        if (c && u) return t.toString() == o.toString()
        if (c != u) return !1
        for (s = 0; s < i.length; s++)
          if (!Object.prototype.hasOwnProperty.call(o, i[s])) return !1
        for (s = 0; s < i.length; s++) if (!e(t[i[s]], o[i[s]])) return !1
        return !0
      }
      return !1
    }
  },
  function(e, t, o) {
    'use strict'
    function n(e, t, o) {
      var a = this._refs[o]
      if ('string' == typeof a)
        if (this._refs[a]) a = this._refs[a]
        else return n.call(this, e, t, a)
      if (((a = a || this._schemas[o]), a instanceof y))
        return s(a.schema, this._opts.inlineRefs)
          ? a.schema
          : a.validate || this._compile(a)
      var i = r.call(this, t, o),
        l,
        d,
        c
      return (
        i && ((l = i.schema), (t = i.root), (c = i.baseId)),
        l instanceof y
          ? (d = l.validate || e.call(this, l.schema, t, void 0, c))
          : l &&
            (d = s(l, this._opts.inlineRefs)
              ? l
              : e.call(this, l, t, void 0, c)),
        d
      )
    }
    function r(e, t) {
      var o = h.parse(t, !1, !0),
        n = u(o),
        r = c(e.schema.id)
      if (n !== r) {
        var s = g(n),
          l = this._refs[s]
        if ('string' == typeof l) return a.call(this, e, l, o)
        if (l instanceof y) l.validate || this._compile(l), (e = l)
        else if (((l = this._schemas[s]), l instanceof y)) {
          if ((l.validate || this._compile(l), s == g(t)))
            return { schema: l, root: e, baseId: r }
          e = l
        } else return
        if (!e.schema) return
        r = c(e.schema.id)
      }
      return i.call(this, o, r, e.schema, e)
    }
    function a(e, t, o) {
      var n = r.call(this, e, t)
      if (n) {
        var a = n.schema,
          s = n.baseId
        return (e = n.root), a.id && (s = p(s, a.id)), i.call(this, o, s, a, e)
      }
    }
    function i(e, t, o, n) {
      if (((e.hash = e.hash || ''), '#/' == e.hash.slice(0, 2))) {
        for (var a = e.hash.split('/'), s = 1, i; s < a.length; s++)
          if (((i = a[s]), i)) {
            if (((i = f.unescapeFragment(i)), (o = o[i]), !o)) break
            if ((o.id && !A[i] && (t = p(t, o.id)), o.$ref)) {
              var l = p(t, o.$ref),
                d = r.call(this, n, l)
              d && ((o = d.schema), (n = d.root), (t = d.baseId))
            }
          }
        if (o && o != n.schema) return { schema: o, root: n, baseId: t }
      }
    }
    function s(e, t) {
      if (!1 === t) return !1
      return void 0 === t || !0 === t ? l(e) : t ? d(e) <= t : void 0
    }
    function l(e) {
      var t
      if (Array.isArray(e)) {
        for (var o = 0; o < e.length; o++)
          if (((t = e[o]), 'object' == typeof t && !l(t))) return !1
      } else
        for (var n in e) {
          if ('$ref' == n) return !1
          if (((t = e[n]), 'object' == typeof t && !l(t))) return !1
        }
      return !0
    }
    function d(e) {
      var t = 0,
        o
      if (Array.isArray(e)) {
        for (var n = 0; n < e.length; n++)
          if (((o = e[n]), 'object' == typeof o && (t += d(o)), t == Infinity))
            return Infinity
      } else
        for (var r in e) {
          if ('$ref' == r) return Infinity
          if (C[r]) t++
          else if (
            ((o = e[r]), 'object' == typeof o && (t += d(o) + 1), t == Infinity)
          )
            return Infinity
        }
      return t
    }
    function c(e, t) {
      !1 !== t && (e = g(e))
      var o = h.parse(e, !1, !0)
      return u(o)
    }
    function u(e) {
      var t = e.protocol || '//' == e.href.slice(0, 2) ? '//' : ''
      return (e.protocol || '') + t + (e.host || '') + (e.path || '') + '#'
    }
    function g(e) {
      return e ? e.replace(w, '') : ''
    }
    function p(e, t) {
      return (t = g(t)), h.resolve(e, t)
    }
    var h = o(397),
      m = o(100),
      f = o(10),
      y = o(102)
    ;(e.exports = n),
      (n.normalizeId = g),
      (n.fullPath = c),
      (n.url = p),
      (n.ids = function(e) {
        function t(e, o, r) {
          if (Array.isArray(e))
            for (var a = 0; a < e.length; a++)
              t.call(this, e[a], o + '/' + a, r)
          else if (e && 'object' == typeof e) {
            if ('string' == typeof e.id) {
              var i = (r = r ? h.resolve(r, e.id) : e.id)
              i = g(i)
              var s = this._refs[i]
              if (
                ('string' == typeof s && (s = this._refs[s]), s && s.schema)
              ) {
                if (!m(e, s.schema))
                  throw new Error(
                    'id "' + i + '" resolves to more than one schema'
                  )
              } else if (i != g(o))
                if ('#' == i[0]) {
                  if (n[i] && !m(e, n[i]))
                    throw new Error(
                      'id "' + i + '" resolves to more than one schema'
                    )
                  n[i] = e
                } else this._refs[i] = o
            }
            for (var l in e)
              t.call(this, e[l], o + '/' + f.escapeFragment(l), r)
          }
        }
        var o = g(e.id),
          n = {}
        return t.call(this, e, c(o, !1), o), n
      }),
      (n.inlineRef = s),
      (n.schema = r)
    var A = f.toHash([
        'properties',
        'patternProperties',
        'enum',
        'dependencies',
        'definitions'
      ]),
      C = f.toHash([
        'type',
        'format',
        'pattern',
        'maxLength',
        'minLength',
        'maxProperties',
        'minProperties',
        'maxItems',
        'minItems',
        'maximum',
        'minimum',
        'uniqueItems',
        'multipleOf',
        'required',
        'enum'
      ]),
      w = /#\/?$/
  },
  function(e, t, o) {
    'use strict'
    var n = o(10)
    e.exports = function(e) {
      n.copy(e, this)
    }
  },
  function(e) {
    'use strict'
    function t(e) {
      ;(this.message = 'validation failed'),
        (this.errors = e),
        (this.ajv = this.validation = !0)
    }
    ;(e.exports = t),
      (t.prototype = Object.create(Error.prototype)),
      (t.prototype.constructor = t)
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = e.opts.v5 && a && a.$data,
        u,
        p
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a)
      var g = 'maximum' == t,
        h = g ? 'exclusiveMaximum' : 'exclusiveMinimum',
        m = e.schema[h],
        f = e.opts.v5 && m && m.$data,
        y = g ? '<' : '>',
        A = g ? '>' : '<'
      if (f) {
        var C = e.util.getData(m.$data, r, e.dataPathArr),
          w = 'exclusive' + n,
          E = 'op' + n,
          b = "' + " + E + " + '"
        ;(o += ' var schemaExcl' + n + ' = ' + C + '; '),
          (C = 'schemaExcl' + n),
          (o +=
            ' var exclusive' +
            n +
            '; if (typeof ' +
            C +
            " != 'boolean' && typeof " +
            C +
            " != 'undefined') { ")
        var u = h,
          v = v || []
        v.push(o),
          (o = ''),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: '" +
                (u || '_exclusiveLimit') +
                "' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                ' , params: {} '),
              !1 !== e.opts.messages &&
                (o += " , message: '" + h + " should be boolean' "),
              e.opts.verbose &&
                (o +=
                  ' , schema: validate.schema' +
                  i +
                  ' , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  d +
                  ' '),
              (o += ' } '))
        var F = o
        ;(o = v.pop()),
          (o +=
            !e.compositeRule && l
              ? e.async
                ? ' throw new ValidationError([' + F + ']); '
                : ' validate.errors = [' + F + ']; return false; '
              : ' var err = ' +
                F +
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
          (o += ' } else if( '),
          c &&
            (o +=
              ' (' + p + ' !== undefined && typeof ' + p + " != 'number') || "),
          (o +=
            ' ((exclusive' +
            n +
            ' = ' +
            C +
            ' === true) ? ' +
            d +
            ' ' +
            A +
            '= ' +
            p +
            ' : ' +
            d +
            ' ' +
            A +
            ' ' +
            p +
            ') || ' +
            d +
            ' !== ' +
            d +
            ') { var op' +
            n +
            ' = exclusive' +
            n +
            " ? '" +
            y +
            "' : '" +
            y +
            "=';")
      } else {
        var w = !0 === m,
          b = y
        w || (b += '=')
        var E = "'" + b + "'"
        ;(o += ' if ( '),
          c &&
            (o +=
              ' (' + p + ' !== undefined && typeof ' + p + " != 'number') || "),
          (o += ' ' + d + ' ' + A),
          w && (o += '='),
          (o += ' ' + p + ' || ' + d + ' !== ' + d + ') {')
      }
      var u = t,
        v = v || []
      v.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: '" +
              (u || '_limit') +
              "' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { comparison: ' +
              E +
              ', limit: ' +
              p +
              ', exclusive: ' +
              w +
              ' } '),
            !1 !== e.opts.messages &&
              ((o += " , message: 'should be " + b + ' '),
              (o += c ? "' + " + p : '' + a + "'")),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + a),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var F = o
      return (
        (o = v.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + F + ']); '
              : ' validate.errors = [' + F + ']; return false; '
            : ' var err = ' +
              F +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += ' } '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = e.opts.v5 && a && a.$data,
        u,
        p
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a)
      var g = 'maxItems' == t ? '>' : '<'
      ;(o += 'if ( '),
        c &&
          (o +=
            ' (' + p + ' !== undefined && typeof ' + p + " != 'number') || "),
        (o += ' ' + d + '.length ' + g + ' ' + p + ') { ')
      var h = h || []
      h.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: '" +
              (t || '_limitItems') +
              "' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { limit: ' +
              p +
              ' } '),
            !1 !== e.opts.messages &&
              ((o += " , message: 'should NOT have "),
              (o += 'maxItems' == t ? 'more' : 'less'),
              (o += ' than '),
              (o += c ? "' + " + p + " + '" : '' + a),
              (o += " items' ")),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + a),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var m = o
      return (
        (o = h.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + m + ']); '
              : ' validate.errors = [' + m + ']; return false; '
            : ' var err = ' +
              m +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += '} '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = e.opts.v5 && a && a.$data,
        u,
        p
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a)
      var g = 'maxLength' == t ? '>' : '<'
      ;(o += 'if ( '),
        c &&
          (o +=
            ' (' + p + ' !== undefined && typeof ' + p + " != 'number') || "),
        (o +=
          !1 === e.opts.unicode
            ? ' ' + d + '.length '
            : ' ucs2length(' + d + ') '),
        (o += ' ' + g + ' ' + p + ') { ')
      var h = h || []
      h.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: '" +
              (t || '_limitLength') +
              "' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { limit: ' +
              p +
              ' } '),
            !1 !== e.opts.messages &&
              ((o += " , message: 'should NOT be "),
              (o += 'maxLength' == t ? 'longer' : 'shorter'),
              (o += ' than '),
              (o += c ? "' + " + p + " + '" : '' + a),
              (o += " characters' ")),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + a),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var m = o
      return (
        (o = h.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + m + ']); '
              : ' validate.errors = [' + m + ']; return false; '
            : ' var err = ' +
              m +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += '} '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = e.opts.v5 && a && a.$data,
        u,
        p
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a)
      var g = 'maxProperties' == t ? '>' : '<'
      ;(o += 'if ( '),
        c &&
          (o +=
            ' (' + p + ' !== undefined && typeof ' + p + " != 'number') || "),
        (o += ' Object.keys(' + d + ').length ' + g + ' ' + p + ') { ')
      var h = h || []
      h.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: '" +
              (t || '_limitProperties') +
              "' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { limit: ' +
              p +
              ' } '),
            !1 !== e.opts.messages &&
              ((o += " , message: 'should NOT have "),
              (o += 'maxProperties' == t ? 'more' : 'less'),
              (o += ' than '),
              (o += c ? "' + " + p + " + '" : '' + a),
              (o += " properties' ")),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + a),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var m = o
      return (
        (o = h.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + m + ']); '
              : ' validate.errors = [' + m + ']; return false; '
            : ' var err = ' +
              m +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += '} '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e) {
      function t(e) {
        for (var t = 0; t < e.rules.length; t++) if (o(e.rules[t])) return !0
      }
      function o(t) {
        return (
          void 0 !== e.schema[t.keyword] ||
          ('properties' == t.keyword &&
            (!1 === e.schema.additionalProperties ||
              'object' == typeof e.schema.additionalProperties ||
              (e.schema.patternProperties &&
                Object.keys(e.schema.patternProperties).length) ||
              (e.opts.v5 &&
                e.schema.patternGroups &&
                Object.keys(e.schema.patternGroups).length)))
        )
      }
      var n = '',
        r = !0 === e.schema.$async
      if (e.isTop) {
        var a = e.isTop,
          i = (e.level = 0),
          s = (e.dataLevel = 0),
          l = 'data'
        if (
          ((e.rootId = e.resolve.fullPath(e.root.schema.id)),
          (e.baseId = e.baseId || e.rootId),
          r)
        ) {
          e.async = !0
          var d = 'es7' == e.opts.async
          e.yieldAwait = d ? 'await' : 'yield'
        }
        delete e.isTop,
          (e.dataPathArr = [void 0]),
          (n += ' var validate = '),
          r
            ? d
              ? (n += ' (async function ')
              : ('co*' == e.opts.async && (n += 'co.wrap'),
                (n += '(function* '))
            : (n += ' (function '),
          (n +=
            " (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; "),
          (n += ' var errors = 0;     '),
          (n += ' if (rootData === undefined) rootData = data;')
      } else {
        var i = e.level,
          s = e.dataLevel,
          l = 'data' + (s || '')
        if (
          (e.schema.id && (e.baseId = e.resolve.url(e.baseId, e.schema.id)),
          r && !e.async)
        )
          throw new Error('async schema in sync schema')
        n += ' var errs_' + i + ' = errors;'
      }
      var c = !e.opts.allErrors,
        u = '',
        p = '',
        g = e.schema.type,
        h = Array.isArray(g)
      if (g && e.opts.coerceTypes) {
        var m = e.util.coerceToTypes(e.opts.coerceTypes, g)
        if (m) {
          var f = e.schemaPath + '.type',
            y = e.errSchemaPath + '/type',
            A = h ? 'checkDataTypes' : 'checkDataType'
          n += ' if (' + e.util[A](g, l, !0) + ') {  '
          var C = 'dataType' + i,
            w = 'coerced' + i
          ;(n += ' var ' + C + ' = typeof ' + l + '; '),
            'array' == e.opts.coerceTypes &&
              (n +=
                ' if (' +
                C +
                " == 'object' && Array.isArray(" +
                l +
                ')) ' +
                C +
                " = 'array'; "),
            (n += ' var ' + w + ' = undefined; ')
          var E = '',
            b = m
          if (b)
            for (var v = -1, F = b.length - 1, x; v < F; )
              (x = b[(v += 1)]),
                v && ((n += ' if (' + w + ' === undefined) { '), (E += '}')),
                'array' == e.opts.coerceTypes &&
                  'array' != x &&
                  (n +=
                    ' if (' +
                    C +
                    " == 'array' && " +
                    l +
                    '.length == 1) { ' +
                    w +
                    ' = ' +
                    l +
                    ' = ' +
                    l +
                    '[0]; ' +
                    C +
                    ' = typeof ' +
                    l +
                    ';  } '),
                'string' == x
                  ? (n +=
                      ' if (' +
                      C +
                      " == 'number' || " +
                      C +
                      " == 'boolean') " +
                      w +
                      " = '' + " +
                      l +
                      '; else if (' +
                      l +
                      ' === null) ' +
                      w +
                      " = ''; ")
                  : 'number' == x || 'integer' == x
                    ? ((n +=
                        ' if (' +
                        C +
                        " == 'boolean' || " +
                        l +
                        ' === null || (' +
                        C +
                        " == 'string' && " +
                        l +
                        ' && ' +
                        l +
                        ' == +' +
                        l +
                        ' '),
                      'integer' == x && (n += ' && !(' + l + ' % 1)'),
                      (n += ')) ' + w + ' = +' + l + '; '))
                    : 'boolean' == x
                      ? (n +=
                          ' if (' +
                          l +
                          " === 'false' || " +
                          l +
                          ' === 0 || ' +
                          l +
                          ' === null) ' +
                          w +
                          ' = false; else if (' +
                          l +
                          " === 'true' || " +
                          l +
                          ' === 1) ' +
                          w +
                          ' = true; ')
                      : 'null' == x
                        ? (n +=
                            ' if (' +
                            l +
                            " === '' || " +
                            l +
                            ' === 0 || ' +
                            l +
                            ' === false) ' +
                            w +
                            ' = null; ')
                        : 'array' == e.opts.coerceTypes &&
                          'array' == x &&
                          (n +=
                            ' if (' +
                            C +
                            " == 'string' || " +
                            C +
                            " == 'number' || " +
                            C +
                            " == 'boolean' || " +
                            l +
                            ' == null) ' +
                            w +
                            ' = [' +
                            l +
                            ']; ')
          n += ' ' + E + ' if (' + w + ' === undefined) {   '
          var S = S || []
          S.push(n),
            (n = ''),
            !1 === e.createErrors
              ? (n += ' {} ')
              : ((n +=
                  " { keyword: 'type' , dataPath: (dataPath || '') + " +
                  e.errorPath +
                  ' , schemaPath: ' +
                  e.util.toQuotedString(y) +
                  " , params: { type: '"),
                (n += h ? '' + g.join(',') : '' + g),
                (n += "' } "),
                !1 !== e.opts.messages &&
                  ((n += " , message: 'should be "),
                  (n += h ? '' + g.join(',') : '' + g),
                  (n += "' ")),
                e.opts.verbose &&
                  (n +=
                    ' , schema: validate.schema' +
                    f +
                    ' , parentSchema: validate.schema' +
                    e.schemaPath +
                    ' , data: ' +
                    l +
                    ' '),
                (n += ' } '))
          var $ = n
          ;(n = S.pop()),
            (n +=
              !e.compositeRule && c
                ? e.async
                  ? ' throw new ValidationError([' + $ + ']); '
                  : ' validate.errors = [' + $ + ']; return false; '
                : ' var err = ' +
                  $ +
                  ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
            (n += ' } else {  ')
          var k = s ? 'data' + (s - 1 || '') : 'parentData',
            D = s ? e.dataPathArr[s] : 'parentDataProperty'
          ;(n += ' ' + l + ' = ' + w + '; '),
            s || (n += 'if (' + k + ' !== undefined)'),
            (n += ' ' + k + '[' + D + '] = ' + w + '; } } ')
        }
      }
      var B
      if (
        e.schema.$ref &&
        (B = e.util.schemaHasRulesExcept(e.schema, e.RULES.all, '$ref'))
      )
        if ('fail' == e.opts.extendRefs)
          throw new Error(
            '$ref: validation keywords used in schema at path "' +
              e.errSchemaPath +
              '"'
          )
        else
          'ignore' == e.opts.extendRefs
            ? ((B = !1),
              console.log(
                '$ref: keywords ignored in schema at path "' +
                  e.errSchemaPath +
                  '"'
              ))
            : !0 !== e.opts.extendRefs &&
              console.log(
                '$ref: all keywords used in schema at path "' +
                  e.errSchemaPath +
                  '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour'
              )
      if (e.schema.$ref && !B)
        (n += ' ' + e.RULES.all.$ref.code(e, '$ref') + ' '),
          c &&
            ((n += ' } if (errors === '),
            (n += a ? '0' : 'errs_' + i),
            (n += ') { '),
            (p += '}'))
      else {
        var _ = e.RULES
        if (_)
          for (var L = -1, R = _.length - 1, P; L < R; )
            if (((P = _[(L += 1)]), t(P))) {
              if (
                (P.type &&
                  (n += ' if (' + e.util.checkDataType(P.type, l) + ') { '),
                e.opts.useDefaults && !e.compositeRule)
              )
                if ('object' == P.type && e.schema.properties) {
                  var T = e.schema.properties,
                    M = Object.keys(T),
                    O = M
                  if (O)
                    for (var N = -1, I = O.length - 1, j; N < I; ) {
                      j = O[(N += 1)]
                      var W = T[j]
                      if (void 0 !== W.default) {
                        var H = l + e.util.getProperty(j)
                        ;(n += '  if (' + H + ' === undefined) ' + H + ' = '),
                          (n +=
                            'shared' == e.opts.useDefaults
                              ? ' ' + e.useDefault(W.default) + ' '
                              : ' ' + JSON.stringify(W.default) + ' '),
                          (n += '; ')
                      }
                    }
                } else if ('array' == P.type && Array.isArray(e.schema.items)) {
                  var V = e.schema.items
                  if (V)
                    for (var v = -1, U = V.length - 1, W; v < U; )
                      if (((W = V[(v += 1)]), void 0 !== W.default)) {
                        var H = l + '[' + v + ']'
                        ;(n += '  if (' + H + ' === undefined) ' + H + ' = '),
                          (n +=
                            'shared' == e.opts.useDefaults
                              ? ' ' + e.useDefault(W.default) + ' '
                              : ' ' + JSON.stringify(W.default) + ' '),
                          (n += '; ')
                      }
                }
              var z = P.rules
              if (z)
                for (var K = -1, G = z.length - 1, q; K < G; )
                  (q = z[(K += 1)]),
                    o(q) &&
                      ((n += ' ' + q.code(e, q.keyword) + ' '), c && (u += '}'))
              if (
                (c && ((n += ' ' + u + ' '), (u = '')),
                P.type && ((n += ' } '), g && g === P.type))
              ) {
                n += ' else { '
                var f = e.schemaPath + '.type',
                  y = e.errSchemaPath + '/type',
                  S = S || []
                S.push(n),
                  (n = ''),
                  !1 === e.createErrors
                    ? (n += ' {} ')
                    : ((n +=
                        " { keyword: 'type' , dataPath: (dataPath || '') + " +
                        e.errorPath +
                        ' , schemaPath: ' +
                        e.util.toQuotedString(y) +
                        " , params: { type: '"),
                      (n += h ? '' + g.join(',') : '' + g),
                      (n += "' } "),
                      !1 !== e.opts.messages &&
                        ((n += " , message: 'should be "),
                        (n += h ? '' + g.join(',') : '' + g),
                        (n += "' ")),
                      e.opts.verbose &&
                        (n +=
                          ' , schema: validate.schema' +
                          f +
                          ' , parentSchema: validate.schema' +
                          e.schemaPath +
                          ' , data: ' +
                          l +
                          ' '),
                      (n += ' } '))
                var $ = n
                ;(n = S.pop()),
                  (n +=
                    !e.compositeRule && c
                      ? e.async
                        ? ' throw new ValidationError([' + $ + ']); '
                        : ' validate.errors = [' + $ + ']; return false; '
                      : ' var err = ' +
                        $ +
                        ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
                  (n += ' } ')
              }
              c &&
                ((n += ' if (errors === '),
                (n += a ? '0' : 'errs_' + i),
                (n += ') { '),
                (p += '}'))
            }
      }
      var f, y, A, S, $
      return (
        c && (n += ' ' + p + ' '),
        a
          ? (r
              ? ((n += ' if (errors === 0) return true;           '),
                (n += ' else throw new ValidationError(vErrors); '))
              : ((n += ' validate.errors = vErrors; '),
                (n += ' return errors === 0;       ')),
            (n += ' }); return validate;'))
          : (n += ' var ' + ('valid' + i) + ' = errors === errs_' + i + ';'),
        (n = e.util.cleanUpCode(n)),
        a && c && (n = e.util.cleanUpVarErrors(n, r)),
        n
      )
    }
  },
  function(e, t, o) {
    'use strict'
    function n(e, t, o, n) {
      for (
        var a = {
            code: {
              text: 'Code',
              title: 'Switch to code highlighter',
              click: function() {
                n('code')
              }
            },
            form: {
              text: 'Form',
              title: 'Switch to form editor',
              click: function() {
                n('form')
              }
            },
            text: {
              text: 'Text',
              title: 'Switch to plain text editor',
              click: function() {
                n('text')
              }
            },
            tree: {
              text: 'Tree',
              title: 'Switch to tree editor',
              click: function() {
                n('tree')
              }
            },
            view: {
              text: 'View',
              title: 'Switch to tree view',
              click: function() {
                n('view')
              }
            }
          },
          s = [],
          l = 0;
        l < t.length;
        l++
      ) {
        var i = t[l],
          d = a[i]
        if (!d) throw new Error('Unknown mode "' + i + '"')
        ;(d.className =
          'jsoneditor-type-modes' + (o == i ? ' jsoneditor-selected' : '')),
          s.push(d)
      }
      var c = a[o]
      if (!c) throw new Error('Unknown mode "' + o + '"')
      var u = c.text,
        p = document.createElement('button')
      ;(p.type = 'button'),
        (p.className = 'jsoneditor-modes jsoneditor-separator'),
        (p.innerHTML = u + ' &#x25BE;'),
        (p.title = 'Switch editor mode'),
        (p.onclick = function() {
          var e = new r(s)
          e.show(p)
        })
      var g = document.createElement('div')
      ;(g.className = 'jsoneditor-modes'),
        (g.style.position = 'relative'),
        g.appendChild(p),
        e.appendChild(g),
        (this.dom = { container: e, box: p, frame: g })
    }
    var r = o(36)
    ;(n.prototype.focus = function() {
      this.dom.box.focus()
    }),
      (n.prototype.destroy = function() {
        this.dom &&
          this.dom.frame &&
          this.dom.frame.parentNode &&
          this.dom.frame.parentNode.removeChild(this.dom.frame),
          (this.dom = null)
      }),
      (e.exports = n)
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e, t, o) {
    function n(e) {
      if (Array.isArray(e)) return 'array'
      let t = typeof e
      return 'string' == t || 'object' == t ? t : 'auto'
    }
    function r(e, t) {
      let o = e.get(),
        r = i(o, t)
      if (!r || 0 === r.length) return
      let a, d
      r.forEach(t => {
        let { kind: o, path: r, rhs: i } = t,
          c = l.findNodeFromPath(e, r)
        if ((c !== a && ((a = c), (d = 0)), 'E' === o)) {
          try {
            let e = n(i)
            e !== c.type && (c.changeType(e), c.setValue(i))
          } catch (t) {}
          try {
            c.updateValue(i)
          } catch (t) {}
        } else if ('N' === o) {
          let t = new s(e, { field: r[r.length - 1], value: i })
          c.appendChild(t)
        } else if ('D' === o) c.parent.removeChild(c)
        else if ('A' === o) {
          let { item: o, index: n } = t
          if ('D' === o.kind) c.removeChild(c.childs[n - d]), (d += 1)
          else if ('N' === o.kind) {
            c.childs || (c.childs = [])
            let t = new s(e, { field: void 0, value: o.rhs }),
              r = c.childs[n - 1]
            c.insertAfter(t, r)
          }
        }
      })
      let c = e.get(),
        u = i(t, c)
      u &&
        u.length &&
        (console.log(c),
        console.log(t),
        console.log(u),
        console.log(r),
        console.error('some wrong'))
    }
    const a = o(97),
      i = o(271),
      s = o(273),
      l = o(274),
      d = document.getElementById('jsoneditor')
    var c = {}
    window.currentEditors = c
    var u = {
      mode: 'tree',
      modes: ['code', 'tree'],
      onEditable: function(e) {
        switch (e.field) {
          case '__webviewId__':
            return !1
          default:
            return !0
        }
      }
    }
    e.exports = function(e, t) {
      let { onChange: o } = t
      for (let o in e) {
        let n = e[o],
          i = n.__webviewId__
        if (c[o]) r(c[o].editor, n)
        else {
          let e = document.createElement('div')
          e.classList.add('editor-margin'), (c[o] = {})
          let r = Object.assign({}, u)
          ;(r.name = o),
            (r.onChange = () => {
              let e = {}
              for (let t in c) e[t] = c[t].editor.get()
              t.onChange(e)
            }),
            (r.onModeChange = t => {
              e.style.height = 'code' === t ? '500px' : 'auto'
            }),
            (c[o].editor = new a(e, r, n)),
            (c[o].dom = e),
            d.appendChild(e)
        }
      }
      for (let o in c)
        if (!e[o]) {
          let e = c[o]
          e.editor.destroy(), e.dom.remove(), delete c[o]
        }
    }
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e, t, o) {
    'use strict'
    ;(function(t) {
      function o(e, t) {
        ;(e.super_ = t),
          (e.prototype = Object.create(t.prototype, {
            constructor: {
              value: e,
              enumerable: !1,
              writable: !0,
              configurable: !0
            }
          }))
      }
      function n(e, t) {
        Object.defineProperty(this, 'kind', { value: e, enumerable: !0 }),
          t &&
            t.length &&
            Object.defineProperty(this, 'path', { value: t, enumerable: !0 })
      }
      function r(e, t, o) {
        r.super_.call(this, 'E', e),
          Object.defineProperty(this, 'lhs', { value: t, enumerable: !0 }),
          Object.defineProperty(this, 'rhs', { value: o, enumerable: !0 })
      }
      function a(e, t) {
        a.super_.call(this, 'N', e),
          Object.defineProperty(this, 'rhs', { value: t, enumerable: !0 })
      }
      function s(e, t) {
        s.super_.call(this, 'D', e),
          Object.defineProperty(this, 'lhs', { value: t, enumerable: !0 })
      }
      function l(e, t, o) {
        l.super_.call(this, 'A', e),
          Object.defineProperty(this, 'index', { value: t, enumerable: !0 }),
          Object.defineProperty(this, 'item', { value: o, enumerable: !0 })
      }
      function i(e, t, o) {
        var n = e.slice((o || t) + 1 || e.length)
        return (e.length = 0 > t ? e.length + t : t), e.push.apply(e, n), e
      }
      function d(e) {
        var t = typeof e
        if ('object' != t) return t
        return e === Math
          ? 'math'
          : null === e
            ? 'null'
            : Array.isArray(e)
              ? 'array'
              : '[object Date]' === Object.prototype.toString.call(e)
                ? 'date'
                : 'function' == typeof e.toString &&
                  /^\/.*\//.test(e.toString())
                  ? 'regexp'
                  : 'object'
      }
      function c(e, t, o, n, u, p, g) {
        ;(u = u || []), (g = g || [])
        var h = u.slice(0)
        if ('undefined' != typeof p) {
          if (n) {
            if ('function' == typeof n && n(h, p)) return
            if ('object' == typeof n) {
              if (n.prefilter && n.prefilter(h, p)) return
              if (n.normalize) {
                var m = n.normalize(h, p, e, t)
                m && ((e = m[0]), (t = m[1]))
              }
            }
          }
          h.push(p)
        }
        'regexp' === d(e) &&
          'regexp' === d(t) &&
          ((e = e.toString()), (t = t.toString()))
        var f = typeof e,
          y = typeof t,
          A =
            'undefined' != f ||
            (g && g[g.length - 1].lhs && g[g.length - 1].lhs.hasOwnProperty(p)),
          C =
            'undefined' != y ||
            (g && g[g.length - 1].rhs && g[g.length - 1].rhs.hasOwnProperty(p))
        if (!A && C) o(new a(h, t))
        else if (!C && A) o(new s(h, e))
        else if (d(e) !== d(t)) o(new r(h, e, t))
        else if ('date' === d(e) && 0 != e - t) o(new r(h, e, t))
        else if (!('object' == f && null !== e && null !== t))
          e !== t &&
            (('number' == f && isNaN(e) && isNaN(t)) || o(new r(h, e, t)))
        else if (
          !g.filter(function(t) {
            return t.lhs === e
          }).length
        ) {
          if ((g.push({ lhs: e, rhs: t }), Array.isArray(e))) {
            var w = e.length,
              E
            for (E = 0; E < e.length; E++)
              E >= t.length
                ? o(new l(h, E, new s(void 0, e[E])))
                : c(e[E], t[E], o, n, h, E, g)
            for (; E < t.length; ) o(new l(h, E, new a(void 0, t[E++])))
          } else {
            var b = Object.keys(e),
              v = Object.keys(t)
            b.forEach(function(r) {
              var a = v.indexOf(r)
              0 <= a
                ? (c(e[r], t[r], o, n, h, r, g), (v = i(v, a)))
                : c(e[r], void 0, o, n, h, r, g)
            }),
              v.forEach(function(e) {
                c(void 0, t[e], o, n, h, e, g)
              })
          }
          --g.length
        } else e !== t && o(new r(h, e, t))
      }
      function u(e, t, o, n) {
        return (
          (n = n || []),
          c(
            e,
            t,
            function(e) {
              e && n.push(e)
            },
            o
          ),
          n.length ? n : void 0
        )
      }
      function p(e, t, o) {
        if (o.path && o.path.length) {
          var n = e[t],
            r = o.path.length - 1,
            a
          for (a = 0; a < r; a++) n = n[o.path[a]]
          switch (o.kind) {
            case 'A':
              p(n[o.path[a]], o.index, o.item)
              break
            case 'D':
              delete n[o.path[a]]
              break
            case 'E':
            case 'N':
              n[o.path[a]] = o.rhs
          }
        } else
          switch (o.kind) {
            case 'A':
              p(e[t], o.index, o.item)
              break
            case 'D':
              e = i(e, t)
              break
            case 'E':
            case 'N':
              e[t] = o.rhs
          }
        return e
      }
      function g(e, t, o) {
        if (e && t && o && o.kind) {
          for (var n = e, r = -1, a = o.path ? o.path.length - 1 : 0; ++r < a; )
            'undefined' == typeof n[o.path[r]] &&
              (n[o.path[r]] = 'number' == typeof o.path[r] ? [] : {}),
              (n = n[o.path[r]])
          switch (o.kind) {
            case 'A':
              p(o.path ? n[o.path[r]] : n, o.index, o.item)
              break
            case 'D':
              delete n[o.path[r]]
              break
            case 'E':
            case 'N':
              n[o.path[r]] = o.rhs
          }
        }
      }
      function h(e, t, o) {
        if (o.path && o.path.length) {
          var n = e[t],
            r = o.path.length - 1,
            a
          for (a = 0; a < r; a++) n = n[o.path[a]]
          switch (o.kind) {
            case 'A':
              h(n[o.path[a]], o.index, o.item)
              break
            case 'D':
              n[o.path[a]] = o.lhs
              break
            case 'E':
              n[o.path[a]] = o.lhs
              break
            case 'N':
              delete n[o.path[a]]
          }
        } else
          switch (o.kind) {
            case 'A':
              h(e[t], o.index, o.item)
              break
            case 'D':
              e[t] = o.lhs
              break
            case 'E':
              e[t] = o.lhs
              break
            case 'N':
              e = i(e, t)
          }
        return e
      }
      var m = [],
        f,
        y
      ;(f =
        'object' == typeof t && t
          ? t
          : 'undefined' == typeof window
            ? {}
            : window),
        (y = f.DeepDiff),
        y &&
          m.push(function() {
            'undefined' != typeof y &&
              f.DeepDiff === u &&
              ((f.DeepDiff = y), (y = void 0))
          }),
        o(r, n),
        o(a, n),
        o(s, n),
        o(l, n),
        Object.defineProperties(u, {
          diff: { value: u, enumerable: !0 },
          observableDiff: { value: c, enumerable: !0 },
          applyDiff: {
            value: function(e, t, o) {
              if (e && t) {
                var n = function(n) {
                  ;(!o || o(e, t, n)) && g(e, t, n)
                }
                c(e, t, n)
              }
            },
            enumerable: !0
          },
          applyChange: { value: g, enumerable: !0 },
          revertChange: {
            value: function(e, t, o) {
              if (e && t && o && o.kind) {
                var n = e,
                  r,
                  a
                for (a = o.path.length - 1, r = 0; r < a; r++)
                  'undefined' == typeof n[o.path[r]] && (n[o.path[r]] = {}),
                    (n = n[o.path[r]])
                switch (o.kind) {
                  case 'A':
                    h(n[o.path[r]], o.index, o.item)
                    break
                  case 'D':
                    n[o.path[r]] = o.lhs
                    break
                  case 'E':
                    n[o.path[r]] = o.lhs
                    break
                  case 'N':
                    delete n[o.path[r]]
                }
              }
            },
            enumerable: !0
          },
          isConflict: {
            value: function() {
              return 'undefined' != typeof y
            },
            enumerable: !0
          },
          noConflict: {
            value: function() {
              return (
                m &&
                  (m.forEach(function(e) {
                    e()
                  }),
                  (m = null)),
                u
              )
            },
            enumerable: !0
          }
        }),
        (e.exports = u)
    }.call(t, o(4)))
  },
  function(e, t, o) {
    var n = o(2)
    const r = window.navigator.userAgent.toLowerCase(),
      a = -1 !== r.indexOf('remotedebugdevtools'),
      i = o(232)
    var s
    window.addEventListener('load', () => {
      let e = a ? 'REMOTE_DEVTOOLS_APPDATA' : 'DEVTOOLS_APPDATA'
      n.connect(e)
    }),
      n.registerCallback(e => {
        let { command: t, data: o } = e
        'SEND_APP_DATA' == t &&
          i(o, {
            onChange: e => {
              clearTimeout(s),
                (s = setTimeout(() => {
                  n.send({ command: 'WRITE_APP_DATA', data: e })
                }, 1e3 / 60))
            }
          })
      }),
      (window.onShown = function() {
        n.send({ command: 'GET_APP_DATA', data: {} })
      }),
      (window.onHidden = function() {
        console.log('onHidden'), n.send({ command: 'ON_PANEL_HIDE' })
      }),
      (window.onSearch = function() {})
  },
  function(e, t, o) {
    const n = o(97)
    let r = document.createElement('div'),
      a = new n(r, {}, {})
    const i = a.node.constructor
    a.destroy(), (e.exports = i)
  },
  function(e) {
    e.exports = {
      findNodeFromPath: function(e, t) {
        let o = e.node
        return (
          t.forEach(e => {
            let t = o.childs
            if ('number' == typeof e) return void (o = t[e])
            for (let n = 0, r = t.length, a; n < r; n++)
              if (((a = t[n]), a.field === e)) return void (o = a)
          }),
          o
        )
      }
    }
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function() {
    ace.define(
      'ace/ext/searchbox',
      [
        'require',
        'exports',
        'module',
        'ace/lib/dom',
        'ace/lib/lang',
        'ace/lib/event',
        'ace/keyboard/hash_handler',
        'ace/lib/keys'
      ],
      function(e, t) {
        'use strict'
        var o = e('../lib/dom'),
          n = e('../lib/lang'),
          r = e('../lib/event'),
          a = e('../keyboard/hash_handler').HashHandler,
          i = e('../lib/keys')
        o.importCssString(
          '.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 325px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;color: black;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;float: left;height: 22px;margin: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;float: right;font: 16px/16px Arial;height: 14px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing:    border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}',
          'ace_searchbox'
        )
        var s = '<div class="ace_search right">    <button type="button" action="hide" class="ace_searchbtn_close"></button>    <div class="ace_search_form">        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>        <button type="button" action="findNext" class="ace_searchbtn next"></button>        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>        <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>    </div>    <div class="ace_replace_form">        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>    </div>    <div class="ace_search_options">        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>    </div></div>'.replace(
            />\s+/g,
            '>'
          ),
          l = function(e) {
            var t = o.createElement('div')
            ;(t.innerHTML = s),
              (this.element = t.firstChild),
              this.$init(),
              this.setEditor(e)
          }
        ;(function() {
          ;(this.setEditor = function(e) {
            ;(e.searchBox = this),
              e.container.appendChild(this.element),
              (this.editor = e)
          }),
            (this.$initElements = function(e) {
              ;(this.searchBox = e.querySelector('.ace_search_form')),
                (this.replaceBox = e.querySelector('.ace_replace_form')),
                (this.searchOptions = e.querySelector('.ace_search_options')),
                (this.regExpOption = e.querySelector(
                  '[action=toggleRegexpMode]'
                )),
                (this.caseSensitiveOption = e.querySelector(
                  '[action=toggleCaseSensitive]'
                )),
                (this.wholeWordOption = e.querySelector(
                  '[action=toggleWholeWords]'
                )),
                (this.searchInput = this.searchBox.querySelector(
                  '.ace_search_field'
                )),
                (this.replaceInput = this.replaceBox.querySelector(
                  '.ace_search_field'
                ))
            }),
            (this.$init = function() {
              var e = this.element
              this.$initElements(e)
              var o = this
              r.addListener(e, 'mousedown', function(t) {
                setTimeout(function() {
                  o.activeInput.focus()
                }, 0),
                  r.stopPropagation(t)
              }),
                r.addListener(e, 'click', function(n) {
                  var e = n.target || n.srcElement,
                    t = e.getAttribute('action')
                  t && o[t]
                    ? o[t]()
                    : o.$searchBarKb.commands[t] &&
                      o.$searchBarKb.commands[t].exec(o),
                    r.stopPropagation(n)
                }),
                r.addCommandKeyListener(e, function(t, e, n) {
                  var a = i.keyCodeToString(n),
                    s = o.$searchBarKb.findKeyCommand(e, a)
                  s && s.exec && (s.exec(o), r.stopEvent(t))
                }),
                (this.$onChange = n.delayedCall(function() {
                  o.find(!1, !1)
                })),
                r.addListener(this.searchInput, 'input', function() {
                  o.$onChange.schedule(20)
                }),
                r.addListener(this.searchInput, 'focus', function() {
                  ;(o.activeInput = o.searchInput),
                    o.searchInput.value && o.highlight()
                }),
                r.addListener(this.replaceInput, 'focus', function() {
                  ;(o.activeInput = o.replaceInput),
                    o.searchInput.value && o.highlight()
                })
            }),
            (this.$closeSearchBarKb = new a([
              {
                bindKey: 'Esc',
                name: 'closeSearchBar',
                exec: function(e) {
                  e.searchBox.hide()
                }
              }
            ])),
            (this.$searchBarKb = new a()),
            this.$searchBarKb.bindKeys({
              'Ctrl-f|Command-f': function(e) {
                var t = (e.isReplace = !e.isReplace)
                ;(e.replaceBox.style.display = t ? '' : 'none'),
                  e.searchInput.focus()
              },
              'Ctrl-H|Command-Option-F': function(e) {
                ;(e.replaceBox.style.display = ''), e.replaceInput.focus()
              },
              'Ctrl-G|Command-G': function(e) {
                e.findNext()
              },
              'Ctrl-Shift-G|Command-Shift-G': function(e) {
                e.findPrev()
              },
              esc: function(e) {
                setTimeout(function() {
                  e.hide()
                })
              },
              Return: function(e) {
                e.activeInput == e.replaceInput && e.replace(), e.findNext()
              },
              'Shift-Return': function(e) {
                e.activeInput == e.replaceInput && e.replace(), e.findPrev()
              },
              'Alt-Return': function(e) {
                e.activeInput == e.replaceInput && e.replaceAll(), e.findAll()
              },
              Tab: function(e) {
                ;(e.activeInput == e.replaceInput
                  ? e.searchInput
                  : e.replaceInput
                ).focus()
              }
            }),
            this.$searchBarKb.addCommands([
              {
                name: 'toggleRegexpMode',
                bindKey: { win: 'Alt-R|Alt-/', mac: 'Ctrl-Alt-R|Ctrl-Alt-/' },
                exec: function(e) {
                  ;(e.regExpOption.checked = !e.regExpOption.checked),
                    e.$syncOptions()
                }
              },
              {
                name: 'toggleCaseSensitive',
                bindKey: { win: 'Alt-C|Alt-I', mac: 'Ctrl-Alt-R|Ctrl-Alt-I' },
                exec: function(e) {
                  ;(e.caseSensitiveOption.checked = !e.caseSensitiveOption
                    .checked),
                    e.$syncOptions()
                }
              },
              {
                name: 'toggleWholeWords',
                bindKey: { win: 'Alt-B|Alt-W', mac: 'Ctrl-Alt-B|Ctrl-Alt-W' },
                exec: function(e) {
                  ;(e.wholeWordOption.checked = !e.wholeWordOption.checked),
                    e.$syncOptions()
                }
              }
            ]),
            (this.$syncOptions = function() {
              o.setCssClass(
                this.regExpOption,
                'checked',
                this.regExpOption.checked
              ),
                o.setCssClass(
                  this.wholeWordOption,
                  'checked',
                  this.wholeWordOption.checked
                ),
                o.setCssClass(
                  this.caseSensitiveOption,
                  'checked',
                  this.caseSensitiveOption.checked
                ),
                this.find(!1, !1)
            }),
            (this.highlight = function(e) {
              this.editor.session.highlight(
                e || this.editor.$search.$options.re
              ),
                this.editor.renderer.updateBackMarkers()
            }),
            (this.find = function(e, t, n) {
              var r = this.editor.find(this.searchInput.value, {
                  skipCurrent: e,
                  backwards: t,
                  wrap: !0,
                  regExp: this.regExpOption.checked,
                  caseSensitive: this.caseSensitiveOption.checked,
                  wholeWord: this.wholeWordOption.checked,
                  preventScroll: n
                }),
                a = !r && this.searchInput.value
              o.setCssClass(this.searchBox, 'ace_nomatch', a),
                this.editor._emit('findSearchBox', { match: !a }),
                this.highlight()
            }),
            (this.findNext = function() {
              this.find(!0, !1)
            }),
            (this.findPrev = function() {
              this.find(!0, !0)
            }),
            (this.findAll = function() {
              var e = this.editor.findAll(this.searchInput.value, {
                  regExp: this.regExpOption.checked,
                  caseSensitive: this.caseSensitiveOption.checked,
                  wholeWord: this.wholeWordOption.checked
                }),
                t = !e && this.searchInput.value
              o.setCssClass(this.searchBox, 'ace_nomatch', t),
                this.editor._emit('findSearchBox', { match: !t }),
                this.highlight(),
                this.hide()
            }),
            (this.replace = function() {
              this.editor.getReadOnly() ||
                this.editor.replace(this.replaceInput.value)
            }),
            (this.replaceAndFindNext = function() {
              this.editor.getReadOnly() ||
                (this.editor.replace(this.replaceInput.value), this.findNext())
            }),
            (this.replaceAll = function() {
              this.editor.getReadOnly() ||
                this.editor.replaceAll(this.replaceInput.value)
            }),
            (this.hide = function() {
              ;(this.element.style.display = 'none'),
                this.editor.keyBinding.removeKeyboardHandler(
                  this.$closeSearchBarKb
                ),
                this.editor.focus()
            }),
            (this.show = function(e, t) {
              ;(this.element.style.display = ''),
                (this.replaceBox.style.display = t ? '' : 'none'),
                (this.isReplace = t),
                e && (this.searchInput.value = e),
                this.find(!1, !1, !0),
                this.searchInput.focus(),
                this.searchInput.select(),
                this.editor.keyBinding.addKeyboardHandler(
                  this.$closeSearchBarKb
                )
            }),
            (this.isFocused = function() {
              var e = document.activeElement
              return e == this.searchInput || e == this.replaceInput
            })
        }.call(l.prototype),
          (t.SearchBox = l),
          (t.Search = function(e, t) {
            var o = e.searchBox || new l(e)
            o.show(e.session.getTextRange(), t)
          }))
      }
    ),
      (function() {
        ace.acequire(['ace/ext/searchbox'], function() {})
      })()
  },
  function(e, t, o) {
    var n = Math.round,
      r = Math.ceil,
      a = Number.MAX_VALUE,
      i = Math.sqrt,
      s = Math.pow,
      l = Math.floor,
      d = Math.abs,
      u = Math.min,
      c = String.prototype,
      p = Math.max
    ;(function() {
      var e = (function() {
        return this
      })()
      e || 'undefined' == typeof window || (e = window)
      var t = function(e, o, n) {
        return 'string' == typeof e
          ? void (2 == arguments.length && (n = o),
            !t.modules[e] && ((t.payloads[e] = n), (t.modules[e] = null)))
          : void (t.original
              ? t.original.apply(this, arguments)
              : (console.error(
                  "dropping module because define wasn't a string."
                ),
                console.trace()))
      }
      ;(t.modules = {}), (t.payloads = {})
      var o = function(e, t, o) {
          if ('string' == typeof t) {
            var r = a(e, t)
            if (void 0 != r) return o && o(), r
          } else if ('[object Array]' === Object.prototype.toString.call(t)) {
            for (var s = [], d = 0, i = t.length, l; d < i; ++d) {
              if (((l = a(e, t[d])), void 0 == l && n.original)) return
              s.push(l)
            }
            return (o && o.apply(null, s)) || !0
          }
        },
        n = function(e, t) {
          var r = o('', e, t)
          return void 0 == r && n.original
            ? n.original.apply(this, arguments)
            : r
        },
        r = function(e, t) {
          if (-1 !== t.indexOf('!')) {
            var o = t.split('!')
            return r(e, o[0]) + '!' + r(e, o[1])
          }
          if ('.' == t.charAt(0)) {
            var n = e
              .split('/')
              .slice(0, -1)
              .join('/')
            for (t = n + '/' + t; -1 !== t.indexOf('.') && a != t; ) {
              var a = t
              t = t.replace(/\/\.\//, '/').replace(/[^\/]+\/\.\.\//, '')
            }
          }
          return t
        },
        a = function(e, n) {
          n = r(e, n)
          var a = t.modules[n]
          if (!a) {
            if (((a = t.payloads[n]), 'function' == typeof a)) {
              var i = {},
                s = { id: n, uri: '', exports: i, packaged: !0 },
                l = function(e, t) {
                  return o(n, e, t)
                },
                d = a(l, i, s)
              ;(i = d || s.exports), (t.modules[n] = i), delete t.payloads[n]
            }
            a = t.modules[n] = i || a
          }
          return a
        }
      ;(function(o) {
        var r = e
        o && (!e[o] && (e[o] = {}), (r = e[o])),
          (r.define && r.define.packaged) ||
            ((t.original = r.define), (r.define = t), (r.define.packaged = !0)),
          (r.acequire && r.acequire.packaged) ||
            ((n.original = r.acequire),
            (r.acequire = n),
            (r.acequire.packaged = !0))
      })('ace')
    })(),
      ace.define(
        'ace/lib/regexp',
        ['require', 'exports', 'module'],
        function() {
          'use strict'
          function e(e) {
            return (
              (e.global ? 'g' : '') +
              (e.ignoreCase ? 'i' : '') +
              (e.multiline ? 'm' : '') +
              (e.extended ? 'x' : '') +
              (e.sticky ? 'y' : '')
            )
          }
          function t(e, t, o) {
            if (Array.prototype.indexOf) return e.indexOf(t, o)
            for (var n = o || 0; n < e.length; n++) if (e[n] === t) return n
            return -1
          }
          var o = {
              exec: RegExp.prototype.exec,
              test: RegExp.prototype.test,
              match: c.match,
              replace: c.replace,
              split: c.split
            },
            n = o.exec.call(/()??/, '')[1] === void 0,
            r = (function() {
              var e = /^/g
              return o.test.call(e, ''), !e.lastIndex
            })()
          ;(r && n) ||
            ((RegExp.prototype.exec = function(a) {
              var s = o.exec.apply(this, arguments),
                l,
                d
              if ('string' == typeof a && s) {
                if (
                  (!n &&
                    1 < s.length &&
                    -1 < t(s, '') &&
                    ((d = RegExp(
                      this.source,
                      o.replace.call(e(this), 'g', '')
                    )),
                    o.replace.call(a.slice(s.index), d, function() {
                      for (var e = 1; e < arguments.length - 2; e++)
                        void 0 === arguments[e] && (s[e] = void 0)
                    })),
                  this._xregexp && this._xregexp.captureNames)
                )
                  for (var c = 1; c < s.length; c++)
                    (l = this._xregexp.captureNames[c - 1]), l && (s[l] = s[c])
                !r &&
                  this.global &&
                  !s[0].length &&
                  this.lastIndex > s.index &&
                  this.lastIndex--
              }
              return s
            }),
            !r &&
              (RegExp.prototype.test = function(e) {
                var t = o.exec.call(this, e)
                return (
                  t &&
                    this.global &&
                    !t[0].length &&
                    this.lastIndex > t.index &&
                    this.lastIndex--,
                  !!t
                )
              }))
        }
      ),
      ace.define(
        'ace/lib/es5-shim',
        ['require', 'exports', 'module'],
        function() {
          function e() {}
          function t(e) {
            try {
              return Object.defineProperty(e, 'sentinel', {}), 'sentinel' in e
            } catch (e) {}
          }
          function o(e) {
            return (
              (e = +e),
              e === e
                ? 0 !== e &&
                  e !== 1 / 0 &&
                  e !== -(1 / 0) &&
                  (e = (0 < e || -1) * l(d(e)))
                : (e = 0),
              e
            )
          }
          Function.prototype.bind ||
            (Function.prototype.bind = function(t) {
              var o = this
              if ('function' != typeof o)
                throw new TypeError(
                  'Function.prototype.bind called on incompatible ' + o
                )
              var n = i.call(arguments, 1),
                r = function() {
                  if (this instanceof r) {
                    var e = o.apply(this, n.concat(i.call(arguments)))
                    return Object(e) === e ? e : this
                  }
                  return o.apply(t, n.concat(i.call(arguments)))
                }
              return (
                o.prototype &&
                  ((e.prototype = o.prototype),
                  (r.prototype = new e()),
                  (e.prototype = null)),
                r
              )
            })
          var n = Function.prototype.call,
            r = Array.prototype,
            a = Object.prototype,
            i = r.slice,
            s = n.bind(a.toString),
            g = n.bind(a.hasOwnProperty),
            h,
            m,
            f,
            y,
            A
          ;(A = g(a, '__defineGetter__')) &&
            ((h = n.bind(a.__defineGetter__)),
            (m = n.bind(a.__defineSetter__)),
            (f = n.bind(a.__lookupGetter__)),
            (y = n.bind(a.__lookupSetter__)))
          Array.isArray ||
            (Array.isArray = function(e) {
              return '[object Array]' == s(e)
            })
          var C = Object('a'),
            w = 'a' != C[0] || !(0 in C)
          if (
            (Array.prototype.forEach ||
              (Array.prototype.forEach = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = arguments[1],
                  r = -1,
                  a = o.length >>> 0
                if ('[object Function]' != s(e)) throw new TypeError()
                for (; ++r < a; ) r in o && e.call(n, o[r], r, t)
              }),
            Array.prototype.map ||
              (Array.prototype.map = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = o.length >>> 0,
                  r = Array(n),
                  a = arguments[1]
                if ('[object Function]' != s(e))
                  throw new TypeError(e + ' is not a function')
                for (var l = 0; l < n; l++)
                  l in o && (r[l] = e.call(a, o[l], l, t))
                return r
              }),
            Array.prototype.filter ||
              (Array.prototype.filter = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = o.length >>> 0,
                  r = [],
                  a = arguments[1],
                  l
                if ('[object Function]' != s(e))
                  throw new TypeError(e + ' is not a function')
                for (var d = 0; d < n; d++)
                  d in o && ((l = o[d]), e.call(a, l, d, t) && r.push(l))
                return r
              }),
            Array.prototype.every ||
              (Array.prototype.every = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = o.length >>> 0,
                  r = arguments[1]
                if ('[object Function]' != s(e))
                  throw new TypeError(e + ' is not a function')
                for (var a = 0; a < n; a++)
                  if (a in o && !e.call(r, o[a], a, t)) return !1
                return !0
              }),
            Array.prototype.some ||
              (Array.prototype.some = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = o.length >>> 0,
                  r = arguments[1]
                if ('[object Function]' != s(e))
                  throw new TypeError(e + ' is not a function')
                for (var a = 0; a < n; a++)
                  if (a in o && e.call(r, o[a], a, t)) return !0
                return !1
              }),
            Array.prototype.reduce ||
              (Array.prototype.reduce = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = o.length >>> 0
                if ('[object Function]' != s(e))
                  throw new TypeError(e + ' is not a function')
                if (!n && 1 == arguments.length)
                  throw new TypeError(
                    'reduce of empty array with no initial value'
                  )
                var r = 0,
                  a
                if (2 <= arguments.length) a = arguments[1]
                else
                  do {
                    if (r in o) {
                      a = o[r++]
                      break
                    }
                    if (++r >= n)
                      throw new TypeError(
                        'reduce of empty array with no initial value'
                      )
                  } while (!0)
                for (; r < n; r++) r in o && (a = e.call(void 0, a, o[r], r, t))
                return a
              }),
            Array.prototype.reduceRight ||
              (Array.prototype.reduceRight = function(e) {
                var t = L(this),
                  o = w && '[object String]' == s(this) ? this.split('') : t,
                  n = o.length >>> 0
                if ('[object Function]' != s(e))
                  throw new TypeError(e + ' is not a function')
                if (!n && 1 == arguments.length)
                  throw new TypeError(
                    'reduceRight of empty array with no initial value'
                  )
                var r = n - 1,
                  a
                if (2 <= arguments.length) a = arguments[1]
                else
                  do {
                    if (r in o) {
                      a = o[r--]
                      break
                    }
                    if (0 > --r)
                      throw new TypeError(
                        'reduceRight of empty array with no initial value'
                      )
                  } while (!0)
                do r in this && (a = e.call(void 0, a, o[r], r, t))
                while (r--)
                return a
              }),
            (Array.prototype.indexOf && -1 == [0, 1].indexOf(1, 2)) ||
              (Array.prototype.indexOf = function(e) {
                var t =
                    w && '[object String]' == s(this)
                      ? this.split('')
                      : L(this),
                  n = t.length >>> 0
                if (!n) return -1
                var r = 0
                for (
                  1 < arguments.length && (r = o(arguments[1])),
                    r = 0 <= r ? r : p(0, n + r);
                  r < n;
                  r++
                )
                  if (r in t && t[r] === e) return r
                return -1
              }),
            (Array.prototype.lastIndexOf && -1 == [0, 1].lastIndexOf(0, -3)) ||
              (Array.prototype.lastIndexOf = function(e) {
                var t =
                    w && '[object String]' == s(this)
                      ? this.split('')
                      : L(this),
                  n = t.length >>> 0
                if (!n) return -1
                var r = n - 1
                for (
                  1 < arguments.length && (r = u(r, o(arguments[1]))),
                    r = 0 <= r ? r : n - d(r);
                  0 <= r;
                  r--
                )
                  if (r in t && e === t[r]) return r
                return -1
              }),
            Object.getPrototypeOf ||
              (Object.getPrototypeOf = function(e) {
                return (
                  e.__proto__ || (e.constructor ? e.constructor.prototype : a)
                )
              }),
            !Object.getOwnPropertyDescriptor)
          ) {
            Object.getOwnPropertyDescriptor = function(e, t) {
              if (
                ('object' != typeof e && 'function' != typeof e) ||
                null === e
              )
                throw new TypeError(
                  'Object.getOwnPropertyDescriptor called on a non-object: ' + e
                )
              if (g(e, t)) {
                var o, n, r
                if (((o = { enumerable: !0, configurable: !0 }), A)) {
                  var i = e.__proto__
                  e.__proto__ = a
                  var n = f(e, t),
                    r = y(e, t)
                  if (((e.__proto__ = i), n || r))
                    return n && (o.get = n), r && (o.set = r), o
                }
                return (o.value = e[t]), o
              }
            }
          }
          if (
            (Object.getOwnPropertyNames ||
              (Object.getOwnPropertyNames = function(e) {
                return Object.keys(e)
              }),
            !Object.create)
          ) {
            var E
            ;(E =
              null === Object.prototype.__proto__
                ? function() {
                    return {}
                  }
                : function() {
                    var e = {}
                    for (var t in e) e[t] = null
                    return (
                      (e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null),
                      e
                    )
                  }),
              (Object.create = function(e, t) {
                var o
                if (null === e) o = E()
                else {
                  if ('object' != typeof e)
                    throw new TypeError(
                      'typeof prototype[' + typeof e + "] != 'object'"
                    )
                  var n = function() {}
                  ;(n.prototype = e), (o = new n()), (o.__proto__ = e)
                }
                return void 0 !== t && Object.defineProperties(o, t), o
              })
          }
          if (Object.defineProperty) {
            var b = t({}),
              v =
                'undefined' == typeof document ||
                t(document.createElement('div'))
            if (!b || !v) var F = Object.defineProperty
          }
          if (!Object.defineProperty || F) {
            Object.defineProperty = function(e, t, o) {
              if (
                ('object' != typeof e && 'function' != typeof e) ||
                null === e
              )
                throw new TypeError(
                  'Object.defineProperty called on non-object: ' + e
                )
              if (
                ('object' != typeof o && 'function' != typeof o) ||
                null === o
              )
                throw new TypeError(
                  'Property description must be an object: ' + o
                )
              if (F)
                try {
                  return F.call(Object, e, t, o)
                } catch (e) {}
              if (!g(o, 'value')) {
                if (!A)
                  throw new TypeError(
                    'getters & setters can not be defined on this javascript engine'
                  )
                g(o, 'get') && h(e, t, o.get), g(o, 'set') && m(e, t, o.set)
              } else if (A && (f(e, t) || y(e, t))) {
                var n = e.__proto__
                ;(e.__proto__ = a),
                  delete e[t],
                  (e[t] = o.value),
                  (e.__proto__ = n)
              } else e[t] = o.value
              return e
            }
          }
          Object.defineProperties ||
            (Object.defineProperties = function(e, t) {
              for (var o in t) g(t, o) && Object.defineProperty(e, o, t[o])
              return e
            }),
            Object.seal ||
              (Object.seal = function(e) {
                return e
              }),
            Object.freeze ||
              (Object.freeze = function(e) {
                return e
              })
          try {
            Object.freeze(function() {})
          } catch (e) {
            Object.freeze = (function(e) {
              return function(t) {
                return 'function' == typeof t ? t : e(t)
              }
            })(Object.freeze)
          }
          if (
            (Object.preventExtensions ||
              (Object.preventExtensions = function(e) {
                return e
              }),
            Object.isSealed ||
              (Object.isSealed = function() {
                return !1
              }),
            Object.isFrozen ||
              (Object.isFrozen = function() {
                return !1
              }),
            Object.isExtensible ||
              (Object.isExtensible = function(e) {
                if (Object(e) === e) throw new TypeError()
                for (var t = ''; g(e, t); ) t += '?'
                e[t] = !0
                var o = g(e, t)
                return delete e[t], o
              }),
            !Object.keys)
          ) {
            var x = !0,
              S = [
                'toString',
                'toLocaleString',
                'valueOf',
                'hasOwnProperty',
                'isPrototypeOf',
                'propertyIsEnumerable',
                'constructor'
              ],
              $ = S.length
            for (var k in { toString: null }) x = !1
            Object.keys = function(e) {
              if (
                ('object' != typeof e && 'function' != typeof e) ||
                null === e
              )
                throw new TypeError('Object.keys called on a non-object')
              var t = []
              for (var o in e) g(e, o) && t.push(o)
              if (x)
                for (var n = 0, r; n < $; n++) (r = S[n]), g(e, r) && t.push(r)
              return t
            }
          }
          Date.now ||
            (Date.now = function() {
              return new Date().getTime()
            })
          var D =
            '\t\n\x0B\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'
          if (!c.trim || D.trim()) {
            D = '[' + D + ']'
            var B = new RegExp('^' + D + D + '*'),
              _ = new RegExp(D + D + '*$')
            c.trim = function() {
              return (this + '').replace(B, '').replace(_, '')
            }
          }
          var L = function(e) {
            if (null == e)
              throw new TypeError("can't convert " + e + ' to object')
            return Object(e)
          }
        }
      ),
      ace.define(
        'ace/lib/fixoldbrowsers',
        ['require', 'exports', 'module', 'ace/lib/regexp', 'ace/lib/es5-shim'],
        function(e) {
          'use strict'
          e('./regexp'), e('./es5-shim')
        }
      ),
      ace.define('ace/lib/dom', ['require', 'exports', 'module'], function(
        e,
        t
      ) {
        'use strict'
        return (
          (t.getDocumentHead = function(e) {
            return (
              e || (e = document),
              e.head || e.getElementsByTagName('head')[0] || e.documentElement
            )
          }),
          (t.createElement = function(e, t) {
            return document.createElementNS
              ? document.createElementNS(t || 'http://www.w3.org/1999/xhtml', e)
              : document.createElement(e)
          }),
          (t.hasCssClass = function(e, t) {
            var o = (e.className + '').split(/\s+/g)
            return -1 !== o.indexOf(t)
          }),
          (t.addCssClass = function(e, o) {
            t.hasCssClass(e, o) || (e.className += ' ' + o)
          }),
          (t.removeCssClass = function(e, t) {
            for (
              var o = e.className.split(/\s+/g), n;
              (n = o.indexOf(t)), -1 != n;

            )
              o.splice(n, 1)
            e.className = o.join(' ')
          }),
          (t.toggleCssClass = function(e, t) {
            for (
              var o = e.className.split(/\s+/g), n = !0, r;
              (r = o.indexOf(t)), -1 != r;

            )
              (n = !1), o.splice(r, 1)
            return n && o.push(t), (e.className = o.join(' ')), n
          }),
          (t.setCssClass = function(e, o, n) {
            n ? t.addCssClass(e, o) : t.removeCssClass(e, o)
          }),
          (t.hasCssString = function(e, t) {
            var o = 0,
              n
            if (
              ((t = t || document), t.createStyleSheet && (n = t.styleSheets))
            ) {
              for (; o < n.length; )
                if (n[o++].owningElement.id === e) return !0
            } else if ((n = t.getElementsByTagName('style')))
              for (; o < n.length; ) if (n[o++].id === e) return !0
            return !1
          }),
          (t.importCssString = function(e, o, n) {
            if (((n = n || document), o && t.hasCssString(o, n))) return null
            var r
            o && (e += '\n/*# sourceURL=ace/css/' + o + ' */'),
              n.createStyleSheet
                ? ((r = n.createStyleSheet()),
                  (r.cssText = e),
                  o && (r.owningElement.id = o))
                : ((r = t.createElement('style')),
                  r.appendChild(n.createTextNode(e)),
                  o && (r.id = o),
                  t.getDocumentHead(n).appendChild(r))
          }),
          (t.importCssStylsheet = function(e, o) {
            if (o.createStyleSheet) o.createStyleSheet(e)
            else {
              var n = t.createElement('link')
              ;(n.rel = 'stylesheet'),
                (n.href = e),
                t.getDocumentHead(o).appendChild(n)
            }
          }),
          (t.getInnerWidth = function(e) {
            return (
              parseInt(t.computedStyle(e, 'paddingLeft'), 10) +
              parseInt(t.computedStyle(e, 'paddingRight'), 10) +
              e.clientWidth
            )
          }),
          (t.getInnerHeight = function(e) {
            return (
              parseInt(t.computedStyle(e, 'paddingTop'), 10) +
              parseInt(t.computedStyle(e, 'paddingBottom'), 10) +
              e.clientHeight
            )
          }),
          (t.scrollbarWidth = function(e) {
            var o = t.createElement('ace_inner')
            ;(o.style.width = '100%'),
              (o.style.minWidth = '0px'),
              (o.style.height = '200px'),
              (o.style.display = 'block')
            var n = t.createElement('ace_outer'),
              r = n.style
            ;(r.position = 'absolute'),
              (r.left = '-10000px'),
              (r.overflow = 'hidden'),
              (r.width = '200px'),
              (r.minWidth = '0px'),
              (r.height = '150px'),
              (r.display = 'block'),
              n.appendChild(o)
            var a = e.documentElement
            a.appendChild(n)
            var i = o.offsetWidth
            r.overflow = 'scroll'
            var s = o.offsetWidth
            return i == s && (s = n.clientWidth), a.removeChild(n), i - s
          }),
          'undefined' == typeof document
            ? void (t.importCssString = function() {})
            : void (void 0 === window.pageYOffset
                ? ((t.getPageScrollTop = function() {
                    return document.body.scrollTop
                  }),
                  (t.getPageScrollLeft = function() {
                    return document.body.scrollLeft
                  }))
                : ((t.getPageScrollTop = function() {
                    return window.pageYOffset
                  }),
                  (t.getPageScrollLeft = function() {
                    return window.pageXOffset
                  })),
              (t.computedStyle = window.getComputedStyle
                ? function(e, t) {
                    return t
                      ? (window.getComputedStyle(e, '') || {})[t] || ''
                      : window.getComputedStyle(e, '') || {}
                  }
                : function(e, t) {
                    return t ? e.currentStyle[t] : e.currentStyle
                  }),
              (t.setInnerHtml = function(e, t) {
                var o = e.cloneNode(!1)
                return (o.innerHTML = t), e.parentNode.replaceChild(o, e), o
              }),
              'textContent' in document.documentElement
                ? ((t.setInnerText = function(e, t) {
                    e.textContent = t
                  }),
                  (t.getInnerText = function(e) {
                    return e.textContent
                  }))
                : ((t.setInnerText = function(e, t) {
                    e.innerText = t
                  }),
                  (t.getInnerText = function(e) {
                    return e.innerText
                  })),
              (t.getParentWindow = function(e) {
                return e.defaultView || e.parentWindow
              }))
        )
      }),
      ace.define('ace/lib/oop', ['require', 'exports', 'module'], function(
        e,
        t
      ) {
        'use strict'
        ;(t.inherits = function(e, t) {
          ;(e.super_ = t),
            (e.prototype = Object.create(t.prototype, {
              constructor: {
                value: e,
                enumerable: !1,
                writable: !0,
                configurable: !0
              }
            }))
        }),
          (t.mixin = function(e, t) {
            for (var o in t) e[o] = t[o]
            return e
          }),
          (t.implement = function(e, o) {
            t.mixin(e, o)
          })
      }),
      ace.define(
        'ace/lib/keys',
        [
          'require',
          'exports',
          'module',
          'ace/lib/fixoldbrowsers',
          'ace/lib/oop'
        ],
        function(e, t) {
          'use strict'
          e('./fixoldbrowsers')
          var o = e('./oop'),
            n = (function() {
              var e = {
                  MODIFIER_KEYS: {
                    16: 'Shift',
                    17: 'Ctrl',
                    18: 'Alt',
                    224: 'Meta'
                  },
                  KEY_MODS: {
                    ctrl: 1,
                    alt: 2,
                    option: 2,
                    shift: 4,
                    super: 8,
                    meta: 8,
                    command: 8,
                    cmd: 8
                  },
                  FUNCTION_KEYS: {
                    8: 'Backspace',
                    9: 'Tab',
                    13: 'Return',
                    19: 'Pause',
                    27: 'Esc',
                    32: 'Space',
                    33: 'PageUp',
                    34: 'PageDown',
                    35: 'End',
                    36: 'Home',
                    37: 'Left',
                    38: 'Up',
                    39: 'Right',
                    40: 'Down',
                    44: 'Print',
                    45: 'Insert',
                    46: 'Delete',
                    96: 'Numpad0',
                    97: 'Numpad1',
                    98: 'Numpad2',
                    99: 'Numpad3',
                    100: 'Numpad4',
                    101: 'Numpad5',
                    102: 'Numpad6',
                    103: 'Numpad7',
                    104: 'Numpad8',
                    105: 'Numpad9',
                    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',
                    '-13': 'NumpadEnter'
                  },
                  PRINTABLE_KEYS: {
                    32: ' ',
                    48: '0',
                    49: '1',
                    50: '2',
                    51: '3',
                    52: '4',
                    53: '5',
                    54: '6',
                    55: '7',
                    56: '8',
                    57: '9',
                    59: ';',
                    61: '=',
                    65: 'a',
                    66: 'b',
                    67: 'c',
                    68: 'd',
                    69: 'e',
                    70: 'f',
                    71: 'g',
                    72: 'h',
                    73: 'i',
                    74: 'j',
                    75: 'k',
                    76: 'l',
                    77: 'm',
                    78: 'n',
                    79: 'o',
                    80: 'p',
                    81: 'q',
                    82: 'r',
                    83: 's',
                    84: 't',
                    85: 'u',
                    86: 'v',
                    87: 'w',
                    88: 'x',
                    89: 'y',
                    90: 'z',
                    106: '*',
                    107: '+',
                    109: '-',
                    110: '.',
                    111: '/',
                    186: ';',
                    187: '=',
                    188: ',',
                    189: '-',
                    190: '.',
                    191: '/',
                    192: '`',
                    219: '[',
                    220: '\\',
                    221: ']',
                    222: "'"
                  }
                },
                t,
                n
              for (n in e.FUNCTION_KEYS)
                (t = e.FUNCTION_KEYS[n].toLowerCase()), (e[t] = parseInt(n, 10))
              for (n in e.PRINTABLE_KEYS)
                (t = e.PRINTABLE_KEYS[n].toLowerCase()),
                  (e[t] = parseInt(n, 10))
              return (
                o.mixin(e, e.MODIFIER_KEYS),
                o.mixin(e, e.PRINTABLE_KEYS),
                o.mixin(e, e.FUNCTION_KEYS),
                (e.enter = e['return']),
                (e.escape = e.esc),
                (e.del = e['delete']),
                (e[173] = '-'),
                (function() {
                  for (
                    var t = ['cmd', 'ctrl', 'alt', 'shift'], o = s(2, t.length);
                    o--;

                  )
                    e.KEY_MODS[o] =
                      t
                        .filter(function(t) {
                          return o & e.KEY_MODS[t]
                        })
                        .join('-') + '-'
                })(),
                (e.KEY_MODS[0] = ''),
                (e.KEY_MODS[-1] = 'input-'),
                e
              )
            })()
          o.mixin(t, n),
            (t.keyCodeToString = function(e) {
              var t = n[e]
              return (
                'string' != typeof t && (t = String.fromCharCode(e)),
                t.toLowerCase()
              )
            })
        }
      ),
      ace.define(
        'ace/lib/useragent',
        ['require', 'exports', 'module'],
        function(e, t) {
          'use strict'
          if (
            ((t.OS = { LINUX: 'LINUX', MAC: 'MAC', WINDOWS: 'WINDOWS' }),
            (t.getOS = function() {
              return t.isMac ? t.OS.MAC : t.isLinux ? t.OS.LINUX : t.OS.WINDOWS
            }),
            'object' == typeof navigator)
          ) {
            var o = (navigator.platform.match(/mac|win|linux/i) || [
                'other'
              ])[0].toLowerCase(),
              n = navigator.userAgent
            ;(t.isWin = 'win' == o),
              (t.isMac = 'mac' == o),
              (t.isLinux = 'linux' == o),
              (t.isIE =
                'Microsoft Internet Explorer' == navigator.appName ||
                0 <= navigator.appName.indexOf('MSAppHost')
                  ? parseFloat(
                      (n.match(
                        /(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/
                      ) || [])[1]
                    )
                  : parseFloat(
                      (n.match(
                        /(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/
                      ) || [])[1]
                    )),
              (t.isOldIE = t.isIE && 9 > t.isIE),
              (t.isGecko = t.isMozilla =
                (window.Controllers || window.controllers) &&
                'Gecko' === window.navigator.product),
              (t.isOldGecko =
                t.isGecko && 4 > parseInt((n.match(/rv:(\d+)/) || [])[1], 10)),
              (t.isOpera =
                window.opera &&
                '[object Opera]' ==
                  Object.prototype.toString.call(window.opera)),
              (t.isWebKit = parseFloat(n.split('WebKit/')[1]) || void 0),
              (t.isChrome = parseFloat(n.split(' Chrome/')[1]) || void 0),
              (t.isAIR = 0 <= n.indexOf('AdobeAIR')),
              (t.isIPad = 0 <= n.indexOf('iPad')),
              (t.isTouchPad = 0 <= n.indexOf('TouchPad')),
              (t.isChromeOS = 0 <= n.indexOf(' CrOS '))
          }
        }
      ),
      ace.define(
        'ace/lib/event',
        ['require', 'exports', 'module', 'ace/lib/keys', 'ace/lib/useragent'],
        function(e, t) {
          'use strict'
          function o(t, o, e) {
            var n = l(o)
            if (!a.isMac && i) {
              if (
                (o.getModifierState &&
                  (o.getModifierState('OS') || o.getModifierState('Win')) &&
                  (n |= 8),
                i.altGr)
              )
                if (3 != (3 & n)) i.altGr = 0
                else return
              if (18 === e || 17 === e) {
                var d = 'location' in o ? o.location : o.keyLocation
                if (17 === e && 1 === d) 1 == i[e] && (s = o.timeStamp)
                else if (18 === e && 3 === n && 2 === d) {
                  var c = o.timeStamp - s
                  50 > c && (i.altGr = !0)
                }
              }
            }
            if (
              (e in r.MODIFIER_KEYS && (e = -1),
              8 & n && 91 <= e && 93 >= e && (e = -1),
              !n && 13 === e)
            ) {
              var d = 'location' in o ? o.location : o.keyLocation
              if (3 === d && (t(o, n, -e), o.defaultPrevented)) return
            }
            if (a.isChromeOS && 8 & n) {
              if ((t(o, n, e), o.defaultPrevented)) return
              n &= -9
            }
            return (
              (n || e in r.FUNCTION_KEYS || e in r.PRINTABLE_KEYS) && t(o, n, e)
            )
          }
          function n() {
            i = Object.create(null)
          }
          var r = e('./keys'),
            a = e('./useragent'),
            i = null,
            s = 0
          ;(t.addListener = function(e, t, o) {
            if (e.addEventListener) return e.addEventListener(t, o, !1)
            if (e.attachEvent) {
              var n = function() {
                o.call(e, window.event)
              }
              ;(o._wrapper = n), e.attachEvent('on' + t, n)
            }
          }),
            (t.removeListener = function(e, t, o) {
              return e.removeEventListener
                ? e.removeEventListener(t, o, !1)
                : void (
                    e.detachEvent && e.detachEvent('on' + t, o._wrapper || o)
                  )
            }),
            (t.stopEvent = function(o) {
              return t.stopPropagation(o), t.preventDefault(o), !1
            }),
            (t.stopPropagation = function(t) {
              t.stopPropagation ? t.stopPropagation() : (t.cancelBubble = !0)
            }),
            (t.preventDefault = function(t) {
              t.preventDefault ? t.preventDefault() : (t.returnValue = !1)
            }),
            (t.getButton = function(t) {
              return 'dblclick' == t.type
                ? 0
                : 'contextmenu' == t.type ||
                  (a.isMac && t.ctrlKey && !t.altKey && !t.shiftKey)
                  ? 2
                  : t.preventDefault
                    ? t.button
                    : { 1: 0, 2: 2, 4: 1 }[t.button]
            }),
            (t.capture = function(e, o, n) {
              function r(a) {
                o && o(a),
                  n && n(a),
                  t.removeListener(document, 'mousemove', o, !0),
                  t.removeListener(document, 'mouseup', r, !0),
                  t.removeListener(document, 'dragstart', r, !0)
              }
              return (
                t.addListener(document, 'mousemove', o, !0),
                t.addListener(document, 'mouseup', r, !0),
                t.addListener(document, 'dragstart', r, !0),
                r
              )
            }),
            (t.addTouchMoveListener = function(e, o) {
              if ('ontouchmove' in e) {
                var n, r
                t.addListener(e, 'touchstart', function(t) {
                  var e = t.changedTouches[0]
                  ;(n = e.clientX), (r = e.clientY)
                }),
                  t.addListener(e, 'touchmove', function(t) {
                    var e = 1,
                      a = t.changedTouches[0]
                    ;(t.wheelX = -(a.clientX - n) / e),
                      (t.wheelY = -(a.clientY - r) / e),
                      (n = a.clientX),
                      (r = a.clientY),
                      o(t)
                  })
              }
            }),
            (t.addMouseWheelListener = function(e, o) {
              'onmousewheel' in e
                ? t.addListener(e, 'mousewheel', function(t) {
                    var e = 8
                    void 0 === t.wheelDeltaX
                      ? ((t.wheelX = 0), (t.wheelY = -t.wheelDelta / e))
                      : ((t.wheelX = -t.wheelDeltaX / e),
                        (t.wheelY = -t.wheelDeltaY / e)),
                      o(t)
                  })
                : 'onwheel' in e
                  ? t.addListener(e, 'wheel', function(t) {
                      var e = 0.35
                      switch (t.deltaMode) {
                        case t.DOM_DELTA_PIXEL:
                          ;(t.wheelX = t.deltaX * e || 0),
                            (t.wheelY = t.deltaY * e || 0)
                          break
                        case t.DOM_DELTA_LINE:
                        case t.DOM_DELTA_PAGE:
                          ;(t.wheelX = 5 * (t.deltaX || 0)),
                            (t.wheelY = 5 * (t.deltaY || 0))
                      }
                      o(t)
                    })
                  : t.addListener(e, 'DOMMouseScroll', function(t) {
                      t.axis && t.axis == t.HORIZONTAL_AXIS
                        ? ((t.wheelX = 5 * (t.detail || 0)), (t.wheelY = 0))
                        : ((t.wheelX = 0), (t.wheelY = 5 * (t.detail || 0))),
                        o(t)
                    })
            }),
            (t.addMultiMouseDownListener = function(e, o, n, r) {
              function i(i) {
                if (
                  (0 === t.getButton(i)
                    ? 1 < i.detail
                      ? (l++, 4 < l && (l = 1))
                      : (l = 1)
                    : (l = 0),
                  a.isIE)
                ) {
                  var e = 5 < d(i.clientX - u) || 5 < d(i.clientY - p)
                  ;(!g || e) && (l = 1),
                    g && clearTimeout(g),
                    (g = setTimeout(function() {
                      g = null
                    }, o[l - 1] || 600)),
                    1 == l && ((u = i.clientX), (p = i.clientY))
                }
                if (((i._clicks = l), n[r]('mousedown', i), 4 < l)) l = 0
                else if (1 < l) return n[r](c[l], i)
              }
              function s(t) {
                ;(l = 2),
                  g && clearTimeout(g),
                  (g = setTimeout(function() {
                    g = null
                  }, o[l - 1] || 600)),
                  n[r]('mousedown', t),
                  n[r](c[l], t)
              }
              var l = 0,
                c = { 2: 'dblclick', 3: 'tripleclick', 4: 'quadclick' },
                u,
                p,
                g
              Array.isArray(e) || (e = [e]),
                e.forEach(function(e) {
                  t.addListener(e, 'mousedown', i),
                    a.isOldIE && t.addListener(e, 'dblclick', s)
                })
            })
          var l =
            a.isMac && a.isOpera && !('KeyboardEvent' in window)
              ? function(t) {
                  return (
                    0 |
                    (t.metaKey ? 1 : 0) |
                    (t.altKey ? 2 : 0) |
                    (t.shiftKey ? 4 : 0) |
                    (t.ctrlKey ? 8 : 0)
                  )
                }
              : function(t) {
                  return (
                    0 |
                    (t.ctrlKey ? 1 : 0) |
                    (t.altKey ? 2 : 0) |
                    (t.shiftKey ? 4 : 0) |
                    (t.metaKey ? 8 : 0)
                  )
                }
          if (
            ((t.getModifierString = function(t) {
              return r.KEY_MODS[l(t)]
            }),
            (t.addCommandKeyListener = function(e, r) {
              var s = t.addListener
              if (a.isOldGecko || (a.isOpera && !('KeyboardEvent' in window))) {
                var l = null
                s(e, 'keydown', function(t) {
                  l = t.keyCode
                }),
                  s(e, 'keypress', function(t) {
                    return o(r, t, l)
                  })
              } else {
                var d = null
                s(e, 'keydown', function(t) {
                  i[t.keyCode] = (i[t.keyCode] || 0) + 1
                  var e = o(r, t, t.keyCode)
                  return (d = t.defaultPrevented), e
                }),
                  s(e, 'keypress', function(o) {
                    d &&
                      (o.ctrlKey || o.altKey || o.shiftKey || o.metaKey) &&
                      (t.stopEvent(o), (d = null))
                  }),
                  s(e, 'keyup', function(t) {
                    i[t.keyCode] = null
                  }),
                  i || (n(), s(window, 'focus', n))
              }
            }),
            'object' == typeof window && window.postMessage && !a.isOldIE)
          ) {
            t.nextTick = function(o, n) {
              n = n || window
              var r = 'zero-timeout-message-' + 1
              t.addListener(n, 'message', function a(i) {
                i.data == r &&
                  (t.stopPropagation(i), t.removeListener(n, 'message', a), o())
              }),
                n.postMessage(r, '*')
            }
          }
          ;(t.nextFrame =
            'object' == typeof window &&
            (window.requestAnimationFrame ||
              window.mozRequestAnimationFrame ||
              window.webkitRequestAnimationFrame ||
              window.msRequestAnimationFrame ||
              window.oRequestAnimationFrame)),
            (t.nextFrame = t.nextFrame
              ? t.nextFrame.bind(window)
              : function(e) {
                  setTimeout(e, 17)
                })
        }
      ),
      ace.define('ace/lib/lang', ['require', 'exports', 'module'], function(
        e,
        t
      ) {
        'use strict'
        ;(t.last = function(e) {
          return e[e.length - 1]
        }),
          (t.stringReverse = function(e) {
            return e
              .split('')
              .reverse()
              .join('')
          }),
          (t.stringRepeat = function(e, t) {
            for (var o = ''; 0 < t; ) 1 & t && (o += e), (t >>= 1) && (e += e)
            return o
          })
        var o = /^\s\s*/,
          n = /\s\s*$/
        ;(t.stringTrimLeft = function(e) {
          return e.replace(o, '')
        }),
          (t.stringTrimRight = function(e) {
            return e.replace(n, '')
          }),
          (t.copyObject = function(e) {
            var t = {}
            for (var o in e) t[o] = e[o]
            return t
          }),
          (t.copyArray = function(e) {
            for (var t = [], o = 0, n = e.length; o < n; o++)
              t[o] =
                e[o] && 'object' == typeof e[o] ? this.copyObject(e[o]) : e[o]
            return t
          }),
          (t.deepCopy = function e(t) {
            if ('object' != typeof t || !t) return t
            var o
            if (Array.isArray(t)) {
              o = []
              for (var n = 0; n < t.length; n++) o[n] = e(t[n])
              return o
            }
            if ('[object Object]' !== Object.prototype.toString.call(t))
              return t
            for (var n in ((o = {}), t)) o[n] = e(t[n])
            return o
          }),
          (t.arrayToMap = function(e) {
            for (var t = {}, o = 0; o < e.length; o++) t[e[o]] = 1
            return t
          }),
          (t.createMap = function(e) {
            var t = Object.create(null)
            for (var o in e) t[o] = e[o]
            return t
          }),
          (t.arrayRemove = function(e, t) {
            for (var o = 0; o <= e.length; o++) t === e[o] && e.splice(o, 1)
          }),
          (t.escapeRegExp = function(e) {
            return e.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1')
          }),
          (t.escapeHTML = function(e) {
            return e
              .replace(/&/g, '&#38;')
              .replace(/"/g, '&#34;')
              .replace(/'/g, '&#39;')
              .replace(/</g, '&#60;')
          }),
          (t.getMatchOffsets = function(e, t) {
            var o = []
            return (
              e.replace(t, function(e) {
                o.push({
                  offset: arguments[arguments.length - 2],
                  length: e.length
                })
              }),
              o
            )
          }),
          (t.deferredCall = function(e) {
            var t = null,
              o = function() {
                ;(t = null), e()
              },
              n = function(e) {
                return n.cancel(), (t = setTimeout(o, e || 0)), n
              }
            return (
              (n.schedule = n),
              (n.call = function() {
                return this.cancel(), e(), n
              }),
              (n.cancel = function() {
                return clearTimeout(t), (t = null), n
              }),
              (n.isPending = function() {
                return t
              }),
              n
            )
          }),
          (t.delayedCall = function(e, t) {
            var o = null,
              n = function() {
                ;(o = null), e()
              },
              r = function(e) {
                null == o && (o = setTimeout(n, e || t))
              }
            return (
              (r.delay = function(e) {
                o && clearTimeout(o), (o = setTimeout(n, e || t))
              }),
              (r.schedule = r),
              (r.call = function() {
                this.cancel(), e()
              }),
              (r.cancel = function() {
                o && clearTimeout(o), (o = null)
              }),
              (r.isPending = function() {
                return o
              }),
              r
            )
          })
      }),
      ace.define(
        'ace/keyboard/textinput',
        [
          'require',
          'exports',
          'module',
          'ace/lib/event',
          'ace/lib/useragent',
          'ace/lib/dom',
          'ace/lib/lang'
        ],
        function(e, t) {
          'use strict'
          var o = e('../lib/event'),
            n = e('../lib/useragent'),
            r = e('../lib/dom'),
            a = e('../lib/lang'),
            i = 18 > n.isChrome,
            s = n.isIE
          t.TextInput = function(e, t) {
            function l(e) {
              if (!f) {
                if (((f = !0), $)) (t = 0), (o = e ? 0 : p.value.length - 1)
                else
                  var t = e ? 2 : 1,
                    o = 2
                try {
                  p.setSelectionRange(t, o)
                } catch (t) {}
                f = !1
              }
            }
            function d() {
              f || ((p.value = g), n.isWebKit && E.schedule())
            }
            function c() {
              clearTimeout(W),
                (W = setTimeout(function() {
                  y && ((p.style.cssText = y), (y = '')),
                    null == t.renderer.$keepTextAreaAtCursor &&
                      ((t.renderer.$keepTextAreaAtCursor = !0),
                      t.renderer.$moveTextAreaToCursor())
                }, n.isOldIE ? 200 : 0))
            }
            var p = r.createElement('textarea')
            ;(p.className = 'ace_text-input'),
              n.isTouchPad && p.setAttribute('x-palm-disable-auto-cap', !0),
              p.setAttribute('wrap', 'off'),
              p.setAttribute('autocorrect', 'off'),
              p.setAttribute('autocapitalize', 'off'),
              p.setAttribute('spellcheck', !1),
              (p.style.opacity = '0'),
              n.isOldIE && (p.style.top = '-1000px'),
              e.insertBefore(p, e.firstChild)
            var g = '\x01\x01',
              h = !1,
              m = !1,
              f = !1,
              y = '',
              A = !0
            try {
              var C = document.activeElement === p
            } catch (t) {}
            o.addListener(p, 'blur', function(o) {
              t.onBlur(o), (C = !1)
            }),
              o.addListener(p, 'focus', function(o) {
                ;(C = !0), t.onFocus(o), l()
              }),
              (this.focus = function() {
                if (y) return p.focus()
                var e = p.style.top
                ;(p.style.position = 'fixed'),
                  (p.style.top = '0px'),
                  p.focus(),
                  setTimeout(function() {
                    ;(p.style.position = ''),
                      '0px' == p.style.top && (p.style.top = e)
                  }, 0)
              }),
              (this.blur = function() {
                p.blur()
              }),
              (this.isFocused = function() {
                return C
              })
            var w = a.delayedCall(function() {
                C && l(A)
              }),
              E = a.delayedCall(function() {
                f || ((p.value = g), C && l())
              })
            n.isWebKit ||
              t.addEventListener('changeSelection', function() {
                t.selection.isEmpty() != A && ((A = !A), w.schedule())
              }),
              d(),
              C && t.onFocus()
            var b = function(e) {
              return 0 === e.selectionStart && e.selectionEnd === e.value.length
            }
            if (
              (!p.setSelectionRange &&
                p.createTextRange &&
                ((p.setSelectionRange = function(e, t) {
                  var o = this.createTextRange()
                  o.collapse(!0),
                    o.moveStart('character', e),
                    o.moveEnd('character', t),
                    o.select()
                }),
                (b = function(e) {
                  try {
                    var t = e.ownerDocument.selection.createRange()
                  } catch (t) {}
                  return t && t.parentElement() == e && t.text == e.value
                })),
              n.isOldIE)
            ) {
              var v = !1,
                F = function(t) {
                  if (!v) {
                    var e = p.value
                    return f || !e || e == g
                      ? void 0
                      : t && e == g[0]
                        ? x.schedule()
                        : void (D(e), (v = !0), d(), (v = !1))
                  }
                },
                x = a.delayedCall(F)
              o.addListener(p, 'propertychange', F)
              var S = { 13: 1, 27: 1 }
              o.addListener(p, 'keyup', function(t) {
                return (
                  f && (!p.value || S[t.keyCode]) && setTimeout(N, 0),
                  129 > (p.value.charCodeAt(0) || 0)
                    ? x.call()
                    : void (f ? O() : M())
                )
              }),
                o.addListener(p, 'keydown', function() {
                  x.schedule(50)
                })
            }
            var $ = null
            ;(this.setInputHandler = function(e) {
              $ = e
            }),
              (this.getInputHandler = function() {
                return $
              })
            var k = !1,
              D = function(e) {
                $ && ((e = $(e)), ($ = null)),
                  m
                    ? (l(), e && t.onPaste(e), (m = !1))
                    : e == g.charAt(0)
                      ? k
                        ? t.execCommand('del', { source: 'ace' })
                        : t.execCommand('backspace', { source: 'ace' })
                      : (e.substring(0, 2) == g
                          ? (e = e.substr(2))
                          : e.charAt(0) == g.charAt(0)
                            ? (e = e.substr(1))
                            : e.charAt(e.length - 1) == g.charAt(0) &&
                              (e = e.slice(0, -1)),
                        e.charAt(e.length - 1) == g.charAt(0) &&
                          (e = e.slice(0, -1)),
                        e && t.onTextInput(e)),
                  k && (k = !1)
              },
              B = function() {
                if (!f) {
                  var e = p.value
                  D(e), d()
                }
              },
              _ = function(t, o, n) {
                var e = t.clipboardData || window.clipboardData
                if (e && !i) {
                  var r = s || n ? 'Text' : 'text/plain'
                  try {
                    return o ? !1 !== e.setData(r, o) : e.getData(r)
                  } catch (t) {
                    if (!n) return _(t, o, !0)
                  }
                }
              },
              L = function(n, e) {
                var r = t.getCopyText()
                return r
                  ? void (_(n, r)
                      ? (e ? t.onCut() : t.onCopy(), o.preventDefault(n))
                      : ((h = !0),
                        (p.value = r),
                        p.select(),
                        setTimeout(function() {
                          ;(h = !1), d(), l(), e ? t.onCut() : t.onCopy()
                        })))
                  : o.preventDefault(n)
              },
              R = function(t) {
                L(t, !0)
              },
              P = function(t) {
                L(t, !1)
              },
              T = function(r) {
                var e = _(r)
                'string' == typeof e
                  ? (e && t.onPaste(e, r),
                    n.isIE && setTimeout(l),
                    o.preventDefault(r))
                  : ((p.value = ''), (m = !0))
              }
            o.addCommandKeyListener(p, t.onCommandKey.bind(t)),
              o.addListener(p, 'select', function() {
                h
                  ? (h = !1)
                  : b(p)
                    ? (t.selectAll(), l())
                    : $ && l(t.selection.isEmpty())
              }),
              o.addListener(p, 'input', B),
              o.addListener(p, 'cut', R),
              o.addListener(p, 'copy', P),
              o.addListener(p, 'paste', T),
              ('oncut' in p && 'oncopy' in p && 'onpaste' in p) ||
                o.addListener(e, 'keydown', function(t) {
                  if ((!n.isMac || t.metaKey) && t.ctrlKey)
                    switch (t.keyCode) {
                      case 67:
                        P(t)
                        break
                      case 86:
                        T(t)
                        break
                      case 88:
                        R(t)
                    }
                })
            var M = function() {
                f ||
                  !t.onCompositionStart ||
                  t.$readOnly ||
                  ((f = {}),
                  (f.canUndo = t.session.$undoManager),
                  t.onCompositionStart(),
                  setTimeout(O, 0),
                  t.on('mousedown', N),
                  f.canUndo &&
                    !t.selection.isEmpty() &&
                    (t.insert(''),
                    t.session.markUndoGroup(),
                    t.selection.clearSelection()),
                  t.session.markUndoGroup())
              },
              O = function() {
                if (f && t.onCompositionUpdate && !t.$readOnly) {
                  var e = p.value.replace(/\x01/g, '')
                  if (
                    f.lastValue !== e &&
                    (t.onCompositionUpdate(e),
                    f.lastValue && t.undo(),
                    f.canUndo && (f.lastValue = e),
                    f.lastValue)
                  ) {
                    var o = t.selection.getRange()
                    t.insert(f.lastValue),
                      t.session.markUndoGroup(),
                      (f.range = t.selection.getRange()),
                      t.selection.setRange(o),
                      t.selection.clearSelection()
                  }
                }
              },
              N = function(o) {
                if (t.onCompositionEnd && !t.$readOnly) {
                  var e = f
                  f = !1
                  var r = setTimeout(function() {
                    r = null
                    var t = p.value.replace(/\x01/g, '')
                    f ||
                      (t == e.lastValue
                        ? d()
                        : !e.lastValue && t && (d(), D(t)))
                  })
                  ;($ = function(o) {
                    return (r && clearTimeout(r),
                    (o = o.replace(/\x01/g, '')),
                    o == e.lastValue)
                      ? ''
                      : (e.lastValue && r && t.undo(), o)
                  }),
                    t.onCompositionEnd(),
                    t.removeListener('mousedown', N),
                    'compositionend' == o.type &&
                      e.range &&
                      t.selection.setRange(e.range),
                    n.isChrome && 53 <= n.isChrome && B()
                }
              },
              I = a.delayedCall(O, 50)
            o.addListener(p, 'compositionstart', M),
              n.isGecko
                ? o.addListener(p, 'text', function() {
                    I.schedule()
                  })
                : (o.addListener(p, 'keyup', function() {
                    I.schedule()
                  }),
                  o.addListener(p, 'keydown', function() {
                    I.schedule()
                  })),
              o.addListener(p, 'compositionend', N),
              (this.getElement = function() {
                return p
              }),
              (this.setReadOnly = function(e) {
                p.readOnly = e
              }),
              (this.onContextMenu = function(o) {
                ;(k = !0),
                  l(t.selection.isEmpty()),
                  t._emit('nativecontextmenu', { target: t, domEvent: o }),
                  this.moveToMouse(o, !0)
              }),
              (this.moveToMouse = function(a, e) {
                if (e || !n.isOldIE) {
                  y || (y = p.style.cssText),
                    (p.style.cssText =
                      (e ? 'z-index:100000;' : '') +
                      'height:' +
                      p.style.height +
                      ';' +
                      (n.isIE ? 'opacity:0.1;' : ''))
                  var i = t.container.getBoundingClientRect(),
                    s = r.computedStyle(t.container),
                    l = i.top + (parseInt(s.borderTopWidth) || 0),
                    d = i.left + (parseInt(i.borderLeftWidth) || 0),
                    g = i.bottom - l - p.clientHeight - 2,
                    h = function(t) {
                      ;(p.style.left = t.clientX - d - 2 + 'px'),
                        (p.style.top = u(t.clientY - l - 2, g) + 'px')
                    }
                  h(a),
                    'mousedown' != a.type ||
                      (t.renderer.$keepTextAreaAtCursor &&
                        (t.renderer.$keepTextAreaAtCursor = null),
                      clearTimeout(W),
                      n.isWin && !n.isOldIE && o.capture(t.container, h, c))
                }
              }),
              (this.onContextMenuClose = c)
            var j = function(o) {
                t.textInput.onContextMenu(o), c()
              },
              W
            o.addListener(p, 'mouseup', j),
              o.addListener(p, 'mousedown', function(t) {
                t.preventDefault(), c()
              }),
              o.addListener(t.renderer.scroller, 'contextmenu', j),
              o.addListener(p, 'contextmenu', j)
          }
        }
      ),
      ace.define(
        'ace/mouse/default_handlers',
        [
          'require',
          'exports',
          'module',
          'ace/lib/dom',
          'ace/lib/event',
          'ace/lib/useragent'
        ],
        function(e, t) {
          'use strict'
          function o(e) {
            e.$clickSelection = null
            var t = e.editor
            t.setDefaultHandler('mousedown', this.onMouseDown.bind(e)),
              t.setDefaultHandler('dblclick', this.onDoubleClick.bind(e)),
              t.setDefaultHandler('tripleclick', this.onTripleClick.bind(e)),
              t.setDefaultHandler('quadclick', this.onQuadClick.bind(e)),
              t.setDefaultHandler('mousewheel', this.onMouseWheel.bind(e)),
              t.setDefaultHandler('touchmove', this.onTouchMove.bind(e))
            ;[
              'select',
              'startSelect',
              'selectEnd',
              'selectAllEnd',
              'selectByWordsEnd',
              'selectByLinesEnd',
              'dragWait',
              'dragWaitEnd',
              'focusWait'
            ].forEach(function(t) {
              e[t] = this[t]
            }, this),
              (e.selectByLines = this.extendSelectionBy.bind(
                e,
                'getLineRange'
              )),
              (e.selectByWords = this.extendSelectionBy.bind(e, 'getWordRange'))
          }
          function n(e, t, o, n) {
            return i(s(o - e, 2) + s(n - t, 2))
          }
          function r(e, t) {
            if (e.start.row == e.end.row)
              var o = 2 * t.column - e.start.column - e.end.column
            else if (
              e.start.row == e.end.row - 1 &&
              !e.start.column &&
              !e.end.column
            )
              var o = t.column - 4
            else var o = 2 * t.row - e.start.row - e.end.row
            return 0 > o
              ? { cursor: e.start, anchor: e.end }
              : { cursor: e.end, anchor: e.start }
          }
          var a = e('../lib/dom'),
            l = e('../lib/event'),
            d = e('../lib/useragent')
          ;(function() {
            ;(this.onMouseDown = function(e) {
              var t = e.inSelection(),
                o = e.getDocumentPosition()
              this.mousedownEvent = e
              var n = this.editor,
                r = e.getButton()
              if (0 !== r) {
                var a = n.getSelectionRange(),
                  i = a.isEmpty()
                return (
                  n.$blockScrolling++,
                  (i || 1 == r) && n.selection.moveToPosition(o),
                  n.$blockScrolling--,
                  void (2 == r && n.textInput.onContextMenu(e.domEvent))
                )
              }
              return ((this.mousedownEvent.time = Date.now()),
              t &&
                !n.isFocused() &&
                (n.focus(),
                this.$focusTimout &&
                  !this.$clickSelection &&
                  !n.inMultiSelectMode))
                ? (this.setState('focusWait'), void this.captureMouse(e))
                : (this.captureMouse(e),
                  this.startSelect(o, 1 < e.domEvent._clicks),
                  e.preventDefault())
            }),
              (this.startSelect = function(e, t) {
                e =
                  e ||
                  this.editor.renderer.screenToTextCoordinates(this.x, this.y)
                var o = this.editor
                o.$blockScrolling++,
                  this.mousedownEvent.getShiftKey()
                    ? o.selection.selectToPosition(e)
                    : !t && o.selection.moveToPosition(e),
                  t || this.select(),
                  o.renderer.scroller.setCapture &&
                    o.renderer.scroller.setCapture(),
                  o.setStyle('ace_selecting'),
                  this.setState('select'),
                  o.$blockScrolling--
              }),
              (this.select = function() {
                var e = this.editor,
                  t = e.renderer.screenToTextCoordinates(this.x, this.y),
                  o
                if ((e.$blockScrolling++, this.$clickSelection)) {
                  var n = this.$clickSelection.comparePoint(t)
                  if (-1 == n) o = this.$clickSelection.end
                  else if (1 == n) o = this.$clickSelection.start
                  else {
                    var a = r(this.$clickSelection, t)
                    ;(t = a.cursor), (o = a.anchor)
                  }
                  e.selection.setSelectionAnchor(o.row, o.column)
                }
                e.selection.selectToPosition(t),
                  e.$blockScrolling--,
                  e.renderer.scrollCursorIntoView()
              }),
              (this.extendSelectionBy = function(e) {
                var t = this.editor,
                  o = t.renderer.screenToTextCoordinates(this.x, this.y),
                  n = t.selection[e](o.row, o.column),
                  a
                if ((t.$blockScrolling++, this.$clickSelection)) {
                  var i = this.$clickSelection.comparePoint(n.start),
                    s = this.$clickSelection.comparePoint(n.end)
                  if (-1 == i && 0 >= s)
                    (a = this.$clickSelection.end),
                      (n.end.row != o.row || n.end.column != o.column) &&
                        (o = n.start)
                  else if (1 == s && 0 <= i)
                    (a = this.$clickSelection.start),
                      (n.start.row != o.row || n.start.column != o.column) &&
                        (o = n.end)
                  else if (-1 == i && 1 == s) (o = n.end), (a = n.start)
                  else {
                    var l = r(this.$clickSelection, o)
                    ;(o = l.cursor), (a = l.anchor)
                  }
                  t.selection.setSelectionAnchor(a.row, a.column)
                }
                t.selection.selectToPosition(o),
                  t.$blockScrolling--,
                  t.renderer.scrollCursorIntoView()
              }),
              (this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() {
                ;(this.$clickSelection = null),
                  this.editor.unsetStyle('ace_selecting'),
                  this.editor.renderer.scroller.releaseCapture &&
                    this.editor.renderer.scroller.releaseCapture()
              }),
              (this.focusWait = function() {
                var e = n(
                    this.mousedownEvent.x,
                    this.mousedownEvent.y,
                    this.x,
                    this.y
                  ),
                  t = Date.now()
                ;(e > 0 || t - this.mousedownEvent.time > this.$focusTimout) &&
                  this.startSelect(this.mousedownEvent.getDocumentPosition())
              }),
              (this.onDoubleClick = function(e) {
                var t = e.getDocumentPosition(),
                  o = this.editor,
                  n = o.session,
                  r = n.getBracketRange(t)
                r
                  ? (r.isEmpty() && (r.start.column--, r.end.column++),
                    this.setState('select'))
                  : ((r = o.selection.getWordRange(t.row, t.column)),
                    this.setState('selectByWords')),
                  (this.$clickSelection = r),
                  this.select()
              }),
              (this.onTripleClick = function(e) {
                var t = e.getDocumentPosition(),
                  o = this.editor
                this.setState('selectByLines')
                var n = o.getSelectionRange()
                n.isMultiLine() && n.contains(t.row, t.column)
                  ? ((this.$clickSelection = o.selection.getLineRange(
                      n.start.row
                    )),
                    (this.$clickSelection.end = o.selection.getLineRange(
                      n.end.row
                    ).end))
                  : (this.$clickSelection = o.selection.getLineRange(t.row)),
                  this.select()
              }),
              (this.onQuadClick = function() {
                var e = this.editor
                e.selectAll(),
                  (this.$clickSelection = e.getSelectionRange()),
                  this.setState('selectAll')
              }),
              (this.onMouseWheel = function(e) {
                if (!e.getAccelKey()) {
                  e.getShiftKey() &&
                    e.wheelY &&
                    !e.wheelX &&
                    ((e.wheelX = e.wheelY), (e.wheelY = 0))
                  var o = e.domEvent.timeStamp,
                    t = o - (this.$lastScrollTime || 0),
                    n = this.editor,
                    r = n.renderer.isScrollableBy(
                      e.wheelX * e.speed,
                      e.wheelY * e.speed
                    )
                  if (r || 200 > t)
                    return (
                      (this.$lastScrollTime = o),
                      n.renderer.scrollBy(
                        e.wheelX * e.speed,
                        e.wheelY * e.speed
                      ),
                      e.stop()
                    )
                }
              }),
              (this.onTouchMove = function(e) {
                var o = e.domEvent.timeStamp,
                  t = o - (this.$lastScrollTime || 0),
                  n = this.editor,
                  r = n.renderer.isScrollableBy(
                    e.wheelX * e.speed,
                    e.wheelY * e.speed
                  )
                if (r || 200 > t)
                  return (
                    (this.$lastScrollTime = o),
                    n.renderer.scrollBy(e.wheelX * e.speed, e.wheelY * e.speed),
                    e.stop()
                  )
              })
          }.call(o.prototype),
            (t.DefaultHandlers = o))
        }
      ),
      ace.define(
        'ace/tooltip',
        ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/dom'],
        function(e, t) {
          'use strict'
          function o(e) {
            ;(this.isOpen = !1), (this.$element = null), (this.$parentNode = e)
          }
          var n = e('./lib/oop'),
            r = e('./lib/dom')
          ;(function() {
            ;(this.$init = function() {
              return (
                (this.$element = r.createElement('div')),
                (this.$element.className = 'ace_tooltip'),
                (this.$element.style.display = 'none'),
                this.$parentNode.appendChild(this.$element),
                this.$element
              )
            }),
              (this.getElement = function() {
                return this.$element || this.$init()
              }),
              (this.setText = function(e) {
                r.setInnerText(this.getElement(), e)
              }),
              (this.setHtml = function(e) {
                this.getElement().innerHTML = e
              }),
              (this.setPosition = function(e, t) {
                ;(this.getElement().style.left = e + 'px'),
                  (this.getElement().style.top = t + 'px')
              }),
              (this.setClassName = function(e) {
                r.addCssClass(this.getElement(), e)
              }),
              (this.show = function(e, t, o) {
                null != e && this.setText(e),
                  null != t && null != o && this.setPosition(t, o),
                  this.isOpen ||
                    ((this.getElement().style.display = 'block'),
                    (this.isOpen = !0))
              }),
              (this.hide = function() {
                this.isOpen &&
                  ((this.getElement().style.display = 'none'),
                  (this.isOpen = !1))
              }),
              (this.getHeight = function() {
                return this.getElement().offsetHeight
              }),
              (this.getWidth = function() {
                return this.getElement().offsetWidth
              })
          }.call(o.prototype),
            (t.Tooltip = o))
        }
      ),
      ace.define(
        'ace/mouse/default_gutter_handler',
        [
          'require',
          'exports',
          'module',
          'ace/lib/dom',
          'ace/lib/oop',
          'ace/lib/event',
          'ace/tooltip'
        ],
        function(e, t) {
          'use strict'
          function o(e) {
            i.call(this, e)
          }
          var n = e('../lib/dom'),
            r = e('../lib/oop'),
            a = e('../lib/event'),
            i = e('../tooltip').Tooltip
          r.inherits(o, i),
            function() {
              this.setPosition = function(e, t) {
                var o =
                    window.innerWidth || document.documentElement.clientWidth,
                  n =
                    window.innerHeight || document.documentElement.clientHeight,
                  r = this.getWidth(),
                  a = this.getHeight()
                ;(e += 15),
                  (t += 15),
                  e + r > o && (e -= e + r - o),
                  t + a > n && (t -= 20 + a),
                  i.prototype.setPosition.call(this, e, t)
              }
            }.call(o.prototype),
            (t.GutterHandler = function(t) {
              function e() {
                var e = u.getDocumentPosition().row,
                  o = l.$annotations[e]
                if (!o) return r()
                var n = s.session.getLength()
                if (e == n) {
                  var a = s.renderer.pixelToScreenCoordinates(0, u.y).row,
                    c = u.$pos
                  if (a > s.session.documentToScreenRow(c.row, c.column))
                    return r()
                }
                if (p != o)
                  if (
                    ((p = o.text.join('<br/>')),
                    d.setHtml(p),
                    d.show(),
                    s._signal('showGutterTooltip', d),
                    s.on('mousewheel', r),
                    t.$tooltipFollowsMouse)
                  )
                    i(u)
                  else {
                    var g = u.domEvent.target,
                      h = g.getBoundingClientRect(),
                      m = d.getElement().style
                    ;(m.left = h.right + 'px'), (m.top = h.bottom + 'px')
                  }
              }
              function r() {
                c && (c = clearTimeout(c)),
                  p &&
                    (d.hide(),
                    (p = null),
                    s._signal('hideGutterTooltip', d),
                    s.removeEventListener('mousewheel', r))
              }
              function i(t) {
                d.setPosition(t.x, t.y)
              }
              var s = t.editor,
                l = s.renderer.$gutterLayer,
                d = new o(s.container)
              t.editor.setDefaultHandler('guttermousedown', function(o) {
                if (s.isFocused() && 0 == o.getButton()) {
                  var e = l.getRegion(o)
                  if ('foldWidgets' != e) {
                    var n = o.getDocumentPosition().row,
                      r = s.session.selection
                    if (o.getShiftKey()) r.selectTo(n, 0)
                    else {
                      if (2 == o.domEvent.detail)
                        return s.selectAll(), o.preventDefault()
                      t.$clickSelection = s.selection.getLineRange(n)
                    }
                    return (
                      t.setState('selectByLines'),
                      t.captureMouse(o),
                      o.preventDefault()
                    )
                  }
                }
              })
              var c, u, p
              t.editor.setDefaultHandler('guttermousemove', function(o) {
                var a = o.domEvent.target || o.domEvent.srcElement
                if (n.hasCssClass(a, 'ace_fold-widget')) return r()
                p && t.$tooltipFollowsMouse && i(o), (u = o)
                c ||
                  (c = setTimeout(function() {
                    ;(c = null), u && !t.isMousePressed ? e() : r()
                  }, 50))
              }),
                a.addListener(s.renderer.$gutter, 'mouseout', function() {
                  u = null
                  !p ||
                    c ||
                    (c = setTimeout(function() {
                      ;(c = null), r()
                    }, 50))
                }),
                s.on('changeSession', r)
            })
        }
      ),
      ace.define(
        'ace/mouse/mouse_event',
        ['require', 'exports', 'module', 'ace/lib/event', 'ace/lib/useragent'],
        function(e, t) {
          'use strict'
          var o = e('../lib/event'),
            n = e('../lib/useragent'),
            r = (t.MouseEvent = function(e, t) {
              ;(this.domEvent = e),
                (this.editor = t),
                (this.x = this.clientX = e.clientX),
                (this.y = this.clientY = e.clientY),
                (this.$pos = null),
                (this.$inSelection = null),
                (this.propagationStopped = !1),
                (this.defaultPrevented = !1)
            })
          ;(function() {
            ;(this.stopPropagation = function() {
              o.stopPropagation(this.domEvent), (this.propagationStopped = !0)
            }),
              (this.preventDefault = function() {
                o.preventDefault(this.domEvent), (this.defaultPrevented = !0)
              }),
              (this.stop = function() {
                this.stopPropagation(), this.preventDefault()
              }),
              (this.getDocumentPosition = function() {
                return this.$pos
                  ? this.$pos
                  : ((this.$pos = this.editor.renderer.screenToTextCoordinates(
                      this.clientX,
                      this.clientY
                    )),
                    this.$pos)
              }),
              (this.inSelection = function() {
                if (null !== this.$inSelection) return this.$inSelection
                var e = this.editor,
                  t = e.getSelectionRange()
                if (t.isEmpty()) this.$inSelection = !1
                else {
                  var o = this.getDocumentPosition()
                  this.$inSelection = t.contains(o.row, o.column)
                }
                return this.$inSelection
              }),
              (this.getButton = function() {
                return o.getButton(this.domEvent)
              }),
              (this.getShiftKey = function() {
                return this.domEvent.shiftKey
              }),
              (this.getAccelKey = n.isMac
                ? function() {
                    return this.domEvent.metaKey
                  }
                : function() {
                    return this.domEvent.ctrlKey
                  })
          }.call(r.prototype))
        }
      ),
      ace.define(
        'ace/mouse/dragdrop_handler',
        [
          'require',
          'exports',
          'module',
          'ace/lib/dom',
          'ace/lib/event',
          'ace/lib/useragent'
        ],
        function(e, t) {
          'use strict'
          function o(e) {
            function t(e, t) {
              var o = Date.now(),
                r = !t || e.row != t.row,
                a = !t || e.column != t.column
              if (!L || r || a)
                (A.$blockScrolling += 1),
                  A.moveCursorToPosition(e),
                  (A.$blockScrolling -= 1),
                  (L = o),
                  (R = { x: v, y: F })
              else {
                var i = n(R.x, R.y, v, F)
                i > p
                  ? (L = null)
                  : o - L >= c &&
                    (A.renderer.scrollCursorIntoView(), (L = null))
              }
            }
            function o(e, t) {
              var o = Date.now(),
                n = A.renderer.layerConfig.lineHeight,
                r = A.renderer.layerConfig.characterWidth,
                a = A.renderer.scroller.getBoundingClientRect(),
                i = {
                  x: { left: v - a.left, right: a.right - v },
                  y: { top: F - a.top, bottom: a.bottom - F }
                },
                s = u(i.x.left, i.x.right),
                l = u(i.y.top, i.y.bottom),
                c = { row: e.row, column: e.column }
              2 >= s / r && (c.column += i.x.left < i.x.right ? -3 : 2),
                1 >= l / n && (c.row += i.y.top < i.y.bottom ? -1 : 1)
              var p = e.row != c.row,
                g = e.column != c.column,
                h = !t || e.row != t.row
              p || (g && !h)
                ? _
                  ? o - _ >= d && A.renderer.scrollCursorIntoView(c)
                  : (_ = o)
                : (_ = null)
            }
            function i() {
              var e = k
              ;(k = A.renderer.screenToTextCoordinates(v, F)), t(k, e), o(k, e)
            }
            function s() {
              ;($ = A.selection.toOrientedRange()),
                (b = A.session.addMarker(
                  $,
                  'ace_selection',
                  A.getSelectionStyle()
                )),
                A.clearSelection(),
                A.isFocused() && A.renderer.$cursorLayer.setBlinking(!1),
                clearInterval(S),
                i(),
                (S = setInterval(i, 20)),
                (E = 0),
                a.addListener(document, 'mousemove', h)
            }
            function g() {
              clearInterval(S),
                A.session.removeMarker(b),
                (b = null),
                (A.$blockScrolling += 1),
                A.selection.fromOrientedRange($),
                (A.$blockScrolling -= 1),
                A.isFocused() &&
                  !B &&
                  A.renderer.$cursorLayer.setBlinking(!A.getReadOnly()),
                ($ = null),
                (k = null),
                (E = 0),
                (_ = null),
                (L = null),
                a.removeListener(document, 'mousemove', h)
            }
            function h() {
              null == P &&
                (P = setTimeout(function() {
                  null != P && b && g()
                }, 20))
            }
            function m(e) {
              var t = e.types
              return (
                !t ||
                Array.prototype.some.call(t, function(e) {
                  return 'text/plain' == e || 'Text' == e
                })
              )
            }
            function f(t) {
              var e = ['copy', 'copymove', 'all', 'uninitialized'],
                o = l.isMac ? t.altKey : t.ctrlKey,
                n = 'uninitialized'
              try {
                n = t.dataTransfer.effectAllowed.toLowerCase()
              } catch (t) {}
              var r = 'none'
              return (
                o && 0 <= e.indexOf(n)
                  ? (r = 'copy')
                  : 0 <=
                    [
                      'move',
                      'copymove',
                      'linkmove',
                      'all',
                      'uninitialized'
                    ].indexOf(n)
                    ? (r = 'move')
                    : 0 <= e.indexOf(n) && (r = 'copy'),
                r
              )
            }
            var A = e.editor,
              C = r.createElement('img')
            ;(C.src =
              'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='),
              l.isOpera &&
                (C.style.cssText =
                  'width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;')
            ;[
              'dragWait',
              'dragWaitEnd',
              'startDrag',
              'dragReadyEnd',
              'onMouseDrag'
            ].forEach(function(t) {
              e[t] = this[t]
            }, this),
              A.addEventListener('mousedown', this.onMouseDown.bind(e))
            var w = A.container,
              E = 0,
              b,
              v,
              F,
              S,
              $,
              k,
              D,
              B,
              _,
              L,
              R
            ;(this.onDragStart = function(t) {
              if (this.cancelDrag || !w.draggable) {
                var e = this
                return (
                  setTimeout(function() {
                    e.startSelect(), e.captureMouse(t)
                  }, 0),
                  t.preventDefault()
                )
              }
              $ = A.getSelectionRange()
              var o = t.dataTransfer
              ;(o.effectAllowed = A.getReadOnly() ? 'copy' : 'copyMove'),
                l.isOpera && (A.container.appendChild(C), (C.scrollTop = 0)),
                o.setDragImage && o.setDragImage(C, 0, 0),
                l.isOpera && A.container.removeChild(C),
                o.clearData(),
                o.setData('Text', A.session.getTextRange()),
                (B = !0),
                this.setState('drag')
            }),
              (this.onDragEnd = function(t) {
                if (
                  ((w.draggable = !1),
                  (B = !1),
                  this.setState(null),
                  !A.getReadOnly())
                ) {
                  var e = t.dataTransfer.dropEffect
                  D || 'move' != e || A.session.remove(A.getSelectionRange()),
                    A.renderer.$cursorLayer.setBlinking(!0)
                }
                this.editor.unsetStyle('ace_dragging'),
                  this.editor.renderer.setCursorStyle('')
              }),
              (this.onDragEnter = function(t) {
                if (!A.getReadOnly() && m(t.dataTransfer))
                  return (
                    (v = t.clientX),
                    (F = t.clientY),
                    b || s(),
                    E++,
                    (t.dataTransfer.dropEffect = D = f(t)),
                    a.preventDefault(t)
                  )
              }),
              (this.onDragOver = function(t) {
                if (!A.getReadOnly() && m(t.dataTransfer))
                  return (
                    (v = t.clientX),
                    (F = t.clientY),
                    b || (s(), E++),
                    null !== P && (P = null),
                    (t.dataTransfer.dropEffect = D = f(t)),
                    a.preventDefault(t)
                  )
              }),
              (this.onDragLeave = function(t) {
                if ((E--, 0 >= E && b))
                  return g(), (D = null), a.preventDefault(t)
              }),
              (this.onDrop = function(t) {
                if (k) {
                  var e = t.dataTransfer
                  if (B)
                    'move' === D
                      ? ($ = $.contains(k.row, k.column)
                          ? { start: k, end: k }
                          : A.moveText($, k))
                      : 'copy' === D
                        ? ($ = A.moveText($, k, !0))
                        : void 0
                  else {
                    var o = e.getData('Text')
                    ;($ = { start: k, end: A.session.insert(k, o) }),
                      A.focus(),
                      (D = null)
                  }
                  return g(), a.preventDefault(t)
                }
              }),
              a.addListener(w, 'dragstart', this.onDragStart.bind(e)),
              a.addListener(w, 'dragend', this.onDragEnd.bind(e)),
              a.addListener(w, 'dragenter', this.onDragEnter.bind(e)),
              a.addListener(w, 'dragover', this.onDragOver.bind(e)),
              a.addListener(w, 'dragleave', this.onDragLeave.bind(e)),
              a.addListener(w, 'drop', this.onDrop.bind(e))
            var P = null
          }
          function n(e, t, o, n) {
            return i(s(o - e, 2) + s(n - t, 2))
          }
          var r = e('../lib/dom'),
            a = e('../lib/event'),
            l = e('../lib/useragent'),
            d = 200,
            c = 200,
            p = 5
          ;(function() {
            ;(this.dragWait = function() {
              var e = Date.now() - this.mousedownEvent.time
              e > this.editor.getDragDelay() && this.startDrag()
            }),
              (this.dragWaitEnd = function() {
                var e = this.editor.container
                ;(e.draggable = !1),
                  this.startSelect(this.mousedownEvent.getDocumentPosition()),
                  this.selectEnd()
              }),
              (this.dragReadyEnd = function() {
                this.editor.renderer.$cursorLayer.setBlinking(
                  !this.editor.getReadOnly()
                ),
                  this.editor.unsetStyle('ace_dragging'),
                  this.editor.renderer.setCursorStyle(''),
                  this.dragWaitEnd()
              }),
              (this.startDrag = function() {
                this.cancelDrag = !1
                var e = this.editor,
                  t = e.container
                ;(t.draggable = !0),
                  e.renderer.$cursorLayer.setBlinking(!1),
                  e.setStyle('ace_dragging')
                var o = l.isWin ? 'default' : 'move'
                e.renderer.setCursorStyle(o), this.setState('dragReady')
              }),
              (this.onMouseDrag = function() {
                var e = this.editor.container
                if (l.isIE && 'dragReady' == this.state) {
                  var t = n(
                    this.mousedownEvent.x,
                    this.mousedownEvent.y,
                    this.x,
                    this.y
                  )
                  3 < t && e.dragDrop()
                }
                if ('dragWait' === this.state) {
                  var t = n(
                    this.mousedownEvent.x,
                    this.mousedownEvent.y,
                    this.x,
                    this.y
                  )
                  0 < t &&
                    ((e.draggable = !1),
                    this.startSelect(this.mousedownEvent.getDocumentPosition()))
                }
              }),
              (this.onMouseDown = function(t) {
                if (this.$dragEnabled) {
                  this.mousedownEvent = t
                  var e = this.editor,
                    o = t.inSelection(),
                    n = t.getButton(),
                    r = t.domEvent.detail || 1
                  if (1 === r && 0 === n && o) {
                    if (
                      t.editor.inMultiSelectMode &&
                      (t.getAccelKey() || t.getShiftKey())
                    )
                      return
                    this.mousedownEvent.time = Date.now()
                    var a = t.domEvent.target || t.domEvent.srcElement
                    if (
                      ('unselectable' in a && (a.unselectable = 'on'),
                      e.getDragDelay())
                    ) {
                      if (l.isWebKit) {
                        this.cancelDrag = !0
                        var i = e.container
                        i.draggable = !0
                      }
                      this.setState('dragWait')
                    } else this.startDrag()
                    this.captureMouse(t, this.onMouseDrag.bind(this)),
                      (t.defaultPrevented = !0)
                  }
                }
              })
          }.call(o.prototype),
            (t.DragdropHandler = o))
        }
      ),
      ace.define(
        'ace/lib/net',
        ['require', 'exports', 'module', 'ace/lib/dom'],
        function(e, t) {
          'use strict'
          var o = e('./dom')
          ;(t.get = function(e, t) {
            var o = new XMLHttpRequest()
            o.open('GET', e, !0),
              (o.onreadystatechange = function() {
                4 === o.readyState && t(o.responseText)
              }),
              o.send(null)
          }),
            (t.loadScript = function(e, t) {
              var n = o.getDocumentHead(),
                r = document.createElement('script')
              ;(r.src = e),
                n.appendChild(r),
                (r.onload = r.onreadystatechange = function(e, o) {
                  ;(o ||
                    !r.readyState ||
                    'loaded' == r.readyState ||
                    'complete' == r.readyState) &&
                    ((r = r.onload = r.onreadystatechange = null), !o && t())
                })
            }),
            (t.qualifyURL = function(e) {
              var t = document.createElement('a')
              return (t.href = e), t.href
            })
        }
      ),
      ace.define(
        'ace/lib/event_emitter',
        ['require', 'exports', 'module'],
        function(e, t) {
          'use strict'
          var o = {},
            n = function() {
              this.propagationStopped = !0
            },
            r = function() {
              this.defaultPrevented = !0
            }
          ;(o._emit = o._dispatchEvent = function(t, o) {
            this._eventRegistry || (this._eventRegistry = {}),
              this._defaultHandlers || (this._defaultHandlers = {})
            var a = this._eventRegistry[t] || [],
              s = this._defaultHandlers[t]
            if (a.length || s) {
              ;('object' == typeof o && o) || (o = {}),
                o.type || (o.type = t),
                o.stopPropagation || (o.stopPropagation = n),
                o.preventDefault || (o.preventDefault = r),
                (a = a.slice())
              for (
                var l = 0;
                l < a.length && (a[l](o, this), !o.propagationStopped);
                l++
              );
              if (s && !o.defaultPrevented) return s(o, this)
            }
          }),
            (o._signal = function(t, o) {
              var e = (this._eventRegistry || {})[t]
              if (e) {
                e = e.slice()
                for (var n = 0; n < e.length; n++) e[n](o, this)
              }
            }),
            (o.once = function(e, t) {
              var o = this
              t &&
                this.addEventListener(e, function n() {
                  o.removeEventListener(e, n), t.apply(null, arguments)
                })
            }),
            (o.setDefaultHandler = function(e, t) {
              var o = this._defaultHandlers
              if (
                (o || (o = this._defaultHandlers = { _disabled_: {} }), o[e])
              ) {
                var n = o[e],
                  r = o._disabled_[e]
                r || (o._disabled_[e] = r = []), r.push(n)
                var a = r.indexOf(t)
                ;-1 != a && r.splice(a, 1)
              }
              o[e] = t
            }),
            (o.removeDefaultHandler = function(e, t) {
              var o = this._defaultHandlers
              if (o) {
                var n = o._disabled_[e]
                if (o[e] == t) {
                  o[e]
                  n && this.setDefaultHandler(e, n.pop())
                } else if (n) {
                  var r = n.indexOf(t)
                  ;-1 != r && n.splice(r, 1)
                }
              }
            }),
            (o.on = o.addEventListener = function(e, t, o) {
              this._eventRegistry = this._eventRegistry || {}
              var n = this._eventRegistry[e]
              return (
                n || (n = this._eventRegistry[e] = []),
                -1 == n.indexOf(t) && n[o ? 'unshift' : 'push'](t),
                t
              )
            }),
            (o.off = o.removeListener = o.removeEventListener = function(e, t) {
              this._eventRegistry = this._eventRegistry || {}
              var o = this._eventRegistry[e]
              if (o) {
                var n = o.indexOf(t)
                ;-1 !== n && o.splice(n, 1)
              }
            }),
            (o.removeAllListeners = function(e) {
              this._eventRegistry && (this._eventRegistry[e] = [])
            }),
            (t.EventEmitter = o)
        }
      ),
      ace.define(
        'ace/lib/app_config',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'no use strict'
          function o() {
            'undefined' != typeof console &&
              console.warn &&
              console.warn.apply(console, arguments)
          }
          function n(t, o) {
            var n = new Error(t)
            ;(n.data = o),
              'object' == typeof console && console.error && console.error(n),
              setTimeout(function() {
                throw n
              })
          }
          var r = e('./oop'),
            a = e('./event_emitter').EventEmitter,
            i = {
              setOptions: function(e) {
                Object.keys(e).forEach(function(t) {
                  this.setOption(t, e[t])
                }, this)
              },
              getOptions: function(e) {
                var t = {}
                return (
                  e
                    ? !Array.isArray(e) && ((t = e), (e = Object.keys(t)))
                    : (e = Object.keys(this.$options)),
                  e.forEach(function(e) {
                    t[e] = this.getOption(e)
                  }, this),
                  t
                )
              },
              setOption: function(e, t) {
                if (this['$' + e] !== t) {
                  var n = this.$options[e]
                  return n
                    ? n.forwardTo
                      ? this[n.forwardTo] && this[n.forwardTo].setOption(e, t)
                      : void (!n.handlesSet && (this['$' + e] = t),
                        n && n.set && n.set.call(this, t))
                    : o('misspelled option "' + e + '"')
                }
              },
              getOption: function(e) {
                var t = this.$options[e]
                return t
                  ? t.forwardTo
                    ? this[t.forwardTo] && this[t.forwardTo].getOption(e)
                    : t && t.get
                      ? t.get.call(this)
                      : this['$' + e]
                  : o('misspelled option "' + e + '"')
              }
            },
            s = function() {
              this.$defaultOptions = {}
            }
          ;(function() {
            r.implement(this, a),
              (this.defineOptions = function(e, t, o) {
                return (
                  e.$options || (this.$defaultOptions[t] = e.$options = {}),
                  Object.keys(o).forEach(function(t) {
                    var n = o[t]
                    'string' == typeof n && (n = { forwardTo: n }),
                      n.name || (n.name = t),
                      (e.$options[n.name] = n),
                      'initialValue' in n && (e['$' + n.name] = n.initialValue)
                  }),
                  r.implement(e, i),
                  this
                )
              }),
              (this.resetOptions = function(e) {
                Object.keys(e.$options).forEach(function(t) {
                  var o = e.$options[t]
                  'value' in o && e.setOption(t, o.value)
                })
              }),
              (this.setDefaultValue = function(e, t, o) {
                var n =
                  this.$defaultOptions[e] || (this.$defaultOptions[e] = {})
                n[t] &&
                  (n.forwardTo
                    ? this.setDefaultValue(n.forwardTo, t, o)
                    : (n[t].value = o))
              }),
              (this.setDefaultValues = function(e, t) {
                Object.keys(t).forEach(function(o) {
                  this.setDefaultValue(e, o, t[o])
                }, this)
              }),
              (this.warn = o),
              (this.reportError = n)
          }.call(s.prototype),
            (t.AppConfig = s))
        }
      ),
      ace.define(
        'ace/config',
        [
          'require',
          'exports',
          'module',
          'ace/lib/lang',
          'ace/lib/oop',
          'ace/lib/net',
          'ace/lib/app_config'
        ],
        function(e, t, n) {
          'no use strict'
          function r(r) {
            if (c && c.document) {
              u.packaged =
                r || e.packaged || n.packaged || (c.define && o(23).packaged)
              for (
                var s = {},
                  d = '',
                  p = document.currentScript || document._currentScript,
                  g = (p && p.ownerDocument) || document,
                  h = g.getElementsByTagName('script'),
                  f = 0;
                f < h.length;
                f++
              ) {
                var i = h[f],
                  y = i.src || i.getAttribute('src')
                if (y) {
                  for (var A = i.attributes, C = 0, w = A.length, l; C < w; C++)
                    (l = A[C]),
                      0 === l.name.indexOf('data-ace-') &&
                        (s[a(l.name.replace(/^data-ace-/, ''))] = l.value)
                  var E = y.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/)
                  E && (d = E[1])
                }
              }
              for (var m in (d && ((s.base = s.base || d), (s.packaged = !0)),
              (s.basePath = s.base),
              (s.workerPath = s.workerPath || s.base),
              (s.modePath = s.modePath || s.base),
              (s.themePath = s.themePath || s.base),
              delete s.base,
              s))
                'undefined' != typeof s[m] && t.set(m, s[m])
            }
          }
          function a(e) {
            return e.replace(/-(.)/g, function(e, t) {
              return t.toUpperCase()
            })
          }
          var i = e('./lib/lang'),
            s = e('./lib/oop'),
            l = e('./lib/net'),
            d = e('./lib/app_config').AppConfig
          n.exports = t = new d()
          var c = (function() {
              return this || ('undefined' != typeof window && window)
            })(),
            u = {
              packaged: !1,
              workerPath: null,
              modePath: null,
              themePath: null,
              basePath: '',
              suffix: '.js',
              $moduleUrls: {}
            }
          ;(t.get = function(e) {
            if (!u.hasOwnProperty(e))
              throw new Error('Unknown config key: ' + e)
            return u[e]
          }),
            (t.set = function(e, t) {
              if (!u.hasOwnProperty(e))
                throw new Error('Unknown config key: ' + e)
              u[e] = t
            }),
            (t.all = function() {
              return i.copyObject(u)
            }),
            (t.moduleUrl = function(e, t) {
              if (u.$moduleUrls[e]) return u.$moduleUrls[e]
              var o = e.split('/')
              t = t || o[o.length - 2] || ''
              var n = 'snippets' == t ? '/' : '-',
                r = o[o.length - 1]
              if ('worker' == t && '-' == n) {
                var a = new RegExp('^' + t + '[\\-_]|[\\-_]' + t + '$', 'g')
                r = r.replace(a, '')
              }
              ;(!r || r == t) && 1 < o.length && (r = o[o.length - 2])
              var i = u[t + 'Path']
              return (
                null == i ? (i = u.basePath) : '/' == n && (t = n = ''),
                i && '/' != i.slice(-1) && (i += '/'),
                i + t + n + r + this.get('suffix')
              )
            }),
            (t.setModuleUrl = function(e, t) {
              return (u.$moduleUrls[e] = t)
            }),
            (t.$loading = {}),
            (t.loadModule = function(o, n) {
              var r, a
              Array.isArray(o) && ((a = o[0]), (o = o[1]))
              try {
                r = e(o)
              } catch (t) {}
              if (r && !t.$loading[o]) return n && n(r)
              if (
                (t.$loading[o] || (t.$loading[o] = []),
                t.$loading[o].push(n),
                !(1 < t.$loading[o].length))
              ) {
                var i = function() {
                  e([o], function(e) {
                    t._emit('load.module', { name: o, module: e })
                    var n = t.$loading[o]
                    ;(t.$loading[o] = null),
                      n.forEach(function(t) {
                        t && t(e)
                      })
                  })
                }
                return t.get('packaged')
                  ? void l.loadScript(t.moduleUrl(o, a), i)
                  : i()
              }
            }),
            r(!0),
            (t.init = r)
        }
      ),
      ace.define(
        'ace/mouse/mouse_handler',
        [
          'require',
          'exports',
          'module',
          'ace/lib/event',
          'ace/lib/useragent',
          'ace/mouse/default_handlers',
          'ace/mouse/default_gutter_handler',
          'ace/mouse/mouse_event',
          'ace/mouse/dragdrop_handler',
          'ace/config'
        ],
        function(e, t) {
          'use strict'
          var o = e('../lib/event'),
            n = e('../lib/useragent'),
            r = e('./default_handlers').DefaultHandlers,
            a = e('./default_gutter_handler').GutterHandler,
            i = e('./mouse_event').MouseEvent,
            s = e('./dragdrop_handler').DragdropHandler,
            l = e('../config'),
            d = function(t) {
              var i = this
              ;(this.editor = t), new r(this), new a(this), new s(this)
              var e = function() {
                  var e =
                    !document.hasFocus ||
                    !document.hasFocus() ||
                    (!t.isFocused() &&
                      document.activeElement ==
                        (t.textInput && t.textInput.getElement()))
                  e && window.focus(), t.focus()
                },
                l = t.renderer.getMouseEventTarget()
              o.addListener(l, 'click', this.onMouseEvent.bind(this, 'click')),
                o.addListener(
                  l,
                  'mousemove',
                  this.onMouseMove.bind(this, 'mousemove')
                ),
                o.addMultiMouseDownListener(
                  [
                    l,
                    t.renderer.scrollBarV && t.renderer.scrollBarV.inner,
                    t.renderer.scrollBarH && t.renderer.scrollBarH.inner,
                    t.textInput && t.textInput.getElement()
                  ].filter(Boolean),
                  [400, 300, 250],
                  this,
                  'onMouseEvent'
                ),
                o.addMouseWheelListener(
                  t.container,
                  this.onMouseWheel.bind(this, 'mousewheel')
                ),
                o.addTouchMoveListener(
                  t.container,
                  this.onTouchMove.bind(this, 'touchmove')
                )
              var d = t.renderer.$gutter
              o.addListener(
                d,
                'mousedown',
                this.onMouseEvent.bind(this, 'guttermousedown')
              ),
                o.addListener(
                  d,
                  'click',
                  this.onMouseEvent.bind(this, 'gutterclick')
                ),
                o.addListener(
                  d,
                  'dblclick',
                  this.onMouseEvent.bind(this, 'gutterdblclick')
                ),
                o.addListener(
                  d,
                  'mousemove',
                  this.onMouseEvent.bind(this, 'guttermousemove')
                ),
                o.addListener(l, 'mousedown', e),
                o.addListener(d, 'mousedown', e),
                n.isIE &&
                  t.renderer.scrollBarV &&
                  (o.addListener(t.renderer.scrollBarV.element, 'mousedown', e),
                  o.addListener(t.renderer.scrollBarH.element, 'mousedown', e)),
                t.on('mousemove', function(o) {
                  if (!(i.state || i.$dragDelay || !i.$dragEnabled)) {
                    var e = t.renderer.screenToTextCoordinates(o.x, o.y),
                      n = t.session.selection.getRange(),
                      r = t.renderer
                    !n.isEmpty() && n.insideStart(e.row, e.column)
                      ? r.setCursorStyle('default')
                      : r.setCursorStyle('')
                  }
                })
            }
          ;(function() {
            ;(this.onMouseEvent = function(t, o) {
              this.editor._emit(t, new i(o, this.editor))
            }),
              (this.onMouseMove = function(t, o) {
                var e =
                  this.editor._eventRegistry &&
                  this.editor._eventRegistry.mousemove
                e && e.length && this.editor._emit(t, new i(o, this.editor))
              }),
              (this.onMouseWheel = function(t, o) {
                var e = new i(o, this.editor)
                ;(e.speed = 2 * this.$scrollSpeed),
                  (e.wheelX = o.wheelX),
                  (e.wheelY = o.wheelY),
                  this.editor._emit(t, e)
              }),
              (this.onTouchMove = function(t, o) {
                var e = new i(o, this.editor)
                ;(e.speed = 1),
                  (e.wheelX = o.wheelX),
                  (e.wheelY = o.wheelY),
                  this.editor._emit(t, e)
              }),
              (this.setState = function(e) {
                this.state = e
              }),
              (this.captureMouse = function(e, t) {
                ;(this.x = e.x), (this.y = e.y), (this.isMousePressed = !0)
                var r = this.editor.renderer
                r.$keepTextAreaAtCursor && (r.$keepTextAreaAtCursor = null)
                var a = this,
                  s = function(o) {
                    return o
                      ? n.isWebKit && !o.which && a.releaseMouse
                        ? a.releaseMouse()
                        : void ((a.x = o.clientX),
                          (a.y = o.clientY),
                          t && t(o),
                          (a.mouseEvent = new i(o, a.editor)),
                          (a.$mouseMoved = !0))
                      : void 0
                  },
                  l = function(t) {
                    clearInterval(c),
                      d(),
                      a[a.state + 'End'] && a[a.state + 'End'](t),
                      (a.state = ''),
                      null == r.$keepTextAreaAtCursor &&
                        ((r.$keepTextAreaAtCursor = !0),
                        r.$moveTextAreaToCursor()),
                      (a.isMousePressed = !1),
                      (a.$onCaptureMouseMove = a.releaseMouse = null),
                      t && a.onMouseEvent('mouseup', t)
                  },
                  d = function() {
                    a[a.state] && a[a.state](), (a.$mouseMoved = !1)
                  }
                if (n.isOldIE && 'dblclick' == e.domEvent.type)
                  return setTimeout(function() {
                    l(e)
                  })
                ;(a.$onCaptureMouseMove = s),
                  (a.releaseMouse = o.capture(this.editor.container, s, l))
                var c = setInterval(d, 20)
              }),
              (this.releaseMouse = null),
              (this.cancelContextMenu = function() {
                var t = function(n) {
                  ;(n && n.domEvent && 'contextmenu' != n.domEvent.type) ||
                    (this.editor.off('nativecontextmenu', t),
                    n && n.domEvent && o.stopEvent(n.domEvent))
                }.bind(this)
                setTimeout(t, 10), this.editor.on('nativecontextmenu', t)
              })
          }.call(d.prototype),
            l.defineOptions(d.prototype, 'mouseHandler', {
              scrollSpeed: { initialValue: 2 },
              dragDelay: { initialValue: n.isMac ? 150 : 0 },
              dragEnabled: { initialValue: !0 },
              focusTimout: { initialValue: 0 },
              tooltipFollowsMouse: { initialValue: !0 }
            }),
            (t.MouseHandler = d))
        }
      ),
      ace.define(
        'ace/mouse/fold_handler',
        ['require', 'exports', 'module'],
        function(e, t) {
          'use strict'
          t.FoldHandler = function(t) {
            t.on('click', function(o) {
              var e = o.getDocumentPosition(),
                n = t.session,
                r = n.getFoldAt(e.row, e.column, 1)
              r &&
                (o.getAccelKey() ? n.removeFold(r) : n.expandFold(r), o.stop())
            }),
              t.on('gutterclick', function(o) {
                var e = t.renderer.$gutterLayer.getRegion(o)
                if ('foldWidgets' == e) {
                  var n = o.getDocumentPosition().row,
                    r = t.session
                  r.foldWidgets &&
                    r.foldWidgets[n] &&
                    t.session.onFoldWidgetClick(n, o),
                    t.isFocused() || t.focus(),
                    o.stop()
                }
              }),
              t.on('gutterdblclick', function(o) {
                var e = t.renderer.$gutterLayer.getRegion(o)
                if ('foldWidgets' == e) {
                  var n = o.getDocumentPosition().row,
                    r = t.session,
                    a = r.getParentFoldRangeData(n, !0),
                    i = a.range || a.firstRange
                  if (i) {
                    n = i.start.row
                    var s = r.getFoldAt(n, r.getLine(n).length, 1)
                    s
                      ? r.removeFold(s)
                      : (r.addFold('...', i),
                        t.renderer.scrollCursorIntoView({
                          row: i.start.row,
                          column: 0
                        }))
                  }
                  o.stop()
                }
              })
          }
        }
      ),
      ace.define(
        'ace/keyboard/keybinding',
        ['require', 'exports', 'module', 'ace/lib/keys', 'ace/lib/event'],
        function(e, t) {
          'use strict'
          var o = e('../lib/keys'),
            n = e('../lib/event'),
            r = function(e) {
              ;(this.$editor = e),
                (this.$data = { editor: e }),
                (this.$handlers = []),
                this.setDefaultHandler(e.commands)
            }
          ;(function() {
            ;(this.setDefaultHandler = function(e) {
              this.removeKeyboardHandler(this.$defaultHandler),
                (this.$defaultHandler = e),
                this.addKeyboardHandler(e, 0)
            }),
              (this.setKeyboardHandler = function(e) {
                var t = this.$handlers
                if (t[t.length - 1] != e) {
                  for (
                    ;
                    t[t.length - 1] && t[t.length - 1] != this.$defaultHandler;

                  )
                    this.removeKeyboardHandler(t[t.length - 1])
                  this.addKeyboardHandler(e, 1)
                }
              }),
              (this.addKeyboardHandler = function(e, t) {
                if (e) {
                  'function' != typeof e ||
                    e.handleKeyboard ||
                    (e.handleKeyboard = e)
                  var o = this.$handlers.indexOf(e)
                  ;-1 != o && this.$handlers.splice(o, 1),
                    void 0 == t
                      ? this.$handlers.push(e)
                      : this.$handlers.splice(t, 0, e),
                    -1 == o && e.attach && e.attach(this.$editor)
                }
              }),
              (this.removeKeyboardHandler = function(e) {
                var t = this.$handlers.indexOf(e)
                return (
                  -1 != t &&
                  (this.$handlers.splice(t, 1),
                  e.detach && e.detach(this.$editor),
                  !0)
                )
              }),
              (this.getKeyboardHandler = function() {
                return this.$handlers[this.$handlers.length - 1]
              }),
              (this.getStatusText = function() {
                var e = this.$data,
                  t = e.editor
                return this.$handlers
                  .map(function(o) {
                    return (o.getStatusText && o.getStatusText(t, e)) || ''
                  })
                  .filter(Boolean)
                  .join(' ')
              }),
              (this.$callKeyboardHandlers = function(t, o, r, a) {
                for (
                  var e = !1,
                    s = this.$editor.commands,
                    l = this.$handlers.length,
                    i;
                  l-- &&
                  ((i = this.$handlers[l].handleKeyboard(
                    this.$data,
                    t,
                    o,
                    r,
                    a
                  )),
                  !(
                    i &&
                    i.command &&
                    ((e =
                      'null' == i.command ||
                      s.exec(i.command, this.$editor, i.args, a)),
                    e &&
                      a &&
                      -1 != t &&
                      !0 != i.passEvent &&
                      !0 != i.command.passEvent &&
                      n.stopEvent(a),
                    e)
                  ));

                );
                return (
                  e ||
                    -1 != t ||
                    ((i = { command: 'insertstring' }),
                    (e = s.exec('insertstring', this.$editor, o))),
                  e &&
                    this.$editor._signal &&
                    this.$editor._signal('keyboardActivity', i),
                  e
                )
              }),
              (this.onCommandKey = function(t, e, n) {
                var r = o.keyCodeToString(n)
                this.$callKeyboardHandlers(e, r, n, t)
              }),
              (this.onTextInput = function(e) {
                this.$callKeyboardHandlers(-1, e)
              })
          }.call(r.prototype),
            (t.KeyBinding = r))
        }
      ),
      ace.define('ace/range', ['require', 'exports', 'module'], function(e, t) {
        'use strict'
        var o = function(e, t, o, n) {
          ;(this.start = { row: e, column: t }),
            (this.end = { row: o, column: n })
        }
        ;(function() {
          ;(this.isEqual = function(e) {
            return (
              this.start.row === e.start.row &&
              this.end.row === e.end.row &&
              this.start.column === e.start.column &&
              this.end.column === e.end.column
            )
          }),
            (this.toString = function() {
              return (
                'Range: [' +
                this.start.row +
                '/' +
                this.start.column +
                '] -> [' +
                this.end.row +
                '/' +
                this.end.column +
                ']'
              )
            }),
            (this.contains = function(e, t) {
              return 0 == this.compare(e, t)
            }),
            (this.compareRange = function(e) {
              var t = e.end,
                o = e.start,
                n
              return (
                (n = this.compare(t.row, t.column)),
                1 == n
                  ? ((n = this.compare(o.row, o.column)),
                    1 == n ? 2 : 0 == n ? 1 : 0)
                  : -1 == n
                    ? -2
                    : ((n = this.compare(o.row, o.column)),
                      -1 == n ? -1 : 1 == n ? 42 : 0)
              )
            }),
            (this.comparePoint = function(e) {
              return this.compare(e.row, e.column)
            }),
            (this.containsRange = function(e) {
              return (
                0 == this.comparePoint(e.start) && 0 == this.comparePoint(e.end)
              )
            }),
            (this.intersects = function(e) {
              var t = this.compareRange(e)
              return -1 == t || 0 == t || 1 == t
            }),
            (this.isEnd = function(e, t) {
              return this.end.row == e && this.end.column == t
            }),
            (this.isStart = function(e, t) {
              return this.start.row == e && this.start.column == t
            }),
            (this.setStart = function(e, t) {
              'object' == typeof e
                ? ((this.start.column = e.column), (this.start.row = e.row))
                : ((this.start.row = e), (this.start.column = t))
            }),
            (this.setEnd = function(e, t) {
              'object' == typeof e
                ? ((this.end.column = e.column), (this.end.row = e.row))
                : ((this.end.row = e), (this.end.column = t))
            }),
            (this.inside = function(e, t) {
              return (
                !(0 != this.compare(e, t)) &&
                (this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0)
              )
            }),
            (this.insideStart = function(e, t) {
              return !(0 != this.compare(e, t)) && !this.isEnd(e, t)
            }),
            (this.insideEnd = function(e, t) {
              return !(0 != this.compare(e, t)) && !this.isStart(e, t)
            }),
            (this.compare = function(e, t) {
              return this.isMultiLine() || e !== this.start.row
                ? e < this.start.row
                  ? -1
                  : e > this.end.row
                    ? 1
                    : this.start.row === e
                      ? t >= this.start.column
                        ? 0
                        : -1
                      : this.end.row === e
                        ? t <= this.end.column
                          ? 0
                          : 1
                        : 0
                : t < this.start.column
                  ? -1
                  : t > this.end.column
                    ? 1
                    : 0
            }),
            (this.compareStart = function(e, t) {
              return this.start.row == e && this.start.column == t
                ? -1
                : this.compare(e, t)
            }),
            (this.compareEnd = function(e, t) {
              return this.end.row == e && this.end.column == t
                ? 1
                : this.compare(e, t)
            }),
            (this.compareInside = function(e, t) {
              return this.end.row == e && this.end.column == t
                ? 1
                : this.start.row == e && this.start.column == t
                  ? -1
                  : this.compare(e, t)
            }),
            (this.clipRows = function(e, t) {
              if (this.end.row > t) var n = { row: t + 1, column: 0 }
              else if (this.end.row < e) var n = { row: e, column: 0 }
              if (this.start.row > t) var r = { row: t + 1, column: 0 }
              else if (this.start.row < e) var r = { row: e, column: 0 }
              return o.fromPoints(r || this.start, n || this.end)
            }),
            (this.extend = function(e, t) {
              var n = this.compare(e, t)
              if (0 == n) return this
              if (-1 == n) var r = { row: e, column: t }
              else var a = { row: e, column: t }
              return o.fromPoints(r || this.start, a || this.end)
            }),
            (this.isEmpty = function() {
              return (
                this.start.row === this.end.row &&
                this.start.column === this.end.column
              )
            }),
            (this.isMultiLine = function() {
              return this.start.row !== this.end.row
            }),
            (this.clone = function() {
              return o.fromPoints(this.start, this.end)
            }),
            (this.collapseRows = function() {
              return 0 == this.end.column
                ? new o(
                    this.start.row,
                    0,
                    p(this.start.row, this.end.row - 1),
                    0
                  )
                : new o(this.start.row, 0, this.end.row, 0)
            }),
            (this.toScreenRange = function(e) {
              var t = e.documentToScreenPosition(this.start),
                n = e.documentToScreenPosition(this.end)
              return new o(t.row, t.column, n.row, n.column)
            }),
            (this.moveBy = function(e, t) {
              ;(this.start.row += e),
                (this.start.column += t),
                (this.end.row += e),
                (this.end.column += t)
            })
        }.call(o.prototype),
          (o.fromPoints = function(e, t) {
            return new o(e.row, e.column, t.row, t.column)
          }),
          (o.comparePoints = function(e, t) {
            return e.row - t.row || e.column - t.column
          }),
          (o.comparePoints = function(e, t) {
            return e.row - t.row || e.column - t.column
          }),
          (t.Range = o))
      }),
      ace.define(
        'ace/selection',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/lang',
          'ace/lib/event_emitter',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            n = e('./lib/lang'),
            r = e('./lib/event_emitter').EventEmitter,
            a = e('./range').Range,
            i = function(e) {
              ;(this.session = e),
                (this.doc = e.getDocument()),
                this.clearSelection(),
                (this.lead = this.selectionLead = this.doc.createAnchor(0, 0)),
                (this.anchor = this.selectionAnchor = this.doc.createAnchor(
                  0,
                  0
                ))
              var t = this
              this.lead.on('change', function(o) {
                t._emit('changeCursor'),
                  t.$isEmpty || t._emit('changeSelection'),
                  t.$keepDesiredColumnOnChange ||
                    o.old.column == o.value.column ||
                    (t.$desiredColumn = null)
              }),
                this.selectionAnchor.on('change', function() {
                  t.$isEmpty || t._emit('changeSelection')
                })
            }
          ;(function() {
            o.implement(this, r),
              (this.isEmpty = function() {
                return (
                  this.$isEmpty ||
                  (this.anchor.row == this.lead.row &&
                    this.anchor.column == this.lead.column)
                )
              }),
              (this.isMultiLine = function() {
                return !this.isEmpty() && this.getRange().isMultiLine()
              }),
              (this.getCursor = function() {
                return this.lead.getPosition()
              }),
              (this.setSelectionAnchor = function(e, t) {
                this.anchor.setPosition(e, t),
                  this.$isEmpty &&
                    ((this.$isEmpty = !1), this._emit('changeSelection'))
              }),
              (this.getSelectionAnchor = function() {
                return this.$isEmpty
                  ? this.getSelectionLead()
                  : this.anchor.getPosition()
              }),
              (this.getSelectionLead = function() {
                return this.lead.getPosition()
              }),
              (this.shiftSelection = function(e) {
                if (this.$isEmpty)
                  return void this.moveCursorTo(
                    this.lead.row,
                    this.lead.column + e
                  )
                var t = this.getSelectionAnchor(),
                  o = this.getSelectionLead(),
                  n = this.isBackwards()
                ;(n && 0 === t.column) ||
                  this.setSelectionAnchor(t.row, t.column + e),
                  (n || 0 !== o.column) &&
                    this.$moveSelection(function() {
                      this.moveCursorTo(o.row, o.column + e)
                    })
              }),
              (this.isBackwards = function() {
                var e = this.anchor,
                  t = this.lead
                return e.row > t.row || (e.row == t.row && e.column > t.column)
              }),
              (this.getRange = function() {
                var e = this.anchor,
                  t = this.lead
                return this.isEmpty()
                  ? a.fromPoints(t, t)
                  : this.isBackwards()
                    ? a.fromPoints(t, e)
                    : a.fromPoints(e, t)
              }),
              (this.clearSelection = function() {
                this.$isEmpty ||
                  ((this.$isEmpty = !0), this._emit('changeSelection'))
              }),
              (this.selectAll = function() {
                var e = this.doc.getLength() - 1
                this.setSelectionAnchor(0, 0),
                  this.moveCursorTo(e, this.doc.getLine(e).length)
              }),
              (this.setRange = this.setSelectionRange = function(e, t) {
                t
                  ? (this.setSelectionAnchor(e.end.row, e.end.column),
                    this.selectTo(e.start.row, e.start.column))
                  : (this.setSelectionAnchor(e.start.row, e.start.column),
                    this.selectTo(e.end.row, e.end.column)),
                  this.getRange().isEmpty() && (this.$isEmpty = !0),
                  (this.$desiredColumn = null)
              }),
              (this.$moveSelection = function(e) {
                var t = this.lead
                this.$isEmpty && this.setSelectionAnchor(t.row, t.column),
                  e.call(this)
              }),
              (this.selectTo = function(e, t) {
                this.$moveSelection(function() {
                  this.moveCursorTo(e, t)
                })
              }),
              (this.selectToPosition = function(e) {
                this.$moveSelection(function() {
                  this.moveCursorToPosition(e)
                })
              }),
              (this.moveTo = function(e, t) {
                this.clearSelection(), this.moveCursorTo(e, t)
              }),
              (this.moveToPosition = function(e) {
                this.clearSelection(), this.moveCursorToPosition(e)
              }),
              (this.selectUp = function() {
                this.$moveSelection(this.moveCursorUp)
              }),
              (this.selectDown = function() {
                this.$moveSelection(this.moveCursorDown)
              }),
              (this.selectRight = function() {
                this.$moveSelection(this.moveCursorRight)
              }),
              (this.selectLeft = function() {
                this.$moveSelection(this.moveCursorLeft)
              }),
              (this.selectLineStart = function() {
                this.$moveSelection(this.moveCursorLineStart)
              }),
              (this.selectLineEnd = function() {
                this.$moveSelection(this.moveCursorLineEnd)
              }),
              (this.selectFileEnd = function() {
                this.$moveSelection(this.moveCursorFileEnd)
              }),
              (this.selectFileStart = function() {
                this.$moveSelection(this.moveCursorFileStart)
              }),
              (this.selectWordRight = function() {
                this.$moveSelection(this.moveCursorWordRight)
              }),
              (this.selectWordLeft = function() {
                this.$moveSelection(this.moveCursorWordLeft)
              }),
              (this.getWordRange = function(e, t) {
                if ('undefined' == typeof t) {
                  var o = e || this.lead
                  ;(e = o.row), (t = o.column)
                }
                return this.session.getWordRange(e, t)
              }),
              (this.selectWord = function() {
                this.setSelectionRange(this.getWordRange())
              }),
              (this.selectAWord = function() {
                var e = this.getCursor(),
                  t = this.session.getAWordRange(e.row, e.column)
                this.setSelectionRange(t)
              }),
              (this.getLineRange = function(e, t) {
                var o = 'number' == typeof e ? e : this.lead.row,
                  n = this.session.getFoldLine(o),
                  r
                return (
                  n ? ((o = n.start.row), (r = n.end.row)) : (r = o),
                  !0 === t
                    ? new a(o, 0, r, this.session.getLine(r).length)
                    : new a(o, 0, r + 1, 0)
                )
              }),
              (this.selectLine = function() {
                this.setSelectionRange(this.getLineRange())
              }),
              (this.moveCursorUp = function() {
                this.moveCursorBy(-1, 0)
              }),
              (this.moveCursorDown = function() {
                this.moveCursorBy(1, 0)
              }),
              (this.moveCursorLeft = function() {
                var e = this.lead.getPosition(),
                  t
                if ((t = this.session.getFoldAt(e.row, e.column, -1)))
                  this.moveCursorTo(t.start.row, t.start.column)
                else if (0 === e.column)
                  0 < e.row &&
                    this.moveCursorTo(
                      e.row - 1,
                      this.doc.getLine(e.row - 1).length
                    )
                else {
                  var o = this.session.getTabSize()
                  this.session.isTabStop(e) &&
                  this.doc
                    .getLine(e.row)
                    .slice(e.column - o, e.column)
                    .split(' ').length -
                    1 ==
                    o
                    ? this.moveCursorBy(0, -o)
                    : this.moveCursorBy(0, -1)
                }
              }),
              (this.moveCursorRight = function() {
                var e = this.lead.getPosition(),
                  t
                if ((t = this.session.getFoldAt(e.row, e.column, 1)))
                  this.moveCursorTo(t.end.row, t.end.column)
                else if (
                  this.lead.column == this.doc.getLine(this.lead.row).length
                )
                  this.lead.row < this.doc.getLength() - 1 &&
                    this.moveCursorTo(this.lead.row + 1, 0)
                else {
                  var o = this.session.getTabSize(),
                    e = this.lead
                  this.session.isTabStop(e) &&
                  this.doc
                    .getLine(e.row)
                    .slice(e.column, e.column + o)
                    .split(' ').length -
                    1 ==
                    o
                    ? this.moveCursorBy(0, o)
                    : this.moveCursorBy(0, 1)
                }
              }),
              (this.moveCursorLineStart = function() {
                var e = this.lead.row,
                  t = this.lead.column,
                  o = this.session.documentToScreenRow(e, t),
                  n = this.session.screenToDocumentPosition(o, 0),
                  r = this.session.getDisplayLine(e, null, n.row, n.column),
                  a = r.match(/^\s*/)
                a[0].length == t ||
                  this.session.$useEmacsStyleLineStart ||
                  (n.column += a[0].length),
                  this.moveCursorToPosition(n)
              }),
              (this.moveCursorLineEnd = function() {
                var e = this.lead,
                  t = this.session.getDocumentLastRowColumnPosition(
                    e.row,
                    e.column
                  )
                if (this.lead.column == t.column) {
                  var o = this.session.getLine(t.row)
                  if (t.column == o.length) {
                    var n = o.search(/\s+$/)
                    0 < n && (t.column = n)
                  }
                }
                this.moveCursorTo(t.row, t.column)
              }),
              (this.moveCursorFileEnd = function() {
                var e = this.doc.getLength() - 1,
                  t = this.doc.getLine(e).length
                this.moveCursorTo(e, t)
              }),
              (this.moveCursorFileStart = function() {
                this.moveCursorTo(0, 0)
              }),
              (this.moveCursorLongWordRight = function() {
                var e = this.lead.row,
                  t = this.lead.column,
                  o = this.doc.getLine(e),
                  n = o.substring(t),
                  r
                ;(this.session.nonTokenRe.lastIndex = 0),
                  (this.session.tokenRe.lastIndex = 0)
                var a = this.session.getFoldAt(e, t, 1)
                return a
                  ? void this.moveCursorTo(a.end.row, a.end.column)
                  : ((r = this.session.nonTokenRe.exec(n)) &&
                      ((t += this.session.nonTokenRe.lastIndex),
                      (this.session.nonTokenRe.lastIndex = 0),
                      (n = o.substring(t))),
                    t >= o.length
                      ? (this.moveCursorTo(e, o.length),
                        this.moveCursorRight(),
                        void (
                          e < this.doc.getLength() - 1 &&
                          this.moveCursorWordRight()
                        ))
                      : void ((r = this.session.tokenRe.exec(n)) &&
                          ((t += this.session.tokenRe.lastIndex),
                          (this.session.tokenRe.lastIndex = 0)),
                        this.moveCursorTo(e, t)))
              }),
              (this.moveCursorLongWordLeft = function() {
                var e = this.lead.row,
                  t = this.lead.column,
                  o
                if ((o = this.session.getFoldAt(e, t, -1)))
                  return void this.moveCursorTo(o.start.row, o.start.column)
                var r = this.session.getFoldStringAt(e, t, -1)
                null == r && (r = this.doc.getLine(e).substring(0, t))
                var a = n.stringReverse(r),
                  i
                return (
                  (this.session.nonTokenRe.lastIndex = 0),
                  (this.session.tokenRe.lastIndex = 0),
                  (i = this.session.nonTokenRe.exec(a)) &&
                    ((t -= this.session.nonTokenRe.lastIndex),
                    (a = a.slice(this.session.nonTokenRe.lastIndex)),
                    (this.session.nonTokenRe.lastIndex = 0)),
                  0 >= t
                    ? (this.moveCursorTo(e, 0),
                      this.moveCursorLeft(),
                      void (0 < e && this.moveCursorWordLeft()))
                    : void ((i = this.session.tokenRe.exec(a)) &&
                        ((t -= this.session.tokenRe.lastIndex),
                        (this.session.tokenRe.lastIndex = 0)),
                      this.moveCursorTo(e, t))
                )
              }),
              (this.$shortWordEndIndex = function(e) {
                var t = 0,
                  o = /\s/,
                  n = this.session.tokenRe,
                  r,
                  a
                if (((n.lastIndex = 0), (r = this.session.tokenRe.exec(e))))
                  t = this.session.tokenRe.lastIndex
                else {
                  for (; (a = e[t]) && o.test(a); ) t++
                  if (1 > t)
                    for (n.lastIndex = 0; (a = e[t]) && !n.test(a); )
                      if (((n.lastIndex = 0), t++, o.test(a)))
                        if (2 < t) {
                          t--
                          break
                        } else {
                          for (; (a = e[t]) && o.test(a); ) t++
                          if (2 < t) break
                        }
                }
                return (n.lastIndex = 0), t
              }),
              (this.moveCursorShortWordRight = function() {
                var e = this.lead.row,
                  t = this.lead.column,
                  o = this.doc.getLine(e),
                  n = o.substring(t),
                  r = this.session.getFoldAt(e, t, 1)
                if (r) return this.moveCursorTo(r.end.row, r.end.column)
                if (t == o.length) {
                  var a = this.doc.getLength()
                  do e++, (n = this.doc.getLine(e))
                  while (e < a && /^\s*$/.test(n))
                  ;/^\s+/.test(n) || (n = ''), (t = 0)
                }
                var i = this.$shortWordEndIndex(n)
                this.moveCursorTo(e, t + i)
              }),
              (this.moveCursorShortWordLeft = function() {
                var e = this.lead.row,
                  t = this.lead.column,
                  o
                if ((o = this.session.getFoldAt(e, t, -1)))
                  return this.moveCursorTo(o.start.row, o.start.column)
                var r = this.session.getLine(e).substring(0, t)
                if (0 === t) {
                  do e--, (r = this.doc.getLine(e))
                  while (0 < e && /^\s*$/.test(r))
                  ;(t = r.length), /\s+$/.test(r) || (r = '')
                }
                var a = n.stringReverse(r),
                  i = this.$shortWordEndIndex(a)
                return this.moveCursorTo(e, t - i)
              }),
              (this.moveCursorWordRight = function() {
                this.session.$selectLongWords
                  ? this.moveCursorLongWordRight()
                  : this.moveCursorShortWordRight()
              }),
              (this.moveCursorWordLeft = function() {
                this.session.$selectLongWords
                  ? this.moveCursorLongWordLeft()
                  : this.moveCursorShortWordLeft()
              }),
              (this.moveCursorBy = function(e, t) {
                var o = this.session.documentToScreenPosition(
                  this.lead.row,
                  this.lead.column
                )
                0 === t &&
                  (this.$desiredColumn
                    ? (o.column = this.$desiredColumn)
                    : (this.$desiredColumn = o.column))
                var n = this.session.screenToDocumentPosition(
                  o.row + e,
                  o.column
                )
                0 !== e &&
                  0 === t &&
                  n.row === this.lead.row &&
                  n.column === this.lead.column &&
                  this.session.lineWidgets &&
                  this.session.lineWidgets[n.row] &&
                  (0 < n.row || 0 < e) &&
                  n.row++,
                  this.moveCursorTo(n.row, n.column + t, 0 === t)
              }),
              (this.moveCursorToPosition = function(e) {
                this.moveCursorTo(e.row, e.column)
              }),
              (this.moveCursorTo = function(e, t, o) {
                var n = this.session.getFoldAt(e, t, 1)
                n && ((e = n.start.row), (t = n.start.column)),
                  (this.$keepDesiredColumnOnChange = !0),
                  this.lead.setPosition(e, t),
                  (this.$keepDesiredColumnOnChange = !1),
                  o || (this.$desiredColumn = null)
              }),
              (this.moveCursorToScreen = function(e, t, o) {
                var n = this.session.screenToDocumentPosition(e, t)
                this.moveCursorTo(n.row, n.column, o)
              }),
              (this.detach = function() {
                this.lead.detach(),
                  this.anchor.detach(),
                  (this.session = this.doc = null)
              }),
              (this.fromOrientedRange = function(e) {
                this.setSelectionRange(e, e.cursor == e.start),
                  (this.$desiredColumn = e.desiredColumn || this.$desiredColumn)
              }),
              (this.toOrientedRange = function(e) {
                var t = this.getRange()
                return (
                  e
                    ? ((e.start.column = t.start.column),
                      (e.start.row = t.start.row),
                      (e.end.column = t.end.column),
                      (e.end.row = t.end.row))
                    : (e = t),
                  (e.cursor = this.isBackwards() ? e.start : e.end),
                  (e.desiredColumn = this.$desiredColumn),
                  e
                )
              }),
              (this.getRangeOfMovements = function(e) {
                var t = this.getCursor()
                try {
                  e(this)
                  var o = this.getCursor()
                  return a.fromPoints(t, o)
                } catch (o) {
                  return a.fromPoints(t, t)
                } finally {
                  this.moveCursorToPosition(t)
                }
              }),
              (this.toJSON = function() {
                if (this.rangeCount)
                  var e = this.ranges.map(function(e) {
                    var t = e.clone()
                    return (t.isBackwards = e.cursor == e.start), t
                  })
                else {
                  var e = this.getRange()
                  e.isBackwards = this.isBackwards()
                }
                return e
              }),
              (this.fromJSON = function(e) {
                if (e.start == void 0) {
                  if (this.rangeList) {
                    this.toSingleRange(e[0])
                    for (var t = e.length, o; t--; )
                      (o = a.fromPoints(e[t].start, e[t].end)),
                        e[t].isBackwards && (o.cursor = o.start),
                        this.addRange(o, !0)
                    return
                  }
                  e = e[0]
                }
                this.rangeList && this.toSingleRange(e),
                  this.setSelectionRange(e, e.isBackwards)
              }),
              (this.isEqual = function(e) {
                if (
                  (e.length || this.rangeCount) &&
                  e.length != this.rangeCount
                )
                  return !1
                if (!e.length || !this.ranges) return this.getRange().isEqual(e)
                for (var t = this.ranges.length; t--; )
                  if (!this.ranges[t].isEqual(e[t])) return !1
                return !0
              })
          }.call(i.prototype),
            (t.Selection = i))
        }
      ),
      ace.define(
        'ace/tokenizer',
        ['require', 'exports', 'module', 'ace/config'],
        function(e, t) {
          'use strict'
          var o = e('./config'),
            n = 2e3,
            r = function(e) {
              for (var t in ((this.states = e),
              (this.regExps = {}),
              (this.matchMappings = {}),
              this.states)) {
                for (
                  var o = this.states[t],
                    n = [],
                    r = 0,
                    a = (this.matchMappings[t] = { defaultToken: 'text' }),
                    s = 'g',
                    l = [],
                    d = 0,
                    i;
                  d < o.length;
                  d++
                )
                  if (
                    ((i = o[d]),
                    i.defaultToken && (a.defaultToken = i.defaultToken),
                    i.caseInsensitive && (s = 'gi'),
                    null != i.regex)
                  ) {
                    i.regex instanceof RegExp &&
                      (i.regex = i.regex.toString().slice(1, -1))
                    var c = i.regex,
                      u = new RegExp('(?:(' + c + ')|(.))').exec('a').length - 2
                    Array.isArray(i.token)
                      ? 1 == i.token.length || 1 == u
                        ? (i.token = i.token[0])
                        : u - 1 == i.token.length
                          ? ((i.tokenArray = i.token),
                            (i.token = null),
                            (i.onMatch = this.$arrayTokens))
                          : (this.reportError(
                              "number of classes and regexp groups doesn't match",
                              { rule: i, groupCount: u - 1 }
                            ),
                            (i.token = i.token[0]))
                      : 'function' == typeof i.token &&
                        !i.onMatch &&
                        (1 < u
                          ? (i.onMatch = this.$applyToken)
                          : (i.onMatch = i.token)),
                      1 < u &&
                        (/\\\d/.test(i.regex)
                          ? (c = i.regex.replace(/\\([0-9]+)/g, function(e, t) {
                              return '\\' + (parseInt(t, 10) + r + 1)
                            }))
                          : ((u = 1),
                            (c = this.removeCapturingGroups(i.regex))),
                        !i.splitRegex &&
                          'string' != typeof i.token &&
                          l.push(i)),
                      (a[r] = d),
                      (r += u),
                      n.push(c),
                      i.onMatch || (i.onMatch = null)
                  }
                n.length || ((a[0] = 0), n.push('$')),
                  l.forEach(function(e) {
                    e.splitRegex = this.createSplitterRegexp(e.regex, s)
                  }, this),
                  (this.regExps[t] = new RegExp(
                    '(' + n.join(')|(') + ')|($)',
                    s
                  ))
              }
            }
          ;(function() {
            ;(this.$setMaxTokenCount = function(e) {
              n = 0 | e
            }),
              (this.$applyToken = function(e) {
                var t = this.splitRegex.exec(e).slice(1),
                  o = this.token.apply(this, t)
                if ('string' == typeof o) return [{ type: o, value: e }]
                for (var n = [], r = 0, a = o.length; r < a; r++)
                  t[r] && (n[n.length] = { type: o[r], value: t[r] })
                return n
              }),
              (this.$arrayTokens = function(e) {
                if (!e) return []
                var t = this.splitRegex.exec(e)
                if (!t) return 'text'
                for (
                  var o = [], n = this.tokenArray, r = 0, a = n.length;
                  r < a;
                  r++
                )
                  t[r + 1] && (o[o.length] = { type: n[r], value: t[r + 1] })
                return o
              }),
              (this.removeCapturingGroups = function(e) {
                var t = e.replace(
                  /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
                  function(e, t) {
                    return t ? '(?:' : e
                  }
                )
                return t
              }),
              (this.createSplitterRegexp = function(e, t) {
                if (-1 != e.indexOf('(?=')) {
                  var o = 0,
                    n = !1,
                    r = {}
                  e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function(
                    e,
                    t,
                    a,
                    i,
                    s,
                    l
                  ) {
                    return (
                      n
                        ? (n = ']' != s)
                        : s
                          ? (n = !0)
                          : i
                            ? (o == r.stack &&
                                ((r.end = l + 1), (r.stack = -1)),
                              o--)
                            : a &&
                              (o++,
                              1 != a.length && ((r.stack = o), (r.start = l))),
                      e
                    )
                  }),
                    null != r.end &&
                      /^\)*$/.test(e.substr(r.end)) &&
                      (e = e.substring(0, r.start) + e.substr(r.end))
                }
                return (
                  '^' != e.charAt(0) && (e = '^' + e),
                  '$' != e.charAt(e.length - 1) && (e += '$'),
                  new RegExp(e, (t || '').replace('g', ''))
                )
              }),
              (this.getLineTokens = function(e, t) {
                if (t && 'string' != typeof t) {
                  var o = t.slice(0)
                  ;(t = o[0]), '#tmp' === t && (o.shift(), (t = o.shift()))
                } else var o = []
                var r = t || 'start',
                  a = this.states[r]
                a || ((r = 'start'), (a = this.states[r]))
                var s = this.matchMappings[r],
                  l = this.regExps[r]
                l.lastIndex = 0
                for (
                  var d = [], c = 0, u = 0, p = { type: null, value: '' }, g;
                  (g = l.exec(e));

                ) {
                  var h = s.defaultToken,
                    m = null,
                    f = g[0],
                    y = l.lastIndex
                  if (y - f.length > c) {
                    var A = e.substring(c, y - f.length)
                    p.type == h
                      ? (p.value += A)
                      : (p.type && d.push(p), (p = { type: h, value: A }))
                  }
                  for (var C = 0; C < g.length - 2; C++)
                    if (void 0 !== g[C + 1]) {
                      ;(m = a[s[C]]),
                        (h = m.onMatch ? m.onMatch(f, r, o) : m.token),
                        m.next &&
                          ((r =
                            'string' == typeof m.next ? m.next : m.next(r, o)),
                          (a = this.states[r]),
                          !a &&
                            (this.reportError("state doesn't exist", r),
                            (r = 'start'),
                            (a = this.states[r])),
                          (s = this.matchMappings[r]),
                          (c = y),
                          (l = this.regExps[r]),
                          (l.lastIndex = y))
                      break
                    }
                  if (f)
                    if ('string' == typeof h)
                      (m && !1 === m.merge) || p.type !== h
                        ? (p.type && d.push(p), (p = { type: h, value: f }))
                        : (p.value += f)
                    else if (h) {
                      p.type && d.push(p), (p = { type: null, value: '' })
                      for (var C = 0; C < h.length; C++) d.push(h[C])
                    }
                  if (c == e.length) break
                  if (((c = y), u++ > n)) {
                    for (
                      u > 2 * e.length &&
                      this.reportError('infinite loop with in ace tokenizer', {
                        startState: t,
                        line: e
                      });
                      c < e.length;

                    )
                      p.type && d.push(p),
                        (p = {
                          value: e.substring(c, (c += 2e3)),
                          type: 'overflow'
                        })
                    ;(r = 'start'), (o = [])
                    break
                  }
                }
                return (
                  p.type && d.push(p),
                  1 < o.length && o[0] !== r && o.unshift('#tmp', r),
                  { tokens: d, state: o.length ? o : r }
                )
              }),
              (this.reportError = o.reportError)
          }.call(r.prototype),
            (t.Tokenizer = r))
        }
      ),
      ace.define(
        'ace/mode/text_highlight_rules',
        ['require', 'exports', 'module', 'ace/lib/lang'],
        function(e, t) {
          'use strict'
          var o = e('../lib/lang'),
            n = function() {
              this.$rules = {
                start: [
                  { token: 'empty_line', regex: '^$' },
                  { defaultToken: 'text' }
                ]
              }
            }
          ;(function() {
            ;(this.addRules = function(e, t) {
              if (!t) {
                for (var o in e) this.$rules[o] = e[o]
                return
              }
              for (var o in e) {
                for (var n = e[o], r = 0, a; r < n.length; r++)
                  (a = n[r]),
                    (a.next || a.onMatch) &&
                      ('string' == typeof a.next &&
                        0 !== a.next.indexOf(t) &&
                        (a.next = t + a.next),
                      a.nextState &&
                        0 !== a.nextState.indexOf(t) &&
                        (a.nextState = t + a.nextState))
                this.$rules[t + o] = n
              }
            }),
              (this.getRules = function() {
                return this.$rules
              }),
              (this.embedRules = function(e, t, n, r, a) {
                var s = 'function' == typeof e ? new e().getRules() : e
                if (r) for (var l = 0; l < r.length; l++) r[l] = t + r[l]
                else for (var i in ((r = []), s)) r.push(t + i)
                if ((this.addRules(s, t), n))
                  for (
                    var d = Array.prototype[a ? 'push' : 'unshift'], l = 0;
                    l < r.length;
                    l++
                  )
                    d.apply(this.$rules[r[l]], o.deepCopy(n))
                this.$embeds || (this.$embeds = []), this.$embeds.push(t)
              }),
              (this.getEmbeds = function() {
                return this.$embeds
              })
            var e = function(e, t) {
                return (
                  ('start' != e || t.length) && t.unshift(this.nextState, e),
                  this.nextState
                )
              },
              t = function(e, t) {
                return t.shift(), t.shift() || 'start'
              }
            ;(this.normalizeRules = function() {
              function o(s) {
                var l = a[s]
                l.processed = !0
                for (var d = 0; d < l.length; d++) {
                  var i = l[d],
                    c = null
                  Array.isArray(i) && ((c = i), (i = {})),
                    !i.regex &&
                      i.start &&
                      ((i.regex = i.start),
                      !i.next && (i.next = []),
                      i.next.push(
                        { defaultToken: i.token },
                        {
                          token: i.token + '.end',
                          regex: i.end || i.start,
                          next: 'pop'
                        }
                      ),
                      (i.token += '.start'),
                      (i.push = !0))
                  var u = i.next || i.push
                  if (u && Array.isArray(u)) {
                    var p = i.stateName
                    p ||
                      ((p = i.token),
                      'string' != typeof p && (p = p[0] || ''),
                      a[p] && (p += n++)),
                      (a[p] = u),
                      (i.next = p),
                      o(p)
                  } else 'pop' == u && (i.next = t)
                  if (
                    (i.push &&
                      ((i.nextState = i.next || i.push),
                      (i.next = e),
                      delete i.push),
                    i.rules)
                  )
                    for (var g in i.rules)
                      a[g]
                        ? a[g].push && a[g].push.apply(a[g], i.rules[g])
                        : (a[g] = i.rules[g])
                  var r =
                    'string' == typeof i
                      ? i
                      : 'string' == typeof i.include
                        ? i.include
                        : ''
                  if ((r && (c = a[r]), c)) {
                    var h = [d, 1].concat(c)
                    i.noEscape &&
                      (h = h.filter(function(e) {
                        return !e.next
                      })),
                      l.splice.apply(l, h),
                      d--
                  }
                  i.keywordMap &&
                    ((i.token = this.createKeywordMapper(
                      i.keywordMap,
                      i.defaultToken || 'text',
                      i.caseInsensitive
                    )),
                    delete i.defaultToken)
                }
              }
              var n = 0,
                a = this.$rules
              Object.keys(a).forEach(o, this)
            }),
              (this.createKeywordMapper = function(e, t, o, n) {
                var r = Object.create(null)
                return (
                  Object.keys(e).forEach(function(t) {
                    var s = e[t]
                    o && (s = s.toLowerCase())
                    for (var a = s.split(n || '|'), l = a.length; l--; )
                      r[a[l]] = t
                  }),
                  Object.getPrototypeOf(r) && (r.__proto__ = null),
                  (this.$keywordList = Object.keys(r)),
                  (e = null),
                  o
                    ? function(e) {
                        return r[e.toLowerCase()] || t
                      }
                    : function(e) {
                        return r[e] || t
                      }
                )
              }),
              (this.getKeywords = function() {
                return this.$keywords
              })
          }.call(n.prototype),
            (t.TextHighlightRules = n))
        }
      ),
      ace.define(
        'ace/mode/behaviour',
        ['require', 'exports', 'module'],
        function(e, t) {
          'use strict'
          var o = function() {
            this.$behaviours = {}
          }
          ;(function() {
            ;(this.add = function(e, t, o) {
              switch (void 0) {
                case this.$behaviours:
                  this.$behaviours = {}
                case this.$behaviours[e]:
                  this.$behaviours[e] = {}
              }
              this.$behaviours[e][t] = o
            }),
              (this.addBehaviours = function(e) {
                for (var t in e) for (var o in e[t]) this.add(t, o, e[t][o])
              }),
              (this.remove = function(e) {
                this.$behaviours &&
                  this.$behaviours[e] &&
                  delete this.$behaviours[e]
              }),
              (this.inherit = function(e, t) {
                if ('function' == typeof e) var o = new e().getBehaviours(t)
                else var o = e.getBehaviours(t)
                this.addBehaviours(o)
              }),
              (this.getBehaviours = function(e) {
                if (!e) return this.$behaviours
                for (var t = {}, o = 0; o < e.length; o++)
                  this.$behaviours[e[o]] && (t[e[o]] = this.$behaviours[e[o]])
                return t
              })
          }.call(o.prototype),
            (t.Behaviour = o))
        }
      ),
      ace.define(
        'ace/token_iterator',
        ['require', 'exports', 'module'],
        function(e, t) {
          'use strict'
          var o = function(e, t, o) {
            ;(this.$session = e),
              (this.$row = t),
              (this.$rowTokens = e.getTokens(t))
            var n = e.getTokenAt(t, o)
            this.$tokenIndex = n ? n.index : -1
          }
          ;(function() {
            ;(this.stepBackward = function() {
              for (this.$tokenIndex -= 1; 0 > this.$tokenIndex; ) {
                if (((this.$row -= 1), 0 > this.$row))
                  return (this.$row = 0), null
                ;(this.$rowTokens = this.$session.getTokens(this.$row)),
                  (this.$tokenIndex = this.$rowTokens.length - 1)
              }
              return this.$rowTokens[this.$tokenIndex]
            }),
              (this.stepForward = function() {
                this.$tokenIndex += 1
                for (var e; this.$tokenIndex >= this.$rowTokens.length; ) {
                  if (
                    ((this.$row += 1),
                    e || (e = this.$session.getLength()),
                    this.$row >= e)
                  )
                    return (this.$row = e - 1), null
                  ;(this.$rowTokens = this.$session.getTokens(this.$row)),
                    (this.$tokenIndex = 0)
                }
                return this.$rowTokens[this.$tokenIndex]
              }),
              (this.getCurrentToken = function() {
                return this.$rowTokens[this.$tokenIndex]
              }),
              (this.getCurrentTokenRow = function() {
                return this.$row
              }),
              (this.getCurrentTokenColumn = function() {
                var e = this.$rowTokens,
                  t = this.$tokenIndex,
                  o = e[t].start
                if (o !== void 0) return o
                for (o = 0; 0 < t; ) (t -= 1), (o += e[t].value.length)
                return o
              }),
              (this.getCurrentTokenPosition = function() {
                return { row: this.$row, column: this.getCurrentTokenColumn() }
              })
          }.call(o.prototype),
            (t.TokenIterator = o))
        }
      ),
      ace.define(
        'ace/mode/behaviour/cstyle',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/mode/behaviour',
          'ace/token_iterator',
          'ace/lib/lang'
        ],
        function(e, t) {
          'use strict'
          var o = e('../../lib/oop'),
            n = e('../behaviour').Behaviour,
            r = e('../../token_iterator').TokenIterator,
            a = e('../../lib/lang'),
            i = ['text', 'paren.rparen', 'punctuation.operator'],
            s = ['text', 'paren.rparen', 'punctuation.operator', 'comment'],
            l = {},
            d = function(e) {
              var t = -1
              return (
                e.multiSelect &&
                  ((t = e.selection.index),
                  l.rangeCount != e.multiSelect.rangeCount &&
                    (l = { rangeCount: e.multiSelect.rangeCount })),
                l[t]
                  ? (p = l[t])
                  : void (p = l[t] = {
                      autoInsertedBrackets: 0,
                      autoInsertedRow: -1,
                      autoInsertedLineEnd: '',
                      maybeInsertedBrackets: 0,
                      maybeInsertedRow: -1,
                      maybeInsertedLineStart: '',
                      maybeInsertedLineEnd: ''
                    })
              )
            },
            c = function(e, t, o, n) {
              var r = e.end.row - e.start.row
              return {
                text: o + t + n,
                selection: [
                  0,
                  e.start.column + 1,
                  r,
                  e.end.column + (r ? 0 : 1)
                ]
              }
            },
            u = function() {
              this.add('braces', 'insertion', function(e, t, o, n, r) {
                var i = o.getCursorPosition(),
                  s = n.doc.getLine(i.row)
                if ('{' == r) {
                  d(o)
                  var l = o.getSelectionRange(),
                    g = n.doc.getTextRange(l)
                  if ('' !== g && '{' !== g && o.getWrapBehavioursEnabled())
                    return c(l, g, '{', '}')
                  if (u.isSaneInsertion(o, n))
                    return /[\]\}\)]/.test(s[i.column]) || o.inMultiSelectMode
                      ? (u.recordAutoInsert(o, n, '}'),
                        { text: '{}', selection: [1, 1] })
                      : (u.recordMaybeInsert(o, n, '{'),
                        { text: '{', selection: [1, 1] })
                } else if ('}' == r) {
                  d(o)
                  var h = s.substring(i.column, i.column + 1)
                  if ('}' == h) {
                    var m = n.$findOpeningBracket('}', {
                      column: i.column + 1,
                      row: i.row
                    })
                    if (null !== m && u.isAutoInsertedClosing(i, s, r))
                      return (
                        u.popAutoInsertedClosing(),
                        { text: '', selection: [1, 1] }
                      )
                  }
                } else {
                  if ('\n' == r || '\r\n' == r) {
                    d(o)
                    var f = ''
                    u.isMaybeInsertedClosing(i, s) &&
                      ((f = a.stringRepeat('}', p.maybeInsertedBrackets)),
                      u.clearMaybeInsertedClosing())
                    var h = s.substring(i.column, i.column + 1)
                    if ('}' === h) {
                      var y = n.findMatchingBracket(
                        { row: i.row, column: i.column + 1 },
                        '}'
                      )
                      if (!y) return null
                      var A = this.$getIndent(n.getLine(y.row))
                    } else if (f) var A = this.$getIndent(s)
                    else return void u.clearMaybeInsertedClosing()
                    var C = A + n.getTabString()
                    return {
                      text: '\n' + C + '\n' + A + f,
                      selection: [1, C.length, 1, C.length]
                    }
                  }
                  u.clearMaybeInsertedClosing()
                }
              }),
                this.add('braces', 'deletion', function(e, t, o, n, r) {
                  var a = n.doc.getTextRange(r)
                  if (!r.isMultiLine() && '{' == a) {
                    d(o)
                    var i = n.doc.getLine(r.start.row),
                      s = i.substring(r.end.column, r.end.column + 1)
                    if ('}' == s) return r.end.column++, r
                    p.maybeInsertedBrackets--
                  }
                }),
                this.add('parens', 'insertion', function(e, t, o, n, r) {
                  if ('(' == r) {
                    d(o)
                    var a = o.getSelectionRange(),
                      i = n.doc.getTextRange(a)
                    if ('' !== i && o.getWrapBehavioursEnabled())
                      return c(a, i, '(', ')')
                    if (u.isSaneInsertion(o, n))
                      return (
                        u.recordAutoInsert(o, n, ')'),
                        { text: '()', selection: [1, 1] }
                      )
                  } else if (')' == r) {
                    d(o)
                    var s = o.getCursorPosition(),
                      l = n.doc.getLine(s.row),
                      p = l.substring(s.column, s.column + 1)
                    if (')' == p) {
                      var g = n.$findOpeningBracket(')', {
                        column: s.column + 1,
                        row: s.row
                      })
                      if (null !== g && u.isAutoInsertedClosing(s, l, r))
                        return (
                          u.popAutoInsertedClosing(),
                          { text: '', selection: [1, 1] }
                        )
                    }
                  }
                }),
                this.add('parens', 'deletion', function(e, t, o, n, r) {
                  var a = n.doc.getTextRange(r)
                  if (!r.isMultiLine() && '(' == a) {
                    d(o)
                    var i = n.doc.getLine(r.start.row),
                      s = i.substring(r.start.column + 1, r.start.column + 2)
                    if (')' == s) return r.end.column++, r
                  }
                }),
                this.add('brackets', 'insertion', function(e, t, o, n, r) {
                  if ('[' == r) {
                    d(o)
                    var a = o.getSelectionRange(),
                      i = n.doc.getTextRange(a)
                    if ('' !== i && o.getWrapBehavioursEnabled())
                      return c(a, i, '[', ']')
                    if (u.isSaneInsertion(o, n))
                      return (
                        u.recordAutoInsert(o, n, ']'),
                        { text: '[]', selection: [1, 1] }
                      )
                  } else if (']' == r) {
                    d(o)
                    var s = o.getCursorPosition(),
                      l = n.doc.getLine(s.row),
                      p = l.substring(s.column, s.column + 1)
                    if (']' == p) {
                      var g = n.$findOpeningBracket(']', {
                        column: s.column + 1,
                        row: s.row
                      })
                      if (null !== g && u.isAutoInsertedClosing(s, l, r))
                        return (
                          u.popAutoInsertedClosing(),
                          { text: '', selection: [1, 1] }
                        )
                    }
                  }
                }),
                this.add('brackets', 'deletion', function(e, t, o, n, r) {
                  var a = n.doc.getTextRange(r)
                  if (!r.isMultiLine() && '[' == a) {
                    d(o)
                    var i = n.doc.getLine(r.start.row),
                      s = i.substring(r.start.column + 1, r.start.column + 2)
                    if (']' == s) return r.end.column++, r
                  }
                }),
                this.add('string_dquotes', 'insertion', function(
                  e,
                  t,
                  o,
                  n,
                  r
                ) {
                  if ('"' == r || "'" == r) {
                    if (
                      this.lineCommentStart &&
                      -1 != this.lineCommentStart.indexOf(r)
                    )
                      return
                    d(o)
                    var a = r,
                      i = o.getSelectionRange(),
                      s = n.doc.getTextRange(i)
                    if (
                      '' !== s &&
                      "'" !== s &&
                      '"' != s &&
                      o.getWrapBehavioursEnabled()
                    )
                      return c(i, s, a, a)
                    if (!s) {
                      var l = o.getCursorPosition(),
                        u = n.doc.getLine(l.row),
                        p = u.substring(l.column - 1, l.column),
                        g = u.substring(l.column, l.column + 1),
                        h = n.getTokenAt(l.row, l.column),
                        m = n.getTokenAt(l.row, l.column + 1)
                      if ('\\' == p && h && /escape/.test(h.type)) return null
                      var f = h && /string|escape/.test(h.type),
                        y = !m || /string|escape/.test(m.type),
                        A
                      if (g == a)
                        (A = f !== y),
                          A && /string\.end/.test(m.type) && (A = !1)
                      else {
                        if (f && !y) return null
                        if (f && y) return null
                        var C = n.$mode.tokenRe
                        C.lastIndex = 0
                        var w = C.test(p)
                        C.lastIndex = 0
                        var E = C.test(p)
                        if (w || E) return null
                        if (g && !/[\s;,.})\]\\]/.test(g)) return null
                        A = !0
                      }
                      return { text: A ? a + a : '', selection: [1, 1] }
                    }
                  }
                }),
                this.add('string_dquotes', 'deletion', function(e, t, o, n, r) {
                  var a = n.doc.getTextRange(r)
                  if (!r.isMultiLine() && ('"' == a || "'" == a)) {
                    d(o)
                    var i = n.doc.getLine(r.start.row),
                      s = i.substring(r.start.column + 1, r.start.column + 2)
                    if (s == a) return r.end.column++, r
                  }
                })
            },
            p
          ;(u.isSaneInsertion = function(e, t) {
            var o = e.getCursorPosition(),
              n = new r(t, o.row, o.column)
            if (!this.$matchTokenType(n.getCurrentToken() || 'text', i)) {
              var a = new r(t, o.row, o.column + 1)
              if (!this.$matchTokenType(a.getCurrentToken() || 'text', i))
                return !1
            }
            return (
              n.stepForward(),
              n.getCurrentTokenRow() !== o.row ||
                this.$matchTokenType(n.getCurrentToken() || 'text', s)
            )
          }),
            (u.$matchTokenType = function(e, t) {
              return -1 < t.indexOf(e.type || e)
            }),
            (u.recordAutoInsert = function(e, t, o) {
              var n = e.getCursorPosition(),
                r = t.doc.getLine(n.row)
              this.isAutoInsertedClosing(n, r, p.autoInsertedLineEnd[0]) ||
                (p.autoInsertedBrackets = 0),
                (p.autoInsertedRow = n.row),
                (p.autoInsertedLineEnd = o + r.substr(n.column)),
                p.autoInsertedBrackets++
            }),
            (u.recordMaybeInsert = function(e, t, o) {
              var n = e.getCursorPosition(),
                r = t.doc.getLine(n.row)
              this.isMaybeInsertedClosing(n, r) ||
                (p.maybeInsertedBrackets = 0),
                (p.maybeInsertedRow = n.row),
                (p.maybeInsertedLineStart = r.substr(0, n.column) + o),
                (p.maybeInsertedLineEnd = r.substr(n.column)),
                p.maybeInsertedBrackets++
            }),
            (u.isAutoInsertedClosing = function(e, t, o) {
              return (
                0 < p.autoInsertedBrackets &&
                e.row === p.autoInsertedRow &&
                o === p.autoInsertedLineEnd[0] &&
                t.substr(e.column) === p.autoInsertedLineEnd
              )
            }),
            (u.isMaybeInsertedClosing = function(e, t) {
              return (
                0 < p.maybeInsertedBrackets &&
                e.row === p.maybeInsertedRow &&
                t.substr(e.column) === p.maybeInsertedLineEnd &&
                t.substr(0, e.column) == p.maybeInsertedLineStart
              )
            }),
            (u.popAutoInsertedClosing = function() {
              ;(p.autoInsertedLineEnd = p.autoInsertedLineEnd.substr(1)),
                p.autoInsertedBrackets--
            }),
            (u.clearMaybeInsertedClosing = function() {
              p && ((p.maybeInsertedBrackets = 0), (p.maybeInsertedRow = -1))
            }),
            o.inherits(u, n),
            (t.CstyleBehaviour = u)
        }
      ),
      ace.define('ace/unicode', ['require', 'exports', 'module'], function(
        e,
        t
      ) {
        'use strict'
        ;(t.packages = {}),
          (function(e) {
            var o = /\w{4}/g
            for (var n in e) t.packages[n] = e[n].replace(o, '\\u$&')
          })({
            L:
              '0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC',
            Ll:
              '0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A',
            Lu:
              '0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A',
            Lt: '01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC',
            Lm:
              '02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F',
            Lo:
              '01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC',
            M:
              '0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26',
            Mn:
              '0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26',
            Mc:
              '0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC',
            Me: '0488048906DE20DD-20E020E2-20E4A670-A672',
            N:
              '0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19',
            Nd:
              '0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19',
            Nl: '16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF',
            No:
              '00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835',
            P:
              '0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65',
            Pd:
              '002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D',
            Ps:
              '0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62',
            Pe:
              '0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63',
            Pi: '00AB2018201B201C201F20392E022E042E092E0C2E1C2E20',
            Pf: '00BB2019201D203A2E032E052E0A2E0D2E1D2E21',
            Pc: '005F203F20402054FE33FE34FE4D-FE4FFF3F',
            Po:
              '0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65',
            S:
              '0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD',
            Sm:
              '002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC',
            Sc:
              '002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6',
            Sk:
              '005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3',
            So:
              '00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD',
            Z: '002000A01680180E2000-200A20282029202F205F3000',
            Zs: '002000A01680180E2000-200A202F205F3000',
            Zl: '2028',
            Zp: '2029',
            C:
              '0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF',
            Cc: '0000-001F007F-009F',
            Cf:
              '00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB',
            Co: 'E000-F8FF',
            Cs: 'D800-DFFF',
            Cn:
              '03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF'
          })
      }),
      ace.define(
        'ace/mode/text',
        [
          'require',
          'exports',
          'module',
          'ace/tokenizer',
          'ace/mode/text_highlight_rules',
          'ace/mode/behaviour/cstyle',
          'ace/unicode',
          'ace/lib/lang',
          'ace/token_iterator',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          var o = e('../tokenizer').Tokenizer,
            n = e('./text_highlight_rules').TextHighlightRules,
            r = e('./behaviour/cstyle').CstyleBehaviour,
            a = e('../unicode'),
            i = e('../lib/lang'),
            s = e('../token_iterator').TokenIterator,
            d = e('../range').Range,
            c = function() {
              this.HighlightRules = n
            }
          ;(function() {
            ;(this.$defaultBehaviour = new r()),
              (this.tokenRe = new RegExp(
                '^[' +
                  a.packages.L +
                  a.packages.Mn +
                  a.packages.Mc +
                  a.packages.Nd +
                  a.packages.Pc +
                  '\\$_]+',
                'g'
              )),
              (this.nonTokenRe = new RegExp(
                '^(?:[^' +
                  a.packages.L +
                  a.packages.Mn +
                  a.packages.Mc +
                  a.packages.Nd +
                  a.packages.Pc +
                  '\\$_]|\\s])+',
                'g'
              )),
              (this.getTokenizer = function() {
                return (
                  this.$tokenizer ||
                    ((this.$highlightRules =
                      this.$highlightRules ||
                      new this.HighlightRules(this.$highlightRuleConfig)),
                    (this.$tokenizer = new o(this.$highlightRules.getRules()))),
                  this.$tokenizer
                )
              }),
              (this.lineCommentStart = ''),
              (this.blockComment = ''),
              (this.toggleCommentLines = function(e, t, o, n) {
                function r(e) {
                  for (var t = o; t <= n; t++) e(a.getLine(t), t)
                }
                var a = t.doc,
                  s = !0,
                  d = !0,
                  c = Infinity,
                  u = t.getTabSize(),
                  p = !1
                if (!this.lineCommentStart) {
                  if (!this.blockComment) return !1
                  var g = this.blockComment.start,
                    h = this.blockComment.end,
                    f = new RegExp('^(\\s*)(?:' + i.escapeRegExp(g) + ')'),
                    y = new RegExp('(?:' + i.escapeRegExp(h) + ')\\s*$'),
                    m = function(e, t) {
                      C(e, t) ||
                        ((!s || /\S/.test(e)) &&
                          (a.insertInLine({ row: t, column: e.length }, h),
                          a.insertInLine({ row: t, column: c }, g)))
                    },
                    A = function(e, t) {
                      var o
                      ;(o = e.match(y)) &&
                        a.removeInLine(t, e.length - o[0].length, e.length),
                        (o = e.match(f)) &&
                          a.removeInLine(t, o[1].length, o[0].length)
                    },
                    C = function(e, o) {
                      if (f.test(e)) return !0
                      for (var n = t.getTokens(o), r = 0; r < n.length; r++)
                        if ('comment' === n[r].type) return !0
                    }
                } else {
                  if (Array.isArray(this.lineCommentStart))
                    var f = this.lineCommentStart.map(i.escapeRegExp).join('|'),
                      g = this.lineCommentStart[0]
                  else
                    var f = i.escapeRegExp(this.lineCommentStart),
                      g = this.lineCommentStart
                  ;(f = new RegExp('^(\\s*)(?:' + f + ') ?')),
                    (p = t.getUseSoftTabs())
                  var A = function(e, t) {
                      var o = e.match(f)
                      if (o) {
                        var n = o[1].length,
                          r = o[0].length
                        w(e, n, r) || ' ' != o[0][r - 1] || r--,
                          a.removeInLine(t, n, r)
                      }
                    },
                    m = function(e, t) {
                      ;(!s || /\S/.test(e)) &&
                        (w(e, c, c)
                          ? a.insertInLine({ row: t, column: c }, g + ' ')
                          : a.insertInLine({ row: t, column: c }, g))
                    },
                    C = function(e) {
                      return f.test(e)
                    },
                    w = function(e, t, o) {
                      for (var n = 0; t-- && ' ' == e.charAt(t); ) n++
                      if (0 != n % u) return !1
                      for (var n = 0; ' ' == e.charAt(o++); ) n++
                      return 2 < u ? n % u != u - 1 : 0 == n % u
                    }
                }
                var E = Infinity
                r(function(e, t) {
                  var o = e.search(/\S/)
                  ;-1 === o
                    ? E > e.length && (E = e.length)
                    : (o < c && (c = o), d && !C(e, t) && (d = !1))
                }),
                  c == Infinity && ((c = E), (s = !1), (d = !1)),
                  p && 0 != c % u && (c = l(c / u) * u),
                  r(d ? A : m)
              }),
              (this.toggleBlockComment = function(e, t, o, n) {
                var r = this.blockComment
                if (r) {
                  !r.start && r[0] && (r = r[0])
                  var a = new s(t, n.row, n.column),
                    l = a.getCurrentToken(),
                    c = t.selection,
                    u = t.selection.toOrientedRange(),
                    p,
                    g
                  if (l && /comment/.test(l.type)) {
                    for (var h, m, f; l && /comment/.test(l.type); ) {
                      if (((f = l.value.indexOf(r.start)), -1 != f)) {
                        var i = a.getCurrentTokenRow(),
                          y = a.getCurrentTokenColumn() + f
                        h = new d(i, y, i, y + r.start.length)
                        break
                      }
                      l = a.stepBackward()
                    }
                    for (
                      var a = new s(t, n.row, n.column),
                        l = a.getCurrentToken(),
                        f;
                      l && /comment/.test(l.type);

                    ) {
                      if (((f = l.value.indexOf(r.end)), -1 != f)) {
                        var i = a.getCurrentTokenRow(),
                          y = a.getCurrentTokenColumn() + f
                        m = new d(i, y, i, y + r.end.length)
                        break
                      }
                      l = a.stepForward()
                    }
                    m && t.remove(m),
                      h &&
                        (t.remove(h), (p = h.start.row), (g = -r.start.length))
                  } else
                    (g = r.start.length),
                      (p = o.start.row),
                      t.insert(o.end, r.end),
                      t.insert(o.start, r.start)
                  u.start.row == p && (u.start.column += g),
                    u.end.row == p && (u.end.column += g),
                    t.selection.fromOrientedRange(u)
                }
              }),
              (this.getNextLineIndent = function(e, t) {
                return this.$getIndent(t)
              }),
              (this.checkOutdent = function() {
                return !1
              }),
              (this.autoOutdent = function() {}),
              (this.$getIndent = function(e) {
                return e.match(/^\s*/)[0]
              }),
              (this.createWorker = function() {
                return null
              }),
              (this.createModeDelegates = function(e) {
                for (var t in ((this.$embeds = []), (this.$modes = {}), e))
                  e[t] && (this.$embeds.push(t), (this.$modes[t] = new e[t]()))
                for (
                  var o = [
                      'toggleBlockComment',
                      'toggleCommentLines',
                      'getNextLineIndent',
                      'checkOutdent',
                      'autoOutdent',
                      'transformAction',
                      'getCompletions'
                    ],
                    t = 0;
                  t < o.length;
                  t++
                )
                  (function(e) {
                    var n = o[t],
                      r = e[n]
                    e[o[t]] = function() {
                      return this.$delegator(n, arguments, r)
                    }
                  })(this)
              }),
              (this.$delegator = function(e, t, o) {
                var n = t[0]
                'string' != typeof n && (n = n[0])
                for (var r = 0; r < this.$embeds.length; r++)
                  if (this.$modes[this.$embeds[r]]) {
                    var a = n.split(this.$embeds[r])
                    if (!a[0] && a[1]) {
                      t[0] = a[1]
                      var i = this.$modes[this.$embeds[r]]
                      return i[e].apply(i, t)
                    }
                  }
                var s = o.apply(this, t)
                return o ? s : void 0
              }),
              (this.transformAction = function(e, t) {
                if (this.$behaviour) {
                  var o = this.$behaviour.getBehaviours()
                  for (var n in o)
                    if (o[n][t]) {
                      var r = o[n][t].apply(this, arguments)
                      if (r) return r
                    }
                }
              }),
              (this.getKeywords = function(e) {
                if (!this.completionKeywords) {
                  var t = this.$tokenizer.rules,
                    o = []
                  for (var n in t)
                    for (var i = t[n], s = 0, r = i.length; s < r; s++)
                      if ('string' == typeof i[s].token)
                        /keyword|support|storage/.test(i[s].token) &&
                          o.push(i[s].regex)
                      else if ('object' == typeof i[s].token)
                        for (var l = 0, a = i[s].token.length; l < a; l++)
                          if (/keyword|support|storage/.test(i[s].token[l])) {
                            var n = i[s].regex.match(/\(.+?\)/g)[l]
                            o.push(n.substr(1, n.length - 2))
                          }
                  this.completionKeywords = o
                }
                return e ? o.concat(this.$keywordList || []) : this.$keywordList
              }),
              (this.$createKeywordList = function() {
                return (
                  this.$highlightRules || this.getTokenizer(),
                  (this.$keywordList = this.$highlightRules.$keywordList || [])
                )
              }),
              (this.getCompletions = function() {
                var e = this.$keywordList || this.$createKeywordList()
                return e.map(function(e) {
                  return { name: e, value: e, score: 0, meta: 'keyword' }
                })
              }),
              (this.$id = 'ace/mode/text')
          }.call(c.prototype),
            (t.Mode = c))
        }
      ),
      ace.define('ace/apply_delta', ['require', 'exports', 'module'], function(
        e,
        t
      ) {
        'use strict'
        t.applyDelta = function(e, t) {
          var o = t.start.row,
            n = t.start.column,
            r = e[o] || ''
          switch (t.action) {
            case 'insert':
              var a = t.lines
              if (1 === a.length)
                e[o] = r.substring(0, n) + t.lines[0] + r.substring(n)
              else {
                var i = [o, 1].concat(t.lines)
                e.splice.apply(e, i),
                  (e[o] = r.substring(0, n) + e[o]),
                  (e[o + t.lines.length - 1] += r.substring(n))
              }
              break
            case 'remove':
              var s = t.end.column,
                l = t.end.row
              o === l
                ? (e[o] = r.substring(0, n) + r.substring(s))
                : e.splice(o, l - o + 1, r.substring(0, n) + e[l].substring(s))
          }
        }
      }),
      ace.define(
        'ace/anchor',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            n = e('./lib/event_emitter').EventEmitter,
            r = (t.Anchor = function(e, t, o) {
              ;(this.$onChange = this.onChange.bind(this)),
                this.attach(e),
                'undefined' == typeof o
                  ? this.setPosition(t.row, t.column)
                  : this.setPosition(t, o)
            })
          ;(function() {
            function e(e, t, o) {
              var n = o ? e.column <= t.column : e.column < t.column
              return e.row < t.row || (e.row == t.row && n)
            }
            function t(t, o, n) {
              var r = 'insert' == t.action,
                a = (r ? 1 : -1) * (t.end.row - t.start.row),
                i = (r ? 1 : -1) * (t.end.column - t.start.column),
                s = t.start,
                l = r ? s : t.end
              return e(o, s, n)
                ? { row: o.row, column: o.column }
                : e(l, o, !n)
                  ? {
                      row: o.row + a,
                      column: o.column + (o.row == l.row ? i : 0)
                    }
                  : { row: s.row, column: s.column }
            }
            o.implement(this, n),
              (this.getPosition = function() {
                return this.$clipPositionToDocument(this.row, this.column)
              }),
              (this.getDocument = function() {
                return this.document
              }),
              (this.$insertRight = !1),
              (this.onChange = function(e) {
                if (
                  (e.start.row != e.end.row || e.start.row == this.row) &&
                  !(e.start.row > this.row)
                ) {
                  var o = t(
                    e,
                    { row: this.row, column: this.column },
                    this.$insertRight
                  )
                  this.setPosition(o.row, o.column, !0)
                }
              }),
              (this.setPosition = function(e, t, o) {
                var n
                if (
                  ((n = o
                    ? { row: e, column: t }
                    : this.$clipPositionToDocument(e, t)),
                  this.row != n.row || this.column != n.column)
                ) {
                  var r = { row: this.row, column: this.column }
                  ;(this.row = n.row),
                    (this.column = n.column),
                    this._signal('change', { old: r, value: n })
                }
              }),
              (this.detach = function() {
                this.document.removeEventListener('change', this.$onChange)
              }),
              (this.attach = function(e) {
                ;(this.document = e || this.document),
                  this.document.on('change', this.$onChange)
              }),
              (this.$clipPositionToDocument = function(e, t) {
                var o = {}
                return (
                  e >= this.document.getLength()
                    ? ((o.row = p(0, this.document.getLength() - 1)),
                      (o.column = this.document.getLine(o.row).length))
                    : 0 > e
                      ? ((o.row = 0), (o.column = 0))
                      : ((o.row = e),
                        (o.column = u(
                          this.document.getLine(o.row).length,
                          p(0, t)
                        ))),
                  0 > t && (o.column = 0),
                  o
                )
              })
          }.call(r.prototype))
        }
      ),
      ace.define(
        'ace/document',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/apply_delta',
          'ace/lib/event_emitter',
          'ace/range',
          'ace/anchor'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            n = e('./apply_delta').applyDelta,
            r = e('./lib/event_emitter').EventEmitter,
            a = e('./range').Range,
            i = e('./anchor').Anchor,
            s = function(e) {
              ;(this.$lines = ['']),
                0 === e.length
                  ? (this.$lines = [''])
                  : Array.isArray(e)
                    ? this.insertMergedLines({ row: 0, column: 0 }, e)
                    : this.insert({ row: 0, column: 0 }, e)
            }
          ;(function() {
            o.implement(this, r),
              (this.setValue = function(e) {
                var t = this.getLength() - 1
                this.remove(new a(0, 0, t, this.getLine(t).length)),
                  this.insert({ row: 0, column: 0 }, e)
              }),
              (this.getValue = function() {
                return this.getAllLines().join(this.getNewLineCharacter())
              }),
              (this.createAnchor = function(e, t) {
                return new i(this, e, t)
              }),
              (this.$split =
                0 === 'aaa'.split(/a/).length
                  ? function(e) {
                      return e.replace(/\r\n|\r/g, '\n').split('\n')
                    }
                  : function(e) {
                      return e.split(/\r\n|\r|\n/)
                    }),
              (this.$detectNewLine = function(e) {
                var t = e.match(/^.*?(\r\n|\r|\n)/m)
                ;(this.$autoNewLine = t ? t[1] : '\n'),
                  this._signal('changeNewLineMode')
              }),
              (this.getNewLineCharacter = function() {
                switch (this.$newLineMode) {
                  case 'windows':
                    return '\r\n'
                  case 'unix':
                    return '\n'
                  default:
                    return this.$autoNewLine || '\n'
                }
              }),
              (this.$autoNewLine = ''),
              (this.$newLineMode = 'auto'),
              (this.setNewLineMode = function(e) {
                this.$newLineMode === e ||
                  ((this.$newLineMode = e), this._signal('changeNewLineMode'))
              }),
              (this.getNewLineMode = function() {
                return this.$newLineMode
              }),
              (this.isNewLine = function(e) {
                return '\r\n' == e || '\r' == e || '\n' == e
              }),
              (this.getLine = function(e) {
                return this.$lines[e] || ''
              }),
              (this.getLines = function(e, t) {
                return this.$lines.slice(e, t + 1)
              }),
              (this.getAllLines = function() {
                return this.getLines(0, this.getLength())
              }),
              (this.getLength = function() {
                return this.$lines.length
              }),
              (this.getTextRange = function(e) {
                return this.getLinesForRange(e).join(this.getNewLineCharacter())
              }),
              (this.getLinesForRange = function(e) {
                var t
                if (e.start.row === e.end.row)
                  t = [
                    this.getLine(e.start.row).substring(
                      e.start.column,
                      e.end.column
                    )
                  ]
                else {
                  ;(t = this.getLines(e.start.row, e.end.row)),
                    (t[0] = (t[0] || '').substring(e.start.column))
                  var o = t.length - 1
                  e.end.row - e.start.row == o &&
                    (t[o] = t[o].substring(0, e.end.column))
                }
                return t
              }),
              (this.insertLines = function(e, t) {
                return (
                  console.warn(
                    'Use of document.insertLines is deprecated. Use the insertFullLines method instead.'
                  ),
                  this.insertFullLines(e, t)
                )
              }),
              (this.removeLines = function(e, t) {
                return (
                  console.warn(
                    'Use of document.removeLines is deprecated. Use the removeFullLines method instead.'
                  ),
                  this.removeFullLines(e, t)
                )
              }),
              (this.insertNewLine = function(e) {
                return (
                  console.warn(
                    "Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."
                  ),
                  this.insertMergedLines(e, ['', ''])
                )
              }),
              (this.insert = function(e, t) {
                return (
                  1 >= this.getLength() && this.$detectNewLine(t),
                  this.insertMergedLines(e, this.$split(t))
                )
              }),
              (this.insertInLine = function(e, t) {
                var o = this.clippedPos(e.row, e.column),
                  n = this.pos(e.row, e.column + t.length)
                return (
                  this.applyDelta(
                    { start: o, end: n, action: 'insert', lines: [t] },
                    !0
                  ),
                  this.clonePos(n)
                )
              }),
              (this.clippedPos = function(e, t) {
                var o = this.getLength()
                void 0 === e
                  ? (e = o)
                  : 0 > e
                    ? (e = 0)
                    : e >= o && ((e = o - 1), (t = void 0))
                var n = this.getLine(e)
                return (
                  void 0 == t && (t = n.length),
                  (t = u(p(t, 0), n.length)),
                  { row: e, column: t }
                )
              }),
              (this.clonePos = function(e) {
                return { row: e.row, column: e.column }
              }),
              (this.pos = function(e, t) {
                return { row: e, column: t }
              }),
              (this.$clipPosition = function(e) {
                var t = this.getLength()
                return (
                  e.row >= t
                    ? ((e.row = p(0, t - 1)),
                      (e.column = this.getLine(t - 1).length))
                    : ((e.row = p(0, e.row)),
                      (e.column = u(
                        p(e.column, 0),
                        this.getLine(e.row).length
                      ))),
                  e
                )
              }),
              (this.insertFullLines = function(e, t) {
                e = u(p(e, 0), this.getLength())
                var o = 0
                e < this.getLength()
                  ? ((t = t.concat([''])), (o = 0))
                  : ((t = [''].concat(t)), e--, (o = this.$lines[e].length)),
                  this.insertMergedLines({ row: e, column: o }, t)
              }),
              (this.insertMergedLines = function(e, t) {
                var o = this.clippedPos(e.row, e.column),
                  n = {
                    row: o.row + t.length - 1,
                    column:
                      (1 == t.length ? o.column : 0) + t[t.length - 1].length
                  }
                return (
                  this.applyDelta({
                    start: o,
                    end: n,
                    action: 'insert',
                    lines: t
                  }),
                  this.clonePos(n)
                )
              }),
              (this.remove = function(e) {
                var t = this.clippedPos(e.start.row, e.start.column),
                  o = this.clippedPos(e.end.row, e.end.column)
                return (
                  this.applyDelta({
                    start: t,
                    end: o,
                    action: 'remove',
                    lines: this.getLinesForRange({ start: t, end: o })
                  }),
                  this.clonePos(t)
                )
              }),
              (this.removeInLine = function(e, t, o) {
                var n = this.clippedPos(e, t),
                  r = this.clippedPos(e, o)
                return (
                  this.applyDelta(
                    {
                      start: n,
                      end: r,
                      action: 'remove',
                      lines: this.getLinesForRange({ start: n, end: r })
                    },
                    !0
                  ),
                  this.clonePos(n)
                )
              }),
              (this.removeFullLines = function(e, t) {
                ;(e = u(p(0, e), this.getLength() - 1)),
                  (t = u(p(0, t), this.getLength() - 1))
                var o = t == this.getLength() - 1 && 0 < e,
                  n = t < this.getLength() - 1,
                  r = o ? e - 1 : e,
                  i = o ? this.getLine(r).length : 0,
                  s = n ? t + 1 : t,
                  l = n ? 0 : this.getLine(s).length,
                  d = new a(r, i, s, l),
                  c = this.$lines.slice(e, t + 1)
                return (
                  this.applyDelta({
                    start: d.start,
                    end: d.end,
                    action: 'remove',
                    lines: this.getLinesForRange(d)
                  }),
                  c
                )
              }),
              (this.removeNewLine = function(e) {
                e < this.getLength() - 1 &&
                  0 <= e &&
                  this.applyDelta({
                    start: this.pos(e, this.getLine(e).length),
                    end: this.pos(e + 1, 0),
                    action: 'remove',
                    lines: ['', '']
                  })
              }),
              (this.replace = function(e, t) {
                if (
                  (e instanceof a || (e = a.fromPoints(e.start, e.end)),
                  0 === t.length && e.isEmpty())
                )
                  return e.start
                if (t == this.getTextRange(e)) return e.end
                this.remove(e)
                var o
                return (o = t ? this.insert(e.start, t) : e.start), o
              }),
              (this.applyDeltas = function(e) {
                for (var t = 0; t < e.length; t++) this.applyDelta(e[t])
              }),
              (this.revertDeltas = function(e) {
                for (var t = e.length - 1; 0 <= t; t--) this.revertDelta(e[t])
              }),
              (this.applyDelta = function(e, t) {
                var o = 'insert' == e.action
                ;(o
                  ? 1 >= e.lines.length && !e.lines[0]
                  : !a.comparePoints(e.start, e.end)) ||
                  (o &&
                    2e4 < e.lines.length &&
                    this.$splitAndapplyLargeDelta(e, 2e4),
                  n(this.$lines, e, t),
                  this._signal('change', e))
              }),
              (this.$splitAndapplyLargeDelta = function(e, t) {
                var o = e.lines,
                  n = o.length,
                  r = e.start.row,
                  a = e.start.column,
                  i = 0,
                  s = 0
                do {
                  ;(i = s), (s += t - 1)
                  var l = o.slice(i, s)
                  if (s > n) {
                    ;(e.lines = l), (e.start.row = r + i), (e.start.column = a)
                    break
                  }
                  l.push(''),
                    this.applyDelta(
                      {
                        start: this.pos(r + i, a),
                        end: this.pos(r + s, (a = 0)),
                        action: e.action,
                        lines: l
                      },
                      !0
                    )
                } while (!0)
              }),
              (this.revertDelta = function(e) {
                this.applyDelta({
                  start: this.clonePos(e.start),
                  end: this.clonePos(e.end),
                  action: 'insert' == e.action ? 'remove' : 'insert',
                  lines: e.lines.slice()
                })
              }),
              (this.indexToPosition = function(e, t) {
                for (
                  var o = this.$lines || this.getAllLines(),
                    n = this.getNewLineCharacter().length,
                    r = t || 0,
                    a = o.length;
                  r < a;
                  r++
                )
                  if (((e -= o[r].length + n), 0 > e))
                    return { row: r, column: e + o[r].length + n }
                return { row: a - 1, column: o[a - 1].length }
              }),
              (this.positionToIndex = function(e, t) {
                for (
                  var o = this.$lines || this.getAllLines(),
                    n = this.getNewLineCharacter().length,
                    r = 0,
                    a = u(e.row, o.length),
                    s = t || 0;
                  s < a;
                  ++s
                )
                  r += o[s].length + n
                return r + e.column
              })
          }.call(s.prototype),
            (t.Document = s))
        }
      ),
      ace.define(
        'ace/background_tokenizer',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            n = e('./lib/event_emitter').EventEmitter,
            r = function(e) {
              ;(this.running = !1),
                (this.lines = []),
                (this.states = []),
                (this.currentLine = 0),
                (this.tokenizer = e)
              var t = this
              this.$worker = function() {
                if (t.running) {
                  for (
                    var e = new Date(),
                      o = t.currentLine,
                      n = -1,
                      r = t.doc,
                      a = o;
                    t.lines[o];

                  )
                    o++
                  var i = r.getLength(),
                    s = 0
                  for (t.running = !1; o < i; ) {
                    t.$tokenizeRow(o), (n = o)
                    do o++
                    while (t.lines[o])
                    if ((s++, 0 == s % 5 && 20 < new Date() - e)) {
                      t.running = setTimeout(t.$worker, 20)
                      break
                    }
                  }
                  ;(t.currentLine = o), a <= n && t.fireUpdateEvent(a, n)
                }
              }
            }
          ;(function() {
            o.implement(this, n),
              (this.setTokenizer = function(e) {
                ;(this.tokenizer = e),
                  (this.lines = []),
                  (this.states = []),
                  this.start(0)
              }),
              (this.setDocument = function(e) {
                ;(this.doc = e),
                  (this.lines = []),
                  (this.states = []),
                  this.stop()
              }),
              (this.fireUpdateEvent = function(e, t) {
                this._signal('update', { data: { first: e, last: t } })
              }),
              (this.start = function(e) {
                ;(this.currentLine = u(
                  e || 0,
                  this.currentLine,
                  this.doc.getLength()
                )),
                  this.lines.splice(this.currentLine, this.lines.length),
                  this.states.splice(this.currentLine, this.states.length),
                  this.stop(),
                  (this.running = setTimeout(this.$worker, 700))
              }),
              (this.scheduleStart = function() {
                this.running || (this.running = setTimeout(this.$worker, 700))
              }),
              (this.$updateOnChange = function(e) {
                var t = e.start.row,
                  o = e.end.row - t
                if (0 == o) this.lines[t] = null
                else if ('remove' == e.action)
                  this.lines.splice(t, o + 1, null),
                    this.states.splice(t, o + 1, null)
                else {
                  var n = Array(o + 1)
                  n.unshift(t, 1),
                    this.lines.splice.apply(this.lines, n),
                    this.states.splice.apply(this.states, n)
                }
                ;(this.currentLine = u(
                  t,
                  this.currentLine,
                  this.doc.getLength()
                )),
                  this.stop()
              }),
              (this.stop = function() {
                this.running && clearTimeout(this.running), (this.running = !1)
              }),
              (this.getTokens = function(e) {
                return this.lines[e] || this.$tokenizeRow(e)
              }),
              (this.getState = function(e) {
                return (
                  this.currentLine == e && this.$tokenizeRow(e),
                  this.states[e] || 'start'
                )
              }),
              (this.$tokenizeRow = function(e) {
                var t = this.doc.getLine(e),
                  o = this.states[e - 1],
                  n = this.tokenizer.getLineTokens(t, o, e)
                return (
                  this.states[e] + '' == n.state + ''
                    ? this.currentLine == e && (this.currentLine = e + 1)
                    : ((this.states[e] = n.state),
                      (this.lines[e + 1] = null),
                      this.currentLine > e + 1 && (this.currentLine = e + 1)),
                  (this.lines[e] = n.tokens)
                )
              })
          }.call(r.prototype),
            (t.BackgroundTokenizer = r))
        }
      ),
      ace.define(
        'ace/search_highlight',
        [
          'require',
          'exports',
          'module',
          'ace/lib/lang',
          'ace/lib/oop',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/lang'),
            n = e('./lib/oop'),
            r = e('./range').Range,
            a = function(e, t, o) {
              this.setRegexp(e), (this.clazz = t), (this.type = o || 'text')
            }
          ;(function() {
            ;(this.MAX_RANGES = 500),
              (this.setRegexp = function(e) {
                this.regExp + '' == e + '' ||
                  ((this.regExp = e), (this.cache = []))
              }),
              (this.update = function(e, t, n, a) {
                if (this.regExp)
                  for (
                    var s = a.firstRow, l = a.lastRow, d = s, i;
                    d <= l;
                    d++
                  ) {
                    ;(i = this.cache[d]),
                      null == i &&
                        ((i = o.getMatchOffsets(n.getLine(d), this.regExp)),
                        i.length > this.MAX_RANGES &&
                          (i = i.slice(0, this.MAX_RANGES)),
                        (i = i.map(function(e) {
                          return new r(d, e.offset, d, e.offset + e.length)
                        })),
                        (this.cache[d] = i.length ? i : ''))
                    for (var c = i.length; c--; )
                      t.drawSingleLineMarker(
                        e,
                        i[c].toScreenRange(n),
                        this.clazz,
                        a
                      )
                  }
              })
          }.call(a.prototype),
            (t.SearchHighlight = a))
        }
      ),
      ace.define(
        'ace/edit_session/fold_line',
        ['require', 'exports', 'module', 'ace/range'],
        function(e, t) {
          'use strict'
          function o(e, t) {
            ;(this.foldData = e),
              Array.isArray(t) ? (this.folds = t) : (t = this.folds = [t])
            var o = t[t.length - 1]
            ;(this.range = new n(
              t[0].start.row,
              t[0].start.column,
              o.end.row,
              o.end.column
            )),
              (this.start = this.range.start),
              (this.end = this.range.end),
              this.folds.forEach(function(e) {
                e.setFoldLine(this)
              }, this)
          }
          var n = e('../range').Range
          ;(function() {
            ;(this.shiftRow = function(e) {
              ;(this.start.row += e),
                (this.end.row += e),
                this.folds.forEach(function(t) {
                  ;(t.start.row += e), (t.end.row += e)
                })
            }),
              (this.addFold = function(e) {
                if (e.sameRow) {
                  if (e.start.row < this.startRow || e.endRow > this.endRow)
                    throw new Error(
                      "Can't add a fold to this FoldLine as it has no connection"
                    )
                  this.folds.push(e),
                    this.folds.sort(function(e, t) {
                      return -e.range.compareEnd(t.start.row, t.start.column)
                    }),
                    0 < this.range.compareEnd(e.start.row, e.start.column)
                      ? ((this.end.row = e.end.row),
                        (this.end.column = e.end.column))
                      : 0 > this.range.compareStart(e.end.row, e.end.column) &&
                        ((this.start.row = e.start.row),
                        (this.start.column = e.start.column))
                } else if (e.start.row == this.end.row)
                  this.folds.push(e),
                    (this.end.row = e.end.row),
                    (this.end.column = e.end.column)
                else if (e.end.row == this.start.row)
                  this.folds.unshift(e),
                    (this.start.row = e.start.row),
                    (this.start.column = e.start.column)
                else
                  throw new Error(
                    "Trying to add fold to FoldRow that doesn't have a matching row"
                  )
                e.foldLine = this
              }),
              (this.containsRow = function(e) {
                return e >= this.start.row && e <= this.end.row
              }),
              (this.walk = function(e, t, o) {
                var n = 0,
                  r = this.folds,
                  a = !0,
                  s,
                  l,
                  d
                null == t && ((t = this.end.row), (o = this.end.column))
                for (var c = 0; c < r.length; c++) {
                  if (((s = r[c]), (l = s.range.compareStart(t, o)), -1 == l))
                    return void e(null, t, o, n, a)
                  if (
                    ((d = e(null, s.start.row, s.start.column, n, a)),
                    (d =
                      !d && e(s.placeholder, s.start.row, s.start.column, n)),
                    d || 0 === l)
                  )
                    return
                  ;(a = !s.sameRow), (n = s.end.column)
                }
                e(null, t, o, n, a)
              }),
              (this.getNextFoldTo = function(e, t) {
                for (var o = 0, n, r; o < this.folds.length; o++) {
                  if (
                    ((n = this.folds[o]),
                    (r = n.range.compareEnd(e, t)),
                    -1 == r)
                  )
                    return { fold: n, kind: 'after' }
                  if (0 === r) return { fold: n, kind: 'inside' }
                }
                return null
              }),
              (this.addRemoveChars = function(e, t, o) {
                var n = this.getNextFoldTo(e, t),
                  r,
                  a
                if (n)
                  if (
                    ((r = n.fold),
                    'inside' == n.kind &&
                      r.start.column != t &&
                      r.start.row != e)
                  )
                    window.console && window.console.log(e, t, r)
                  else if (r.start.row == e) {
                    a = this.folds
                    var s = a.indexOf(r)
                    for (
                      0 === s && (this.start.column += o), s;
                      s < a.length;
                      s++
                    ) {
                      if (((r = a[s]), (r.start.column += o), !r.sameRow))
                        return
                      r.end.column += o
                    }
                    this.end.column += o
                  }
              }),
              (this.split = function(e, t) {
                var n = this.getNextFoldTo(e, t)
                if (!n || 'inside' == n.kind) return null
                var r = n.fold,
                  a = this.folds,
                  s = this.foldData,
                  l = a.indexOf(r),
                  i = a[l - 1]
                ;(this.end.row = i.end.row),
                  (this.end.column = i.end.column),
                  (a = a.splice(l, a.length - l))
                var d = new o(s, a)
                return s.splice(s.indexOf(this) + 1, 0, d), d
              }),
              (this.merge = function(e) {
                for (var t = e.folds, o = 0; o < t.length; o++)
                  this.addFold(t[o])
                var n = this.foldData
                n.splice(n.indexOf(e), 1)
              }),
              (this.toString = function() {
                var e = [this.range.toString() + ': [']
                return (
                  this.folds.forEach(function(t) {
                    e.push('  ' + t.toString())
                  }),
                  e.push(']'),
                  e.join('\n')
                )
              }),
              (this.idxToPosition = function(e) {
                for (var t = 0, o = 0, n; o < this.folds.length; o++) {
                  if (((n = this.folds[o]), (e -= n.start.column - t), 0 > e))
                    return { row: n.start.row, column: n.start.column + e }
                  if (((e -= n.placeholder.length), 0 > e)) return n.start
                  t = n.end.column
                }
                return { row: this.end.row, column: this.end.column + e }
              })
          }.call(o.prototype),
            (t.FoldLine = o))
        }
      ),
      ace.define(
        'ace/range_list',
        ['require', 'exports', 'module', 'ace/range'],
        function(e, t) {
          'use strict'
          var o = e('./range').Range,
            n = o.comparePoints,
            r = function() {
              this.ranges = []
            }
          ;(function() {
            ;(this.comparePoints = n),
              (this.pointIndex = function(e, t, o) {
                for (var r = this.ranges, a = o || 0; a < r.length; a++) {
                  var s = r[a],
                    l = n(e, s.end)
                  if (!(0 < l)) {
                    var d = n(e, s.start)
                    return 0 === l
                      ? t && 0 !== d
                        ? -a - 2
                        : a
                      : 0 < d || (0 === d && !t)
                        ? a
                        : -a - 1
                  }
                }
                return -a - 1
              }),
              (this.add = function(e) {
                var t = !e.isEmpty(),
                  o = this.pointIndex(e.start, t)
                0 > o && (o = -o - 1)
                var n = this.pointIndex(e.end, t, o)
                return (
                  0 > n ? (n = -n - 1) : n++, this.ranges.splice(o, n - o, e)
                )
              }),
              (this.addList = function(e) {
                for (var t = [], o = e.length; o--; )
                  t.push.apply(t, this.add(e[o]))
                return t
              }),
              (this.substractPoint = function(e) {
                var t = this.pointIndex(e)
                if (0 <= t) return this.ranges.splice(t, 1)
              }),
              (this.merge = function() {
                var e = [],
                  t = this.ranges
                t = t.sort(function(e, t) {
                  return n(e.start, t.start)
                })
                for (var o = t[0], r = 1, a; r < t.length; r++) {
                  ;(a = o), (o = t[r])
                  var i = n(a.end, o.start)
                  0 > i ||
                    (0 == i && !a.isEmpty() && !o.isEmpty()) ||
                    (0 > n(a.end, o.end) &&
                      ((a.end.row = o.end.row), (a.end.column = o.end.column)),
                    t.splice(r, 1),
                    e.push(o),
                    (o = a),
                    r--)
                }
                return (this.ranges = t), e
              }),
              (this.contains = function(e, t) {
                return 0 <= this.pointIndex({ row: e, column: t })
              }),
              (this.containsPoint = function(e) {
                return 0 <= this.pointIndex(e)
              }),
              (this.rangeAtPoint = function(e) {
                var t = this.pointIndex(e)
                if (0 <= t) return this.ranges[t]
              }),
              (this.clipRows = function(e, t) {
                var o = this.ranges
                if (o[0].start.row > t || o[o.length - 1].start.row < e)
                  return []
                var n = this.pointIndex({ row: e, column: 0 })
                0 > n && (n = -n - 1)
                var r = this.pointIndex({ row: t, column: 0 }, n)
                0 > r && (r = -r - 1)
                for (var a = [], s = n; s < r; s++) a.push(o[s])
                return a
              }),
              (this.removeAll = function() {
                return this.ranges.splice(0, this.ranges.length)
              }),
              (this.attach = function(e) {
                this.session && this.detach(),
                  (this.session = e),
                  (this.onChange = this.$onChange.bind(this)),
                  this.session.on('change', this.onChange)
              }),
              (this.detach = function() {
                this.session &&
                  (this.session.removeListener('change', this.onChange),
                  (this.session = null))
              }),
              (this.$onChange = function(e) {
                if ('insert' == e.action)
                  var t = e.start,
                    o = e.end
                else
                  var o = e.start,
                    t = e.end
                for (
                  var a = t.row,
                    s = o.row,
                    l = s - a,
                    d = -t.column + o.column,
                    c = this.ranges,
                    u = 0,
                    i = c.length,
                    n;
                  u < i;
                  u++
                )
                  if (((n = c[u]), !(n.end.row < a))) {
                    if (n.start.row > a) break
                    if (
                      (n.start.row == a &&
                        n.start.column >= t.column &&
                        ((n.start.column == t.column && this.$insertRight) ||
                          ((n.start.column += d), (n.start.row += l))),
                      n.end.row == a && n.end.column >= t.column)
                    ) {
                      if (n.end.column == t.column && this.$insertRight)
                        continue
                      n.end.column == t.column &&
                        0 < d &&
                        u < i - 1 &&
                        n.end.column > n.start.column &&
                        n.end.column == c[u + 1].start.column &&
                        (n.end.column -= d),
                        (n.end.column += d),
                        (n.end.row += l)
                    }
                  }
                if (0 != l && u < i)
                  for (; u < i; u++) {
                    var n = c[u]
                    ;(n.start.row += l), (n.end.row += l)
                  }
              })
          }.call(r.prototype),
            (t.RangeList = r))
        }
      ),
      ace.define(
        'ace/edit_session/fold',
        [
          'require',
          'exports',
          'module',
          'ace/range',
          'ace/range_list',
          'ace/lib/oop'
        ],
        function(e, t) {
          'use strict'
          function o(e, t) {
            ;(e.row -= t.row), 0 == e.row && (e.column -= t.column)
          }
          function n(e, t) {
            o(e.start, t), o(e.end, t)
          }
          function r(e, t) {
            0 == e.row && (e.column += t.column), (e.row += t.row)
          }
          function a(e, t) {
            r(e.start, t), r(e.end, t)
          }
          var i = e('../range').Range,
            s = e('../range_list').RangeList,
            l = e('../lib/oop'),
            d = (t.Fold = function(e, t) {
              ;(this.foldLine = null),
                (this.placeholder = t),
                (this.range = e),
                (this.start = e.start),
                (this.end = e.end),
                (this.sameRow = e.start.row == e.end.row),
                (this.subFolds = this.ranges = [])
            })
          l.inherits(d, s),
            function() {
              ;(this.toString = function() {
                return '"' + this.placeholder + '" ' + this.range.toString()
              }),
                (this.setFoldLine = function(e) {
                  ;(this.foldLine = e),
                    this.subFolds.forEach(function(t) {
                      t.setFoldLine(e)
                    })
                }),
                (this.clone = function() {
                  var e = this.range.clone(),
                    t = new d(e, this.placeholder)
                  return (
                    this.subFolds.forEach(function(e) {
                      t.subFolds.push(e.clone())
                    }),
                    (t.collapseChildren = this.collapseChildren),
                    t
                  )
                }),
                (this.addSubFold = function(e) {
                  if (!this.range.isEqual(e)) {
                    if (!this.range.containsRange(e))
                      throw new Error(
                        "A fold can't intersect already existing fold" +
                          e.range +
                          this.range
                      )
                    n(e, this.start)
                    for (
                      var t = e.start.row, o = e.start.column, r = 0, a = -1;
                      r < this.subFolds.length &&
                      ((a = this.subFolds[r].range.compare(t, o)), 1 == a);
                      r++
                    );
                    var i = this.subFolds[r]
                    if (0 == a) return i.addSubFold(e)
                    for (
                      var t = e.range.end.row,
                        o = e.range.end.column,
                        s = r,
                        a = -1;
                      s < this.subFolds.length &&
                      ((a = this.subFolds[s].range.compare(t, o)), 1 == a);
                      s++
                    );
                    this.subFolds[s]
                    if (0 == a)
                      throw new Error(
                        "A fold can't intersect already existing fold" +
                          e.range +
                          this.range
                      )
                    this.subFolds.splice(r, s - r, e)
                    return e.setFoldLine(this.foldLine), e
                  }
                }),
                (this.restoreRange = function(e) {
                  return a(e, this.start)
                })
            }.call(d.prototype)
        }
      ),
      ace.define(
        'ace/edit_session/folding',
        [
          'require',
          'exports',
          'module',
          'ace/range',
          'ace/edit_session/fold_line',
          'ace/edit_session/fold',
          'ace/token_iterator'
        ],
        function(e, t) {
          'use strict'
          var o = e('../range').Range,
            n = e('./fold_line').FoldLine,
            r = e('./fold').Fold,
            a = e('../token_iterator').TokenIterator
          t.Folding = function() {
            ;(this.getFoldAt = function(e, t, o) {
              var n = this.getFoldLine(e)
              if (!n) return null
              for (var r = n.folds, a = 0, i; a < r.length; a++)
                if (((i = r[a]), i.range.contains(e, t))) {
                  if (1 == o && i.range.isEnd(e, t)) continue
                  else if (-1 == o && i.range.isStart(e, t)) continue
                  return i
                }
            }),
              (this.getFoldsInRange = function(e) {
                var t = e.start,
                  o = e.end,
                  n = this.$foldData,
                  r = []
                ;(t.column += 1), (o.column -= 1)
                for (var a = 0, i; a < n.length; a++) {
                  if (((i = n[a].range.compareRange(e)), 2 == i)) continue
                  else if (-2 == i) break
                  for (
                    var s = n[a].folds, l = 0, d;
                    l < s.length &&
                    ((d = s[l]), (i = d.range.compareRange(e)), -2 != i);
                    l++
                  ) {
                    if (2 == i) continue
                    else if (42 == i) break
                    r.push(d)
                  }
                }
                return (t.column -= 1), (o.column += 1), r
              }),
              (this.getFoldsInRangeList = function(e) {
                if (Array.isArray(e)) {
                  var t = []
                  e.forEach(function(e) {
                    t = t.concat(this.getFoldsInRange(e))
                  }, this)
                } else var t = this.getFoldsInRange(e)
                return t
              }),
              (this.getAllFolds = function() {
                for (var e = [], t = this.$foldData, o = 0; o < t.length; o++)
                  for (var n = 0; n < t[o].folds.length; n++)
                    e.push(t[o].folds[n])
                return e
              }),
              (this.getFoldStringAt = function(e, t, o, n) {
                if (((n = n || this.getFoldLine(e)), !n)) return null
                for (
                  var r = { end: { column: 0 } }, a = 0, i, s;
                  a < n.folds.length;
                  a++
                ) {
                  s = n.folds[a]
                  var l = s.range.compareEnd(e, t)
                  if (-1 == l) {
                    i = this.getLine(s.start.row).substring(
                      r.end.column,
                      s.start.column
                    )
                    break
                  } else if (0 === l) return null
                  r = s
                }
                return (
                  i || (i = this.getLine(s.start.row).substring(r.end.column)),
                  -1 == o
                    ? i.substring(0, t - r.end.column)
                    : 1 == o
                      ? i.substring(t - r.end.column)
                      : i
                )
              }),
              (this.getFoldLine = function(e, t) {
                var o = this.$foldData,
                  n = 0
                for (
                  t && (n = o.indexOf(t)), -1 == n && (n = 0), n;
                  n < o.length;
                  n++
                ) {
                  var r = o[n]
                  if (r.start.row <= e && r.end.row >= e) return r
                  if (r.end.row > e) return null
                }
                return null
              }),
              (this.getNextFoldLine = function(e, t) {
                var o = this.$foldData,
                  n = 0
                for (
                  t && (n = o.indexOf(t)), -1 == n && (n = 0), n;
                  n < o.length;
                  n++
                ) {
                  var r = o[n]
                  if (r.end.row >= e) return r
                }
                return null
              }),
              (this.getFoldedRowCount = function(e, t) {
                for (
                  var o = this.$foldData, n = t - e + 1, r = 0;
                  r < o.length;
                  r++
                ) {
                  var a = o[r],
                    i = a.end.row,
                    s = a.start.row
                  if (i >= t) {
                    s < t && (s >= e ? (n -= t - s) : (n = 0))
                    break
                  } else i >= e && (n -= s >= e ? i - s : i - e + 1)
                }
                return n
              }),
              (this.$addFoldLine = function(e) {
                return (
                  this.$foldData.push(e),
                  this.$foldData.sort(function(e, t) {
                    return e.start.row - t.start.row
                  }),
                  e
                )
              }),
              (this.addFold = function(e, t) {
                var o = this.$foldData,
                  a = !1,
                  s
                e instanceof r
                  ? (s = e)
                  : ((s = new r(t, e)),
                    (s.collapseChildren = t.collapseChildren)),
                  this.$clipRangeToDocument(s.range)
                var l = s.start.row,
                  d = s.start.column,
                  c = s.end.row,
                  u = s.end.column
                if (!(l < c || (l == c && d <= u - 2)))
                  throw new Error(
                    'The range has to be at least 2 characters width'
                  )
                var p = this.getFoldAt(l, d, 1),
                  g = this.getFoldAt(c, u, -1)
                if (p && g == p) return p.addSubFold(s)
                p && !p.range.isStart(l, d) && this.removeFold(p),
                  g && !g.range.isEnd(c, u) && this.removeFold(g)
                var h = this.getFoldsInRange(s.range)
                0 < h.length &&
                  (this.removeFolds(h),
                  h.forEach(function(e) {
                    s.addSubFold(e)
                  }))
                for (var m = 0, i; m < o.length; m++)
                  if (((i = o[m]), c == i.start.row)) {
                    i.addFold(s), (a = !0)
                    break
                  } else if (l == i.end.row) {
                    if ((i.addFold(s), (a = !0), !s.sameRow)) {
                      var f = o[m + 1]
                      if (f && f.start.row == c) {
                        i.merge(f)
                        break
                      }
                    }
                    break
                  } else if (c <= i.start.row) break
                return (
                  a || (i = this.$addFoldLine(new n(this.$foldData, s))),
                  this.$useWrapMode
                    ? this.$updateWrapData(i.start.row, i.start.row)
                    : this.$updateRowLengthCache(i.start.row, i.start.row),
                  (this.$modified = !0),
                  this._signal('changeFold', { data: s, action: 'add' }),
                  s
                )
              }),
              (this.addFolds = function(e) {
                e.forEach(function(e) {
                  this.addFold(e)
                }, this)
              }),
              (this.removeFold = function(e) {
                var t = e.foldLine,
                  o = t.start.row,
                  n = t.end.row,
                  r = this.$foldData,
                  a = t.folds
                if (1 == a.length) r.splice(r.indexOf(t), 1)
                else if (t.range.isEnd(e.end.row, e.end.column))
                  a.pop(),
                    (t.end.row = a[a.length - 1].end.row),
                    (t.end.column = a[a.length - 1].end.column)
                else if (t.range.isStart(e.start.row, e.start.column))
                  a.shift(),
                    (t.start.row = a[0].start.row),
                    (t.start.column = a[0].start.column)
                else if (e.sameRow) a.splice(a.indexOf(e), 1)
                else {
                  var i = t.split(e.start.row, e.start.column)
                  ;(a = i.folds),
                    a.shift(),
                    (i.start.row = a[0].start.row),
                    (i.start.column = a[0].start.column)
                }
                this.$updating ||
                  (this.$useWrapMode
                    ? this.$updateWrapData(o, n)
                    : this.$updateRowLengthCache(o, n)),
                  (this.$modified = !0),
                  this._signal('changeFold', { data: e, action: 'remove' })
              }),
              (this.removeFolds = function(e) {
                for (var t = [], o = 0; o < e.length; o++) t.push(e[o])
                t.forEach(function(e) {
                  this.removeFold(e)
                }, this),
                  (this.$modified = !0)
              }),
              (this.expandFold = function(e) {
                this.removeFold(e),
                  e.subFolds.forEach(function(t) {
                    e.restoreRange(t), this.addFold(t)
                  }, this),
                  0 < e.collapseChildren &&
                    this.foldAll(
                      e.start.row + 1,
                      e.end.row,
                      e.collapseChildren - 1
                    ),
                  (e.subFolds = [])
              }),
              (this.expandFolds = function(e) {
                e.forEach(function(e) {
                  this.expandFold(e)
                }, this)
              }),
              (this.unfold = function(e, t) {
                var n, r
                if (
                  (null == e
                    ? ((n = new o(0, 0, this.getLength(), 0)), (t = !0))
                    : 'number' == typeof e
                      ? (n = new o(e, 0, e, this.getLine(e).length))
                      : 'row' in e
                        ? (n = o.fromPoints(e, e))
                        : (n = e),
                  (r = this.getFoldsInRangeList(n)),
                  t)
                )
                  this.removeFolds(r)
                else
                  for (var a = r; a.length; )
                    this.expandFolds(a), (a = this.getFoldsInRangeList(n))
                return r.length ? r : void 0
              }),
              (this.isRowFolded = function(e, t) {
                return !!this.getFoldLine(e, t)
              }),
              (this.getRowFoldEnd = function(e, t) {
                var o = this.getFoldLine(e, t)
                return o ? o.end.row : e
              }),
              (this.getRowFoldStart = function(e, t) {
                var o = this.getFoldLine(e, t)
                return o ? o.start.row : e
              }),
              (this.getFoldDisplayLine = function(e, t, o, n, r) {
                null == n && (n = e.start.row),
                  null == r && (r = 0),
                  null == t && (t = e.end.row),
                  null == o && (o = this.getLine(t).length)
                var a = this.doc,
                  i = ''
                return (
                  e.walk(
                    function(e, t, o, s) {
                      if (!(t < n)) {
                        if (t == n) {
                          if (o < r) return
                          s = p(r, s)
                        }
                        i += null == e ? a.getLine(t).substring(s, o) : e
                      }
                    },
                    t,
                    o
                  ),
                  i
                )
              }),
              (this.getDisplayLine = function(e, t, o, n) {
                var r = this.getFoldLine(e)
                if (!r) {
                  var a
                  return (
                    (a = this.doc.getLine(e)),
                    a.substring(n || 0, t || a.length)
                  )
                }
                return this.getFoldDisplayLine(r, e, t, o, n)
              }),
              (this.$cloneFoldData = function() {
                var e = []
                return (
                  (e = this.$foldData.map(function(t) {
                    var o = t.folds.map(function(e) {
                      return e.clone()
                    })
                    return new n(e, o)
                  })),
                  e
                )
              }),
              (this.toggleFold = function(e) {
                var t = this.selection,
                  o = t.getRange(),
                  n,
                  r
                if (o.isEmpty()) {
                  var a = o.start
                  if (((n = this.getFoldAt(a.row, a.column)), n))
                    return void this.expandFold(n)
                  ;(r = this.findMatchingBracket(a))
                    ? 1 == o.comparePoint(r)
                      ? (o.end = r)
                      : ((o.start = r), o.start.column++, o.end.column--)
                    : (r = this.findMatchingBracket({
                        row: a.row,
                        column: a.column + 1
                      }))
                      ? (1 == o.comparePoint(r) ? (o.end = r) : (o.start = r),
                        o.start.column++)
                      : (o = this.getCommentFoldRange(a.row, a.column) || o)
                } else {
                  var i = this.getFoldsInRange(o)
                  if (e && i.length) return void this.expandFolds(i)
                  1 == i.length && (n = i[0])
                }
                if (
                  (n || (n = this.getFoldAt(o.start.row, o.start.column)),
                  n && n.range.toString() == o.toString())
                )
                  return void this.expandFold(n)
                var s = '...'
                if (!o.isMultiLine()) {
                  if (((s = this.getTextRange(o)), 4 > s.length)) return
                  s = s.trim().substring(0, 2) + '..'
                }
                this.addFold(s, o)
              }),
              (this.getCommentFoldRange = function(e, t, n) {
                var r = new a(this, e, t),
                  i = r.getCurrentToken()
                if (i && /^comment|string/.test(i.type)) {
                  var s = new o(),
                    l = new RegExp(i.type.replace(/\..*/, '\\.'))
                  if (1 != n) {
                    do i = r.stepBackward()
                    while (i && l.test(i.type))
                    r.stepForward()
                  }
                  if (
                    ((s.start.row = r.getCurrentTokenRow()),
                    (s.start.column = r.getCurrentTokenColumn() + 2),
                    (r = new a(this, e, t)),
                    -1 != n)
                  ) {
                    do i = r.stepForward()
                    while (i && l.test(i.type))
                    i = r.stepBackward()
                  } else i = r.getCurrentToken()
                  return (
                    (s.end.row = r.getCurrentTokenRow()),
                    (s.end.column =
                      r.getCurrentTokenColumn() + i.value.length - 2),
                    s
                  )
                }
              }),
              (this.foldAll = function(e, t, o) {
                o == void 0 && (o = 1e5)
                var n = this.foldWidgets
                if (n) {
                  ;(t = t || this.getLength()), (e = e || 0)
                  for (var r = e; r < t; r++)
                    if (
                      (null == n[r] && (n[r] = this.getFoldWidget(r)),
                      'start' == n[r])
                    ) {
                      var a = this.getFoldWidgetRange(r)
                      if (
                        a &&
                        a.isMultiLine() &&
                        a.end.row <= t &&
                        a.start.row >= e
                      ) {
                        r = a.end.row
                        try {
                          var i = this.addFold('...', a)
                          i && (i.collapseChildren = o)
                        } catch (t) {}
                      }
                    }
                }
              }),
              (this.$foldStyles = { manual: 1, markbegin: 1, markbeginend: 1 }),
              (this.$foldStyle = 'markbegin'),
              (this.setFoldStyle = function(e) {
                if (!this.$foldStyles[e])
                  throw new Error(
                    'invalid fold style: ' +
                      e +
                      '[' +
                      Object.keys(this.$foldStyles).join(', ') +
                      ']'
                  )
                if (this.$foldStyle != e) {
                  ;(this.$foldStyle = e), 'manual' == e && this.unfold()
                  var t = this.$foldMode
                  this.$setFolding(null), this.$setFolding(t)
                }
              }),
              (this.$setFolding = function(e) {
                if (this.$foldMode != e)
                  return (
                    (this.$foldMode = e),
                    this.off('change', this.$updateFoldWidgets),
                    this.off(
                      'tokenizerUpdate',
                      this.$tokenizerUpdateFoldWidgets
                    ),
                    this._signal('changeAnnotation'),
                    e && 'manual' != this.$foldStyle
                      ? void ((this.foldWidgets = []),
                        (this.getFoldWidget = e.getFoldWidget.bind(
                          e,
                          this,
                          this.$foldStyle
                        )),
                        (this.getFoldWidgetRange = e.getFoldWidgetRange.bind(
                          e,
                          this,
                          this.$foldStyle
                        )),
                        (this.$updateFoldWidgets = this.updateFoldWidgets.bind(
                          this
                        )),
                        (this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(
                          this
                        )),
                        this.on('change', this.$updateFoldWidgets),
                        this.on(
                          'tokenizerUpdate',
                          this.$tokenizerUpdateFoldWidgets
                        ))
                      : void (this.foldWidgets = null)
                  )
              }),
              (this.getParentFoldRangeData = function(e, t) {
                var o = this.foldWidgets
                if (!o || (t && o[e])) return {}
                for (var n = e - 1, r, a; 0 <= n; ) {
                  if (
                    ((a = o[n]),
                    null == a && (a = o[n] = this.getFoldWidget(n)),
                    'start' == a)
                  ) {
                    var i = this.getFoldWidgetRange(n)
                    if ((r || (r = i), i && i.end.row >= e)) break
                  }
                  n--
                }
                return { range: -1 != n && i, firstRange: r }
              }),
              (this.onFoldWidgetClick = function(t, o) {
                o = o.domEvent
                var e = {
                    children: o.shiftKey,
                    all: o.ctrlKey || o.metaKey,
                    siblings: o.altKey
                  },
                  n = this.$toggleFoldWidget(t, e)
                if (!n) {
                  var r = o.target || o.srcElement
                  r &&
                    /ace_fold-widget/.test(r.className) &&
                    (r.className += ' ace_invalid')
                }
              }),
              (this.$toggleFoldWidget = function(e, t) {
                if (this.getFoldWidget) {
                  var o = this.getFoldWidget(e),
                    n = this.getLine(e),
                    r = 'end' === o ? -1 : 1,
                    a = this.getFoldAt(e, -1 == r ? 0 : n.length, r)
                  if (a)
                    return (
                      t.children || t.all
                        ? this.removeFold(a)
                        : this.expandFold(a),
                      a
                    )
                  var i = this.getFoldWidgetRange(e, !0)
                  if (
                    i &&
                    !i.isMultiLine() &&
                    ((a = this.getFoldAt(i.start.row, i.start.column, 1)),
                    a && i.isEqual(a.range))
                  )
                    return this.removeFold(a), a
                  if (t.siblings) {
                    var s = this.getParentFoldRangeData(e)
                    if (s.range)
                      var l = s.range.start.row + 1,
                        d = s.range.end.row
                    this.foldAll(l, d, t.all ? 1e4 : 0)
                  } else
                    t.children
                      ? ((d = i ? i.end.row : this.getLength()),
                        this.foldAll(e + 1, d, t.all ? 1e4 : 0))
                      : i &&
                        (t.all && (i.collapseChildren = 1e4),
                        this.addFold('...', i))
                  return i
                }
              }),
              (this.toggleFoldWidget = function() {
                var e = this.selection.getCursor().row
                e = this.getRowFoldStart(e)
                var t = this.$toggleFoldWidget(e, {})
                if (!t) {
                  var o = this.getParentFoldRangeData(e, !0)
                  if (((t = o.range || o.firstRange), t)) {
                    e = t.start.row
                    var n = this.getFoldAt(e, this.getLine(e).length, 1)
                    n ? this.removeFold(n) : this.addFold('...', t)
                  }
                }
              }),
              (this.updateFoldWidgets = function(e) {
                var t = e.start.row,
                  o = e.end.row - t
                if (0 == o) this.foldWidgets[t] = null
                else if ('remove' == e.action)
                  this.foldWidgets.splice(t, o + 1, null)
                else {
                  var n = Array(o + 1)
                  n.unshift(t, 1),
                    this.foldWidgets.splice.apply(this.foldWidgets, n)
                }
              }),
              (this.tokenizerUpdateFoldWidgets = function(t) {
                var e = t.data
                e.first != e.last &&
                  this.foldWidgets.length > e.first &&
                  this.foldWidgets.splice(e.first, this.foldWidgets.length)
              })
          }
        }
      ),
      ace.define(
        'ace/edit_session/bracket_match',
        ['require', 'exports', 'module', 'ace/token_iterator', 'ace/range'],
        function(e, t) {
          'use strict'
          var o = e('../token_iterator').TokenIterator,
            n = e('../range').Range
          t.BracketMatch = function() {
            ;(this.findMatchingBracket = function(e, t) {
              if (0 == e.column) return null
              var o = t || this.getLine(e.row).charAt(e.column - 1)
              if ('' == o) return null
              var n = o.match(/([\(\[\{])|([\)\]\}])/)
              return n
                ? n[1]
                  ? this.$findClosingBracket(n[1], e)
                  : this.$findOpeningBracket(n[2], e)
                : null
            }),
              (this.getBracketRange = function(e) {
                var t = this.getLine(e.row),
                  o = !0,
                  r = t.charAt(e.column - 1),
                  a = r && r.match(/([\(\[\{])|([\)\]\}])/),
                  i
                if (
                  (a ||
                    ((r = t.charAt(e.column)),
                    (e = { row: e.row, column: e.column + 1 }),
                    (a = r && r.match(/([\(\[\{])|([\)\]\}])/)),
                    (o = !1)),
                  !a)
                )
                  return null
                if (a[1]) {
                  var s = this.$findClosingBracket(a[1], e)
                  if (!s) return null
                  ;(i = n.fromPoints(e, s)),
                    o || (i.end.column++, i.start.column--),
                    (i.cursor = i.end)
                } else {
                  var s = this.$findOpeningBracket(a[2], e)
                  if (!s) return null
                  ;(i = n.fromPoints(s, e)),
                    o || (i.start.column++, i.end.column--),
                    (i.cursor = i.start)
                }
                return i
              }),
              (this.$brackets = {
                ')': '(',
                '(': ')',
                ']': '[',
                '[': ']',
                '{': '}',
                '}': '{'
              }),
              (this.$findOpeningBracket = function(e, t, n) {
                var r = this.$brackets[e],
                  a = 1,
                  i = new o(this, t.row, t.column),
                  s = i.getCurrentToken()
                if ((s || (s = i.stepForward()), !!s)) {
                  n ||
                    (n = new RegExp(
                      '(\\.?' +
                        s.type
                          .replace('.', '\\.')
                          .replace('rparen', '.paren')
                          .replace(/\b(?:end)\b/, '(?:start|begin|end)') +
                        ')+'
                    ))
                  for (
                    var l = t.column - i.getCurrentTokenColumn() - 2,
                      d = s.value;
                    ;

                  ) {
                    for (; 0 <= l; ) {
                      var c = d.charAt(l)
                      if (c != r) c == e && (a += 1)
                      else if (((a -= 1), 0 == a))
                        return {
                          row: i.getCurrentTokenRow(),
                          column: l + i.getCurrentTokenColumn()
                        }
                      l -= 1
                    }
                    do s = i.stepBackward()
                    while (s && !n.test(s.type))
                    if (null == s) break
                    ;(d = s.value), (l = d.length - 1)
                  }
                  return null
                }
              }),
              (this.$findClosingBracket = function(e, t, n) {
                var r = this.$brackets[e],
                  a = 1,
                  i = new o(this, t.row, t.column),
                  s = i.getCurrentToken()
                if ((s || (s = i.stepForward()), !!s)) {
                  n ||
                    (n = new RegExp(
                      '(\\.?' +
                        s.type
                          .replace('.', '\\.')
                          .replace('lparen', '.paren')
                          .replace(
                            /\b(?:start|begin)\b/,
                            '(?:start|begin|end)'
                          ) +
                        ')+'
                    ))
                  for (var l = t.column - i.getCurrentTokenColumn(); ; ) {
                    for (var d = s.value, c = d.length, u; l < c; ) {
                      if (((u = d.charAt(l)), u != r)) u == e && (a += 1)
                      else if (((a -= 1), 0 == a))
                        return {
                          row: i.getCurrentTokenRow(),
                          column: l + i.getCurrentTokenColumn()
                        }
                      l += 1
                    }
                    do s = i.stepForward()
                    while (s && !n.test(s.type))
                    if (null == s) break
                    l = 0
                  }
                  return null
                }
              })
          }
        }
      ),
      ace.define(
        'ace/edit_session',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/lang',
          'ace/config',
          'ace/lib/event_emitter',
          'ace/selection',
          'ace/mode/text',
          'ace/range',
          'ace/document',
          'ace/background_tokenizer',
          'ace/search_highlight',
          'ace/edit_session/folding',
          'ace/edit_session/bracket_match'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            n = e('./lib/lang'),
            r = e('./config'),
            i = e('./lib/event_emitter').EventEmitter,
            s = e('./selection').Selection,
            c = e('./mode/text').Mode,
            g = e('./range').Range,
            h = e('./document').Document,
            m = e('./background_tokenizer').BackgroundTokenizer,
            f = e('./search_highlight').SearchHighlight,
            y = function(e, t) {
              ;(this.$breakpoints = []),
                (this.$decorations = []),
                (this.$frontMarkers = {}),
                (this.$backMarkers = {}),
                (this.$markerId = 1),
                (this.$undoSelect = !0),
                (this.$foldData = []),
                (this.id = 'session' + ++y.$uid),
                (this.$foldData.toString = function() {
                  return this.join('\n')
                }),
                this.on('changeFold', this.onChangeFold.bind(this)),
                (this.$onChange = this.onChange.bind(this)),
                ('object' == typeof e && e.getLine) || (e = new h(e)),
                this.setDocument(e),
                (this.selection = new s(this)),
                r.resetOptions(this),
                this.setMode(t),
                r._signal('session', this)
            }
          ;(function() {
            function e(e) {
              return (
                !(4352 > e) &&
                ((4352 <= e && 4447 >= e) ||
                  (4515 <= e && 4519 >= e) ||
                  (4602 <= e && 4607 >= e) ||
                  (9001 <= e && 9002 >= e) ||
                  (11904 <= e && 11929 >= e) ||
                  (11931 <= e && 12019 >= e) ||
                  (12032 <= e && 12245 >= e) ||
                  (12272 <= e && 12283 >= e) ||
                  (12288 <= e && 12350 >= e) ||
                  (12353 <= e && 12438 >= e) ||
                  (12441 <= e && 12543 >= e) ||
                  (12549 <= e && 12589 >= e) ||
                  (12593 <= e && 12686 >= e) ||
                  (12688 <= e && 12730 >= e) ||
                  (12736 <= e && 12771 >= e) ||
                  (12784 <= e && 12830 >= e) ||
                  (12832 <= e && 12871 >= e) ||
                  (12880 <= e && 13054 >= e) ||
                  (13056 <= e && 19903 >= e) ||
                  (19968 <= e && 42124 >= e) ||
                  (42128 <= e && 42182 >= e) ||
                  (43360 <= e && 43388 >= e) ||
                  (44032 <= e && 55203 >= e) ||
                  (55216 <= e && 55238 >= e) ||
                  (55243 <= e && 55291 >= e) ||
                  (63744 <= e && 64255 >= e) ||
                  (65040 <= e && 65049 >= e) ||
                  (65072 <= e && 65106 >= e) ||
                  (65108 <= e && 65126 >= e) ||
                  (65128 <= e && 65131 >= e) ||
                  (65281 <= e && 65376 >= e) ||
                  (65504 <= e && 65510 >= e))
              )
            }
            o.implement(this, i),
              (this.setDocument = function(e) {
                this.doc && this.doc.removeListener('change', this.$onChange),
                  (this.doc = e),
                  e.on('change', this.$onChange),
                  this.bgTokenizer &&
                    this.bgTokenizer.setDocument(this.getDocument()),
                  this.resetCaches()
              }),
              (this.getDocument = function() {
                return this.doc
              }),
              (this.$resetRowCache = function(e) {
                if (!e)
                  return (
                    (this.$docRowCache = []), void (this.$screenRowCache = [])
                  )
                var t = this.$docRowCache.length,
                  o = this.$getRowCacheIndex(this.$docRowCache, e) + 1
                t > o &&
                  (this.$docRowCache.splice(o, t),
                  this.$screenRowCache.splice(o, t))
              }),
              (this.$getRowCacheIndex = function(e, t) {
                for (var o = 0, n = e.length - 1; o <= n; ) {
                  var r = (o + n) >> 1,
                    a = e[r]
                  if (t > a) o = r + 1
                  else if (t < a) n = r - 1
                  else return r
                }
                return o - 1
              }),
              (this.resetCaches = function() {
                ;(this.$modified = !0),
                  (this.$wrapData = []),
                  (this.$rowLengthCache = []),
                  this.$resetRowCache(0),
                  this.bgTokenizer && this.bgTokenizer.start(0)
              }),
              (this.onChangeFold = function(t) {
                var e = t.data
                this.$resetRowCache(e.start.row)
              }),
              (this.onChange = function(e) {
                ;(this.$modified = !0), this.$resetRowCache(e.start.row)
                var t = this.$updateInternalDataOnChange(e)
                this.$fromUndo ||
                  !this.$undoManager ||
                  e.ignore ||
                  (this.$deltasDoc.push(e),
                  t &&
                    0 != t.length &&
                    this.$deltasFold.push({ action: 'removeFolds', folds: t }),
                  this.$informUndoManager.schedule()),
                  this.bgTokenizer && this.bgTokenizer.$updateOnChange(e),
                  this._signal('change', e)
              }),
              (this.setValue = function(e) {
                this.doc.setValue(e),
                  this.selection.moveTo(0, 0),
                  this.$resetRowCache(0),
                  (this.$deltas = []),
                  (this.$deltasDoc = []),
                  (this.$deltasFold = []),
                  this.setUndoManager(this.$undoManager),
                  this.getUndoManager().reset()
              }),
              (this.getValue = this.toString = function() {
                return this.doc.getValue()
              }),
              (this.getSelection = function() {
                return this.selection
              }),
              (this.getState = function(e) {
                return this.bgTokenizer.getState(e)
              }),
              (this.getTokens = function(e) {
                return this.bgTokenizer.getTokens(e)
              }),
              (this.getTokenAt = function(e, t) {
                var o = this.bgTokenizer.getTokens(e),
                  n = 0,
                  r
                if (null == t) (a = o.length - 1), (n = this.getLine(e).length)
                else
                  for (
                    var a = 0;
                    a < o.length && ((n += o[a].value.length), !(n >= t));
                    a++
                  );
                return ((r = o[a]), !r)
                  ? null
                  : ((r.index = a), (r.start = n - r.value.length), r)
              }),
              (this.setUndoManager = function(e) {
                if (
                  ((this.$undoManager = e),
                  (this.$deltas = []),
                  (this.$deltasDoc = []),
                  (this.$deltasFold = []),
                  this.$informUndoManager && this.$informUndoManager.cancel(),
                  e)
                ) {
                  var t = this
                  ;(this.$syncInformUndoManager = function() {
                    t.$informUndoManager.cancel(),
                      t.$deltasFold.length &&
                        (t.$deltas.push({
                          group: 'fold',
                          deltas: t.$deltasFold
                        }),
                        (t.$deltasFold = [])),
                      t.$deltasDoc.length &&
                        (t.$deltas.push({ group: 'doc', deltas: t.$deltasDoc }),
                        (t.$deltasDoc = [])),
                      0 < t.$deltas.length &&
                        e.execute({
                          action: 'aceupdate',
                          args: [t.$deltas, t],
                          merge: t.mergeUndoDeltas
                        }),
                      (t.mergeUndoDeltas = !1),
                      (t.$deltas = [])
                  }),
                    (this.$informUndoManager = n.delayedCall(
                      this.$syncInformUndoManager
                    ))
                }
              }),
              (this.markUndoGroup = function() {
                this.$syncInformUndoManager && this.$syncInformUndoManager()
              }),
              (this.$defaultUndoManager = {
                undo: function() {},
                redo: function() {},
                reset: function() {}
              }),
              (this.getUndoManager = function() {
                return this.$undoManager || this.$defaultUndoManager
              }),
              (this.getTabString = function() {
                return this.getUseSoftTabs()
                  ? n.stringRepeat(' ', this.getTabSize())
                  : '\t'
              }),
              (this.setUseSoftTabs = function(e) {
                this.setOption('useSoftTabs', e)
              }),
              (this.getUseSoftTabs = function() {
                return this.$useSoftTabs && !this.$mode.$indentWithTabs
              }),
              (this.setTabSize = function(e) {
                this.setOption('tabSize', e)
              }),
              (this.getTabSize = function() {
                return this.$tabSize
              }),
              (this.isTabStop = function(e) {
                return this.$useSoftTabs && 0 == e.column % this.$tabSize
              }),
              (this.$overwrite = !1),
              (this.setOverwrite = function(e) {
                this.setOption('overwrite', e)
              }),
              (this.getOverwrite = function() {
                return this.$overwrite
              }),
              (this.toggleOverwrite = function() {
                this.setOverwrite(!this.$overwrite)
              }),
              (this.addGutterDecoration = function(e, t) {
                this.$decorations[e] || (this.$decorations[e] = ''),
                  (this.$decorations[e] += ' ' + t),
                  this._signal('changeBreakpoint', {})
              }),
              (this.removeGutterDecoration = function(e, t) {
                ;(this.$decorations[e] = (this.$decorations[e] || '').replace(
                  ' ' + t,
                  ''
                )),
                  this._signal('changeBreakpoint', {})
              }),
              (this.getBreakpoints = function() {
                return this.$breakpoints
              }),
              (this.setBreakpoints = function(e) {
                this.$breakpoints = []
                for (var t = 0; t < e.length; t++)
                  this.$breakpoints[e[t]] = 'ace_breakpoint'
                this._signal('changeBreakpoint', {})
              }),
              (this.clearBreakpoints = function() {
                ;(this.$breakpoints = []), this._signal('changeBreakpoint', {})
              }),
              (this.setBreakpoint = function(e, t) {
                t === void 0 && (t = 'ace_breakpoint'),
                  t ? (this.$breakpoints[e] = t) : delete this.$breakpoints[e],
                  this._signal('changeBreakpoint', {})
              }),
              (this.clearBreakpoint = function(e) {
                delete this.$breakpoints[e],
                  this._signal('changeBreakpoint', {})
              }),
              (this.addMarker = function(e, t, o, n) {
                var r = this.$markerId++,
                  a = {
                    range: e,
                    type: o || 'line',
                    renderer: 'function' == typeof o ? o : null,
                    clazz: t,
                    inFront: !!n,
                    id: r
                  }
                return (
                  n
                    ? ((this.$frontMarkers[r] = a),
                      this._signal('changeFrontMarker'))
                    : ((this.$backMarkers[r] = a),
                      this._signal('changeBackMarker')),
                  r
                )
              }),
              (this.addDynamicMarker = function(e, t) {
                if (e.update) {
                  var o = this.$markerId++
                  return (
                    (e.id = o),
                    (e.inFront = !!t),
                    t
                      ? ((this.$frontMarkers[o] = e),
                        this._signal('changeFrontMarker'))
                      : ((this.$backMarkers[o] = e),
                        this._signal('changeBackMarker')),
                    e
                  )
                }
              }),
              (this.removeMarker = function(e) {
                var t = this.$frontMarkers[e] || this.$backMarkers[e]
                if (t) {
                  var o = t.inFront ? this.$frontMarkers : this.$backMarkers
                  t &&
                    (delete o[e],
                    this._signal(
                      t.inFront ? 'changeFrontMarker' : 'changeBackMarker'
                    ))
                }
              }),
              (this.getMarkers = function(e) {
                return e ? this.$frontMarkers : this.$backMarkers
              }),
              (this.highlight = function(e) {
                if (!this.$searchHighlight) {
                  var t = new f(null, 'ace_selected-word', 'text')
                  this.$searchHighlight = this.addDynamicMarker(t)
                }
                this.$searchHighlight.setRegexp(e)
              }),
              (this.highlightLines = function(e, t, o, n) {
                'number' != typeof t && ((o = t), (t = e)),
                  o || (o = 'ace_step')
                var r = new g(e, 0, t, Infinity)
                return (r.id = this.addMarker(r, o, 'fullLine', n)), r
              }),
              (this.setAnnotations = function(e) {
                ;(this.$annotations = e), this._signal('changeAnnotation', {})
              }),
              (this.getAnnotations = function() {
                return this.$annotations || []
              }),
              (this.clearAnnotations = function() {
                this.setAnnotations([])
              }),
              (this.$detectNewLine = function(e) {
                var t = e.match(/^.*?(\r?\n)/m)
                this.$autoNewLine = t ? t[1] : '\n'
              }),
              (this.getWordRange = function(e, t) {
                var o = this.getLine(e),
                  n = !1
                if (
                  (0 < t && (n = !!o.charAt(t - 1).match(this.tokenRe)),
                  n || (n = !!o.charAt(t).match(this.tokenRe)),
                  n)
                )
                  var r = this.tokenRe
                else if (/^\s+$/.test(o.slice(t - 1, t + 1))) var r = /\s/
                else var r = this.nonTokenRe
                var a = t
                if (0 < a) {
                  do a--
                  while (0 <= a && o.charAt(a).match(r))
                  a++
                }
                for (var i = t; i < o.length && o.charAt(i).match(r); ) i++
                return new g(e, a, e, i)
              }),
              (this.getAWordRange = function(e, t) {
                for (
                  var o = this.getWordRange(e, t), n = this.getLine(o.end.row);
                  n.charAt(o.end.column).match(/[ \t]/);

                )
                  o.end.column += 1
                return o
              }),
              (this.setNewLineMode = function(e) {
                this.doc.setNewLineMode(e)
              }),
              (this.getNewLineMode = function() {
                return this.doc.getNewLineMode()
              }),
              (this.setUseWorker = function(e) {
                this.setOption('useWorker', e)
              }),
              (this.getUseWorker = function() {
                return this.$useWorker
              }),
              (this.onReloadTokenizer = function(t) {
                var e = t.data
                this.bgTokenizer.start(e.first),
                  this._signal('tokenizerUpdate', t)
              }),
              (this.$modes = {}),
              (this.$mode = null),
              (this.$modeId = null),
              (this.setMode = function(e, t) {
                if (e && 'object' == typeof e) {
                  if (e.getTokenizer) return this.$onChangeMode(e)
                  var o = e,
                    n = o.path
                } else n = e || 'ace/mode/text'
                return (
                  this.$modes['ace/mode/text'] ||
                    (this.$modes['ace/mode/text'] = new c()),
                  this.$modes[n] && !o
                    ? (this.$onChangeMode(this.$modes[n]), void (t && t()))
                    : void ((this.$modeId = n),
                      r.loadModule(
                        ['mode', n],
                        function(e) {
                          return this.$modeId === n
                            ? void (this.$modes[n] && !o
                                ? this.$onChangeMode(this.$modes[n])
                                : e &&
                                  e.Mode &&
                                  ((e = new e.Mode(o)),
                                  !o && ((this.$modes[n] = e), (e.$id = n)),
                                  this.$onChangeMode(e)),
                              t && t())
                            : t && t()
                        }.bind(this)
                      ),
                      !this.$mode &&
                        this.$onChangeMode(this.$modes['ace/mode/text'], !0))
                )
              }),
              (this.$onChangeMode = function(e, t) {
                if ((t || (this.$modeId = e.$id), this.$mode !== e)) {
                  ;(this.$mode = e),
                    this.$stopWorker(),
                    this.$useWorker && this.$startWorker()
                  var o = e.getTokenizer()
                  if (void 0 !== o.addEventListener) {
                    var n = this.onReloadTokenizer.bind(this)
                    o.addEventListener('update', n)
                  }
                  if (!this.bgTokenizer) {
                    this.bgTokenizer = new m(o)
                    var r = this
                    this.bgTokenizer.addEventListener('update', function(t) {
                      r._signal('tokenizerUpdate', t)
                    })
                  } else this.bgTokenizer.setTokenizer(o)
                  this.bgTokenizer.setDocument(this.getDocument()),
                    (this.tokenRe = e.tokenRe),
                    (this.nonTokenRe = e.nonTokenRe),
                    t ||
                      (e.attachToSession && e.attachToSession(this),
                      this.$options.wrapMethod.set.call(this, this.$wrapMethod),
                      this.$setFolding(e.foldingRules),
                      this.bgTokenizer.start(0),
                      this._emit('changeMode'))
                }
              }),
              (this.$stopWorker = function() {
                this.$worker &&
                  (this.$worker.terminate(), (this.$worker = null))
              }),
              (this.$startWorker = function() {
                try {
                  this.$worker = this.$mode.createWorker(this)
                } catch (t) {
                  r.warn('Could not load worker', t), (this.$worker = null)
                }
              }),
              (this.getMode = function() {
                return this.$mode
              }),
              (this.$scrollTop = 0),
              (this.setScrollTop = function(e) {
                this.$scrollTop === e ||
                  isNaN(e) ||
                  ((this.$scrollTop = e), this._signal('changeScrollTop', e))
              }),
              (this.getScrollTop = function() {
                return this.$scrollTop
              }),
              (this.$scrollLeft = 0),
              (this.setScrollLeft = function(e) {
                this.$scrollLeft === e ||
                  isNaN(e) ||
                  ((this.$scrollLeft = e), this._signal('changeScrollLeft', e))
              }),
              (this.getScrollLeft = function() {
                return this.$scrollLeft
              }),
              (this.getScreenWidth = function() {
                return (
                  this.$computeWidth(),
                  this.lineWidgets
                    ? p(this.getLineWidgetMaxWidth(), this.screenWidth)
                    : this.screenWidth
                )
              }),
              (this.getLineWidgetMaxWidth = function() {
                if (null != this.lineWidgetsWidth) return this.lineWidgetsWidth
                var e = 0
                return (
                  this.lineWidgets.forEach(function(t) {
                    t && t.screenWidth > e && (e = t.screenWidth)
                  }),
                  (this.lineWidgetWidth = e)
                )
              }),
              (this.$computeWidth = function(e) {
                if (this.$modified || e) {
                  if (((this.$modified = !1), this.$useWrapMode))
                    return (this.screenWidth = this.$wrapLimit)
                  for (
                    var t = this.doc.getAllLines(),
                      o = this.$rowLengthCache,
                      n = 0,
                      r = 0,
                      a = this.$foldData[r],
                      s = a ? a.start.row : Infinity,
                      l = t.length,
                      d = 0;
                    d < l;
                    d++
                  ) {
                    if (d > s) {
                      if (((d = a.end.row + 1), d >= l)) break
                      ;(a = this.$foldData[r++]),
                        (s = a ? a.start.row : Infinity)
                    }
                    null == o[d] &&
                      (o[d] = this.$getStringScreenWidth(t[d])[0]),
                      o[d] > n && (n = o[d])
                  }
                  this.screenWidth = n
                }
              }),
              (this.getLine = function(e) {
                return this.doc.getLine(e)
              }),
              (this.getLines = function(e, t) {
                return this.doc.getLines(e, t)
              }),
              (this.getLength = function() {
                return this.doc.getLength()
              }),
              (this.getTextRange = function(e) {
                return this.doc.getTextRange(e || this.selection.getRange())
              }),
              (this.insert = function(e, t) {
                return this.doc.insert(e, t)
              }),
              (this.remove = function(e) {
                return this.doc.remove(e)
              }),
              (this.removeFullLines = function(e, t) {
                return this.doc.removeFullLines(e, t)
              }),
              (this.undoChanges = function(e, t) {
                if (e.length) {
                  this.$fromUndo = !0
                  for (var o = null, n = e.length - 1, r; -1 != n; n--)
                    (r = e[n]),
                      'doc' == r.group
                        ? (this.doc.revertDeltas(r.deltas),
                          (o = this.$getUndoSelection(r.deltas, !0, o)))
                        : r.deltas.forEach(function(e) {
                            this.addFolds(e.folds)
                          }, this)
                  return (
                    (this.$fromUndo = !1),
                    o &&
                      this.$undoSelect &&
                      !t &&
                      this.selection.setSelectionRange(o),
                    o
                  )
                }
              }),
              (this.redoChanges = function(e, t) {
                if (e.length) {
                  this.$fromUndo = !0
                  for (var o = null, n = 0, r; n < e.length; n++)
                    (r = e[n]),
                      'doc' == r.group &&
                        (this.doc.applyDeltas(r.deltas),
                        (o = this.$getUndoSelection(r.deltas, !1, o)))
                  return (
                    (this.$fromUndo = !1),
                    o &&
                      this.$undoSelect &&
                      !t &&
                      this.selection.setSelectionRange(o),
                    o
                  )
                }
              }),
              (this.setUndoSelect = function(e) {
                this.$undoSelect = e
              }),
              (this.$getUndoSelection = function(e, t, o) {
                function n(e) {
                  return t ? 'insert' !== e.action : 'insert' === e.action
                }
                var r = e[0],
                  a = !1,
                  s,
                  l
                n(r)
                  ? ((s = g.fromPoints(r.start, r.end)), (a = !0))
                  : ((s = g.fromPoints(r.start, r.start)), (a = !1))
                for (var d = 1; d < e.length; d++)
                  (r = e[d]),
                    n(r)
                      ? ((l = r.start),
                        -1 == s.compare(l.row, l.column) && s.setStart(l),
                        (l = r.end),
                        1 == s.compare(l.row, l.column) && s.setEnd(l),
                        (a = !0))
                      : ((l = r.start),
                        -1 == s.compare(l.row, l.column) &&
                          (s = g.fromPoints(r.start, r.start)),
                        (a = !1))
                if (null != o) {
                  0 === g.comparePoints(o.start, s.start) &&
                    ((o.start.column += s.end.column - s.start.column),
                    (o.end.column += s.end.column - s.start.column))
                  var i = o.compareRange(s)
                  1 == i ? s.setStart(o.start) : -1 == i && s.setEnd(o.end)
                }
                return s
              }),
              (this.replace = function(e, t) {
                return this.doc.replace(e, t)
              }),
              (this.moveText = function(e, t, o) {
                var n = this.getTextRange(e),
                  r = this.getFoldsInRange(e),
                  a = g.fromPoints(t, t)
                if (!o) {
                  this.remove(e)
                  var i = e.start.row - e.end.row,
                    s = i ? -e.end.column : e.start.column - e.end.column
                  s &&
                    (a.start.row == e.end.row &&
                      a.start.column > e.end.column &&
                      (a.start.column += s),
                    a.end.row == e.end.row &&
                      a.end.column > e.end.column &&
                      (a.end.column += s)),
                    i &&
                      a.start.row >= e.end.row &&
                      ((a.start.row += i), (a.end.row += i))
                }
                if (((a.end = this.insert(a.start, n)), r.length)) {
                  var l = e.start,
                    d = a.start,
                    i = d.row - l.row,
                    s = d.column - l.column
                  this.addFolds(
                    r.map(function(e) {
                      return (
                        (e = e.clone()),
                        e.start.row == l.row && (e.start.column += s),
                        e.end.row == l.row && (e.end.column += s),
                        (e.start.row += i),
                        (e.end.row += i),
                        e
                      )
                    })
                  )
                }
                return a
              }),
              (this.indentRows = function(e, t, o) {
                o = o.replace(/\t/g, this.getTabString())
                for (var n = e; n <= t; n++)
                  this.doc.insertInLine({ row: n, column: 0 }, o)
              }),
              (this.outdentRows = function(e) {
                for (
                  var t = e.collapseRows(),
                    o = new g(0, 0, 0, 0),
                    n = this.getTabSize(),
                    r = t.start.row,
                    a;
                  r <= t.end.row;
                  ++r
                ) {
                  ;(a = this.getLine(r)), (o.start.row = r), (o.end.row = r)
                  for (var i = 0; i < n && !(' ' != a.charAt(i)); ++i);
                  i < n && '\t' == a.charAt(i)
                    ? ((o.start.column = i), (o.end.column = i + 1))
                    : ((o.start.column = 0), (o.end.column = i)),
                    this.remove(o)
                }
              }),
              (this.$moveLines = function(e, t, o) {
                if (
                  ((e = this.getRowFoldStart(e)),
                  (t = this.getRowFoldEnd(t)),
                  0 > o)
                ) {
                  var n = this.getRowFoldStart(e + o)
                  if (0 > n) return 0
                  var r = n - e
                } else if (0 < o) {
                  var n = this.getRowFoldEnd(t + o)
                  if (n > this.doc.getLength() - 1) return 0
                  var r = n - t
                } else {
                  ;(e = this.$clipRowToDocument(e)),
                    (t = this.$clipRowToDocument(t))
                  var r = t - e + 1
                }
                var i = new g(e, 0, t, a),
                  s = this.getFoldsInRange(i).map(function(e) {
                    return (
                      (e = e.clone()), (e.start.row += r), (e.end.row += r), e
                    )
                  }),
                  l =
                    0 == o
                      ? this.doc.getLines(e, t)
                      : this.doc.removeFullLines(e, t)
                return (
                  this.doc.insertFullLines(e + r, l),
                  s.length && this.addFolds(s),
                  r
                )
              }),
              (this.moveLinesUp = function(e, t) {
                return this.$moveLines(e, t, -1)
              }),
              (this.moveLinesDown = function(e, t) {
                return this.$moveLines(e, t, 1)
              }),
              (this.duplicateLines = function(e, t) {
                return this.$moveLines(e, t, 0)
              }),
              (this.$clipRowToDocument = function(e) {
                return p(0, u(e, this.doc.getLength() - 1))
              }),
              (this.$clipColumnToRow = function(e, t) {
                return 0 > t ? 0 : u(this.doc.getLine(e).length, t)
              }),
              (this.$clipPositionToDocument = function(e, t) {
                if (((t = p(0, t)), 0 > e)) (e = 0), (t = 0)
                else {
                  var o = this.doc.getLength()
                  e >= o
                    ? ((e = o - 1), (t = this.doc.getLine(o - 1).length))
                    : (t = u(this.doc.getLine(e).length, t))
                }
                return { row: e, column: t }
              }),
              (this.$clipRangeToDocument = function(e) {
                0 > e.start.row
                  ? ((e.start.row = 0), (e.start.column = 0))
                  : (e.start.column = this.$clipColumnToRow(
                      e.start.row,
                      e.start.column
                    ))
                var t = this.doc.getLength() - 1
                return (
                  e.end.row > t
                    ? ((e.end.row = t),
                      (e.end.column = this.doc.getLine(t).length))
                    : (e.end.column = this.$clipColumnToRow(
                        e.end.row,
                        e.end.column
                      )),
                  e
                )
              }),
              (this.$wrapLimit = 80),
              (this.$useWrapMode = !1),
              (this.$wrapLimitRange = { min: null, max: null }),
              (this.setUseWrapMode = function(e) {
                if (e != this.$useWrapMode) {
                  if (
                    ((this.$useWrapMode = e),
                    (this.$modified = !0),
                    this.$resetRowCache(0),
                    e)
                  ) {
                    var t = this.getLength()
                    ;(this.$wrapData = Array(t)), this.$updateWrapData(0, t - 1)
                  }
                  this._signal('changeWrapMode')
                }
              }),
              (this.getUseWrapMode = function() {
                return this.$useWrapMode
              }),
              (this.setWrapLimitRange = function(e, t) {
                ;(this.$wrapLimitRange.min !== e ||
                  this.$wrapLimitRange.max !== t) &&
                  ((this.$wrapLimitRange = { min: e, max: t }),
                  (this.$modified = !0),
                  this.$useWrapMode && this._signal('changeWrapMode'))
              }),
              (this.adjustWrapLimit = function(e, t) {
                var o = this.$wrapLimitRange
                0 > o.max && (o = { min: t, max: t })
                var n = this.$constrainWrapLimit(e, o.min, o.max)
                return (
                  n != this.$wrapLimit &&
                  1 < n &&
                  ((this.$wrapLimit = n),
                  (this.$modified = !0),
                  this.$useWrapMode &&
                    (this.$updateWrapData(0, this.getLength() - 1),
                    this.$resetRowCache(0),
                    this._signal('changeWrapLimit')),
                  !0)
                )
              }),
              (this.$constrainWrapLimit = function(e, t, o) {
                return t && (e = p(t, e)), o && (e = u(o, e)), e
              }),
              (this.getWrapLimit = function() {
                return this.$wrapLimit
              }),
              (this.setWrapLimit = function(e) {
                this.setWrapLimitRange(e, e)
              }),
              (this.getWrapLimitRange = function() {
                return {
                  min: this.$wrapLimitRange.min,
                  max: this.$wrapLimitRange.max
                }
              }),
              (this.$updateInternalDataOnChange = function(e) {
                var t = this.$useWrapMode,
                  o = e.action,
                  n = e.start,
                  r = e.end,
                  a = n.row,
                  i = r.row,
                  s = i - a,
                  l = null
                if (((this.$updating = !0), 0 == s)) {
                  ;(s = d(e.start.column - e.end.column)),
                    'remove' === o &&
                      ((l = this.getFoldsInRange(e)),
                      this.removeFolds(l),
                      (s = -s))
                  var c = this.getFoldLine(a)
                  c && c.addRemoveChars(a, n.column, s)
                } else if ('remove' === o) {
                  this[t ? '$wrapData' : '$rowLengthCache'].splice(a, s)
                  var u = this.$foldData
                  ;(l = this.getFoldsInRange(e)), this.removeFolds(l)
                  var c = this.getFoldLine(r.row),
                    p = 0
                  if (c) {
                    c.addRemoveChars(r.row, r.column, n.column - r.column),
                      c.shiftRow(-s)
                    var g = this.getFoldLine(a)
                    g && g !== c && (g.merge(c), (c = g)),
                      (p = u.indexOf(c) + 1)
                  }
                  for (p; p < u.length; p++) {
                    var c = u[p]
                    c.start.row >= r.row && c.shiftRow(-s)
                  }
                  i = a
                } else {
                  var h = Array(s)
                  h.unshift(a, 0)
                  var m = t ? this.$wrapData : this.$rowLengthCache
                  m.splice.apply(m, h)
                  var u = this.$foldData,
                    c = this.getFoldLine(a),
                    p = 0
                  if (c) {
                    var f = c.range.compareInside(n.row, n.column)
                    0 == f
                      ? ((c = c.split(n.row, n.column)),
                        c &&
                          (c.shiftRow(s),
                          c.addRemoveChars(i, 0, r.column - n.column)))
                      : -1 == f &&
                        (c.addRemoveChars(a, 0, r.column - n.column),
                        c.shiftRow(s)),
                      (p = u.indexOf(c) + 1)
                  }
                  for (p; p < u.length; p++) {
                    var c = u[p]
                    c.start.row >= a && c.shiftRow(s)
                  }
                }
                return (
                  t &&
                    this.$wrapData.length != this.doc.getLength() &&
                    console.error(
                      'doc.getLength() and $wrapData.length have to be the same!'
                    ),
                  (this.$updating = !1),
                  t
                    ? this.$updateWrapData(a, i)
                    : this.$updateRowLengthCache(a, i),
                  l
                )
              }),
              (this.$updateRowLengthCache = function(e, t) {
                ;(this.$rowLengthCache[e] = null),
                  (this.$rowLengthCache[t] = null)
              }),
              (this.$updateWrapData = function(e, t) {
                var o = this.doc.getAllLines(),
                  n = this.getTabSize(),
                  r = this.$wrapData,
                  a = this.$wrapLimit,
                  i = e,
                  s,
                  l
                for (t = u(t, o.length - 1); i <= t; )
                  (l = this.getFoldLine(i, l)),
                    l
                      ? ((s = []),
                        l.walk(
                          function(e, t, n, r) {
                            var a
                            if (null != e) {
                              ;(a = this.$getDisplayTokens(e, s.length)),
                                (a[0] = h)
                              for (var l = 1; l < a.length; l++) a[l] = y
                            } else
                              a = this.$getDisplayTokens(
                                o[t].substring(r, n),
                                s.length
                              )
                            s = s.concat(a)
                          }.bind(this),
                          l.end.row,
                          o[l.end.row].length + 1
                        ),
                        (r[l.start.row] = this.$computeWrapSplits(s, a, n)),
                        (i = l.end.row + 1))
                      : ((s = this.$getDisplayTokens(o[i])),
                        (r[i] = this.$computeWrapSplits(s, a, n)),
                        i++)
              })
            var t = 1,
              s = 2,
              h = 3,
              y = 4,
              A = 9,
              C = 10,
              w = 11,
              E = 12
            ;(this.$computeWrapSplits = function(e, t, o) {
              function n() {
                var t = 0
                if (0 === f) return t
                if (m)
                  for (var n = 0, r; n < e.length; n++)
                    if (((r = e[n]), r == C)) t += 1
                    else if (r == w) t += o
                    else if (r == E) continue
                    else break
                return g && !1 !== m && (t += o), u(t, f)
              }
              function r(t) {
                var o = e.slice(d, t),
                  r = o.length
                o
                  .join('')
                  .replace(/12/g, function() {
                    r -= 1
                  })
                  .replace(/2/g, function() {
                    r -= 1
                  }),
                  a.length || ((b = n()), (a.indent = b)),
                  (c += r),
                  a.push(c),
                  (d = t)
              }
              if (0 == e.length) return []
              for (
                var a = [],
                  i = e.length,
                  d = 0,
                  c = 0,
                  g = this.$wrapAsCode,
                  m = this.$indentedSoftWrap,
                  f = t <= p(2 * o, 8) || !1 === m ? 0 : l(t / 2),
                  b = 0;
                i - d > t - b;

              ) {
                var v = d + t - b
                if (e[v - 1] >= C && e[v] >= C) {
                  r(v)
                  continue
                }
                if (e[v] == h || e[v] == y) {
                  for (v; v != d - 1 && e[v] != h; v--);
                  if (v > d) {
                    r(v)
                    continue
                  }
                  for (v = d + t, v; v < e.length && e[v] == y; v++);
                  if (v == e.length) break
                  r(v)
                  continue
                }
                for (var F = p(v - (t - (t >> 2)), d - 1); v > F && e[v] < h; )
                  v--
                if (g) {
                  for (; v > F && e[v] < h; ) v--
                  for (; v > F && e[v] == A; ) v--
                } else for (; v > F && e[v] < C; ) v--
                if (v > F) {
                  r(++v)
                  continue
                }
                ;(v = d + t), e[v] == s && v--, r(v - b)
              }
              return a
            }),
              (this.$getDisplayTokens = function(o, r) {
                var a = [],
                  l
                r = r || 0
                for (var d = 0, i; d < o.length; d++)
                  if (((i = o.charCodeAt(d)), 9 == i)) {
                    ;(l = this.getScreenTabSize(a.length + r)), a.push(w)
                    for (var c = 1; c < l; c++) a.push(E)
                  } else
                    32 == i
                      ? a.push(C)
                      : (39 < i && 48 > i) || (57 < i && 64 > i)
                        ? a.push(A)
                        : 4352 <= i && e(i)
                          ? a.push(t, s)
                          : a.push(t)
                return a
              }),
              (this.$getStringScreenWidth = function(t, o, n) {
                if (0 == o) return [0, 0]
                null == o && (o = Infinity), (n = n || 0)
                var r, a
                for (
                  a = 0;
                  a < t.length &&
                  ((r = t.charCodeAt(a)),
                  (n +=
                    9 == r
                      ? this.getScreenTabSize(n)
                      : 4352 <= r && e(r)
                        ? 2
                        : 1),
                  !(n > o));
                  a++
                );
                return [n, a]
              }),
              (this.lineWidgets = null),
              (this.getRowLength = function(e) {
                if (this.lineWidgets)
                  var t =
                    (this.lineWidgets[e] && this.lineWidgets[e].rowCount) || 0
                else t = 0
                return this.$useWrapMode && this.$wrapData[e]
                  ? this.$wrapData[e].length + 1 + t
                  : 1 + t
              }),
              (this.getRowLineCount = function(e) {
                return this.$useWrapMode && this.$wrapData[e]
                  ? this.$wrapData[e].length + 1
                  : 1
              }),
              (this.getRowWrapIndent = function(e) {
                if (this.$useWrapMode) {
                  var t = this.screenToDocumentPosition(e, Number.MAX_VALUE),
                    o = this.$wrapData[t.row]
                  return o.length && o[0] < t.column ? o.indent : 0
                }
                return 0
              }),
              (this.getScreenLastRowColumn = function(e) {
                var t = this.screenToDocumentPosition(e, Number.MAX_VALUE)
                return this.documentToScreenColumn(t.row, t.column)
              }),
              (this.getDocumentLastRowColumn = function(e, t) {
                var o = this.documentToScreenRow(e, t)
                return this.getScreenLastRowColumn(o)
              }),
              (this.getDocumentLastRowColumnPosition = function(e, t) {
                var o = this.documentToScreenRow(e, t)
                return this.screenToDocumentPosition(o, a / 10)
              }),
              (this.getRowSplitData = function(e) {
                return this.$useWrapMode ? this.$wrapData[e] : void 0
              }),
              (this.getScreenTabSize = function(e) {
                return this.$tabSize - (e % this.$tabSize)
              }),
              (this.screenToDocumentRow = function(e, t) {
                return this.screenToDocumentPosition(e, t).row
              }),
              (this.screenToDocumentColumn = function(e, t) {
                return this.screenToDocumentPosition(e, t).column
              }),
              (this.screenToDocumentPosition = function(e, t) {
                if (0 > e) return { row: 0, column: 0 }
                var o = 0,
                  n = 0,
                  r = 0,
                  a = 0,
                  s = this.$screenRowCache,
                  d = this.$getRowCacheIndex(s, e),
                  i = s.length,
                  c,
                  u
                if (i && 0 <= d)
                  var r = s[d],
                    o = this.$docRowCache[d],
                    p = e > s[i - 1]
                else var p = !i
                for (
                  var g = this.getLength() - 1,
                    h = this.getNextFoldLine(o),
                    m = h ? h.start.row : Infinity;
                  r <= e &&
                  ((a = this.getRowLength(o)), !(r + a > e || o >= g));

                )
                  (r += a),
                    o++,
                    o > m &&
                      ((o = h.end.row + 1),
                      (h = this.getNextFoldLine(o, h)),
                      (m = h ? h.start.row : Infinity)),
                    p &&
                      (this.$docRowCache.push(o), this.$screenRowCache.push(r))
                if (h && h.start.row <= o)
                  (c = this.getFoldDisplayLine(h)), (o = h.start.row)
                else {
                  if (r + a <= e || o > g)
                    return { row: g, column: this.getLine(g).length }
                  ;(c = this.getLine(o)), (h = null)
                }
                var f = 0
                if (this.$useWrapMode) {
                  var y = this.$wrapData[o]
                  if (y) {
                    var A = l(e - r)
                    ;(u = y[A]),
                      0 < A &&
                        y.length &&
                        ((f = y.indent),
                        (n = y[A - 1] || y[y.length - 1]),
                        (c = c.substring(n)))
                  }
                }
                return (
                  (n += this.$getStringScreenWidth(c, t - f)[1]),
                  this.$useWrapMode && n >= u && (n = u - 1),
                  h ? h.idxToPosition(n) : { row: o, column: n }
                )
              }),
              (this.documentToScreenPosition = function(e, t) {
                if ('undefined' == typeof t)
                  var o = this.$clipPositionToDocument(e.row, e.column)
                else o = this.$clipPositionToDocument(e, t)
                ;(e = o.row), (t = o.column)
                var n = 0,
                  r = null,
                  a = null
                ;(a = this.getFoldAt(e, t, 1)),
                  a && ((e = a.start.row), (t = a.start.column))
                var s = 0,
                  d = this.$docRowCache,
                  c = this.$getRowCacheIndex(d, e),
                  i = d.length,
                  u
                if (i && 0 <= c)
                  var s = d[c],
                    n = this.$screenRowCache[c],
                    p = e > d[i - 1]
                else var p = !i
                for (
                  var g = this.getNextFoldLine(s),
                    h = g ? g.start.row : Infinity;
                  s < e;

                ) {
                  if (s >= h) {
                    if (((u = g.end.row + 1), u > e)) break
                    ;(g = this.getNextFoldLine(u, g)),
                      (h = g ? g.start.row : Infinity)
                  } else u = s + 1
                  ;(n += this.getRowLength(s)),
                    (s = u),
                    p &&
                      (this.$docRowCache.push(s), this.$screenRowCache.push(n))
                }
                var m = ''
                g && s >= h
                  ? ((m = this.getFoldDisplayLine(g, e, t)), (r = g.start.row))
                  : ((m = this.getLine(e).substring(0, t)), (r = e))
                var f = 0
                if (this.$useWrapMode) {
                  var y = this.$wrapData[r]
                  if (y) {
                    for (var A = 0; m.length >= y[A]; ) n++, A++
                    ;(m = m.substring(y[A - 1] || 0, m.length)),
                      (f = 0 < A ? y.indent : 0)
                  }
                }
                return { row: n, column: f + this.$getStringScreenWidth(m)[0] }
              }),
              (this.documentToScreenColumn = function(e, t) {
                return this.documentToScreenPosition(e, t).column
              }),
              (this.documentToScreenRow = function(e, t) {
                return this.documentToScreenPosition(e, t).row
              }),
              (this.getScreenLength = function() {
                var e = 0,
                  t = null
                if (!this.$useWrapMode) {
                  e = this.getLength()
                  for (var o = this.$foldData, n = 0; n < o.length; n++)
                    (t = o[n]), (e -= t.end.row - t.start.row)
                } else
                  for (
                    var r = this.$wrapData.length,
                      a = 0,
                      n = 0,
                      t = this.$foldData[n++],
                      i = t ? t.start.row : Infinity,
                      s;
                    a < r;

                  )
                    (s = this.$wrapData[a]),
                      (e += s ? s.length + 1 : 1),
                      a++,
                      a > i &&
                        ((a = t.end.row + 1),
                        (t = this.$foldData[n++]),
                        (i = t ? t.start.row : Infinity))
                return (
                  this.lineWidgets && (e += this.$getWidgetScreenLength()), e
                )
              }),
              (this.$setFontMetrics = function(e) {
                this.$enableVarChar &&
                  (this.$getStringScreenWidth = function(t, o, n) {
                    if (0 === o) return [0, 0]
                    o || (o = Infinity), (n = n || 0)
                    var r, a
                    for (
                      a = 0;
                      a < t.length &&
                      ((r = t.charAt(a)),
                      (n +=
                        '\t' === r
                          ? this.getScreenTabSize(n)
                          : e.getCharacterWidth(r)),
                      !(n > o));
                      a++
                    );
                    return [n, a]
                  })
              }),
              (this.destroy = function() {
                this.bgTokenizer &&
                  (this.bgTokenizer.setDocument(null),
                  (this.bgTokenizer = null)),
                  this.$stopWorker()
              })
          }.call(y.prototype),
            e('./edit_session/folding').Folding.call(y.prototype),
            e('./edit_session/bracket_match').BracketMatch.call(y.prototype),
            r.defineOptions(y.prototype, 'session', {
              wrap: {
                set: function(e) {
                  if (
                    (e && 'off' != e
                      ? 'free' == e
                        ? (e = !0)
                        : 'printMargin' == e
                          ? (e = -1)
                          : 'string' == typeof e && (e = parseInt(e, 10) || !1)
                      : (e = !1),
                    this.$wrap != e)
                  )
                    if (((this.$wrap = e), !e)) this.setUseWrapMode(!1)
                    else {
                      var t = 'number' == typeof e ? e : null
                      this.setWrapLimitRange(t, t), this.setUseWrapMode(!0)
                    }
                },
                get: function() {
                  return this.getUseWrapMode()
                    ? -1 == this.$wrap
                      ? 'printMargin'
                      : this.getWrapLimitRange().min
                        ? this.$wrap
                        : 'free'
                    : 'off'
                },
                handlesSet: !0
              },
              wrapMethod: {
                set: function(e) {
                  ;(e = 'auto' == e ? 'text' != this.$mode.type : 'text' != e),
                    e != this.$wrapAsCode &&
                      ((this.$wrapAsCode = e),
                      this.$useWrapMode &&
                        ((this.$modified = !0),
                        this.$resetRowCache(0),
                        this.$updateWrapData(0, this.getLength() - 1)))
                },
                initialValue: 'auto'
              },
              indentedSoftWrap: { initialValue: !0 },
              firstLineNumber: {
                set: function() {
                  this._signal('changeBreakpoint')
                },
                initialValue: 1
              },
              useWorker: {
                set: function(e) {
                  ;(this.$useWorker = e),
                    this.$stopWorker(),
                    e && this.$startWorker()
                },
                initialValue: !0
              },
              useSoftTabs: { initialValue: !0 },
              tabSize: {
                set: function(e) {
                  isNaN(e) ||
                    this.$tabSize === e ||
                    ((this.$modified = !0),
                    (this.$rowLengthCache = []),
                    (this.$tabSize = e),
                    this._signal('changeTabSize'))
                },
                initialValue: 4,
                handlesSet: !0
              },
              overwrite: {
                set: function() {
                  this._signal('changeOverwrite')
                },
                initialValue: !1
              },
              newLineMode: {
                set: function(e) {
                  this.doc.setNewLineMode(e)
                },
                get: function() {
                  return this.doc.getNewLineMode()
                },
                handlesSet: !0
              },
              mode: {
                set: function(e) {
                  this.setMode(e)
                },
                get: function() {
                  return this.$modeId
                }
              }
            }),
            (t.EditSession = y))
        }
      ),
      ace.define(
        'ace/search',
        [
          'require',
          'exports',
          'module',
          'ace/lib/lang',
          'ace/lib/oop',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          function o(e, t) {
            function o(e) {
              return /\w/.test(e) || t.regExp ? '\\b' : ''
            }
            return o(e[0]) + e + o(e[e.length - 1])
          }
          var n = e('./lib/lang'),
            r = e('./lib/oop'),
            s = e('./range').Range,
            i = function() {
              this.$options = {}
            }
          ;(function() {
            ;(this.set = function(e) {
              return r.mixin(this.$options, e), this
            }),
              (this.getOptions = function() {
                return n.copyObject(this.$options)
              }),
              (this.setOptions = function(e) {
                this.$options = e
              }),
              (this.find = function(e) {
                var t = this.$options,
                  o = this.$matchIterator(e, t)
                if (!o) return !1
                var n = null
                return (
                  o.forEach(function(e, o, r) {
                    if (!e.start) {
                      var a = e.offset + (r || 0)
                      if (
                        ((n = new s(o, a, o, a + e.length)),
                        !e.length &&
                          t.start &&
                          t.start.start &&
                          !1 != t.skipCurrent &&
                          n.isEqual(t.start))
                      )
                        return (n = null), !1
                    } else n = e
                    return !0
                  }),
                  n
                )
              }),
              (this.findAll = function(e) {
                var t = this.$options
                if (!t.needle) return []
                this.$assembleRegExp(t)
                var o = t.range,
                  r = o
                    ? e.getLines(o.start.row, o.end.row)
                    : e.doc.getAllLines(),
                  a = [],
                  l = t.re
                if (t.$isMultiLine) {
                  var d = l.length,
                    c = r.length - d,
                    u
                  outer: for (var p = l.offset || 0; p <= c; p++) {
                    for (var g = 0; g < d; g++)
                      if (-1 == r[p + g].search(l[g])) continue outer
                    var h = r[p],
                      m = r[p + d - 1],
                      f = h.length - h.match(l[0])[0].length,
                      y = m.match(l[d - 1])[0].length
                    ;(u && u.end.row === p && u.end.column > f) ||
                      (a.push((u = new s(p, f, p + d - 1, y))),
                      2 < d && (p = p + d - 2))
                  }
                } else
                  for (var A = 0, i; A < r.length; A++) {
                    i = n.getMatchOffsets(r[A], l)
                    for (var g = 0, C; g < i.length; g++)
                      (C = i[g]),
                        a.push(new s(A, C.offset, A, C.offset + C.length))
                  }
                if (o) {
                  for (
                    var w = o.start.column,
                      E = o.start.column,
                      A = 0,
                      g = a.length - 1;
                    A < g &&
                    a[A].start.column < w &&
                    a[A].start.row == o.start.row;

                  )
                    A++
                  for (
                    ;
                    A < g && a[g].end.column > E && a[g].end.row == o.end.row;

                  )
                    g--
                  for (a = a.slice(A, g + 1), A = 0, g = a.length; A < g; A++)
                    (a[A].start.row += o.start.row),
                      (a[A].end.row += o.start.row)
                }
                return a
              }),
              (this.replace = function(e, t) {
                var o = this.$options,
                  n = this.$assembleRegExp(o)
                if (o.$isMultiLine) return t
                if (n) {
                  var r = n.exec(e)
                  if (!r || r[0].length != e.length) return null
                  if (((t = e.replace(n, t)), o.preserveCase)) {
                    t = t.split('')
                    for (var a = u(e.length, e.length), i; a--; )
                      (i = e[a]),
                        (t[a] =
                          i && i.toLowerCase() != i
                            ? t[a].toUpperCase()
                            : t[a].toLowerCase())
                    t = t.join('')
                  }
                  return t
                }
              }),
              (this.$matchIterator = function(e, t) {
                var o = this.$assembleRegExp(t)
                if (!o) return !1
                var r
                if (t.$isMultiLine)
                  var l = o.length,
                    i = function(t, n, d) {
                      var c = t.search(o[0])
                      if (-1 != c) {
                        for (var u = 1; u < l; u++)
                          if (((t = e.getLine(n + u)), -1 == t.search(o[u])))
                            return
                        var i = t.match(o[l - 1])[0].length,
                          p = new s(n, c, n + l - 1, i)
                        if (
                          (1 == o.offset
                            ? (p.start.row--, (p.start.column = a))
                            : d && (p.start.column += d),
                          r(p))
                        )
                          return !0
                      }
                    }
                else if (t.backwards)
                  var i = function(e, t, a) {
                    for (
                      var s = n.getMatchOffsets(e, o), l = s.length - 1;
                      0 <= l;
                      l--
                    )
                      if (r(s[l], t, a)) return !0
                  }
                else
                  var i = function(e, t, a) {
                    for (
                      var s = n.getMatchOffsets(e, o), l = 0;
                      l < s.length;
                      l++
                    )
                      if (r(s[l], t, a)) return !0
                  }
                var d = this.$lineIterator(e, t)
                return {
                  forEach: function(e) {
                    ;(r = e), d.forEach(i)
                  }
                }
              }),
              (this.$assembleRegExp = function(e, t) {
                if (e.needle instanceof RegExp) return (e.re = e.needle)
                var r = e.needle
                if (!e.needle) return (e.re = !1)
                e.regExp || (r = n.escapeRegExp(r)),
                  e.wholeWord && (r = o(r, e))
                var a = e.caseSensitive ? 'gm' : 'gmi'
                if (((e.$isMultiLine = !t && /[\n\r]/.test(r)), e.$isMultiLine))
                  return (e.re = this.$assembleMultilineRegExp(r, a))
                try {
                  var i = new RegExp(r, a)
                } catch (t) {
                  i = !1
                }
                return (e.re = i)
              }),
              (this.$assembleMultilineRegExp = function(e, t) {
                for (
                  var o = e.replace(/\r\n|\r|\n/g, '$\n^').split('\n'),
                    n = [],
                    r = 0;
                  r < o.length;
                  r++
                )
                  try {
                    n.push(new RegExp(o[r], t))
                  } catch (t) {
                    return !1
                  }
                return (
                  '' == o[0] ? (n.shift(), (n.offset = 1)) : (n.offset = 0), n
                )
              }),
              (this.$lineIterator = function(e, t) {
                var o = !0 == t.backwards,
                  n = !1 != t.skipCurrent,
                  r = t.range,
                  a = t.start
                a || (a = r ? r[o ? 'end' : 'start'] : e.selection.getRange()),
                  a.start && (a = a[n == o ? 'start' : 'end'])
                var i = r ? r.start.row : 0,
                  s = r ? r.end.row : e.getLength() - 1,
                  l = o
                    ? function(o) {
                        var n = a.row,
                          r = e.getLine(n).substring(0, a.column)
                        if (!o(r, n)) {
                          for (n--; n >= i; n--) if (o(e.getLine(n), n)) return
                          if (!1 != t.wrap)
                            for (n = s, i = a.row; n >= i; n--)
                              if (o(e.getLine(n), n)) return
                        }
                      }
                    : function(o) {
                        var n = a.row,
                          r = e.getLine(n).substr(a.column)
                        if (!o(r, n, a.column)) {
                          for (++n; n <= s; n++) if (o(e.getLine(n), n)) return
                          if (!1 != t.wrap)
                            for (n = i, s = a.row; n <= s; n++)
                              if (o(e.getLine(n), n)) return
                        }
                      }
                return { forEach: l }
              })
          }.call(i.prototype),
            (t.Search = i))
        }
      ),
      ace.define(
        'ace/keyboard/hash_handler',
        ['require', 'exports', 'module', 'ace/lib/keys', 'ace/lib/useragent'],
        function(e, t) {
          'use strict'
          function o(e, t) {
            ;(this.platform = t || (a.isMac ? 'mac' : 'win')),
              (this.commands = {}),
              (this.commandKeyBinding = {}),
              this.addCommands(e),
              (this.$singleCommand = !0)
          }
          function n(e, t) {
            o.call(this, e, t), (this.$singleCommand = !1)
          }
          var r = e('../lib/keys'),
            a = e('../lib/useragent'),
            i = r.KEY_MODS
          ;(n.prototype = o.prototype),
            function() {
              function e(e) {
                return (
                  ('object' == typeof e && e.bindKey && e.bindKey.position) || 0
                )
              }
              ;(this.addCommand = function(e) {
                this.commands[e.name] && this.removeCommand(e),
                  (this.commands[e.name] = e),
                  e.bindKey && this._buildKeyHash(e)
              }),
                (this.removeCommand = function(e, t) {
                  var o = e && ('string' == typeof e ? e : e.name)
                  ;(e = this.commands[o]), t || delete this.commands[o]
                  var n = this.commandKeyBinding
                  for (var r in n) {
                    var a = n[r]
                    if (a == e) delete n[r]
                    else if (Array.isArray(a)) {
                      var s = a.indexOf(e)
                      ;-1 != s &&
                        (a.splice(s, 1), 1 == a.length && (n[r] = a[0]))
                    }
                  }
                }),
                (this.bindKey = function(e, t, o) {
                  return (
                    'object' == typeof e &&
                      e &&
                      (void 0 == o && (o = e.position), (e = e[this.platform])),
                    e
                      ? 'function' == typeof t
                        ? this.addCommand({
                            exec: t,
                            bindKey: e,
                            name: t.name || e
                          })
                        : void e.split('|').forEach(function(e) {
                            var n = ''
                            if (-1 != e.indexOf(' ')) {
                              var r = e.split(/\s+/)
                              ;(e = r.pop()),
                                r.forEach(function(e) {
                                  var t = this.parseKeys(e),
                                    o = i[t.hashId] + t.key
                                  ;(n += (n ? ' ' : '') + o),
                                    this._addCommandToBinding(n, 'chainKeys')
                                }, this),
                                (n += ' ')
                            }
                            var a = this.parseKeys(e),
                              s = i[a.hashId] + a.key
                            this._addCommandToBinding(n + s, t, o)
                          }, this)
                      : void 0
                  )
                }),
                (this._addCommandToBinding = function(t, o, n) {
                  var r = this.commandKeyBinding,
                    a
                  if (!o) delete r[t]
                  else if (!r[t] || this.$singleCommand) r[t] = o
                  else {
                    Array.isArray(r[t])
                      ? -1 != (a = r[t].indexOf(o)) && r[t].splice(a, 1)
                      : (r[t] = [r[t]]),
                      'number' != typeof n &&
                        (n || o.isDefault ? (n = -100) : (n = e(o)))
                    var i = r[t]
                    for (a = 0; a < i.length; a++) {
                      var s = i[a],
                        l = e(s)
                      if (l > n) break
                    }
                    i.splice(a, 0, o)
                  }
                }),
                (this.addCommands = function(e) {
                  e &&
                    Object.keys(e).forEach(function(t) {
                      var o = e[t]
                      if (o) {
                        if ('string' == typeof o) return this.bindKey(o, t)
                        'function' == typeof o && (o = { exec: o }),
                          'object' != typeof o ||
                            (!o.name && (o.name = t), this.addCommand(o))
                      }
                    }, this)
                }),
                (this.removeCommands = function(e) {
                  Object.keys(e).forEach(function(t) {
                    this.removeCommand(e[t])
                  }, this)
                }),
                (this.bindKeys = function(e) {
                  Object.keys(e).forEach(function(t) {
                    this.bindKey(t, e[t])
                  }, this)
                }),
                (this._buildKeyHash = function(e) {
                  this.bindKey(e.bindKey, e)
                }),
                (this.parseKeys = function(e) {
                  var t = e
                      .toLowerCase()
                      .split(/[\-\+]([\-\+])?/)
                      .filter(function(e) {
                        return e
                      }),
                    o = t.pop(),
                    n = r[o]
                  if (r.FUNCTION_KEYS[n]) o = r.FUNCTION_KEYS[n].toLowerCase()
                  else {
                    if (!t.length) return { key: o, hashId: -1 }
                    if (1 == t.length && 'shift' == t[0])
                      return { key: o.toUpperCase(), hashId: -1 }
                  }
                  for (var a = 0, s = t.length, i; s--; ) {
                    if (((i = r.KEY_MODS[t[s]]), null == i))
                      return (
                        'undefined' != typeof console &&
                          console.error(
                            'invalid modifier ' + t[s] + ' in ' + e
                          ),
                        !1
                      )
                    a |= i
                  }
                  return { key: o, hashId: a }
                }),
                (this.findKeyCommand = function(e, t) {
                  var o = i[e] + t
                  return this.commandKeyBinding[o]
                }),
                (this.handleKeyboard = function(e, t, o, n) {
                  if (!(0 > n)) {
                    var r = i[t] + o,
                      a = this.commandKeyBinding[r]
                    return (e.$keyChain &&
                      ((e.$keyChain += ' ' + r),
                      (a = this.commandKeyBinding[e.$keyChain] || a)),
                    a && ('chainKeys' == a || 'chainKeys' == a[a.length - 1]))
                      ? ((e.$keyChain = e.$keyChain || r), { command: 'null' })
                      : (e.$keyChain &&
                          ((t && 4 != t) || 1 != o.length
                            ? (-1 == t || 0 < n) && (e.$keyChain = '')
                            : (e.$keyChain = e.$keyChain.slice(
                                0,
                                -r.length - 1
                              ))),
                        { command: a })
                  }
                }),
                (this.getStatusText = function(e, t) {
                  return t.$keyChain || ''
                })
            }.call(o.prototype),
            (t.HashHandler = o),
            (t.MultiHashHandler = n)
        }
      ),
      ace.define(
        'ace/commands/command_manager',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/keyboard/hash_handler',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('../lib/oop'),
            n = e('../keyboard/hash_handler').MultiHashHandler,
            r = e('../lib/event_emitter').EventEmitter,
            a = function(e, t) {
              n.call(this, t, e),
                (this.byName = this.commands),
                this.setDefaultHandler('exec', function(t) {
                  return t.command.exec(t.editor, t.args || {})
                })
            }
          o.inherits(a, n),
            function() {
              o.implement(this, r),
                (this.exec = function(t, o, n) {
                  if (Array.isArray(t)) {
                    for (var r = t.length; r--; )
                      if (this.exec(t[r], o, n)) return !0
                    return !1
                  }
                  if (('string' == typeof t && (t = this.commands[t]), !t))
                    return !1
                  if (o && o.$readOnly && !t.readOnly) return !1
                  var a = { editor: o, command: t, args: n }
                  return (
                    (a.returnValue = this._emit('exec', a)),
                    this._signal('afterExec', a),
                    !1 !== a.returnValue
                  )
                }),
                (this.toggleRecording = function(e) {
                  if (!this.$inReplay)
                    return (e && e._emit('changeStatus'), this.recording)
                      ? (this.macro.pop(),
                        this.removeEventListener(
                          'exec',
                          this.$addCommandToMacro
                        ),
                        this.macro.length || (this.macro = this.oldMacro),
                        (this.recording = !1))
                      : (this.$addCommandToMacro ||
                          (this.$addCommandToMacro = function(t) {
                            this.macro.push([t.command, t.args])
                          }.bind(this)),
                        (this.oldMacro = this.macro),
                        (this.macro = []),
                        this.on('exec', this.$addCommandToMacro),
                        (this.recording = !0))
                }),
                (this.replay = function(e) {
                  if (!this.$inReplay && this.macro) {
                    if (this.recording) return this.toggleRecording(e)
                    try {
                      ;(this.$inReplay = !0),
                        this.macro.forEach(function(t) {
                          'string' == typeof t
                            ? this.exec(t, e)
                            : this.exec(t[0], e, t[1])
                        }, this)
                    } finally {
                      this.$inReplay = !1
                    }
                  }
                }),
                (this.trimMacro = function(e) {
                  return e.map(function(e) {
                    return (
                      'string' != typeof e[0] && (e[0] = e[0].name),
                      e[1] || (e = e[0]),
                      e
                    )
                  })
                })
            }.call(a.prototype),
            (t.CommandManager = a)
        }
      ),
      ace.define(
        'ace/commands/default_commands',
        [
          'require',
          'exports',
          'module',
          'ace/lib/lang',
          'ace/config',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          function o(e, t) {
            return { win: e, mac: t }
          }
          var n = e('../lib/lang'),
            r = e('../config'),
            a = e('../range').Range
          t.commands = [
            {
              name: 'showSettingsMenu',
              bindKey: o('Ctrl-,', 'Command-,'),
              exec: function(e) {
                r.loadModule('ace/ext/settings_menu', function(t) {
                  t.init(e), e.showSettingsMenu()
                })
              },
              readOnly: !0
            },
            {
              name: 'goToNextError',
              bindKey: o('Alt-E', 'F4'),
              exec: function(e) {
                r.loadModule('ace/ext/error_marker', function(t) {
                  t.showErrorMarker(e, 1)
                })
              },
              scrollIntoView: 'animate',
              readOnly: !0
            },
            {
              name: 'goToPreviousError',
              bindKey: o('Alt-Shift-E', 'Shift-F4'),
              exec: function(e) {
                r.loadModule('ace/ext/error_marker', function(t) {
                  t.showErrorMarker(e, -1)
                })
              },
              scrollIntoView: 'animate',
              readOnly: !0
            },
            {
              name: 'selectall',
              bindKey: o('Ctrl-A', 'Command-A'),
              exec: function(e) {
                e.selectAll()
              },
              readOnly: !0
            },
            {
              name: 'centerselection',
              bindKey: o(null, 'Ctrl-L'),
              exec: function(e) {
                e.centerSelection()
              },
              readOnly: !0
            },
            {
              name: 'gotoline',
              bindKey: o('Ctrl-L', 'Command-L'),
              exec: function(e) {
                var t = parseInt(prompt('Enter line number:'), 10)
                isNaN(t) || e.gotoLine(t)
              },
              readOnly: !0
            },
            {
              name: 'fold',
              bindKey: o('Alt-L|Ctrl-F1', 'Command-Alt-L|Command-F1'),
              exec: function(e) {
                e.session.toggleFold(!1)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'unfold',
              bindKey: o(
                'Alt-Shift-L|Ctrl-Shift-F1',
                'Command-Alt-Shift-L|Command-Shift-F1'
              ),
              exec: function(e) {
                e.session.toggleFold(!0)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'toggleFoldWidget',
              bindKey: o('F2', 'F2'),
              exec: function(e) {
                e.session.toggleFoldWidget()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'toggleParentFoldWidget',
              bindKey: o('Alt-F2', 'Alt-F2'),
              exec: function(e) {
                e.session.toggleFoldWidget(!0)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'foldall',
              bindKey: o(null, 'Ctrl-Command-Option-0'),
              exec: function(e) {
                e.session.foldAll()
              },
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'foldOther',
              bindKey: o('Alt-0', 'Command-Option-0'),
              exec: function(e) {
                e.session.foldAll(),
                  e.session.unfold(e.selection.getAllRanges())
              },
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'unfoldall',
              bindKey: o('Alt-Shift-0', 'Command-Option-Shift-0'),
              exec: function(e) {
                e.session.unfold()
              },
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'findnext',
              bindKey: o('Ctrl-K', 'Command-G'),
              exec: function(e) {
                e.findNext()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'findprevious',
              bindKey: o('Ctrl-Shift-K', 'Command-Shift-G'),
              exec: function(e) {
                e.findPrevious()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'center',
              readOnly: !0
            },
            {
              name: 'selectOrFindNext',
              bindKey: o('Alt-K', 'Ctrl-G'),
              exec: function(e) {
                e.selection.isEmpty() ? e.selection.selectWord() : e.findNext()
              },
              readOnly: !0
            },
            {
              name: 'selectOrFindPrevious',
              bindKey: o('Alt-Shift-K', 'Ctrl-Shift-G'),
              exec: function(e) {
                e.selection.isEmpty()
                  ? e.selection.selectWord()
                  : e.findPrevious()
              },
              readOnly: !0
            },
            {
              name: 'find',
              bindKey: o('Ctrl-F', 'Command-F'),
              exec: function(t) {
                r.loadModule('ace/ext/searchbox', function(o) {
                  o.Search(t)
                })
              },
              readOnly: !0
            },
            {
              name: 'overwrite',
              bindKey: 'Insert',
              exec: function(e) {
                e.toggleOverwrite()
              },
              readOnly: !0
            },
            {
              name: 'selecttostart',
              bindKey: o(
                'Ctrl-Shift-Home',
                'Command-Shift-Home|Command-Shift-Up'
              ),
              exec: function(e) {
                e.getSelection().selectFileStart()
              },
              multiSelectAction: 'forEach',
              readOnly: !0,
              scrollIntoView: 'animate',
              aceCommandGroup: 'fileJump'
            },
            {
              name: 'gotostart',
              bindKey: o('Ctrl-Home', 'Command-Home|Command-Up'),
              exec: function(e) {
                e.navigateFileStart()
              },
              multiSelectAction: 'forEach',
              readOnly: !0,
              scrollIntoView: 'animate',
              aceCommandGroup: 'fileJump'
            },
            {
              name: 'selectup',
              bindKey: o('Shift-Up', 'Shift-Up|Ctrl-Shift-P'),
              exec: function(e) {
                e.getSelection().selectUp()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'golineup',
              bindKey: o('Up', 'Up|Ctrl-P'),
              exec: function(e, t) {
                e.navigateUp(t.times)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selecttoend',
              bindKey: o(
                'Ctrl-Shift-End',
                'Command-Shift-End|Command-Shift-Down'
              ),
              exec: function(e) {
                e.getSelection().selectFileEnd()
              },
              multiSelectAction: 'forEach',
              readOnly: !0,
              scrollIntoView: 'animate',
              aceCommandGroup: 'fileJump'
            },
            {
              name: 'gotoend',
              bindKey: o('Ctrl-End', 'Command-End|Command-Down'),
              exec: function(e) {
                e.navigateFileEnd()
              },
              multiSelectAction: 'forEach',
              readOnly: !0,
              scrollIntoView: 'animate',
              aceCommandGroup: 'fileJump'
            },
            {
              name: 'selectdown',
              bindKey: o('Shift-Down', 'Shift-Down|Ctrl-Shift-N'),
              exec: function(e) {
                e.getSelection().selectDown()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'golinedown',
              bindKey: o('Down', 'Down|Ctrl-N'),
              exec: function(e, t) {
                e.navigateDown(t.times)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectwordleft',
              bindKey: o('Ctrl-Shift-Left', 'Option-Shift-Left'),
              exec: function(e) {
                e.getSelection().selectWordLeft()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'gotowordleft',
              bindKey: o('Ctrl-Left', 'Option-Left'),
              exec: function(e) {
                e.navigateWordLeft()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selecttolinestart',
              bindKey: o('Alt-Shift-Left', 'Command-Shift-Left|Ctrl-Shift-A'),
              exec: function(e) {
                e.getSelection().selectLineStart()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'gotolinestart',
              bindKey: o('Alt-Left|Home', 'Command-Left|Home|Ctrl-A'),
              exec: function(e) {
                e.navigateLineStart()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectleft',
              bindKey: o('Shift-Left', 'Shift-Left|Ctrl-Shift-B'),
              exec: function(e) {
                e.getSelection().selectLeft()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'gotoleft',
              bindKey: o('Left', 'Left|Ctrl-B'),
              exec: function(e, t) {
                e.navigateLeft(t.times)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectwordright',
              bindKey: o('Ctrl-Shift-Right', 'Option-Shift-Right'),
              exec: function(e) {
                e.getSelection().selectWordRight()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'gotowordright',
              bindKey: o('Ctrl-Right', 'Option-Right'),
              exec: function(e) {
                e.navigateWordRight()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selecttolineend',
              bindKey: o(
                'Alt-Shift-Right',
                'Command-Shift-Right|Shift-End|Ctrl-Shift-E'
              ),
              exec: function(e) {
                e.getSelection().selectLineEnd()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'gotolineend',
              bindKey: o('Alt-Right|End', 'Command-Right|End|Ctrl-E'),
              exec: function(e) {
                e.navigateLineEnd()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectright',
              bindKey: o('Shift-Right', 'Shift-Right'),
              exec: function(e) {
                e.getSelection().selectRight()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'gotoright',
              bindKey: o('Right', 'Right|Ctrl-F'),
              exec: function(e, t) {
                e.navigateRight(t.times)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectpagedown',
              bindKey: 'Shift-PageDown',
              exec: function(e) {
                e.selectPageDown()
              },
              readOnly: !0
            },
            {
              name: 'pagedown',
              bindKey: o(null, 'Option-PageDown'),
              exec: function(e) {
                e.scrollPageDown()
              },
              readOnly: !0
            },
            {
              name: 'gotopagedown',
              bindKey: o('PageDown', 'PageDown|Ctrl-V'),
              exec: function(e) {
                e.gotoPageDown()
              },
              readOnly: !0
            },
            {
              name: 'selectpageup',
              bindKey: 'Shift-PageUp',
              exec: function(e) {
                e.selectPageUp()
              },
              readOnly: !0
            },
            {
              name: 'pageup',
              bindKey: o(null, 'Option-PageUp'),
              exec: function(e) {
                e.scrollPageUp()
              },
              readOnly: !0
            },
            {
              name: 'gotopageup',
              bindKey: 'PageUp',
              exec: function(e) {
                e.gotoPageUp()
              },
              readOnly: !0
            },
            {
              name: 'scrollup',
              bindKey: o('Ctrl-Up', null),
              exec: function(t) {
                t.renderer.scrollBy(0, -2 * t.renderer.layerConfig.lineHeight)
              },
              readOnly: !0
            },
            {
              name: 'scrolldown',
              bindKey: o('Ctrl-Down', null),
              exec: function(t) {
                t.renderer.scrollBy(0, 2 * t.renderer.layerConfig.lineHeight)
              },
              readOnly: !0
            },
            {
              name: 'selectlinestart',
              bindKey: 'Shift-Home',
              exec: function(e) {
                e.getSelection().selectLineStart()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectlineend',
              bindKey: 'Shift-End',
              exec: function(e) {
                e.getSelection().selectLineEnd()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'togglerecording',
              bindKey: o('Ctrl-Alt-E', 'Command-Option-E'),
              exec: function(e) {
                e.commands.toggleRecording(e)
              },
              readOnly: !0
            },
            {
              name: 'replaymacro',
              bindKey: o('Ctrl-Shift-E', 'Command-Shift-E'),
              exec: function(e) {
                e.commands.replay(e)
              },
              readOnly: !0
            },
            {
              name: 'jumptomatching',
              bindKey: o('Ctrl-P', 'Ctrl-P'),
              exec: function(e) {
                e.jumpToMatching()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'animate',
              readOnly: !0
            },
            {
              name: 'selecttomatching',
              bindKey: o('Ctrl-Shift-P', 'Ctrl-Shift-P'),
              exec: function(e) {
                e.jumpToMatching(!0)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'animate',
              readOnly: !0
            },
            {
              name: 'expandToMatching',
              bindKey: o('Ctrl-Shift-M', 'Ctrl-Shift-M'),
              exec: function(e) {
                e.jumpToMatching(!0, !0)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'animate',
              readOnly: !0
            },
            {
              name: 'passKeysToBrowser',
              bindKey: o(null, null),
              exec: function() {},
              passEvent: !0,
              readOnly: !0
            },
            { name: 'copy', exec: function() {}, readOnly: !0 },
            {
              name: 'cut',
              exec: function(e) {
                var t = e.getSelectionRange()
                e._emit('cut', t),
                  e.selection.isEmpty() ||
                    (e.session.remove(t), e.clearSelection())
              },
              scrollIntoView: 'cursor',
              multiSelectAction: 'forEach'
            },
            {
              name: 'paste',
              exec: function(e, t) {
                e.$handlePaste(t)
              },
              scrollIntoView: 'cursor'
            },
            {
              name: 'removeline',
              bindKey: o('Ctrl-D', 'Command-D'),
              exec: function(e) {
                e.removeLines()
              },
              scrollIntoView: 'cursor',
              multiSelectAction: 'forEachLine'
            },
            {
              name: 'duplicateSelection',
              bindKey: o('Ctrl-Shift-D', 'Command-Shift-D'),
              exec: function(e) {
                e.duplicateSelection()
              },
              scrollIntoView: 'cursor',
              multiSelectAction: 'forEach'
            },
            {
              name: 'sortlines',
              bindKey: o('Ctrl-Alt-S', 'Command-Alt-S'),
              exec: function(e) {
                e.sortLines()
              },
              scrollIntoView: 'selection',
              multiSelectAction: 'forEachLine'
            },
            {
              name: 'togglecomment',
              bindKey: o('Ctrl-/', 'Command-/'),
              exec: function(e) {
                e.toggleCommentLines()
              },
              multiSelectAction: 'forEachLine',
              scrollIntoView: 'selectionPart'
            },
            {
              name: 'toggleBlockComment',
              bindKey: o('Ctrl-Shift-/', 'Command-Shift-/'),
              exec: function(e) {
                e.toggleBlockComment()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'selectionPart'
            },
            {
              name: 'modifyNumberUp',
              bindKey: o('Ctrl-Shift-Up', 'Alt-Shift-Up'),
              exec: function(e) {
                e.modifyNumber(1)
              },
              scrollIntoView: 'cursor',
              multiSelectAction: 'forEach'
            },
            {
              name: 'modifyNumberDown',
              bindKey: o('Ctrl-Shift-Down', 'Alt-Shift-Down'),
              exec: function(e) {
                e.modifyNumber(-1)
              },
              scrollIntoView: 'cursor',
              multiSelectAction: 'forEach'
            },
            {
              name: 'replace',
              bindKey: o('Ctrl-H', 'Command-Option-F'),
              exec: function(t) {
                r.loadModule('ace/ext/searchbox', function(o) {
                  o.Search(t, !0)
                })
              }
            },
            {
              name: 'undo',
              bindKey: o('Ctrl-Z', 'Command-Z'),
              exec: function(e) {
                e.undo()
              }
            },
            {
              name: 'redo',
              bindKey: o('Ctrl-Shift-Z|Ctrl-Y', 'Command-Shift-Z|Command-Y'),
              exec: function(e) {
                e.redo()
              }
            },
            {
              name: 'copylinesup',
              bindKey: o('Alt-Shift-Up', 'Command-Option-Up'),
              exec: function(e) {
                e.copyLinesUp()
              },
              scrollIntoView: 'cursor'
            },
            {
              name: 'movelinesup',
              bindKey: o('Alt-Up', 'Option-Up'),
              exec: function(e) {
                e.moveLinesUp()
              },
              scrollIntoView: 'cursor'
            },
            {
              name: 'copylinesdown',
              bindKey: o('Alt-Shift-Down', 'Command-Option-Down'),
              exec: function(e) {
                e.copyLinesDown()
              },
              scrollIntoView: 'cursor'
            },
            {
              name: 'movelinesdown',
              bindKey: o('Alt-Down', 'Option-Down'),
              exec: function(e) {
                e.moveLinesDown()
              },
              scrollIntoView: 'cursor'
            },
            {
              name: 'del',
              bindKey: o('Delete', 'Delete|Ctrl-D|Shift-Delete'),
              exec: function(e) {
                e.remove('right')
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'backspace',
              bindKey: o(
                'Shift-Backspace|Backspace',
                'Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H'
              ),
              exec: function(e) {
                e.remove('left')
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'cut_or_delete',
              bindKey: o('Shift-Delete', null),
              exec: function(e) {
                return !!e.selection.isEmpty() && void e.remove('left')
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'removetolinestart',
              bindKey: o('Alt-Backspace', 'Command-Backspace'),
              exec: function(e) {
                e.removeToLineStart()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'removetolineend',
              bindKey: o('Alt-Delete', 'Ctrl-K'),
              exec: function(e) {
                e.removeToLineEnd()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'removewordleft',
              bindKey: o('Ctrl-Backspace', 'Alt-Backspace|Ctrl-Alt-Backspace'),
              exec: function(e) {
                e.removeWordLeft()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'removewordright',
              bindKey: o('Ctrl-Delete', 'Alt-Delete'),
              exec: function(e) {
                e.removeWordRight()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'outdent',
              bindKey: o('Shift-Tab', 'Shift-Tab'),
              exec: function(e) {
                e.blockOutdent()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'selectionPart'
            },
            {
              name: 'indent',
              bindKey: o('Tab', 'Tab'),
              exec: function(e) {
                e.indent()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'selectionPart'
            },
            {
              name: 'blockoutdent',
              bindKey: o('Ctrl-[', 'Ctrl-['),
              exec: function(e) {
                e.blockOutdent()
              },
              multiSelectAction: 'forEachLine',
              scrollIntoView: 'selectionPart'
            },
            {
              name: 'blockindent',
              bindKey: o('Ctrl-]', 'Ctrl-]'),
              exec: function(e) {
                e.blockIndent()
              },
              multiSelectAction: 'forEachLine',
              scrollIntoView: 'selectionPart'
            },
            {
              name: 'insertstring',
              exec: function(e, t) {
                e.insert(t)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'inserttext',
              exec: function(e, t) {
                e.insert(n.stringRepeat(t.text || '', t.times || 1))
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'splitline',
              bindKey: o(null, 'Ctrl-O'),
              exec: function(e) {
                e.splitLine()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'transposeletters',
              bindKey: o('Ctrl-T', 'Ctrl-T'),
              exec: function(e) {
                e.transposeLetters()
              },
              multiSelectAction: function(e) {
                e.transposeSelections(1)
              },
              scrollIntoView: 'cursor'
            },
            {
              name: 'touppercase',
              bindKey: o('Ctrl-U', 'Ctrl-U'),
              exec: function(e) {
                e.toUpperCase()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'tolowercase',
              bindKey: o('Ctrl-Shift-U', 'Ctrl-Shift-U'),
              exec: function(e) {
                e.toLowerCase()
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor'
            },
            {
              name: 'expandtoline',
              bindKey: o('Ctrl-Shift-L', 'Command-Shift-L'),
              exec: function(e) {
                var t = e.selection.getRange()
                ;(t.start.column = t.end.column = 0),
                  t.end.row++,
                  e.selection.setRange(t, !1)
              },
              multiSelectAction: 'forEach',
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'joinlines',
              bindKey: o(null, null),
              exec: function(e) {
                for (
                  var t = e.selection.isBackwards(),
                    o = t
                      ? e.selection.getSelectionLead()
                      : e.selection.getSelectionAnchor(),
                    r = t
                      ? e.selection.getSelectionAnchor()
                      : e.selection.getSelectionLead(),
                    s = e.session.doc.getLine(o.row).length,
                    l = e.session.doc.getTextRange(e.selection.getRange()),
                    d = l.replace(/\n\s*/, ' ').length,
                    c = e.session.doc.getLine(o.row),
                    u = o.row + 1,
                    i;
                  u <= r.row + 1;
                  u++
                )
                  (i = n.stringTrimLeft(
                    n.stringTrimRight(e.session.doc.getLine(u))
                  )),
                    0 !== i.length && (i = ' ' + i),
                    (c += i)
                r.row + 1 < e.session.doc.getLength() - 1 &&
                  (c += e.session.doc.getNewLineCharacter()),
                  e.clearSelection(),
                  e.session.doc.replace(new a(o.row, 0, r.row + 2, 0), c),
                  0 < d
                    ? (e.selection.moveCursorTo(o.row, o.column),
                      e.selection.selectTo(o.row, o.column + d))
                    : ((s =
                        e.session.doc.getLine(o.row).length > s ? s + 1 : s),
                      e.selection.moveCursorTo(o.row, s))
              },
              multiSelectAction: 'forEach',
              readOnly: !0
            },
            {
              name: 'invertSelection',
              bindKey: o(null, null),
              exec: function(e) {
                var t = e.session.doc.getLength() - 1,
                  o = e.session.doc.getLine(t).length,
                  n = e.selection.rangeList.ranges,
                  r = []
                1 > n.length && (n = [e.selection.getRange()])
                for (var s = 0; s < n.length; s++)
                  s != n.length - 1 ||
                    (n[s].end.row === t && n[s].end.column === o) ||
                    r.push(new a(n[s].end.row, n[s].end.column, t, o)),
                    0 === s
                      ? (0 !== n[s].start.row || 0 !== n[s].start.column) &&
                        r.push(new a(0, 0, n[s].start.row, n[s].start.column))
                      : r.push(
                          new a(
                            n[s - 1].end.row,
                            n[s - 1].end.column,
                            n[s].start.row,
                            n[s].start.column
                          )
                        )
                e.exitMultiSelectMode(), e.clearSelection()
                for (var s = 0; s < r.length; s++)
                  e.selection.addRange(r[s], !1)
              },
              readOnly: !0,
              scrollIntoView: 'none'
            }
          ]
        }
      ),
      ace.define(
        'ace/editor',
        [
          'require',
          'exports',
          'module',
          'ace/lib/fixoldbrowsers',
          'ace/lib/oop',
          'ace/lib/dom',
          'ace/lib/lang',
          'ace/lib/useragent',
          'ace/keyboard/textinput',
          'ace/mouse/mouse_handler',
          'ace/mouse/fold_handler',
          'ace/keyboard/keybinding',
          'ace/edit_session',
          'ace/search',
          'ace/range',
          'ace/lib/event_emitter',
          'ace/commands/command_manager',
          'ace/commands/default_commands',
          'ace/config',
          'ace/token_iterator'
        ],
        function(e, t) {
          'use strict'
          e('./lib/fixoldbrowsers')
          var o = e('./lib/oop'),
            n = e('./lib/dom'),
            r = e('./lib/lang'),
            a = e('./lib/useragent'),
            i = e('./keyboard/textinput').TextInput,
            c = e('./mouse/mouse_handler').MouseHandler,
            g = e('./mouse/fold_handler').FoldHandler,
            h = e('./keyboard/keybinding').KeyBinding,
            m = e('./edit_session').EditSession,
            f = e('./search').Search,
            y = e('./range').Range,
            A = e('./lib/event_emitter').EventEmitter,
            C = e('./commands/command_manager').CommandManager,
            w = e('./commands/default_commands').commands,
            E = e('./config'),
            b = e('./token_iterator').TokenIterator,
            v = function(e, t) {
              var o = e.getContainerElement()
              ;(this.container = o),
                (this.renderer = e),
                (this.commands = new C(a.isMac ? 'mac' : 'win', w)),
                (this.textInput = new i(e.getTextAreaContainer(), this)),
                (this.renderer.textarea = this.textInput.getElement()),
                (this.keyBinding = new h(this)),
                (this.$mouseHandler = new c(this)),
                new g(this),
                (this.$blockScrolling = 0),
                (this.$search = new f().set({ wrap: !0 })),
                (this.$historyTracker = this.$historyTracker.bind(this)),
                this.commands.on('exec', this.$historyTracker),
                this.$initOperationListeners(),
                (this._$emitInputEvent = r.delayedCall(
                  function() {
                    this._signal('input', {}),
                      this.session &&
                        this.session.bgTokenizer &&
                        this.session.bgTokenizer.scheduleStart()
                  }.bind(this)
                )),
                this.on('change', function(e, t) {
                  t._$emitInputEvent.schedule(31)
                }),
                this.setSession(t || new m('')),
                E.resetOptions(this),
                E._signal('editor', this)
            }
          ;(function() {
            o.implement(this, A),
              (this.$initOperationListeners = function() {
                ;(this.selections = []),
                  this.commands.on('exec', this.startOperation.bind(this), !0),
                  this.commands.on(
                    'afterExec',
                    this.endOperation.bind(this),
                    !0
                  ),
                  (this.$opResetTimer = r.delayedCall(
                    this.endOperation.bind(this)
                  )),
                  this.on(
                    'change',
                    function() {
                      this.curOp || this.startOperation(),
                        (this.curOp.docChanged = !0)
                    }.bind(this),
                    !0
                  ),
                  this.on(
                    'changeSelection',
                    function() {
                      this.curOp || this.startOperation(),
                        (this.curOp.selectionChanged = !0)
                    }.bind(this),
                    !0
                  )
              }),
              (this.curOp = null),
              (this.prevOp = {}),
              (this.startOperation = function(e) {
                if (this.curOp) {
                  if (!e || this.curOp.command) return
                  this.prevOp = this.curOp
                }
                e || ((this.previousCommand = null), (e = {})),
                  this.$opResetTimer.schedule(),
                  (this.curOp = {
                    command: e.command || {},
                    args: e.args,
                    scrollTop: this.renderer.scrollTop
                  }),
                  this.curOp.command.name &&
                    this.curOp.command.scrollIntoView !== void 0 &&
                    this.$blockScrolling++
              }),
              (this.endOperation = function(t) {
                if (this.curOp) {
                  if (t && !1 === t.returnValue) return (this.curOp = null)
                  this._signal('beforeEndOperation')
                  var e = this.curOp.command
                  e.name && 0 < this.$blockScrolling && this.$blockScrolling--
                  var o = e && e.scrollIntoView
                  if (o) {
                    switch (o) {
                      case 'center-animate':
                        o = 'animate'
                      case 'center':
                        this.renderer.scrollCursorIntoView(null, 0.5)
                        break
                      case 'animate':
                      case 'cursor':
                        this.renderer.scrollCursorIntoView()
                        break
                      case 'selectionPart':
                        var n = this.selection.getRange(),
                          r = this.renderer.layerConfig
                        ;(n.start.row >= r.lastRow ||
                          n.end.row <= r.firstRow) &&
                          this.renderer.scrollSelectionIntoView(
                            this.selection.anchor,
                            this.selection.lead
                          )
                        break
                      default:
                    }
                    'animate' == o &&
                      this.renderer.animateScrolling(this.curOp.scrollTop)
                  }
                  ;(this.prevOp = this.curOp), (this.curOp = null)
                }
              }),
              (this.$mergeableCommands = ['backspace', 'del', 'insertstring']),
              (this.$historyTracker = function(t) {
                if (this.$mergeUndoDeltas) {
                  var e = this.prevOp,
                    o = this.$mergeableCommands,
                    n = e.command && t.command.name == e.command.name
                  if ('insertstring' == t.command.name) {
                    var r = t.args
                    void 0 === this.mergeNextCommand &&
                      (this.mergeNextCommand = !0),
                      (n =
                        n &&
                        this.mergeNextCommand &&
                        (!/\s/.test(r) || /\s/.test(e.args))),
                      (this.mergeNextCommand = !0)
                  } else n = n && -1 !== o.indexOf(t.command.name)
                  'always' != this.$mergeUndoDeltas &&
                    2e3 < Date.now() - this.sequenceStartTime &&
                    (n = !1),
                    n
                      ? (this.session.mergeUndoDeltas = !0)
                      : -1 !== o.indexOf(t.command.name) &&
                        (this.sequenceStartTime = Date.now())
                }
              }),
              (this.setKeyboardHandler = function(e, t) {
                if (e && 'string' == typeof e) {
                  this.$keybindingId = e
                  var o = this
                  E.loadModule(['keybinding', e], function(n) {
                    o.$keybindingId == e &&
                      o.keyBinding.setKeyboardHandler(n && n.handler),
                      t && t()
                  })
                } else
                  (this.$keybindingId = null),
                    this.keyBinding.setKeyboardHandler(e),
                    t && t()
              }),
              (this.getKeyboardHandler = function() {
                return this.keyBinding.getKeyboardHandler()
              }),
              (this.setSession = function(e) {
                if (this.session != e) {
                  this.curOp && this.endOperation(), (this.curOp = {})
                  var t = this.session
                  if (t) {
                    this.session.off('change', this.$onDocumentChange),
                      this.session.off('changeMode', this.$onChangeMode),
                      this.session.off(
                        'tokenizerUpdate',
                        this.$onTokenizerUpdate
                      ),
                      this.session.off('changeTabSize', this.$onChangeTabSize),
                      this.session.off(
                        'changeWrapLimit',
                        this.$onChangeWrapLimit
                      ),
                      this.session.off(
                        'changeWrapMode',
                        this.$onChangeWrapMode
                      ),
                      this.session.off('changeFold', this.$onChangeFold),
                      this.session.off(
                        'changeFrontMarker',
                        this.$onChangeFrontMarker
                      ),
                      this.session.off(
                        'changeBackMarker',
                        this.$onChangeBackMarker
                      ),
                      this.session.off(
                        'changeBreakpoint',
                        this.$onChangeBreakpoint
                      ),
                      this.session.off(
                        'changeAnnotation',
                        this.$onChangeAnnotation
                      ),
                      this.session.off('changeOverwrite', this.$onCursorChange),
                      this.session.off(
                        'changeScrollTop',
                        this.$onScrollTopChange
                      ),
                      this.session.off(
                        'changeScrollLeft',
                        this.$onScrollLeftChange
                      )
                    var o = this.session.getSelection()
                    o.off('changeCursor', this.$onCursorChange),
                      o.off('changeSelection', this.$onSelectionChange)
                  }
                  ;(this.session = e),
                    e
                      ? ((this.$onDocumentChange = this.onDocumentChange.bind(
                          this
                        )),
                        e.on('change', this.$onDocumentChange),
                        this.renderer.setSession(e),
                        (this.$onChangeMode = this.onChangeMode.bind(this)),
                        e.on('changeMode', this.$onChangeMode),
                        (this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(
                          this
                        )),
                        e.on('tokenizerUpdate', this.$onTokenizerUpdate),
                        (this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(
                          this.renderer
                        )),
                        e.on('changeTabSize', this.$onChangeTabSize),
                        (this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(
                          this
                        )),
                        e.on('changeWrapLimit', this.$onChangeWrapLimit),
                        (this.$onChangeWrapMode = this.onChangeWrapMode.bind(
                          this
                        )),
                        e.on('changeWrapMode', this.$onChangeWrapMode),
                        (this.$onChangeFold = this.onChangeFold.bind(this)),
                        e.on('changeFold', this.$onChangeFold),
                        (this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(
                          this
                        )),
                        this.session.on(
                          'changeFrontMarker',
                          this.$onChangeFrontMarker
                        ),
                        (this.$onChangeBackMarker = this.onChangeBackMarker.bind(
                          this
                        )),
                        this.session.on(
                          'changeBackMarker',
                          this.$onChangeBackMarker
                        ),
                        (this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(
                          this
                        )),
                        this.session.on(
                          'changeBreakpoint',
                          this.$onChangeBreakpoint
                        ),
                        (this.$onChangeAnnotation = this.onChangeAnnotation.bind(
                          this
                        )),
                        this.session.on(
                          'changeAnnotation',
                          this.$onChangeAnnotation
                        ),
                        (this.$onCursorChange = this.onCursorChange.bind(this)),
                        this.session.on(
                          'changeOverwrite',
                          this.$onCursorChange
                        ),
                        (this.$onScrollTopChange = this.onScrollTopChange.bind(
                          this
                        )),
                        this.session.on(
                          'changeScrollTop',
                          this.$onScrollTopChange
                        ),
                        (this.$onScrollLeftChange = this.onScrollLeftChange.bind(
                          this
                        )),
                        this.session.on(
                          'changeScrollLeft',
                          this.$onScrollLeftChange
                        ),
                        (this.selection = e.getSelection()),
                        this.selection.on('changeCursor', this.$onCursorChange),
                        (this.$onSelectionChange = this.onSelectionChange.bind(
                          this
                        )),
                        this.selection.on(
                          'changeSelection',
                          this.$onSelectionChange
                        ),
                        this.onChangeMode(),
                        (this.$blockScrolling += 1),
                        this.onCursorChange(),
                        (this.$blockScrolling -= 1),
                        this.onScrollTopChange(),
                        this.onScrollLeftChange(),
                        this.onSelectionChange(),
                        this.onChangeFrontMarker(),
                        this.onChangeBackMarker(),
                        this.onChangeBreakpoint(),
                        this.onChangeAnnotation(),
                        this.session.getUseWrapMode() &&
                          this.renderer.adjustWrapLimit(),
                        this.renderer.updateFull())
                      : ((this.selection = null), this.renderer.setSession(e)),
                    this._signal('changeSession', {
                      session: e,
                      oldSession: t
                    }),
                    (this.curOp = null),
                    t && t._signal('changeEditor', { oldEditor: this }),
                    e && e._signal('changeEditor', { editor: this })
                }
              }),
              (this.getSession = function() {
                return this.session
              }),
              (this.setValue = function(e, t) {
                return (
                  this.session.doc.setValue(e),
                  t
                    ? 1 == t
                      ? this.navigateFileEnd()
                      : -1 == t && this.navigateFileStart()
                    : this.selectAll(),
                  e
                )
              }),
              (this.getValue = function() {
                return this.session.getValue()
              }),
              (this.getSelection = function() {
                return this.selection
              }),
              (this.resize = function(e) {
                this.renderer.onResize(e)
              }),
              (this.setTheme = function(e, t) {
                this.renderer.setTheme(e, t)
              }),
              (this.getTheme = function() {
                return this.renderer.getTheme()
              }),
              (this.setStyle = function(e) {
                this.renderer.setStyle(e)
              }),
              (this.unsetStyle = function(e) {
                this.renderer.unsetStyle(e)
              }),
              (this.getFontSize = function() {
                return (
                  this.getOption('fontSize') ||
                  n.computedStyle(this.container, 'fontSize')
                )
              }),
              (this.setFontSize = function(e) {
                this.setOption('fontSize', e)
              }),
              (this.$highlightBrackets = function() {
                if (
                  (this.session.$bracketHighlight &&
                    (this.session.removeMarker(this.session.$bracketHighlight),
                    (this.session.$bracketHighlight = null)),
                  !this.$highlightPending)
                ) {
                  var e = this
                  ;(this.$highlightPending = !0),
                    setTimeout(function() {
                      e.$highlightPending = !1
                      var t = e.session
                      if (t && t.bgTokenizer) {
                        var o = t.findMatchingBracket(e.getCursorPosition())
                        if (o)
                          var n = new y(o.row, o.column, o.row, o.column + 1)
                        else if (t.$mode.getMatching)
                          var n = t.$mode.getMatching(e.session)
                        n &&
                          (t.$bracketHighlight = t.addMarker(
                            n,
                            'ace_bracket',
                            'text'
                          ))
                      }
                    }, 50)
                }
              }),
              (this.$highlightTags = function() {
                if (!this.$highlightTagPending) {
                  var e = this
                  ;(this.$highlightTagPending = !0),
                    setTimeout(function() {
                      e.$highlightTagPending = !1
                      var t = e.session
                      if (t && t.bgTokenizer) {
                        var o = e.getCursorPosition(),
                          n = new b(e.session, o.row, o.column),
                          r = n.getCurrentToken()
                        if (!r || !/\b(?:tag-open|tag-name)/.test(r.type))
                          return (
                            t.removeMarker(t.$tagHighlight),
                            void (t.$tagHighlight = null)
                          )
                        if (
                          !(
                            -1 != r.type.indexOf('tag-open') &&
                            ((r = n.stepForward()), !r)
                          )
                        ) {
                          var a = r.value,
                            i = 0,
                            s = n.stepBackward()
                          if ('<' == s.value)
                            do
                              (s = r),
                                (r = n.stepForward()),
                                r &&
                                  r.value === a &&
                                  -1 !== r.type.indexOf('tag-name') &&
                                  ('<' === s.value
                                    ? i++
                                    : '</' === s.value && i--)
                            while (r && 0 <= i)
                          else {
                            do
                              (r = s),
                                (s = n.stepBackward()),
                                r &&
                                  r.value === a &&
                                  -1 !== r.type.indexOf('tag-name') &&
                                  ('<' === s.value
                                    ? i++
                                    : '</' === s.value && i--)
                            while (s && 0 >= i)
                            n.stepForward()
                          }
                          if (!r)
                            return (
                              t.removeMarker(t.$tagHighlight),
                              void (t.$tagHighlight = null)
                            )
                          var l = n.getCurrentTokenRow(),
                            d = n.getCurrentTokenColumn(),
                            c = new y(l, d, l, d + r.value.length),
                            u = t.$backMarkers[t.$tagHighlight]
                          t.$tagHighlight &&
                            void 0 != u &&
                            0 !== c.compareRange(u.range) &&
                            (t.removeMarker(t.$tagHighlight),
                            (t.$tagHighlight = null)),
                            c &&
                              !t.$tagHighlight &&
                              (t.$tagHighlight = t.addMarker(
                                c,
                                'ace_bracket',
                                'text'
                              ))
                        }
                      }
                    }, 50)
                }
              }),
              (this.focus = function() {
                var e = this
                setTimeout(function() {
                  e.textInput.focus()
                }),
                  this.textInput.focus()
              }),
              (this.isFocused = function() {
                return this.textInput.isFocused()
              }),
              (this.blur = function() {
                this.textInput.blur()
              }),
              (this.onFocus = function(t) {
                this.$isFocused ||
                  ((this.$isFocused = !0),
                  this.renderer.showCursor(),
                  this.renderer.visualizeFocus(),
                  this._emit('focus', t))
              }),
              (this.onBlur = function(t) {
                this.$isFocused &&
                  ((this.$isFocused = !1),
                  this.renderer.hideCursor(),
                  this.renderer.visualizeBlur(),
                  this._emit('blur', t))
              }),
              (this.$cursorChange = function() {
                this.renderer.updateCursor()
              }),
              (this.onDocumentChange = function(e) {
                var t = this.session.$useWrapMode,
                  o = e.start.row == e.end.row ? e.end.row : Infinity
                this.renderer.updateLines(e.start.row, o, t),
                  this._signal('change', e),
                  this.$cursorChange(),
                  this.$updateHighlightActiveLine()
              }),
              (this.onTokenizerUpdate = function(t) {
                var e = t.data
                this.renderer.updateLines(e.first, e.last)
              }),
              (this.onScrollTopChange = function() {
                this.renderer.scrollToY(this.session.getScrollTop())
              }),
              (this.onScrollLeftChange = function() {
                this.renderer.scrollToX(this.session.getScrollLeft())
              }),
              (this.onCursorChange = function() {
                this.$cursorChange(),
                  this.$blockScrolling ||
                    (E.warn(
                      'Automatically scrolling cursor into view after selection change',
                      'this will be disabled in the next version',
                      'set editor.$blockScrolling = Infinity to disable this message'
                    ),
                    this.renderer.scrollCursorIntoView()),
                  this.$highlightBrackets(),
                  this.$highlightTags(),
                  this.$updateHighlightActiveLine(),
                  this._signal('changeSelection')
              }),
              (this.$updateHighlightActiveLine = function() {
                var e = this.getSession(),
                  t
                if (
                  (this.$highlightActiveLine &&
                    (('line' != this.$selectionStyle ||
                      !this.selection.isMultiLine()) &&
                      (t = this.getCursorPosition()),
                    this.renderer.$maxLines &&
                      1 === this.session.getLength() &&
                      !(1 < this.renderer.$minLines) &&
                      (t = !1)),
                  e.$highlightLineMarker && !t)
                )
                  e.removeMarker(e.$highlightLineMarker.id),
                    (e.$highlightLineMarker = null)
                else if (!e.$highlightLineMarker && t) {
                  var o = new y(t.row, t.column, t.row, Infinity)
                  ;(o.id = e.addMarker(o, 'ace_active-line', 'screenLine')),
                    (e.$highlightLineMarker = o)
                } else
                  t &&
                    ((e.$highlightLineMarker.start.row = t.row),
                    (e.$highlightLineMarker.end.row = t.row),
                    (e.$highlightLineMarker.start.column = t.column),
                    e._signal('changeBackMarker'))
              }),
              (this.onSelectionChange = function() {
                var e = this.session
                if (
                  (e.$selectionMarker && e.removeMarker(e.$selectionMarker),
                  (e.$selectionMarker = null),
                  !this.selection.isEmpty())
                ) {
                  var t = this.selection.getRange(),
                    o = this.getSelectionStyle()
                  e.$selectionMarker = e.addMarker(t, 'ace_selection', o)
                } else this.$updateHighlightActiveLine()
                var n =
                  this.$highlightSelectedWord &&
                  this.$getSelectionHighLightRegexp()
                this.session.highlight(n), this._signal('changeSelection')
              }),
              (this.$getSelectionHighLightRegexp = function() {
                var e = this.session,
                  t = this.getSelectionRange()
                if (!(t.isEmpty() || t.isMultiLine())) {
                  var o = t.start.column - 1,
                    n = t.end.column + 1,
                    r = e.getLine(t.start.row),
                    a = r.length,
                    i = r.substring(p(o, 0), u(n, a))
                  if (
                    !(
                      (0 <= o && /^[\w\d]/.test(i)) ||
                      (n <= a && /[\w\d]$/.test(i))
                    ) &&
                    ((i = r.substring(t.start.column, t.end.column)),
                    !!/^[\w\d]+$/.test(i))
                  ) {
                    var s = this.$search.$assembleRegExp({
                      wholeWord: !0,
                      caseSensitive: !0,
                      needle: i
                    })
                    return s
                  }
                }
              }),
              (this.onChangeFrontMarker = function() {
                this.renderer.updateFrontMarkers()
              }),
              (this.onChangeBackMarker = function() {
                this.renderer.updateBackMarkers()
              }),
              (this.onChangeBreakpoint = function() {
                this.renderer.updateBreakpoints()
              }),
              (this.onChangeAnnotation = function() {
                this.renderer.setAnnotations(this.session.getAnnotations())
              }),
              (this.onChangeMode = function(t) {
                this.renderer.updateText(), this._emit('changeMode', t)
              }),
              (this.onChangeWrapLimit = function() {
                this.renderer.updateFull()
              }),
              (this.onChangeWrapMode = function() {
                this.renderer.onResize(!0)
              }),
              (this.onChangeFold = function() {
                this.$updateHighlightActiveLine(), this.renderer.updateFull()
              }),
              (this.getSelectedText = function() {
                return this.session.getTextRange(this.getSelectionRange())
              }),
              (this.getCopyText = function() {
                var e = this.getSelectedText()
                return this._signal('copy', e), e
              }),
              (this.onCopy = function() {
                this.commands.exec('copy', this)
              }),
              (this.onCut = function() {
                this.commands.exec('cut', this)
              }),
              (this.onPaste = function(e, t) {
                this.commands.exec('paste', this, { text: e, event: t })
              }),
              (this.$handlePaste = function(t) {
                'string' == typeof t && (t = { text: t }),
                  this._signal('paste', t)
                var o = t.text
                if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
                  this.insert(o)
                else {
                  var n = o.split(/\r\n|\r|\n/),
                    r = this.selection.rangeList.ranges
                  if (n.length > r.length || 2 > n.length || !n[1])
                    return this.commands.exec('insertstring', this, o)
                  for (var a = r.length, i; a--; )
                    (i = r[a]),
                      i.isEmpty() || this.session.remove(i),
                      this.session.insert(i.start, n[a])
                }
              }),
              (this.execCommand = function(e, t) {
                return this.commands.exec(e, this, t)
              }),
              (this.insert = function(e, t) {
                var o = this.session,
                  n = o.getMode(),
                  r = this.getCursorPosition()
                if (this.getBehavioursEnabled() && !t) {
                  var a = n.transformAction(
                    o.getState(r.row),
                    'insertion',
                    this,
                    o,
                    e
                  )
                  a &&
                    (e !== a.text &&
                      ((this.session.mergeUndoDeltas = !1),
                      (this.$mergeNextCommand = !1)),
                    (e = a.text))
                }
                if (
                  ('\t' == e && (e = this.session.getTabString()),
                  !this.selection.isEmpty())
                ) {
                  var i = this.getSelectionRange()
                  ;(r = this.session.remove(i)), this.clearSelection()
                } else if (this.session.getOverwrite()) {
                  var i = new y.fromPoints(r, r)
                  ;(i.end.column += e.length), this.session.remove(i)
                }
                if ('\n' == e || '\r\n' == e) {
                  var s = o.getLine(r.row)
                  if (r.column > s.search(/\S|$/)) {
                    var l = s.substr(r.column).search(/\S|$/)
                    o.doc.removeInLine(r.row, r.column, r.column + l)
                  }
                }
                this.clearSelection()
                var d = r.column,
                  c = o.getState(r.row),
                  s = o.getLine(r.row),
                  u = n.checkOutdent(c, s, e),
                  p = o.insert(r, e)
                if (
                  (a &&
                    a.selection &&
                    (2 == a.selection.length
                      ? this.selection.setSelectionRange(
                          new y(
                            r.row,
                            d + a.selection[0],
                            r.row,
                            d + a.selection[1]
                          )
                        )
                      : this.selection.setSelectionRange(
                          new y(
                            r.row + a.selection[0],
                            a.selection[1],
                            r.row + a.selection[2],
                            a.selection[3]
                          )
                        )),
                  o.getDocument().isNewLine(e))
                ) {
                  var g = n.getNextLineIndent(
                    c,
                    s.slice(0, r.column),
                    o.getTabString()
                  )
                  o.insert({ row: r.row + 1, column: 0 }, g)
                }
                u && n.autoOutdent(c, o, r.row)
              }),
              (this.onTextInput = function(e) {
                this.keyBinding.onTextInput(e)
              }),
              (this.onCommandKey = function(t, e, o) {
                this.keyBinding.onCommandKey(t, e, o)
              }),
              (this.setOverwrite = function(e) {
                this.session.setOverwrite(e)
              }),
              (this.getOverwrite = function() {
                return this.session.getOverwrite()
              }),
              (this.toggleOverwrite = function() {
                this.session.toggleOverwrite()
              }),
              (this.setScrollSpeed = function(e) {
                this.setOption('scrollSpeed', e)
              }),
              (this.getScrollSpeed = function() {
                return this.getOption('scrollSpeed')
              }),
              (this.setDragDelay = function(e) {
                this.setOption('dragDelay', e)
              }),
              (this.getDragDelay = function() {
                return this.getOption('dragDelay')
              }),
              (this.setSelectionStyle = function(e) {
                this.setOption('selectionStyle', e)
              }),
              (this.getSelectionStyle = function() {
                return this.getOption('selectionStyle')
              }),
              (this.setHighlightActiveLine = function(e) {
                this.setOption('highlightActiveLine', e)
              }),
              (this.getHighlightActiveLine = function() {
                return this.getOption('highlightActiveLine')
              }),
              (this.setHighlightGutterLine = function(e) {
                this.setOption('highlightGutterLine', e)
              }),
              (this.getHighlightGutterLine = function() {
                return this.getOption('highlightGutterLine')
              }),
              (this.setHighlightSelectedWord = function(e) {
                this.setOption('highlightSelectedWord', e)
              }),
              (this.getHighlightSelectedWord = function() {
                return this.$highlightSelectedWord
              }),
              (this.setAnimatedScroll = function(e) {
                this.renderer.setAnimatedScroll(e)
              }),
              (this.getAnimatedScroll = function() {
                return this.renderer.getAnimatedScroll()
              }),
              (this.setShowInvisibles = function(e) {
                this.renderer.setShowInvisibles(e)
              }),
              (this.getShowInvisibles = function() {
                return this.renderer.getShowInvisibles()
              }),
              (this.setDisplayIndentGuides = function(e) {
                this.renderer.setDisplayIndentGuides(e)
              }),
              (this.getDisplayIndentGuides = function() {
                return this.renderer.getDisplayIndentGuides()
              }),
              (this.setShowPrintMargin = function(e) {
                this.renderer.setShowPrintMargin(e)
              }),
              (this.getShowPrintMargin = function() {
                return this.renderer.getShowPrintMargin()
              }),
              (this.setPrintMarginColumn = function(e) {
                this.renderer.setPrintMarginColumn(e)
              }),
              (this.getPrintMarginColumn = function() {
                return this.renderer.getPrintMarginColumn()
              }),
              (this.setReadOnly = function(e) {
                this.setOption('readOnly', e)
              }),
              (this.getReadOnly = function() {
                return this.getOption('readOnly')
              }),
              (this.setBehavioursEnabled = function(e) {
                this.setOption('behavioursEnabled', e)
              }),
              (this.getBehavioursEnabled = function() {
                return this.getOption('behavioursEnabled')
              }),
              (this.setWrapBehavioursEnabled = function(e) {
                this.setOption('wrapBehavioursEnabled', e)
              }),
              (this.getWrapBehavioursEnabled = function() {
                return this.getOption('wrapBehavioursEnabled')
              }),
              (this.setShowFoldWidgets = function(e) {
                this.setOption('showFoldWidgets', e)
              }),
              (this.getShowFoldWidgets = function() {
                return this.getOption('showFoldWidgets')
              }),
              (this.setFadeFoldWidgets = function(e) {
                this.setOption('fadeFoldWidgets', e)
              }),
              (this.getFadeFoldWidgets = function() {
                return this.getOption('fadeFoldWidgets')
              }),
              (this.remove = function(e) {
                this.selection.isEmpty() &&
                  ('left' == e
                    ? this.selection.selectLeft()
                    : this.selection.selectRight())
                var t = this.getSelectionRange()
                if (this.getBehavioursEnabled()) {
                  var o = this.session,
                    n = o.getState(t.start.row),
                    r = o.getMode().transformAction(n, 'deletion', this, o, t)
                  if (0 === t.end.column) {
                    var a = o.getTextRange(t)
                    if ('\n' == a[a.length - 1]) {
                      var i = o.getLine(t.end.row)
                      ;/^\s+$/.test(i) && (t.end.column = i.length)
                    }
                  }
                  r && (t = r)
                }
                this.session.remove(t), this.clearSelection()
              }),
              (this.removeWordRight = function() {
                this.selection.isEmpty() && this.selection.selectWordRight(),
                  this.session.remove(this.getSelectionRange()),
                  this.clearSelection()
              }),
              (this.removeWordLeft = function() {
                this.selection.isEmpty() && this.selection.selectWordLeft(),
                  this.session.remove(this.getSelectionRange()),
                  this.clearSelection()
              }),
              (this.removeToLineStart = function() {
                this.selection.isEmpty() && this.selection.selectLineStart(),
                  this.session.remove(this.getSelectionRange()),
                  this.clearSelection()
              }),
              (this.removeToLineEnd = function() {
                this.selection.isEmpty() && this.selection.selectLineEnd()
                var e = this.getSelectionRange()
                e.start.column == e.end.column &&
                  e.start.row == e.end.row &&
                  ((e.end.column = 0), e.end.row++),
                  this.session.remove(e),
                  this.clearSelection()
              }),
              (this.splitLine = function() {
                this.selection.isEmpty() ||
                  (this.session.remove(this.getSelectionRange()),
                  this.clearSelection())
                var e = this.getCursorPosition()
                this.insert('\n'), this.moveCursorToPosition(e)
              }),
              (this.transposeLetters = function() {
                if (this.selection.isEmpty()) {
                  var e = this.getCursorPosition(),
                    t = e.column
                  if (0 !== t) {
                    var o = this.session.getLine(e.row),
                      n,
                      r
                    t < o.length
                      ? ((n = o.charAt(t) + o.charAt(t - 1)),
                        (r = new y(e.row, t - 1, e.row, t + 1)))
                      : ((n = o.charAt(t - 1) + o.charAt(t - 2)),
                        (r = new y(e.row, t - 2, e.row, t))),
                      this.session.replace(r, n)
                  }
                }
              }),
              (this.toLowerCase = function() {
                var e = this.getSelectionRange()
                this.selection.isEmpty() && this.selection.selectWord()
                var t = this.getSelectionRange(),
                  o = this.session.getTextRange(t)
                this.session.replace(t, o.toLowerCase()),
                  this.selection.setSelectionRange(e)
              }),
              (this.toUpperCase = function() {
                var e = this.getSelectionRange()
                this.selection.isEmpty() && this.selection.selectWord()
                var t = this.getSelectionRange(),
                  o = this.session.getTextRange(t)
                this.session.replace(t, o.toUpperCase()),
                  this.selection.setSelectionRange(e)
              }),
              (this.indent = function() {
                var e = this.session,
                  t = this.getSelectionRange()
                if (t.start.row < t.end.row) {
                  var o = this.$getSelectedRows()
                  return void e.indentRows(o.first, o.last, '\t')
                }
                if (t.start.column < t.end.column) {
                  var n = e.getTextRange(t)
                  if (!/^\s+$/.test(n)) {
                    var o = this.$getSelectedRows()
                    return void e.indentRows(o.first, o.last, '\t')
                  }
                }
                var a = e.getLine(t.start.row),
                  i = t.start,
                  s = e.getTabSize(),
                  l = e.documentToScreenColumn(i.row, i.column)
                if (this.session.getUseSoftTabs())
                  var d = s - (l % s),
                    c = r.stringRepeat(' ', d)
                else {
                  for (var d = l % s; ' ' == a[t.start.column - 1] && d; )
                    t.start.column--, d--
                  this.selection.setSelectionRange(t), (c = '\t')
                }
                return this.insert(c)
              }),
              (this.blockIndent = function() {
                var e = this.$getSelectedRows()
                this.session.indentRows(e.first, e.last, '\t')
              }),
              (this.blockOutdent = function() {
                var e = this.session.getSelection()
                this.session.outdentRows(e.getRange())
              }),
              (this.sortLines = function() {
                var e = this.$getSelectedRows(),
                  t = this.session,
                  o = []
                for (r = e.first; r <= e.last; r++) o.push(t.getLine(r))
                o.sort(function(e, t) {
                  return e.toLowerCase() < t.toLowerCase()
                    ? -1
                    : e.toLowerCase() > t.toLowerCase()
                      ? 1
                      : 0
                })
                for (
                  var n = new y(0, 0, 0, 0), r = e.first, a;
                  r <= e.last;
                  r++
                )
                  (a = t.getLine(r)),
                    (n.start.row = r),
                    (n.end.row = r),
                    (n.end.column = a.length),
                    t.replace(n, o[r - e.first])
              }),
              (this.toggleCommentLines = function() {
                var e = this.session.getState(this.getCursorPosition().row),
                  t = this.$getSelectedRows()
                this.session
                  .getMode()
                  .toggleCommentLines(e, this.session, t.first, t.last)
              }),
              (this.toggleBlockComment = function() {
                var e = this.getCursorPosition(),
                  t = this.session.getState(e.row),
                  o = this.getSelectionRange()
                this.session.getMode().toggleBlockComment(t, this.session, o, e)
              }),
              (this.getNumberAt = function(e, t) {
                var o = /[\-]?[0-9]+(?:\.[0-9]+)?/g
                o.lastIndex = 0
                for (var n = this.session.getLine(e); o.lastIndex < t; ) {
                  var r = o.exec(n)
                  if (r.index <= t && r.index + r[0].length >= t) {
                    var a = {
                      value: r[0],
                      start: r.index,
                      end: r.index + r[0].length
                    }
                    return a
                  }
                }
                return null
              }),
              (this.modifyNumber = function(e) {
                var o = this.selection.getCursor().row,
                  n = this.selection.getCursor().column,
                  r = new y(o, n - 1, o, n),
                  a = this.session.getTextRange(r)
                if (!isNaN(parseFloat(a)) && isFinite(a)) {
                  var i = this.getNumberAt(o, n)
                  if (i) {
                    var l =
                        0 <= i.value.indexOf('.')
                          ? i.start + i.value.indexOf('.') + 1
                          : i.end,
                      d = i.start + i.value.length - l,
                      c = parseFloat(i.value)
                    ;(c *= s(10, d)),
                      (e *=
                        l !== i.end && n < l
                          ? s(10, i.end - n - 1)
                          : s(10, i.end - n)),
                      (c += e),
                      (c /= s(10, d))
                    var t = c.toFixed(d),
                      u = new y(o, i.start, o, i.end)
                    this.session.replace(u, t),
                      this.moveCursorTo(
                        o,
                        p(i.start + 1, n + t.length - i.value.length)
                      )
                  }
                }
              }),
              (this.removeLines = function() {
                var e = this.$getSelectedRows()
                this.session.removeFullLines(e.first, e.last),
                  this.clearSelection()
              }),
              (this.duplicateSelection = function() {
                var e = this.selection,
                  t = this.session,
                  o = e.getRange(),
                  n = e.isBackwards()
                if (o.isEmpty()) {
                  var r = o.start.row
                  t.duplicateLines(r, r)
                } else {
                  var a = n ? o.start : o.end,
                    i = t.insert(a, t.getTextRange(o), !1)
                  ;(o.start = a), (o.end = i), e.setSelectionRange(o, n)
                }
              }),
              (this.moveLinesDown = function() {
                this.$moveLines(1, !1)
              }),
              (this.moveLinesUp = function() {
                this.$moveLines(-1, !1)
              }),
              (this.moveText = function(e, t, o) {
                return this.session.moveText(e, t, o)
              }),
              (this.copyLinesUp = function() {
                this.$moveLines(-1, !0)
              }),
              (this.copyLinesDown = function() {
                this.$moveLines(1, !0)
              }),
              (this.$moveLines = function(e, t) {
                var o = this.selection,
                  n,
                  r
                if (!o.inMultiSelectMode || this.inVirtualSelectionMode) {
                  var a = o.toOrientedRange()
                  ;(n = this.$getSelectedRows(a)),
                    (r = this.session.$moveLines(n.first, n.last, t ? 0 : e)),
                    t && -1 == e && (r = 0),
                    a.moveBy(r, 0),
                    o.fromOrientedRange(a)
                } else {
                  var s = o.rangeList.ranges
                  o.rangeList.detach(this.session),
                    (this.inVirtualSelectionMode = !0)
                  for (var d = 0, c = 0, u = s.length, l = 0, i; l < u; l++) {
                    ;(i = l),
                      s[l].moveBy(d, 0),
                      (n = this.$getSelectedRows(s[l]))
                    for (var p = n.first, g = n.last; ++l < u; ) {
                      c && s[l].moveBy(c, 0)
                      var h = this.$getSelectedRows(s[l])
                      if (t && h.first != g) break
                      else if (!t && h.first > g + 1) break
                      g = h.last
                    }
                    for (
                      l--,
                        d = this.session.$moveLines(p, g, t ? 0 : e),
                        t && -1 == e && (i = l + 1);
                      i <= l;

                    )
                      s[i].moveBy(d, 0), i++
                    t || (d = 0), (c += d)
                  }
                  o.fromOrientedRange(o.ranges[0]),
                    o.rangeList.attach(this.session),
                    (this.inVirtualSelectionMode = !1)
                }
              }),
              (this.$getSelectedRows = function(e) {
                return (
                  (e = (e || this.getSelectionRange()).collapseRows()),
                  {
                    first: this.session.getRowFoldStart(e.start.row),
                    last: this.session.getRowFoldEnd(e.end.row)
                  }
                )
              }),
              (this.onCompositionStart = function() {
                this.renderer.showComposition(this.getCursorPosition())
              }),
              (this.onCompositionUpdate = function(e) {
                this.renderer.setCompositionText(e)
              }),
              (this.onCompositionEnd = function() {
                this.renderer.hideComposition()
              }),
              (this.getFirstVisibleRow = function() {
                return this.renderer.getFirstVisibleRow()
              }),
              (this.getLastVisibleRow = function() {
                return this.renderer.getLastVisibleRow()
              }),
              (this.isRowVisible = function(e) {
                return (
                  e >= this.getFirstVisibleRow() &&
                  e <= this.getLastVisibleRow()
                )
              }),
              (this.isRowFullyVisible = function(e) {
                return (
                  e >= this.renderer.getFirstFullyVisibleRow() &&
                  e <= this.renderer.getLastFullyVisibleRow()
                )
              }),
              (this.$getVisibleRowCount = function() {
                return (
                  this.renderer.getScrollBottomRow() -
                  this.renderer.getScrollTopRow() +
                  1
                )
              }),
              (this.$moveByPage = function(e, t) {
                var o = this.renderer,
                  n = this.renderer.layerConfig,
                  r = e * l(n.height / n.lineHeight)
                this.$blockScrolling++,
                  !0 === t
                    ? this.selection.$moveSelection(function() {
                        this.moveCursorBy(r, 0)
                      })
                    : !1 === t &&
                      (this.selection.moveCursorBy(r, 0),
                      this.selection.clearSelection()),
                  this.$blockScrolling--
                var a = o.scrollTop
                o.scrollBy(0, r * n.lineHeight),
                  null != t && o.scrollCursorIntoView(null, 0.5),
                  o.animateScrolling(a)
              }),
              (this.selectPageDown = function() {
                this.$moveByPage(1, !0)
              }),
              (this.selectPageUp = function() {
                this.$moveByPage(-1, !0)
              }),
              (this.gotoPageDown = function() {
                this.$moveByPage(1, !1)
              }),
              (this.gotoPageUp = function() {
                this.$moveByPage(-1, !1)
              }),
              (this.scrollPageDown = function() {
                this.$moveByPage(1)
              }),
              (this.scrollPageUp = function() {
                this.$moveByPage(-1)
              }),
              (this.scrollToRow = function(e) {
                this.renderer.scrollToRow(e)
              }),
              (this.scrollToLine = function(e, t, o, n) {
                this.renderer.scrollToLine(e, t, o, n)
              }),
              (this.centerSelection = function() {
                var e = this.getSelectionRange(),
                  t = {
                    row: l(e.start.row + (e.end.row - e.start.row) / 2),
                    column: l(
                      e.start.column + (e.end.column - e.start.column) / 2
                    )
                  }
                this.renderer.alignCursor(t, 0.5)
              }),
              (this.getCursorPosition = function() {
                return this.selection.getCursor()
              }),
              (this.getCursorPositionScreen = function() {
                return this.session.documentToScreenPosition(
                  this.getCursorPosition()
                )
              }),
              (this.getSelectionRange = function() {
                return this.selection.getRange()
              }),
              (this.selectAll = function() {
                ;(this.$blockScrolling += 1),
                  this.selection.selectAll(),
                  (this.$blockScrolling -= 1)
              }),
              (this.clearSelection = function() {
                this.selection.clearSelection()
              }),
              (this.moveCursorTo = function(e, t) {
                this.selection.moveCursorTo(e, t)
              }),
              (this.moveCursorToPosition = function(e) {
                this.selection.moveCursorToPosition(e)
              }),
              (this.jumpToMatching = function(e, t) {
                var o = this.getCursorPosition(),
                  n = new b(this.session, o.row, o.column),
                  r = n.getCurrentToken(),
                  a = r || n.stepForward()
                if (a) {
                  var s = !1,
                    l = {},
                    c = o.column - a.start,
                    i = {
                      ')': '(',
                      '(': '(',
                      ']': '[',
                      '[': '[',
                      '{': '{',
                      '}': '{'
                    },
                    u,
                    p
                  do {
                    if (a.value.match(/[{}()\[\]]/g)) {
                      for (; c < a.value.length && !s; c++)
                        if (i[a.value[c]])
                          switch (
                            ((p =
                              i[a.value[c]] +
                              '.' +
                              a.type.replace('rparen', 'lparen')),
                            isNaN(l[p]) && (l[p] = 0),
                            a.value[c])
                          ) {
                            case '(':
                            case '[':
                            case '{':
                              l[p]++
                              break
                            case ')':
                            case ']':
                            case '}':
                              l[p]--, -1 === l[p] && ((u = 'bracket'), (s = !0))
                          }
                    } else
                      a &&
                        -1 !== a.type.indexOf('tag-name') &&
                        (isNaN(l[a.value]) && (l[a.value] = 0),
                        '<' === r.value
                          ? l[a.value]++
                          : '</' === r.value && l[a.value]--,
                        -1 === l[a.value] && ((u = 'tag'), (s = !0)))
                    s || ((r = a), (a = n.stepForward()), (c = 0))
                  } while (a && !s)
                  if (u) {
                    var g, h
                    if ('bracket' === u)
                      (g = this.session.getBracketRange(o)),
                        g ||
                          ((g = new y(
                            n.getCurrentTokenRow(),
                            n.getCurrentTokenColumn() + c - 1,
                            n.getCurrentTokenRow(),
                            n.getCurrentTokenColumn() + c - 1
                          )),
                          (h = g.start),
                          (t ||
                            (h.row === o.row && 2 > d(h.column - o.column))) &&
                            (g = this.session.getBracketRange(h)))
                    else if ('tag' === u) {
                      if (a && -1 !== a.type.indexOf('tag-name'))
                        var m = a.value
                      else return
                      if (
                        ((g = new y(
                          n.getCurrentTokenRow(),
                          n.getCurrentTokenColumn() - 2,
                          n.getCurrentTokenRow(),
                          n.getCurrentTokenColumn() - 2
                        )),
                        0 === g.compare(o.row, o.column))
                      ) {
                        s = !1
                        do
                          (a = r),
                            (r = n.stepBackward()),
                            r &&
                              (-1 !== r.type.indexOf('tag-close') &&
                                g.setEnd(
                                  n.getCurrentTokenRow(),
                                  n.getCurrentTokenColumn() + 1
                                ),
                              a.value === m &&
                                -1 !== a.type.indexOf('tag-name') &&
                                ('<' === r.value
                                  ? l[m]++
                                  : '</' === r.value && l[m]--,
                                0 === l[m] && (s = !0)))
                        while (r && !s)
                      }
                      a &&
                        a.type.indexOf('tag-name') &&
                        ((h = g.start),
                        h.row == o.row &&
                          2 > d(h.column - o.column) &&
                          (h = g.end))
                    }
                    ;(h = (g && g.cursor) || h),
                      h &&
                        (e
                          ? g && t
                            ? this.selection.setRange(g)
                            : g && g.isEqual(this.getSelectionRange())
                              ? this.clearSelection()
                              : this.selection.selectTo(h.row, h.column)
                          : this.selection.moveTo(h.row, h.column))
                  }
                }
              }),
              (this.gotoLine = function(e, t, o) {
                this.selection.clearSelection(),
                  this.session.unfold({ row: e - 1, column: t || 0 }),
                  (this.$blockScrolling += 1),
                  this.exitMultiSelectMode && this.exitMultiSelectMode(),
                  this.moveCursorTo(e - 1, t || 0),
                  (this.$blockScrolling -= 1),
                  this.isRowFullyVisible(e - 1) ||
                    this.scrollToLine(e - 1, !0, o)
              }),
              (this.navigateTo = function(e, t) {
                this.selection.moveTo(e, t)
              }),
              (this.navigateUp = function(e) {
                if (
                  this.selection.isMultiLine() &&
                  !this.selection.isBackwards()
                ) {
                  var t = this.selection.anchor.getPosition()
                  return this.moveCursorToPosition(t)
                }
                this.selection.clearSelection(),
                  this.selection.moveCursorBy(-e || -1, 0)
              }),
              (this.navigateDown = function(e) {
                if (
                  this.selection.isMultiLine() &&
                  this.selection.isBackwards()
                ) {
                  var t = this.selection.anchor.getPosition()
                  return this.moveCursorToPosition(t)
                }
                this.selection.clearSelection(),
                  this.selection.moveCursorBy(e || 1, 0)
              }),
              (this.navigateLeft = function(e) {
                if (!this.selection.isEmpty()) {
                  var t = this.getSelectionRange().start
                  this.moveCursorToPosition(t)
                } else for (e = e || 1; e--; ) this.selection.moveCursorLeft()
                this.clearSelection()
              }),
              (this.navigateRight = function(e) {
                if (!this.selection.isEmpty()) {
                  var t = this.getSelectionRange().end
                  this.moveCursorToPosition(t)
                } else for (e = e || 1; e--; ) this.selection.moveCursorRight()
                this.clearSelection()
              }),
              (this.navigateLineStart = function() {
                this.selection.moveCursorLineStart(), this.clearSelection()
              }),
              (this.navigateLineEnd = function() {
                this.selection.moveCursorLineEnd(), this.clearSelection()
              }),
              (this.navigateFileEnd = function() {
                this.selection.moveCursorFileEnd(), this.clearSelection()
              }),
              (this.navigateFileStart = function() {
                this.selection.moveCursorFileStart(), this.clearSelection()
              }),
              (this.navigateWordRight = function() {
                this.selection.moveCursorWordRight(), this.clearSelection()
              }),
              (this.navigateWordLeft = function() {
                this.selection.moveCursorWordLeft(), this.clearSelection()
              }),
              (this.replace = function(e, t) {
                t && this.$search.set(t)
                var o = this.$search.find(this.session),
                  n = 0
                return o
                  ? (this.$tryReplace(o, e) && (n = 1),
                    null !== o &&
                      (this.selection.setSelectionRange(o),
                      this.renderer.scrollSelectionIntoView(o.start, o.end)),
                    n)
                  : n
              }),
              (this.replaceAll = function(e, t) {
                t && this.$search.set(t)
                var o = this.$search.findAll(this.session),
                  n = 0
                if (!o.length) return n
                this.$blockScrolling += 1
                var r = this.getSelectionRange()
                this.selection.moveTo(0, 0)
                for (var a = o.length - 1; 0 <= a; --a)
                  this.$tryReplace(o[a], e) && n++
                return (
                  this.selection.setSelectionRange(r),
                  (this.$blockScrolling -= 1),
                  n
                )
              }),
              (this.$tryReplace = function(e, t) {
                var o = this.session.getTextRange(e)
                return (
                  (t = this.$search.replace(o, t)),
                  null === t ? null : ((e.end = this.session.replace(e, t)), e)
                )
              }),
              (this.getLastSearchOptions = function() {
                return this.$search.getOptions()
              }),
              (this.find = function(e, t, n) {
                t || (t = {}),
                  'string' == typeof e || e instanceof RegExp
                    ? (t.needle = e)
                    : 'object' == typeof e && o.mixin(t, e)
                var r = this.selection.getRange()
                null == t.needle &&
                  ((e =
                    this.session.getTextRange(r) ||
                    this.$search.$options.needle),
                  !e &&
                    ((r = this.session.getWordRange(
                      r.start.row,
                      r.start.column
                    )),
                    (e = this.session.getTextRange(r))),
                  this.$search.set({ needle: e })),
                  this.$search.set(t),
                  t.start || this.$search.set({ start: r })
                var a = this.$search.find(this.session)
                return t.preventScroll
                  ? a
                  : a
                    ? (this.revealRange(a, n), a)
                    : void (t.backwards ? (r.start = r.end) : (r.end = r.start),
                      this.selection.setRange(r))
              }),
              (this.findNext = function(e, t) {
                this.find({ skipCurrent: !0, backwards: !1 }, e, t)
              }),
              (this.findPrevious = function(e, t) {
                this.find(e, { skipCurrent: !0, backwards: !0 }, t)
              }),
              (this.revealRange = function(e, t) {
                ;(this.$blockScrolling += 1),
                  this.session.unfold(e),
                  this.selection.setSelectionRange(e),
                  (this.$blockScrolling -= 1)
                var o = this.renderer.scrollTop
                this.renderer.scrollSelectionIntoView(e.start, e.end, 0.5),
                  !1 !== t && this.renderer.animateScrolling(o)
              }),
              (this.undo = function() {
                this.$blockScrolling++,
                  this.session.getUndoManager().undo(),
                  this.$blockScrolling--,
                  this.renderer.scrollCursorIntoView(null, 0.5)
              }),
              (this.redo = function() {
                this.$blockScrolling++,
                  this.session.getUndoManager().redo(),
                  this.$blockScrolling--,
                  this.renderer.scrollCursorIntoView(null, 0.5)
              }),
              (this.destroy = function() {
                this.renderer.destroy(),
                  this._signal('destroy', this),
                  this.session && this.session.destroy()
              }),
              (this.setAutoScrollEditorIntoView = function(e) {
                if (e) {
                  var t = this,
                    o = !1,
                    n
                  this.$scrollAnchor ||
                    (this.$scrollAnchor = document.createElement('div'))
                  var r = this.$scrollAnchor
                  ;(r.style.cssText = 'position:absolute'),
                    this.container.insertBefore(r, this.container.firstChild)
                  var a = this.on('changeSelection', function() {
                      o = !0
                    }),
                    i = this.renderer.on('beforeRender', function() {
                      o && (n = t.renderer.container.getBoundingClientRect())
                    }),
                    s = this.renderer.on('afterRender', function() {
                      if (
                        o &&
                        n &&
                        (t.isFocused() ||
                          (t.searchBox && t.searchBox.isFocused()))
                      ) {
                        var e = t.renderer,
                          a = e.$cursorLayer.$pixelPos,
                          i = e.layerConfig,
                          s = a.top - i.offset
                        ;(o =
                          (0 <= a.top && 0 > s + n.top) ||
                          (a.top < i.height &&
                          a.top + n.top + i.lineHeight > window.innerHeight
                            ? !1
                            : null)),
                          null != o &&
                            ((r.style.top = s + 'px'),
                            (r.style.left = a.left + 'px'),
                            (r.style.height = i.lineHeight + 'px'),
                            r.scrollIntoView(o)),
                          (o = n = null)
                      }
                    })
                  this.setAutoScrollEditorIntoView = function(e) {
                    e ||
                      (delete this.setAutoScrollEditorIntoView,
                      this.off('changeSelection', a),
                      this.renderer.off('afterRender', s),
                      this.renderer.off('beforeRender', i))
                  }
                }
              }),
              (this.$resetCursorStyle = function() {
                var e = this.$cursorStyle || 'ace',
                  t = this.renderer.$cursorLayer
                t &&
                  (t.setSmoothBlinking(/smooth/.test(e)),
                  (t.isBlinking = !this.$readOnly && 'wide' != e),
                  n.setCssClass(t.element, 'ace_slim-cursors', /slim/.test(e)))
              })
          }.call(v.prototype),
            E.defineOptions(v.prototype, 'editor', {
              selectionStyle: {
                set: function(e) {
                  this.onSelectionChange(),
                    this._signal('changeSelectionStyle', { data: e })
                },
                initialValue: 'line'
              },
              highlightActiveLine: {
                set: function() {
                  this.$updateHighlightActiveLine()
                },
                initialValue: !0
              },
              highlightSelectedWord: {
                set: function() {
                  this.$onSelectionChange()
                },
                initialValue: !0
              },
              readOnly: {
                set: function() {
                  this.$resetCursorStyle()
                },
                initialValue: !1
              },
              cursorStyle: {
                set: function() {
                  this.$resetCursorStyle()
                },
                values: ['ace', 'slim', 'smooth', 'wide'],
                initialValue: 'ace'
              },
              mergeUndoDeltas: { values: [!1, !0, 'always'], initialValue: !0 },
              behavioursEnabled: { initialValue: !0 },
              wrapBehavioursEnabled: { initialValue: !0 },
              autoScrollEditorIntoView: {
                set: function(e) {
                  this.setAutoScrollEditorIntoView(e)
                }
              },
              keyboardHandler: {
                set: function(e) {
                  this.setKeyboardHandler(e)
                },
                get: function() {
                  return this.keybindingId
                },
                handlesSet: !0
              },
              hScrollBarAlwaysVisible: 'renderer',
              vScrollBarAlwaysVisible: 'renderer',
              highlightGutterLine: 'renderer',
              animatedScroll: 'renderer',
              showInvisibles: 'renderer',
              showPrintMargin: 'renderer',
              printMarginColumn: 'renderer',
              printMargin: 'renderer',
              fadeFoldWidgets: 'renderer',
              showFoldWidgets: 'renderer',
              showLineNumbers: 'renderer',
              showGutter: 'renderer',
              displayIndentGuides: 'renderer',
              fontSize: 'renderer',
              fontFamily: 'renderer',
              maxLines: 'renderer',
              minLines: 'renderer',
              scrollPastEnd: 'renderer',
              fixedWidthGutter: 'renderer',
              theme: 'renderer',
              scrollSpeed: '$mouseHandler',
              dragDelay: '$mouseHandler',
              dragEnabled: '$mouseHandler',
              focusTimout: '$mouseHandler',
              tooltipFollowsMouse: '$mouseHandler',
              firstLineNumber: 'session',
              overwrite: 'session',
              newLineMode: 'session',
              useWorker: 'session',
              useSoftTabs: 'session',
              tabSize: 'session',
              wrap: 'session',
              indentedSoftWrap: 'session',
              foldStyle: 'session',
              mode: 'session'
            }),
            (t.Editor = v))
        }
      ),
      ace.define('ace/undomanager', ['require', 'exports', 'module'], function(
        e,
        t
      ) {
        'use strict'
        var o = function() {
          this.reset()
        }
        ;(function() {
          function e(e) {
            return {
              action: e.action,
              start: e.start,
              end: e.end,
              lines: 1 == e.lines.length ? null : e.lines,
              text: 1 == e.lines.length ? e.lines[0] : null
            }
          }
          function t(e) {
            return {
              action: e.action,
              start: e.start,
              end: e.end,
              lines: e.lines || [e.text]
            }
          }
          function o(e, t) {
            for (var o = Array(e.length), n = 0; n < e.length; n++) {
              for (
                var r = e[n],
                  a = { group: r.group, deltas: Array(r.length) },
                  i = 0,
                  s;
                i < r.deltas.length;
                i++
              )
                (s = r.deltas[i]), (a.deltas[i] = t(s))
              o[n] = a
            }
            return o
          }
          ;(this.execute = function(e) {
            var t = e.args[0]
            ;(this.$doc = e.args[1]),
              e.merge &&
                this.hasUndo() &&
                (this.dirtyCounter--, (t = this.$undoStack.pop().concat(t))),
              this.$undoStack.push(t),
              (this.$redoStack = []),
              0 > this.dirtyCounter && (this.dirtyCounter = NaN),
              this.dirtyCounter++
          }),
            (this.undo = function(e) {
              var t = this.$undoStack.pop(),
                o = null
              return (
                t &&
                  ((o = this.$doc.undoChanges(t, e)),
                  this.$redoStack.push(t),
                  this.dirtyCounter--),
                o
              )
            }),
            (this.redo = function(e) {
              var t = this.$redoStack.pop(),
                o = null
              return (
                t &&
                  ((o = this.$doc.redoChanges(this.$deserializeDeltas(t), e)),
                  this.$undoStack.push(t),
                  this.dirtyCounter++),
                o
              )
            }),
            (this.reset = function() {
              ;(this.$undoStack = []),
                (this.$redoStack = []),
                (this.dirtyCounter = 0)
            }),
            (this.hasUndo = function() {
              return 0 < this.$undoStack.length
            }),
            (this.hasRedo = function() {
              return 0 < this.$redoStack.length
            }),
            (this.markClean = function() {
              this.dirtyCounter = 0
            }),
            (this.isClean = function() {
              return 0 === this.dirtyCounter
            }),
            (this.$serializeDeltas = function(t) {
              return o(t, e)
            }),
            (this.$deserializeDeltas = function(e) {
              return o(e, t)
            })
        }.call(o.prototype),
          (t.UndoManager = o))
      }),
      ace.define(
        'ace/layer/gutter',
        [
          'require',
          'exports',
          'module',
          'ace/lib/dom',
          'ace/lib/oop',
          'ace/lib/lang',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('../lib/dom'),
            n = e('../lib/oop'),
            a = e('../lib/lang'),
            i = e('../lib/event_emitter').EventEmitter,
            s = function(e) {
              ;(this.element = o.createElement('div')),
                (this.element.className = 'ace_layer ace_gutter-layer'),
                e.appendChild(this.element),
                this.setShowFoldWidgets(this.$showFoldWidgets),
                (this.gutterWidth = 0),
                (this.$annotations = []),
                (this.$updateAnnotations = this.$updateAnnotations.bind(this)),
                (this.$cells = [])
            }
          ;(function() {
            n.implement(this, i),
              (this.setSession = function(e) {
                this.session &&
                  this.session.removeEventListener(
                    'change',
                    this.$updateAnnotations
                  ),
                  (this.session = e),
                  e && e.on('change', this.$updateAnnotations)
              }),
              (this.addGutterDecoration = function(e, t) {
                window.console &&
                  console.warn &&
                  console.warn('deprecated use session.addGutterDecoration'),
                  this.session.addGutterDecoration(e, t)
              }),
              (this.removeGutterDecoration = function(e, t) {
                window.console &&
                  console.warn &&
                  console.warn('deprecated use session.removeGutterDecoration'),
                  this.session.removeGutterDecoration(e, t)
              }),
              (this.setAnnotations = function(e) {
                this.$annotations = []
                for (var t = 0; t < e.length; t++) {
                  var o = e[t],
                    n = o.row,
                    r = this.$annotations[n]
                  r || (r = this.$annotations[n] = { text: [] })
                  var i = o.text
                  ;(i = i ? a.escapeHTML(i) : o.html || ''),
                    -1 === r.text.indexOf(i) && r.text.push(i)
                  var s = o.type
                  'error' == s
                    ? (r.className = ' ace_error')
                    : 'warning' == s && ' ace_error' != r.className
                      ? (r.className = ' ace_warning')
                      : 'info' == s &&
                        !r.className &&
                        (r.className = ' ace_info')
                }
              }),
              (this.$updateAnnotations = function(e) {
                if (this.$annotations.length) {
                  var t = e.start.row,
                    o = e.end.row - t
                  if (0 == o);
                  else if ('remove' == e.action)
                    this.$annotations.splice(t, o + 1, null)
                  else {
                    var n = Array(o + 1)
                    n.unshift(t, 1),
                      this.$annotations.splice.apply(this.$annotations, n)
                  }
                }
              }),
              (this.update = function(e) {
                for (
                  var t = this.session,
                    n = e.firstRow,
                    a = u(e.lastRow + e.gutterOffset, t.getLength() - 1),
                    i = t.getNextFoldLine(n),
                    s = i ? i.start.row : Infinity,
                    l = this.$showFoldWidgets && t.foldWidgets,
                    d = t.$breakpoints,
                    p = t.$decorations,
                    g = t.$firstLineNumber,
                    h = 0,
                    m = t.gutterRenderer || this.$renderer,
                    f = null,
                    y = -1,
                    A = n;
                  ;

                ) {
                  if (
                    (A > s &&
                      ((A = i.end.row + 1),
                      (i = t.getNextFoldLine(A, i)),
                      (s = i ? i.start.row : Infinity)),
                    A > a)
                  ) {
                    for (; this.$cells.length > y + 1; )
                      (f = this.$cells.pop()),
                        this.element.removeChild(f.element)
                    break
                  }
                  ;(f = this.$cells[++y]),
                    f ||
                      ((f = {
                        element: null,
                        textNode: null,
                        foldWidget: null
                      }),
                      (f.element = o.createElement('div')),
                      (f.textNode = document.createTextNode('')),
                      f.element.appendChild(f.textNode),
                      this.element.appendChild(f.element),
                      (this.$cells[y] = f))
                  var C = 'ace_gutter-cell '
                  d[A] && (C += d[A]),
                    p[A] && (C += p[A]),
                    this.$annotations[A] &&
                      (C += this.$annotations[A].className),
                    f.element.className != C && (f.element.className = C)
                  var w = t.getRowLength(A) * e.lineHeight + 'px'
                  if (
                    (w != f.element.style.height &&
                      (f.element.style.height = w),
                    l)
                  ) {
                    var E = l[A]
                    null == E && (E = l[A] = t.getFoldWidget(A))
                  }
                  if (E) {
                    f.foldWidget ||
                      ((f.foldWidget = o.createElement('span')),
                      f.element.appendChild(f.foldWidget))
                    var C = 'ace_fold-widget ace_' + E
                    ;(C +=
                      'start' == E && A == s && A < i.end.row
                        ? ' ace_closed'
                        : ' ace_open'),
                      f.foldWidget.className != C &&
                        (f.foldWidget.className = C)
                    var w = e.lineHeight + 'px'
                    f.foldWidget.style.height != w &&
                      (f.foldWidget.style.height = w)
                  } else
                    f.foldWidget &&
                      (f.element.removeChild(f.foldWidget),
                      (f.foldWidget = null))
                  var c = (h = m ? m.getText(t, A) : A + g)
                  c != f.textNode.data && (f.textNode.data = c), A++
                }
                ;(this.element.style.height = e.minHeight + 'px'),
                  (this.$fixedWidth || t.$useWrapMode) &&
                    (h = t.getLength() + g)
                var b = m
                    ? m.getWidth(t, h, e)
                    : h.toString().length * e.characterWidth,
                  v = this.$padding || this.$computePadding()
                ;(b += v.left + v.right),
                  b === this.gutterWidth ||
                    isNaN(b) ||
                    ((this.gutterWidth = b),
                    (this.element.style.width = r(this.gutterWidth) + 'px'),
                    this._emit('changeGutterWidth', b))
              }),
              (this.$fixedWidth = !1),
              (this.$showLineNumbers = !0),
              (this.$renderer = ''),
              (this.setShowLineNumbers = function(e) {
                this.$renderer = !e && {
                  getWidth: function() {
                    return ''
                  },
                  getText: function() {
                    return ''
                  }
                }
              }),
              (this.getShowLineNumbers = function() {
                return this.$showLineNumbers
              }),
              (this.$showFoldWidgets = !0),
              (this.setShowFoldWidgets = function(e) {
                e
                  ? o.addCssClass(this.element, 'ace_folding-enabled')
                  : o.removeCssClass(this.element, 'ace_folding-enabled'),
                  (this.$showFoldWidgets = e),
                  (this.$padding = null)
              }),
              (this.getShowFoldWidgets = function() {
                return this.$showFoldWidgets
              }),
              (this.$computePadding = function() {
                if (!this.element.firstChild) return { left: 0, right: 0 }
                var e = o.computedStyle(this.element.firstChild)
                return (
                  (this.$padding = {}),
                  (this.$padding.left = parseInt(e.paddingLeft) + 1 || 0),
                  (this.$padding.right = parseInt(e.paddingRight) || 0),
                  this.$padding
                )
              }),
              (this.getRegion = function(e) {
                var t = this.$padding || this.$computePadding(),
                  o = this.element.getBoundingClientRect()
                return e.x < t.left + o.left
                  ? 'markers'
                  : this.$showFoldWidgets && e.x > o.right - t.right
                    ? 'foldWidgets'
                    : void 0
              })
          }.call(s.prototype),
            (t.Gutter = s))
        }
      ),
      ace.define(
        'ace/layer/marker',
        ['require', 'exports', 'module', 'ace/range', 'ace/lib/dom'],
        function(e, t) {
          'use strict'
          var o = e('../range').Range,
            n = e('../lib/dom'),
            r = function(e) {
              ;(this.element = n.createElement('div')),
                (this.element.className = 'ace_layer ace_marker-layer'),
                e.appendChild(this.element)
            }
          ;(function() {
            function e(e, t, o, n) {
              return (e ? 1 : 0) | (t ? 2 : 0) | (o ? 4 : 0) | (n ? 8 : 0)
            }
            ;(this.$padding = 0),
              (this.setPadding = function(e) {
                this.$padding = e
              }),
              (this.setSession = function(e) {
                this.session = e
              }),
              (this.setMarkers = function(e) {
                this.markers = e
              }),
              (this.update = function(e) {
                var e = e || this.config
                if (e) {
                  this.config = e
                  var t = []
                  for (var o in this.markers) {
                    var n = this.markers[o]
                    if (!n.range) {
                      n.update(t, this, this.session, e)
                      continue
                    }
                    var r = n.range.clipRows(e.firstRow, e.lastRow)
                    if (!r.isEmpty())
                      if (((r = r.toScreenRange(this.session)), n.renderer)) {
                        var a = this.$getTop(r.start.row, e),
                          i = this.$padding + r.start.column * e.characterWidth
                        n.renderer(t, r, i, a, e)
                      } else
                        'fullLine' == n.type
                          ? this.drawFullLineMarker(t, r, n.clazz, e)
                          : 'screenLine' == n.type
                            ? this.drawScreenLineMarker(t, r, n.clazz, e)
                            : r.isMultiLine()
                              ? 'text' == n.type
                                ? this.drawTextMarker(t, r, n.clazz, e)
                                : this.drawMultiLineMarker(t, r, n.clazz, e)
                              : this.drawSingleLineMarker(
                                  t,
                                  r,
                                  n.clazz + ' ace_start ace_br15',
                                  e
                                )
                  }
                  this.element.innerHTML = t.join('')
                }
              }),
              (this.$getTop = function(e, t) {
                return (e - t.firstRowScreen) * t.lineHeight
              }),
              (this.drawTextMarker = function(t, n, r, a, i) {
                for (
                  var s = this.session,
                    l = n.start.row,
                    d = n.end.row,
                    c = l,
                    u = 0,
                    p = 0,
                    g = s.getScreenLastRowColumn(c),
                    h = new o(c, n.start.column, c, p);
                  c <= d;
                  c++
                )
                  (h.start.row = h.end.row = c),
                    (h.start.column =
                      c == l ? n.start.column : s.getRowWrapIndent(c)),
                    (h.end.column = g),
                    (u = p),
                    (p = g),
                    (g =
                      c + 1 < d
                        ? s.getScreenLastRowColumn(c + 1)
                        : c == d
                          ? 0
                          : n.end.column),
                    this.drawSingleLineMarker(
                      t,
                      h,
                      r +
                        (c == l ? ' ace_start' : '') +
                        ' ace_br' +
                        e(
                          c == l || (c == l + 1 && n.start.column),
                          u < p,
                          p > g,
                          c == d
                        ),
                      a,
                      c == d ? 0 : 1,
                      i
                    )
              }),
              (this.drawMultiLineMarker = function(e, t, o, n, r) {
                var a = this.$padding,
                  i = n.lineHeight,
                  s = this.$getTop(t.start.row, n),
                  l = a + t.start.column * n.characterWidth
                ;(r = r || ''),
                  e.push(
                    "<div class='",
                    o,
                    " ace_br1 ace_start' style='",
                    'height:',
                    i,
                    'px;',
                    'right:0;',
                    'top:',
                    s,
                    'px;',
                    'left:',
                    l,
                    'px;',
                    r,
                    "'></div>"
                  ),
                  (s = this.$getTop(t.end.row, n))
                var d = t.end.column * n.characterWidth
                if (
                  (e.push(
                    "<div class='",
                    o,
                    " ace_br12' style='",
                    'height:',
                    i,
                    'px;',
                    'width:',
                    d,
                    'px;',
                    'top:',
                    s,
                    'px;',
                    'left:',
                    a,
                    'px;',
                    r,
                    "'></div>"
                  ),
                  (i = (t.end.row - t.start.row - 1) * n.lineHeight),
                  !(0 >= i))
                ) {
                  s = this.$getTop(t.start.row + 1, n)
                  var c = (t.start.column ? 1 : 0) | (t.end.column ? 0 : 8)
                  e.push(
                    "<div class='",
                    o,
                    c ? ' ace_br' + c : '',
                    "' style='",
                    'height:',
                    i,
                    'px;',
                    'right:0;',
                    'top:',
                    s,
                    'px;',
                    'left:',
                    a,
                    'px;',
                    r,
                    "'></div>"
                  )
                }
              }),
              (this.drawSingleLineMarker = function(e, t, o, n, r, a) {
                var i = n.lineHeight,
                  s =
                    (t.end.column + (r || 0) - t.start.column) *
                    n.characterWidth,
                  l = this.$getTop(t.start.row, n),
                  d = this.$padding + t.start.column * n.characterWidth
                e.push(
                  "<div class='",
                  o,
                  "' style='",
                  'height:',
                  i,
                  'px;',
                  'width:',
                  s,
                  'px;',
                  'top:',
                  l,
                  'px;',
                  'left:',
                  d,
                  'px;',
                  a || '',
                  "'></div>"
                )
              }),
              (this.drawFullLineMarker = function(e, t, o, n, r) {
                var a = this.$getTop(t.start.row, n),
                  i = n.lineHeight
                t.start.row != t.end.row &&
                  (i += this.$getTop(t.end.row, n) - a),
                  e.push(
                    "<div class='",
                    o,
                    "' style='",
                    'height:',
                    i,
                    'px;',
                    'top:',
                    a,
                    'px;',
                    'left:0;right:0;',
                    r || '',
                    "'></div>"
                  )
              }),
              (this.drawScreenLineMarker = function(e, t, o, n, r) {
                var a = this.$getTop(t.start.row, n),
                  i = n.lineHeight
                e.push(
                  "<div class='",
                  o,
                  "' style='",
                  'height:',
                  i,
                  'px;',
                  'top:',
                  a,
                  'px;',
                  'left:0;right:0;',
                  r || '',
                  "'></div>"
                )
              })
          }.call(r.prototype),
            (t.Marker = r))
        }
      ),
      ace.define(
        'ace/layer/text',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/dom',
          'ace/lib/lang',
          'ace/lib/useragent',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('../lib/oop'),
            n = e('../lib/dom'),
            r = e('../lib/lang'),
            i = e('../lib/useragent'),
            s = e('../lib/event_emitter').EventEmitter,
            l = function(e) {
              ;(this.element = n.createElement('div')),
                (this.element.className = 'ace_layer ace_text-layer'),
                e.appendChild(this.element),
                (this.$updateEolChar = this.$updateEolChar.bind(this))
            }
          ;(function() {
            o.implement(this, s),
              (this.EOF_CHAR = '\xB6'),
              (this.EOL_CHAR_LF = '\xAC'),
              (this.EOL_CHAR_CRLF = '\xA4'),
              (this.EOL_CHAR = this.EOL_CHAR_LF),
              (this.TAB_CHAR = '\u2014'),
              (this.SPACE_CHAR = '\xB7'),
              (this.$padding = 0),
              (this.$updateEolChar = function() {
                var e =
                  '\n' == this.session.doc.getNewLineCharacter()
                    ? this.EOL_CHAR_LF
                    : this.EOL_CHAR_CRLF
                if (this.EOL_CHAR != e) return (this.EOL_CHAR = e), !0
              }),
              (this.setPadding = function(e) {
                ;(this.$padding = e),
                  (this.element.style.padding = '0 ' + e + 'px')
              }),
              (this.getLineHeight = function() {
                return this.$fontMetrics.$characterSize.height || 0
              }),
              (this.getCharacterWidth = function() {
                return this.$fontMetrics.$characterSize.width || 0
              }),
              (this.$setFontMetrics = function(e) {
                ;(this.$fontMetrics = e),
                  this.$fontMetrics.on(
                    'changeCharacterSize',
                    function(t) {
                      this._signal('changeCharacterSize', t)
                    }.bind(this)
                  ),
                  this.$pollSizeChanges()
              }),
              (this.checkForSizeChanges = function() {
                this.$fontMetrics.checkForSizeChanges()
              }),
              (this.$pollSizeChanges = function() {
                return (this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges())
              }),
              (this.setSession = function(e) {
                ;(this.session = e), e && this.$computeTabString()
              }),
              (this.showInvisibles = !1),
              (this.setShowInvisibles = function(e) {
                return (
                  this.showInvisibles != e &&
                  ((this.showInvisibles = e), this.$computeTabString(), !0)
                )
              }),
              (this.displayIndentGuides = !0),
              (this.setDisplayIndentGuides = function(e) {
                return (
                  this.displayIndentGuides != e &&
                  ((this.displayIndentGuides = e), this.$computeTabString(), !0)
                )
              }),
              (this.$tabStrings = []),
              (this.onChangeTabSize = this.$computeTabString = function() {
                var e = this.session.getTabSize()
                this.tabSize = e
                for (var t = (this.$tabStrings = [0]), o = 1; o < e + 1; o++)
                  this.showInvisibles
                    ? t.push(
                        "<span class='ace_invisible ace_invisible_tab'>" +
                          r.stringRepeat(this.TAB_CHAR, o) +
                          '</span>'
                      )
                    : t.push(r.stringRepeat(' ', o))
                if (this.displayIndentGuides) {
                  this.$indentGuideRe = /\s\S| \t|\t |\s$/
                  var n = 'ace_indent-guide',
                    a = '',
                    i = ''
                  if (this.showInvisibles) {
                    ;(n += ' ace_invisible'),
                      (a = ' ace_invisible_space'),
                      (i = ' ace_invisible_tab')
                    var s = r.stringRepeat(this.SPACE_CHAR, this.tabSize),
                      l = r.stringRepeat(this.TAB_CHAR, this.tabSize)
                  } else
                    var s = r.stringRepeat(' ', this.tabSize),
                      l = s
                  ;(this.$tabStrings[' '] =
                    "<span class='" + n + a + "'>" + s + '</span>'),
                    (this.$tabStrings['\t'] =
                      "<span class='" + n + i + "'>" + l + '</span>')
                }
              }),
              (this.updateLines = function(e, t, o) {
                ;(this.config.lastRow != e.lastRow ||
                  this.config.firstRow != e.firstRow) &&
                  this.scrollLines(e),
                  (this.config = e)
                for (
                  var n = p(t, e.firstRow),
                    r = u(o, e.lastRow),
                    a = this.element.childNodes,
                    i = 0,
                    s = e.firstRow,
                    l;
                  s < n;
                  s++
                ) {
                  if (((l = this.session.getFoldLine(s)), l))
                    if (l.containsRow(n)) {
                      n = l.start.row
                      break
                    } else s = l.end.row
                  i++
                }
                for (
                  var s = n,
                    l = this.session.getNextFoldLine(s),
                    d = l ? l.start.row : Infinity,
                    c;
                  s > d &&
                    ((s = l.end.row + 1),
                    (l = this.session.getNextFoldLine(s, l)),
                    (d = l ? l.start.row : Infinity)),
                    !(s > r);

                ) {
                  if (((c = a[i++]), c)) {
                    var g = []
                    this.$renderLine(g, s, !this.$useLineGroups(), s == d && l),
                      (c.style.height =
                        e.lineHeight * this.session.getRowLength(s) + 'px'),
                      (c.innerHTML = g.join(''))
                  }
                  s++
                }
              }),
              (this.scrollLines = function(e) {
                var t = this.config
                if (((this.config = e), !t || t.lastRow < e.firstRow))
                  return this.update(e)
                if (e.lastRow < t.firstRow) return this.update(e)
                var o = this.element
                if (t.firstRow < e.firstRow)
                  for (
                    var n = this.session.getFoldedRowCount(
                      t.firstRow,
                      e.firstRow - 1
                    );
                    0 < n;
                    n--
                  )
                    o.removeChild(o.firstChild)
                if (t.lastRow > e.lastRow)
                  for (
                    var n = this.session.getFoldedRowCount(
                      e.lastRow + 1,
                      t.lastRow
                    );
                    0 < n;
                    n--
                  )
                    o.removeChild(o.lastChild)
                if (e.firstRow < t.firstRow) {
                  var r = this.$renderLinesFragment(
                    e,
                    e.firstRow,
                    t.firstRow - 1
                  )
                  o.firstChild
                    ? o.insertBefore(r, o.firstChild)
                    : o.appendChild(r)
                }
                if (e.lastRow > t.lastRow) {
                  var r = this.$renderLinesFragment(e, t.lastRow + 1, e.lastRow)
                  o.appendChild(r)
                }
              }),
              (this.$renderLinesFragment = function(e, t, o) {
                for (
                  var r = this.element.ownerDocument.createDocumentFragment(),
                    a = t,
                    i = this.session.getNextFoldLine(a),
                    s = i ? i.start.row : Infinity;
                  a > s &&
                    ((a = i.end.row + 1),
                    (i = this.session.getNextFoldLine(a, i)),
                    (s = i ? i.start.row : Infinity)),
                    !(a > o);

                ) {
                  var l = n.createElement('div'),
                    d = []
                  if (
                    (this.$renderLine(d, a, !1, a == s && i),
                    (l.innerHTML = d.join('')),
                    this.$useLineGroups())
                  )
                    (l.className = 'ace_line_group'),
                      r.appendChild(l),
                      (l.style.height =
                        e.lineHeight * this.session.getRowLength(a) + 'px')
                  else for (; l.firstChild; ) r.appendChild(l.firstChild)
                  a++
                }
                return r
              }),
              (this.update = function(e) {
                this.config = e
                for (
                  var t = [],
                    o = e.firstRow,
                    n = e.lastRow,
                    r = o,
                    a = this.session.getNextFoldLine(r),
                    i = a ? a.start.row : Infinity;
                  r > i &&
                    ((r = a.end.row + 1),
                    (a = this.session.getNextFoldLine(r, a)),
                    (i = a ? a.start.row : Infinity)),
                    !(r > n);

                )
                  this.$useLineGroups() &&
                    t.push(
                      "<div class='ace_line_group' style='height:",
                      e.lineHeight * this.session.getRowLength(r),
                      "px'>"
                    ),
                    this.$renderLine(t, r, !1, r == i && a),
                    this.$useLineGroups() && t.push('</div>'),
                    r++
                this.element.innerHTML = t.join('')
              }),
              (this.$textToken = { text: !0, rparen: !0, lparen: !0 }),
              (this.$renderToken = function(e, t, o, n) {
                var i = this,
                  a = /\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,
                  s = n.replace(a, function(e, o, n, a) {
                    if (o)
                      return i.showInvisibles
                        ? "<span class='ace_invisible ace_invisible_space'>" +
                            r.stringRepeat(i.SPACE_CHAR, e.length) +
                            '</span>'
                        : e
                    if ('&' == e) return '&#38;'
                    if ('<' == e) return '&#60;'
                    if ('>' == e) return '&#62;'
                    if ('\t' == e) {
                      var s = i.session.getScreenTabSize(t + a)
                      return (t += s - 1), i.$tabStrings[s]
                    }
                    if ('\u3000' == e) {
                      var l = i.showInvisibles
                          ? 'ace_cjk ace_invisible ace_invisible_space'
                          : 'ace_cjk',
                        d = i.showInvisibles ? i.SPACE_CHAR : ''
                      return (
                        (t += 1),
                        "<span class='" +
                          l +
                          "' style='width:" +
                          2 * i.config.characterWidth +
                          "px'>" +
                          d +
                          '</span>'
                      )
                    }
                    return n
                      ? "<span class='ace_invisible ace_invisible_space ace_invalid'>" +
                          i.SPACE_CHAR +
                          '</span>'
                      : ((t += 1),
                        "<span class='ace_cjk' style='width:" +
                          2 * i.config.characterWidth +
                          "px'>" +
                          e +
                          '</span>')
                  })
                if (!this.$textToken[o.type]) {
                  var l = 'ace_' + o.type.replace(/\./g, ' ace_'),
                    d = ''
                  'fold' == o.type &&
                    (d =
                      " style='width:" +
                      o.value.length * this.config.characterWidth +
                      "px;' "),
                    e.push("<span class='", l, "'", d, '>', s, '</span>')
                } else e.push(s)
                return t + n.length
              }),
              (this.renderIndentGuide = function(e, t, o) {
                var n = t.search(this.$indentGuideRe)
                return 0 >= n || n >= o
                  ? t
                  : ' ' == t[0]
                    ? ((n -= n % this.tabSize),
                      e.push(
                        r.stringRepeat(this.$tabStrings[' '], n / this.tabSize)
                      ),
                      t.substr(n))
                    : '\t' == t[0]
                      ? (e.push(r.stringRepeat(this.$tabStrings['\t'], n)),
                        t.substr(n))
                      : t
              }),
              (this.$renderWrappedLine = function(e, t, o, n) {
                for (
                  var s = 0, l = 0, d = o[0], c = 0, u = 0;
                  u < t.length;
                  u++
                ) {
                  var i = t[u],
                    p = i.value
                  if (0 == u && this.displayIndentGuides) {
                    if (
                      ((s = p.length),
                      (p = this.renderIndentGuide(e, p, d)),
                      !p)
                    )
                      continue
                    s -= p.length
                  }
                  if (s + p.length < d)
                    (c = this.$renderToken(e, c, i, p)), (s += p.length)
                  else {
                    for (; s + p.length >= d; )
                      (c = this.$renderToken(e, c, i, p.substring(0, d - s))),
                        (p = p.substring(d - s)),
                        (s = d),
                        n ||
                          e.push(
                            '</div>',
                            "<div class='ace_line' style='height:",
                            this.config.lineHeight,
                            "px'>"
                          ),
                        e.push(r.stringRepeat('\xA0', o.indent)),
                        l++,
                        (c = 0),
                        (d = o[l] || a)
                    0 != p.length &&
                      ((s += p.length), (c = this.$renderToken(e, c, i, p)))
                  }
                }
              }),
              (this.$renderSimpleLine = function(e, t) {
                var o = 0,
                  n = t[0],
                  r = n.value
                this.displayIndentGuides && (r = this.renderIndentGuide(e, r)),
                  r && (o = this.$renderToken(e, o, n, r))
                for (var a = 1; a < t.length; a++)
                  (n = t[a]), (r = n.value), (o = this.$renderToken(e, o, n, r))
              }),
              (this.$renderLine = function(e, t, o, n) {
                if ((n || !1 == n || (n = this.session.getFoldLine(t)), n))
                  var r = this.$getFoldLineTokens(t, n)
                else var r = this.session.getTokens(t)
                if (
                  (o ||
                    e.push(
                      "<div class='ace_line' style='height:",
                      this.config.lineHeight *
                        (this.$useLineGroups()
                          ? 1
                          : this.session.getRowLength(t)),
                      "px'>"
                    ),
                  r.length)
                ) {
                  var a = this.session.getRowSplitData(t)
                  a && a.length
                    ? this.$renderWrappedLine(e, r, a, o)
                    : this.$renderSimpleLine(e, r)
                }
                this.showInvisibles &&
                  (n && (t = n.end.row),
                  e.push(
                    "<span class='ace_invisible ace_invisible_eol'>",
                    t == this.session.getLength() - 1
                      ? this.EOF_CHAR
                      : this.EOL_CHAR,
                    '</span>'
                  )),
                  o || e.push('</div>')
              }),
              (this.$getFoldLineTokens = function(e, t) {
                function o(e, t, o) {
                  for (var n = 0, a = 0; a + e[n].value.length < t; )
                    if (((a += e[n].value.length), n++, n == e.length)) return
                  if (a != t) {
                    var i = e[n].value.substring(t - a)
                    i.length > o - t && (i = i.substring(0, o - t)),
                      r.push({ type: e[n].type, value: i }),
                      (a = t + i.length),
                      (n += 1)
                  }
                  for (; a < o && n < e.length; ) {
                    var i = e[n].value
                    i.length + a > o
                      ? r.push({
                          type: e[n].type,
                          value: i.substring(0, o - a)
                        })
                      : r.push(e[n]),
                      (a += i.length),
                      (n += 1)
                  }
                }
                var n = this.session,
                  r = [],
                  a = n.getTokens(e)
                return (
                  t.walk(
                    function(e, t, i, s, l) {
                      null == e
                        ? (l && (a = n.getTokens(t)), a.length && o(a, s, i))
                        : r.push({ type: 'fold', value: e })
                    },
                    t.end.row,
                    this.session.getLine(t.end.row).length
                  ),
                  r
                )
              }),
              (this.$useLineGroups = function() {
                return this.session.getUseWrapMode()
              }),
              (this.destroy = function() {
                clearInterval(this.$pollSizeChangesTimer),
                  this.$measureNode &&
                    this.$measureNode.parentNode.removeChild(this.$measureNode),
                  delete this.$measureNode
              })
          }.call(l.prototype),
            (t.Text = l))
        }
      ),
      ace.define(
        'ace/layer/cursor',
        ['require', 'exports', 'module', 'ace/lib/dom'],
        function(e, t) {
          'use strict'
          var o = e('../lib/dom'),
            n = function(e) {
              ;(this.element = o.createElement('div')),
                (this.element.className = 'ace_layer ace_cursor-layer'),
                e.appendChild(this.element),
                r == void 0 && (r = !('opacity' in this.element.style)),
                (this.isVisible = !1),
                (this.isBlinking = !0),
                (this.blinkInterval = 1e3),
                (this.smoothBlinking = !1),
                (this.cursors = []),
                (this.cursor = this.addCursor()),
                o.addCssClass(this.element, 'ace_hidden-cursors'),
                (this.$updateCursors = (r
                  ? this.$updateVisibility
                  : this.$updateOpacity
                ).bind(this))
            },
            r
          ;(function() {
            ;(this.$updateVisibility = function(e) {
              for (var t = this.cursors, o = t.length; o--; )
                t[o].style.visibility = e ? '' : 'hidden'
            }),
              (this.$updateOpacity = function(e) {
                for (var t = this.cursors, o = t.length; o--; )
                  t[o].style.opacity = e ? '' : '0'
              }),
              (this.$padding = 0),
              (this.setPadding = function(e) {
                this.$padding = e
              }),
              (this.setSession = function(e) {
                this.session = e
              }),
              (this.setBlinking = function(e) {
                e != this.isBlinking &&
                  ((this.isBlinking = e), this.restartTimer())
              }),
              (this.setBlinkInterval = function(e) {
                e != this.blinkInterval &&
                  ((this.blinkInterval = e), this.restartTimer())
              }),
              (this.setSmoothBlinking = function(e) {
                e == this.smoothBlinking ||
                  r ||
                  ((this.smoothBlinking = e),
                  o.setCssClass(this.element, 'ace_smooth-blinking', e),
                  this.$updateCursors(!0),
                  (this.$updateCursors = this.$updateOpacity.bind(this)),
                  this.restartTimer())
              }),
              (this.addCursor = function() {
                var e = o.createElement('div')
                return (
                  (e.className = 'ace_cursor'),
                  this.element.appendChild(e),
                  this.cursors.push(e),
                  e
                )
              }),
              (this.removeCursor = function() {
                if (1 < this.cursors.length) {
                  var e = this.cursors.pop()
                  return e.parentNode.removeChild(e), e
                }
              }),
              (this.hideCursor = function() {
                ;(this.isVisible = !1),
                  o.addCssClass(this.element, 'ace_hidden-cursors'),
                  this.restartTimer()
              }),
              (this.showCursor = function() {
                ;(this.isVisible = !0),
                  o.removeCssClass(this.element, 'ace_hidden-cursors'),
                  this.restartTimer()
              }),
              (this.restartTimer = function() {
                var e = this.$updateCursors
                if (
                  (clearInterval(this.intervalId),
                  clearTimeout(this.timeoutId),
                  this.smoothBlinking &&
                    o.removeCssClass(this.element, 'ace_smooth-blinking'),
                  e(!0),
                  this.isBlinking && this.blinkInterval && this.isVisible)
                ) {
                  this.smoothBlinking &&
                    setTimeout(
                      function() {
                        o.addCssClass(this.element, 'ace_smooth-blinking')
                      }.bind(this)
                    )
                  var t = function() {
                    this.timeoutId = setTimeout(function() {
                      e(!1)
                    }, 0.6 * this.blinkInterval)
                  }.bind(this)
                  ;(this.intervalId = setInterval(function() {
                    e(!0), t()
                  }, this.blinkInterval)),
                    t()
                }
              }),
              (this.getPixelPosition = function(e, t) {
                if (!this.config || !this.session) return { left: 0, top: 0 }
                e || (e = this.session.selection.getCursor())
                var o = this.session.documentToScreenPosition(e),
                  n = this.$padding + o.column * this.config.characterWidth,
                  r =
                    (o.row - (t ? this.config.firstRowScreen : 0)) *
                    this.config.lineHeight
                return { left: n, top: r }
              }),
              (this.update = function(e) {
                this.config = e
                var t = this.session.$selectionMarkers,
                  o = 0,
                  r = 0
                ;(t === void 0 || 0 === t.length) && (t = [{ cursor: null }])
                for (var o = 0, a = t.length, n; o < a; o++)
                  if (
                    ((n = this.getPixelPosition(t[o].cursor, !0)),
                    !((n.top > e.height + e.offset || 0 > n.top) && 1 < o))
                  ) {
                    var i = (this.cursors[r++] || this.addCursor()).style
                    this.drawCursor
                      ? this.drawCursor(i, n, e, t[o], this.session)
                      : ((i.left = n.left + 'px'),
                        (i.top = n.top + 'px'),
                        (i.width = e.characterWidth + 'px'),
                        (i.height = e.lineHeight + 'px'))
                  }
                for (; this.cursors.length > r; ) this.removeCursor()
                var s = this.session.getOverwrite()
                this.$setOverwrite(s), (this.$pixelPos = n), this.restartTimer()
              }),
              (this.drawCursor = null),
              (this.$setOverwrite = function(e) {
                e != this.overwrite &&
                  ((this.overwrite = e),
                  e
                    ? o.addCssClass(this.element, 'ace_overwrite-cursors')
                    : o.removeCssClass(this.element, 'ace_overwrite-cursors'))
              }),
              (this.destroy = function() {
                clearInterval(this.intervalId), clearTimeout(this.timeoutId)
              })
          }.call(n.prototype),
            (t.Cursor = n))
        }
      ),
      ace.define(
        'ace/scrollbar',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/dom',
          'ace/lib/event',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            n = e('./lib/dom'),
            r = e('./lib/event'),
            a = e('./lib/event_emitter').EventEmitter,
            i = 32768,
            s = function(e) {
              ;(this.element = n.createElement('div')),
                (this.element.className =
                  'ace_scrollbar ace_scrollbar' + this.classSuffix),
                (this.inner = n.createElement('div')),
                (this.inner.className = 'ace_scrollbar-inner'),
                this.element.appendChild(this.inner),
                e.appendChild(this.element),
                this.setVisible(!1),
                (this.skipEvent = !1),
                r.addListener(this.element, 'scroll', this.onScroll.bind(this)),
                r.addListener(this.element, 'mousedown', r.preventDefault)
            }
          ;(function() {
            o.implement(this, a),
              (this.setVisible = function(e) {
                ;(this.element.style.display = e ? '' : 'none'),
                  (this.isVisible = e),
                  (this.coeff = 1)
              })
          }.call(s.prototype))
          var l = function(e, t) {
            s.call(this, e),
              (this.scrollTop = 0),
              (this.scrollHeight = 0),
              (t.$scrollbarWidth = this.width = n.scrollbarWidth(
                e.ownerDocument
              )),
              (this.inner.style.width = this.element.style.width =
                (this.width || 15) + 5 + 'px')
          }
          o.inherits(l, s),
            function() {
              ;(this.classSuffix = '-v'),
                (this.onScroll = function() {
                  if (!this.skipEvent) {
                    if (
                      ((this.scrollTop = this.element.scrollTop),
                      1 != this.coeff)
                    ) {
                      var e = this.element.clientHeight / this.scrollHeight
                      this.scrollTop =
                        (this.scrollTop * (1 - e)) / (this.coeff - e)
                    }
                    this._emit('scroll', { data: this.scrollTop })
                  }
                  this.skipEvent = !1
                }),
                (this.getWidth = function() {
                  return this.isVisible ? this.width : 0
                }),
                (this.setHeight = function(e) {
                  this.element.style.height = e + 'px'
                }),
                (this.setInnerHeight = this.setScrollHeight = function(e) {
                  ;(this.scrollHeight = e),
                    e > i
                      ? ((this.coeff = i / e), (e = i))
                      : 1 != this.coeff && (this.coeff = 1),
                    (this.inner.style.height = e + 'px')
                }),
                (this.setScrollTop = function(e) {
                  this.scrollTop != e &&
                    ((this.skipEvent = !0),
                    (this.scrollTop = e),
                    (this.element.scrollTop = e * this.coeff))
                })
            }.call(l.prototype)
          var d = function(e, t) {
            s.call(this, e),
              (this.scrollLeft = 0),
              (this.height = t.$scrollbarWidth),
              (this.inner.style.height = this.element.style.height =
                (this.height || 15) + 5 + 'px')
          }
          o.inherits(d, s),
            function() {
              ;(this.classSuffix = '-h'),
                (this.onScroll = function() {
                  this.skipEvent ||
                    ((this.scrollLeft = this.element.scrollLeft),
                    this._emit('scroll', { data: this.scrollLeft })),
                    (this.skipEvent = !1)
                }),
                (this.getHeight = function() {
                  return this.isVisible ? this.height : 0
                }),
                (this.setWidth = function(e) {
                  this.element.style.width = e + 'px'
                }),
                (this.setInnerWidth = function(e) {
                  this.inner.style.width = e + 'px'
                }),
                (this.setScrollWidth = function(e) {
                  this.inner.style.width = e + 'px'
                }),
                (this.setScrollLeft = function(e) {
                  this.scrollLeft != e &&
                    ((this.skipEvent = !0),
                    (this.scrollLeft = this.element.scrollLeft = e))
                })
            }.call(d.prototype),
            (t.ScrollBar = l),
            (t.ScrollBarV = l),
            (t.ScrollBarH = d),
            (t.VScrollBar = l),
            (t.HScrollBar = d)
        }
      ),
      ace.define(
        'ace/renderloop',
        ['require', 'exports', 'module', 'ace/lib/event'],
        function(e, t) {
          'use strict'
          var o = e('./lib/event'),
            n = function(e, t) {
              ;(this.onRender = e),
                (this.pending = !1),
                (this.changes = 0),
                (this.window = t || window)
            }
          ;(function() {
            this.schedule = function(e) {
              if (((this.changes |= e), !this.pending && this.changes)) {
                this.pending = !0
                var t = this
                o.nextFrame(function() {
                  t.pending = !1
                  for (var e; (e = t.changes); ) (t.changes = 0), t.onRender(e)
                }, this.window)
              }
            }
          }.call(n.prototype),
            (t.RenderLoop = n))
        }
      ),
      ace.define(
        'ace/layer/font_metrics',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/dom',
          'ace/lib/lang',
          'ace/lib/useragent',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          var o = e('../lib/oop'),
            n = e('../lib/dom'),
            r = e('../lib/lang'),
            a = e('../lib/useragent'),
            i = e('../lib/event_emitter').EventEmitter,
            s = 0,
            l = (t.FontMetrics = function(e) {
              ;(this.el = n.createElement('div')),
                this.$setMeasureNodeStyles(this.el.style, !0),
                (this.$main = n.createElement('div')),
                this.$setMeasureNodeStyles(this.$main.style),
                (this.$measureNode = n.createElement('div')),
                this.$setMeasureNodeStyles(this.$measureNode.style),
                this.el.appendChild(this.$main),
                this.el.appendChild(this.$measureNode),
                e.appendChild(this.el),
                s || this.$testFractionalRect(),
                (this.$measureNode.innerHTML = r.stringRepeat('X', s)),
                (this.$characterSize = { width: 0, height: 0 }),
                this.checkForSizeChanges()
            })
          ;(function() {
            o.implement(this, i),
              (this.$characterSize = { width: 0, height: 0 }),
              (this.$testFractionalRect = function() {
                var e = n.createElement('div')
                this.$setMeasureNodeStyles(e.style),
                  (e.style.width = '0.2px'),
                  document.documentElement.appendChild(e)
                var t = e.getBoundingClientRect().width
                ;(s = 0 < t && 1 > t ? 50 : 100), e.parentNode.removeChild(e)
              }),
              (this.$setMeasureNodeStyles = function(e, t) {
                ;(e.width = e.height = 'auto'),
                  (e.left = e.top = '0px'),
                  (e.visibility = 'hidden'),
                  (e.position = 'absolute'),
                  (e.whiteSpace = 'pre'),
                  8 > a.isIE
                    ? (e['font-family'] = 'inherit')
                    : (e.font = 'inherit'),
                  (e.overflow = t ? 'hidden' : 'visible')
              }),
              (this.checkForSizeChanges = function() {
                var e = this.$measureSizes()
                if (
                  e &&
                  (this.$characterSize.width !== e.width ||
                    this.$characterSize.height !== e.height)
                ) {
                  this.$measureNode.style.fontWeight = 'bold'
                  var t = this.$measureSizes()
                  ;(this.$measureNode.style.fontWeight = ''),
                    (this.$characterSize = e),
                    (this.charSizes = Object.create(null)),
                    (this.allowBoldFonts =
                      t && t.width === e.width && t.height === e.height),
                    this._emit('changeCharacterSize', { data: e })
                }
              }),
              (this.$pollSizeChanges = function() {
                if (this.$pollSizeChangesTimer)
                  return this.$pollSizeChangesTimer
                var e = this
                return (this.$pollSizeChangesTimer = setInterval(function() {
                  e.checkForSizeChanges()
                }, 500))
              }),
              (this.setPolling = function(e) {
                e
                  ? this.$pollSizeChanges()
                  : this.$pollSizeChangesTimer &&
                    (clearInterval(this.$pollSizeChangesTimer),
                    (this.$pollSizeChangesTimer = 0))
              }),
              (this.$measureSizes = function() {
                if (50 == s) {
                  var e = null
                  try {
                    e = this.$measureNode.getBoundingClientRect()
                  } catch (t) {
                    e = { width: 0, height: 0 }
                  }
                  var t = { height: e.height, width: e.width / s }
                } else
                  var t = {
                    height: this.$measureNode.clientHeight,
                    width: this.$measureNode.clientWidth / s
                  }
                return 0 === t.width || 0 === t.height ? null : t
              }),
              (this.$measureCharWidth = function(e) {
                this.$main.innerHTML = r.stringRepeat(e, s)
                var t = this.$main.getBoundingClientRect()
                return t.width / s
              }),
              (this.getCharacterWidth = function(e) {
                var t = this.charSizes[e]
                return (
                  void 0 === t &&
                    (t = this.charSizes[e] =
                      this.$measureCharWidth(e) / this.$characterSize.width),
                  t
                )
              }),
              (this.destroy = function() {
                clearInterval(this.$pollSizeChangesTimer),
                  this.el &&
                    this.el.parentNode &&
                    this.el.parentNode.removeChild(this.el)
              })
          }.call(l.prototype))
        }
      ),
      ace.define(
        'ace/virtual_renderer',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/dom',
          'ace/config',
          'ace/lib/useragent',
          'ace/layer/gutter',
          'ace/layer/marker',
          'ace/layer/text',
          'ace/layer/cursor',
          'ace/scrollbar',
          'ace/scrollbar',
          'ace/renderloop',
          'ace/layer/font_metrics',
          'ace/lib/event_emitter'
        ],
        function(e, t) {
          'use strict'
          var o = e('./lib/oop'),
            a = e('./lib/dom'),
            i = e('./config'),
            d = e('./lib/useragent'),
            c = e('./layer/gutter').Gutter,
            g = e('./layer/marker').Marker,
            h = e('./layer/text').Text,
            m = e('./layer/cursor').Cursor,
            f = e('./scrollbar').HScrollBar,
            y = e('./scrollbar').VScrollBar,
            A = e('./renderloop').RenderLoop,
            C = e('./layer/font_metrics').FontMetrics,
            w = e('./lib/event_emitter').EventEmitter
          a.importCssString(
            '.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius    : 3px;}.ace_br2 {border-top-right-radius   : 3px;}.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}',
            'ace_editor.css'
          )
          var E = function(e, t) {
            var o = this
            ;(this.container = e || a.createElement('div')),
              (this.$keepTextAreaAtCursor = !d.isOldIE),
              a.addCssClass(this.container, 'ace_editor'),
              this.setTheme(t),
              (this.$gutter = a.createElement('div')),
              (this.$gutter.className = 'ace_gutter'),
              this.container.appendChild(this.$gutter),
              (this.scroller = a.createElement('div')),
              (this.scroller.className = 'ace_scroller'),
              this.container.appendChild(this.scroller),
              (this.content = a.createElement('div')),
              (this.content.className = 'ace_content'),
              this.scroller.appendChild(this.content),
              (this.$gutterLayer = new c(this.$gutter)),
              this.$gutterLayer.on(
                'changeGutterWidth',
                this.onGutterResize.bind(this)
              ),
              (this.$markerBack = new g(this.content))
            var n = (this.$textLayer = new h(this.content))
            ;(this.canvas = n.element),
              (this.$markerFront = new g(this.content)),
              (this.$cursorLayer = new m(this.content)),
              (this.$horizScroll = !1),
              (this.$vScroll = !1),
              (this.scrollBar = this.scrollBarV = new y(this.container, this)),
              (this.scrollBarH = new f(this.container, this)),
              this.scrollBarV.addEventListener('scroll', function(t) {
                o.$scrollAnimation ||
                  o.session.setScrollTop(t.data - o.scrollMargin.top)
              }),
              this.scrollBarH.addEventListener('scroll', function(t) {
                o.$scrollAnimation ||
                  o.session.setScrollLeft(t.data - o.scrollMargin.left)
              }),
              (this.scrollTop = 0),
              (this.scrollLeft = 0),
              (this.cursorPos = { row: 0, column: 0 }),
              (this.$fontMetrics = new C(this.container)),
              this.$textLayer.$setFontMetrics(this.$fontMetrics),
              this.$textLayer.addEventListener('changeCharacterSize', function(
                t
              ) {
                o.updateCharacterSize(),
                  o.onResize(!0, o.gutterWidth, o.$size.width, o.$size.height),
                  o._signal('changeCharacterSize', t)
              }),
              (this.$size = {
                width: 0,
                height: 0,
                scrollerHeight: 0,
                scrollerWidth: 0,
                $dirty: !0
              }),
              (this.layerConfig = {
                width: 1,
                padding: 0,
                firstRow: 0,
                firstRowScreen: 0,
                lastRow: 0,
                lineHeight: 0,
                characterWidth: 0,
                minHeight: 1,
                maxHeight: 1,
                offset: 0,
                height: 1,
                gutterOffset: 1
              }),
              (this.scrollMargin = {
                left: 0,
                right: 0,
                top: 0,
                bottom: 0,
                v: 0,
                h: 0
              }),
              (this.$loop = new A(
                this.$renderChanges.bind(this),
                this.container.ownerDocument.defaultView
              )),
              this.$loop.schedule(this.CHANGE_FULL),
              this.updateCharacterSize(),
              this.setPadding(4),
              i.resetOptions(this),
              i._emit('renderer', this)
          }
          ;(function() {
            ;(this.CHANGE_CURSOR = 1),
              (this.CHANGE_MARKER = 2),
              (this.CHANGE_GUTTER = 4),
              (this.CHANGE_SCROLL = 8),
              (this.CHANGE_LINES = 16),
              (this.CHANGE_TEXT = 32),
              (this.CHANGE_SIZE = 64),
              (this.CHANGE_MARKER_BACK = 128),
              (this.CHANGE_MARKER_FRONT = 256),
              (this.CHANGE_FULL = 512),
              (this.CHANGE_H_SCROLL = 1024),
              o.implement(this, w),
              (this.updateCharacterSize = function() {
                this.$textLayer.allowBoldFonts != this.$allowBoldFonts &&
                  ((this.$allowBoldFonts = this.$textLayer.allowBoldFonts),
                  this.setStyle('ace_nobold', !this.$allowBoldFonts)),
                  (this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth()),
                  (this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight()),
                  this.$updatePrintMargin()
              }),
              (this.setSession = function(e) {
                this.session &&
                  this.session.doc.off(
                    'changeNewLineMode',
                    this.onChangeNewLineMode
                  ),
                  (this.session = e),
                  e &&
                    this.scrollMargin.top &&
                    0 >= e.getScrollTop() &&
                    e.setScrollTop(-this.scrollMargin.top),
                  this.$cursorLayer.setSession(e),
                  this.$markerBack.setSession(e),
                  this.$markerFront.setSession(e),
                  this.$gutterLayer.setSession(e),
                  this.$textLayer.setSession(e)
                e &&
                  (this.$loop.schedule(this.CHANGE_FULL),
                  this.session.$setFontMetrics(this.$fontMetrics),
                  (this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null),
                  (this.onChangeNewLineMode = this.onChangeNewLineMode.bind(
                    this
                  )),
                  this.onChangeNewLineMode(),
                  this.session.doc.on(
                    'changeNewLineMode',
                    this.onChangeNewLineMode
                  ))
              }),
              (this.updateLines = function(e, t, o) {
                if (
                  (void 0 === t && (t = Infinity),
                  this.$changedLines
                    ? (this.$changedLines.firstRow > e &&
                        (this.$changedLines.firstRow = e),
                      this.$changedLines.lastRow < t &&
                        (this.$changedLines.lastRow = t))
                    : (this.$changedLines = { firstRow: e, lastRow: t }),
                  this.$changedLines.lastRow < this.layerConfig.firstRow)
                )
                  if (o) this.$changedLines.lastRow = this.layerConfig.lastRow
                  else return
                this.$changedLines.firstRow > this.layerConfig.lastRow ||
                  this.$loop.schedule(this.CHANGE_LINES)
              }),
              (this.onChangeNewLineMode = function() {
                this.$loop.schedule(this.CHANGE_TEXT),
                  this.$textLayer.$updateEolChar()
              }),
              (this.onChangeTabSize = function() {
                this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER),
                  this.$textLayer.onChangeTabSize()
              }),
              (this.updateText = function() {
                this.$loop.schedule(this.CHANGE_TEXT)
              }),
              (this.updateFull = function(e) {
                e
                  ? this.$renderChanges(this.CHANGE_FULL, !0)
                  : this.$loop.schedule(this.CHANGE_FULL)
              }),
              (this.updateFontSize = function() {
                this.$textLayer.checkForSizeChanges()
              }),
              (this.$changes = 0),
              (this.$updateSizeAsync = function() {
                this.$loop.pending ? (this.$size.$dirty = !0) : this.onResize()
              }),
              (this.onResize = function(e, t, o, n) {
                if (!(2 < this.resizing)) {
                  0 < this.resizing
                    ? this.resizing++
                    : (this.resizing = e ? 1 : 0)
                  var r = this.container
                  n || (n = r.clientHeight || r.scrollHeight),
                    o || (o = r.clientWidth || r.scrollWidth)
                  var a = this.$updateCachedSize(e, t, o, n)
                  return this.$size.scrollerHeight && (o || n)
                    ? void (e && (this.$gutterLayer.$padding = null),
                      e
                        ? this.$renderChanges(a | this.$changes, !0)
                        : this.$loop.schedule(a | this.$changes),
                      this.resizing && (this.resizing = 0),
                      (this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null))
                    : (this.resizing = 0)
                }
              }),
              (this.$updateCachedSize = function(e, t, o, n) {
                n -= this.$extraHeight || 0
                var r = 0,
                  a = this.$size,
                  i = {
                    width: a.width,
                    height: a.height,
                    scrollerHeight: a.scrollerHeight,
                    scrollerWidth: a.scrollerWidth
                  }
                return (
                  n &&
                    (e || a.height != n) &&
                    ((a.height = n),
                    (r |= this.CHANGE_SIZE),
                    (a.scrollerHeight = a.height),
                    this.$horizScroll &&
                      (a.scrollerHeight -= this.scrollBarH.getHeight()),
                    (this.scrollBarV.element.style.bottom =
                      this.scrollBarH.getHeight() + 'px'),
                    (r |= this.CHANGE_SCROLL)),
                  o &&
                    (e || a.width != o) &&
                    ((r |= this.CHANGE_SIZE),
                    (a.width = o),
                    null == t &&
                      (t = this.$showGutter ? this.$gutter.offsetWidth : 0),
                    (this.gutterWidth = t),
                    (this.scrollBarH.element.style.left = this.scroller.style.left =
                      t + 'px'),
                    (a.scrollerWidth = p(
                      0,
                      o - t - this.scrollBarV.getWidth()
                    )),
                    (this.scrollBarH.element.style.right = this.scroller.style.right =
                      this.scrollBarV.getWidth() + 'px'),
                    (this.scroller.style.bottom =
                      this.scrollBarH.getHeight() + 'px'),
                    ((this.session &&
                      this.session.getUseWrapMode() &&
                      this.adjustWrapLimit()) ||
                      e) &&
                      (r |= this.CHANGE_FULL)),
                  (a.$dirty = !o || !n),
                  r && this._signal('resize', i),
                  r
                )
              }),
              (this.onGutterResize = function() {
                var e = this.$showGutter ? this.$gutter.offsetWidth : 0
                e != this.gutterWidth &&
                  (this.$changes |= this.$updateCachedSize(
                    !0,
                    e,
                    this.$size.width,
                    this.$size.height
                  )),
                  this.session.getUseWrapMode() && this.adjustWrapLimit()
                    ? this.$loop.schedule(this.CHANGE_FULL)
                    : this.$size.$dirty
                      ? this.$loop.schedule(this.CHANGE_FULL)
                      : (this.$computeLayerConfig(),
                        this.$loop.schedule(this.CHANGE_MARKER))
              }),
              (this.adjustWrapLimit = function() {
                var e = this.$size.scrollerWidth - 2 * this.$padding,
                  t = l(e / this.characterWidth)
                return this.session.adjustWrapLimit(
                  t,
                  this.$showPrintMargin && this.$printMarginColumn
                )
              }),
              (this.setAnimatedScroll = function(e) {
                this.setOption('animatedScroll', e)
              }),
              (this.getAnimatedScroll = function() {
                return this.$animatedScroll
              }),
              (this.setShowInvisibles = function(e) {
                this.setOption('showInvisibles', e)
              }),
              (this.getShowInvisibles = function() {
                return this.getOption('showInvisibles')
              }),
              (this.getDisplayIndentGuides = function() {
                return this.getOption('displayIndentGuides')
              }),
              (this.setDisplayIndentGuides = function(e) {
                this.setOption('displayIndentGuides', e)
              }),
              (this.setShowPrintMargin = function(e) {
                this.setOption('showPrintMargin', e)
              }),
              (this.getShowPrintMargin = function() {
                return this.getOption('showPrintMargin')
              }),
              (this.setPrintMarginColumn = function(e) {
                this.setOption('printMarginColumn', e)
              }),
              (this.getPrintMarginColumn = function() {
                return this.getOption('printMarginColumn')
              }),
              (this.getShowGutter = function() {
                return this.getOption('showGutter')
              }),
              (this.setShowGutter = function(e) {
                return this.setOption('showGutter', e)
              }),
              (this.getFadeFoldWidgets = function() {
                return this.getOption('fadeFoldWidgets')
              }),
              (this.setFadeFoldWidgets = function(e) {
                this.setOption('fadeFoldWidgets', e)
              }),
              (this.setHighlightGutterLine = function(e) {
                this.setOption('highlightGutterLine', e)
              }),
              (this.getHighlightGutterLine = function() {
                return this.getOption('highlightGutterLine')
              }),
              (this.$updateGutterLineHighlight = function() {
                var e = this.$cursorLayer.$pixelPos,
                  t = this.layerConfig.lineHeight
                if (this.session.getUseWrapMode()) {
                  var o = this.session.selection.getCursor()
                  ;(o.column = 0),
                    (e = this.$cursorLayer.getPixelPosition(o, !0)),
                    (t *= this.session.getRowLength(o.row))
                }
                ;(this.$gutterLineHighlight.style.top =
                  e.top - this.layerConfig.offset + 'px'),
                  (this.$gutterLineHighlight.style.height = t + 'px')
              }),
              (this.$updatePrintMargin = function() {
                if (this.$showPrintMargin || this.$printMarginEl) {
                  if (!this.$printMarginEl) {
                    var e = a.createElement('div')
                    ;(e.className = 'ace_layer ace_print-margin-layer'),
                      (this.$printMarginEl = a.createElement('div')),
                      (this.$printMarginEl.className = 'ace_print-margin'),
                      e.appendChild(this.$printMarginEl),
                      this.content.insertBefore(e, this.content.firstChild)
                  }
                  var t = this.$printMarginEl.style
                  ;(t.left =
                    this.characterWidth * this.$printMarginColumn +
                    this.$padding +
                    'px'),
                    (t.visibility = this.$showPrintMargin
                      ? 'visible'
                      : 'hidden'),
                    this.session &&
                      -1 == this.session.$wrap &&
                      this.adjustWrapLimit()
                }
              }),
              (this.getContainerElement = function() {
                return this.container
              }),
              (this.getMouseEventTarget = function() {
                return this.scroller
              }),
              (this.getTextAreaContainer = function() {
                return this.container
              }),
              (this.$moveTextAreaToCursor = function() {
                if (this.$keepTextAreaAtCursor) {
                  var e = this.layerConfig,
                    t = this.$cursorLayer.$pixelPos.top,
                    o = this.$cursorLayer.$pixelPos.left
                  t -= e.offset
                  var n = this.textarea.style,
                    r = this.lineHeight
                  if (0 > t || t > e.height - r)
                    return void (n.top = n.left = '0')
                  var a = this.characterWidth
                  if (this.$composition) {
                    var i = this.textarea.value.replace(/^\x01+/, '')
                    ;(a *= this.session.$getStringScreenWidth(i)[0] + 2),
                      (r += 2)
                  }
                  ;(o -= this.scrollLeft),
                    o > this.$size.scrollerWidth - a &&
                      (o = this.$size.scrollerWidth - a),
                    (o += this.gutterWidth),
                    (n.height = r + 'px'),
                    (n.width = a + 'px'),
                    (n.left = u(o, this.$size.scrollerWidth - a) + 'px'),
                    (n.top = u(t, this.$size.height - r) + 'px')
                }
              }),
              (this.getFirstVisibleRow = function() {
                return this.layerConfig.firstRow
              }),
              (this.getFirstFullyVisibleRow = function() {
                return (
                  this.layerConfig.firstRow +
                  (0 === this.layerConfig.offset ? 0 : 1)
                )
              }),
              (this.getLastFullyVisibleRow = function() {
                var e = this.layerConfig,
                  t = e.lastRow,
                  o = this.session.documentToScreenRow(t, 0) * e.lineHeight
                return o - this.session.getScrollTop() > e.height - e.lineHeight
                  ? t - 1
                  : t
              }),
              (this.getLastVisibleRow = function() {
                return this.layerConfig.lastRow
              }),
              (this.$padding = null),
              (this.setPadding = function(e) {
                ;(this.$padding = e),
                  this.$textLayer.setPadding(e),
                  this.$cursorLayer.setPadding(e),
                  this.$markerFront.setPadding(e),
                  this.$markerBack.setPadding(e),
                  this.$loop.schedule(this.CHANGE_FULL),
                  this.$updatePrintMargin()
              }),
              (this.setScrollMargin = function(e, t, o, n) {
                var r = this.scrollMargin
                ;(r.top = 0 | e),
                  (r.bottom = 0 | t),
                  (r.right = 0 | n),
                  (r.left = 0 | o),
                  (r.v = r.top + r.bottom),
                  (r.h = r.left + r.right),
                  r.top &&
                    0 >= this.scrollTop &&
                    this.session &&
                    this.session.setScrollTop(-r.top),
                  this.updateFull()
              }),
              (this.getHScrollBarAlwaysVisible = function() {
                return this.$hScrollBarAlwaysVisible
              }),
              (this.setHScrollBarAlwaysVisible = function(e) {
                this.setOption('hScrollBarAlwaysVisible', e)
              }),
              (this.getVScrollBarAlwaysVisible = function() {
                return this.$vScrollBarAlwaysVisible
              }),
              (this.setVScrollBarAlwaysVisible = function(e) {
                this.setOption('vScrollBarAlwaysVisible', e)
              }),
              (this.$updateScrollBarV = function() {
                var e = this.layerConfig.maxHeight,
                  t = this.$size.scrollerHeight
                !this.$maxLines &&
                  this.$scrollPastEnd &&
                  ((e -= (t - this.lineHeight) * this.$scrollPastEnd),
                  this.scrollTop > e - t &&
                    ((e = this.scrollTop + t),
                    (this.scrollBarV.scrollTop = null))),
                  this.scrollBarV.setScrollHeight(e + this.scrollMargin.v),
                  this.scrollBarV.setScrollTop(
                    this.scrollTop + this.scrollMargin.top
                  )
              }),
              (this.$updateScrollBarH = function() {
                this.scrollBarH.setScrollWidth(
                  this.layerConfig.width +
                    2 * this.$padding +
                    this.scrollMargin.h
                ),
                  this.scrollBarH.setScrollLeft(
                    this.scrollLeft + this.scrollMargin.left
                  )
              }),
              (this.$frozen = !1),
              (this.freeze = function() {
                this.$frozen = !0
              }),
              (this.unfreeze = function() {
                this.$frozen = !1
              }),
              (this.$renderChanges = function(e, t) {
                if (
                  (this.$changes && ((e |= this.$changes), (this.$changes = 0)),
                  !this.session ||
                    !this.container.offsetWidth ||
                    this.$frozen ||
                    (!e && !t))
                )
                  return void (this.$changes |= e)
                if (this.$size.$dirty)
                  return (this.$changes |= e), this.onResize(!0)
                this.lineHeight || this.$textLayer.checkForSizeChanges(),
                  this._signal('beforeRender')
                var o = this.layerConfig
                if (
                  e & this.CHANGE_FULL ||
                  e & this.CHANGE_SIZE ||
                  e & this.CHANGE_TEXT ||
                  e & this.CHANGE_LINES ||
                  e & this.CHANGE_SCROLL ||
                  e & this.CHANGE_H_SCROLL
                ) {
                  if (
                    ((e |= this.$computeLayerConfig()),
                    o.firstRow != this.layerConfig.firstRow &&
                      o.firstRowScreen == this.layerConfig.firstRowScreen)
                  ) {
                    var n =
                      this.scrollTop +
                      (o.firstRow - this.layerConfig.firstRow) * this.lineHeight
                    0 < n &&
                      ((this.scrollTop = n),
                      (e |= this.CHANGE_SCROLL),
                      (e |= this.$computeLayerConfig()))
                  }
                  ;(o = this.layerConfig),
                    this.$updateScrollBarV(),
                    e & this.CHANGE_H_SCROLL && this.$updateScrollBarH(),
                    (this.$gutterLayer.element.style.marginTop =
                      -o.offset + 'px'),
                    (this.content.style.marginTop = -o.offset + 'px'),
                    (this.content.style.width =
                      o.width + 2 * this.$padding + 'px'),
                    (this.content.style.height = o.minHeight + 'px')
                }
                return (
                  e & this.CHANGE_H_SCROLL &&
                    ((this.content.style.marginLeft = -this.scrollLeft + 'px'),
                    (this.scroller.className =
                      0 >= this.scrollLeft
                        ? 'ace_scroller'
                        : 'ace_scroller ace_scroll-left')),
                  e & this.CHANGE_FULL
                    ? (this.$textLayer.update(o),
                      this.$showGutter && this.$gutterLayer.update(o),
                      this.$markerBack.update(o),
                      this.$markerFront.update(o),
                      this.$cursorLayer.update(o),
                      this.$moveTextAreaToCursor(),
                      this.$highlightGutterLine &&
                        this.$updateGutterLineHighlight(),
                      void this._signal('afterRender'))
                    : e & this.CHANGE_SCROLL
                      ? (e & this.CHANGE_TEXT || e & this.CHANGE_LINES
                          ? this.$textLayer.update(o)
                          : this.$textLayer.scrollLines(o),
                        this.$showGutter && this.$gutterLayer.update(o),
                        this.$markerBack.update(o),
                        this.$markerFront.update(o),
                        this.$cursorLayer.update(o),
                        this.$highlightGutterLine &&
                          this.$updateGutterLineHighlight(),
                        this.$moveTextAreaToCursor(),
                        void this._signal('afterRender'))
                      : void (e & this.CHANGE_TEXT
                          ? (this.$textLayer.update(o),
                            this.$showGutter && this.$gutterLayer.update(o))
                          : e & this.CHANGE_LINES
                            ? (this.$updateLines() ||
                                (e & this.CHANGE_GUTTER && this.$showGutter)) &&
                              this.$gutterLayer.update(o)
                            : (e & this.CHANGE_TEXT ||
                                e & this.CHANGE_GUTTER) &&
                              this.$showGutter &&
                              this.$gutterLayer.update(o),
                        e & this.CHANGE_CURSOR &&
                          (this.$cursorLayer.update(o),
                          this.$moveTextAreaToCursor(),
                          this.$highlightGutterLine &&
                            this.$updateGutterLineHighlight()),
                        e & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT) &&
                          this.$markerFront.update(o),
                        e & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK) &&
                          this.$markerBack.update(o),
                        this._signal('afterRender'))
                )
              }),
              (this.$autosize = function() {
                var e = this.session.getScreenLength() * this.lineHeight,
                  t = this.$maxLines * this.lineHeight,
                  o =
                    u(t, p((this.$minLines || 1) * this.lineHeight, e)) +
                    this.scrollMargin.v +
                    (this.$extraHeight || 0)
                this.$horizScroll && (o += this.scrollBarH.getHeight()),
                  this.$maxPixelHeight &&
                    o > this.$maxPixelHeight &&
                    (o = this.$maxPixelHeight)
                var n = e > t
                if (
                  o != this.desiredHeight ||
                  this.$size.height != this.desiredHeight ||
                  n != this.$vScroll
                ) {
                  n != this.$vScroll &&
                    ((this.$vScroll = n), this.scrollBarV.setVisible(n))
                  var r = this.container.clientWidth
                  ;(this.container.style.height = o + 'px'),
                    this.$updateCachedSize(!0, this.$gutterWidth, r, o),
                    (this.desiredHeight = o),
                    this._signal('autosize')
                }
              }),
              (this.$computeLayerConfig = function() {
                var e = this.session,
                  t = this.$size,
                  o = t.height <= 2 * this.lineHeight,
                  a = this.session.getScreenLength(),
                  i = a * this.lineHeight,
                  s = this.$getLongestLine(),
                  l =
                    !o &&
                    (this.$hScrollBarAlwaysVisible ||
                      0 > t.scrollerWidth - s - 2 * this.$padding),
                  d = this.$horizScroll !== l
                d && ((this.$horizScroll = l), this.scrollBarH.setVisible(l))
                var c = this.$vScroll
                this.$maxLines && 1 < this.lineHeight && this.$autosize()
                var g = this.scrollTop % this.lineHeight,
                  h = t.scrollerHeight + this.lineHeight,
                  m =
                    !this.$maxLines && this.$scrollPastEnd
                      ? (t.scrollerHeight - this.lineHeight) *
                        this.$scrollPastEnd
                      : 0
                i += m
                var f = this.scrollMargin
                this.session.setScrollTop(
                  p(-f.top, u(this.scrollTop, i - t.scrollerHeight + f.bottom))
                ),
                  this.session.setScrollLeft(
                    p(
                      -f.left,
                      u(
                        this.scrollLeft,
                        s + 2 * this.$padding - t.scrollerWidth + f.right
                      )
                    )
                  )
                var y =
                    !o &&
                    (this.$vScrollBarAlwaysVisible ||
                      0 > t.scrollerHeight - i + m ||
                      this.scrollTop > f.top),
                  A = c !== y
                A && ((this.$vScroll = y), this.scrollBarV.setVisible(y))
                var C = r(h / this.lineHeight) - 1,
                  w = p(0, n((this.scrollTop - g) / this.lineHeight)),
                  E = w + C,
                  b = this.lineHeight,
                  v,
                  F
                w = e.screenToDocumentRow(w, 0)
                var x = e.getFoldLine(w)
                x && (w = x.start.row),
                  (v = e.documentToScreenRow(w, 0)),
                  (F = e.getRowLength(w) * b),
                  (E = u(e.screenToDocumentRow(E, 0), e.getLength() - 1)),
                  (h = t.scrollerHeight + e.getRowLength(E) * b + F),
                  (g = this.scrollTop - v * b)
                var S = 0
                return (
                  this.layerConfig.width != s && (S = this.CHANGE_H_SCROLL),
                  (d || A) &&
                    ((S = this.$updateCachedSize(
                      !0,
                      this.gutterWidth,
                      t.width,
                      t.height
                    )),
                    this._signal('scrollbarVisibilityChanged'),
                    A && (s = this.$getLongestLine())),
                  (this.layerConfig = {
                    width: s,
                    padding: this.$padding,
                    firstRow: w,
                    firstRowScreen: v,
                    lastRow: E,
                    lineHeight: b,
                    characterWidth: this.characterWidth,
                    minHeight: h,
                    maxHeight: i,
                    offset: g,
                    gutterOffset: b
                      ? p(0, r((g + t.height - t.scrollerHeight) / b))
                      : 0,
                    height: this.$size.scrollerHeight
                  }),
                  S
                )
              }),
              (this.$updateLines = function() {
                var e = this.$changedLines.firstRow,
                  t = this.$changedLines.lastRow
                this.$changedLines = null
                var o = this.layerConfig
                if (!(e > o.lastRow + 1))
                  return t < o.firstRow
                    ? void 0
                    : t === Infinity
                      ? (this.$showGutter && this.$gutterLayer.update(o),
                        void this.$textLayer.update(o))
                      : (this.$textLayer.updateLines(o, e, t), !0)
              }),
              (this.$getLongestLine = function() {
                var e = this.session.getScreenWidth()
                return (
                  this.showInvisibles && !this.session.$useWrapMode && (e += 1),
                  p(
                    this.$size.scrollerWidth - 2 * this.$padding,
                    n(e * this.characterWidth)
                  )
                )
              }),
              (this.updateFrontMarkers = function() {
                this.$markerFront.setMarkers(this.session.getMarkers(!0)),
                  this.$loop.schedule(this.CHANGE_MARKER_FRONT)
              }),
              (this.updateBackMarkers = function() {
                this.$markerBack.setMarkers(this.session.getMarkers()),
                  this.$loop.schedule(this.CHANGE_MARKER_BACK)
              }),
              (this.addGutterDecoration = function(e, t) {
                this.$gutterLayer.addGutterDecoration(e, t)
              }),
              (this.removeGutterDecoration = function(e, t) {
                this.$gutterLayer.removeGutterDecoration(e, t)
              }),
              (this.updateBreakpoints = function() {
                this.$loop.schedule(this.CHANGE_GUTTER)
              }),
              (this.setAnnotations = function(e) {
                this.$gutterLayer.setAnnotations(e),
                  this.$loop.schedule(this.CHANGE_GUTTER)
              }),
              (this.updateCursor = function() {
                this.$loop.schedule(this.CHANGE_CURSOR)
              }),
              (this.hideCursor = function() {
                this.$cursorLayer.hideCursor()
              }),
              (this.showCursor = function() {
                this.$cursorLayer.showCursor()
              }),
              (this.scrollSelectionIntoView = function(e, t, o) {
                this.scrollCursorIntoView(e, o), this.scrollCursorIntoView(t, o)
              }),
              (this.scrollCursorIntoView = function(e, t, o) {
                if (0 !== this.$size.scrollerHeight) {
                  var r = this.$cursorLayer.getPixelPosition(e),
                    a = r.left,
                    i = r.top,
                    s = (o && o.top) || 0,
                    l = (o && o.bottom) || 0,
                    d = this.$scrollAnimation
                      ? this.session.getScrollTop()
                      : this.scrollTop
                  d + s > i
                    ? (t &&
                        d + s > i + this.lineHeight &&
                        (i -= t * this.$size.scrollerHeight),
                      0 === i && (i = -this.scrollMargin.top),
                      this.session.setScrollTop(i))
                    : d + this.$size.scrollerHeight - l < i + this.lineHeight &&
                      (t &&
                        d + this.$size.scrollerHeight - l <
                          i - this.lineHeight &&
                        (i += t * this.$size.scrollerHeight),
                      this.session.setScrollTop(
                        i + this.lineHeight - this.$size.scrollerHeight
                      ))
                  var c = this.scrollLeft
                  c > a
                    ? (a <
                        this.$padding + 2 * this.layerConfig.characterWidth &&
                        (a = -this.scrollMargin.left),
                      this.session.setScrollLeft(a))
                    : c + this.$size.scrollerWidth < a + this.characterWidth
                      ? this.session.setScrollLeft(
                          n(a + this.characterWidth - this.$size.scrollerWidth)
                        )
                      : c <= this.$padding &&
                        a - c < this.characterWidth &&
                        this.session.setScrollLeft(0)
                }
              }),
              (this.getScrollTop = function() {
                return this.session.getScrollTop()
              }),
              (this.getScrollLeft = function() {
                return this.session.getScrollLeft()
              }),
              (this.getScrollTopRow = function() {
                return this.scrollTop / this.lineHeight
              }),
              (this.getScrollBottomRow = function() {
                return p(
                  0,
                  l(
                    (this.scrollTop + this.$size.scrollerHeight) /
                      this.lineHeight
                  ) - 1
                )
              }),
              (this.scrollToRow = function(e) {
                this.session.setScrollTop(e * this.lineHeight)
              }),
              (this.alignCursor = function(e, t) {
                'number' == typeof e && (e = { row: e, column: 0 })
                var o = this.$cursorLayer.getPixelPosition(e),
                  n = this.$size.scrollerHeight - this.lineHeight,
                  r = o.top - n * (t || 0)
                return this.session.setScrollTop(r), r
              }),
              (this.STEPS = 8),
              (this.$calcSteps = function(e, t) {
                var o = 0,
                  n = this.STEPS,
                  r = [],
                  a = function(e, t, o) {
                    return o * (s(e - 1, 3) + 1) + t
                  }
                for (o = 0; o < n; ++o) r.push(a(o / this.STEPS, e, t - e))
                return r
              }),
              (this.scrollToLine = function(e, t, o, n) {
                var r = this.$cursorLayer.getPixelPosition({
                    row: e,
                    column: 0
                  }),
                  a = r.top
                t && (a -= this.$size.scrollerHeight / 2)
                var i = this.scrollTop
                this.session.setScrollTop(a),
                  !1 !== o && this.animateScrolling(i, n)
              }),
              (this.animateScrolling = function(e, t) {
                var o = this.scrollTop
                if (this.$animatedScroll) {
                  var n = this
                  if (e != o) {
                    if (this.$scrollAnimation) {
                      var r = this.$scrollAnimation.steps
                      if (r.length && ((e = r[0]), e == o)) return
                    }
                    var a = n.$calcSteps(e, o)
                    ;(this.$scrollAnimation = { from: e, to: o, steps: a }),
                      clearInterval(this.$timer),
                      n.session.setScrollTop(a.shift()),
                      (n.session.$scrollTop = o),
                      (this.$timer = setInterval(function() {
                        a.length
                          ? (n.session.setScrollTop(a.shift()),
                            (n.session.$scrollTop = o))
                          : null == o
                            ? ((n.$timer = clearInterval(n.$timer)),
                              (n.$scrollAnimation = null),
                              t && t())
                            : ((n.session.$scrollTop = -1),
                              n.session.setScrollTop(o),
                              (o = null))
                      }, 10))
                  }
                }
              }),
              (this.scrollToY = function(e) {
                this.scrollTop !== e &&
                  (this.$loop.schedule(this.CHANGE_SCROLL),
                  (this.scrollTop = e))
              }),
              (this.scrollToX = function(e) {
                this.scrollLeft !== e && (this.scrollLeft = e),
                  this.$loop.schedule(this.CHANGE_H_SCROLL)
              }),
              (this.scrollTo = function(e, t) {
                this.session.setScrollTop(t), this.session.setScrollLeft(t)
              }),
              (this.scrollBy = function(e, t) {
                t && this.session.setScrollTop(this.session.getScrollTop() + t),
                  e &&
                    this.session.setScrollLeft(this.session.getScrollLeft() + e)
              }),
              (this.isScrollableBy = function(e, t) {
                return (
                  (0 > t &&
                    this.session.getScrollTop() >= 1 - this.scrollMargin.top) ||
                  (0 < t &&
                    this.session.getScrollTop() +
                      this.$size.scrollerHeight -
                      this.layerConfig.maxHeight <
                      -1 + this.scrollMargin.bottom) ||
                  (0 > e &&
                    this.session.getScrollLeft() >=
                      1 - this.scrollMargin.left) ||
                  (0 < e &&
                    this.session.getScrollLeft() +
                      this.$size.scrollerWidth -
                      this.layerConfig.width <
                      -1 + this.scrollMargin.right) ||
                  void 0
                )
              }),
              (this.pixelToScreenCoordinates = function(e, t) {
                var o = this.scroller.getBoundingClientRect(),
                  r =
                    (e + this.scrollLeft - o.left - this.$padding) /
                    this.characterWidth,
                  a = l((t + this.scrollTop - o.top) / this.lineHeight),
                  i = n(r)
                return { row: a, column: i, side: 0 < r - i ? 1 : -1 }
              }),
              (this.screenToTextCoordinates = function(e, t) {
                var o = this.scroller.getBoundingClientRect(),
                  r = n(
                    (e + this.scrollLeft - o.left - this.$padding) /
                      this.characterWidth
                  ),
                  a = (t + this.scrollTop - o.top) / this.lineHeight
                return this.session.screenToDocumentPosition(a, p(r, 0))
              }),
              (this.textToScreenCoordinates = function(e, t) {
                var o = this.scroller.getBoundingClientRect(),
                  r = this.session.documentToScreenPosition(e, t),
                  a = this.$padding + n(r.column * this.characterWidth),
                  i = r.row * this.lineHeight
                return {
                  pageX: o.left + a - this.scrollLeft,
                  pageY: o.top + i - this.scrollTop
                }
              }),
              (this.visualizeFocus = function() {
                a.addCssClass(this.container, 'ace_focus')
              }),
              (this.visualizeBlur = function() {
                a.removeCssClass(this.container, 'ace_focus')
              }),
              (this.showComposition = function() {
                this.$composition ||
                  (this.$composition = {
                    keepTextAreaAtCursor: this.$keepTextAreaAtCursor,
                    cssText: this.textarea.style.cssText
                  }),
                  (this.$keepTextAreaAtCursor = !0),
                  a.addCssClass(this.textarea, 'ace_composition'),
                  (this.textarea.style.cssText = ''),
                  this.$moveTextAreaToCursor()
              }),
              (this.setCompositionText = function() {
                this.$moveTextAreaToCursor()
              }),
              (this.hideComposition = function() {
                this.$composition &&
                  (a.removeCssClass(this.textarea, 'ace_composition'),
                  (this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor),
                  (this.textarea.style.cssText = this.$composition.cssText),
                  (this.$composition = null))
              }),
              (this.setTheme = function(e, t) {
                function o(o) {
                  if (n.$themeId != e) return t && t()
                  if (!o || !o.cssClass)
                    throw new Error(
                      "couldn't load module " + e + " or it didn't call define"
                    )
                  a.importCssString(
                    o.cssText,
                    o.cssClass,
                    n.container.ownerDocument
                  ),
                    n.theme && a.removeCssClass(n.container, n.theme.cssClass)
                  var r =
                    'padding' in o
                      ? o.padding
                      : 'padding' in (n.theme || {})
                        ? 4
                        : n.$padding
                  n.$padding && r != n.$padding && n.setPadding(r),
                    (n.$theme = o.cssClass),
                    (n.theme = o),
                    a.addCssClass(n.container, o.cssClass),
                    a.setCssClass(n.container, 'ace_dark', o.isDark),
                    n.$size && ((n.$size.width = 0), n.$updateSizeAsync()),
                    n._dispatchEvent('themeLoaded', { theme: o }),
                    t && t()
                }
                var n = this
                if (
                  ((this.$themeId = e),
                  n._dispatchEvent('themeChange', { theme: e }),
                  !e || 'string' == typeof e)
                ) {
                  var r = e || this.$options.theme.initialValue
                  i.loadModule(['theme', r], o)
                } else o(e)
              }),
              (this.getTheme = function() {
                return this.$themeId
              }),
              (this.setStyle = function(e, t) {
                a.setCssClass(this.container, e, !1 !== t)
              }),
              (this.unsetStyle = function(e) {
                a.removeCssClass(this.container, e)
              }),
              (this.setCursorStyle = function(e) {
                this.scroller.style.cursor != e &&
                  (this.scroller.style.cursor = e)
              }),
              (this.setMouseCursor = function(e) {
                this.scroller.style.cursor = e
              }),
              (this.destroy = function() {
                this.$textLayer.destroy(), this.$cursorLayer.destroy()
              })
          }.call(E.prototype),
            i.defineOptions(E.prototype, 'renderer', {
              animatedScroll: { initialValue: !1 },
              showInvisibles: {
                set: function(e) {
                  this.$textLayer.setShowInvisibles(e) &&
                    this.$loop.schedule(this.CHANGE_TEXT)
                },
                initialValue: !1
              },
              showPrintMargin: {
                set: function() {
                  this.$updatePrintMargin()
                },
                initialValue: !0
              },
              printMarginColumn: {
                set: function() {
                  this.$updatePrintMargin()
                },
                initialValue: 80
              },
              printMargin: {
                set: function(e) {
                  'number' == typeof e && (this.$printMarginColumn = e),
                    (this.$showPrintMargin = !!e),
                    this.$updatePrintMargin()
                },
                get: function() {
                  return this.$showPrintMargin && this.$printMarginColumn
                }
              },
              showGutter: {
                set: function(e) {
                  ;(this.$gutter.style.display = e ? 'block' : 'none'),
                    this.$loop.schedule(this.CHANGE_FULL),
                    this.onGutterResize()
                },
                initialValue: !0
              },
              fadeFoldWidgets: {
                set: function(e) {
                  a.setCssClass(this.$gutter, 'ace_fade-fold-widgets', e)
                },
                initialValue: !1
              },
              showFoldWidgets: {
                set: function(e) {
                  this.$gutterLayer.setShowFoldWidgets(e)
                },
                initialValue: !0
              },
              showLineNumbers: {
                set: function(e) {
                  this.$gutterLayer.setShowLineNumbers(e),
                    this.$loop.schedule(this.CHANGE_GUTTER)
                },
                initialValue: !0
              },
              displayIndentGuides: {
                set: function(e) {
                  this.$textLayer.setDisplayIndentGuides(e) &&
                    this.$loop.schedule(this.CHANGE_TEXT)
                },
                initialValue: !0
              },
              highlightGutterLine: {
                set: function(e) {
                  return this.$gutterLineHighlight
                    ? void ((this.$gutterLineHighlight.style.display = e
                        ? ''
                        : 'none'),
                      this.$cursorLayer.$pixelPos &&
                        this.$updateGutterLineHighlight())
                    : ((this.$gutterLineHighlight = a.createElement('div')),
                      (this.$gutterLineHighlight.className =
                        'ace_gutter-active-line'),
                      void this.$gutter.appendChild(this.$gutterLineHighlight))
                },
                initialValue: !1,
                value: !0
              },
              hScrollBarAlwaysVisible: {
                set: function() {
                  ;(this.$hScrollBarAlwaysVisible && this.$horizScroll) ||
                    this.$loop.schedule(this.CHANGE_SCROLL)
                },
                initialValue: !1
              },
              vScrollBarAlwaysVisible: {
                set: function() {
                  ;(this.$vScrollBarAlwaysVisible && this.$vScroll) ||
                    this.$loop.schedule(this.CHANGE_SCROLL)
                },
                initialValue: !1
              },
              fontSize: {
                set: function(e) {
                  'number' == typeof e && (e += 'px'),
                    (this.container.style.fontSize = e),
                    this.updateFontSize()
                },
                initialValue: 12
              },
              fontFamily: {
                set: function(e) {
                  ;(this.container.style.fontFamily = e), this.updateFontSize()
                }
              },
              maxLines: {
                set: function() {
                  this.updateFull()
                }
              },
              minLines: {
                set: function() {
                  this.updateFull()
                }
              },
              maxPixelHeight: {
                set: function() {
                  this.updateFull()
                },
                initialValue: 0
              },
              scrollPastEnd: {
                set: function(e) {
                  e = +e || 0
                  this.$scrollPastEnd == e ||
                    ((this.$scrollPastEnd = e),
                    this.$loop.schedule(this.CHANGE_SCROLL))
                },
                initialValue: 0,
                handlesSet: !0
              },
              fixedWidthGutter: {
                set: function(e) {
                  ;(this.$gutterLayer.$fixedWidth = !!e),
                    this.$loop.schedule(this.CHANGE_GUTTER)
                }
              },
              theme: {
                set: function(e) {
                  this.setTheme(e)
                },
                get: function() {
                  return this.$themeId || this.theme
                },
                initialValue: './theme/textmate',
                handlesSet: !0
              }
            }),
            (t.VirtualRenderer = E))
        }
      ),
      ace.define(
        'ace/worker/worker_client',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/net',
          'ace/lib/event_emitter',
          'ace/config'
        ],
        function(e, t) {
          'use strict'
          var n = e('../lib/oop'),
            r = e('../lib/net'),
            a = e('../lib/event_emitter').EventEmitter,
            i = e('../config'),
            s = function(t, n, r, a) {
              if (
                ((this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this)),
                (this.changeListener = this.changeListener.bind(this)),
                (this.onMessage = this.onMessage.bind(this)),
                e.nameToUrl && !e.toUrl && (e.toUrl = e.nameToUrl),
                i.get('packaged') || !e.toUrl)
              )
                a = a || i.moduleUrl(n.id, 'worker')
              else {
                var s = this.$normalizePath
                a = a || s(e.toUrl('ace/worker/worker.js', null, '_'))
                var l = {}
                t.forEach(function(t) {
                  l[t] = s(e.toUrl(t, null, '_').replace(/(\.js)?(\?.*)?$/, ''))
                })
              }
              try {
                var d = n.src,
                  c = o(399),
                  u = new c([d], { type: 'application/javascript' }),
                  p = (window.URL || window.webkitURL).createObjectURL(u)
                this.$worker = new Worker(p)
              } catch (t) {
                if (t instanceof window.DOMException) {
                  var u = this.$workerBlob(a),
                    g = window.URL || window.webkitURL,
                    h = g.createObjectURL(u)
                  ;(this.$worker = new Worker(h)), g.revokeObjectURL(h)
                } else throw t
              }
              this.$worker.postMessage({
                init: !0,
                tlns: l,
                module: n.id,
                classname: r
              }),
                (this.callbackId = 1),
                (this.callbacks = {}),
                (this.$worker.onmessage = this.onMessage)
            }
          ;(function() {
            n.implement(this, a),
              (this.onMessage = function(t) {
                var e = t.data
                switch (e.type) {
                  case 'event':
                    this._signal(e.name, { data: e.data })
                    break
                  case 'call':
                    var o = this.callbacks[e.id]
                    o && (o(e.data), delete this.callbacks[e.id])
                    break
                  case 'error':
                    this.reportError(e.data)
                    break
                  case 'log':
                    window.console &&
                      console.log &&
                      console.log.apply(console, e.data)
                }
              }),
              (this.reportError = function(e) {
                window.console && console.error && console.error(e)
              }),
              (this.$normalizePath = function(e) {
                return r.qualifyURL(e)
              }),
              (this.terminate = function() {
                this._signal('terminate', {}),
                  (this.deltaQueue = null),
                  this.$worker.terminate(),
                  (this.$worker = null),
                  this.$doc && this.$doc.off('change', this.changeListener),
                  (this.$doc = null)
              }),
              (this.send = function(e, t) {
                this.$worker.postMessage({ command: e, args: t })
              }),
              (this.call = function(e, t, o) {
                if (o) {
                  var n = this.callbackId++
                  ;(this.callbacks[n] = o), t.push(n)
                }
                this.send(e, t)
              }),
              (this.emit = function(e, t) {
                try {
                  this.$worker.postMessage({ event: e, data: { data: t.data } })
                } catch (e) {
                  console.error(e.stack)
                }
              }),
              (this.attachToDocument = function(e) {
                this.$doc && this.terminate(),
                  (this.$doc = e),
                  this.call('setValue', [e.getValue()]),
                  e.on('change', this.changeListener)
              }),
              (this.changeListener = function(e) {
                this.deltaQueue ||
                  ((this.deltaQueue = []), setTimeout(this.$sendDeltaQueue, 0)),
                  'insert' == e.action
                    ? this.deltaQueue.push(e.start, e.lines)
                    : this.deltaQueue.push(e.start, e.end)
              }),
              (this.$sendDeltaQueue = function() {
                var e = this.deltaQueue
                e &&
                  ((this.deltaQueue = null),
                  50 < e.length && e.length > this.$doc.getLength() >> 1
                    ? this.call('setValue', [this.$doc.getValue()])
                    : this.emit('change', { data: e }))
              }),
              (this.$workerBlob = function(e) {
                var t = "importScripts('" + r.qualifyURL(e) + "');"
                try {
                  return new Blob([t], { type: 'application/javascript' })
                } catch (r) {
                  var o =
                      window.BlobBuilder ||
                      window.WebKitBlobBuilder ||
                      window.MozBlobBuilder,
                    n = new o()
                  return n.append(t), n.getBlob('application/javascript')
                }
              })
          }.call(s.prototype))
          var l = function(e, t, o) {
            ;(this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this)),
              (this.changeListener = this.changeListener.bind(this)),
              (this.callbackId = 1),
              (this.callbacks = {}),
              (this.messageBuffer = [])
            var n = null,
              r = !1,
              s = Object.create(a),
              l = this
            ;(this.$worker = {}),
              (this.$worker.terminate = function() {}),
              (this.$worker.postMessage = function(t) {
                l.messageBuffer.push(t), n && (r ? setTimeout(d) : d())
              }),
              (this.setEmitSync = function(e) {
                r = e
              })
            var d = function() {
              var e = l.messageBuffer.shift()
              e.command
                ? n[e.command].apply(n, e.args)
                : e.event && s._signal(e.event, e.data)
            }
            ;(s.postMessage = function(e) {
              l.onMessage({ data: e })
            }),
              (s.callback = function(e, t) {
                this.postMessage({ type: 'call', id: t, data: e })
              }),
              (s.emit = function(e, t) {
                this.postMessage({ type: 'event', name: e, data: t })
              }),
              i.loadModule(['worker', t], function(e) {
                for (n = new e[o](s); l.messageBuffer.length; ) d()
              })
          }
          ;(l.prototype = s.prototype),
            (t.UIWorkerClient = l),
            (t.WorkerClient = s)
        }
      ),
      ace.define(
        'ace/placeholder',
        [
          'require',
          'exports',
          'module',
          'ace/range',
          'ace/lib/event_emitter',
          'ace/lib/oop'
        ],
        function(e, t) {
          'use strict'
          var o = e('./range').Range,
            n = e('./lib/event_emitter').EventEmitter,
            r = e('./lib/oop'),
            a = function(e, t, o, n, r, a) {
              var i = this
              ;(this.length = t),
                (this.session = e),
                (this.doc = e.getDocument()),
                (this.mainClass = r),
                (this.othersClass = a),
                (this.$onUpdate = this.onUpdate.bind(this)),
                this.doc.on('change', this.$onUpdate),
                (this.$others = n),
                (this.$onCursorChange = function() {
                  setTimeout(function() {
                    i.onCursorChange()
                  })
                }),
                (this.$pos = o)
              var s = e.getUndoManager().$undoStack ||
                e.getUndoManager().$undostack || { length: -1 }
              ;(this.$undoStackDepth = s.length),
                this.setup(),
                e.selection.on('changeCursor', this.$onCursorChange)
            }
          ;(function() {
            r.implement(this, n),
              (this.setup = function() {
                var e = this,
                  t = this.doc,
                  n = this.session
                ;(this.selectionBefore = n.selection.toJSON()),
                  n.selection.inMultiSelectMode && n.selection.toSingleRange(),
                  (this.pos = t.createAnchor(this.$pos.row, this.$pos.column))
                var r = this.pos
                ;(r.$insertRight = !0),
                  r.detach(),
                  (r.markerId = n.addMarker(
                    new o(r.row, r.column, r.row, r.column + this.length),
                    this.mainClass,
                    null,
                    !1
                  )),
                  (this.others = []),
                  this.$others.forEach(function(o) {
                    var n = t.createAnchor(o.row, o.column)
                    ;(n.$insertRight = !0), n.detach(), e.others.push(n)
                  }),
                  n.setUndoSelect(!1)
              }),
              (this.showOtherMarkers = function() {
                if (!this.othersActive) {
                  var e = this.session,
                    t = this
                  ;(this.othersActive = !0),
                    this.others.forEach(function(n) {
                      n.markerId = e.addMarker(
                        new o(n.row, n.column, n.row, n.column + t.length),
                        t.othersClass,
                        null,
                        !1
                      )
                    })
                }
              }),
              (this.hideOtherMarkers = function() {
                if (this.othersActive) {
                  this.othersActive = !1
                  for (var e = 0; e < this.others.length; e++)
                    this.session.removeMarker(this.others[e].markerId)
                }
              }),
              (this.onUpdate = function(e) {
                if (this.$updating) return this.updateAnchors(e)
                var t = e
                if (t.start.row === t.end.row && t.start.row === this.pos.row) {
                  this.$updating = !0
                  var n =
                      'insert' === e.action
                        ? t.end.column - t.start.column
                        : t.start.column - t.end.column,
                    r =
                      t.start.column >= this.pos.column &&
                      t.start.column <= this.pos.column + this.length + 1,
                    a = t.start.column - this.pos.column
                  if (
                    (this.updateAnchors(e),
                    r && (this.length += n),
                    r && !this.session.$fromUndo)
                  )
                    if ('insert' === e.action)
                      for (var s = this.others.length - 1; 0 <= s; s--) {
                        var i = this.others[s],
                          l = { row: i.row, column: i.column + a }
                        this.doc.insertMergedLines(l, e.lines)
                      }
                    else if ('remove' === e.action)
                      for (var s = this.others.length - 1; 0 <= s; s--) {
                        var i = this.others[s],
                          l = { row: i.row, column: i.column + a }
                        this.doc.remove(
                          new o(l.row, l.column, l.row, l.column - n)
                        )
                      }
                  ;(this.$updating = !1), this.updateMarkers()
                }
              }),
              (this.updateAnchors = function(e) {
                this.pos.onChange(e)
                for (var t = this.others.length; t--; )
                  this.others[t].onChange(e)
                this.updateMarkers()
              }),
              (this.updateMarkers = function() {
                if (!this.$updating) {
                  var e = this,
                    t = this.session,
                    n = function(n, r) {
                      t.removeMarker(n.markerId),
                        (n.markerId = t.addMarker(
                          new o(n.row, n.column, n.row, n.column + e.length),
                          r,
                          null,
                          !1
                        ))
                    }
                  n(this.pos, this.mainClass)
                  for (var r = this.others.length; r--; )
                    n(this.others[r], this.othersClass)
                }
              }),
              (this.onCursorChange = function(e) {
                if (!this.$updating && this.session) {
                  var t = this.session.selection.getCursor()
                  t.row === this.pos.row &&
                  t.column >= this.pos.column &&
                  t.column <= this.pos.column + this.length
                    ? (this.showOtherMarkers(), this._emit('cursorEnter', e))
                    : (this.hideOtherMarkers(), this._emit('cursorLeave', e))
                }
              }),
              (this.detach = function() {
                this.session.removeMarker(this.pos && this.pos.markerId),
                  this.hideOtherMarkers(),
                  this.doc.removeEventListener('change', this.$onUpdate),
                  this.session.selection.removeEventListener(
                    'changeCursor',
                    this.$onCursorChange
                  ),
                  this.session.setUndoSelect(!0),
                  (this.session = null)
              }),
              (this.cancel = function() {
                if (-1 !== this.$undoStackDepth) {
                  for (
                    var e = this.session.getUndoManager(),
                      t =
                        (e.$undoStack || e.$undostack).length -
                        this.$undoStackDepth,
                      o = 0;
                    o < t;
                    o++
                  )
                    e.undo(!0)
                  this.selectionBefore &&
                    this.session.selection.fromJSON(this.selectionBefore)
                }
              })
          }.call(a.prototype),
            (t.PlaceHolder = a))
        }
      ),
      ace.define(
        'ace/mouse/multi_select_handler',
        ['require', 'exports', 'module', 'ace/lib/event', 'ace/lib/useragent'],
        function(e, t) {
          function o(e, t) {
            return e.row == t.row && e.column == t.column
          }
          var n = e('../lib/event'),
            r = e('../lib/useragent')
          t.onMouseDown = function(t) {
            var e = t.domEvent,
              a = e.altKey,
              i = e.shiftKey,
              s = e.ctrlKey,
              l = t.getAccelKey(),
              d = t.getButton()
            if (
              (s && r.isMac && (d = e.button),
              t.editor.inMultiSelectMode && 2 == d)
            )
              return void t.editor.textInput.onContextMenu(t.domEvent)
            if (!s && !a && !l)
              return void (
                0 === d &&
                t.editor.inMultiSelectMode &&
                t.editor.exitMultiSelectMode()
              )
            if (0 === d) {
              var c = t.editor,
                u = c.selection,
                p = c.inMultiSelectMode,
                g = t.getDocumentPosition(),
                h = u.getCursor(),
                m = t.inSelection() || (u.isEmpty() && o(g, h)),
                f = t.x,
                y = t.y,
                A = function(t) {
                  ;(f = t.clientX), (y = t.clientY)
                },
                C = c.session,
                w = c.renderer.pixelToScreenCoordinates(f, y),
                E = w,
                b
              if (c.$mouseHandler.$enableJumpToDef)
                (s && a) || (l && a)
                  ? (b = i ? 'block' : 'add')
                  : a && c.$blockSelectEnabled && (b = 'block')
              else if (!l || a) a && c.$blockSelectEnabled && (b = 'block')
              else if (((b = 'add'), !p && i)) return
              if (
                (b &&
                  r.isMac &&
                  e.ctrlKey &&
                  c.$mouseHandler.cancelContextMenu(),
                'add' == b)
              ) {
                if (!p && m) return
                if (!p) {
                  var v = u.toOrientedRange()
                  c.addSelectionMarker(v)
                }
                var F = u.rangeList.rangeAtPoint(g)
                c.$blockScrolling++,
                  (c.inVirtualSelectionMode = !0),
                  i &&
                    ((F = null),
                    (v = u.ranges[0] || v),
                    c.removeSelectionMarker(v)),
                  c.once('mouseup', function() {
                    var e = u.toOrientedRange()
                    F && e.isEmpty() && o(F.cursor, e.cursor)
                      ? u.substractPoint(e.cursor)
                      : (i
                          ? u.substractPoint(v.cursor)
                          : v && (c.removeSelectionMarker(v), u.addRange(v)),
                        u.addRange(e)),
                      c.$blockScrolling--,
                      (c.inVirtualSelectionMode = !1)
                  })
              } else if ('block' == b) {
                t.stop(), (c.inVirtualSelectionMode = !0)
                var x = [],
                  S = function() {
                    var e = c.renderer.pixelToScreenCoordinates(f, y),
                      t = C.screenToDocumentPosition(e.row, e.column)
                    ;(o(E, e) && o(t, u.lead)) ||
                      ((E = e),
                      c.$blockScrolling++,
                      c.selection.moveToPosition(t),
                      c.renderer.scrollCursorIntoView(),
                      c.removeSelectionMarkers(x),
                      (x = u.rectangularRangeBlock(E, w)),
                      c.$mouseHandler.$clickSelection &&
                        1 == x.length &&
                        x[0].isEmpty() &&
                        (x[0] = c.$mouseHandler.$clickSelection.clone()),
                      x.forEach(c.addSelectionMarker, c),
                      c.updateSelectionMarkers(),
                      c.$blockScrolling--)
                  },
                  $
                c.$blockScrolling++,
                  p && !l
                    ? u.toSingleRange()
                    : !p &&
                      l &&
                      (($ = u.toOrientedRange()), c.addSelectionMarker($)),
                  i
                    ? (w = C.documentToScreenPosition(u.lead))
                    : u.moveToPosition(g),
                  c.$blockScrolling--,
                  (E = { row: -1, column: -1 })
                var k = function() {
                  clearInterval(D),
                    c.removeSelectionMarkers(x),
                    x.length || (x = [u.toOrientedRange()]),
                    c.$blockScrolling++,
                    $ && (c.removeSelectionMarker($), u.toSingleRange($))
                  for (var e = 0; e < x.length; e++) u.addRange(x[e])
                  ;(c.inVirtualSelectionMode = !1),
                    (c.$mouseHandler.$clickSelection = null),
                    c.$blockScrolling--
                }
                n.capture(c.container, A, k)
                var D = setInterval(function() {
                  S()
                }, 20)
                return t.preventDefault()
              }
            }
          }
        }
      ),
      ace.define(
        'ace/commands/multi_select_commands',
        ['require', 'exports', 'module', 'ace/keyboard/hash_handler'],
        function(e, t) {
          ;(t.defaultCommands = [
            {
              name: 'addCursorAbove',
              exec: function(e) {
                e.selectMoreLines(-1)
              },
              bindKey: { win: 'Ctrl-Alt-Up', mac: 'Ctrl-Alt-Up' },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'addCursorBelow',
              exec: function(e) {
                e.selectMoreLines(1)
              },
              bindKey: { win: 'Ctrl-Alt-Down', mac: 'Ctrl-Alt-Down' },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'addCursorAboveSkipCurrent',
              exec: function(e) {
                e.selectMoreLines(-1, !0)
              },
              bindKey: { win: 'Ctrl-Alt-Shift-Up', mac: 'Ctrl-Alt-Shift-Up' },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'addCursorBelowSkipCurrent',
              exec: function(e) {
                e.selectMoreLines(1, !0)
              },
              bindKey: {
                win: 'Ctrl-Alt-Shift-Down',
                mac: 'Ctrl-Alt-Shift-Down'
              },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectMoreBefore',
              exec: function(e) {
                e.selectMore(-1)
              },
              bindKey: { win: 'Ctrl-Alt-Left', mac: 'Ctrl-Alt-Left' },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectMoreAfter',
              exec: function(e) {
                e.selectMore(1)
              },
              bindKey: { win: 'Ctrl-Alt-Right', mac: 'Ctrl-Alt-Right' },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectNextBefore',
              exec: function(e) {
                e.selectMore(-1, !0)
              },
              bindKey: {
                win: 'Ctrl-Alt-Shift-Left',
                mac: 'Ctrl-Alt-Shift-Left'
              },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'selectNextAfter',
              exec: function(e) {
                e.selectMore(1, !0)
              },
              bindKey: {
                win: 'Ctrl-Alt-Shift-Right',
                mac: 'Ctrl-Alt-Shift-Right'
              },
              scrollIntoView: 'cursor',
              readOnly: !0
            },
            {
              name: 'splitIntoLines',
              exec: function(e) {
                e.multiSelect.splitIntoLines()
              },
              bindKey: { win: 'Ctrl-Alt-L', mac: 'Ctrl-Alt-L' },
              readOnly: !0
            },
            {
              name: 'alignCursors',
              exec: function(e) {
                e.alignCursors()
              },
              bindKey: { win: 'Ctrl-Alt-A', mac: 'Ctrl-Alt-A' },
              scrollIntoView: 'cursor'
            },
            {
              name: 'findAll',
              exec: function(e) {
                e.findAll()
              },
              bindKey: { win: 'Ctrl-Alt-K', mac: 'Ctrl-Alt-G' },
              scrollIntoView: 'cursor',
              readOnly: !0
            }
          ]),
            (t.multiSelectCommands = [
              {
                name: 'singleSelection',
                bindKey: 'esc',
                exec: function(e) {
                  e.exitMultiSelectMode()
                },
                scrollIntoView: 'cursor',
                readOnly: !0,
                isAvailable: function(e) {
                  return e && e.inMultiSelectMode
                }
              }
            ])
          var o = e('../keyboard/hash_handler').HashHandler
          t.keyboardHandler = new o(t.multiSelectCommands)
        }
      ),
      ace.define(
        'ace/multi_select',
        [
          'require',
          'exports',
          'module',
          'ace/range_list',
          'ace/range',
          'ace/selection',
          'ace/mouse/multi_select_handler',
          'ace/lib/event',
          'ace/lib/lang',
          'ace/commands/multi_select_commands',
          'ace/search',
          'ace/edit_session',
          'ace/editor',
          'ace/config'
        ],
        function(e, t) {
          function o(e, t, o) {
            return (
              (h.$options.wrap = !0),
              (h.$options.needle = t),
              (h.$options.backwards = -1 == o),
              h.find(e)
            )
          }
          function n(e, t) {
            return e.row == t.row && e.column == t.column
          }
          function r(e) {
            e.$multiselectOnSessionChange ||
              ((e.$onAddRange = e.$onAddRange.bind(e)),
              (e.$onRemoveRange = e.$onRemoveRange.bind(e)),
              (e.$onMultiSelect = e.$onMultiSelect.bind(e)),
              (e.$onSingleSelect = e.$onSingleSelect.bind(e)),
              (e.$multiselectOnSessionChange = t.onSessionChange.bind(e)),
              (e.$checkMultiselectChange = e.$checkMultiselectChange.bind(e)),
              e.$multiselectOnSessionChange(e),
              e.on('changeSession', e.$multiselectOnSessionChange),
              e.on('mousedown', d),
              e.commands.addCommands(p.defaultCommands),
              a(e))
          }
          function a(t) {
            function o() {
              n && (t.renderer.setMouseCursor(''), (n = !1))
            }
            var e = t.textInput.getElement(),
              n = !1
            c.addListener(e, 'keydown', function(r) {
              var e = 18 == r.keyCode && !(r.ctrlKey || r.shiftKey || r.metaKey)
              t.$blockSelectEnabled && e
                ? !n && (t.renderer.setMouseCursor('crosshair'), (n = !0))
                : n && o()
            }),
              c.addListener(e, 'keyup', o),
              c.addListener(e, 'blur', o)
          }
          var i = e('./range_list').RangeList,
            s = e('./range').Range,
            l = e('./selection').Selection,
            d = e('./mouse/multi_select_handler').onMouseDown,
            c = e('./lib/event'),
            u = e('./lib/lang'),
            p = e('./commands/multi_select_commands')
          t.commands = p.defaultCommands.concat(p.multiSelectCommands)
          var g = e('./search').Search,
            h = new g(),
            m = e('./edit_session').EditSession
          ;(function() {
            this.getSelectionMarkers = function() {
              return this.$selectionMarkers
            }
          }.call(m.prototype),
            function() {
              ;(this.ranges = null),
                (this.rangeList = null),
                (this.addRange = function(e, t) {
                  if (e) {
                    if (!this.inMultiSelectMode && 0 === this.rangeCount) {
                      var o = this.toOrientedRange()
                      if (
                        (this.rangeList.add(o),
                        this.rangeList.add(e),
                        2 != this.rangeList.ranges.length)
                      )
                        return (
                          this.rangeList.removeAll(),
                          t || this.fromOrientedRange(e)
                        )
                      this.rangeList.removeAll(),
                        this.rangeList.add(o),
                        this.$onAddRange(o)
                    }
                    e.cursor || (e.cursor = e.end)
                    var n = this.rangeList.add(e)
                    return (
                      this.$onAddRange(e),
                      n.length && this.$onRemoveRange(n),
                      1 < this.rangeCount &&
                        !this.inMultiSelectMode &&
                        (this._signal('multiSelect'),
                        (this.inMultiSelectMode = !0),
                        (this.session.$undoSelect = !1),
                        this.rangeList.attach(this.session)),
                      t || this.fromOrientedRange(e)
                    )
                  }
                }),
                (this.toSingleRange = function(e) {
                  e = e || this.ranges[0]
                  var t = this.rangeList.removeAll()
                  t.length && this.$onRemoveRange(t),
                    e && this.fromOrientedRange(e)
                }),
                (this.substractPoint = function(e) {
                  var t = this.rangeList.substractPoint(e)
                  if (t) return this.$onRemoveRange(t), t[0]
                }),
                (this.mergeOverlappingRanges = function() {
                  var e = this.rangeList.merge()
                  e.length
                    ? this.$onRemoveRange(e)
                    : this.ranges[0] && this.fromOrientedRange(this.ranges[0])
                }),
                (this.$onAddRange = function(e) {
                  ;(this.rangeCount = this.rangeList.ranges.length),
                    this.ranges.unshift(e),
                    this._signal('addRange', { range: e })
                }),
                (this.$onRemoveRange = function(e) {
                  if (
                    ((this.rangeCount = this.rangeList.ranges.length),
                    1 == this.rangeCount && this.inMultiSelectMode)
                  ) {
                    var t = this.rangeList.ranges.pop()
                    e.push(t), (this.rangeCount = 0)
                  }
                  for (var o = e.length, n; o--; )
                    (n = this.ranges.indexOf(e[o])), this.ranges.splice(n, 1)
                  this._signal('removeRange', { ranges: e }),
                    0 === this.rangeCount &&
                      this.inMultiSelectMode &&
                      ((this.inMultiSelectMode = !1),
                      this._signal('singleSelect'),
                      (this.session.$undoSelect = !0),
                      this.rangeList.detach(this.session)),
                    (t = t || this.ranges[0]),
                    t &&
                      !t.isEqual(this.getRange()) &&
                      this.fromOrientedRange(t)
                }),
                (this.$initRangeList = function() {
                  this.rangeList ||
                    ((this.rangeList = new i()),
                    (this.ranges = []),
                    (this.rangeCount = 0))
                }),
                (this.getAllRanges = function() {
                  return this.rangeCount
                    ? this.rangeList.ranges.concat()
                    : [this.getRange()]
                }),
                (this.splitIntoLines = function() {
                  if (1 < this.rangeCount) {
                    var e = this.rangeList.ranges,
                      t = e[e.length - 1],
                      o = s.fromPoints(e[0].start, t.end)
                    this.toSingleRange(),
                      this.setSelectionRange(o, t.cursor == t.start)
                  } else {
                    var o = this.getRange(),
                      n = this.isBackwards(),
                      a = o.start.row,
                      l = o.end.row
                    if (a == l) {
                      if (n)
                        var d = o.end,
                          c = o.start
                      else
                        var d = o.start,
                          c = o.end
                      return (
                        this.addRange(s.fromPoints(c, c)),
                        void this.addRange(s.fromPoints(d, d))
                      )
                    }
                    var u = [],
                      p = this.getLineRange(a, !0)
                    ;(p.start.column = o.start.column), u.push(p)
                    for (var r = a + 1; r < l; r++)
                      u.push(this.getLineRange(r, !0))
                    ;(p = this.getLineRange(l, !0)),
                      (p.end.column = o.end.column),
                      u.push(p),
                      u.forEach(this.addRange, this)
                  }
                }),
                (this.toggleBlockSelection = function() {
                  if (1 < this.rangeCount) {
                    var e = this.rangeList.ranges,
                      t = e[e.length - 1],
                      o = s.fromPoints(e[0].start, t.end)
                    this.toSingleRange(),
                      this.setSelectionRange(o, t.cursor == t.start)
                  } else {
                    var n = this.session.documentToScreenPosition(
                        this.selectionLead
                      ),
                      r = this.session.documentToScreenPosition(
                        this.selectionAnchor
                      ),
                      a = this.rectangularRangeBlock(n, r)
                    a.forEach(this.addRange, this)
                  }
                }),
                (this.rectangularRangeBlock = function(e, t, o) {
                  var r = [],
                    a = e.column < t.column
                  if (a)
                    var l = e.column,
                      d = t.column
                  else
                    var l = t.column,
                      d = e.column
                  var c = e.row < t.row
                  if (c)
                    var u = e.row,
                      p = t.row
                  else
                    var u = t.row,
                      p = e.row
                  0 > l && (l = 0), 0 > u && (u = 0), u == p && (o = !0)
                  for (var g = u, h; g <= p; g++) {
                    if (
                      ((h = s.fromPoints(
                        this.session.screenToDocumentPosition(g, l),
                        this.session.screenToDocumentPosition(g, d)
                      )),
                      h.isEmpty())
                    ) {
                      if (m && n(h.end, m)) break
                      var m = h.end
                    }
                    ;(h.cursor = a ? h.start : h.end), r.push(h)
                  }
                  if ((c && r.reverse(), !o)) {
                    for (var f = r.length - 1; r[f].isEmpty() && 0 < f; ) f--
                    if (0 < f) for (var y = 0; r[y].isEmpty(); ) y++
                    for (var A = f; A >= y; A--)
                      r[A].isEmpty() && r.splice(A, 1)
                  }
                  return r
                })
            }.call(l.prototype))
          var f = e('./editor').Editor
          ;(function() {
            ;(this.updateSelectionMarkers = function() {
              this.renderer.updateCursor(), this.renderer.updateBackMarkers()
            }),
              (this.addSelectionMarker = function(e) {
                e.cursor || (e.cursor = e.end)
                var t = this.getSelectionStyle()
                return (
                  (e.marker = this.session.addMarker(e, 'ace_selection', t)),
                  this.session.$selectionMarkers.push(e),
                  (this.session.selectionMarkerCount = this.session.$selectionMarkers.length),
                  e
                )
              }),
              (this.removeSelectionMarker = function(e) {
                if (e.marker) {
                  this.session.removeMarker(e.marker)
                  var t = this.session.$selectionMarkers.indexOf(e)
                  ;-1 != t && this.session.$selectionMarkers.splice(t, 1),
                    (this.session.selectionMarkerCount = this.session.$selectionMarkers.length)
                }
              }),
              (this.removeSelectionMarkers = function(e) {
                for (
                  var t = this.session.$selectionMarkers, o = e.length, n;
                  o--;

                )
                  if (((n = e[o]), n.marker)) {
                    this.session.removeMarker(n.marker)
                    var r = t.indexOf(n)
                    ;-1 != r && t.splice(r, 1)
                  }
                this.session.selectionMarkerCount = t.length
              }),
              (this.$onAddRange = function(t) {
                this.addSelectionMarker(t.range),
                  this.renderer.updateCursor(),
                  this.renderer.updateBackMarkers()
              }),
              (this.$onRemoveRange = function(t) {
                this.removeSelectionMarkers(t.ranges),
                  this.renderer.updateCursor(),
                  this.renderer.updateBackMarkers()
              }),
              (this.$onMultiSelect = function() {
                this.inMultiSelectMode ||
                  ((this.inMultiSelectMode = !0),
                  this.setStyle('ace_multiselect'),
                  this.keyBinding.addKeyboardHandler(p.keyboardHandler),
                  this.commands.setDefaultHandler(
                    'exec',
                    this.$onMultiSelectExec
                  ),
                  this.renderer.updateCursor(),
                  this.renderer.updateBackMarkers())
              }),
              (this.$onSingleSelect = function() {
                this.session.multiSelect.inVirtualMode ||
                  ((this.inMultiSelectMode = !1),
                  this.unsetStyle('ace_multiselect'),
                  this.keyBinding.removeKeyboardHandler(p.keyboardHandler),
                  this.commands.removeDefaultHandler(
                    'exec',
                    this.$onMultiSelectExec
                  ),
                  this.renderer.updateCursor(),
                  this.renderer.updateBackMarkers(),
                  this._emit('changeSelection'))
              }),
              (this.$onMultiSelectExec = function(t) {
                var e = t.command,
                  o = t.editor
                if (o.multiSelect) {
                  if (!e.multiSelectAction) {
                    var n = e.exec(o, t.args || {})
                    o.multiSelect.addRange(o.multiSelect.toOrientedRange()),
                      o.multiSelect.mergeOverlappingRanges()
                  } else
                    'forEach' == e.multiSelectAction
                      ? (n = o.forEachSelection(e, t.args))
                      : 'forEachLine' == e.multiSelectAction
                        ? (n = o.forEachSelection(e, t.args, !0))
                        : 'single' == e.multiSelectAction
                          ? (o.exitMultiSelectMode(),
                            (n = e.exec(o, t.args || {})))
                          : (n = e.multiSelectAction(o, t.args || {}))
                  return n
                }
              }),
              (this.forEachSelection = function(e, t, o) {
                if (!this.inVirtualSelectionMode) {
                  var n = o && o.keepOrder,
                    r = !0 == o || (o && o.$byLines),
                    a = this.session,
                    s = this.selection,
                    d = s.rangeList,
                    c = (n ? s : d).ranges,
                    u
                  if (!c.length)
                    return e.exec ? e.exec(this, t || {}) : e(this, t || {})
                  var p = s._eventRegistry
                  s._eventRegistry = {}
                  var g = new l(a)
                  this.inVirtualSelectionMode = !0
                  for (var h = c.length; h--; ) {
                    if (r)
                      for (; 0 < h && c[h].start.row == c[h - 1].end.row; ) h--
                    g.fromOrientedRange(c[h]),
                      (g.index = h),
                      (this.selection = a.selection = g)
                    var i = e.exec ? e.exec(this, t || {}) : e(this, t || {})
                    u || void 0 === i || (u = i), g.toOrientedRange(c[h])
                  }
                  g.detach(),
                    (this.selection = a.selection = s),
                    (this.inVirtualSelectionMode = !1),
                    (s._eventRegistry = p),
                    s.mergeOverlappingRanges()
                  var m = this.renderer.$scrollAnimation
                  return (
                    this.onCursorChange(),
                    this.onSelectionChange(),
                    m &&
                      m.from == m.to &&
                      this.renderer.animateScrolling(m.from),
                    u
                  )
                }
              }),
              (this.exitMultiSelectMode = function() {
                !this.inMultiSelectMode ||
                  this.inVirtualSelectionMode ||
                  this.multiSelect.toSingleRange()
              }),
              (this.getSelectedText = function() {
                var e = ''
                if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
                  for (
                    var t = this.multiSelect.rangeList.ranges, o = [], n = 0;
                    n < t.length;
                    n++
                  )
                    o.push(this.session.getTextRange(t[n]))
                  var r = this.session.getDocument().getNewLineCharacter()
                  ;(e = o.join(r)),
                    e.length == (o.length - 1) * r.length && (e = '')
                } else
                  this.selection.isEmpty() ||
                    (e = this.session.getTextRange(this.getSelectionRange()))
                return e
              }),
              (this.$checkMultiselectChange = function(t, e) {
                if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
                  var o = this.multiSelect.ranges[0]
                  if (
                    this.multiSelect.isEmpty() &&
                    e == this.multiSelect.anchor
                  )
                    return
                  var n =
                    e == this.multiSelect.anchor
                      ? o.cursor == o.start
                        ? o.end
                        : o.start
                      : o.cursor
                  ;(n.row != e.row ||
                    this.session.$clipPositionToDocument(n.row, n.column)
                      .column != e.column) &&
                    this.multiSelect.toSingleRange(
                      this.multiSelect.toOrientedRange()
                    )
                }
              }),
              (this.findAll = function(e, t, o) {
                if (
                  ((t = t || {}),
                  (t.needle = e || t.needle),
                  void 0 == t.needle)
                ) {
                  var n = this.selection.isEmpty()
                    ? this.selection.getWordRange()
                    : this.selection.getRange()
                  t.needle = this.session.getTextRange(n)
                }
                this.$search.set(t)
                var r = this.$search.findAll(this.session)
                if (!r.length) return 0
                this.$blockScrolling += 1
                var a = this.multiSelect
                o || a.toSingleRange(r[0])
                for (var s = r.length; s--; ) a.addRange(r[s], !0)
                return (
                  n && a.rangeList.rangeAtPoint(n.start) && a.addRange(n, !0),
                  (this.$blockScrolling -= 1),
                  r.length
                )
              }),
              (this.selectMoreLines = function(e, t) {
                var o = this.selection.toOrientedRange(),
                  n = o.cursor == o.end,
                  r = this.session.documentToScreenPosition(o.cursor)
                this.selection.$desiredColumn &&
                  (r.column = this.selection.$desiredColumn)
                var a = this.session.screenToDocumentPosition(
                  r.row + e,
                  r.column
                )
                if (!o.isEmpty())
                  var i = this.session.documentToScreenPosition(
                      n ? o.end : o.start
                    ),
                    l = this.session.screenToDocumentPosition(
                      i.row + e,
                      i.column
                    )
                else var l = a
                if (n) {
                  var d = s.fromPoints(a, l)
                  d.cursor = d.start
                } else {
                  var d = s.fromPoints(l, a)
                  d.cursor = d.end
                }
                if (
                  ((d.desiredColumn = r.column),
                  !this.selection.inMultiSelectMode)
                )
                  this.selection.addRange(o)
                else if (t) var c = o.cursor
                this.selection.addRange(d),
                  c && this.selection.substractPoint(c)
              }),
              (this.transposeSelections = function(e) {
                for (
                  var t = this.session,
                    o = t.multiSelect,
                    n = o.ranges,
                    r = n.length,
                    a;
                  r--;

                )
                  if (((a = n[r]), a.isEmpty())) {
                    var i = t.getWordRange(a.start.row, a.start.column)
                    ;(a.start.row = i.start.row),
                      (a.start.column = i.start.column),
                      (a.end.row = i.end.row),
                      (a.end.column = i.end.column)
                  }
                o.mergeOverlappingRanges()
                for (var s = [], r = n.length, a; r--; )
                  (a = n[r]), s.unshift(t.getTextRange(a))
                0 > e ? s.unshift(s.pop()) : s.push(s.shift())
                for (var r = n.length; r--; ) {
                  var a = n[r],
                    i = a.clone()
                  t.replace(a, s[r]),
                    (a.start.row = i.start.row),
                    (a.start.column = i.start.column)
                }
              }),
              (this.selectMore = function(e, t, n) {
                var r = this.session,
                  a = r.multiSelect,
                  i = a.toOrientedRange()
                if (
                  !(
                    i.isEmpty() &&
                    ((i = r.getWordRange(i.start.row, i.start.column)),
                    (i.cursor = -1 == e ? i.start : i.end),
                    this.multiSelect.addRange(i),
                    n)
                  )
                ) {
                  var s = r.getTextRange(i),
                    l = o(r, s, e)
                  l &&
                    ((l.cursor = -1 == e ? l.start : l.end),
                    (this.$blockScrolling += 1),
                    this.session.unfold(l),
                    this.multiSelect.addRange(l),
                    (this.$blockScrolling -= 1),
                    this.renderer.scrollCursorIntoView(null, 0.5)),
                    t && this.multiSelect.substractPoint(i.cursor)
                }
              }),
              (this.alignCursors = function() {
                var e = this.session,
                  t = e.multiSelect,
                  o = t.ranges,
                  n = -1,
                  r = o.filter(function(e) {
                    return !(e.cursor.row != n) || void (n = e.cursor.row)
                  })
                if (!o.length || r.length == o.length - 1) {
                  var a = this.selection.getRange(),
                    i = a.start.row,
                    l = a.end.row,
                    d = i == l
                  if (d) {
                    var c = this.session.getLength(),
                      p
                    do p = this.session.getLine(l)
                    while (/[=:]/.test(p) && ++l < c)
                    do p = this.session.getLine(i)
                    while (/[=:]/.test(p) && 0 < --i)
                    0 > i && (i = 0), l >= c && (l = c - 1)
                  }
                  var g = this.session.removeFullLines(i, l)
                  ;(g = this.$reAlignText(g, d)),
                    this.session.insert(
                      { row: i, column: 0 },
                      g.join('\n') + '\n'
                    ),
                    d ||
                      ((a.start.column = 0),
                      (a.end.column = g[g.length - 1].length)),
                    this.selection.setRange(a)
                } else {
                  r.forEach(function(e) {
                    t.substractPoint(e.cursor)
                  })
                  var h = 0,
                    m = Infinity,
                    f = o.map(function(t) {
                      var o = t.cursor,
                        n = e.getLine(o.row),
                        r = n.substr(o.column).search(/\S/g)
                      return (
                        -1 == r && (r = 0),
                        o.column > h && (h = o.column),
                        r < m && (m = r),
                        r
                      )
                    })
                  o.forEach(function(t, o) {
                    var n = t.cursor,
                      r = h - n.column,
                      a = f[o] - m
                    r > a
                      ? e.insert(n, u.stringRepeat(' ', r - a))
                      : e.remove(
                          new s(n.row, n.column, n.row, n.column - r + a)
                        ),
                      (t.start.column = t.end.column = h),
                      (t.start.row = t.end.row = n.row),
                      (t.cursor = t.end)
                  }),
                    t.fromOrientedRange(o[0]),
                    this.renderer.updateCursor(),
                    this.renderer.updateBackMarkers()
                }
              }),
              (this.$reAlignText = function(e, t) {
                function o(e) {
                  return u.stringRepeat(' ', e)
                }
                function n(e) {
                  return e[2]
                    ? o(i) +
                        e[2] +
                        o(s - e[2].length + l) +
                        e[4].replace(/^([=:])\s+/, '$1 ')
                    : e[0]
                }
                var r = !0,
                  a = !0,
                  i,
                  s,
                  l
                return e
                  .map(function(e) {
                    var t = e.match(/(\s*)(.*?)(\s*)([=:].*)/)
                    return t
                      ? null == i
                        ? ((i = t[1].length),
                          (s = t[2].length),
                          (l = t[3].length),
                          t)
                        : (i + s + l !=
                            t[1].length + t[2].length + t[3].length && (a = !1),
                          i != t[1].length && (r = !1),
                          i > t[1].length && (i = t[1].length),
                          s < t[2].length && (s = t[2].length),
                          l > t[3].length && (l = t[3].length),
                          t)
                      : [e]
                  })
                  .map(
                    t
                      ? n
                      : r
                        ? a
                          ? function(e) {
                              return e[2]
                                ? o(i + s - e[2].length) +
                                    e[2] +
                                    o(l, ' ') +
                                    e[4].replace(/^([=:])\s+/, '$1 ')
                                : e[0]
                            }
                          : n
                        : function(e) {
                            return e[2]
                              ? o(i) +
                                  e[2] +
                                  o(l) +
                                  e[4].replace(/^([=:])\s+/, '$1 ')
                              : e[0]
                          }
                  )
              })
          }.call(f.prototype),
            (t.onSessionChange = function(t) {
              var e = t.session
              e &&
                !e.multiSelect &&
                ((e.$selectionMarkers = []),
                e.selection.$initRangeList(),
                (e.multiSelect = e.selection)),
                (this.multiSelect = e && e.multiSelect)
              var o = t.oldSession
              o &&
                (o.multiSelect.off('addRange', this.$onAddRange),
                o.multiSelect.off('removeRange', this.$onRemoveRange),
                o.multiSelect.off('multiSelect', this.$onMultiSelect),
                o.multiSelect.off('singleSelect', this.$onSingleSelect),
                o.multiSelect.lead.off('change', this.$checkMultiselectChange),
                o.multiSelect.anchor.off(
                  'change',
                  this.$checkMultiselectChange
                )),
                e &&
                  (e.multiSelect.on('addRange', this.$onAddRange),
                  e.multiSelect.on('removeRange', this.$onRemoveRange),
                  e.multiSelect.on('multiSelect', this.$onMultiSelect),
                  e.multiSelect.on('singleSelect', this.$onSingleSelect),
                  e.multiSelect.lead.on('change', this.$checkMultiselectChange),
                  e.multiSelect.anchor.on(
                    'change',
                    this.$checkMultiselectChange
                  )),
                e &&
                  this.inMultiSelectMode != e.selection.inMultiSelectMode &&
                  (e.selection.inMultiSelectMode
                    ? this.$onMultiSelect()
                    : this.$onSingleSelect())
            }),
            (t.MultiSelect = r),
            e('./config').defineOptions(f.prototype, 'editor', {
              enableMultiselect: {
                set: function(e) {
                  r(this),
                    e
                      ? (this.on(
                          'changeSession',
                          this.$multiselectOnSessionChange
                        ),
                        this.on('mousedown', d))
                      : (this.off(
                          'changeSession',
                          this.$multiselectOnSessionChange
                        ),
                        this.off('mousedown', d))
                },
                value: !0
              },
              enableBlockSelect: {
                set: function(e) {
                  this.$blockSelectEnabled = e
                },
                value: !0
              }
            }))
        }
      ),
      ace.define(
        'ace/mode/folding/fold_mode',
        ['require', 'exports', 'module', 'ace/range'],
        function(e, t) {
          'use strict'
          var o = e('../../range').Range,
            n = (t.FoldMode = function() {})
          ;(function() {
            ;(this.foldingStartMarker = null),
              (this.foldingStopMarker = null),
              (this.getFoldWidget = function(e, t, o) {
                var n = e.getLine(o)
                return this.foldingStartMarker.test(n)
                  ? 'start'
                  : 'markbeginend' == t &&
                    this.foldingStopMarker &&
                    this.foldingStopMarker.test(n)
                    ? 'end'
                    : ''
              }),
              (this.getFoldWidgetRange = function() {
                return null
              }),
              (this.indentationBlock = function(e, t, n) {
                var r = /\S/,
                  a = e.getLine(t),
                  i = a.search(r)
                if (-1 != i) {
                  for (
                    var s = n || a.length, l = e.getLength(), d = t, c = t, u;
                    ++t < l;

                  )
                    if (((u = e.getLine(t).search(r)), -1 != u)) {
                      if (u <= i) break
                      c = t
                    }
                  if (c > d) {
                    var p = e.getLine(c).length
                    return new o(d, s, c, p)
                  }
                }
              }),
              (this.openingBracketBlock = function(e, t, n, r, a) {
                var i = { row: n, column: r + 1 },
                  s = e.$findClosingBracket(t, i, a)
                if (s) {
                  var l = e.foldWidgets[s.row]
                  return (
                    null == l && (l = e.getFoldWidget(s.row)),
                    'start' == l &&
                      s.row > i.row &&
                      (s.row--, (s.column = e.getLine(s.row).length)),
                    o.fromPoints(i, s)
                  )
                }
              }),
              (this.closingBracketBlock = function(e, t, n, r) {
                var a = { row: n, column: r },
                  i = e.$findOpeningBracket(t, a)
                if (i) return i.column++, a.column--, o.fromPoints(i, a)
              })
          }.call(n.prototype))
        }
      ),
      ace.define(
        'ace/theme/textmate',
        ['require', 'exports', 'module', 'ace/lib/dom'],
        function(e, t) {
          'use strict'
          ;(t.isDark = !1),
            (t.cssClass = 'ace-tm'),
            (t.cssText =
              '.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}')
          var o = e('../lib/dom')
          o.importCssString(t.cssText, t.cssClass)
        }
      ),
      ace.define(
        'ace/line_widgets',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/lib/dom',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          function o(e) {
            ;(this.session = e),
              (this.session.widgetManager = this),
              (this.session.getRowLength = this.getRowLength),
              (this.session.$getWidgetScreenLength = this.$getWidgetScreenLength),
              (this.updateOnChange = this.updateOnChange.bind(this)),
              (this.renderWidgets = this.renderWidgets.bind(this)),
              (this.measureWidgets = this.measureWidgets.bind(this)),
              (this.session._changedWidgets = []),
              (this.$onChangeEditor = this.$onChangeEditor.bind(this)),
              this.session.on('change', this.updateOnChange),
              this.session.on('changeFold', this.updateOnFold),
              this.session.on('changeEditor', this.$onChangeEditor)
          }
          var n = e('./lib/oop'),
            a = e('./lib/dom'),
            i = e('./range').Range
          ;(function() {
            ;(this.getRowLength = function(e) {
              var t
              return (
                (t = this.lineWidgets
                  ? (this.lineWidgets[e] && this.lineWidgets[e].rowCount) || 0
                  : 0),
                this.$useWrapMode && this.$wrapData[e]
                  ? this.$wrapData[e].length + 1 + t
                  : 1 + t
              )
            }),
              (this.$getWidgetScreenLength = function() {
                var e = 0
                return (
                  this.lineWidgets.forEach(function(t) {
                    t && t.rowCount && !t.hidden && (e += t.rowCount)
                  }),
                  e
                )
              }),
              (this.$onChangeEditor = function(t) {
                this.attach(t.editor)
              }),
              (this.attach = function(e) {
                e &&
                  e.widgetManager &&
                  e.widgetManager != this &&
                  e.widgetManager.detach()
                this.editor == e ||
                  (this.detach(),
                  (this.editor = e),
                  e &&
                    ((e.widgetManager = this),
                    e.renderer.on('beforeRender', this.measureWidgets),
                    e.renderer.on('afterRender', this.renderWidgets)))
              }),
              (this.detach = function() {
                var e = this.editor
                if (e) {
                  ;(this.editor = null),
                    (e.widgetManager = null),
                    e.renderer.off('beforeRender', this.measureWidgets),
                    e.renderer.off('afterRender', this.renderWidgets)
                  var t = this.session.lineWidgets
                  t &&
                    t.forEach(function(e) {
                      e &&
                        e.el &&
                        e.el.parentNode &&
                        ((e._inDocument = !1),
                        e.el.parentNode.removeChild(e.el))
                    })
                }
              }),
              (this.updateOnFold = function(t, e) {
                var o = e.lineWidgets
                if (o && t.action) {
                  for (
                    var n = t.data,
                      r = n.start.row,
                      a = n.end.row,
                      s = 'add' == t.action,
                      l = r + 1;
                    l < a;
                    l++
                  )
                    o[l] && (o[l].hidden = s)
                  o[a] &&
                    (s
                      ? o[r]
                        ? (o[a].hidden = s)
                        : (o[r] = o[a])
                      : (o[r] == o[a] && (o[r] = void 0), (o[a].hidden = s)))
                }
              }),
              (this.updateOnChange = function(e) {
                var t = this.session.lineWidgets
                if (t) {
                  var o = e.start.row,
                    n = e.end.row - o
                  if (0 == n);
                  else if ('remove' == e.action) {
                    var r = t.splice(o + 1, n)
                    r.forEach(function(e) {
                      e && this.removeLineWidget(e)
                    }, this),
                      this.$updateRows()
                  } else {
                    var a = Array(n)
                    a.unshift(o, 0), t.splice.apply(t, a), this.$updateRows()
                  }
                }
              }),
              (this.$updateRows = function() {
                var e = this.session.lineWidgets
                if (e) {
                  var t = !0
                  e.forEach(function(e, o) {
                    if (e)
                      for (t = !1, e.row = o; e.$oldWidget; )
                        (e.$oldWidget.row = o), (e = e.$oldWidget)
                  }),
                    t && (this.session.lineWidgets = null)
                }
              }),
              (this.addLineWidget = function(e) {
                this.session.lineWidgets ||
                  (this.session.lineWidgets = Array(this.session.getLength()))
                var t = this.session.lineWidgets[e.row]
                t &&
                  ((e.$oldWidget = t),
                  t.el &&
                    t.el.parentNode &&
                    (t.el.parentNode.removeChild(t.el), (t._inDocument = !1))),
                  (this.session.lineWidgets[e.row] = e),
                  (e.session = this.session)
                var o = this.editor.renderer
                e.html &&
                  !e.el &&
                  ((e.el = a.createElement('div')), (e.el.innerHTML = e.html)),
                  e.el &&
                    (a.addCssClass(e.el, 'ace_lineWidgetContainer'),
                    (e.el.style.position = 'absolute'),
                    (e.el.style.zIndex = 5),
                    o.container.appendChild(e.el),
                    (e._inDocument = !0)),
                  e.coverGutter || (e.el.style.zIndex = 3),
                  null == e.pixelHeight && (e.pixelHeight = e.el.offsetHeight),
                  null == e.rowCount &&
                    (e.rowCount = e.pixelHeight / o.layerConfig.lineHeight)
                var n = this.session.getFoldAt(e.row, 0)
                if (((e.$fold = n), n)) {
                  var r = this.session.lineWidgets
                  e.row != n.end.row || r[n.start.row]
                    ? (e.hidden = !0)
                    : (r[n.start.row] = e)
                }
                return (
                  this.session._emit('changeFold', {
                    data: { start: { row: e.row } }
                  }),
                  this.$updateRows(),
                  this.renderWidgets(null, o),
                  this.onWidgetChanged(e),
                  e
                )
              }),
              (this.removeLineWidget = function(e) {
                if (
                  ((e._inDocument = !1),
                  (e.session = null),
                  e.el && e.el.parentNode && e.el.parentNode.removeChild(e.el),
                  e.editor && e.editor.destroy)
                )
                  try {
                    e.editor.destroy()
                  } catch (t) {}
                if (this.session.lineWidgets) {
                  var t = this.session.lineWidgets[e.row]
                  if (t == e)
                    (this.session.lineWidgets[e.row] = e.$oldWidget),
                      e.$oldWidget && this.onWidgetChanged(e.$oldWidget)
                  else
                    for (; t; ) {
                      if (t.$oldWidget == e) {
                        t.$oldWidget = e.$oldWidget
                        break
                      }
                      t = t.$oldWidget
                    }
                }
                this.session._emit('changeFold', {
                  data: { start: { row: e.row } }
                }),
                  this.$updateRows()
              }),
              (this.getWidgetsAtRow = function(e) {
                for (
                  var t = this.session.lineWidgets, o = t && t[e], n = [];
                  o;

                )
                  n.push(o), (o = o.$oldWidget)
                return n
              }),
              (this.onWidgetChanged = function(e) {
                this.session._changedWidgets.push(e),
                  this.editor && this.editor.renderer.updateFull()
              }),
              (this.measureWidgets = function(t, e) {
                var o = this.session._changedWidgets,
                  n = e.layerConfig
                if (o && o.length) {
                  for (var a = Infinity, s = 0, i; s < o.length; s++)
                    if (((i = o[s]), i && i.el && i.session == this.session)) {
                      if (!i._inDocument) {
                        if (this.session.lineWidgets[i.row] != i) continue
                        ;(i._inDocument = !0), e.container.appendChild(i.el)
                      }
                      ;(i.h = i.el.offsetHeight),
                        i.fixedWidth ||
                          ((i.w = i.el.offsetWidth),
                          (i.screenWidth = r(i.w / n.characterWidth)))
                      var l = i.h / n.lineHeight
                      i.coverLine &&
                        ((l -= this.session.getRowLineCount(i.row)),
                        0 > l && (l = 0)),
                        i.rowCount != l &&
                          ((i.rowCount = l), i.row < a && (a = i.row))
                    }
                  a != Infinity &&
                    (this.session._emit('changeFold', {
                      data: { start: { row: a } }
                    }),
                    (this.session.lineWidgetWidth = null)),
                    (this.session._changedWidgets = [])
                }
              }),
              (this.renderWidgets = function(t, e) {
                var o = e.layerConfig,
                  n = this.session.lineWidgets
                if (n) {
                  for (
                    var r = u(this.firstRow, o.firstRow),
                      a = p(this.lastRow, o.lastRow, n.length);
                    0 < r && !n[r];

                  )
                    r--
                  ;(this.firstRow = o.firstRow),
                    (this.lastRow = o.lastRow),
                    (e.$cursorLayer.config = o)
                  for (var s = r, l; s <= a; s++)
                    if (((l = n[s]), l && l.el)) {
                      if (l.hidden) {
                        l.el.style.top = -100 - (l.pixelHeight || 0) + 'px'
                        continue
                      }
                      l._inDocument ||
                        ((l._inDocument = !0), e.container.appendChild(l.el))
                      var d = e.$cursorLayer.getPixelPosition(
                        { row: s, column: 0 },
                        !0
                      ).top
                      l.coverLine ||
                        (d +=
                          o.lineHeight * this.session.getRowLineCount(l.row)),
                        (l.el.style.top = d - o.offset + 'px')
                      var c = l.coverGutter ? 0 : e.gutterWidth
                      l.fixedWidth || (c -= e.scrollLeft),
                        (l.el.style.left = c + 'px'),
                        l.fullWidth &&
                          l.screenWidth &&
                          (l.el.style.minWidth =
                            o.width + 2 * o.padding + 'px'),
                        (l.el.style.right = l.fixedWidth
                          ? e.scrollBar.getWidth() + 'px'
                          : '')
                    }
                }
              })
          }.call(o.prototype),
            (t.LineWidgets = o))
        }
      ),
      ace.define(
        'ace/ext/error_marker',
        [
          'require',
          'exports',
          'module',
          'ace/line_widgets',
          'ace/lib/dom',
          'ace/range'
        ],
        function(e, t) {
          'use strict'
          function o(e, t, o) {
            for (var n = 0, r = e.length - 1; n <= r; ) {
              var a = (n + r) >> 1,
                i = o(t, e[a])
              if (0 < i) n = a + 1
              else if (0 > i) r = a - 1
              else return a
            }
            return -(n + 1)
          }
          function n(e, t, n) {
            var r = e.getAnnotations().sort(s.comparePoints)
            if (r.length) {
              var a = o(r, { row: t, column: -1 }, s.comparePoints)
              0 > a && (a = -a - 1),
                a >= r.length
                  ? (a = 0 < n ? 0 : r.length - 1)
                  : 0 === a && 0 > n && (a = r.length - 1)
              var l = r[a]
              if (l && n) {
                if (l.row === t) {
                  do l = r[(a += n)]
                  while (l && l.row === t)
                  if (!l) return r.slice()
                }
                var d = []
                t = l.row
                do d[0 > n ? 'unshift' : 'push'](l), (l = r[(a += n)])
                while (l && l.row == t)
                return d.length && d
              }
            }
          }
          var r = e('../line_widgets').LineWidgets,
            a = e('../lib/dom'),
            s = e('../range').Range
          ;(t.showErrorMarker = function(e, t) {
            var o = e.session
            o.widgetManager ||
              ((o.widgetManager = new r(o)), o.widgetManager.attach(e))
            var i = e.getCursorPosition(),
              s = i.row,
              l = o.widgetManager.getWidgetsAtRow(s).filter(function(e) {
                return 'errorMarker' == e.type
              })[0]
            l ? l.destroy() : (s -= t)
            var d = n(o, s, t),
              c
            if (d) {
              var u = d[0]
              ;(i.column =
                (u.pos && 'number' != typeof u.column ? u.pos.sc : u.column) ||
                0),
                (i.row = u.row),
                (c = e.renderer.$gutterLayer.$annotations[i.row])
            } else {
              if (l) return
              c = { text: ['Looks good!'], className: 'ace_ok' }
            }
            e.session.unfold(i.row), e.selection.moveToPosition(i)
            var p = {
                row: i.row,
                fixedWidth: !0,
                coverGutter: !0,
                el: a.createElement('div'),
                type: 'errorMarker'
              },
              g = p.el.appendChild(a.createElement('div')),
              h = p.el.appendChild(a.createElement('div'))
            h.className = 'error_widget_arrow ' + c.className
            var m = e.renderer.$cursorLayer.getPixelPosition(i).left
            ;(h.style.left = m + e.renderer.gutterWidth - 5 + 'px'),
              (p.el.className = 'error_widget_wrapper'),
              (g.className = 'error_widget ' + c.className),
              (g.innerHTML = c.text.join('<br>')),
              g.appendChild(a.createElement('div'))
            var f = function(e, t, o) {
              if (0 === t && ('esc' === o || 'return' === o))
                return p.destroy(), { command: 'null' }
            }
            ;(p.destroy = function() {
              e.$mouseHandler.isMousePressed ||
                (e.keyBinding.removeKeyboardHandler(f),
                o.widgetManager.removeLineWidget(p),
                e.off('changeSelection', p.destroy),
                e.off('changeSession', p.destroy),
                e.off('mouseup', p.destroy),
                e.off('change', p.destroy))
            }),
              e.keyBinding.addKeyboardHandler(f),
              e.on('changeSelection', p.destroy),
              e.on('changeSession', p.destroy),
              e.on('mouseup', p.destroy),
              e.on('change', p.destroy),
              e.session.widgetManager.addLineWidget(p),
              (p.el.onmousedown = e.focus.bind(e)),
              e.renderer.scrollCursorIntoView(null, 0.5, {
                bottom: p.el.offsetHeight
              })
          }),
            a.importCssString(
              '    .error_widget_wrapper {        background: inherit;        color: inherit;        border:none    }    .error_widget {        border-top: solid 2px;        border-bottom: solid 2px;        margin: 5px 0;        padding: 10px 40px;        white-space: pre-wrap;    }    .error_widget.ace_error, .error_widget_arrow.ace_error{        border-color: #ff5a5a    }    .error_widget.ace_warning, .error_widget_arrow.ace_warning{        border-color: #F1D817    }    .error_widget.ace_info, .error_widget_arrow.ace_info{        border-color: #5a5a5a    }    .error_widget.ace_ok, .error_widget_arrow.ace_ok{        border-color: #5aaa5a    }    .error_widget_arrow {        position: absolute;        border: solid 5px;        border-top-color: transparent!important;        border-right-color: transparent!important;        border-left-color: transparent!important;        top: -5px;    }',
              ''
            )
        }
      ),
      ace.define(
        'ace/ace',
        [
          'require',
          'exports',
          'module',
          'ace/lib/fixoldbrowsers',
          'ace/lib/dom',
          'ace/lib/event',
          'ace/editor',
          'ace/edit_session',
          'ace/undomanager',
          'ace/virtual_renderer',
          'ace/worker/worker_client',
          'ace/keyboard/hash_handler',
          'ace/placeholder',
          'ace/multi_select',
          'ace/mode/folding/fold_mode',
          'ace/theme/textmate',
          'ace/ext/error_marker',
          'ace/config'
        ],
        function(e, t) {
          'use strict'
          e('./lib/fixoldbrowsers')
          var n = e('./lib/dom'),
            r = e('./lib/event'),
            a = e('./editor').Editor,
            i = e('./edit_session').EditSession,
            s = e('./undomanager').UndoManager,
            l = e('./virtual_renderer').VirtualRenderer
          e('./worker/worker_client'),
            e('./keyboard/hash_handler'),
            e('./placeholder'),
            e('./multi_select'),
            e('./mode/folding/fold_mode'),
            e('./theme/textmate'),
            e('./ext/error_marker'),
            (t.config = e('./config')),
            (t.acequire = e),
            (t.define = o(23)),
            (t.edit = function(e) {
              if ('string' == typeof e) {
                var o = e
                if (((e = document.getElementById(o)), !e))
                  throw new Error("ace.edit can't find div #" + o)
              }
              if (e && e.env && e.env.editor instanceof a) return e.env.editor
              var i = ''
              if (e && /input|textarea/i.test(e.tagName)) {
                var s = e
                ;(i = s.value),
                  (e = n.createElement('pre')),
                  s.parentNode.replaceChild(e, s)
              } else e && ((i = n.getInnerText(e)), (e.innerHTML = ''))
              var d = t.createEditSession(i),
                c = new a(new l(e))
              c.setSession(d)
              var u = {
                document: d,
                editor: c,
                onResize: c.resize.bind(c, null)
              }
              return (
                s && (u.textarea = s),
                r.addListener(window, 'resize', u.onResize),
                c.on('destroy', function() {
                  r.removeListener(window, 'resize', u.onResize),
                    (u.editor.container.env = null)
                }),
                (c.container.env = c.env = u),
                c
              )
            }),
            (t.createEditSession = function(e, t) {
              var o = new i(e, t)
              return o.setUndoManager(new s()), o
            }),
            (t.EditSession = i),
            (t.UndoManager = s),
            (t.version = '1.2.6')
        }
      ),
      (function() {
        ace.acequire(['ace/ace'], function(e) {
          for (var t in (e && (e.config.init(!0), (e.define = ace.define)),
          window.ace || (window.ace = e),
          e))
            e.hasOwnProperty(t) && (window.ace[t] = e[t])
        })
      })(),
      (e.exports = window.ace.acequire('ace/ace'))
  },
  function(e, t, o) {
    ace.define(
      'ace/mode/json_highlight_rules',
      [
        'require',
        'exports',
        'module',
        'ace/lib/oop',
        'ace/mode/text_highlight_rules'
      ],
      function(e, t) {
        'use strict'
        var o = e('../lib/oop'),
          n = e('./text_highlight_rules').TextHighlightRules,
          r = function() {
            this.$rules = {
              start: [
                {
                  token: 'variable',
                  regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
                },
                { token: 'string', regex: '"', next: 'string' },
                { token: 'constant.numeric', regex: '0[xX][0-9a-fA-F]+\\b' },
                {
                  token: 'constant.numeric',
                  regex: '[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b'
                },
                {
                  token: 'constant.language.boolean',
                  regex: '(?:true|false)\\b'
                },
                {
                  token: 'invalid.illegal',
                  regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
                },
                { token: 'invalid.illegal', regex: '\\/\\/.*$' },
                { token: 'paren.lparen', regex: '[[({]' },
                { token: 'paren.rparen', regex: '[\\])}]' },
                { token: 'text', regex: '\\s+' }
              ],
              string: [
                {
                  token: 'constant.language.escape',
                  regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
                },
                { token: 'string', regex: '[^"\\\\]+' },
                { token: 'string', regex: '"', next: 'start' },
                { token: 'string', regex: '', next: 'start' }
              ]
            }
          }
        o.inherits(r, n), (t.JsonHighlightRules = r)
      }
    ),
      ace.define(
        'ace/mode/matching_brace_outdent',
        ['require', 'exports', 'module', 'ace/range'],
        function(e, t) {
          'use strict'
          var o = e('../range').Range,
            n = function() {}
          ;(function() {
            ;(this.checkOutdent = function(e, t) {
              return !!/^\s+$/.test(e) && /^\s*\}/.test(t)
            }),
              (this.autoOutdent = function(e, t) {
                var n = e.getLine(t),
                  r = n.match(/^(\s*\})/)
                if (!r) return 0
                var a = r[1].length,
                  i = e.findMatchingBracket({ row: t, column: a })
                if (!i || i.row == t) return 0
                var s = this.$getIndent(e.getLine(i.row))
                e.replace(new o(t, 0, t, a - 1), s)
              }),
              (this.$getIndent = function(e) {
                return e.match(/^\s*/)[0]
              })
          }.call(n.prototype),
            (t.MatchingBraceOutdent = n))
        }
      ),
      ace.define(
        'ace/mode/folding/cstyle',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/range',
          'ace/mode/folding/fold_mode'
        ],
        function(e, t) {
          'use strict'
          var o = e('../../lib/oop'),
            n = e('../../range').Range,
            r = e('./fold_mode').FoldMode,
            a = (t.FoldMode = function(e) {
              e &&
                ((this.foldingStartMarker = new RegExp(
                  this.foldingStartMarker.source.replace(
                    /\|[^|]*?$/,
                    '|' + e.start
                  )
                )),
                (this.foldingStopMarker = new RegExp(
                  this.foldingStopMarker.source.replace(
                    /\|[^|]*?$/,
                    '|' + e.end
                  )
                )))
            })
          o.inherits(a, r),
            function() {
              ;(this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/),
                (this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/),
                (this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/),
                (this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/),
                (this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/),
                (this._getFoldWidgetBase = this.getFoldWidget),
                (this.getFoldWidget = function(e, t, o) {
                  var n = e.getLine(o)
                  if (
                    this.singleLineBlockCommentRe.test(n) &&
                    !this.startRegionRe.test(n) &&
                    !this.tripleStarBlockCommentRe.test(n)
                  )
                    return ''
                  var r = this._getFoldWidgetBase(e, t, o)
                  return !r && this.startRegionRe.test(n) ? 'start' : r
                }),
                (this.getFoldWidgetRange = function(e, t, o, n) {
                  var r = e.getLine(o)
                  if (this.startRegionRe.test(r))
                    return this.getCommentRegionBlock(e, r, o)
                  var a = r.match(this.foldingStartMarker)
                  if (a) {
                    var s = a.index
                    if (a[1]) return this.openingBracketBlock(e, a[1], o, s)
                    var i = e.getCommentFoldRange(o, s + a[0].length, 1)
                    return (
                      i &&
                        !i.isMultiLine() &&
                        (n
                          ? (i = this.getSectionRange(e, o))
                          : 'all' != t && (i = null)),
                      i
                    )
                  }
                  if ('markbegin' !== t) {
                    var a = r.match(this.foldingStopMarker)
                    if (a) {
                      var s = a.index + a[0].length
                      return a[1]
                        ? this.closingBracketBlock(e, a[1], o, s)
                        : e.getCommentFoldRange(o, s, -1)
                    }
                  }
                }),
                (this.getSectionRange = function(e, t) {
                  var o = e.getLine(t),
                    r = o.search(/\S/),
                    a = t,
                    i = o.length
                  ++t
                  for (var s = t, l = e.getLength(); ++t < l; ) {
                    o = e.getLine(t)
                    var d = o.search(/\S/)
                    if (-1 !== d) {
                      if (r > d) break
                      var c = this.getFoldWidgetRange(e, 'all', t)
                      if (c)
                        if (c.start.row <= a) break
                        else if (c.isMultiLine()) t = c.end.row
                        else if (r == d) break
                      s = t
                    }
                  }
                  return new n(a, i, s, e.getLine(s).length)
                }),
                (this.getCommentRegionBlock = function(e, t, o) {
                  for (
                    var r = t.search(/\s*$/),
                      a = e.getLength(),
                      i = o,
                      s = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,
                      l = 1;
                    ++o < a;

                  ) {
                    t = e.getLine(o)
                    var d = s.exec(t)
                    if (d && (d[1] ? l-- : l++, !l)) break
                  }
                  var c = o
                  if (c > i) return new n(i, r, c, t.length)
                })
            }.call(a.prototype)
        }
      ),
      ace.define(
        'ace/mode/json',
        [
          'require',
          'exports',
          'module',
          'ace/lib/oop',
          'ace/mode/text',
          'ace/mode/json_highlight_rules',
          'ace/mode/matching_brace_outdent',
          'ace/mode/behaviour/cstyle',
          'ace/mode/folding/cstyle',
          'ace/worker/worker_client'
        ],
        function(e, t) {
          'use strict'
          var n = e('../lib/oop'),
            r = e('./text').Mode,
            a = e('./json_highlight_rules').JsonHighlightRules,
            i = e('./matching_brace_outdent').MatchingBraceOutdent,
            s = e('./behaviour/cstyle').CstyleBehaviour,
            l = e('./folding/cstyle').FoldMode,
            d = e('../worker/worker_client').WorkerClient,
            c = function() {
              ;(this.HighlightRules = a),
                (this.$outdent = new i()),
                (this.$behaviour = new s()),
                (this.foldingRules = new l())
            }
          n.inherits(c, r),
            function() {
              ;(this.getNextLineIndent = function(e, t, o) {
                var n = this.$getIndent(t)
                if ('start' == e) {
                  var r = t.match(/^.*[\{\(\[]\s*$/)
                  r && (n += o)
                }
                return n
              }),
                (this.checkOutdent = function(e, t, o) {
                  return this.$outdent.checkOutdent(t, o)
                }),
                (this.autoOutdent = function(e, t, o) {
                  this.$outdent.autoOutdent(t, o)
                }),
                (this.createWorker = function(t) {
                  var e = new d(['ace'], o(324), 'JsonWorker')
                  return (
                    e.attachToDocument(t.getDocument()),
                    e.on('annotate', function(o) {
                      t.setAnnotations(o.data)
                    }),
                    e.on('terminate', function() {
                      t.clearAnnotations()
                    }),
                    e
                  )
                }),
                (this.$id = 'ace/mode/json')
            }.call(c.prototype),
            (t.Mode = c)
        }
      )
  },
  function(e) {
    ;(e.exports.id = 'ace/mode/json_worker'),
      (e.exports.src =
        '"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\x0B\\f\\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\\u2028\\u2029\uFEFF";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});')
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e) {
    e.exports = function e(t, o) {
      'use strict'
      var n = /(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,
        r = /(^[ ]*|[ ]*$)/g,
        a = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
        s = /^0x[0-9a-f]+$/i,
        l = /^0/,
        d = function(t) {
          return (e.insensitive && ('' + t).toLowerCase()) || '' + t
        },
        i = d(t).replace(r, '') || '',
        c = d(o).replace(r, '') || '',
        u = i
          .replace(n, '\0$1\0')
          .replace(/\0$/, '')
          .replace(/^\0/, '')
          .split('\0'),
        p = c
          .replace(n, '\0$1\0')
          .replace(/\0$/, '')
          .replace(/^\0/, '')
          .split('\0'),
        g =
          parseInt(i.match(s), 16) ||
          (1 !== u.length && i.match(a) && Date.parse(i)),
        h =
          parseInt(c.match(s), 16) ||
          (g && c.match(a) && Date.parse(c)) ||
          null,
        m,
        f
      if (h) {
        if (g < h) return -1
        if (g > h) return 1
      }
      for (var y = 0, A = Math.max(u.length, p.length); y < A; y++) {
        if (
          ((m = (!(u[y] || '').match(l) && parseFloat(u[y])) || u[y] || 0),
          (f = (!(p[y] || '').match(l) && parseFloat(p[y])) || p[y] || 0),
          isNaN(m) !== isNaN(f))
        )
          return isNaN(m) ? 1 : -1
        if ((typeof m != typeof f && ((m += ''), (f += '')), m < f)) return -1
        if (m > f) return 1
      }
      return 0
    }
  },
  function(e, t, o) {
    'use strict'
    function n(e) {
      return A.test(e)
    }
    function r(e) {
      function t(e, t) {
        var o
        if ('string' != typeof e) {
          var n = $(e)
          o = n.validate || k(n)
        } else if (((o = F(e)), !o))
          throw new Error('no schema with key or ref "' + e + '"')
        var r = o(t)
        return !0 === o.$async
          ? '*' == L._opts.async
            ? m(r)
            : r
          : ((L.errors = o.errors), r)
      }
      function f(e, t, o, n) {
        if (Array.isArray(e)) {
          for (var r = 0; r < e.length; r++) f(e[r], void 0, o, n)
          return
        }
        ;(t = s.normalizeId(t || e.id)), _(t), (L._schemas[t] = $(e, o, n, !0))
      }
      function w(e, t, o) {
        f(e, t, o, !0)
      }
      function E(e, o) {
        var r = e.$schema || L._opts.defaultMeta || b(),
          a = L._formats.uri
        L._formats.uri = 'function' == typeof a ? n : A
        var i
        try {
          i = t(r, e)
        } finally {
          L._formats.uri = a
        }
        if (!i && o) {
          var s = 'schema is invalid: ' + D()
          if ('log' == L._opts.validateSchema) console.error(s)
          else throw new Error(s)
        }
        return i
      }
      function b() {
        var e = L._opts.meta
        return (
          (L._opts.defaultMeta =
            'object' == typeof e
              ? e.id || e
              : L._opts.v5
                ? p.META_SCHEMA_ID
                : y),
          L._opts.defaultMeta
        )
      }
      function F(e) {
        var t = x(e)
        switch (typeof t) {
          case 'object':
            return t.validate || k(t)
          case 'string':
            return F(t)
          case 'undefined':
            return v(e)
        }
      }
      function v(e) {
        var t = s.schema.call(L, { schema: {} }, e)
        if (t) {
          var o = t.schema,
            n = t.root,
            r = t.baseId,
            i = a.call(L, o, n, void 0, r)
          return (
            (L._fragments[e] = new l({
              ref: e,
              fragment: !0,
              schema: o,
              root: n,
              baseId: r,
              validate: i
            })),
            i
          )
        }
      }
      function x(e) {
        return (
          (e = s.normalizeId(e)), L._schemas[e] || L._refs[e] || L._fragments[e]
        )
      }
      function S(e, t) {
        for (var o in e) {
          var n = e[o]
          n.meta || (t && !t.test(o)) || (L._cache.del(n.jsonStr), delete e[o])
        }
      }
      function $(e, t, o, n) {
        if ('object' != typeof e) throw new Error('schema should be object')
        var r = d(e),
          a = L._cache.get(r)
        if (a) return a
        n = n || !1 !== L._opts.addUsedSchema
        var i = s.normalizeId(e.id)
        i && n && _(i)
        var c = !1 !== L._opts.validateSchema && !t,
          u
        c && !(u = e.id && e.id == e.$schema) && E(e, !0)
        var p = s.ids.call(L, e),
          g = new l({ id: i, schema: e, localRefs: p, jsonStr: r, meta: o })
        return (
          '#' != i[0] && n && (L._refs[i] = g),
          L._cache.put(r, g),
          c && u && E(e, !0),
          g
        )
      }
      function k(e, t) {
        function o() {
          var t = e.validate,
            n = t.apply(null, arguments)
          return (o.errors = t.errors), n
        }
        if (e.compiling)
          return (
            (e.validate = o),
            (o.schema = e.schema),
            (o.errors = null),
            (o.root = t ? t : o),
            !0 === e.schema.$async && (o.$async = !0),
            o
          )
        e.compiling = !0
        var n
        e.meta && ((n = L._opts), (L._opts = L._metaOpts))
        var r
        try {
          r = a.call(L, e.schema, t, e.localRefs)
        } finally {
          ;(e.compiling = !1), e.meta && (L._opts = n)
        }
        return (
          (e.validate = r),
          (e.refs = r.refs),
          (e.refVal = r.refVal),
          (e.root = r.root),
          r
        )
      }
      function D(t, o) {
        if (((t = t || L.errors), !t)) return 'No errors'
        o = o || {}
        for (
          var n = void 0 === o.separator ? ', ' : o.separator,
            r = void 0 === o.dataVar ? 'data' : o.dataVar,
            a = '',
            s = 0,
            i;
          s < t.length;
          s++
        )
          (i = t[s]), i && (a += r + i.dataPath + ' ' + i.message + n)
        return a.slice(0, -n.length)
      }
      function B(e, t) {
        'string' == typeof t && (t = new RegExp(t)), (L._formats[e] = t)
      }
      function _(e) {
        if (L._schemas[e] || L._refs[e])
          throw new Error('schema with key or id "' + e + '" already exists')
      }
      if (!(this instanceof r)) return new r(e)
      var L = this
      ;(e = this._opts = g.copy(e) || {}),
        (this._schemas = {}),
        (this._refs = {}),
        (this._fragments = {}),
        (this._formats = c(e.format)),
        (this._cache = e.cache || new i()),
        (this._loadingSchemas = {}),
        (this._compilations = []),
        (this.RULES = u()),
        (this.validate = t),
        (this.compile = function(e, t) {
          var o = $(e, void 0, t)
          return o.validate || k(o)
        }),
        (this.addSchema = f),
        (this.addMetaSchema = w),
        (this.validateSchema = E),
        (this.getSchema = F),
        (this.removeSchema = function(e) {
          if (e instanceof RegExp) return S(L._schemas, e), void S(L._refs, e)
          switch (typeof e) {
            case 'undefined':
              return S(L._schemas), S(L._refs), void L._cache.clear()
            case 'string':
              var t = x(e)
              return (
                t && L._cache.del(t.jsonStr),
                delete L._schemas[e],
                void delete L._refs[e]
              )
            case 'object':
              var o = d(e)
              L._cache.del(o)
              var n = e.id
              n &&
                ((n = s.normalizeId(n)),
                delete L._schemas[n],
                delete L._refs[n])
          }
        }),
        (this.addFormat = B),
        (this.errorsText = D),
        (this._addSchema = $),
        (this._compile = k),
        (e.loopRequired = e.loopRequired || Infinity),
        (e.async || e.transpile) && h.setup(e),
        !0 === e.beautify && (e.beautify = { indent_size: 2 }),
        'property' == e.errorDataPath && (e._errorDataPathProperty = !0),
        (this._metaOpts = (function() {
          for (var e = g.copy(L._opts), t = 0; t < C.length; t++) delete e[C[t]]
          return e
        })()),
        e.formats &&
          (function() {
            for (var e in L._opts.formats) {
              var t = L._opts.formats[e]
              B(e, t)
            }
          })(),
        (function() {
          if (!1 !== L._opts.meta) {
            var e = o(366)
            w(e, y, !0), (L._refs['http://json-schema.org/schema'] = y)
          }
        })(),
        e.v5 && p.enable(this),
        'object' == typeof e.meta && w(e.meta),
        (function() {
          var e = L._opts.schemas
          if (e)
            if (Array.isArray(e)) f(e)
            else for (var t in e) f(e[t], t)
        })()
    }
    var a = o(343),
      s = o(101),
      i = o(339),
      l = o(102),
      d = o(44),
      c = o(342),
      u = o(344),
      p = o(368),
      g = o(10),
      h = o(99),
      m = o(93)
    ;(e.exports = r), (r.prototype.compileAsync = h.compile)
    var f = o(365)
    ;(r.prototype.addKeyword = f.add),
      (r.prototype.getKeyword = f.get),
      (r.prototype.removeKeyword = f.remove),
      (r.ValidationError = o(103))
    var y = 'http://json-schema.org/draft-04/schema',
      A = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,
      C = ['removeAdditional', 'useDefaults', 'coerceTypes']
  },
  function(e) {
    'use strict'
    var t = (e.exports = function() {
      this._cache = {}
    })
    ;(t.prototype.put = function(e, t) {
      this._cache[e] = t
    }),
      (t.prototype.get = function(e) {
        return this._cache[e]
      }),
      (t.prototype.del = function(e) {
        delete this._cache[e]
      }),
      (t.prototype.clear = function() {
        this._cache = {}
      })
  },
  function(e) {
    function t(e) {
      throw new Error("Cannot find module '" + e + "'.")
    }
    ;(t.keys = function() {
      return []
    }),
      (t.resolve = t),
      (e.exports = t),
      (t.id = 340)
  },
  function(e, t, o) {
    'use strict'
    e.exports = {
      $ref: o(361),
      allOf: o(347),
      anyOf: o(348),
      dependencies: o(351),
      enum: o(352),
      format: o(353),
      items: o(354),
      maximum: o(104),
      minimum: o(104),
      maxItems: o(105),
      minItems: o(105),
      maxLength: o(106),
      minLength: o(106),
      maxProperties: o(107),
      minProperties: o(107),
      multipleOf: o(355),
      not: o(356),
      oneOf: o(357),
      pattern: o(358),
      properties: o(360),
      required: o(362),
      uniqueItems: o(364),
      validate: o(108)
    }
  },
  function(e, t, o) {
    'use strict'
    function n(e) {
      e = 'full' == e ? 'full' : 'fast'
      var t = d.copy(n[e])
      for (var o in n.compare) t[o] = { validate: t[o], compare: n.compare[o] }
      return t
    }
    function r(e) {
      var t = e.match(c)
      if (!t) return !1
      var o = +t[1],
        n = +t[2]
      return 1 <= o && 12 >= o && 1 <= n && n <= u[o]
    }
    function a(e, t) {
      var o = e.match(p)
      if (!o) return !1
      var n = o[1],
        r = o[2],
        a = o[3],
        i = o[5]
      return 23 >= n && 59 >= r && 59 >= a && (!t || i)
    }
    function i(e) {
      try {
        return new RegExp(e), !0
      } catch (t) {
        return !1
      }
    }
    function s(e, t) {
      return e && t ? (e > t ? 1 : e < t ? -1 : e === t ? 0 : void 0) : void 0
    }
    function l(e, t) {
      if (e && t)
        return ((e = e.match(p)), (t = t.match(p)), !!(e && t))
          ? ((e = e[1] + e[2] + e[3] + (e[4] || '')),
            (t = t[1] + t[2] + t[3] + (t[4] || '')),
            e > t ? 1 : e < t ? -1 : e === t ? 0 : void 0)
          : void 0
    }
    var d = o(10),
      c = /^\d\d\d\d-(\d\d)-(\d\d)$/,
      u = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
      p = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,
      g = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,
      h = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,
      m = /^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
      f = /^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
      y = /^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/
    ;(e.exports = n),
      (n.fast = {
        date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
        time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
        'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,
        uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,
        email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,
        hostname: g,
        ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
        ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
        regex: i,
        uuid: m,
        'json-pointer': f,
        'relative-json-pointer': y
      }),
      (n.full = {
        date: r,
        time: a,
        'date-time': function(e) {
          var t = e.split(A)
          return 2 == t.length && r(t[0]) && a(t[1], !0)
        },
        uri: function(e) {
          return C.test(e) && h.test(e)
        },
        email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
        hostname: function(e) {
          return 255 >= e.length && g.test(e)
        },
        ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
        ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
        regex: i,
        uuid: m,
        'json-pointer': f,
        'relative-json-pointer': y
      }),
      (n.compare = {
        date: s,
        time: l,
        'date-time': function(e, t) {
          if (e && t) {
            ;(e = e.split(A)), (t = t.split(A))
            var o = s(e[0], t[0])
            return void 0 === o ? void 0 : o || l(e[1], t[1])
          }
        }
      })
    var A = /t|\s/i,
      C = /\/|\:/
  },
  function(e, t, o) {
    'use strict'
    function n() {
      if (b == void 0) {
        try {
          b = !(function() {
            var t = new Error('Cannot find module "."')
            throw ((t.code = 'MODULE_NOT_FOUND'), t)
          })().js_beautify
        } catch (t) {
          b = !1
        }
      }
    }
    function r(e, t, o, s) {
      function F() {
        var e = U.validate,
          t = e.apply(null, arguments)
        return (F.errors = e.errors), t
      }
      function x(e, o, a, i) {
        var s = !o || (o && o.schema == e)
        if (o.schema != t.schema) return r.call(R, e, o, a, i)
        var m = !0 === e.$async
        m && !P.transpile && f.setup(P)
        var v = y({
          isTop: !0,
          schema: e,
          isRoot: s,
          baseId: i,
          root: o,
          schemaPath: '',
          errSchemaPath: '#',
          errorPath: '""',
          RULES: K,
          validate: y,
          util: h,
          resolve: g,
          resolveRef: S,
          usePattern: B,
          useDefault: _,
          useCustomRule: L,
          opts: P,
          formats: z,
          self: R
        })
        ;(v = p(T, c) + p(O, l) + p(I, d) + p(W, u) + v),
          P.beautify &&
            (n(),
            b
              ? (v = b(v, P.beautify))
              : console.error(
                  '"npm install js-beautify" to use beautify option'
                ))
        var F = P._transpileFunc,
          x,
          $
        try {
          $ = m && F ? F(v) : v
          var k = new Function(
            'self',
            'RULES',
            'formats',
            'root',
            'refVal',
            'defaults',
            'customRules',
            'co',
            'equal',
            'ucs2length',
            'ValidationError',
            $
          )
          ;(x = k(R, K, z, t, T, I, W, A, w, C, E)), (T[0] = x)
        } catch (t) {
          throw (console.error('Error compiling schema, function code:', $), t)
        }
        return (
          (x.schema = e),
          (x.errors = null),
          (x.refs = M),
          (x.refVal = T),
          (x.root = s ? x : o),
          m && (x.$async = !0),
          H && (x.sourceCode = v),
          !0 === P.sourceCode && (x.source = { patterns: O, defaults: I }),
          x
        )
      }
      function S(e, n, a) {
        n = g.url(e, n)
        var i = M[n],
          s,
          l
        if (void 0 !== i) return (s = T[i]), (l = 'refVal[' + i + ']'), D(s, l)
        if (!a && t.refs) {
          var d = t.refs[n]
          if (void 0 !== d) return (s = t.refVal[d]), (l = $(n, s)), D(s, l)
        }
        l = $(n)
        var c = g.call(R, x, t, n)
        if (!c) {
          var u = o && o[n]
          u && (c = g.inlineRef(u, P.inlineRefs) ? u : r.call(R, u, t, o, e))
        }
        return c ? (k(n, c), D(c, l)) : void 0
      }
      function $(e, t) {
        var o = T.length
        return (T[o] = t), (M[e] = o), 'refVal' + o
      }
      function k(e, t) {
        var o = M[e]
        T[o] = t
      }
      function D(e, t) {
        return 'object' == typeof e
          ? { code: t, schema: e, inline: !0 }
          : { code: t, $async: e && e.$async }
      }
      function B(e) {
        var t = N[e]
        return (
          void 0 === t && ((t = N[e] = O.length), (O[t] = e)), 'pattern' + t
        )
      }
      function _(e) {
        switch (typeof e) {
          case 'boolean':
          case 'number':
            return '' + e
          case 'string':
            return h.toQuotedString(e)
          case 'object':
            if (null === e) return 'null'
            var t = m(e),
              o = j[t]
            return (
              void 0 === o && ((o = j[t] = I.length), (I[o] = e)), 'default' + o
            )
        }
      }
      function L(e, t, o, n) {
        var r = e.definition.validateSchema
        if (r && !1 !== R._opts.validateSchema) {
          var a = r(t)
          if (!a) {
            var i = 'keyword schema is invalid: ' + R.errorsText(r.errors)
            if ('log' == R._opts.validateSchema) console.error(i)
            else throw new Error(i)
          }
        }
        var s = e.definition.compile,
          l = e.definition.inline,
          d = e.definition.macro,
          c
        s
          ? (c = s.call(R, t, o, n))
          : d
            ? ((c = d.call(R, t, o, n)),
              !1 !== P.validateSchema && R.validateSchema(c, !0))
            : l
              ? (c = l.call(R, n, e.keyword, t, o))
              : (c = e.definition.validate)
        var u = W.length
        return (W[u] = c), { code: 'customRule' + u, validate: c }
      }
      var R = this,
        P = this._opts,
        T = [void 0],
        M = {},
        O = [],
        N = {},
        I = [],
        j = {},
        W = [],
        H = !1 !== P.sourceCode
      t = t || { schema: e, refVal: T, refs: M }
      var V = a.call(this, e, t, s),
        U = this._compilations[V.index]
      if (V.compiling) return (U.callValidate = F)
      var z = this._formats,
        K = this.RULES
      try {
        var G = x(e, t, o, s)
        U.validate = G
        var v = U.callValidate
        return (
          v &&
            ((v.schema = G.schema),
            (v.errors = null),
            (v.refs = G.refs),
            (v.refVal = G.refVal),
            (v.root = G.root),
            (v.$async = G.$async),
            H && (v.sourceCode = G.sourceCode)),
          G
        )
      } finally {
        i.call(this, e, t, s)
      }
    }
    function a(e, t, o) {
      var n = s.call(this, e, t, o)
      return 0 <= n
        ? { index: n, compiling: !0 }
        : ((n = this._compilations.length),
          (this._compilations[n] = { schema: e, root: t, baseId: o }),
          { index: n, compiling: !1 })
    }
    function i(e, t, o) {
      var n = s.call(this, e, t, o)
      0 <= n && this._compilations.splice(n, 1)
    }
    function s(e, t, o) {
      for (var n = 0, r; n < this._compilations.length; n++)
        if (
          ((r = this._compilations[n]),
          r.schema == e && r.root == t && r.baseId == o)
        )
          return n
      return -1
    }
    function l(e, t) {
      return (
        'var pattern' + e + ' = new RegExp(' + h.toQuotedString(t[e]) + ');'
      )
    }
    function d(e) {
      return 'var default' + e + ' = defaults[' + e + '];'
    }
    function c(e, t) {
      return t[e] ? 'var refVal' + e + ' = refVal[' + e + '];' : ''
    }
    function u(e) {
      return 'var customRule' + e + ' = customRules[' + e + '];'
    }
    function p(e, t) {
      if (!e.length) return ''
      for (var o = '', n = 0; n < e.length; n++) o += t(n, e)
      return o
    }
    var g = o(101),
      h = o(10),
      m = o(44),
      f = o(99),
      y = o(108),
      A = o(93),
      C = h.ucs2length,
      w = o(100),
      E = o(103),
      b
    e.exports = r
  },
  function(e, t, o) {
    'use strict'
    var n = o(341),
      r = o(10).toHash
    e.exports = function() {
      var e = [
          { type: 'number', rules: ['maximum', 'minimum', 'multipleOf'] },
          {
            type: 'string',
            rules: ['maxLength', 'minLength', 'pattern', 'format']
          },
          {
            type: 'array',
            rules: ['maxItems', 'minItems', 'uniqueItems', 'items']
          },
          {
            type: 'object',
            rules: [
              'maxProperties',
              'minProperties',
              'required',
              'dependencies',
              'properties'
            ]
          },
          { rules: ['$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf'] }
        ],
        t = ['type', 'additionalProperties', 'patternProperties']
      return (
        (e.all = r(t)),
        e.forEach(function(o) {
          o.rules = o.rules.map(function(o) {
            t.push(o)
            var r = (e.all[o] = { keyword: o, code: n[o] })
            return r
          })
        }),
        (e.keywords = r(
          t.concat([
            'additionalItems',
            '$schema',
            'id',
            'title',
            'description',
            'default'
          ])
        )),
        (e.types = r([
          'number',
          'integer',
          'string',
          'array',
          'object',
          'boolean',
          'null'
        ])),
        (e.custom = {}),
        e
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e) {
      for (var t = 0, o = e.length, n = 0, r; n < o; )
        t++,
          (r = e.charCodeAt(n++)),
          55296 <= r &&
            56319 >= r &&
            n < o &&
            ((r = e.charCodeAt(n)), 56320 == (64512 & r) && n++)
      return t
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u
      if (((o += 'var ' + c + ' = undefined;'), !1 === e.opts.format))
        return (o += ' ' + c + ' = true; '), o
      var p = e.schema.format,
        g = e.opts.v5 && p.$data,
        h = ''
      if (g) {
        var m = e.util.getData(p.$data, r, e.dataPathArr),
          f = 'format' + n,
          y = 'compare' + n
        o +=
          ' var ' +
          f +
          ' = formats[' +
          m +
          '] , ' +
          y +
          ' = ' +
          f +
          ' && ' +
          f +
          '.compare;'
      } else {
        var f = e.formats[p]
        if (!(f && f.compare)) return (o += '  ' + c + ' = true; '), o
        var y = 'formats' + e.util.getProperty(p) + '.compare'
      }
      var A = 'formatMaximum' == t,
        C = 'formatExclusive' + (A ? 'Maximum' : 'Minimum'),
        w = e.schema[C],
        E = e.opts.v5 && w && w.$data,
        b = A ? '<' : '>',
        v = 'result' + n,
        F = e.opts.v5 && a && a.$data,
        x
      if (
        (F
          ? ((o +=
              ' var schema' +
              n +
              ' = ' +
              e.util.getData(a.$data, r, e.dataPathArr) +
              '; '),
            (x = 'schema' + n))
          : (x = a),
        E)
      ) {
        var S = e.util.getData(w.$data, r, e.dataPathArr),
          $ = 'exclusive' + n,
          k = 'op' + n,
          D = "' + " + k + " + '"
        ;(o += ' var schemaExcl' + n + ' = ' + S + '; '),
          (S = 'schemaExcl' + n),
          (o +=
            ' if (typeof ' +
            S +
            " != 'boolean' && " +
            S +
            ' !== undefined) { ' +
            c +
            ' = false; ')
        var u = C,
          B = B || []
        B.push(o),
          (o = ''),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: '" +
                (u || '_formatExclusiveLimit') +
                "' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                ' , params: {} '),
              !1 !== e.opts.messages &&
                (o += " , message: '" + C + " should be boolean' "),
              e.opts.verbose &&
                (o +=
                  ' , schema: validate.schema' +
                  i +
                  ' , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  d +
                  ' '),
              (o += ' } '))
        var _ = o
        ;(o = B.pop()),
          (o +=
            !e.compositeRule && l
              ? e.async
                ? ' throw new ValidationError([' + _ + ']); '
                : ' validate.errors = [' + _ + ']; return false; '
              : ' var err = ' +
                _ +
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
          (o += ' }  '),
          l && ((h += '}'), (o += ' else { ')),
          F &&
            ((o +=
              ' if (' +
              x +
              ' === undefined) ' +
              c +
              ' = true; else if (typeof ' +
              x +
              " != 'string') " +
              c +
              ' = false; else { '),
            (h += '}')),
          g &&
            ((o += ' if (!' + y + ') ' + c + ' = true; else { '), (h += '}')),
          (o += ' var ' + v + ' = ' + y + '(' + d + ',  '),
          (o += F ? '' + x : '' + e.util.toQuotedString(a)),
          (o +=
            ' ); if (' +
            v +
            ' === undefined) ' +
            c +
            ' = false; var ' +
            $ +
            ' = ' +
            S +
            ' === true; if (' +
            c +
            ' === undefined) { ' +
            c +
            ' = ' +
            $ +
            ' ? ' +
            v +
            ' ' +
            b +
            ' 0 : ' +
            v +
            ' ' +
            b +
            '= 0; } if (!' +
            c +
            ') var op' +
            n +
            ' = ' +
            $ +
            " ? '" +
            b +
            "' : '" +
            b +
            "=';")
      } else {
        var $ = !0 === w,
          D = b
        $ || (D += '=')
        var k = "'" + D + "'"
        F &&
          ((o +=
            ' if (' +
            x +
            ' === undefined) ' +
            c +
            ' = true; else if (typeof ' +
            x +
            " != 'string') " +
            c +
            ' = false; else { '),
          (h += '}')),
          g &&
            ((o += ' if (!' + y + ') ' + c + ' = true; else { '), (h += '}')),
          (o += ' var ' + v + ' = ' + y + '(' + d + ',  '),
          (o += F ? '' + x : '' + e.util.toQuotedString(a)),
          (o +=
            ' ); if (' +
            v +
            ' === undefined) ' +
            c +
            ' = false; if (' +
            c +
            ' === undefined) ' +
            c +
            ' = ' +
            v +
            ' ' +
            b),
          $ || (o += '='),
          (o += ' 0;')
      }
      o += '' + h + 'if (!' + c + ') { '
      var u = t,
        B = B || []
      B.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: '" +
              (u || '_formatLimit') +
              "' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { comparison: ' +
              k +
              ', limit:  '),
            (o += F ? '' + x : '' + e.util.toQuotedString(a)),
            (o += ' , exclusive: ' + $ + ' } '),
            !1 !== e.opts.messages &&
              ((o += " , message: 'should be " + D + ' "'),
              (o += F ? "' + " + x + " + '" : '' + e.util.escapeQuotes(a)),
              (o += '"\' ')),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += F ? 'validate.schema' + i : '' + e.util.toQuotedString(a)),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var _ = o
      return (
        (o = B.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + _ + ']); '
              : ' validate.errors = [' + _ + ']; return false; '
            : ' var err = ' +
              _ +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += '}'),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.schema[t],
        r = e.schemaPath + e.util.getProperty(t),
        a = e.errSchemaPath + '/' + t,
        i = !e.opts.allErrors,
        s = e.util.copy(e),
        l = ''
      s.level++
      var d = 'valid' + s.level,
        c = s.baseId,
        u = !0,
        p = n
      if (p)
        for (var g = -1, h = p.length - 1, m; g < h; )
          (m = p[(g += 1)]),
            e.util.schemaHasRules(m, e.RULES.all) &&
              ((u = !1),
              (s.schema = m),
              (s.schemaPath = r + '[' + g + ']'),
              (s.errSchemaPath = a + '/' + g),
              (o += '  ' + e.validate(s) + ' '),
              (s.baseId = c),
              i && ((o += ' if (' + d + ') { '), (l += '}')))
      return (
        i && (u ? (o += ' if (true) { ') : (o += ' ' + l.slice(0, -1) + ' ')),
        (o = e.util.cleanUpCode(o)),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'valid' + n,
        c = 'errs__' + n,
        u = e.util.copy(e),
        p = ''
      u.level++
      var g = 'valid' + u.level,
        h = a.every(function(t) {
          return e.util.schemaHasRules(t, e.RULES.all)
        })
      if (h) {
        var m = u.baseId
        o += ' var ' + c + ' = errors; var ' + d + ' = false;  '
        var f = e.compositeRule
        e.compositeRule = u.compositeRule = !0
        var y = a
        if (y)
          for (var A = -1, C = y.length - 1, w; A < C; )
            (w = y[(A += 1)]),
              (u.schema = w),
              (u.schemaPath = i + '[' + A + ']'),
              (u.errSchemaPath = s + '/' + A),
              (o += '  ' + e.validate(u) + ' '),
              (u.baseId = m),
              (o += ' ' + d + ' = ' + d + ' || ' + g + '; if (!' + d + ') { '),
              (p += '}')
        ;(e.compositeRule = u.compositeRule = f),
          (o += ' ' + p + ' if (!' + d + ') {  var err =   '),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: 'anyOf' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                ' , params: {} '),
              !1 !== e.opts.messages &&
                (o += " , message: 'should match some schema in anyOf' "),
              e.opts.verbose &&
                (o +=
                  ' , schema: validate.schema' +
                  i +
                  ' , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  ('data' + (r || '')) +
                  ' '),
              (o += ' } ')),
          (o +=
            ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else {  errors = ' +
            c +
            '; if (vErrors !== null) { if (' +
            c +
            ') vErrors.length = ' +
            c +
            '; else vErrors = null; } '),
          e.opts.allErrors && (o += ' } '),
          (o = e.util.cleanUpCode(o))
      } else l && (o += ' if (true) { ')
      return o
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = e.opts.v5 && a && a.$data,
        p
      u
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a),
        u || (o += ' var schema' + n + ' = validate.schema' + i + ';'),
        (o +=
          'var ' +
          c +
          ' = equal(' +
          d +
          ', schema' +
          n +
          '); if (!' +
          c +
          ') {   ')
      var g = g || []
      g.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: 'constant' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: {} '),
            !1 !== e.opts.messages &&
              (o += " , message: 'should be equal to constant' "),
            e.opts.verbose &&
              (o +=
                ' , schema: validate.schema' +
                i +
                ' , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' '),
            (o += ' } '))
      var h = o
      return (
        (o = g.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + h + ']); '
              : ' validate.errors = [' + h + ']; return false; '
            : ' var err = ' +
              h +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += ' }'),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = 'errs__' + n,
        p = e.opts.v5 && a && a.$data,
        g,
        h
      p
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (h = 'schema' + n))
        : (h = a)
      var m = this,
        f = 'definition' + n,
        y = m.definition,
        A,
        C,
        w,
        E,
        b
      if (p && y.$data) {
        b = 'keywordValidate' + n
        var v = y.validateSchema
        o +=
          ' var ' +
          f +
          " = RULES.custom['" +
          t +
          "'].definition; var " +
          b +
          ' = ' +
          f +
          '.validate;'
      } else
        (E = e.useCustomRule(m, a, e.schema, e)),
          (h = 'validate.schema' + i),
          (b = E.code),
          (A = y.compile),
          (C = y.inline),
          (w = y.macro)
      var F = b + '.errors',
        x = 'i' + n,
        S = 'ruleErr' + n,
        $ = y.async
      if ($ && !e.async) throw new Error('async keyword in sync schema')
      if (
        (C || w || (o += '' + F + ' = null;'),
        (o += 'var ' + u + ' = errors;var ' + c + ';'),
        v &&
          (o +=
            ' ' +
            c +
            ' = ' +
            f +
            '.validateSchema(' +
            h +
            '); if (' +
            c +
            ') {'),
        C)
      )
        o += y.statements
          ? ' ' + E.validate + ' '
          : ' ' + c + ' = ' + E.validate + '; '
      else if (w) {
        var k = e.util.copy(e)
        k.level++
        var D = 'valid' + k.level
        ;(k.schema = E.validate), (k.schemaPath = '')
        var B = e.compositeRule
        e.compositeRule = k.compositeRule = !0
        var _ = e.validate(k).replace(/validate\.schema/g, b)
        ;(e.compositeRule = k.compositeRule = B), (o += ' ' + _)
      } else {
        var L = L || []
        L.push(o),
          (o = ''),
          (o += '  ' + b + '.call( '),
          (o += e.opts.passContext ? 'this' : 'self'),
          (o +=
            A || !1 === y.schema
              ? ' , ' + d + ' '
              : ' , ' +
                h +
                ' , ' +
                d +
                ' , validate.schema' +
                e.schemaPath +
                ' '),
          (o += " , (dataPath || '')"),
          '""' != e.errorPath && (o += ' + ' + e.errorPath)
        var R = r ? 'data' + (r - 1 || '') : 'parentData',
          P = r ? e.dataPathArr[r] : 'parentDataProperty'
        o += ' , ' + R + ' , ' + P + ' , rootData )  '
        var T = o
        ;(o = L.pop()),
          !1 === y.errors
            ? ((o += ' ' + c + ' = '),
              $ && (o += '' + e.yieldAwait),
              (o += '' + T + '; '))
            : $
              ? ((F = 'customErrors' + n),
                (o +=
                  ' var ' +
                  F +
                  ' = null; try { ' +
                  c +
                  ' = ' +
                  e.yieldAwait +
                  T +
                  '; } catch (e) { ' +
                  c +
                  ' = false; if (e instanceof ValidationError) ' +
                  F +
                  ' = e.errors; else throw e; } '))
              : (o += ' ' + F + ' = null; ' + c + ' = ' + T + '; ')
      }
      if (
        (y.modifying && (o += ' ' + d + ' = ' + R + '[' + P + '];'),
        v && (o += ' }'),
        y.valid)
      )
        l && (o += ' if (true) { ')
      else {
        ;(o += ' if ( '),
          void 0 === y.valid
            ? ((o += ' !'), (o += w ? '' + D : '' + c))
            : (o += ' ' + !y.valid + ' '),
          (o += ') { '),
          (g = m.keyword)
        var L = L || []
        L.push(o), (o = '')
        var L = L || []
        L.push(o),
          (o = ''),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: '" +
                (g || 'custom') +
                "' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                " , params: { keyword: '" +
                m.keyword +
                "' } "),
              !1 !== e.opts.messages &&
                (o +=
                  ' , message: \'should pass "' +
                  m.keyword +
                  '" keyword validation\' '),
              e.opts.verbose &&
                (o +=
                  ' , schema: validate.schema' +
                  i +
                  ' , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  d +
                  ' '),
              (o += ' } '))
        var M = o
        ;(o = L.pop()),
          (o +=
            !e.compositeRule && l
              ? e.async
                ? ' throw new ValidationError([' + M + ']); '
                : ' validate.errors = [' + M + ']; return false; '
              : ' var err = ' +
                M +
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ')
        var O = o
        ;(o = L.pop()),
          C
            ? y.errors
              ? 'full' != y.errors &&
                ((o +=
                  '  for (var ' +
                  x +
                  '=' +
                  u +
                  '; ' +
                  x +
                  '<errors; ' +
                  x +
                  '++) { var ' +
                  S +
                  ' = vErrors[' +
                  x +
                  ']; if (' +
                  S +
                  '.dataPath === undefined) ' +
                  S +
                  ".dataPath = (dataPath || '') + " +
                  e.errorPath +
                  '; if (' +
                  S +
                  '.schemaPath === undefined) { ' +
                  S +
                  '.schemaPath = "' +
                  s +
                  '"; } '),
                e.opts.verbose &&
                  (o +=
                    ' ' +
                    S +
                    '.schema = ' +
                    h +
                    '; ' +
                    S +
                    '.data = ' +
                    d +
                    '; '),
                (o += ' } '))
              : !1 === y.errors
                ? (o += ' ' + O + ' ')
                : ((o +=
                    ' if (' +
                    u +
                    ' == errors) { ' +
                    O +
                    ' } else {  for (var ' +
                    x +
                    '=' +
                    u +
                    '; ' +
                    x +
                    '<errors; ' +
                    x +
                    '++) { var ' +
                    S +
                    ' = vErrors[' +
                    x +
                    ']; if (' +
                    S +
                    '.dataPath === undefined) ' +
                    S +
                    ".dataPath = (dataPath || '') + " +
                    e.errorPath +
                    '; if (' +
                    S +
                    '.schemaPath === undefined) { ' +
                    S +
                    '.schemaPath = "' +
                    s +
                    '"; } '),
                  e.opts.verbose &&
                    (o +=
                      ' ' +
                      S +
                      '.schema = ' +
                      h +
                      '; ' +
                      S +
                      '.data = ' +
                      d +
                      '; '),
                  (o += ' } } '))
            : w
              ? ((o += '   var err =   '),
                !1 === e.createErrors
                  ? (o += ' {} ')
                  : ((o +=
                      " { keyword: '" +
                      (g || 'custom') +
                      "' , dataPath: (dataPath || '') + " +
                      e.errorPath +
                      ' , schemaPath: ' +
                      e.util.toQuotedString(s) +
                      " , params: { keyword: '" +
                      m.keyword +
                      "' } "),
                    !1 !== e.opts.messages &&
                      (o +=
                        ' , message: \'should pass "' +
                        m.keyword +
                        '" keyword validation\' '),
                    e.opts.verbose &&
                      (o +=
                        ' , schema: validate.schema' +
                        i +
                        ' , parentSchema: validate.schema' +
                        e.schemaPath +
                        ' , data: ' +
                        d +
                        ' '),
                    (o += ' } ')),
                (o +=
                  ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
                !e.compositeRule &&
                  l &&
                  (e.async
                    ? (o += ' throw new ValidationError(vErrors); ')
                    : (o += ' validate.errors = vErrors; return false; ')))
              : !1 === y.errors
                ? (o += ' ' + O + ' ')
                : ((o +=
                    ' if (Array.isArray(' +
                    F +
                    ')) { if (vErrors === null) vErrors = ' +
                    F +
                    '; else vErrors = vErrors.concat(' +
                    F +
                    '); errors = vErrors.length;  for (var ' +
                    x +
                    '=' +
                    u +
                    '; ' +
                    x +
                    '<errors; ' +
                    x +
                    '++) { var ' +
                    S +
                    ' = vErrors[' +
                    x +
                    ']; if (' +
                    S +
                    '.dataPath === undefined) ' +
                    S +
                    ".dataPath = (dataPath || '') + " +
                    e.errorPath +
                    ';  ' +
                    S +
                    '.schemaPath = "' +
                    s +
                    '";  '),
                  e.opts.verbose &&
                    (o +=
                      ' ' +
                      S +
                      '.schema = ' +
                      h +
                      '; ' +
                      S +
                      '.data = ' +
                      d +
                      '; '),
                  (o += ' } } else { ' + O + ' } ')),
          (o += ' } '),
          l && (o += ' else { ')
      }
      return o
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'errs__' + n,
        u = e.util.copy(e),
        p = ''
      u.level++
      var g = 'valid' + u.level,
        h = {},
        m = {}
      for (C in a) {
        var f = a[C],
          y = Array.isArray(f) ? m : h
        y[C] = f
      }
      o += 'var ' + c + ' = errors;'
      var A = e.errorPath
      for (var C in ((o += 'var missing' + n + ';'), m)) {
        if (
          ((y = m[C]),
          (o += ' if (' + d + e.util.getProperty(C) + ' !== undefined '),
          l)
        ) {
          o += ' && ( '
          var w = y
          if (w)
            for (var E = -1, b = w.length - 1, v; E < b; ) {
              ;(v = w[(E += 1)]), E && (o += ' || ')
              var F = e.util.getProperty(v)
              o +=
                ' ( ' +
                d +
                F +
                ' === undefined && (missing' +
                n +
                ' = ' +
                e.util.toQuotedString(e.opts.jsonPointers ? v : F) +
                ') ) '
            }
          o += ')) {  '
          var x = 'missing' + n,
            S = "' + " + x + " + '"
          e.opts._errorDataPathProperty &&
            (e.errorPath = e.opts.jsonPointers
              ? e.util.getPathExpr(A, x, !0)
              : A + ' + ' + x)
          var $ = $ || []
          $.push(o),
            (o = ''),
            !1 === e.createErrors
              ? (o += ' {} ')
              : ((o +=
                  " { keyword: 'dependencies' , dataPath: (dataPath || '') + " +
                  e.errorPath +
                  ' , schemaPath: ' +
                  e.util.toQuotedString(s) +
                  " , params: { property: '" +
                  e.util.escapeQuotes(C) +
                  "', missingProperty: '" +
                  S +
                  "', depsCount: " +
                  y.length +
                  ", deps: '" +
                  e.util.escapeQuotes(1 == y.length ? y[0] : y.join(', ')) +
                  "' } "),
                !1 !== e.opts.messages &&
                  ((o += " , message: 'should have "),
                  (o +=
                    1 == y.length
                      ? 'property ' + e.util.escapeQuotes(y[0])
                      : 'properties ' + e.util.escapeQuotes(y.join(', '))),
                  (o +=
                    ' when property ' +
                    e.util.escapeQuotes(C) +
                    " is present' ")),
                e.opts.verbose &&
                  (o +=
                    ' , schema: validate.schema' +
                    i +
                    ' , parentSchema: validate.schema' +
                    e.schemaPath +
                    ' , data: ' +
                    d +
                    ' '),
                (o += ' } '))
          var k = o
          ;(o = $.pop()),
            (o +=
              !e.compositeRule && l
                ? e.async
                  ? ' throw new ValidationError([' + k + ']); '
                  : ' validate.errors = [' + k + ']; return false; '
                : ' var err = ' +
                  k +
                  ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ')
        } else {
          o += ' ) { '
          var D = y
          if (D)
            for (var B = -1, _ = D.length - 1, L; B < _; ) {
              L = D[(B += 1)]
              var F = e.util.getProperty(L),
                S = e.util.escapeQuotes(L)
              e.opts._errorDataPathProperty &&
                (e.errorPath = e.util.getPath(A, L, e.opts.jsonPointers)),
                (o += ' if (' + d + F + ' === undefined) {  var err =   '),
                !1 === e.createErrors
                  ? (o += ' {} ')
                  : ((o +=
                      " { keyword: 'dependencies' , dataPath: (dataPath || '') + " +
                      e.errorPath +
                      ' , schemaPath: ' +
                      e.util.toQuotedString(s) +
                      " , params: { property: '" +
                      e.util.escapeQuotes(C) +
                      "', missingProperty: '" +
                      S +
                      "', depsCount: " +
                      y.length +
                      ", deps: '" +
                      e.util.escapeQuotes(1 == y.length ? y[0] : y.join(', ')) +
                      "' } "),
                    !1 !== e.opts.messages &&
                      ((o += " , message: 'should have "),
                      (o +=
                        1 == y.length
                          ? 'property ' + e.util.escapeQuotes(y[0])
                          : 'properties ' + e.util.escapeQuotes(y.join(', '))),
                      (o +=
                        ' when property ' +
                        e.util.escapeQuotes(C) +
                        " is present' ")),
                    e.opts.verbose &&
                      (o +=
                        ' , schema: validate.schema' +
                        i +
                        ' , parentSchema: validate.schema' +
                        e.schemaPath +
                        ' , data: ' +
                        d +
                        ' '),
                    (o += ' } ')),
                (o +=
                  ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ')
            }
        }
        ;(o += ' }   '), l && ((p += '}'), (o += ' else { '))
      }
      e.errorPath = A
      var R = u.baseId
      for (var C in h) {
        var f = h[C]
        e.util.schemaHasRules(f, e.RULES.all) &&
          ((o +=
            ' ' +
            g +
            ' = true; if (' +
            d +
            e.util.getProperty(C) +
            ' !== undefined) { '),
          (u.schema = f),
          (u.schemaPath = i + e.util.getProperty(C)),
          (u.errSchemaPath = s + '/' + e.util.escapeFragment(C)),
          (o += '  ' + e.validate(u) + ' '),
          (u.baseId = R),
          (o += ' }  '),
          l && ((o += ' if (' + g + ') { '), (p += '}')))
      }
      return (
        l && (o += '   ' + p + ' if (' + c + ' == errors) {'),
        (o = e.util.cleanUpCode(o)),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = e.opts.v5 && a && a.$data,
        p
      u
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a)
      var g = 'i' + n,
        h = 'schema' + n
      u || (o += ' var ' + h + ' = validate.schema' + i + ';'),
        (o += 'var ' + c + ';'),
        u &&
          (o +=
            ' if (schema' +
            n +
            ' === undefined) ' +
            c +
            ' = true; else if (!Array.isArray(schema' +
            n +
            ')) ' +
            c +
            ' = false; else {'),
        (o +=
          '' +
          c +
          ' = false;for (var ' +
          g +
          '=0; ' +
          g +
          '<' +
          h +
          '.length; ' +
          g +
          '++) if (equal(' +
          d +
          ', ' +
          h +
          '[' +
          g +
          '])) { ' +
          c +
          ' = true; break; }'),
        u && (o += '  }  '),
        (o += ' if (!' + c + ') {   ')
      var m = m || []
      m.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: 'enum' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { allowedValues: schema' +
              n +
              ' } '),
            !1 !== e.opts.messages &&
              (o +=
                " , message: 'should be equal to one of the allowed values' "),
            e.opts.verbose &&
              (o +=
                ' , schema: validate.schema' +
                i +
                ' , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' '),
            (o += ' } '))
      var f = o
      return (
        (o = m.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + f + ']); '
              : ' validate.errors = [' + f + ']; return false; '
            : ' var err = ' +
              f +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += ' }'),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || '')
      if (!1 === e.opts.format) return l && (o += ' if (true) { '), o
      var c = e.opts.v5 && a && a.$data,
        u
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (u = 'schema' + n))
        : (u = a)
      var p = e.opts.unknownFormats,
        g = Array.isArray(p)
      if (c) {
        var h = 'format' + n
        ;(o +=
          ' var ' +
          h +
          ' = formats[' +
          u +
          ']; var isObject' +
          n +
          ' = typeof ' +
          h +
          " == 'object' && !(" +
          h +
          ' instanceof RegExp) && ' +
          h +
          '.validate; if (isObject' +
          n +
          ') { '),
          e.async && (o += ' var async' + n + ' = ' + h + '.async; '),
          (o += ' ' + h + ' = ' + h + '.validate; } if (  '),
          c &&
            (o +=
              ' (' + u + ' !== undefined && typeof ' + u + " != 'string') || "),
          (o += ' ('),
          (!0 === p || g) &&
            ((o += ' (' + u + ' && !' + h + ' '),
            g &&
              (o += ' && self._opts.unknownFormats.indexOf(' + u + ') == -1 '),
            (o += ') || ')),
          (o += ' (' + h + ' && !(typeof ' + h + " == 'function' ? "),
          (o += e.async
            ? ' (async' +
              n +
              ' ? ' +
              e.yieldAwait +
              ' ' +
              h +
              '(' +
              d +
              ') : ' +
              h +
              '(' +
              d +
              ')) '
            : ' ' + h + '(' + d + ') '),
          (o += ' : ' + h + '.test(' + d + '))))) {')
      } else {
        var h = e.formats[a]
        if (!h)
          if (!0 === p || (g && -1 == p.indexOf(a)))
            throw new Error(
              'unknown format "' +
                a +
                '" is used in schema at path "' +
                e.errSchemaPath +
                '"'
            )
          else
            return (
              g ||
                (console.warn(
                  'unknown format "' +
                    a +
                    '" ignored in schema at path "' +
                    e.errSchemaPath +
                    '"'
                ),
                'ignore' !== p &&
                  console.warn(
                    'In the next major version it will throw exception. See option unknownFormats for more information'
                  )),
              l && (o += ' if (true) { '),
              o
            )
        var m = 'object' == typeof h && !(h instanceof RegExp) && h.validate
        if (m) {
          var f = !0 === h.async
          h = h.validate
        }
        if (f) {
          if (!e.async) throw new Error('async format in sync schema')
          var y = 'formats' + e.util.getProperty(a) + '.validate'
          o += ' if (!(' + e.yieldAwait + ' ' + y + '(' + d + '))) { '
        } else {
          o += ' if (! '
          var y = 'formats' + e.util.getProperty(a)
          m && (y += '.validate'),
            (o +=
              'function' == typeof h
                ? ' ' + y + '(' + d + ') '
                : ' ' + y + '.test(' + d + ') '),
            (o += ') { ')
        }
      }
      var A = A || []
      A.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: 'format' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { format:  '),
            (o += c ? '' + u : '' + e.util.toQuotedString(a)),
            (o += '  } '),
            !1 !== e.opts.messages &&
              ((o += ' , message: \'should match format "'),
              (o += c ? "' + " + u + " + '" : '' + e.util.escapeQuotes(a)),
              (o += '"\' ')),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + e.util.toQuotedString(a)),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var C = o
      return (
        (o = A.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + C + ']); '
              : ' validate.errors = [' + C + ']; return false; '
            : ' var err = ' +
              C +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += ' } '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = 'errs__' + n,
        p = e.util.copy(e),
        g = ''
      p.level++
      var h = 'valid' + p.level,
        m = 'i' + n,
        f = (p.dataLevel = e.dataLevel + 1),
        y = 'data' + f,
        A = e.baseId
      if (((o += 'var ' + u + ' = errors;var ' + c + ';'), Array.isArray(a))) {
        var C = e.schema.additionalItems
        if (!1 === C) {
          o += ' ' + c + ' = ' + d + '.length <= ' + a.length + '; '
          var w = s
          ;(s = e.errSchemaPath + '/additionalItems'),
            (o += '  if (!' + c + ') {   ')
          var E = E || []
          E.push(o),
            (o = ''),
            !1 === e.createErrors
              ? (o += ' {} ')
              : ((o +=
                  " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " +
                  e.errorPath +
                  ' , schemaPath: ' +
                  e.util.toQuotedString(s) +
                  ' , params: { limit: ' +
                  a.length +
                  ' } '),
                !1 !== e.opts.messages &&
                  (o +=
                    " , message: 'should NOT have more than " +
                    a.length +
                    " items' "),
                e.opts.verbose &&
                  (o +=
                    ' , schema: false , parentSchema: validate.schema' +
                    e.schemaPath +
                    ' , data: ' +
                    d +
                    ' '),
                (o += ' } '))
          var b = o
          ;(o = E.pop()),
            (o +=
              !e.compositeRule && l
                ? e.async
                  ? ' throw new ValidationError([' + b + ']); '
                  : ' validate.errors = [' + b + ']; return false; '
                : ' var err = ' +
                  b +
                  ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
            (o += ' } '),
            (s = w),
            l && ((g += '}'), (o += ' else { '))
        }
        var v = a
        if (v)
          for (var F = -1, x = v.length - 1, S; F < x; )
            if (((S = v[(F += 1)]), e.util.schemaHasRules(S, e.RULES.all))) {
              o += ' ' + h + ' = true; if (' + d + '.length > ' + F + ') { '
              var $ = d + '[' + F + ']'
              ;(p.schema = S),
                (p.schemaPath = i + '[' + F + ']'),
                (p.errSchemaPath = s + '/' + F),
                (p.errorPath = e.util.getPathExpr(
                  e.errorPath,
                  F,
                  e.opts.jsonPointers,
                  !0
                )),
                (p.dataPathArr[f] = F)
              var k = e.validate(p)
              ;(p.baseId = A),
                (o +=
                  2 > e.util.varOccurences(k, y)
                    ? ' ' + e.util.varReplace(k, y, $) + ' '
                    : ' var ' + y + ' = ' + $ + '; ' + k + ' '),
                (o += ' }  '),
                l && ((o += ' if (' + h + ') { '), (g += '}'))
            }
        if ('object' == typeof C && e.util.schemaHasRules(C, e.RULES.all)) {
          ;(p.schema = C),
            (p.schemaPath = e.schemaPath + '.additionalItems'),
            (p.errSchemaPath = e.errSchemaPath + '/additionalItems'),
            (o +=
              ' ' +
              h +
              ' = true; if (' +
              d +
              '.length > ' +
              a.length +
              ') {  for (var ' +
              m +
              ' = ' +
              a.length +
              '; ' +
              m +
              ' < ' +
              d +
              '.length; ' +
              m +
              '++) { '),
            (p.errorPath = e.util.getPathExpr(
              e.errorPath,
              m,
              e.opts.jsonPointers,
              !0
            ))
          var $ = d + '[' + m + ']'
          p.dataPathArr[f] = m
          var k = e.validate(p)
          ;(p.baseId = A),
            (o +=
              2 > e.util.varOccurences(k, y)
                ? ' ' + e.util.varReplace(k, y, $) + ' '
                : ' var ' + y + ' = ' + $ + '; ' + k + ' '),
            l && (o += ' if (!' + h + ') break; '),
            (o += ' } }  '),
            l && ((o += ' if (' + h + ') { '), (g += '}'))
        }
      } else if (e.util.schemaHasRules(a, e.RULES.all)) {
        ;(p.schema = a),
          (p.schemaPath = i),
          (p.errSchemaPath = s),
          (o +=
            '  for (var ' +
            m +
            ' = ' +
            0 +
            '; ' +
            m +
            ' < ' +
            d +
            '.length; ' +
            m +
            '++) { '),
          (p.errorPath = e.util.getPathExpr(
            e.errorPath,
            m,
            e.opts.jsonPointers,
            !0
          ))
        var $ = d + '[' + m + ']'
        p.dataPathArr[f] = m
        var k = e.validate(p)
        ;(p.baseId = A),
          (o +=
            2 > e.util.varOccurences(k, y)
              ? ' ' + e.util.varReplace(k, y, $) + ' '
              : ' var ' + y + ' = ' + $ + '; ' + k + ' '),
          l && (o += ' if (!' + h + ') break; '),
          (o += ' }  '),
          l && ((o += ' if (' + h + ') { '), (g += '}'))
      }
      return (
        l && (o += ' ' + g + ' if (' + u + ' == errors) {'),
        (o = e.util.cleanUpCode(o)),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = e.opts.v5 && a && a.$data,
        u
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (u = 'schema' + n))
        : (u = a),
        (o += 'var division' + n + ';if ('),
        c &&
          (o +=
            ' ' + u + ' !== undefined && ( typeof ' + u + " != 'number' || "),
        (o += ' (division' + n + ' = ' + d + ' / ' + u + ', '),
        (o += e.opts.multipleOfPrecision
          ? ' Math.abs(Math.round(division' +
            n +
            ') - division' +
            n +
            ') > 1e-' +
            e.opts.multipleOfPrecision +
            ' '
          : ' division' + n + ' !== parseInt(division' + n + ') '),
        (o += ' ) '),
        c && (o += '  )  '),
        (o += ' ) {   ')
      var p = p || []
      p.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { multipleOf: ' +
              u +
              ' } '),
            !1 !== e.opts.messages &&
              ((o += " , message: 'should be multiple of "),
              (o += c ? "' + " + u : '' + a + "'")),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + a),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var g = o
      return (
        (o = p.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + g + ']); '
              : ' validate.errors = [' + g + ']; return false; '
            : ' var err = ' +
              g +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += '} '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'errs__' + n,
        u = e.util.copy(e)
      u.level++
      var p = 'valid' + u.level
      if (e.util.schemaHasRules(a, e.RULES.all)) {
        ;(u.schema = a),
          (u.schemaPath = i),
          (u.errSchemaPath = s),
          (o += ' var ' + c + ' = errors;  ')
        var g = e.compositeRule
        ;(e.compositeRule = u.compositeRule = !0), (u.createErrors = !1)
        var h
        u.opts.allErrors && ((h = u.opts.allErrors), (u.opts.allErrors = !1)),
          (o += ' ' + e.validate(u) + ' '),
          (u.createErrors = !0),
          h && (u.opts.allErrors = h),
          (e.compositeRule = u.compositeRule = g),
          (o += ' if (' + p + ') {   ')
        var m = m || []
        m.push(o),
          (o = ''),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: 'not' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                ' , params: {} '),
              !1 !== e.opts.messages &&
                (o += " , message: 'should NOT be valid' "),
              e.opts.verbose &&
                (o +=
                  ' , schema: validate.schema' +
                  i +
                  ' , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  d +
                  ' '),
              (o += ' } '))
        var f = o
        ;(o = m.pop()),
          (o +=
            !e.compositeRule && l
              ? e.async
                ? ' throw new ValidationError([' + f + ']); '
                : ' validate.errors = [' + f + ']; return false; '
              : ' var err = ' +
                f +
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
          (o +=
            ' } else {  errors = ' +
            c +
            '; if (vErrors !== null) { if (' +
            c +
            ') vErrors.length = ' +
            c +
            '; else vErrors = null; } '),
          e.opts.allErrors && (o += ' } ')
      } else
        (o += '  var err =   '),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: 'not' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                ' , params: {} '),
              !1 !== e.opts.messages &&
                (o += " , message: 'should NOT be valid' "),
              e.opts.verbose &&
                (o +=
                  ' , schema: validate.schema' +
                  i +
                  ' , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  d +
                  ' '),
              (o += ' } ')),
          (o +=
            ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
          l && (o += ' if (false) { ')
      return o
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'valid' + n,
        c = 'errs__' + n,
        u = e.util.copy(e),
        p = ''
      u.level++
      var g = 'valid' + u.level
      o +=
        'var ' +
        c +
        ' = errors;var prevValid' +
        n +
        ' = false;var ' +
        d +
        ' = false;'
      var h = u.baseId,
        m = e.compositeRule
      e.compositeRule = u.compositeRule = !0
      var f = a
      if (f)
        for (var y = -1, A = f.length - 1, C; y < A; )
          (C = f[(y += 1)]),
            e.util.schemaHasRules(C, e.RULES.all)
              ? ((u.schema = C),
                (u.schemaPath = i + '[' + y + ']'),
                (u.errSchemaPath = s + '/' + y),
                (o += '  ' + e.validate(u) + ' '),
                (u.baseId = h))
              : (o += ' var ' + g + ' = true; '),
            y &&
              ((o +=
                ' if (' +
                g +
                ' && prevValid' +
                n +
                ') ' +
                d +
                ' = false; else { '),
              (p += '}')),
            (o += ' if (' + g + ') ' + d + ' = prevValid' + n + ' = true;')
      ;(e.compositeRule = u.compositeRule = m),
        (o += '' + p + 'if (!' + d + ') {   ')
      var w = w || []
      w.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: 'oneOf' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: {} '),
            !1 !== e.opts.messages &&
              (o += " , message: 'should match exactly one schema in oneOf' "),
            e.opts.verbose &&
              (o +=
                ' , schema: validate.schema' +
                i +
                ' , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                ('data' + (r || '')) +
                ' '),
            (o += ' } '))
      var E = o
      return (
        (o = w.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + E + ']); '
              : ' validate.errors = [' + E + ']; return false; '
            : ' var err = ' +
              E +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o +=
          '} else {  errors = ' +
          c +
          '; if (vErrors !== null) { if (' +
          c +
          ') vErrors.length = ' +
          c +
          '; else vErrors = null; }'),
        e.opts.allErrors && (o += ' } '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = e.opts.v5 && a && a.$data,
        u
      c
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (u = 'schema' + n))
        : (u = a)
      var p = c ? '(new RegExp(' + u + '))' : e.usePattern(a)
      ;(o += 'if ( '),
        c &&
          (o +=
            ' (' + u + ' !== undefined && typeof ' + u + " != 'string') || "),
        (o += ' !' + p + '.test(' + d + ') ) {   ')
      var g = g || []
      g.push(o),
        (o = ''),
        !1 === e.createErrors
          ? (o += ' {} ')
          : ((o +=
              " { keyword: 'pattern' , dataPath: (dataPath || '') + " +
              e.errorPath +
              ' , schemaPath: ' +
              e.util.toQuotedString(s) +
              ' , params: { pattern:  '),
            (o += c ? '' + u : '' + e.util.toQuotedString(a)),
            (o += '  } '),
            !1 !== e.opts.messages &&
              ((o += ' , message: \'should match pattern "'),
              (o += c ? "' + " + u + " + '" : '' + e.util.escapeQuotes(a)),
              (o += '"\' ')),
            e.opts.verbose &&
              ((o += ' , schema:  '),
              (o += c ? 'validate.schema' + i : '' + e.util.toQuotedString(a)),
              (o +=
                '         , parentSchema: validate.schema' +
                e.schemaPath +
                ' , data: ' +
                d +
                ' ')),
            (o += ' } '))
      var h = o
      return (
        (o = g.pop()),
        (o +=
          !e.compositeRule && l
            ? e.async
              ? ' throw new ValidationError([' + h + ']); '
              : ' validate.errors = [' + h + ']; return false; '
            : ' var err = ' +
              h +
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
        (o += '} '),
        l && (o += ' else { '),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = 'key' + n,
        p = 'patternMatched' + n,
        g = '',
        h = e.opts.ownProperties
      o += 'var ' + c + ' = true;'
      var m = a
      if (m)
        for (var f = -1, y = m.length - 1, A; f < y; ) {
          ;(A = m[(f += 1)]),
            (o +=
              ' var ' + p + ' = false; for (var ' + u + ' in ' + d + ') {  '),
            h &&
              (o +=
                ' if (!Object.prototype.hasOwnProperty.call(' +
                d +
                ', ' +
                u +
                ')) continue; '),
            (o +=
              ' ' +
              p +
              ' = ' +
              e.usePattern(A) +
              '.test(' +
              u +
              '); if (' +
              p +
              ') break; } ')
          var C = e.util.escapeQuotes(A)
          ;(o += ' if (!' + p + ') { ' + c + ' = false;  var err =   '),
            !1 === e.createErrors
              ? (o += ' {} ')
              : ((o +=
                  " { keyword: 'patternRequired' , dataPath: (dataPath || '') + " +
                  e.errorPath +
                  ' , schemaPath: ' +
                  e.util.toQuotedString(s) +
                  " , params: { missingPattern: '" +
                  C +
                  "' } "),
                !1 !== e.opts.messages &&
                  (o +=
                    " , message: 'should have property matching pattern \\'" +
                    C +
                    "\\'' "),
                e.opts.verbose &&
                  (o +=
                    ' , schema: validate.schema' +
                    i +
                    ' , parentSchema: validate.schema' +
                    e.schemaPath +
                    ' , data: ' +
                    d +
                    ' '),
                (o += ' } ')),
            (o +=
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; }   '),
            l && ((g += '}'), (o += ' else { '))
        }
      return (o += '' + g), o
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = 'errs__' + n,
        p = e.util.copy(e),
        g = ''
      p.level++
      var h = 'valid' + p.level,
        m = 'key' + n,
        f = (p.dataLevel = e.dataLevel + 1),
        y = 'data' + f,
        A = Object.keys(a || {}),
        C = e.schema.patternProperties || {},
        w = Object.keys(C),
        E = e.schema.additionalProperties,
        b = A.length || w.length,
        v = !1 === E,
        F = 'object' == typeof E && Object.keys(E).length,
        x = e.opts.removeAdditional,
        S = e.opts.ownProperties,
        $ = e.baseId,
        k = e.schema.required
      if (k && !(e.opts.v5 && k.$data) && k.length < e.opts.loopRequired)
        var D = e.util.toHash(k)
      if (e.opts.v5)
        var B = e.schema.patternGroups || {},
          _ = Object.keys(B)
      if (
        ((o += 'var ' + u + ' = errors;var ' + h + ' = true;'), v || F || x)
      ) {
        if (
          ((o += ' for (var ' + m + ' in ' + d + ') {  '),
          S &&
            (o +=
              ' if (!Object.prototype.hasOwnProperty.call(' +
              d +
              ', ' +
              m +
              ')) continue; '),
          b)
        ) {
          if (((o += ' var isAdditional' + n + ' = !(false '), A.length))
            if (5 < A.length) o += ' || validate.schema' + i + '[' + m + '] '
            else {
              var L = A
              if (L)
                for (var R = -1, P = L.length - 1, T; R < P; )
                  (T = L[(R += 1)]),
                    (o += ' || ' + m + ' == ' + e.util.toQuotedString(T) + ' ')
            }
          if (w.length) {
            var M = w
            if (M)
              for (var O = -1, N = M.length - 1, I; O < N; )
                (I = M[(O += 1)]),
                  (o += ' || ' + e.usePattern(I) + '.test(' + m + ') ')
          }
          if (e.opts.v5 && _ && _.length) {
            var j = _
            if (j)
              for (var O = -1, W = j.length - 1, H; O < W; )
                (H = j[(O += 1)]),
                  (o += ' || ' + e.usePattern(H) + '.test(' + m + ') ')
          }
          o += ' ); if (isAdditional' + n + ') { '
        }
        if ('all' == x) o += ' delete ' + d + '[' + m + ']; '
        else {
          var V = e.errorPath
          if (
            (e.opts._errorDataPathProperty &&
              (e.errorPath = e.util.getPathExpr(
                e.errorPath,
                m,
                e.opts.jsonPointers
              )),
            v)
          ) {
            if (x) o += ' delete ' + d + '[' + m + ']; '
            else {
              o += ' ' + h + ' = false; '
              var U = s
              s = e.errSchemaPath + '/additionalProperties'
              var z = z || []
              z.push(o),
                (o = ''),
                !1 === e.createErrors
                  ? (o += ' {} ')
                  : ((o +=
                      " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " +
                      e.errorPath +
                      ' , schemaPath: ' +
                      e.util.toQuotedString(s) +
                      " , params: { additionalProperty: '" +
                      ("' + " + m + " + '") +
                      "' } "),
                    !1 !== e.opts.messages &&
                      (o +=
                        " , message: 'should NOT have additional properties' "),
                    e.opts.verbose &&
                      (o +=
                        ' , schema: false , parentSchema: validate.schema' +
                        e.schemaPath +
                        ' , data: ' +
                        d +
                        ' '),
                    (o += ' } '))
              var K = o
              ;(o = z.pop()),
                (o +=
                  !e.compositeRule && l
                    ? e.async
                      ? ' throw new ValidationError([' + K + ']); '
                      : ' validate.errors = [' + K + ']; return false; '
                    : ' var err = ' +
                      K +
                      ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
                (s = U),
                l && (o += ' break; ')
            }
          } else if (F)
            if ('failing' == x) {
              o += ' var ' + u + ' = errors;  '
              var G = e.compositeRule
              ;(e.compositeRule = p.compositeRule = !0),
                (p.schema = E),
                (p.schemaPath = e.schemaPath + '.additionalProperties'),
                (p.errSchemaPath = e.errSchemaPath + '/additionalProperties'),
                (p.errorPath = e.opts._errorDataPathProperty
                  ? e.errorPath
                  : e.util.getPathExpr(e.errorPath, m, e.opts.jsonPointers))
              var q = d + '[' + m + ']'
              p.dataPathArr[f] = m
              var Q = e.validate(p)
              ;(p.baseId = $),
                (o +=
                  2 > e.util.varOccurences(Q, y)
                    ? ' ' + e.util.varReplace(Q, y, q) + ' '
                    : ' var ' + y + ' = ' + q + '; ' + Q + ' '),
                (o +=
                  ' if (!' +
                  h +
                  ') { errors = ' +
                  u +
                  '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' +
                  d +
                  '[' +
                  m +
                  ']; }  '),
                (e.compositeRule = p.compositeRule = G)
            } else {
              ;(p.schema = E),
                (p.schemaPath = e.schemaPath + '.additionalProperties'),
                (p.errSchemaPath = e.errSchemaPath + '/additionalProperties'),
                (p.errorPath = e.opts._errorDataPathProperty
                  ? e.errorPath
                  : e.util.getPathExpr(e.errorPath, m, e.opts.jsonPointers))
              var q = d + '[' + m + ']'
              p.dataPathArr[f] = m
              var Q = e.validate(p)
              ;(p.baseId = $),
                (o +=
                  2 > e.util.varOccurences(Q, y)
                    ? ' ' + e.util.varReplace(Q, y, q) + ' '
                    : ' var ' + y + ' = ' + q + '; ' + Q + ' '),
                l && (o += ' if (!' + h + ') break; ')
            }
          e.errorPath = V
        }
        b && (o += ' } '),
          (o += ' }  '),
          l && ((o += ' if (' + h + ') { '), (g += '}'))
      }
      var Y = e.opts.useDefaults && !e.compositeRule
      if (A.length) {
        var J = A
        if (J)
          for (var X = -1, Z = J.length - 1, T; X < Z; ) {
            T = J[(X += 1)]
            var ee = a[T]
            if (e.util.schemaHasRules(ee, e.RULES.all)) {
              var te = e.util.getProperty(T),
                q = d + te,
                oe = Y && void 0 !== ee.default
              ;(p.schema = ee),
                (p.schemaPath = i + te),
                (p.errSchemaPath = s + '/' + e.util.escapeFragment(T)),
                (p.errorPath = e.util.getPath(
                  e.errorPath,
                  T,
                  e.opts.jsonPointers
                )),
                (p.dataPathArr[f] = e.util.toQuotedString(T))
              var Q = e.validate(p)
              if (((p.baseId = $), 2 > e.util.varOccurences(Q, y))) {
                Q = e.util.varReplace(Q, y, q)
                var ne = q
              } else {
                var ne = y
                o += ' var ' + y + ' = ' + q + '; '
              }
              if (oe) o += ' ' + Q + ' '
              else {
                if (D && D[T]) {
                  o += ' if (' + ne + ' === undefined) { ' + h + ' = false; '
                  var V = e.errorPath,
                    U = s,
                    re = e.util.escapeQuotes(T)
                  e.opts._errorDataPathProperty &&
                    (e.errorPath = e.util.getPath(V, T, e.opts.jsonPointers)),
                    (s = e.errSchemaPath + '/required')
                  var z = z || []
                  z.push(o),
                    (o = ''),
                    !1 === e.createErrors
                      ? (o += ' {} ')
                      : ((o +=
                          " { keyword: 'required' , dataPath: (dataPath || '') + " +
                          e.errorPath +
                          ' , schemaPath: ' +
                          e.util.toQuotedString(s) +
                          " , params: { missingProperty: '" +
                          re +
                          "' } "),
                        !1 !== e.opts.messages &&
                          ((o += " , message: '"),
                          (o += e.opts._errorDataPathProperty
                            ? 'is a required property'
                            : "should have required property \\'" + re + "\\'"),
                          (o += "' ")),
                        e.opts.verbose &&
                          (o +=
                            ' , schema: validate.schema' +
                            i +
                            ' , parentSchema: validate.schema' +
                            e.schemaPath +
                            ' , data: ' +
                            d +
                            ' '),
                        (o += ' } '))
                  var K = o
                  ;(o = z.pop()),
                    (o +=
                      !e.compositeRule && l
                        ? e.async
                          ? ' throw new ValidationError([' + K + ']); '
                          : ' validate.errors = [' + K + ']; return false; '
                        : ' var err = ' +
                          K +
                          ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
                    (s = U),
                    (e.errorPath = V),
                    (o += ' } else { ')
                } else
                  o += l
                    ? ' if (' +
                      ne +
                      ' === undefined) { ' +
                      h +
                      ' = true; } else { '
                    : ' if (' + ne + ' !== undefined) { '
                o += ' ' + Q + ' } '
              }
            }
            l && ((o += ' if (' + h + ') { '), (g += '}'))
          }
      }
      var ae = w
      if (ae)
        for (var ie = -1, se = ae.length - 1, I; ie < se; ) {
          I = ae[(ie += 1)]
          var ee = C[I]
          if (e.util.schemaHasRules(ee, e.RULES.all)) {
            ;(p.schema = ee),
              (p.schemaPath =
                e.schemaPath + '.patternProperties' + e.util.getProperty(I)),
              (p.errSchemaPath =
                e.errSchemaPath +
                '/patternProperties/' +
                e.util.escapeFragment(I)),
              (o += ' for (var ' + m + ' in ' + d + ') {  '),
              S &&
                (o +=
                  ' if (!Object.prototype.hasOwnProperty.call(' +
                  d +
                  ', ' +
                  m +
                  ')) continue; '),
              (o += ' if (' + e.usePattern(I) + '.test(' + m + ')) { '),
              (p.errorPath = e.util.getPathExpr(
                e.errorPath,
                m,
                e.opts.jsonPointers
              ))
            var q = d + '[' + m + ']'
            p.dataPathArr[f] = m
            var Q = e.validate(p)
            ;(p.baseId = $),
              (o +=
                2 > e.util.varOccurences(Q, y)
                  ? ' ' + e.util.varReplace(Q, y, q) + ' '
                  : ' var ' + y + ' = ' + q + '; ' + Q + ' '),
              l && (o += ' if (!' + h + ') break; '),
              (o += ' } '),
              l && (o += ' else ' + h + ' = true; '),
              (o += ' }  '),
              l && ((o += ' if (' + h + ') { '), (g += '}'))
          }
        }
      if (e.opts.v5) {
        var le = _
        if (le)
          for (var de = -1, ce = le.length - 1, H; de < ce; ) {
            H = le[(de += 1)]
            var ue = B[H],
              ee = ue.schema
            if (e.util.schemaHasRules(ee, e.RULES.all)) {
              ;(p.schema = ee),
                (p.schemaPath =
                  e.schemaPath +
                  '.patternGroups' +
                  e.util.getProperty(H) +
                  '.schema'),
                (p.errSchemaPath =
                  e.errSchemaPath +
                  '/patternGroups/' +
                  e.util.escapeFragment(H) +
                  '/schema'),
                (o +=
                  ' var pgPropCount' +
                  n +
                  ' = 0; for (var ' +
                  m +
                  ' in ' +
                  d +
                  ') {  '),
                S &&
                  (o +=
                    ' if (!Object.prototype.hasOwnProperty.call(' +
                    d +
                    ', ' +
                    m +
                    ')) continue; '),
                (o +=
                  ' if (' +
                  e.usePattern(H) +
                  '.test(' +
                  m +
                  ')) { pgPropCount' +
                  n +
                  '++; '),
                (p.errorPath = e.util.getPathExpr(
                  e.errorPath,
                  m,
                  e.opts.jsonPointers
                ))
              var q = d + '[' + m + ']'
              p.dataPathArr[f] = m
              var Q = e.validate(p)
              ;(p.baseId = $),
                (o +=
                  2 > e.util.varOccurences(Q, y)
                    ? ' ' + e.util.varReplace(Q, y, q) + ' '
                    : ' var ' + y + ' = ' + q + '; ' + Q + ' '),
                l && (o += ' if (!' + h + ') break; '),
                (o += ' } '),
                l && (o += ' else ' + h + ' = true; '),
                (o += ' }  '),
                l && ((o += ' if (' + h + ') { '), (g += '}'))
              var pe = ue.minimum,
                ge = ue.maximum
              if (void 0 !== pe || void 0 !== ge) {
                o += ' var ' + c + ' = true; '
                var U = s
                if (void 0 !== pe) {
                  var he = pe,
                    me = 'minimum',
                    fe = 'less'
                  ;(o += ' ' + c + ' = pgPropCount' + n + ' >= ' + pe + '; '),
                    (s = e.errSchemaPath + '/patternGroups/minimum'),
                    (o += '  if (!' + c + ') {   ')
                  var z = z || []
                  z.push(o),
                    (o = ''),
                    !1 === e.createErrors
                      ? (o += ' {} ')
                      : ((o +=
                          " { keyword: 'patternGroups' , dataPath: (dataPath || '') + " +
                          e.errorPath +
                          ' , schemaPath: ' +
                          e.util.toQuotedString(s) +
                          " , params: { reason: '" +
                          me +
                          "', limit: " +
                          he +
                          ", pattern: '" +
                          e.util.escapeQuotes(H) +
                          "' } "),
                        !1 !== e.opts.messages &&
                          (o +=
                            " , message: 'should NOT have " +
                            fe +
                            ' than ' +
                            he +
                            ' properties matching pattern "' +
                            e.util.escapeQuotes(H) +
                            '"\' '),
                        e.opts.verbose &&
                          (o +=
                            ' , schema: validate.schema' +
                            i +
                            ' , parentSchema: validate.schema' +
                            e.schemaPath +
                            ' , data: ' +
                            d +
                            ' '),
                        (o += ' } '))
                  var K = o
                  ;(o = z.pop()),
                    (o +=
                      !e.compositeRule && l
                        ? e.async
                          ? ' throw new ValidationError([' + K + ']); '
                          : ' validate.errors = [' + K + ']; return false; '
                        : ' var err = ' +
                          K +
                          ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
                    (o += ' } '),
                    void 0 !== ge && (o += ' else ')
                }
                if (void 0 !== ge) {
                  var he = ge,
                    me = 'maximum',
                    fe = 'more'
                  ;(o += ' ' + c + ' = pgPropCount' + n + ' <= ' + ge + '; '),
                    (s = e.errSchemaPath + '/patternGroups/maximum'),
                    (o += '  if (!' + c + ') {   ')
                  var z = z || []
                  z.push(o),
                    (o = ''),
                    !1 === e.createErrors
                      ? (o += ' {} ')
                      : ((o +=
                          " { keyword: 'patternGroups' , dataPath: (dataPath || '') + " +
                          e.errorPath +
                          ' , schemaPath: ' +
                          e.util.toQuotedString(s) +
                          " , params: { reason: '" +
                          me +
                          "', limit: " +
                          he +
                          ", pattern: '" +
                          e.util.escapeQuotes(H) +
                          "' } "),
                        !1 !== e.opts.messages &&
                          (o +=
                            " , message: 'should NOT have " +
                            fe +
                            ' than ' +
                            he +
                            ' properties matching pattern "' +
                            e.util.escapeQuotes(H) +
                            '"\' '),
                        e.opts.verbose &&
                          (o +=
                            ' , schema: validate.schema' +
                            i +
                            ' , parentSchema: validate.schema' +
                            e.schemaPath +
                            ' , data: ' +
                            d +
                            ' '),
                        (o += ' } '))
                  var K = o
                  ;(o = z.pop()),
                    (o +=
                      !e.compositeRule && l
                        ? e.async
                          ? ' throw new ValidationError([' + K + ']); '
                          : ' validate.errors = [' + K + ']; return false; '
                        : ' var err = ' +
                          K +
                          ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
                    (o += ' } ')
                }
                ;(s = U), l && ((o += ' if (' + c + ') { '), (g += '}'))
              }
            }
          }
      }
      return (
        l && (o += ' ' + g + ' if (' + u + ' == errors) {'),
        (o = e.util.cleanUpCode(o)),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.errSchemaPath + '/' + t,
        s = !e.opts.allErrors,
        l = 'data' + (r || ''),
        d = 'valid' + n,
        c,
        u
      if ('#' == a || '#/' == a)
        e.isRoot
          ? ((c = e.async), (u = 'validate'))
          : ((c = !0 === e.root.schema.$async), (u = 'root.refVal[0]'))
      else {
        var p = e.resolveRef(e.baseId, a, e.isRoot)
        if (p === void 0) {
          var g = "can't resolve reference " + a + ' from id ' + e.baseId
          if ('fail' == e.opts.missingRefs) {
            console.log(g)
            var h = h || []
            h.push(o),
              (o = ''),
              !1 === e.createErrors
                ? (o += ' {} ')
                : ((o +=
                    " { keyword: '$ref' , dataPath: (dataPath || '') + " +
                    e.errorPath +
                    ' , schemaPath: ' +
                    e.util.toQuotedString(i) +
                    " , params: { ref: '" +
                    e.util.escapeQuotes(a) +
                    "' } "),
                  !1 !== e.opts.messages &&
                    (o +=
                      " , message: 'can\\'t resolve reference " +
                      e.util.escapeQuotes(a) +
                      "' "),
                  e.opts.verbose &&
                    (o +=
                      ' , schema: ' +
                      e.util.toQuotedString(a) +
                      ' , parentSchema: validate.schema' +
                      e.schemaPath +
                      ' , data: ' +
                      l +
                      ' '),
                  (o += ' } '))
            var m = o
            ;(o = h.pop()),
              (o +=
                !e.compositeRule && s
                  ? e.async
                    ? ' throw new ValidationError([' + m + ']); '
                    : ' validate.errors = [' + m + ']; return false; '
                  : ' var err = ' +
                    m +
                    ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
              s && (o += ' if (false) { ')
          } else if ('ignore' == e.opts.missingRefs)
            console.log(g), s && (o += ' if (true) { ')
          else {
            var f = new Error(g)
            throw ((f.missingRef = e.resolve.url(e.baseId, a)),
            (f.missingSchema = e.resolve.normalizeId(
              e.resolve.fullPath(f.missingRef)
            )),
            f)
          }
        } else if (p.inline) {
          var y = e.util.copy(e)
          y.level++
          var A = 'valid' + y.level
          ;(y.schema = p.schema), (y.schemaPath = ''), (y.errSchemaPath = a)
          var C = e.validate(y).replace(/validate\.schema/g, p.code)
          ;(o += ' ' + C + ' '), s && (o += ' if (' + A + ') { ')
        } else (c = !0 === p.$async), (u = p.code)
      }
      if (u) {
        var h = h || []
        h.push(o),
          (o = ''),
          (o += e.opts.passContext ? ' ' + u + '.call(this, ' : ' ' + u + '( '),
          (o += ' ' + l + ", (dataPath || '')"),
          '""' != e.errorPath && (o += ' + ' + e.errorPath)
        var w = r ? 'data' + (r - 1 || '') : 'parentData',
          E = r ? e.dataPathArr[r] : 'parentDataProperty'
        o += ' , ' + w + ' , ' + E + ', rootData)  '
        var b = o
        if (((o = h.pop()), c)) {
          if (!e.async)
            throw new Error('async schema referenced by sync schema')
          ;(o += ' try { '),
            s && (o += 'var ' + d + ' ='),
            (o +=
              ' ' +
              e.yieldAwait +
              ' ' +
              b +
              '; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } '),
            s && (o += ' if (' + d + ') { ')
        } else
          (o +=
            ' if (!' +
            b +
            ') { if (vErrors === null) vErrors = ' +
            u +
            '.errors; else vErrors = vErrors.concat(' +
            u +
            '.errors); errors = vErrors.length; } '),
            s && (o += ' else { ')
      }
      return o
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = e.opts.v5 && a && a.$data,
        p
      u
        ? ((o +=
            ' var schema' +
            n +
            ' = ' +
            e.util.getData(a.$data, r, e.dataPathArr) +
            '; '),
          (p = 'schema' + n))
        : (p = a)
      var g = 'schema' + n
      if (!u)
        if (
          a.length < e.opts.loopRequired &&
          e.schema.properties &&
          Object.keys(e.schema.properties).length
        ) {
          var h = [],
            m = a
          if (m)
            for (var f = -1, y = m.length - 1, A; f < y; ) {
              A = m[(f += 1)]
              var C = e.schema.properties[A]
              ;(C && e.util.schemaHasRules(C, e.RULES.all)) || (h[h.length] = A)
            }
        } else var h = a
      if (u || h.length) {
        var w = e.errorPath,
          E = u || h.length >= e.opts.loopRequired
        if (l) {
          if (((o += ' var missing' + n + '; '), E)) {
            u || (o += ' var ' + g + ' = validate.schema' + i + '; ')
            var b = 'i' + n,
              v = 'schema' + n + '[' + b + ']',
              F = "' + " + v + " + '"
            e.opts._errorDataPathProperty &&
              (e.errorPath = e.util.getPathExpr(w, v, e.opts.jsonPointers)),
              (o += ' var ' + c + ' = true; '),
              u &&
                (o +=
                  ' if (schema' +
                  n +
                  ' === undefined) ' +
                  c +
                  ' = true; else if (!Array.isArray(schema' +
                  n +
                  ')) ' +
                  c +
                  ' = false; else {'),
              (o +=
                ' for (var ' +
                b +
                ' = 0; ' +
                b +
                ' < ' +
                g +
                '.length; ' +
                b +
                '++) { ' +
                c +
                ' = ' +
                d +
                '[' +
                g +
                '[' +
                b +
                ']] !== undefined; if (!' +
                c +
                ') break; } '),
              u && (o += '  }  '),
              (o += '  if (!' + c + ') {   ')
            var x = x || []
            x.push(o),
              (o = ''),
              !1 === e.createErrors
                ? (o += ' {} ')
                : ((o +=
                    " { keyword: 'required' , dataPath: (dataPath || '') + " +
                    e.errorPath +
                    ' , schemaPath: ' +
                    e.util.toQuotedString(s) +
                    " , params: { missingProperty: '" +
                    F +
                    "' } "),
                  !1 !== e.opts.messages &&
                    ((o += " , message: '"),
                    (o += e.opts._errorDataPathProperty
                      ? 'is a required property'
                      : "should have required property \\'" + F + "\\'"),
                    (o += "' ")),
                  e.opts.verbose &&
                    (o +=
                      ' , schema: validate.schema' +
                      i +
                      ' , parentSchema: validate.schema' +
                      e.schemaPath +
                      ' , data: ' +
                      d +
                      ' '),
                  (o += ' } '))
            var S = o
            ;(o = x.pop()),
              (o +=
                !e.compositeRule && l
                  ? e.async
                    ? ' throw new ValidationError([' + S + ']); '
                    : ' validate.errors = [' + S + ']; return false; '
                  : ' var err = ' +
                    S +
                    ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
              (o += ' } else { ')
          } else {
            o += ' if ( '
            for (var $ = h, b = -1, k = $.length - 1, D; b < k; ) {
              ;(D = $[(b += 1)]), b && (o += ' || ')
              var B = e.util.getProperty(D)
              o +=
                ' ( ' +
                d +
                B +
                ' === undefined && (missing' +
                n +
                ' = ' +
                e.util.toQuotedString(e.opts.jsonPointers ? D : B) +
                ') ) '
            }
            o += ') {  '
            var v = 'missing' + n,
              F = "' + " + v + " + '"
            e.opts._errorDataPathProperty &&
              (e.errorPath = e.opts.jsonPointers
                ? e.util.getPathExpr(w, v, !0)
                : w + ' + ' + v)
            var x = x || []
            x.push(o),
              (o = ''),
              !1 === e.createErrors
                ? (o += ' {} ')
                : ((o +=
                    " { keyword: 'required' , dataPath: (dataPath || '') + " +
                    e.errorPath +
                    ' , schemaPath: ' +
                    e.util.toQuotedString(s) +
                    " , params: { missingProperty: '" +
                    F +
                    "' } "),
                  !1 !== e.opts.messages &&
                    ((o += " , message: '"),
                    (o += e.opts._errorDataPathProperty
                      ? 'is a required property'
                      : "should have required property \\'" + F + "\\'"),
                    (o += "' ")),
                  e.opts.verbose &&
                    (o +=
                      ' , schema: validate.schema' +
                      i +
                      ' , parentSchema: validate.schema' +
                      e.schemaPath +
                      ' , data: ' +
                      d +
                      ' '),
                  (o += ' } '))
            var S = o
            ;(o = x.pop()),
              (o +=
                !e.compositeRule && l
                  ? e.async
                    ? ' throw new ValidationError([' + S + ']); '
                    : ' validate.errors = [' + S + ']; return false; '
                  : ' var err = ' +
                    S +
                    ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
              (o += ' } else { ')
          }
        } else if (E) {
          u || (o += ' var ' + g + ' = validate.schema' + i + '; ')
          var b = 'i' + n,
            v = 'schema' + n + '[' + b + ']',
            F = "' + " + v + " + '"
          e.opts._errorDataPathProperty &&
            (e.errorPath = e.util.getPathExpr(w, v, e.opts.jsonPointers)),
            u &&
              ((o +=
                ' if (' + g + ' && !Array.isArray(' + g + ')) {  var err =   '),
              !1 === e.createErrors
                ? (o += ' {} ')
                : ((o +=
                    " { keyword: 'required' , dataPath: (dataPath || '') + " +
                    e.errorPath +
                    ' , schemaPath: ' +
                    e.util.toQuotedString(s) +
                    " , params: { missingProperty: '" +
                    F +
                    "' } "),
                  !1 !== e.opts.messages &&
                    ((o += " , message: '"),
                    (o += e.opts._errorDataPathProperty
                      ? 'is a required property'
                      : "should have required property \\'" + F + "\\'"),
                    (o += "' ")),
                  e.opts.verbose &&
                    (o +=
                      ' , schema: validate.schema' +
                      i +
                      ' , parentSchema: validate.schema' +
                      e.schemaPath +
                      ' , data: ' +
                      d +
                      ' '),
                  (o += ' } ')),
              (o +=
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' +
                g +
                ' !== undefined) { ')),
            (o +=
              ' for (var ' +
              b +
              ' = 0; ' +
              b +
              ' < ' +
              g +
              '.length; ' +
              b +
              '++) { if (' +
              d +
              '[' +
              g +
              '[' +
              b +
              ']] === undefined) {  var err =   '),
            !1 === e.createErrors
              ? (o += ' {} ')
              : ((o +=
                  " { keyword: 'required' , dataPath: (dataPath || '') + " +
                  e.errorPath +
                  ' , schemaPath: ' +
                  e.util.toQuotedString(s) +
                  " , params: { missingProperty: '" +
                  F +
                  "' } "),
                !1 !== e.opts.messages &&
                  ((o += " , message: '"),
                  (o += e.opts._errorDataPathProperty
                    ? 'is a required property'
                    : "should have required property \\'" + F + "\\'"),
                  (o += "' ")),
                e.opts.verbose &&
                  (o +=
                    ' , schema: validate.schema' +
                    i +
                    ' , parentSchema: validate.schema' +
                    e.schemaPath +
                    ' , data: ' +
                    d +
                    ' '),
                (o += ' } ')),
            (o +=
              ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '),
            u && (o += '  }  ')
        } else
          for (var _ = h, L = -1, R = _.length - 1, P; L < R; ) {
            P = _[(L += 1)]
            var B = e.util.getProperty(P),
              F = e.util.escapeQuotes(P)
            e.opts._errorDataPathProperty &&
              (e.errorPath = e.util.getPath(w, P, e.opts.jsonPointers)),
              (o += ' if (' + d + B + ' === undefined) {  var err =   '),
              !1 === e.createErrors
                ? (o += ' {} ')
                : ((o +=
                    " { keyword: 'required' , dataPath: (dataPath || '') + " +
                    e.errorPath +
                    ' , schemaPath: ' +
                    e.util.toQuotedString(s) +
                    " , params: { missingProperty: '" +
                    F +
                    "' } "),
                  !1 !== e.opts.messages &&
                    ((o += " , message: '"),
                    (o += e.opts._errorDataPathProperty
                      ? 'is a required property'
                      : "should have required property \\'" + F + "\\'"),
                    (o += "' ")),
                  e.opts.verbose &&
                    (o +=
                      ' , schema: validate.schema' +
                      i +
                      ' , parentSchema: validate.schema' +
                      e.schemaPath +
                      ' , data: ' +
                      d +
                      ' '),
                  (o += ' } ')),
              (o +=
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ')
          }
        e.errorPath = w
      } else l && (o += ' if (true) {')
      return o
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'errs__' + n,
        u = e.util.copy(e),
        p = ''
      u.level++
      var g = 'valid' + u.level,
        h = 'ifPassed' + e.level,
        m = u.baseId,
        f
      o += 'var ' + h + ';'
      var y = a
      if (y)
        for (var A = -1, C = y.length - 1, w; A < C; ) {
          if (
            ((w = y[(A += 1)]),
            A && !f && ((o += ' if (!' + h + ') { '), (p += '}')),
            w.if && e.util.schemaHasRules(w.if, e.RULES.all))
          ) {
            o += ' var ' + c + ' = errors;   '
            var E = e.compositeRule
            if (
              ((e.compositeRule = u.compositeRule = !0),
              (u.createErrors = !1),
              (u.schema = w.if),
              (u.schemaPath = i + '[' + A + '].if'),
              (u.errSchemaPath = s + '/' + A + '/if'),
              (o += '  ' + e.validate(u) + ' '),
              (u.baseId = m),
              (u.createErrors = !0),
              (e.compositeRule = u.compositeRule = E),
              (o += ' ' + h + ' = ' + g + '; if (' + h + ') {  '),
              'boolean' == typeof w.then)
            ) {
              if (!1 === w.then) {
                var b = b || []
                b.push(o),
                  (o = ''),
                  !1 === e.createErrors
                    ? (o += ' {} ')
                    : ((o +=
                        " { keyword: 'switch' , dataPath: (dataPath || '') + " +
                        e.errorPath +
                        ' , schemaPath: ' +
                        e.util.toQuotedString(s) +
                        ' , params: { caseIndex: ' +
                        A +
                        ' } '),
                      !1 !== e.opts.messages &&
                        (o +=
                          ' , message: \'should pass "switch" keyword validation\' '),
                      e.opts.verbose &&
                        (o +=
                          ' , schema: validate.schema' +
                          i +
                          ' , parentSchema: validate.schema' +
                          e.schemaPath +
                          ' , data: ' +
                          d +
                          ' '),
                      (o += ' } '))
                var v = o
                ;(o = b.pop()),
                  (o +=
                    !e.compositeRule && l
                      ? e.async
                        ? ' throw new ValidationError([' + v + ']); '
                        : ' validate.errors = [' + v + ']; return false; '
                      : ' var err = ' +
                        v +
                        ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ')
              }
              o += ' var ' + g + ' = ' + w.then + '; '
            } else
              (u.schema = w.then),
                (u.schemaPath = i + '[' + A + '].then'),
                (u.errSchemaPath = s + '/' + A + '/then'),
                (o += '  ' + e.validate(u) + ' '),
                (u.baseId = m)
            o +=
              '  } else {  errors = ' +
              c +
              '; if (vErrors !== null) { if (' +
              c +
              ') vErrors.length = ' +
              c +
              '; else vErrors = null; } } '
          } else if (
            ((o += ' ' + h + ' = true;  '), 'boolean' == typeof w.then)
          ) {
            if (!1 === w.then) {
              var b = b || []
              b.push(o),
                (o = ''),
                !1 === e.createErrors
                  ? (o += ' {} ')
                  : ((o +=
                      " { keyword: 'switch' , dataPath: (dataPath || '') + " +
                      e.errorPath +
                      ' , schemaPath: ' +
                      e.util.toQuotedString(s) +
                      ' , params: { caseIndex: ' +
                      A +
                      ' } '),
                    !1 !== e.opts.messages &&
                      (o +=
                        ' , message: \'should pass "switch" keyword validation\' '),
                    e.opts.verbose &&
                      (o +=
                        ' , schema: validate.schema' +
                        i +
                        ' , parentSchema: validate.schema' +
                        e.schemaPath +
                        ' , data: ' +
                        d +
                        ' '),
                    (o += ' } '))
              var v = o
              ;(o = b.pop()),
                (o +=
                  !e.compositeRule && l
                    ? e.async
                      ? ' throw new ValidationError([' + v + ']); '
                      : ' validate.errors = [' + v + ']; return false; '
                    : ' var err = ' +
                      v +
                      ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ')
            }
            o += ' var ' + g + ' = ' + w.then + '; '
          } else
            (u.schema = w.then),
              (u.schemaPath = i + '[' + A + '].then'),
              (u.errSchemaPath = s + '/' + A + '/then'),
              (o += '  ' + e.validate(u) + ' '),
              (u.baseId = m)
          f = w.continue
        }
      return (
        (o += '' + p + 'var ' + ('valid' + n) + ' = ' + g + '; '),
        (o = e.util.cleanUpCode(o)),
        o
      )
    }
  },
  function(e) {
    'use strict'
    e.exports = function(e, t) {
      var o = ' ',
        n = e.level,
        r = e.dataLevel,
        a = e.schema[t],
        i = e.schemaPath + e.util.getProperty(t),
        s = e.errSchemaPath + '/' + t,
        l = !e.opts.allErrors,
        d = 'data' + (r || ''),
        c = 'valid' + n,
        u = e.opts.v5 && a && a.$data,
        p
      if (
        (u
          ? ((o +=
              ' var schema' +
              n +
              ' = ' +
              e.util.getData(a.$data, r, e.dataPathArr) +
              '; '),
            (p = 'schema' + n))
          : (p = a),
        (a || u) && !1 !== e.opts.uniqueItems)
      ) {
        u &&
          (o +=
            ' var ' +
            c +
            '; if (' +
            p +
            ' === false || ' +
            p +
            ' === undefined) ' +
            c +
            ' = true; else if (typeof ' +
            p +
            " != 'boolean') " +
            c +
            ' = false; else { '),
          (o +=
            ' var ' +
            c +
            ' = true; if (' +
            d +
            '.length > 1) { var i = ' +
            d +
            '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' +
            d +
            '[i], ' +
            d +
            '[j])) { ' +
            c +
            ' = false; break outer; } } } } '),
          u && (o += '  }  '),
          (o += ' if (!' + c + ') {   ')
        var g = g || []
        g.push(o),
          (o = ''),
          !1 === e.createErrors
            ? (o += ' {} ')
            : ((o +=
                " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " +
                e.errorPath +
                ' , schemaPath: ' +
                e.util.toQuotedString(s) +
                ' , params: { i: i, j: j } '),
              !1 !== e.opts.messages &&
                (o +=
                  " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),
              e.opts.verbose &&
                ((o += ' , schema:  '),
                (o += u ? 'validate.schema' + i : '' + a),
                (o +=
                  '         , parentSchema: validate.schema' +
                  e.schemaPath +
                  ' , data: ' +
                  d +
                  ' ')),
              (o += ' } '))
        var h = o
        ;(o = g.pop()),
          (o +=
            !e.compositeRule && l
              ? e.async
                ? ' throw new ValidationError([' + h + ']); '
                : ' validate.errors = [' + h + ']; return false; '
              : ' var err = ' +
                h +
                ';  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '),
          (o += ' } '),
          l && (o += ' else { ')
      } else l && (o += ' if (true) { ')
      return o
    }
  },
  function(e, t, o) {
    'use strict'
    var n = /^[a-z_$][a-z0-9_$\-]*$/i,
      r = o(350)
    e.exports = {
      add: function(e, t) {
        function o(e, t, o) {
          for (var n = 0, a, i; n < s.length; n++)
            if (((i = s[n]), i.type == t)) {
              a = i
              break
            }
          a || ((a = { type: t, rules: [] }), s.push(a))
          var l = { keyword: e, definition: o, custom: !0, code: r }
          a.rules.push(l), (s.custom[e] = l)
        }
        function a(e) {
          if (!s.types[e]) throw new Error('Unknown type ' + e)
        }
        var s = this.RULES
        if (s.keywords[e])
          throw new Error('Keyword ' + e + ' is already defined')
        if (!n.test(e))
          throw new Error('Keyword ' + e + ' is not a valid identifier')
        if (t) {
          if (t.macro && void 0 !== t.valid)
            throw new Error('"valid" option cannot be used with macro keywords')
          var l = t.type
          if (Array.isArray(l)) {
            var d = l.length,
              c
            for (c = 0; c < d; c++) a(l[c])
            for (c = 0; c < d; c++) o(e, l[c], t)
          } else l && a(l), o(e, l, t)
          var i = !0 === t.$data && this._opts.v5
          if (i && !t.validate)
            throw new Error('$data support: "validate" function is not defined')
          var u = t.metaSchema
          u &&
            (i &&
              (u = {
                anyOf: [
                  u,
                  {
                    $ref:
                      'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data'
                  }
                ]
              }),
            (t.validateSchema = this.compile(u, !0)))
        }
        s.keywords[e] = s.all[e] = !0
      },
      get: function(e) {
        var t = this.RULES.custom[e]
        return t ? t.definition : this.RULES.keywords[e] || !1
      },
      remove: function(e) {
        var t = this.RULES
        delete t.keywords[e], delete t.all[e], delete t.custom[e]
        for (var o = 0, n; o < t.length; o++) {
          n = t[o].rules
          for (var r = 0; r < n.length; r++)
            if (n[r].keyword == e) {
              n.splice(r, 1)
              break
            }
        }
      }
    }
  },
  function(e) {
    e.exports = {
      id: 'http://json-schema.org/draft-04/schema#',
      $schema: 'http://json-schema.org/draft-04/schema#',
      description: 'Core schema meta-schema',
      definitions: {
        schemaArray: { type: 'array', minItems: 1, items: { $ref: '#' } },
        positiveInteger: { type: 'integer', minimum: 0 },
        positiveIntegerDefault0: {
          allOf: [{ $ref: '#/definitions/positiveInteger' }, { default: 0 }]
        },
        simpleTypes: {
          enum: [
            'array',
            'boolean',
            'integer',
            'null',
            'number',
            'object',
            'string'
          ]
        },
        stringArray: {
          type: 'array',
          items: { type: 'string' },
          minItems: 1,
          uniqueItems: !0
        }
      },
      type: 'object',
      properties: {
        id: { type: 'string', format: 'uri' },
        $schema: { type: 'string', format: 'uri' },
        title: { type: 'string' },
        description: { type: 'string' },
        default: {},
        multipleOf: { type: 'number', minimum: 0, exclusiveMinimum: !0 },
        maximum: { type: 'number' },
        exclusiveMaximum: { type: 'boolean', default: !1 },
        minimum: { type: 'number' },
        exclusiveMinimum: { type: 'boolean', default: !1 },
        maxLength: { $ref: '#/definitions/positiveInteger' },
        minLength: { $ref: '#/definitions/positiveIntegerDefault0' },
        pattern: { type: 'string', format: 'regex' },
        additionalItems: {
          anyOf: [{ type: 'boolean' }, { $ref: '#' }],
          default: {}
        },
        items: {
          anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],
          default: {}
        },
        maxItems: { $ref: '#/definitions/positiveInteger' },
        minItems: { $ref: '#/definitions/positiveIntegerDefault0' },
        uniqueItems: { type: 'boolean', default: !1 },
        maxProperties: { $ref: '#/definitions/positiveInteger' },
        minProperties: { $ref: '#/definitions/positiveIntegerDefault0' },
        required: { $ref: '#/definitions/stringArray' },
        additionalProperties: {
          anyOf: [{ type: 'boolean' }, { $ref: '#' }],
          default: {}
        },
        definitions: {
          type: 'object',
          additionalProperties: { $ref: '#' },
          default: {}
        },
        properties: {
          type: 'object',
          additionalProperties: { $ref: '#' },
          default: {}
        },
        patternProperties: {
          type: 'object',
          additionalProperties: { $ref: '#' },
          default: {}
        },
        dependencies: {
          type: 'object',
          additionalProperties: {
            anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }]
          }
        },
        enum: { type: 'array', minItems: 1, uniqueItems: !0 },
        type: {
          anyOf: [
            { $ref: '#/definitions/simpleTypes' },
            {
              type: 'array',
              items: { $ref: '#/definitions/simpleTypes' },
              minItems: 1,
              uniqueItems: !0
            }
          ]
        },
        allOf: { $ref: '#/definitions/schemaArray' },
        anyOf: { $ref: '#/definitions/schemaArray' },
        oneOf: { $ref: '#/definitions/schemaArray' },
        not: { $ref: '#' }
      },
      dependencies: {
        exclusiveMaximum: ['maximum'],
        exclusiveMinimum: ['minimum']
      },
      default: {}
    }
  },
  function(e) {
    e.exports = {
      id:
        'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#',
      $schema: 'http://json-schema.org/draft-04/schema#',
      description: 'Core schema meta-schema (v5 proposals)',
      definitions: {
        schemaArray: { type: 'array', minItems: 1, items: { $ref: '#' } },
        positiveInteger: { type: 'integer', minimum: 0 },
        positiveIntegerDefault0: {
          allOf: [{ $ref: '#/definitions/positiveInteger' }, { default: 0 }]
        },
        simpleTypes: {
          enum: [
            'array',
            'boolean',
            'integer',
            'null',
            'number',
            'object',
            'string'
          ]
        },
        stringArray: {
          type: 'array',
          items: { type: 'string' },
          minItems: 1,
          uniqueItems: !0
        },
        $data: {
          type: 'object',
          required: ['$data'],
          properties: {
            $data: {
              type: 'string',
              anyOf: [
                { format: 'relative-json-pointer' },
                { format: 'json-pointer' }
              ]
            }
          },
          additionalProperties: !1
        }
      },
      type: 'object',
      properties: {
        id: { type: 'string', format: 'uri' },
        $schema: { type: 'string', format: 'uri' },
        title: { type: 'string' },
        description: { type: 'string' },
        default: {},
        multipleOf: {
          anyOf: [
            { type: 'number', minimum: 0, exclusiveMinimum: !0 },
            { $ref: '#/definitions/$data' }
          ]
        },
        maximum: {
          anyOf: [{ type: 'number' }, { $ref: '#/definitions/$data' }]
        },
        exclusiveMaximum: {
          anyOf: [
            { type: 'boolean', default: !1 },
            { $ref: '#/definitions/$data' }
          ]
        },
        minimum: {
          anyOf: [{ type: 'number' }, { $ref: '#/definitions/$data' }]
        },
        exclusiveMinimum: {
          anyOf: [
            { type: 'boolean', default: !1 },
            { $ref: '#/definitions/$data' }
          ]
        },
        maxLength: {
          anyOf: [
            { $ref: '#/definitions/positiveInteger' },
            { $ref: '#/definitions/$data' }
          ]
        },
        minLength: {
          anyOf: [
            { $ref: '#/definitions/positiveIntegerDefault0' },
            { $ref: '#/definitions/$data' }
          ]
        },
        pattern: {
          anyOf: [
            { type: 'string', format: 'regex' },
            { $ref: '#/definitions/$data' }
          ]
        },
        additionalItems: {
          anyOf: [
            { type: 'boolean' },
            { $ref: '#' },
            { $ref: '#/definitions/$data' }
          ],
          default: {}
        },
        items: {
          anyOf: [{ $ref: '#' }, { $ref: '#/definitions/schemaArray' }],
          default: {}
        },
        maxItems: {
          anyOf: [
            { $ref: '#/definitions/positiveInteger' },
            { $ref: '#/definitions/$data' }
          ]
        },
        minItems: {
          anyOf: [
            { $ref: '#/definitions/positiveIntegerDefault0' },
            { $ref: '#/definitions/$data' }
          ]
        },
        uniqueItems: {
          anyOf: [
            { type: 'boolean', default: !1 },
            { $ref: '#/definitions/$data' }
          ]
        },
        maxProperties: {
          anyOf: [
            { $ref: '#/definitions/positiveInteger' },
            { $ref: '#/definitions/$data' }
          ]
        },
        minProperties: {
          anyOf: [
            { $ref: '#/definitions/positiveIntegerDefault0' },
            { $ref: '#/definitions/$data' }
          ]
        },
        required: {
          anyOf: [
            { $ref: '#/definitions/stringArray' },
            { $ref: '#/definitions/$data' }
          ]
        },
        additionalProperties: {
          anyOf: [
            { type: 'boolean' },
            { $ref: '#' },
            { $ref: '#/definitions/$data' }
          ],
          default: {}
        },
        definitions: {
          type: 'object',
          additionalProperties: { $ref: '#' },
          default: {}
        },
        properties: {
          type: 'object',
          additionalProperties: { $ref: '#' },
          default: {}
        },
        patternProperties: {
          type: 'object',
          additionalProperties: { $ref: '#' },
          default: {}
        },
        dependencies: {
          type: 'object',
          additionalProperties: {
            anyOf: [{ $ref: '#' }, { $ref: '#/definitions/stringArray' }]
          }
        },
        enum: {
          anyOf: [
            { type: 'array', minItems: 1, uniqueItems: !0 },
            { $ref: '#/definitions/$data' }
          ]
        },
        type: {
          anyOf: [
            { $ref: '#/definitions/simpleTypes' },
            {
              type: 'array',
              items: { $ref: '#/definitions/simpleTypes' },
              minItems: 1,
              uniqueItems: !0
            }
          ]
        },
        allOf: { $ref: '#/definitions/schemaArray' },
        anyOf: { $ref: '#/definitions/schemaArray' },
        oneOf: { $ref: '#/definitions/schemaArray' },
        not: { $ref: '#' },
        format: {
          anyOf: [{ type: 'string' }, { $ref: '#/definitions/$data' }]
        },
        formatMaximum: {
          anyOf: [{ type: 'string' }, { $ref: '#/definitions/$data' }]
        },
        formatMinimum: {
          anyOf: [{ type: 'string' }, { $ref: '#/definitions/$data' }]
        },
        formatExclusiveMaximum: {
          anyOf: [
            { type: 'boolean', default: !1 },
            { $ref: '#/definitions/$data' }
          ]
        },
        formatExclusiveMinimum: {
          anyOf: [
            { type: 'boolean', default: !1 },
            { $ref: '#/definitions/$data' }
          ]
        },
        constant: { anyOf: [{}, { $ref: '#/definitions/$data' }] },
        contains: { $ref: '#' },
        patternGroups: {
          type: 'object',
          additionalProperties: {
            type: 'object',
            required: ['schema'],
            properties: {
              maximum: {
                anyOf: [
                  { $ref: '#/definitions/positiveInteger' },
                  { $ref: '#/definitions/$data' }
                ]
              },
              minimum: {
                anyOf: [
                  { $ref: '#/definitions/positiveIntegerDefault0' },
                  { $ref: '#/definitions/$data' }
                ]
              },
              schema: { $ref: '#' }
            },
            additionalProperties: !1
          },
          default: {}
        },
        switch: {
          type: 'array',
          items: {
            required: ['then'],
            properties: {
              if: { $ref: '#' },
              then: { anyOf: [{ type: 'boolean' }, { $ref: '#' }] },
              continue: { type: 'boolean' }
            },
            additionalProperties: !1,
            dependencies: { continue: ['if'] }
          }
        }
      },
      dependencies: {
        exclusiveMaximum: ['maximum'],
        exclusiveMinimum: ['minimum'],
        formatMaximum: ['format'],
        formatMinimum: ['format'],
        formatExclusiveMaximum: ['formatMaximum'],
        formatExclusiveMinimum: ['formatMinimum']
      },
      default: {}
    }
  },
  function(e, t, o) {
    'use strict'
    function n(e) {
      return { not: { items: { not: e } } }
    }
    var r =
      'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json'
    e.exports = {
      enable: function(e) {
        function t(t, o, n) {
          var r = { inline: n || a[t], statements: !0, errors: 'full' }
          o && (r.type = o), e.addKeyword(t, r)
        }
        var a = {
          switch: o(363),
          constant: o(349),
          _formatLimit: o(346),
          patternRequired: o(359)
        }
        if (!1 !== e._opts.meta) {
          var i = o(367)
          e.addMetaSchema(i, r)
        }
        t('constant'),
          e.addKeyword('contains', { type: 'array', macro: n }),
          t('formatMaximum', 'string', a._formatLimit),
          t('formatMinimum', 'string', a._formatLimit),
          e.addKeyword('formatExclusiveMaximum'),
          e.addKeyword('formatExclusiveMinimum'),
          e.addKeyword('patternGroups'),
          t('patternRequired', 'object'),
          t('switch')
      },
      META_SCHEMA_ID: r
    }
  },
  function(e) {
    'use strict'
    function t() {
      this.locked = !1
    }
    ;(t.prototype.highlight = function(e) {
      this.locked ||
        (this.node != e &&
          (this.node && this.node.setHighlight(!1),
          (this.node = e),
          this.node.setHighlight(!0)),
        this._cancelUnhighlight())
    }),
      (t.prototype.unhighlight = function() {
        if (!this.locked) {
          var e = this
          this.node &&
            (this._cancelUnhighlight(),
            (this.unhighlightTimer = setTimeout(function() {
              e.node.setHighlight(!1),
                (e.node = void 0),
                (e.unhighlightTimer = void 0)
            }, 0)))
        }
      }),
      (t.prototype._cancelUnhighlight = function() {
        this.unhighlightTimer &&
          (clearTimeout(this.unhighlightTimer),
          (this.unhighlightTimer = void 0))
      }),
      (t.prototype.lock = function() {
        this.locked = !0
      }),
      (t.prototype.unlock = function() {
        this.locked = !1
      }),
      (e.exports = t)
  },
  function(e, t, o) {
    'use strict'
    function n(e) {
      ;(this.editor = e),
        (this.history = []),
        (this.index = -1),
        this.clear(),
        (this.actions = {
          editField: {
            undo: function(e) {
              e.node.updateField(e.oldValue)
            },
            redo: function(e) {
              e.node.updateField(e.newValue)
            }
          },
          editValue: {
            undo: function(e) {
              e.node.updateValue(e.oldValue)
            },
            redo: function(e) {
              e.node.updateValue(e.newValue)
            }
          },
          changeType: {
            undo: function(e) {
              e.node.changeType(e.oldType)
            },
            redo: function(e) {
              e.node.changeType(e.newType)
            }
          },
          appendNodes: {
            undo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.removeChild(t)
              })
            },
            redo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.appendChild(t)
              })
            }
          },
          insertBeforeNodes: {
            undo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.removeChild(t)
              })
            },
            redo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.insertBefore(t, e.beforeNode)
              })
            }
          },
          insertAfterNodes: {
            undo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.removeChild(t)
              })
            },
            redo: function(e) {
              var t = e.afterNode
              e.nodes.forEach(function(o) {
                e.parent.insertAfter(e.node, t), (t = o)
              })
            }
          },
          removeNodes: {
            undo: function(e) {
              var t = e.parent,
                o = t.childs[e.index] || t.append
              e.nodes.forEach(function(e) {
                t.insertBefore(e, o)
              })
            },
            redo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.removeChild(t)
              })
            }
          },
          duplicateNodes: {
            undo: function(e) {
              e.nodes.forEach(function(t) {
                e.parent.removeChild(t)
              })
            },
            redo: function(e) {
              var t = e.afterNode
              e.nodes.forEach(function(o) {
                e.parent.insertAfter(o, t), (t = o)
              })
            }
          },
          moveNodes: {
            undo: function(e) {
              e.nodes.forEach(function(t) {
                e.oldBeforeNode.parent.moveBefore(t, e.oldBeforeNode)
              })
            },
            redo: function(e) {
              e.nodes.forEach(function(t) {
                e.newBeforeNode.parent.moveBefore(t, e.newBeforeNode)
              })
            }
          },
          sort: {
            undo: function(e) {
              var t = e.node
              t.hideChilds(),
                (t.sort = e.oldSort),
                (t.childs = e.oldChilds),
                t.showChilds()
            },
            redo: function(e) {
              var t = e.node
              t.hideChilds(),
                (t.sort = e.newSort),
                (t.childs = e.newChilds),
                t.showChilds()
            }
          }
        })
    }
    o(11)
    ;(n.prototype.onChange = function() {}),
      (n.prototype.add = function(e, t) {
        this.index++,
          (this.history[this.index] = {
            action: e,
            params: t,
            timestamp: new Date()
          }),
          this.index < this.history.length - 1 &&
            this.history.splice(
              this.index + 1,
              this.history.length - this.index - 1
            ),
          this.onChange()
      }),
      (n.prototype.clear = function() {
        ;(this.history = []), (this.index = -1), this.onChange()
      }),
      (n.prototype.canUndo = function() {
        return 0 <= this.index
      }),
      (n.prototype.canRedo = function() {
        return this.index < this.history.length - 1
      }),
      (n.prototype.undo = function() {
        if (this.canUndo()) {
          var e = this.history[this.index]
          if (e) {
            var t = this.actions[e.action]
            t && t.undo
              ? (t.undo(e.params),
                e.params.oldSelection &&
                  this.editor.setSelection(e.params.oldSelection))
              : console.error(new Error('unknown action "' + e.action + '"'))
          }
          this.index--, this.onChange()
        }
      }),
      (n.prototype.redo = function() {
        if (this.canRedo()) {
          this.index++
          var e = this.history[this.index]
          if (e) {
            var t = this.actions[e.action]
            t && t.redo
              ? (t.redo(e.params),
                e.params.newSelection &&
                  this.editor.setSelection(e.params.newSelection))
              : console.error(new Error('unknown action "' + e.action + '"'))
          }
          this.onChange()
        }
      }),
      (n.prototype.destroy = function() {
        ;(this.editor = null), (this.history = []), (this.index = -1)
      }),
      (e.exports = n)
  },
  function(e, t, o) {
    'use strict'
    function n(e, t, o) {
      if (!(this instanceof n))
        throw new Error('JSONEditor constructor called without "new".')
      var r = s.getInternetExplorerVersion()
      if (-1 != r && 9 > r)
        throw new Error(
          'Unsupported browser, IE9 or newer required. Please install the newest version of your browser.'
        )
      if (
        t &&
        (t.error &&
          (console.warn('Option "error" has been renamed to "onError"'),
          (t.onError = t.error),
          delete t.error),
        t.change &&
          (console.warn('Option "change" has been renamed to "onChange"'),
          (t.onChange = t.change),
          delete t.change),
        t.editable &&
          (console.warn('Option "editable" has been renamed to "onEditable"'),
          (t.onEditable = t.editable),
          delete t.editable),
        t)
      ) {
        var a = [
          'ace',
          'theme',
          'ajv',
          'schema',
          'templates',
          'onChange',
          'onEditable',
          'onError',
          'onModeChange',
          'escapeUnicode',
          'history',
          'search',
          'mode',
          'modes',
          'name',
          'indentation',
          'sortObjectKeys'
        ]
        Object.keys(t).forEach(function(e) {
          ;-1 === a.indexOf(e) &&
            console.warn(
              'Unknown option "' + e + '". This option will be ignored'
            )
        })
      }
      arguments.length && this._create(e, t, o)
    }
    var r
    try {
      r = o(338)
    } catch (e) {}
    var a = o(379),
      i = o(378),
      s = o(11)
    ;(n.modes = {}),
      (n.prototype.DEBOUNCE_INTERVAL = 150),
      (n.prototype._create = function(e, t, o) {
        ;(this.container = e), (this.options = t || {}), (this.json = o || {})
        var n = this.options.mode || 'tree'
        this.setMode(n)
      }),
      (n.prototype.destroy = function() {}),
      (n.prototype.set = function(e) {
        this.json = e
      }),
      (n.prototype.get = function() {
        return this.json
      }),
      (n.prototype.setText = function(e) {
        this.json = s.parse(e)
      }),
      (n.prototype.getText = function() {
        return JSON.stringify(this.json)
      }),
      (n.prototype.setName = function(e) {
        this.options || (this.options = {}), (this.options.name = e)
      }),
      (n.prototype.getName = function() {
        return this.options && this.options.name
      }),
      (n.prototype.setMode = function(e) {
        var t = this.container,
          o = s.extend({}, this.options),
          r = o.mode,
          a,
          i
        o.mode = e
        var l = n.modes[e]
        if (l)
          try {
            var d = 'text' == l.data
            if (
              ((i = this.getName()),
              (a = this[d ? 'getText' : 'get']()),
              this.destroy(),
              s.clear(this),
              s.extend(this, l.mixin),
              this.create(t, o),
              this.setName(i),
              this[d ? 'setText' : 'set'](a),
              'function' == typeof l.load)
            )
              try {
                l.load.call(this)
              } catch (e) {
                console.error(e)
              }
            if ('function' == typeof o.onModeChange && e !== r)
              try {
                o.onModeChange(e, r)
              } catch (e) {
                console.error(e)
              }
          } catch (e) {
            this._onError(e)
          }
        else throw new Error('Unknown mode "' + o.mode + '"')
      }),
      (n.prototype.getMode = function() {
        return this.options.mode
      }),
      (n.prototype._onError = function(e) {
        if (this.options && 'function' == typeof this.options.onError)
          this.options.onError(e)
        else throw e
      }),
      (n.prototype.setSchema = function(e) {
        if (e) {
          var t
          try {
            t = this.options.ajv || r({ allErrors: !0, verbose: !0 })
          } catch (e) {
            console.warn(
              'Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.'
            )
          }
          t &&
            ((this.validateSchema = t.compile(e)),
            (this.options.schema = e),
            this.validate()),
            this.refresh()
        } else
          (this.validateSchema = null),
            (this.options.schema = null),
            this.validate(),
            this.refresh()
      }),
      (n.prototype.validate = function() {}),
      (n.prototype.refresh = function() {}),
      (n.registerMode = function(e) {
        var t, o
        if (s.isArray(e)) for (t = 0; t < e.length; t++) n.registerMode(e[t])
        else {
          if (!('mode' in e)) throw new Error('Property "mode" missing')
          if (!('mixin' in e)) throw new Error('Property "mixin" missing')
          if (!('data' in e)) throw new Error('Property "data" missing')
          var r = e.mode
          if (r in n.modes)
            throw new Error('Mode "' + r + '" already registered')
          if ('function' != typeof e.mixin.create)
            throw new Error('Required function "create" missing on mixin')
          var a = ['setMode', 'registerMode', 'modes']
          for (t = 0; t < a.length; t++)
            if (((o = a[t]), o in e.mixin))
              throw new Error(
                'Reserved property "' + o + '" not allowed in mixin'
              )
          n.modes[r] = e
        }
      }),
      n.registerMode(a),
      n.registerMode(i),
      (e.exports = n)
  },
  function(e, t, o) {
    'use strict'
    function n(e, t) {
      ;(this.editor = e),
        (this.dom = {}),
        (this.expanded = !1),
        t && t instanceof Object
          ? (this.setField(t.field, t.fieldEditable),
            this.setValue(t.value, t.type))
          : (this.setField(''), this.setValue(null)),
        (this._debouncedOnChangeValue = s.debounce(
          this._onChangeValue.bind(this),
          n.prototype.DEBOUNCE_INTERVAL
        )),
        (this._debouncedOnChangeField = s.debounce(
          this._onChangeField.bind(this),
          n.prototype.DEBOUNCE_INTERVAL
        ))
    }
    var r = o(337),
      a = o(36),
      i = o(376),
      s = o(11)
    ;(n.prototype.DEBOUNCE_INTERVAL = 150),
      (n.prototype._updateEditability = function() {
        if (
          ((this.editable = { field: !0, value: !0 }),
          this.editor &&
            ((this.editable.field = 'tree' === this.editor.options.mode),
            (this.editable.value = 'view' !== this.editor.options.mode),
            ('tree' === this.editor.options.mode ||
              'form' === this.editor.options.mode) &&
              'function' == typeof this.editor.options.onEditable))
        ) {
          var e = this.editor.options.onEditable({
            field: this.field,
            value: this.value,
            path: this.getPath()
          })
          'boolean' == typeof e
            ? ((this.editable.field = e), (this.editable.value = e))
            : ('boolean' == typeof e.field && (this.editable.field = e.field),
              'boolean' == typeof e.value && (this.editable.value = e.value))
        }
      }),
      (n.prototype.getPath = function() {
        for (var e = this, t = []; e; ) {
          var o = e.parent
            ? 'array' == e.parent.type
              ? e.index
              : e.field
            : void 0
          o !== void 0 && t.unshift(o), (e = e.parent)
        }
        return t
      }),
      (n.prototype.findNode = function(e) {
        for (var t = s.parsePath(e), o = this; o && 0 < t.length; ) {
          var n = t.shift()
          if ('number' == typeof n) {
            if ('array' !== o.type)
              throw new Error(
                'Cannot get child node at index ' + n + ': node is no array'
              )
            o = o.childs[n]
          } else {
            if ('object' !== o.type)
              throw new Error(
                'Cannot get child node ' + n + ': node is no object'
              )
            o = o.childs.filter(function(e) {
              return e.field === n
            })[0]
          }
        }
        return o
      }),
      (n.prototype.findParents = function() {
        for (var e = [], t = this.parent; t; ) e.unshift(t), (t = t.parent)
        return e
      }),
      (n.prototype.setError = function(e, t) {
        this.getDom(), (this.error = e)
        var o = this.dom.tdError
        if (e) {
          o ||
            ((o = document.createElement('td')),
            (this.dom.tdError = o),
            this.dom.tdValue.parentNode.appendChild(o))
          var n = document.createElement('div')
          ;(n.className = 'jsoneditor-popover jsoneditor-right'),
            n.appendChild(document.createTextNode(e.message))
          var r = document.createElement('button')
          for (
            r.type = 'button',
              r.className = 'jsoneditor-schema-error',
              r.appendChild(n),
              r.onmouseover = r.onfocus = function() {
                for (
                  var e = ['right', 'above', 'below', 'left'], t = 0, o;
                  t < e.length;
                  t++
                ) {
                  ;(o = e[t]),
                    (n.className = 'jsoneditor-popover jsoneditor-' + o)
                  var r = this.editor.content.getBoundingClientRect(),
                    a = n.getBoundingClientRect(),
                    i = s.insideRect(r, a, 20)
                  if (i) break
                }
              }.bind(this),
              t &&
                (r.onclick = function() {
                  t.findParents().forEach(function(e) {
                    e.expand(!1)
                  }),
                    t.scrollTo(function() {
                      t.focus()
                    })
                });
            o.firstChild;

          )
            o.removeChild(o.firstChild)
          o.appendChild(r)
        } else
          o &&
            (this.dom.tdError.parentNode.removeChild(this.dom.tdError),
            delete this.dom.tdError)
      }),
      (n.prototype.getIndex = function() {
        return this.parent ? this.parent.childs.indexOf(this) : -1
      }),
      (n.prototype.setParent = function(e) {
        this.parent = e
      }),
      (n.prototype.setField = function(e, t) {
        ;(this.field = e),
          (this.previousField = e),
          (this.fieldEditable = !0 === t)
      }),
      (n.prototype.getField = function() {
        return void 0 === this.field && this._getDomField(), this.field
      }),
      (n.prototype.setValue = function(e, t) {
        var o = this.childs,
          r,
          a
        if (o) for (; o.length; ) this.removeChild(o[0])
        if (((this.type = this._getType(e)), t && t != this.type))
          if ('string' == t && 'auto' == this.type) this.type = t
          else
            throw new Error(
              'Type mismatch: cannot cast value of type "' +
                this.type +
                ' to the specified type "' +
                t +
                '"'
            )
        if ('array' == this.type) {
          this.childs = []
          for (var s = 0, i = e.length; s < i; s++)
            (r = e[s]),
              void 0 === r ||
                r instanceof Function ||
                ((a = new n(this.editor, { value: r })), this.appendChild(a))
          this.value = ''
        } else if ('object' == this.type) {
          for (var l in ((this.childs = []), e))
            e.hasOwnProperty(l) &&
              ((r = e[l]),
              void 0 === r ||
                r instanceof Function ||
                ((a = new n(this.editor, { field: l, value: r })),
                this.appendChild(a)))
          ;(this.value = ''),
            !0 === this.editor.options.sortObjectKeys && this.sort('asc')
        } else (this.childs = void 0), (this.value = e)
        this.previousValue = this.value
      }),
      (n.prototype.getValue = function() {
        if ('array' == this.type) {
          var e = []
          return (
            this.childs.forEach(function(t) {
              e.push(t.getValue())
            }),
            e
          )
        }
        if ('object' == this.type) {
          var t = {}
          return (
            this.childs.forEach(function(e) {
              t[e.getField()] = e.getValue()
            }),
            t
          )
        }
        return void 0 === this.value && this._getDomValue(), this.value
      }),
      (n.prototype.getLevel = function() {
        return this.parent ? this.parent.getLevel() + 1 : 0
      }),
      (n.prototype.getNodePath = function() {
        var e = this.parent ? this.parent.getNodePath() : []
        return e.push(this), e
      }),
      (n.prototype.clone = function() {
        var e = new n(this.editor)
        if (
          ((e.type = this.type),
          (e.field = this.field),
          (e.fieldInnerText = this.fieldInnerText),
          (e.fieldEditable = this.fieldEditable),
          (e.value = this.value),
          (e.valueInnerText = this.valueInnerText),
          (e.expanded = this.expanded),
          this.childs)
        ) {
          var t = []
          this.childs.forEach(function(o) {
            var n = o.clone()
            n.setParent(e), t.push(n)
          }),
            (e.childs = t)
        } else e.childs = void 0
        return e
      }),
      (n.prototype.expand = function(e) {
        this.childs &&
          ((this.expanded = !0),
          this.dom.expand &&
            (this.dom.expand.className = 'jsoneditor-expanded'),
          this.showChilds(),
          !1 !== e &&
            this.childs.forEach(function(t) {
              t.expand(e)
            }))
      }),
      (n.prototype.collapse = function(e) {
        this.childs &&
          (this.hideChilds(),
          !1 !== e &&
            this.childs.forEach(function(t) {
              t.collapse(e)
            }),
          this.dom.expand &&
            (this.dom.expand.className = 'jsoneditor-collapsed'),
          (this.expanded = !1))
      }),
      (n.prototype.showChilds = function() {
        var e = this.childs
        if (e && this.expanded) {
          var t = this.dom.tr,
            o = t ? t.parentNode : void 0
          if (o) {
            var n = this.getAppend(),
              r = t.nextSibling
            r ? o.insertBefore(n, r) : o.appendChild(n),
              this.childs.forEach(function(e) {
                o.insertBefore(e.getDom(), n), e.showChilds()
              })
          }
        }
      }),
      (n.prototype.hide = function() {
        var e = this.dom.tr,
          t = e ? e.parentNode : void 0
        t && t.removeChild(e), this.hideChilds()
      }),
      (n.prototype.hideChilds = function() {
        var e = this.childs
        if (e && this.expanded) {
          var t = this.getAppend()
          t.parentNode && t.parentNode.removeChild(t),
            this.childs.forEach(function(e) {
              e.hide()
            })
        }
      }),
      (n.prototype.appendChild = function(e) {
        if (this._hasChilds()) {
          if (
            (e.setParent(this),
            (e.fieldEditable = 'object' == this.type),
            'array' == this.type && (e.index = this.childs.length),
            this.childs.push(e),
            this.expanded)
          ) {
            var t = e.getDom(),
              o = this.getAppend(),
              n = o ? o.parentNode : void 0
            o && n && n.insertBefore(t, o), e.showChilds()
          }
          this.updateDom({ updateIndexes: !0 }), e.updateDom({ recurse: !0 })
        }
      }),
      (n.prototype.moveBefore = function(e, t) {
        if (this._hasChilds()) {
          var o = this.dom.tr ? this.dom.tr.parentNode : void 0
          if (o) {
            var n = document.createElement('tr')
            ;(n.style.height = o.clientHeight + 'px'), o.appendChild(n)
          }
          e.parent && e.parent.removeChild(e),
            t instanceof l ? this.appendChild(e) : this.insertBefore(e, t),
            o && o.removeChild(n)
        }
      }),
      (n.prototype.moveTo = function(e, t) {
        if (e.parent == this) {
          var o = this.childs.indexOf(e)
          o < t && t++
        }
        var n = this.childs[t] || this.append
        this.moveBefore(e, n)
      }),
      (n.prototype.insertBefore = function(e, t) {
        if (this._hasChilds()) {
          if (t == this.append)
            e.setParent(this),
              (e.fieldEditable = 'object' == this.type),
              this.childs.push(e)
          else {
            var o = this.childs.indexOf(t)
            if (-1 == o) throw new Error('Node not found')
            e.setParent(this),
              (e.fieldEditable = 'object' == this.type),
              this.childs.splice(o, 0, e)
          }
          if (this.expanded) {
            var n = e.getDom(),
              r = t.getDom(),
              a = r ? r.parentNode : void 0
            r && a && a.insertBefore(n, r), e.showChilds()
          }
          this.updateDom({ updateIndexes: !0 }), e.updateDom({ recurse: !0 })
        }
      }),
      (n.prototype.insertAfter = function(e, t) {
        if (this._hasChilds()) {
          var o = this.childs.indexOf(t),
            n = this.childs[o + 1]
          n ? this.insertBefore(e, n) : this.appendChild(e)
        }
      }),
      (n.prototype.search = function(e) {
        var t = [],
          o = e ? e.toLowerCase() : void 0,
          n
        if (
          (delete this.searchField,
          delete this.searchValue,
          void 0 != this.field)
        ) {
          var r = (this.field + '').toLowerCase()
          ;(n = r.indexOf(o)),
            -1 != n &&
              ((this.searchField = !0), t.push({ node: this, elem: 'field' })),
            this._updateDomField()
        }
        if (this._hasChilds()) {
          if (this.childs) {
            var a = []
            this.childs.forEach(function(t) {
              a = a.concat(t.search(e))
            }),
              (t = t.concat(a))
          }
          if (void 0 != o) {
            var i = !1
            0 == a.length ? this.collapse(i) : this.expand(i)
          }
        } else {
          if (void 0 != this.value) {
            var s = (this.value + '').toLowerCase()
            ;(n = s.indexOf(o)),
              -1 != n &&
                ((this.searchValue = !0), t.push({ node: this, elem: 'value' }))
          }
          this._updateDomValue()
        }
        return t
      }),
      (n.prototype.scrollTo = function(e) {
        if (!this.dom.tr || !this.dom.tr.parentNode)
          for (var t = this.parent; t; ) t.expand(!1), (t = t.parent)
        this.dom.tr &&
          this.dom.tr.parentNode &&
          this.editor.scrollTo(this.dom.tr.offsetTop, e)
      }),
      (n.focusElement = void 0),
      (n.prototype.focus = function(e) {
        if (((n.focusElement = e), this.dom.tr && this.dom.tr.parentNode)) {
          var t = this.dom
          switch (e) {
            case 'drag':
              t.drag ? t.drag.focus() : t.menu.focus()
              break
            case 'menu':
              t.menu.focus()
              break
            case 'expand':
              this._hasChilds()
                ? t.expand.focus()
                : t.field && this.fieldEditable
                  ? (t.field.focus(), s.selectContentEditable(t.field))
                  : t.value && !this._hasChilds()
                    ? (t.value.focus(), s.selectContentEditable(t.value))
                    : t.menu.focus()
              break
            case 'field':
              t.field && this.fieldEditable
                ? (t.field.focus(), s.selectContentEditable(t.field))
                : t.value && !this._hasChilds()
                  ? (t.value.focus(), s.selectContentEditable(t.value))
                  : this._hasChilds()
                    ? t.expand.focus()
                    : t.menu.focus()
              break
            case 'value':
            default:
              t.select
                ? t.select.focus()
                : t.value && !this._hasChilds()
                  ? (t.value.focus(), s.selectContentEditable(t.value))
                  : t.field && this.fieldEditable
                    ? (t.field.focus(), s.selectContentEditable(t.field))
                    : this._hasChilds()
                      ? t.expand.focus()
                      : t.menu.focus()
          }
        }
      }),
      (n.select = function(e) {
        setTimeout(function() {
          s.selectContentEditable(e)
        }, 0)
      }),
      (n.prototype.blur = function() {
        this._getDomValue(!1), this._getDomField(!1)
      }),
      (n.prototype.containsNode = function(e) {
        if (this == e) return !0
        var t = this.childs
        if (t)
          for (var o = 0, n = t.length; o < n; o++)
            if (t[o].containsNode(e)) return !0
        return !1
      }),
      (n.prototype._move = function(e, t) {
        if (e != t) {
          if (e.containsNode(this))
            throw new Error('Cannot move a field into a child of itself')
          e.parent && e.parent.removeChild(e)
          var o = e.clone()
          e.clearDom(), t ? this.insertBefore(o, t) : this.appendChild(o)
        }
      }),
      (n.prototype.removeChild = function(e) {
        if (this.childs) {
          var t = this.childs.indexOf(e)
          if (-1 != t) {
            e.hide(), delete e.searchField, delete e.searchValue
            var o = this.childs.splice(t, 1)[0]
            return (o.parent = null), this.updateDom({ updateIndexes: !0 }), o
          }
        }
      }),
      (n.prototype._remove = function(e) {
        this.removeChild(e)
      }),
      (n.prototype.changeType = function(e) {
        var t = this.type
        if (t != e) {
          if (('string' == e || 'auto' == e) && ('string' == t || 'auto' == t))
            this.type = e
          else {
            var o = this.dom.tr ? this.dom.tr.parentNode : void 0,
              n
            n = this.expanded ? this.getAppend() : this.getDom()
            var r = n && n.parentNode ? n.nextSibling : void 0
            this.hide(),
              this.clearDom(),
              (this.type = e),
              'object' == e
                ? (!this.childs && (this.childs = []),
                  this.childs.forEach(function(e) {
                    e.clearDom(),
                      delete e.index,
                      (e.fieldEditable = !0),
                      void 0 == e.field && (e.field = '')
                  }),
                  ('string' == t || 'auto' == t) && (this.expanded = !0))
                : 'array' == e
                  ? (!this.childs && (this.childs = []),
                    this.childs.forEach(function(e, t) {
                      e.clearDom(), (e.fieldEditable = !1), (e.index = t)
                    }),
                    ('string' == t || 'auto' == t) && (this.expanded = !0))
                  : (this.expanded = !1),
              o &&
                (r
                  ? o.insertBefore(this.getDom(), r)
                  : o.appendChild(this.getDom())),
              this.showChilds()
          }
          ;('auto' == e || 'string' == e) &&
            ((this.value =
              'string' == e
                ? this.value + ''
                : this._stringCast(this.value + '')),
            this.focus()),
            this.updateDom({ updateIndexes: !0 })
        }
      }),
      (n.prototype._getDomValue = function(e) {
        if (
          (this.dom.value &&
            'array' != this.type &&
            'object' != this.type &&
            (this.valueInnerText = s.getInnerText(this.dom.value)),
          void 0 != this.valueInnerText)
        )
          try {
            var t
            if ('string' == this.type)
              t = this._unescapeHTML(this.valueInnerText)
            else {
              var o = this._unescapeHTML(this.valueInnerText)
              t = this._stringCast(o)
            }
            t !== this.value &&
              ((this.value = t), this._debouncedOnChangeValue())
          } catch (t) {
            if (((this.value = void 0), !0 !== e)) throw t
          }
      }),
      (n.prototype._onChangeValue = function() {
        var e = this.editor.getSelection()
        if (e.range) {
          var t = s.textDiff(this.value + '', this.previousValue + '')
          ;(e.range.startOffset = t.start), (e.range.endOffset = t.end)
        }
        var o = this.editor.getSelection()
        if (o.range) {
          var n = s.textDiff(this.previousValue + '', this.value + '')
          ;(o.range.startOffset = n.start), (o.range.endOffset = n.end)
        }
        this.editor._onAction('editValue', {
          node: this,
          oldValue: this.previousValue,
          newValue: this.value,
          oldSelection: e,
          newSelection: o
        }),
          (this.previousValue = this.value)
      }),
      (n.prototype._onChangeField = function() {
        var e = this.editor.getSelection()
        if (e.range) {
          var t = s.textDiff(this.field, this.previousField)
          ;(e.range.startOffset = t.start), (e.range.endOffset = t.end)
        }
        var o = this.editor.getSelection()
        if (o.range) {
          var n = s.textDiff(this.previousField, this.field)
          ;(o.range.startOffset = n.start), (o.range.endOffset = n.end)
        }
        this.editor._onAction('editField', {
          node: this,
          oldValue: this.previousField,
          newValue: this.field,
          oldSelection: e,
          newSelection: o
        }),
          (this.previousField = this.field)
      }),
      (n.prototype._updateDomValue = function() {
        var e = this.dom.value
        if (e) {
          var t = ['jsoneditor-value'],
            o = this.value,
            n = 'auto' == this.type ? s.type(o) : this.type,
            r = 'string' == n && s.isUrl(o)
          t.push('jsoneditor-' + n), r && t.push('jsoneditor-url')
          var a =
            '' == this.value + '' &&
            'array' != this.type &&
            'object' != this.type
          if (
            (a && t.push('jsoneditor-empty'),
            this.searchValueActive && t.push('jsoneditor-highlight-active'),
            this.searchValue && t.push('jsoneditor-highlight'),
            (e.className = t.join(' ')),
            'array' == n || 'object' == n)
          ) {
            var l = this.childs ? this.childs.length : 0
            e.title = this.type + ' containing ' + l + ' items'
          } else
            e.title =
              r && this.editable.value
                ? 'Ctrl+Click or Ctrl+Enter to open url in new window'
                : ''
          if (
            ('boolean' === n && this.editable.value
              ? (!this.dom.checkbox &&
                  ((this.dom.checkbox = document.createElement('input')),
                  (this.dom.checkbox.type = 'checkbox'),
                  (this.dom.tdCheckbox = document.createElement('td')),
                  (this.dom.tdCheckbox.className = 'jsoneditor-tree'),
                  this.dom.tdCheckbox.appendChild(this.dom.checkbox),
                  this.dom.tdValue.parentNode.insertBefore(
                    this.dom.tdCheckbox,
                    this.dom.tdValue
                  )),
                (this.dom.checkbox.checked = this.value))
              : this.dom.tdCheckbox &&
                (this.dom.tdCheckbox.parentNode.removeChild(
                  this.dom.tdCheckbox
                ),
                delete this.dom.tdCheckbox,
                delete this.dom.checkbox),
            this.enum && this.editable.value)
          ) {
            if (!this.dom.select) {
              ;(this.dom.select = document.createElement('select')),
                (this.id = this.field + '_' + new Date().getUTCMilliseconds()),
                (this.dom.select.id = this.id),
                (this.dom.select.name = this.dom.select.id),
                (this.dom.select.option = document.createElement('option')),
                (this.dom.select.option.value = ''),
                (this.dom.select.option.innerHTML = '--'),
                this.dom.select.appendChild(this.dom.select.option)
              for (var d = 0; d < this.enum.length; d++)
                (this.dom.select.option = document.createElement('option')),
                  (this.dom.select.option.value = this.enum[d]),
                  (this.dom.select.option.innerHTML = this.enum[d]),
                  this.dom.select.option.value == this.value &&
                    (this.dom.select.option.selected = !0),
                  this.dom.select.appendChild(this.dom.select.option)
              ;(this.dom.tdSelect = document.createElement('td')),
                (this.dom.tdSelect.className = 'jsoneditor-tree'),
                this.dom.tdSelect.appendChild(this.dom.select),
                this.dom.tdValue.parentNode.insertBefore(
                  this.dom.tdSelect,
                  this.dom.tdValue
                )
            }
            !this.schema ||
            this.schema.hasOwnProperty('oneOf') ||
            this.schema.hasOwnProperty('anyOf') ||
            this.schema.hasOwnProperty('allOf')
              ? delete this.valueFieldHTML
              : ((this.valueFieldHTML = this.dom.tdValue.innerHTML),
                (this.dom.tdValue.style.visibility = 'hidden'),
                (this.dom.tdValue.innerHTML = ''))
          } else
            this.dom.tdSelect &&
              (this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),
              delete this.dom.tdSelect,
              delete this.dom.select,
              (this.dom.tdValue.innerHTML = this.valueFieldHTML),
              (this.dom.tdValue.style.visibility = ''),
              delete this.valueFieldHTML)
          s.stripFormatting(e)
        }
      }),
      (n.prototype._updateDomField = function() {
        var e = this.dom.field
        if (e) {
          var t = '' == this.field + '' && 'array' != this.parent.type
          t
            ? s.addClassName(e, 'jsoneditor-empty')
            : s.removeClassName(e, 'jsoneditor-empty'),
            this.searchFieldActive
              ? s.addClassName(e, 'jsoneditor-highlight-active')
              : s.removeClassName(e, 'jsoneditor-highlight-active'),
            this.searchField
              ? s.addClassName(e, 'jsoneditor-highlight')
              : s.removeClassName(e, 'jsoneditor-highlight'),
            s.stripFormatting(e)
        }
      }),
      (n.prototype._getDomField = function(e) {
        if (
          (this.dom.field &&
            this.fieldEditable &&
            (this.fieldInnerText = s.getInnerText(this.dom.field)),
          void 0 != this.fieldInnerText)
        )
          try {
            var t = this._unescapeHTML(this.fieldInnerText)
            t !== this.field &&
              ((this.field = t), this._debouncedOnChangeField())
          } catch (t) {
            if (((this.field = void 0), !0 !== e)) throw t
          }
      }),
      (n.prototype.validate = function() {
        var t = []
        if ('object' === this.type) {
          for (var o = {}, n = [], r = 0, a; r < this.childs.length; r++)
            (a = this.childs[r]),
              o.hasOwnProperty(a.field) && n.push(a.field),
              (o[a.field] = !0)
          0 < n.length &&
            (t = this.childs
              .filter(function(e) {
                return -1 !== n.indexOf(e.field)
              })
              .map(function(e) {
                return {
                  node: e,
                  error: { message: 'duplicate key "' + e.field + '"' }
                }
              }))
        }
        if (this.childs)
          for (var r = 0, i; r < this.childs.length; r++)
            (i = this.childs[r].validate()), 0 < i.length && (t = t.concat(i))
        return t
      }),
      (n.prototype.clearDom = function() {
        this.dom = {}
      }),
      (n.prototype.getDom = function() {
        var e = this.dom
        if (e.tr) return e.tr
        if (
          (this._updateEditability(),
          (e.tr = document.createElement('tr')),
          (e.tr.node = this),
          'tree' === this.editor.options.mode)
        ) {
          var t = document.createElement('td')
          if (this.editable.field && this.parent) {
            var o = document.createElement('button')
            ;(o.type = 'button'),
              (e.drag = o),
              (o.className = 'jsoneditor-dragarea'),
              (o.title = 'Drag to move this field (Alt+Shift+Arrows)'),
              t.appendChild(o)
          }
          e.tr.appendChild(t)
          var n = document.createElement('td'),
            r = document.createElement('button')
          ;(r.type = 'button'),
            (e.menu = r),
            (r.className = 'jsoneditor-contextmenu'),
            (r.title = 'Click to open the actions menu (Ctrl+M)'),
            n.appendChild(e.menu),
            e.tr.appendChild(n)
        }
        var a = document.createElement('td')
        return (
          e.tr.appendChild(a),
          (e.tree = this._createDomTree()),
          a.appendChild(e.tree),
          this.updateDom({ updateIndexes: !0 }),
          e.tr
        )
      }),
      (n.onDragStart = function(e, t) {
        if (!Array.isArray(e)) return n.onDragStart([e], t)
        if (0 !== e.length) {
          var o = e[0],
            r = e[e.length - 1],
            a = n.getNodeFromTarget(t.target),
            i = r._nextSibling(),
            l = o.editor,
            d = s.getAbsoluteTop(a.dom.tr) - s.getAbsoluteTop(o.dom.tr)
          l.mousemove ||
            (l.mousemove = s.addEventListener(window, 'mousemove', function(t) {
              n.onDrag(e, t)
            })),
            l.mouseup ||
              (l.mouseup = s.addEventListener(window, 'mouseup', function(t) {
                n.onDragEnd(e, t)
              })),
            l.highlighter.lock(),
            (l.drag = {
              oldCursor: document.body.style.cursor,
              oldSelection: l.getSelection(),
              oldBeforeNode: i,
              mouseX: t.pageX,
              offsetY: d,
              level: o.getLevel()
            }),
            (document.body.style.cursor = 'move'),
            t.preventDefault()
        }
      }),
      (n.onDrag = function(e, t) {
        if (!Array.isArray(e)) return n.onDrag([e], t)
        if (0 !== e.length) {
          var o = e[0].editor,
            r = t.pageY - o.drag.offsetY,
            a = t.pageX,
            i = !1,
            d = e[0],
            c,
            u,
            p,
            g,
            h,
            m,
            f,
            y,
            A,
            C,
            w,
            E,
            b,
            v
          if (
            ((c = d.dom.tr),
            (A = s.getAbsoluteTop(c)),
            (E = c.offsetHeight),
            r < A)
          ) {
            u = c
            do
              (u = u.previousSibling),
                (f = n.getNodeFromTarget(u)),
                (C = u ? s.getAbsoluteTop(u) : 0)
            while (u && r < C)
            f && !f.parent && (f = void 0),
              f ||
                ((m = c.parentNode.firstChild),
                (u = m ? m.nextSibling : void 0),
                (f = n.getNodeFromTarget(u)),
                f == d && (f = void 0)),
              f &&
                ((u = f.dom.tr),
                (C = u ? s.getAbsoluteTop(u) : 0),
                r > C + E && (f = void 0)),
              f &&
                (e.forEach(function(e) {
                  f.parent.moveBefore(e, f)
                }),
                (i = !0))
          } else {
            var F = e[e.length - 1]
            if (
              ((h = F.expanded && F.append ? F.append.getDom() : F.dom.tr),
              (g = h ? h.nextSibling : void 0),
              g)
            ) {
              ;(w = s.getAbsoluteTop(g)), (p = g)
              do
                (y = n.getNodeFromTarget(p)),
                  p &&
                    ((b = p.nextSibling ? s.getAbsoluteTop(p.nextSibling) : 0),
                    (v = p ? b - w : 0),
                    y.parent.childs.length == e.length &&
                      y.parent.childs[e.length - 1] == F &&
                      (A += 27)),
                  (p = p.nextSibling)
              while (p && r > A + v)
              if (y && y.parent) {
                var x = a - o.drag.mouseX,
                  S = Math.round(x / 24 / 2),
                  $ = o.drag.level + S,
                  k = y.getLevel()
                for (u = y.dom.tr.previousSibling; k < $ && u; ) {
                  f = n.getNodeFromTarget(u)
                  var D = e.some(function(e) {
                    return e === f || f._isChildOf(e)
                  })
                  if (D);
                  else if (f instanceof l) {
                    var B = f.parent.childs
                    if (B.length != e.length || B[e.length - 1] != F)
                      (y = n.getNodeFromTarget(u)), (k = y.getLevel())
                    else break
                  } else break
                  u = u.previousSibling
                }
                h.nextSibling != y.dom.tr &&
                  (e.forEach(function(e) {
                    y.parent.moveBefore(e, y)
                  }),
                  (i = !0))
              }
            }
          }
          i && ((o.drag.mouseX = a), (o.drag.level = d.getLevel())),
            o.startAutoScroll(r),
            t.preventDefault()
        }
      }),
      (n.onDragEnd = function(e, t) {
        if (!Array.isArray(e)) return n.onDrag([e], t)
        if (0 !== e.length) {
          var o = e[0],
            r = o.editor,
            a = o.parent,
            i = a.childs.indexOf(o),
            l = a.childs[i + e.length] || a.append
          e[0] && e[0].dom.menu.focus()
          var d = {
            nodes: e,
            oldSelection: r.drag.oldSelection,
            newSelection: r.getSelection(),
            oldBeforeNode: r.drag.oldBeforeNode,
            newBeforeNode: l
          }
          d.oldBeforeNode != d.newBeforeNode && r._onAction('moveNodes', d),
            (document.body.style.cursor = r.drag.oldCursor),
            r.highlighter.unlock(),
            e.forEach(function(e) {
              t.target !== e.dom.drag &&
                t.target !== e.dom.menu &&
                r.highlighter.unhighlight()
            }),
            delete r.drag,
            r.mousemove &&
              (s.removeEventListener(window, 'mousemove', r.mousemove),
              delete r.mousemove),
            r.mouseup &&
              (s.removeEventListener(window, 'mouseup', r.mouseup),
              delete r.mouseup),
            r.stopAutoScroll(),
            t.preventDefault()
        }
      }),
      (n.prototype._isChildOf = function(e) {
        for (var t = this.parent; t; ) {
          if (t == e) return !0
          t = t.parent
        }
        return !1
      }),
      (n.prototype._createDomField = function() {
        return document.createElement('div')
      }),
      (n.prototype.setHighlight = function(e) {
        this.dom.tr &&
          (e
            ? s.addClassName(this.dom.tr, 'jsoneditor-highlight')
            : s.removeClassName(this.dom.tr, 'jsoneditor-highlight'),
          this.append && this.append.setHighlight(e),
          this.childs &&
            this.childs.forEach(function(t) {
              t.setHighlight(e)
            }))
      }),
      (n.prototype.setSelected = function(e, t) {
        ;(this.selected = e),
          this.dom.tr &&
            (e
              ? s.addClassName(this.dom.tr, 'jsoneditor-selected')
              : s.removeClassName(this.dom.tr, 'jsoneditor-selected'),
            t
              ? s.addClassName(this.dom.tr, 'jsoneditor-first')
              : s.removeClassName(this.dom.tr, 'jsoneditor-first'),
            this.append && this.append.setSelected(e),
            this.childs &&
              this.childs.forEach(function(t) {
                t.setSelected(e)
              }))
      }),
      (n.prototype.updateValue = function(e) {
        ;(this.value = e), this.updateDom()
      }),
      (n.prototype.updateField = function(e) {
        ;(this.field = e), this.updateDom()
      }),
      (n.prototype.updateDom = function(e) {
        var t = this.dom.tree
        t && (t.style.marginLeft = 24 * this.getLevel() + 'px')
        var o = this.dom.field
        if (o) {
          this.fieldEditable
            ? ((o.contentEditable = this.editable.field),
              (o.spellcheck = !1),
              (o.className = 'jsoneditor-field'))
            : (o.className = 'jsoneditor-readonly')
          var n
          ;(n =
            void 0 == this.index
              ? void 0 == this.field
                ? this._hasChilds()
                  ? this.type
                  : ''
                : this.field
              : this.index),
            (o.innerHTML = this._escapeHTML(n)),
            this._updateSchema()
        }
        var r = this.dom.value
        if (r) {
          var a = this.childs ? this.childs.length : 0
          'array' == this.type
            ? ((r.innerHTML = '[' + a + ']'),
              s.addClassName(this.dom.tr, 'jsoneditor-expandable'))
            : 'object' == this.type
              ? ((r.innerHTML = '{' + a + '}'),
                s.addClassName(this.dom.tr, 'jsoneditor-expandable'))
              : ((r.innerHTML = this._escapeHTML(this.value)),
                s.removeClassName(this.dom.tr, 'jsoneditor-expandable'))
        }
        this._updateDomField(),
          this._updateDomValue(),
          e && !0 === e.updateIndexes && this._updateDomIndexes(),
          e &&
            !0 === e.recurse &&
            this.childs &&
            this.childs.forEach(function(t) {
              t.updateDom(e)
            }),
          this.append && this.append.updateDom()
      }),
      (n.prototype._updateSchema = function() {
        this.editor &&
          this.editor.options &&
          ((this.schema = n._findSchema(
            this.editor.options.schema,
            this.getPath()
          )),
          this.schema
            ? (this.enum = n._findEnum(this.schema))
            : delete this.enum)
      }),
      (n._findEnum = function(e) {
        if (e.enum) return e.enum
        var t = e.oneOf || e.anyOf || e.allOf
        if (t) {
          var o = t.filter(function(e) {
            return e.enum
          })
          if (0 < o.length) return o[0].enum
        }
        return null
      }),
      (n._findSchema = function(e, t) {
        for (var o = e, n = 0, r; n < t.length && o; n++)
          (r = t[n]),
            'string' == typeof r && o.properties
              ? (o = o.properties[r] || null)
              : 'number' == typeof r && o.items && (o = o.items)
        return o
      }),
      (n.prototype._updateDomIndexes = function() {
        var e = this.dom.value,
          t = this.childs
        e &&
          t &&
          ('array' == this.type
            ? t.forEach(function(e, t) {
                e.index = t
                var o = e.dom.field
                o && (o.innerHTML = t)
              })
            : 'object' == this.type &&
              t.forEach(function(e) {
                e.index != void 0 &&
                  (delete e.index, e.field == void 0 && (e.field = ''))
              }))
      }),
      (n.prototype._createDomValue = function() {
        var e
        return (
          'array' == this.type
            ? ((e = document.createElement('div')), (e.innerHTML = '[...]'))
            : 'object' == this.type
              ? ((e = document.createElement('div')), (e.innerHTML = '{...}'))
              : !this.editable.value && s.isUrl(this.value)
                ? ((e = document.createElement('a')),
                  (e.href = this.value),
                  (e.target = '_blank'),
                  (e.innerHTML = this._escapeHTML(this.value)))
                : ((e = document.createElement('div')),
                  (e.contentEditable = this.editable.value),
                  (e.spellcheck = !1),
                  (e.innerHTML = this._escapeHTML(this.value))),
          e
        )
      }),
      (n.prototype._createDomExpandButton = function() {
        var e = document.createElement('button')
        return (
          (e.type = 'button'),
          this._hasChilds()
            ? ((e.className = this.expanded
                ? 'jsoneditor-expanded'
                : 'jsoneditor-collapsed'),
              (e.title =
                'Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.'))
            : ((e.className = 'jsoneditor-invisible'), (e.title = '')),
          e
        )
      }),
      (n.prototype._createDomTree = function() {
        var e = this.dom,
          t = document.createElement('table'),
          o = document.createElement('tbody')
        ;(t.style.borderCollapse = 'collapse'),
          (t.className = 'jsoneditor-values'),
          t.appendChild(o)
        var n = document.createElement('tr')
        o.appendChild(n)
        var r = document.createElement('td')
        ;(r.className = 'jsoneditor-tree'),
          n.appendChild(r),
          (e.expand = this._createDomExpandButton()),
          r.appendChild(e.expand),
          (e.tdExpand = r)
        var a = document.createElement('td')
        ;(a.className = 'jsoneditor-tree'),
          n.appendChild(a),
          (e.field = this._createDomField()),
          a.appendChild(e.field),
          (e.tdField = a)
        var i = document.createElement('td')
        ;(i.className = 'jsoneditor-tree'),
          n.appendChild(i),
          'object' != this.type &&
            'array' != this.type &&
            (i.appendChild(document.createTextNode(':')),
            (i.className = 'jsoneditor-separator')),
          (e.tdSeparator = i)
        var s = document.createElement('td')
        return (
          (s.className = 'jsoneditor-tree'),
          n.appendChild(s),
          (e.value = this._createDomValue()),
          s.appendChild(e.value),
          (e.tdValue = s),
          t
        )
      }),
      (n.prototype.onEvent = function(e) {
        var t = e.type,
          o = e.target || e.srcElement,
          n = this.dom,
          r = this,
          a = this._hasChilds()
        if (
          ((o == n.drag || o == n.menu) &&
            ('mouseover' == t
              ? this.editor.highlighter.highlight(this)
              : 'mouseout' == t && this.editor.highlighter.unhighlight()),
          'click' == t && o == n.menu)
        ) {
          var i = r.editor.highlighter
          i.highlight(r),
            i.lock(),
            s.addClassName(n.menu, 'jsoneditor-selected'),
            this.showContextMenu(n.menu, function() {
              s.removeClassName(n.menu, 'jsoneditor-selected'),
                i.unlock(),
                i.unhighlight()
            })
        }
        if (
          'click' == t &&
          (o == n.expand ||
            (('view' === r.editor.options.mode ||
              'form' === r.editor.options.mode) &&
              'DIV' === o.nodeName)) &&
          a
        ) {
          var l = e.ctrlKey
          this._onExpand(l)
        }
        'change' == t &&
          o == n.checkbox &&
          ((this.dom.value.innerHTML = !this.value), this._getDomValue()),
          'change' == t &&
            o == n.select &&
            ((this.dom.value.innerHTML = n.select.value),
            this._getDomValue(),
            this._updateDomValue())
        var d = n.value
        o == d &&
          ('blur' === t || 'change' === t
            ? (this._getDomValue(!0),
              this._updateDomValue(),
              this.value && (d.innerHTML = this._escapeHTML(this.value)))
            : 'input' === t
              ? (this._getDomValue(!0), this._updateDomValue())
              : 'keydown' === t || 'mousedown' === t
                ? (this.editor.selection = this.editor.getSelection())
                : 'click' === t
                  ? (e.ctrlKey || !this.editable.value) &&
                    s.isUrl(this.value) &&
                    window.open(this.value, '_blank')
                  : 'keyup' === t
                    ? (this._getDomValue(!0), this._updateDomValue())
                    : 'cut' === t || 'paste' === t
                      ? setTimeout(function() {
                          r._getDomValue(!0), r._updateDomValue()
                        }, 1)
                      : void 0)
        var c = n.field
        o == c &&
          ('blur' === t || 'change' === t
            ? (this._getDomField(!0),
              this._updateDomField(),
              this.field && (c.innerHTML = this._escapeHTML(this.field)))
            : 'input' === t
              ? (this._getDomField(!0),
                this._updateSchema(),
                this._updateDomField(),
                this._updateDomValue())
              : 'keydown' === t || 'mousedown' === t
                ? (this.editor.selection = this.editor.getSelection())
                : 'keyup' === t
                  ? (this._getDomField(!0), this._updateDomField())
                  : 'cut' === t || 'paste' === t
                    ? setTimeout(function() {
                        r._getDomField(!0), r._updateDomField()
                      }, 1)
                    : void 0)
        var u = n.tree
        if (o == u.parentNode && 'click' == t && !e.hasMoved) {
          var p =
            void 0 == e.offsetX
              ? e.pageX < s.getAbsoluteLeft(n.tdSeparator)
              : e.offsetX < 24 * (this.getLevel() + 1)
          p || a
            ? c && (s.setEndOfContentEditable(c), c.focus())
            : d && !this.enum && (s.setEndOfContentEditable(d), d.focus())
        }
        ;((o != n.tdExpand || a) && o != n.tdField && o != n.tdSeparator) ||
          'click' != t ||
          e.hasMoved ||
          !c ||
          (s.setEndOfContentEditable(c), c.focus()),
          'keydown' == t && this.onKeyDown(e)
      }),
      (n.prototype.onKeyDown = function(e) {
        var t = e.which || e.keyCode,
          o = e.target || e.srcElement,
          r = e.ctrlKey,
          a = e.shiftKey,
          i = e.altKey,
          d = !1,
          c = 'tree' === this.editor.options.mode,
          u =
            0 < this.editor.multiselection.nodes.length
              ? this.editor.multiselection.nodes
              : [this],
          p = u[0],
          g = u[u.length - 1],
          h,
          m,
          f,
          y,
          A,
          C,
          w,
          E
        if (13 == t) {
          if (o == this.dom.value)
            (!this.editable.value || e.ctrlKey) &&
              s.isUrl(this.value) &&
              (window.open(this.value, '_blank'), (d = !0))
          else if (o == this.dom.expand) {
            var b = this._hasChilds()
            if (b) {
              var v = e.ctrlKey
              this._onExpand(v), o.focus(), (d = !0)
            }
          }
        } else if (68 == t) r && c && (n.onDuplicate(u), (d = !0))
        else if (69 == t) r && (this._onExpand(a), o.focus(), (d = !0))
        else if (77 == t && c) r && (this.showContextMenu(o), (d = !0))
        else if (46 == t && c) r && (n.onRemove(u), (d = !0))
        else if (45 == t && c)
          r && !a
            ? (this._onInsertBefore(), (d = !0))
            : r && a && (this._onInsertAfter(), (d = !0))
        else if (35 == t) {
          if (i) {
            var F = this._lastNode()
            F && F.focus(n.focusElement || this._getElementName(o)), (d = !0)
          }
        } else if (36 == t) {
          if (i) {
            var x = this._firstNode()
            x && x.focus(n.focusElement || this._getElementName(o)), (d = !0)
          }
        } else if (37 == t) {
          if (i && !a) {
            var S = this._previousElement(o)
            S && this.focus(this._getElementName(S)), (d = !0)
          } else if (i && a && c) {
            if (g.expanded) {
              var $ = g.getAppend()
              f = $ ? $.nextSibling : void 0
            } else {
              var k = g.getDom()
              f = k.nextSibling
            }
            f &&
              ((m = n.getNodeFromTarget(f)),
              (y = f.nextSibling),
              (_ = n.getNodeFromTarget(y)),
              m &&
                m instanceof l &&
                1 != g.parent.childs.length &&
                _ &&
                _.parent &&
                ((A = this.editor.getSelection()),
                (C = g._nextSibling()),
                u.forEach(function(e) {
                  _.parent.moveBefore(e, _)
                }),
                this.focus(n.focusElement || this._getElementName(o)),
                this.editor._onAction('moveNodes', {
                  nodes: u,
                  oldBeforeNode: C,
                  newBeforeNode: _,
                  oldSelection: A,
                  newSelection: this.editor.getSelection()
                })))
          }
        } else if (38 == t)
          i && !a
            ? ((h = this._previousNode()),
              h &&
                (this.editor.deselect(!0),
                h.focus(n.focusElement || this._getElementName(o))),
              (d = !0))
            : !i && r && a && c
              ? ((h = this._previousNode()),
                h &&
                  ((E = this.editor.multiselection),
                  (E.start = E.start || this),
                  (E.end = h),
                  (w = this.editor._findTopLevelNodes(E.start, E.end)),
                  this.editor.select(w),
                  h.focus('field')),
                (d = !0))
              : i &&
                a &&
                c &&
                ((h = p._previousNode()),
                h &&
                  h.parent &&
                  ((A = this.editor.getSelection()),
                  (C = g._nextSibling()),
                  u.forEach(function(e) {
                    h.parent.moveBefore(e, h)
                  }),
                  this.focus(n.focusElement || this._getElementName(o)),
                  this.editor._onAction('moveNodes', {
                    nodes: u,
                    oldBeforeNode: C,
                    newBeforeNode: h,
                    oldSelection: A,
                    newSelection: this.editor.getSelection()
                  })),
                (d = !0))
        else if (39 == t) {
          if (i && !a) {
            var D = this._nextElement(o)
            D && this.focus(this._getElementName(D)), (d = !0)
          } else if (i && a && c) {
            k = p.getDom()
            var B = k.previousSibling
            B &&
              ((h = n.getNodeFromTarget(B)),
              h &&
                h.parent &&
                h instanceof l &&
                !h.isVisible() &&
                ((A = this.editor.getSelection()),
                (C = g._nextSibling()),
                u.forEach(function(e) {
                  h.parent.moveBefore(e, h)
                }),
                this.focus(n.focusElement || this._getElementName(o)),
                this.editor._onAction('moveNodes', {
                  nodes: u,
                  oldBeforeNode: C,
                  newBeforeNode: h,
                  oldSelection: A,
                  newSelection: this.editor.getSelection()
                })))
          }
        } else if (40 == t)
          if (i && !a)
            (m = this._nextNode()),
              m &&
                (this.editor.deselect(!0),
                m.focus(n.focusElement || this._getElementName(o))),
              (d = !0)
          else if (!i && r && a && c)
            (m = this._nextNode()),
              m &&
                ((E = this.editor.multiselection),
                (E.start = E.start || this),
                (E.end = m),
                (w = this.editor._findTopLevelNodes(E.start, E.end)),
                this.editor.select(w),
                m.focus('field')),
              (d = !0)
          else if (i && a && c) {
            m = g.expanded
              ? g.append
                ? g.append._nextNode()
                : void 0
              : g._nextNode()
            var _ = m && (m._nextNode() || m.parent.append)
            _ &&
              _.parent &&
              ((A = this.editor.getSelection()),
              (C = g._nextSibling()),
              u.forEach(function(e) {
                _.parent.moveBefore(e, _)
              }),
              this.focus(n.focusElement || this._getElementName(o)),
              this.editor._onAction('moveNodes', {
                nodes: u,
                oldBeforeNode: C,
                newBeforeNode: _,
                oldSelection: A,
                newSelection: this.editor.getSelection()
              })),
              (d = !0)
          }
        d && (e.preventDefault(), e.stopPropagation())
      }),
      (n.prototype._onExpand = function(e) {
        if (e) {
          var t = this.dom.tr.parentNode,
            o = t.parentNode,
            n = o.scrollTop
          o.removeChild(t)
        }
        this.expanded ? this.collapse(e) : this.expand(e),
          e && (o.appendChild(t), (o.scrollTop = n))
      }),
      (n.onRemove = function(e) {
        if (!Array.isArray(e)) return n.onRemove([e])
        if (e && 0 < e.length) {
          var t = e[0],
            o = t.parent,
            r = t.editor,
            a = t.getIndex()
          r.highlighter.unhighlight()
          var i = r.getSelection()
          n.blurNodes(e)
          var s = r.getSelection()
          e.forEach(function(e) {
            e.parent._remove(e)
          }),
            r._onAction('removeNodes', {
              nodes: e.slice(0),
              parent: o,
              index: a,
              oldSelection: i,
              newSelection: s
            })
        }
      }),
      (n.onDuplicate = function(e) {
        if (!Array.isArray(e)) return n.onDuplicate([e])
        if (e && 0 < e.length) {
          var t = e[e.length - 1],
            o = t.parent,
            r = t.editor
          r.deselect(r.multiselection.nodes)
          var a = r.getSelection(),
            i = t,
            s = e.map(function(e) {
              var t = e.clone()
              return o.insertAfter(t, i), (i = t), t
            })
          1 === e.length ? s[0].focus() : r.select(s)
          var l = r.getSelection()
          r._onAction('duplicateNodes', {
            afterNode: t,
            nodes: s,
            parent: o,
            oldSelection: a,
            newSelection: l
          })
        }
      }),
      (n.prototype._onInsertBefore = function(e, t, o) {
        var r = this.editor.getSelection(),
          a = new n(this.editor, {
            field: e == void 0 ? '' : e,
            value: t == void 0 ? '' : t,
            type: o
          })
        a.expand(!0),
          this.parent.insertBefore(a, this),
          this.editor.highlighter.unhighlight(),
          a.focus('field')
        var i = this.editor.getSelection()
        this.editor._onAction('insertBeforeNodes', {
          nodes: [a],
          beforeNode: this,
          parent: this.parent,
          oldSelection: r,
          newSelection: i
        })
      }),
      (n.prototype._onInsertAfter = function(e, t, o) {
        var r = this.editor.getSelection(),
          a = new n(this.editor, {
            field: e == void 0 ? '' : e,
            value: t == void 0 ? '' : t,
            type: o
          })
        a.expand(!0),
          this.parent.insertAfter(a, this),
          this.editor.highlighter.unhighlight(),
          a.focus('field')
        var i = this.editor.getSelection()
        this.editor._onAction('insertAfterNodes', {
          nodes: [a],
          afterNode: this,
          parent: this.parent,
          oldSelection: r,
          newSelection: i
        })
      }),
      (n.prototype._onAppend = function(e, t, o) {
        var r = this.editor.getSelection(),
          a = new n(this.editor, {
            field: e == void 0 ? '' : e,
            value: t == void 0 ? '' : t,
            type: o
          })
        a.expand(!0),
          this.parent.appendChild(a),
          this.editor.highlighter.unhighlight(),
          a.focus('field')
        var i = this.editor.getSelection()
        this.editor._onAction('appendNodes', {
          nodes: [a],
          parent: this.parent,
          oldSelection: r,
          newSelection: i
        })
      }),
      (n.prototype._onChangeType = function(e) {
        var t = this.type
        if (e != t) {
          var o = this.editor.getSelection()
          this.changeType(e)
          var n = this.editor.getSelection()
          this.editor._onAction('changeType', {
            node: this,
            oldType: t,
            newType: e,
            oldSelection: o,
            newSelection: n
          })
        }
      }),
      (n.prototype.sort = function(e) {
        if (this._hasChilds()) {
          var t = 'desc' == e ? -1 : 1,
            o = 'array' == this.type ? 'value' : 'field'
          this.hideChilds()
          var n = this.childs,
            a = this.sortOrder
          ;(this.childs = this.childs.concat()),
            this.childs.sort(function(e, n) {
              return t * r(e[o], n[o])
            }),
            (this.sortOrder = 1 == t ? 'asc' : 'desc'),
            this.editor._onAction('sort', {
              node: this,
              oldChilds: n,
              oldSort: a,
              newChilds: this.childs,
              newSort: this.sortOrder
            }),
            this.showChilds()
        }
      }),
      (n.prototype.getAppend = function() {
        return (
          this.append ||
            ((this.append = new l(this.editor)), this.append.setParent(this)),
          this.append.getDom()
        )
      }),
      (n.getNodeFromTarget = function(e) {
        for (; e; ) {
          if (e.node) return e.node
          e = e.parentNode
        }
      }),
      (n.blurNodes = function(e) {
        if (!Array.isArray(e)) return void n.blurNodes([e])
        var t = e[0],
          o = t.parent,
          r = t.getIndex()
        o.childs[r + e.length]
          ? o.childs[r + e.length].focus()
          : o.childs[r - 1]
            ? o.childs[r - 1].focus()
            : o.focus()
      }),
      (n.prototype._nextSibling = function() {
        var e = this.parent.childs.indexOf(this)
        return this.parent.childs[e + 1] || this.parent.append
      }),
      (n.prototype._previousNode = function() {
        var e = null,
          t = this.getDom()
        if (t && t.parentNode) {
          var o = t
          do (o = o.previousSibling), (e = n.getNodeFromTarget(o))
          while (o && e instanceof l && !e.isVisible())
        }
        return e
      }),
      (n.prototype._nextNode = function() {
        var e = null,
          t = this.getDom()
        if (t && t.parentNode) {
          var o = t
          do (o = o.nextSibling), (e = n.getNodeFromTarget(o))
          while (o && e instanceof l && !e.isVisible())
        }
        return e
      }),
      (n.prototype._firstNode = function() {
        var e = null,
          t = this.getDom()
        if (t && t.parentNode) {
          var o = t.parentNode.firstChild
          e = n.getNodeFromTarget(o)
        }
        return e
      }),
      (n.prototype._lastNode = function() {
        var e = null,
          t = this.getDom()
        if (t && t.parentNode) {
          var o = t.parentNode.lastChild
          for (
            e = n.getNodeFromTarget(o);
            o && e instanceof l && !e.isVisible();

          )
            (o = o.previousSibling), (e = n.getNodeFromTarget(o))
        }
        return e
      }),
      (n.prototype._previousElement = function(e) {
        var t = this.dom
        switch (e) {
          case t.value:
            if (this.fieldEditable) return t.field
          case t.field:
            if (this._hasChilds()) return t.expand
          case t.expand:
            return t.menu
          case t.menu:
            if (t.drag) return t.drag
          default:
            return null
        }
      }),
      (n.prototype._nextElement = function(e) {
        var t = this.dom
        switch (e) {
          case t.drag:
            return t.menu
          case t.menu:
            if (this._hasChilds()) return t.expand
          case t.expand:
            if (this.fieldEditable) return t.field
          case t.field:
            if (!this._hasChilds()) return t.value
          default:
            return null
        }
      }),
      (n.prototype._getElementName = function(e) {
        var t = this.dom
        for (var o in t) if (t.hasOwnProperty(o) && t[o] == e) return o
        return null
      }),
      (n.prototype._hasChilds = function() {
        return 'array' == this.type || 'object' == this.type
      }),
      (n.TYPE_TITLES = {
        auto:
          'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',
        object:
          'Field type "object". An object contains an unordered set of key/value pairs.',
        array:
          'Field type "array". An array contains an ordered collection of values.',
        string:
          'Field type "string". Field type is not determined from the value, but always returned as string.'
      }),
      (n.prototype.addTemplates = function(e, t) {
        var o = this,
          n = o.editor.options.templates
        if (null != n) {
          n.length && e.push({ type: 'separator' })
          var r = function(e, t) {
              o._onAppend(e, t)
            },
            a = function(e, t) {
              o._onInsertBefore(e, t)
            }
          n.forEach(function(o) {
            e.push({
              text: o.text,
              className: o.className || 'jsoneditor-type-object',
              title: o.title,
              click: t
                ? r.bind(this, o.field, o.value)
                : a.bind(this, o.field, o.value)
            })
          })
        }
      }),
      (n.prototype.showContextMenu = function(e, t) {
        var o = this,
          r = n.TYPE_TITLES,
          i = []
        if (
          (this.editable.value &&
            i.push({
              text: 'Type',
              title: 'Change the type of this field',
              className: 'jsoneditor-type-' + this.type,
              submenu: [
                {
                  text: 'Auto',
                  className:
                    'jsoneditor-type-auto' +
                    ('auto' == this.type ? ' jsoneditor-selected' : ''),
                  title: r.auto,
                  click: function() {
                    o._onChangeType('auto')
                  }
                },
                {
                  text: 'Array',
                  className:
                    'jsoneditor-type-array' +
                    ('array' == this.type ? ' jsoneditor-selected' : ''),
                  title: r.array,
                  click: function() {
                    o._onChangeType('array')
                  }
                },
                {
                  text: 'Object',
                  className:
                    'jsoneditor-type-object' +
                    ('object' == this.type ? ' jsoneditor-selected' : ''),
                  title: r.object,
                  click: function() {
                    o._onChangeType('object')
                  }
                },
                {
                  text: 'String',
                  className:
                    'jsoneditor-type-string' +
                    ('string' == this.type ? ' jsoneditor-selected' : ''),
                  title: r.string,
                  click: function() {
                    o._onChangeType('string')
                  }
                }
              ]
            }),
          this._hasChilds())
        ) {
          var s = 'asc' == this.sortOrder ? 'desc' : 'asc'
          i.push({
            text: 'Sort',
            title: 'Sort the childs of this ' + this.type,
            className: 'jsoneditor-sort-' + s,
            click: function() {
              o.sort(s)
            },
            submenu: [
              {
                text: 'Ascending',
                className: 'jsoneditor-sort-asc',
                title:
                  'Sort the childs of this ' +
                  this.type +
                  ' in ascending order',
                click: function() {
                  o.sort('asc')
                }
              },
              {
                text: 'Descending',
                className: 'jsoneditor-sort-desc',
                title:
                  'Sort the childs of this ' +
                  this.type +
                  ' in descending order',
                click: function() {
                  o.sort('desc')
                }
              }
            ]
          })
        }
        if (this.parent && this.parent._hasChilds()) {
          i.length && i.push({ type: 'separator' })
          var l = o.parent.childs
          if (o == l[l.length - 1]) {
            var d = [
              {
                text: 'Auto',
                className: 'jsoneditor-type-auto',
                title: r.auto,
                click: function() {
                  o._onAppend('', '', 'auto')
                }
              },
              {
                text: 'Array',
                className: 'jsoneditor-type-array',
                title: r.array,
                click: function() {
                  o._onAppend('', [])
                }
              },
              {
                text: 'Object',
                className: 'jsoneditor-type-object',
                title: r.object,
                click: function() {
                  o._onAppend('', {})
                }
              },
              {
                text: 'String',
                className: 'jsoneditor-type-string',
                title: r.string,
                click: function() {
                  o._onAppend('', '', 'string')
                }
              }
            ]
            o.addTemplates(d, !0),
              i.push({
                text: 'Append',
                title:
                  "Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",
                submenuTitle: 'Select the type of the field to be appended',
                className: 'jsoneditor-append',
                click: function() {
                  o._onAppend('', '', 'auto')
                },
                submenu: d
              })
          }
          var c = [
            {
              text: 'Auto',
              className: 'jsoneditor-type-auto',
              title: r.auto,
              click: function() {
                o._onInsertBefore('', '', 'auto')
              }
            },
            {
              text: 'Array',
              className: 'jsoneditor-type-array',
              title: r.array,
              click: function() {
                o._onInsertBefore('', [])
              }
            },
            {
              text: 'Object',
              className: 'jsoneditor-type-object',
              title: r.object,
              click: function() {
                o._onInsertBefore('', {})
              }
            },
            {
              text: 'String',
              className: 'jsoneditor-type-string',
              title: r.string,
              click: function() {
                o._onInsertBefore('', '', 'string')
              }
            }
          ]
          o.addTemplates(c, !1),
            i.push({
              text: 'Insert',
              title:
                "Insert a new field with type 'auto' before this field (Ctrl+Ins)",
              submenuTitle: 'Select the type of the field to be inserted',
              className: 'jsoneditor-insert',
              click: function() {
                o._onInsertBefore('', '', 'auto')
              },
              submenu: c
            }),
            this.editable.field &&
              (i.push({
                text: 'Duplicate',
                title: 'Duplicate this field (Ctrl+D)',
                className: 'jsoneditor-duplicate',
                click: function() {
                  n.onDuplicate(o)
                }
              }),
              i.push({
                text: 'Remove',
                title: 'Remove this field (Ctrl+Del)',
                className: 'jsoneditor-remove',
                click: function() {
                  n.onRemove(o)
                }
              }))
        }
        var u = new a(i, { close: t })
        u.show(e, this.editor.content)
      }),
      (n.prototype._getType = function(e) {
        return e instanceof Array
          ? 'array'
          : e instanceof Object
            ? 'object'
            : 'string' == typeof e && 'string' != typeof this._stringCast(e)
              ? 'string'
              : 'auto'
      }),
      (n.prototype._stringCast = function(e) {
        var t = e.toLowerCase(),
          o = +e,
          n = parseFloat(e)
        return '' == e
          ? ''
          : 'null' == t
            ? null
            : 'true' == t || ('false' != t && (isNaN(o) || isNaN(n) ? e : o))
      }),
      (n.prototype._escapeHTML = function(e) {
        if ('string' != typeof e) return e + ''
        var t = (e + '')
            .replace(/&/g, '&amp;')
            .replace(/</g, '&lt;')
            .replace(/>/g, '&gt;')
            .replace(/  /g, ' &nbsp;')
            .replace(/^ /, '&nbsp;')
            .replace(/ $/, '&nbsp;'),
          o = JSON.stringify(t),
          n = o.substring(1, o.length - 1)
        return (
          !0 === this.editor.options.escapeUnicode &&
            (n = s.escapeUnicodeChars(n)),
          n
        )
      }),
      (n.prototype._unescapeHTML = function(e) {
        var t = '"' + this._escapeJSON(e) + '"',
          o = s.parse(t)
        return o
          .replace(/&lt;/g, '<')
          .replace(/&gt;/g, '>')
          .replace(/&nbsp;|\u00A0/g, ' ')
          .replace(/&amp;/g, '&')
      }),
      (n.prototype._escapeJSON = function(e) {
        for (var t = '', o = 0; o < e.length; ) {
          var n = e.charAt(o)
          '\n' == n
            ? (t += '\\n')
            : '\\' == n
              ? ((t += n),
                o++,
                (n = e.charAt(o)),
                ('' === n || -1 == '"\\/bfnrtu'.indexOf(n)) && (t += '\\'),
                (t += n))
              : '"' == n
                ? (t += '\\"')
                : (t += n),
            o++
        }
        return t
      })
    var l = i(n)
    e.exports = n
  },
  function(e) {
    'use strict'
    function t(e, t) {
      var o = this
      ;(this.editor = e),
        (this.timeout = void 0),
        (this.delay = 200),
        (this.lastText = void 0),
        (this.dom = {}),
        (this.dom.container = t)
      var n = document.createElement('table')
      ;(this.dom.table = n),
        (n.className = 'jsoneditor-search'),
        t.appendChild(n)
      var r = document.createElement('tbody')
      ;(this.dom.tbody = r), n.appendChild(r)
      var a = document.createElement('tr')
      r.appendChild(a)
      var i = document.createElement('td')
      a.appendChild(i)
      var s = document.createElement('div')
      ;(this.dom.results = s),
        (s.className = 'jsoneditor-results'),
        i.appendChild(s),
        (i = document.createElement('td')),
        a.appendChild(i)
      var l = document.createElement('div')
      ;(this.dom.input = l),
        (l.className = 'jsoneditor-frame'),
        (l.title = 'Search fields and values'),
        i.appendChild(l)
      var d = document.createElement('table')
      l.appendChild(d)
      var c = document.createElement('tbody')
      d.appendChild(c), (a = document.createElement('tr')), c.appendChild(a)
      var u = document.createElement('button')
      ;(u.type = 'button'),
        (u.className = 'jsoneditor-refresh'),
        (i = document.createElement('td')),
        i.appendChild(u),
        a.appendChild(i)
      var p = document.createElement('input')
      ;(this.dom.search = p),
        (p.oninput = function(e) {
          o._onDelayedSearch(e)
        }),
        (p.onchange = function() {
          o._onSearch()
        }),
        (p.onkeydown = function(e) {
          o._onKeyDown(e)
        }),
        (p.onkeyup = function(e) {
          o._onKeyUp(e)
        }),
        (u.onclick = function() {
          p.select()
        }),
        (i = document.createElement('td')),
        i.appendChild(p),
        a.appendChild(i)
      var g = document.createElement('button')
      ;(g.type = 'button'),
        (g.title = 'Next result (Enter)'),
        (g.className = 'jsoneditor-next'),
        (g.onclick = function() {
          o.next()
        }),
        (i = document.createElement('td')),
        i.appendChild(g),
        a.appendChild(i)
      var h = document.createElement('button')
      ;(h.type = 'button'),
        (h.title = 'Previous result (Shift+Enter)'),
        (h.className = 'jsoneditor-previous'),
        (h.onclick = function() {
          o.previous()
        }),
        (i = document.createElement('td')),
        i.appendChild(h),
        a.appendChild(i)
    }
    ;(t.prototype.next = function(e) {
      if (this.results != void 0) {
        var t = this.resultIndex == void 0 ? 0 : this.resultIndex + 1
        t > this.results.length - 1 && (t = 0), this._setActiveResult(t, e)
      }
    }),
      (t.prototype.previous = function(e) {
        if (this.results != void 0) {
          var t = this.results.length - 1,
            o = this.resultIndex == void 0 ? t : this.resultIndex - 1
          0 > o && (o = t), this._setActiveResult(o, e)
        }
      }),
      (t.prototype._setActiveResult = function(e, t) {
        if (this.activeResult) {
          var o = this.activeResult.node,
            n = this.activeResult.elem
          'field' == n
            ? delete o.searchFieldActive
            : delete o.searchValueActive,
            o.updateDom()
        }
        if (!this.results || !this.results[e])
          return (this.resultIndex = void 0), void (this.activeResult = void 0)
        this.resultIndex = e
        var r = this.results[this.resultIndex].node,
          a = this.results[this.resultIndex].elem
        'field' == a ? (r.searchFieldActive = !0) : (r.searchValueActive = !0),
          (this.activeResult = this.results[this.resultIndex]),
          r.updateDom(),
          r.scrollTo(function() {
            t && r.focus(a)
          })
      }),
      (t.prototype._clearDelay = function() {
        this.timeout != void 0 &&
          (clearTimeout(this.timeout), delete this.timeout)
      }),
      (t.prototype._onDelayedSearch = function() {
        this._clearDelay()
        var e = this
        this.timeout = setTimeout(function() {
          e._onSearch()
        }, this.delay)
      }),
      (t.prototype._onSearch = function(e) {
        this._clearDelay()
        var t = this.dom.search.value,
          o = 0 < t.length ? t : void 0
        if (o != this.lastText || e)
          if (
            ((this.lastText = o),
            (this.results = this.editor.search(o)),
            this._setActiveResult(void 0),
            void 0 != o)
          ) {
            var n = this.results.length
            this.dom.results.innerHTML =
              0 === n
                ? 'no&nbsp;results'
                : 1 === n
                  ? '1&nbsp;result'
                  : n + '&nbsp;results'
          } else this.dom.results.innerHTML = ''
      }),
      (t.prototype._onKeyDown = function(e) {
        var t = e.which
        27 == t
          ? ((this.dom.search.value = ''),
            this._onSearch(),
            e.preventDefault(),
            e.stopPropagation())
          : 13 == t &&
            (e.ctrlKey
              ? this._onSearch(!0)
              : e.shiftKey
                ? this.previous()
                : this.next(),
            e.preventDefault(),
            e.stopPropagation())
      }),
      (t.prototype._onKeyUp = function(e) {
        var t = e.keyCode
        27 != t && 13 != t && this._onDelayedSearch(e)
      }),
      (t.prototype.clear = function() {
        ;(this.dom.search.value = ''), this._onSearch()
      }),
      (t.prototype.destroy = function() {
        ;(this.editor = null),
          this.dom.container.removeChild(this.dom.table),
          (this.dom = null),
          (this.results = null),
          (this.activeResult = null),
          this._clearDelay()
      }),
      (e.exports = t)
  },
  function(e, t, o) {
    var n
    if (window.ace) n = window.ace
    else
      try {
        ;(n = o(322)), o(323), o(321)
      } catch (e) {}
    e.exports = n
  },
  function() {
    ace.define(
      'ace/theme/jsoneditor',
      ['require', 'exports', 'module', 'ace/lib/dom'],
      function(e, t) {
        ;(t.isDark = !1),
          (t.cssClass = 'ace-jsoneditor'),
          (t.cssText =
            '.ace-jsoneditor .ace_gutter {background: #ebebeb;color: #333}.ace-jsoneditor.ace_editor {font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif;line-height: 1.3;background-color: #fff;}.ace-jsoneditor .ace_print-margin {width: 1px;background: #e8e8e8}.ace-jsoneditor .ace_scroller {background-color: #FFFFFF}.ace-jsoneditor .ace_text-layer {color: gray}.ace-jsoneditor .ace_variable {color: #1a1a1a}.ace-jsoneditor .ace_cursor {border-left: 2px solid #000000}.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #000000}.ace-jsoneditor .ace_marker-layer .ace_selection {background: lightgray}.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-jsoneditor .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-jsoneditor .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-jsoneditor .ace_marker-layer .ace_active-line {background: #FFFBD1}.ace-jsoneditor .ace_gutter-active-line {background-color : #dcdcdc}.ace-jsoneditor .ace_marker-layer .ace_selected-word {border: 1px solid lightgray}.ace-jsoneditor .ace_invisible {color: #BFBFBF}.ace-jsoneditor .ace_keyword,.ace-jsoneditor .ace_meta,.ace-jsoneditor .ace_support.ace_constant.ace_property-value {color: #AF956F}.ace-jsoneditor .ace_keyword.ace_operator {color: #484848}.ace-jsoneditor .ace_keyword.ace_other.ace_unit {color: #96DC5F}.ace-jsoneditor .ace_constant.ace_language {color: darkorange}.ace-jsoneditor .ace_constant.ace_numeric {color: red}.ace-jsoneditor .ace_constant.ace_character.ace_entity {color: #BF78CC}.ace-jsoneditor .ace_invalid {color: #FFFFFF;background-color: #FF002A;}.ace-jsoneditor .ace_fold {background-color: #AF956F;border-color: #000000}.ace-jsoneditor .ace_storage,.ace-jsoneditor .ace_support.ace_class,.ace-jsoneditor .ace_support.ace_function,.ace-jsoneditor .ace_support.ace_other,.ace-jsoneditor .ace_support.ace_type {color: #C52727}.ace-jsoneditor .ace_string {color: green}.ace-jsoneditor .ace_comment {color: #BCC8BA}.ace-jsoneditor .ace_entity.ace_name.ace_tag,.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-jsoneditor .ace_markup.ace_underline {text-decoration: underline}.ace-jsoneditor .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y}')
        var o = e('../lib/dom')
        o.importCssString(t.cssText, t.cssClass)
      }
    )
  },
  function(e, t, o) {
    'use strict'
    var n = o(11),
      r = o(36)
    e.exports = function(e) {
      function t(e) {
        ;(this.editor = e), (this.dom = {})
      }
      return (
        (t.prototype = new e()),
        (t.prototype.getDom = function() {
          var e = this.dom
          if (e.tr) return e.tr
          this._updateEditability()
          var t = document.createElement('tr')
          if (
            ((t.node = this), (e.tr = t), 'tree' === this.editor.options.mode)
          ) {
            e.tdDrag = document.createElement('td')
            var o = document.createElement('td')
            e.tdMenu = o
            var n = document.createElement('button')
            ;(n.type = 'button'),
              (n.className = 'jsoneditor-contextmenu'),
              (n.title = 'Click to open the actions menu (Ctrl+M)'),
              (e.menu = n),
              o.appendChild(e.menu)
          }
          var r = document.createElement('td'),
            a = document.createElement('div')
          return (
            (a.innerHTML = '(empty)'),
            (a.className = 'jsoneditor-readonly'),
            r.appendChild(a),
            (e.td = r),
            (e.text = a),
            this.updateDom(),
            t
          )
        }),
        (t.prototype.updateDom = function() {
          var e = this.dom,
            t = e.td
          t && (t.style.paddingLeft = 24 * this.getLevel() + 26 + 'px')
          var o = e.text
          o && (o.innerHTML = '(empty ' + this.parent.type + ')')
          var n = e.tr
          this.isVisible()
            ? !e.tr.firstChild &&
              (e.tdDrag && n.appendChild(e.tdDrag),
              e.tdMenu && n.appendChild(e.tdMenu),
              n.appendChild(t))
            : e.tr.firstChild &&
              (e.tdDrag && n.removeChild(e.tdDrag),
              e.tdMenu && n.removeChild(e.tdMenu),
              n.removeChild(t))
        }),
        (t.prototype.isVisible = function() {
          return 0 == this.parent.childs.length
        }),
        (t.prototype.showContextMenu = function(t, o) {
          var n = this,
            a = e.TYPE_TITLES,
            i = [
              {
                text: 'Auto',
                className: 'jsoneditor-type-auto',
                title: a.auto,
                click: function() {
                  n._onAppend('', '', 'auto')
                }
              },
              {
                text: 'Array',
                className: 'jsoneditor-type-array',
                title: a.array,
                click: function() {
                  n._onAppend('', [])
                }
              },
              {
                text: 'Object',
                className: 'jsoneditor-type-object',
                title: a.object,
                click: function() {
                  n._onAppend('', {})
                }
              },
              {
                text: 'String',
                className: 'jsoneditor-type-string',
                title: a.string,
                click: function() {
                  n._onAppend('', '', 'string')
                }
              }
            ]
          n.addTemplates(i, !0)
          var s = new r(
            [
              {
                text: 'Append!',
                title: "Append a new field with type 'auto' (Ctrl+Shift+Ins)",
                submenuTitle: 'Select the type of the field to be appended',
                className: 'jsoneditor-insert',
                click: function() {
                  n._onAppend('', '', 'auto')
                },
                submenu: i
              }
            ],
            { close: o }
          )
          s.show(t, this.editor.content)
        }),
        (t.prototype.onEvent = function(e) {
          var t = e.type,
            o = e.target || e.srcElement,
            r = this.dom,
            a = r.menu
          if (
            (o == a &&
              ('mouseover' == t
                ? this.editor.highlighter.highlight(this.parent)
                : 'mouseout' == t && this.editor.highlighter.unhighlight()),
            'click' == t && o == r.menu)
          ) {
            var i = this.editor.highlighter
            i.highlight(this.parent),
              i.lock(),
              n.addClassName(r.menu, 'jsoneditor-selected'),
              this.showContextMenu(r.menu, function() {
                n.removeClassName(r.menu, 'jsoneditor-selected'),
                  i.unlock(),
                  i.unhighlight()
              })
          }
          'keydown' == t && this.onKeyDown(e)
        }),
        t
      )
    }
  },
  function(e, t) {
    var o = (function() {
      var e = {
          trace: function() {},
          yy: {},
          symbols_: {
            error: 2,
            JSONString: 3,
            STRING: 4,
            JSONNumber: 5,
            NUMBER: 6,
            JSONNullLiteral: 7,
            NULL: 8,
            JSONBooleanLiteral: 9,
            TRUE: 10,
            FALSE: 11,
            JSONText: 12,
            JSONValue: 13,
            EOF: 14,
            JSONObject: 15,
            JSONArray: 16,
            '{': 17,
            '}': 18,
            JSONMemberList: 19,
            JSONMember: 20,
            ':': 21,
            ',': 22,
            '[': 23,
            ']': 24,
            JSONElementList: 25,
            $accept: 0,
            $end: 1
          },
          terminals_: {
            2: 'error',
            4: 'STRING',
            6: 'NUMBER',
            8: 'NULL',
            10: 'TRUE',
            11: 'FALSE',
            14: 'EOF',
            17: '{',
            18: '}',
            21: ':',
            22: ',',
            23: '[',
            24: ']'
          },
          productions_: [
            0,
            [3, 1],
            [5, 1],
            [7, 1],
            [9, 1],
            [9, 1],
            [12, 2],
            [13, 1],
            [13, 1],
            [13, 1],
            [13, 1],
            [13, 1],
            [13, 1],
            [15, 2],
            [15, 3],
            [20, 3],
            [19, 1],
            [19, 3],
            [16, 2],
            [16, 3],
            [25, 1],
            [25, 3]
          ],
          performAction: function(e, t, o, n, r, a) {
            var i = a.length - 1
            switch (r) {
              case 1:
                this.$ = e
                  .replace(/\\(\\|")/g, '$1')
                  .replace(/\\n/g, '\n')
                  .replace(/\\r/g, '\r')
                  .replace(/\\t/g, '\t')
                  .replace(/\\v/g, '\x0B')
                  .replace(/\\f/g, '\f')
                  .replace(/\\b/g, '\b')
                break
              case 2:
                this.$ = +e
                break
              case 3:
                this.$ = null
                break
              case 4:
                this.$ = !0
                break
              case 5:
                this.$ = !1
                break
              case 6:
                return (this.$ = a[i - 1])
                break
              case 13:
                this.$ = {}
                break
              case 14:
                this.$ = a[i - 1]
                break
              case 15:
                this.$ = [a[i - 2], a[i]]
                break
              case 16:
                ;(this.$ = {}), (this.$[a[i][0]] = a[i][1])
                break
              case 17:
                ;(this.$ = a[i - 2]), (a[i - 2][a[i][0]] = a[i][1])
                break
              case 18:
                this.$ = []
                break
              case 19:
                this.$ = a[i - 1]
                break
              case 20:
                this.$ = [a[i]]
                break
              case 21:
                ;(this.$ = a[i - 2]), a[i - 2].push(a[i])
            }
          },
          table: [
            {
              3: 5,
              4: [1, 12],
              5: 6,
              6: [1, 13],
              7: 3,
              8: [1, 9],
              9: 4,
              10: [1, 10],
              11: [1, 11],
              12: 1,
              13: 2,
              15: 7,
              16: 8,
              17: [1, 14],
              23: [1, 15]
            },
            { 1: [3] },
            { 14: [1, 16] },
            { 14: [2, 7], 18: [2, 7], 22: [2, 7], 24: [2, 7] },
            { 14: [2, 8], 18: [2, 8], 22: [2, 8], 24: [2, 8] },
            { 14: [2, 9], 18: [2, 9], 22: [2, 9], 24: [2, 9] },
            { 14: [2, 10], 18: [2, 10], 22: [2, 10], 24: [2, 10] },
            { 14: [2, 11], 18: [2, 11], 22: [2, 11], 24: [2, 11] },
            { 14: [2, 12], 18: [2, 12], 22: [2, 12], 24: [2, 12] },
            { 14: [2, 3], 18: [2, 3], 22: [2, 3], 24: [2, 3] },
            { 14: [2, 4], 18: [2, 4], 22: [2, 4], 24: [2, 4] },
            { 14: [2, 5], 18: [2, 5], 22: [2, 5], 24: [2, 5] },
            { 14: [2, 1], 18: [2, 1], 21: [2, 1], 22: [2, 1], 24: [2, 1] },
            { 14: [2, 2], 18: [2, 2], 22: [2, 2], 24: [2, 2] },
            { 3: 20, 4: [1, 12], 18: [1, 17], 19: 18, 20: 19 },
            {
              3: 5,
              4: [1, 12],
              5: 6,
              6: [1, 13],
              7: 3,
              8: [1, 9],
              9: 4,
              10: [1, 10],
              11: [1, 11],
              13: 23,
              15: 7,
              16: 8,
              17: [1, 14],
              23: [1, 15],
              24: [1, 21],
              25: 22
            },
            { 1: [2, 6] },
            { 14: [2, 13], 18: [2, 13], 22: [2, 13], 24: [2, 13] },
            { 18: [1, 24], 22: [1, 25] },
            { 18: [2, 16], 22: [2, 16] },
            { 21: [1, 26] },
            { 14: [2, 18], 18: [2, 18], 22: [2, 18], 24: [2, 18] },
            { 22: [1, 28], 24: [1, 27] },
            { 22: [2, 20], 24: [2, 20] },
            { 14: [2, 14], 18: [2, 14], 22: [2, 14], 24: [2, 14] },
            { 3: 20, 4: [1, 12], 20: 29 },
            {
              3: 5,
              4: [1, 12],
              5: 6,
              6: [1, 13],
              7: 3,
              8: [1, 9],
              9: 4,
              10: [1, 10],
              11: [1, 11],
              13: 30,
              15: 7,
              16: 8,
              17: [1, 14],
              23: [1, 15]
            },
            { 14: [2, 19], 18: [2, 19], 22: [2, 19], 24: [2, 19] },
            {
              3: 5,
              4: [1, 12],
              5: 6,
              6: [1, 13],
              7: 3,
              8: [1, 9],
              9: 4,
              10: [1, 10],
              11: [1, 11],
              13: 31,
              15: 7,
              16: 8,
              17: [1, 14],
              23: [1, 15]
            },
            { 18: [2, 17], 22: [2, 17] },
            { 18: [2, 15], 22: [2, 15] },
            { 22: [2, 21], 24: [2, 21] }
          ],
          defaultActions: { 16: [2, 6] },
          parseError: function(e) {
            throw new Error(e)
          },
          parse: function(e) {
            function t(e) {
              ;(a.length -= 2 * e), (i.length -= e), (s.length -= e)
            }
            function o() {
              var e
              return (
                (e = n.lexer.lex() || 1),
                'number' != typeof e && (e = n.symbols_[e] || e),
                e
              )
            }
            var n = this,
              a = [0],
              i = [null],
              s = [],
              l = this.table,
              d = '',
              c = 0,
              u = 0,
              g = 0,
              h = 2
            this.lexer.setInput(e),
              (this.lexer.yy = this.yy),
              (this.yy.lexer = this.lexer),
              'undefined' == typeof this.lexer.yylloc &&
                (this.lexer.yylloc = {})
            var m = this.lexer.yylloc
            s.push(m),
              'function' == typeof this.yy.parseError &&
                (this.parseError = this.yy.parseError)
            for (var f = {}, y, A, C, w, E, b, p, v, F; ; ) {
              ;(C = a[a.length - 1]),
                this.defaultActions[C]
                  ? (w = this.defaultActions[C])
                  : (null == y && (y = o()), (w = l[C] && l[C][y]))
              _handle_error: if (
                'undefined' == typeof w ||
                !w.length ||
                !w[0]
              ) {
                if (!g) {
                  for (b in ((F = []), l[C]))
                    this.terminals_[b] &&
                      2 < b &&
                      F.push("'" + this.terminals_[b] + "'")
                  var x = ''
                  ;(x = this.lexer.showPosition
                    ? 'Parse error on line ' +
                      (c + 1) +
                      ':\n' +
                      this.lexer.showPosition() +
                      '\nExpecting ' +
                      F.join(', ') +
                      ", got '" +
                      this.terminals_[y] +
                      "'"
                    : 'Parse error on line ' +
                      (c + 1) +
                      ': Unexpected ' +
                      (1 == y
                        ? 'end of input'
                        : "'" + (this.terminals_[y] || y) + "'")),
                    this.parseError(x, {
                      text: this.lexer.match,
                      token: this.terminals_[y] || y,
                      line: this.lexer.yylineno,
                      loc: m,
                      expected: F
                    })
                }
                if (3 == g) {
                  if (y == 1) throw new Error(x || 'Parsing halted.')
                  ;(u = this.lexer.yyleng),
                    (d = this.lexer.yytext),
                    (c = this.lexer.yylineno),
                    (m = this.lexer.yylloc),
                    (y = o())
                }
                for (; !(h.toString() in l[C]); ) {
                  if (0 == C) throw new Error(x || 'Parsing halted.')
                  t(1), (C = a[a.length - 1])
                }
                ;(A = y),
                  (y = h),
                  (C = a[a.length - 1]),
                  (w = l[C] && l[C][h]),
                  (g = 3)
              }
              if (w[0] instanceof Array && 1 < w.length)
                throw new Error(
                  'Parse Error: multiple actions possible at state: ' +
                    C +
                    ', token: ' +
                    y
                )
              switch (w[0]) {
                case 1:
                  a.push(y),
                    i.push(this.lexer.yytext),
                    s.push(this.lexer.yylloc),
                    a.push(w[1]),
                    (y = null),
                    A
                      ? ((y = A), (A = null))
                      : ((u = this.lexer.yyleng),
                        (d = this.lexer.yytext),
                        (c = this.lexer.yylineno),
                        (m = this.lexer.yylloc),
                        0 < g && g--)
                  break
                case 2:
                  if (
                    ((p = this.productions_[w[1]][1]),
                    (f.$ = i[i.length - p]),
                    (f._$ = {
                      first_line: s[s.length - (p || 1)].first_line,
                      last_line: s[s.length - 1].last_line,
                      first_column: s[s.length - (p || 1)].first_column,
                      last_column: s[s.length - 1].last_column
                    }),
                    (E = this.performAction.call(
                      f,
                      d,
                      u,
                      c,
                      this.yy,
                      w[1],
                      i,
                      s
                    )),
                    'undefined' != typeof E)
                  )
                    return E
                  p &&
                    ((a = a.slice(0, 2 * (-1 * p))),
                    (i = i.slice(0, -1 * p)),
                    (s = s.slice(0, -1 * p))),
                    a.push(this.productions_[w[1]][0]),
                    i.push(f.$),
                    s.push(f._$),
                    (v = l[a[a.length - 2]][a[a.length - 1]]),
                    a.push(v)
                  break
                case 3:
                  return !0
              }
            }
            return !0
          }
        },
        t = (function() {
          var e = {
            EOF: 1,
            parseError: function(e, t) {
              if (this.yy.parseError) this.yy.parseError(e, t)
              else throw new Error(e)
            },
            setInput: function(e) {
              return (
                (this._input = e),
                (this._more = this._less = this.done = !1),
                (this.yylineno = this.yyleng = 0),
                (this.yytext = this.matched = this.match = ''),
                (this.conditionStack = ['INITIAL']),
                (this.yylloc = {
                  first_line: 1,
                  first_column: 0,
                  last_line: 1,
                  last_column: 0
                }),
                this
              )
            },
            input: function() {
              var e = this._input[0]
              ;(this.yytext += e),
                this.yyleng++,
                (this.match += e),
                (this.matched += e)
              var t = e.match(/\n/)
              return (
                t && this.yylineno++, (this._input = this._input.slice(1)), e
              )
            },
            unput: function(e) {
              return (this._input = e + this._input), this
            },
            more: function() {
              return (this._more = !0), this
            },
            less: function(e) {
              this._input = this.match.slice(e) + this._input
            },
            pastInput: function() {
              var e = this.matched.substr(
                0,
                this.matched.length - this.match.length
              )
              return (
                (20 < e.length ? '...' : '') + e.substr(-20).replace(/\n/g, '')
              )
            },
            upcomingInput: function() {
              var e = this.match
              return (
                20 > e.length && (e += this._input.substr(0, 20 - e.length)),
                (e.substr(0, 20) + (20 < e.length ? '...' : '')).replace(
                  /\n/g,
                  ''
                )
              )
            },
            showPosition: function() {
              var e = this.pastInput(),
                t = Array(e.length + 1).join('-')
              return e + this.upcomingInput() + '\n' + t + '^'
            },
            next: function() {
              if (this.done) return this.EOF
              this._input || (this.done = !0)
              var e, t, o, n, r
              this._more || ((this.yytext = ''), (this.match = ''))
              for (
                var a = this._currentRules(), s = 0;
                s < a.length &&
                ((o = this._input.match(this.rules[a[s]])),
                !(
                  o &&
                  (!t || o[0].length > t[0].length) &&
                  ((t = o), (n = s), !this.options.flex)
                ));
                s++
              );
              return t
                ? ((r = t[0].match(/\n.*/g)),
                  r && (this.yylineno += r.length),
                  (this.yylloc = {
                    first_line: this.yylloc.last_line,
                    last_line: this.yylineno + 1,
                    first_column: this.yylloc.last_column,
                    last_column: r
                      ? r[r.length - 1].length - 1
                      : this.yylloc.last_column + t[0].length
                  }),
                  (this.yytext += t[0]),
                  (this.match += t[0]),
                  (this.yyleng = this.yytext.length),
                  (this._more = !1),
                  (this._input = this._input.slice(t[0].length)),
                  (this.matched += t[0]),
                  (e = this.performAction.call(
                    this,
                    this.yy,
                    this,
                    a[n],
                    this.conditionStack[this.conditionStack.length - 1]
                  )),
                  this.done && this._input && (this.done = !1),
                  e ? e : void 0)
                : '' === this._input
                  ? this.EOF
                  : void this.parseError(
                      'Lexical error on line ' +
                        (this.yylineno + 1) +
                        '. Unrecognized text.\n' +
                        this.showPosition(),
                      { text: '', token: null, line: this.yylineno }
                    )
            },
            lex: function() {
              var e = this.next()
              return 'undefined' == typeof e ? this.lex() : e
            },
            begin: function(e) {
              this.conditionStack.push(e)
            },
            popState: function() {
              return this.conditionStack.pop()
            },
            _currentRules: function() {
              return this.conditions[
                this.conditionStack[this.conditionStack.length - 1]
              ].rules
            },
            topState: function() {
              return this.conditionStack[this.conditionStack.length - 2]
            },
            pushState: function(e) {
              this.begin(e)
            },
            options: {},
            performAction: function(e, t, o, n) {
              switch (o) {
                case 0:
                  break
                case 1:
                  return 6
                  break
                case 2:
                  return (t.yytext = t.yytext.substr(1, t.yyleng - 2)), 4
                  break
                case 3:
                  return 17
                  break
                case 4:
                  return 18
                  break
                case 5:
                  return 23
                  break
                case 6:
                  return 24
                  break
                case 7:
                  return 22
                  break
                case 8:
                  return 21
                  break
                case 9:
                  return 10
                  break
                case 10:
                  return 11
                  break
                case 11:
                  return 8
                  break
                case 12:
                  return 14
                  break
                case 13:
                  return 'INVALID'
              }
            },
            rules: [
              /^(?:\s+)/,
              /^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,
              /^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,
              /^(?:\{)/,
              /^(?:\})/,
              /^(?:\[)/,
              /^(?:\])/,
              /^(?:,)/,
              /^(?::)/,
              /^(?:true\b)/,
              /^(?:false\b)/,
              /^(?:null\b)/,
              /^(?:$)/,
              /^(?:.)/
            ],
            conditions: {
              INITIAL: {
                rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
                inclusive: !0
              }
            }
          }
          return e
        })()
      return (e.lexer = t), e
    })()
    ;(t.parser = o), (t.parse = o.parse.bind(o))
  },
  function(e, t, o) {
    'use strict'
    var n = o(374),
      r = o(109),
      a = o(11),
      i = {},
      s = 3,
      l = 'ace/theme/jsoneditor'
    ;(i.create = function(e, t) {
      ;(t = t || {}),
        (this.options = t),
        (this.indentation = t.indentation ? +t.indentation : 2)
      var i = t.ace ? t.ace : n
      if (
        ((this.mode = 'code' == t.mode ? 'code' : 'text'),
        'code' == this.mode &&
          'undefined' == typeof i &&
          ((this.mode = 'text'),
          console.warn(
            'Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.'
          )),
        (this.theme = t.theme || l),
        this.theme === l && i)
      )
        try {
          o(375)
        } catch (e) {
          console.error(e)
        }
      var s = this
      ;(this.container = e),
        (this.dom = {}),
        (this.aceEditor = void 0),
        (this.textarea = void 0),
        (this.validateSchema = null),
        (this._debouncedValidate = a.debounce(
          this.validate.bind(this),
          this.DEBOUNCE_INTERVAL
        )),
        (this.width = e.clientWidth),
        (this.height = e.clientHeight),
        (this.frame = document.createElement('div')),
        (this.frame.className =
          'jsoneditor jsoneditor-mode-' + this.options.mode),
        (this.frame.onclick = function(e) {
          e.preventDefault()
        }),
        (this.frame.onkeydown = function(e) {
          s._onKeyDown(e)
        }),
        (this.menu = document.createElement('div')),
        (this.menu.className = 'jsoneditor-menu'),
        this.frame.appendChild(this.menu)
      var d = document.createElement('button')
      ;(d.type = 'button'),
        (d.className = 'jsoneditor-format'),
        (d.title =
          'Format JSON data, with proper indentation and line feeds (Ctrl+\\)'),
        this.menu.appendChild(d),
        (d.onclick = function() {
          try {
            s.format(), s._onChange()
          } catch (e) {
            s._onError(e)
          }
        })
      var c = document.createElement('button')
      ;(c.type = 'button'),
        (c.className = 'jsoneditor-compact'),
        (c.title = 'Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)'),
        this.menu.appendChild(c),
        (c.onclick = function() {
          try {
            s.compact(), s._onChange()
          } catch (e) {
            s._onError(e)
          }
        }),
        this.options &&
          this.options.modes &&
          this.options.modes.length &&
          (this.modeSwitcher = new r(
            this.menu,
            this.options.modes,
            this.options.mode,
            function(e) {
              s.setMode(e), s.modeSwitcher.focus()
            }
          ))
      var u =
        this.options.onEditable &&
        typeof ('function' === this.options.onEditable) &&
        !this.options.onEditable({})
      if (
        ((this.content = document.createElement('div')),
        (this.content.className = 'jsoneditor-outer'),
        this.frame.appendChild(this.content),
        this.container.appendChild(this.frame),
        'code' == this.mode)
      ) {
        ;(this.editorDom = document.createElement('div')),
          (this.editorDom.style.height = '100%'),
          (this.editorDom.style.width = '100%'),
          this.content.appendChild(this.editorDom)
        var p = i.edit(this.editorDom)
        ;(p.$blockScrolling = Infinity),
          p.setTheme(this.theme),
          p.setOptions({ readOnly: u }),
          p.setShowPrintMargin(!1),
          p.setFontSize(13),
          p.getSession().setMode('ace/mode/json'),
          p.getSession().setTabSize(this.indentation),
          p.getSession().setUseSoftTabs(!0),
          p.getSession().setUseWrapMode(!0),
          p.commands.bindKey('Ctrl-L', null),
          p.commands.bindKey('Command-L', null),
          (this.aceEditor = p),
          this.hasOwnProperty('editor') ||
            Object.defineProperty(this, 'editor', {
              get: function() {
                return (
                  console.warn(
                    'Property "editor" has been renamed to "aceEditor".'
                  ),
                  s.aceEditor
                )
              },
              set: function(e) {
                console.warn(
                  'Property "editor" has been renamed to "aceEditor".'
                ),
                  (s.aceEditor = e)
              }
            })
        var g = document.createElement('a')
        g.appendChild(document.createTextNode('powered by ace')),
          (g.href = 'http://ace.ajax.org'),
          (g.target = '_blank'),
          (g.className = 'jsoneditor-poweredBy'),
          (g.onclick = function() {
            window.open(g.href, g.target)
          }),
          this.menu.appendChild(g),
          p.on('change', this._onChange.bind(this))
      } else {
        var h = document.createElement('textarea')
        ;(h.className = 'jsoneditor-text'),
          (h.spellcheck = !1),
          this.content.appendChild(h),
          (this.textarea = h),
          (this.textarea.readOnly = u),
          null === this.textarea.oninput
            ? (this.textarea.oninput = this._onChange.bind(this))
            : (this.textarea.onchange = this._onChange.bind(this))
      }
      this.setSchema(this.options.schema)
    }),
      (i._onChange = function() {
        if ((this._debouncedValidate(), this.options.onChange))
          try {
            this.options.onChange()
          } catch (e) {
            console.error('Error in onChange callback: ', e)
          }
      }),
      (i._onKeyDown = function(e) {
        var t = e.which || e.keyCode,
          o = !1
        220 == t &&
          e.ctrlKey &&
          (e.shiftKey
            ? (this.compact(), this._onChange())
            : (this.format(), this._onChange()),
          (o = !0)),
          o && (e.preventDefault(), e.stopPropagation())
      }),
      (i.destroy = function() {
        this.aceEditor && (this.aceEditor.destroy(), (this.aceEditor = null)),
          this.frame &&
            this.container &&
            this.frame.parentNode == this.container &&
            this.container.removeChild(this.frame),
          this.modeSwitcher &&
            (this.modeSwitcher.destroy(), (this.modeSwitcher = null)),
          (this.textarea = null),
          (this._debouncedValidate = null)
      }),
      (i.compact = function() {
        var e = this.get(),
          t = JSON.stringify(e)
        this.setText(t)
      }),
      (i.format = function() {
        var e = this.get(),
          t = JSON.stringify(e, null, this.indentation)
        this.setText(t)
      }),
      (i.focus = function() {
        this.textarea && this.textarea.focus(),
          this.aceEditor && this.aceEditor.focus()
      }),
      (i.resize = function() {
        if (this.aceEditor) {
          this.aceEditor.resize(!1)
        }
      }),
      (i.set = function(e) {
        this.setText(JSON.stringify(e, null, this.indentation))
      }),
      (i.get = function() {
        var e = this.getText(),
          t
        try {
          t = a.parse(e)
        } catch (o) {
          ;(e = a.sanitize(e)), (t = a.parse(e))
        }
        return t
      }),
      (i.getText = function() {
        return this.textarea
          ? this.textarea.value
          : this.aceEditor
            ? this.aceEditor.getValue()
            : ''
      }),
      (i.setText = function(e) {
        var t
        if (
          ((t =
            !0 === this.options.escapeUnicode ? a.escapeUnicodeChars(e) : e),
          this.textarea && (this.textarea.value = t),
          this.aceEditor)
        ) {
          var o = this.options.onChange
          ;(this.options.onChange = null),
            this.aceEditor.setValue(t, -1),
            (this.options.onChange = o)
        }
        this.validate()
      }),
      (i.validate = function() {
        this.dom.validationErrors &&
          (this.dom.validationErrors.parentNode.removeChild(
            this.dom.validationErrors
          ),
          (this.dom.validationErrors = null),
          (this.content.style.marginBottom = ''),
          (this.content.style.paddingBottom = ''))
        var e = !1,
          t = [],
          o
        try {
          ;(o = this.get()), (e = !0)
        } catch (e) {}
        if (e && this.validateSchema) {
          var n = this.validateSchema(o)
          n ||
            (t = this.validateSchema.errors.map(function(e) {
              return a.improveSchemaError(e)
            }))
        }
        if (0 < t.length) {
          var r = t.length > s
          if (r) {
            t = t.slice(0, s)
            var i = this.validateSchema.errors.length - s
            t.push('(' + i + ' more errors...)')
          }
          var l = document.createElement('div')
          ;(l.innerHTML =
            '<table class="jsoneditor-text-errors"><tbody>' +
            t
              .map(function(e) {
                var t
                return (
                  (t =
                    'string' == typeof e
                      ? '<td colspan="2"><pre>' + e + '</pre></td>'
                      : '<td>' +
                        e.dataPath +
                        '</td><td>' +
                        e.message +
                        '</td>'),
                  '<tr><td><button class="jsoneditor-schema-error"></button></td>' +
                    t +
                    '</tr>'
                )
              })
              .join('') +
            '</tbody></table>'),
            (this.dom.validationErrors = l),
            this.frame.appendChild(l)
          var d = l.clientHeight
          ;(this.content.style.marginBottom = -d + 'px'),
            (this.content.style.paddingBottom = d + 'px')
        }
        if (this.aceEditor) {
          this.aceEditor.resize(!1)
        }
      }),
      (e.exports = [
        { mode: 'text', mixin: i, data: 'text', load: i.format },
        { mode: 'code', mixin: i, data: 'text', load: i.format }
      ])
  },
  function(e, t, o) {
    'use strict'
    var n = Math.min,
      r = Math.max,
      a = o(369),
      i = o(370),
      s = o(373),
      l = o(36),
      d = o(372),
      c = o(109),
      u = o(11),
      p = {}
    ;(p.create = function(e, t) {
      if (!e) throw new Error('No container element provided.')
      ;(this.container = e),
        (this.dom = {}),
        (this.highlighter = new a()),
        (this.selection = void 0),
        (this.multiselection = { nodes: [] }),
        (this.validateSchema = null),
        (this.errorNodes = []),
        (this.node = null),
        (this.focusTarget = null),
        this._setOptions(t),
        this.options.history &&
          'view' !== this.options.mode &&
          (this.history = new i(this)),
        this._createFrame(),
        this._createTable()
    }),
      (p.destroy = function() {
        this.frame &&
          this.container &&
          this.frame.parentNode == this.container &&
          (this.container.removeChild(this.frame), (this.frame = null)),
          (this.container = null),
          (this.dom = null),
          this.clear(),
          (this.node = null),
          (this.focusTarget = null),
          (this.selection = null),
          (this.multiselection = null),
          (this.errorNodes = null),
          (this.validateSchema = null),
          (this._debouncedValidate = null),
          this.history && (this.history.destroy(), (this.history = null)),
          this.searchBox && (this.searchBox.destroy(), (this.searchBox = null)),
          this.modeSwitcher &&
            (this.modeSwitcher.destroy(), (this.modeSwitcher = null))
      }),
      (p._setOptions = function(e) {
        if (
          ((this.options = {
            search: !0,
            history: !0,
            mode: 'tree',
            name: void 0,
            schema: null
          }),
          e)
        )
          for (var t in e) e.hasOwnProperty(t) && (this.options[t] = e[t])
        this.setSchema(this.options.schema),
          (this._debouncedValidate = u.debounce(
            this.validate.bind(this),
            this.DEBOUNCE_INTERVAL
          ))
      }),
      (p.set = function(e, t) {
        if (
          (t &&
            (console.warn(
              'Second parameter "name" is deprecated. Use setName(name) instead.'
            ),
            (this.options.name = t)),
          e instanceof Function || void 0 === e)
        )
          this.clear()
        else {
          this.content.removeChild(this.table)
          var o = { field: this.options.name, value: e },
            n = new d(this, o)
          this._setRoot(n), this.validate()
          this.node.expand(!1), this.content.appendChild(this.table)
        }
        this.history && this.history.clear(),
          this.searchBox && this.searchBox.clear()
      }),
      (p.get = function() {
        if (this.focusTarget) {
          var e = d.getNodeFromTarget(this.focusTarget)
          e && e.blur()
        }
        return this.node ? this.node.getValue() : void 0
      }),
      (p.getText = function() {
        return JSON.stringify(this.get())
      }),
      (p.setText = function(e) {
        this.set(u.parse(e))
      }),
      (p.setName = function(e) {
        ;(this.options.name = e),
          this.node && this.node.updateField(this.options.name)
      }),
      (p.getName = function() {
        return this.options.name
      }),
      (p.focus = function() {
        var e = this.content.querySelector('[contenteditable=true]')
        e
          ? e.focus()
          : this.node.dom.expand
            ? this.node.dom.expand.focus()
            : this.node.dom.menu
              ? this.node.dom.menu.focus()
              : ((e = this.frame.querySelector('button')), e && e.focus())
      }),
      (p.clear = function() {
        this.node &&
          (this.node.collapse(),
          this.tbody.removeChild(this.node.getDom()),
          delete this.node)
      }),
      (p._setRoot = function(e) {
        this.clear(), (this.node = e), this.tbody.appendChild(e.getDom())
      }),
      (p.search = function(e) {
        var t
        return (
          this.node
            ? (this.content.removeChild(this.table),
              (t = this.node.search(e)),
              this.content.appendChild(this.table))
            : (t = []),
          t
        )
      }),
      (p.expandAll = function() {
        this.node &&
          (this.content.removeChild(this.table),
          this.node.expand(),
          this.content.appendChild(this.table))
      }),
      (p.collapseAll = function() {
        this.node &&
          (this.content.removeChild(this.table),
          this.node.collapse(),
          this.content.appendChild(this.table))
      }),
      (p._onAction = function(e, t) {
        this.history && this.history.add(e, t), this._onChange()
      }),
      (p._onChange = function() {
        if ((this._debouncedValidate(), this.options.onChange))
          try {
            this.options.onChange()
          } catch (e) {
            console.error('Error in onChange callback: ', e)
          }
      }),
      (p.validate = function() {
        this.errorNodes &&
          this.errorNodes.forEach(function(e) {
            e.setError(null)
          })
        var e = this.node
        if (e) {
          var t = e.validate(),
            o = []
          if (this.validateSchema) {
            var n = this.validateSchema(e.getValue())
            n ||
              (o = this.validateSchema.errors
                .map(function(e) {
                  return u.improveSchemaError(e)
                })
                .map(function(t) {
                  return { node: e.findNode(t.dataPath), error: t }
                })
                .filter(function(e) {
                  return null != e.node
                }))
          }
          this.errorNodes = t
            .concat(o)
            .reduce(function(e, t) {
              return t.node
                .findParents()
                .map(function(e) {
                  return {
                    node: e,
                    child: t.node,
                    error: {
                      message:
                        'object' === e.type
                          ? 'Contains invalid properties'
                          : 'Contains invalid items'
                    }
                  }
                })
                .concat(e, [t])
            }, [])
            .map(function(e) {
              return e.node.setError(e.error, e.child), e.node
            })
        }
      }),
      (p.refresh = function() {
        this.node && this.node.updateDom({ recurse: !0 })
      }),
      (p.startAutoScroll = function(e) {
        var t = this,
          o = this.content,
          n = u.getAbsoluteTop(o),
          r = o.clientHeight,
          a = n + r,
          i = 24
        ;(this.autoScrollStep =
          e < n + i && 0 < o.scrollTop
            ? (n + i - e) / 3
            : e > a - i && r + o.scrollTop < o.scrollHeight
              ? (a - i - e) / 3
              : void 0),
          this.autoScrollStep
            ? !this.autoScrollTimer &&
              (this.autoScrollTimer = setInterval(function() {
                t.autoScrollStep
                  ? (o.scrollTop -= t.autoScrollStep)
                  : t.stopAutoScroll()
              }, 50))
            : this.stopAutoScroll()
      }),
      (p.stopAutoScroll = function() {
        this.autoScrollTimer &&
          (clearTimeout(this.autoScrollTimer), delete this.autoScrollTimer),
          this.autoScrollStep && delete this.autoScrollStep
      }),
      (p.setSelection = function(e) {
        e &&
          ('scrollTop' in e &&
            this.content &&
            (this.content.scrollTop = e.scrollTop),
          e.nodes && this.select(e.nodes),
          e.range && u.setSelectionOffset(e.range),
          e.dom && e.dom.focus())
      }),
      (p.getSelection = function() {
        var e = u.getSelectionOffset()
        return (
          e && 'DIV' !== e.container.nodeName && (e = null),
          {
            dom: this.focusTarget,
            range: e,
            nodes: this.multiselection.nodes.slice(0),
            scrollTop: this.content ? this.content.scrollTop : 0
          }
        )
      }),
      (p.scrollTo = function(e, t) {
        var o = this.content
        if (o) {
          var a = this
          a.animateTimeout &&
            (clearTimeout(a.animateTimeout), delete a.animateTimeout),
            a.animateCallback &&
              (a.animateCallback(!1), delete a.animateCallback)
          var i = o.clientHeight,
            s = o.scrollHeight - i,
            l = n(r(e - i / 4, 0), s),
            d = function() {
              var e = o.scrollTop,
                n = l - e
              3 < Math.abs(n)
                ? ((o.scrollTop += n / 3),
                  (a.animateCallback = t),
                  (a.animateTimeout = setTimeout(d, 50)))
                : (t && t(!0),
                  (o.scrollTop = l),
                  delete a.animateTimeout,
                  delete a.animateCallback)
            }
          d()
        } else t && t(!1)
      }),
      (p._createFrame = function() {
        function e(e) {
          t._onEvent && t._onEvent(e)
        }
        ;(this.frame = document.createElement('div')),
          (this.frame.className =
            'jsoneditor jsoneditor-mode-' + this.options.mode),
          this.container.appendChild(this.frame)
        var t = this
        ;(this.frame.onclick = function(t) {
          var o = t.target
          e(t), 'BUTTON' == o.nodeName && t.preventDefault()
        }),
          (this.frame.oninput = e),
          (this.frame.onchange = e),
          (this.frame.onkeydown = e),
          (this.frame.onkeyup = e),
          (this.frame.oncut = e),
          (this.frame.onpaste = e),
          (this.frame.onmousedown = e),
          (this.frame.onmouseup = e),
          (this.frame.onmouseover = e),
          (this.frame.onmouseout = e),
          u.addEventListener(this.frame, 'focus', e, !0),
          u.addEventListener(this.frame, 'blur', e, !0),
          (this.frame.onfocusin = e),
          (this.frame.onfocusout = e),
          (this.menu = document.createElement('div')),
          (this.menu.className = 'jsoneditor-menu'),
          this.frame.appendChild(this.menu)
        var o = document.createElement('button')
        ;(o.type = 'button'),
          (o.className = 'jsoneditor-expand-all'),
          (o.title = 'Expand all fields'),
          (o.onclick = function() {
            t.expandAll()
          }),
          this.menu.appendChild(o)
        var n = document.createElement('button')
        if (
          ((n.type = 'button'),
          (n.title = 'Collapse all fields'),
          (n.className = 'jsoneditor-collapse-all'),
          (n.onclick = function() {
            t.collapseAll()
          }),
          this.menu.appendChild(n),
          this.history)
        ) {
          var r = document.createElement('button')
          ;(r.type = 'button'),
            (r.className = 'jsoneditor-undo jsoneditor-separator'),
            (r.title = 'Undo last action (Ctrl+Z)'),
            (r.onclick = function() {
              t._onUndo()
            }),
            this.menu.appendChild(r),
            (this.dom.undo = r)
          var a = document.createElement('button')
          ;(a.type = 'button'),
            (a.className = 'jsoneditor-redo'),
            (a.title = 'Redo (Ctrl+Shift+Z)'),
            (a.onclick = function() {
              t._onRedo()
            }),
            this.menu.appendChild(a),
            (this.dom.redo = a),
            (this.history.onChange = function() {
              ;(r.disabled = !t.history.canUndo()),
                (a.disabled = !t.history.canRedo())
            }),
            this.history.onChange()
        }
        if (this.options && this.options.modes && this.options.modes.length) {
          var i = this
          this.modeSwitcher = new c(
            this.menu,
            this.options.modes,
            this.options.mode,
            function(e) {
              i.modeSwitcher.destroy(), i.setMode(e), i.modeSwitcher.focus()
            }
          )
        }
        this.options.search && (this.searchBox = new s(this, this.menu))
      }),
      (p._onUndo = function() {
        this.history && (this.history.undo(), this._onChange())
      }),
      (p._onRedo = function() {
        this.history && (this.history.redo(), this._onChange())
      }),
      (p._onEvent = function(e) {
        'keydown' == e.type && this._onKeyDown(e),
          'focus' == e.type && (this.focusTarget = e.target),
          'mousedown' == e.type && this._startDragDistance(e),
          ('mousemove' == e.type || 'mouseup' == e.type || 'click' == e.type) &&
            this._updateDragDistance(e)
        var t = d.getNodeFromTarget(e.target)
        if (t && t.selected) {
          if ('click' == e.type) {
            if (e.target == t.dom.menu)
              return void this.showContextMenu(e.target)
            e.hasMoved || this.deselect()
          }
          'mousedown' == e.type && d.onDragStart(this.multiselection.nodes, e)
        } else
          'mousedown' == e.type &&
            (this.deselect(),
            t && e.target == t.dom.drag
              ? d.onDragStart(t, e)
              : (!t ||
                  (e.target != t.dom.field &&
                    e.target != t.dom.value &&
                    e.target != t.dom.select)) &&
                this._onMultiSelectStart(e))
        t && t.onEvent(e)
      }),
      (p._startDragDistance = function(e) {
        this.dragDistanceEvent = {
          initialTarget: e.target,
          initialPageX: e.pageX,
          initialPageY: e.pageY,
          dragDistance: 0,
          hasMoved: !1
        }
      }),
      (p._updateDragDistance = function(e) {
        this.dragDistanceEvent || this._startDragDistance(e)
        var t = e.pageX - this.dragDistanceEvent.initialPageX,
          o = e.pageY - this.dragDistanceEvent.initialPageY
        return (
          (this.dragDistanceEvent.dragDistance = Math.sqrt(t * t + o * o)),
          (this.dragDistanceEvent.hasMoved =
            this.dragDistanceEvent.hasMoved ||
            10 < this.dragDistanceEvent.dragDistance),
          (e.dragDistance = this.dragDistanceEvent.dragDistance),
          (e.hasMoved = this.dragDistanceEvent.hasMoved),
          e.dragDistance
        )
      }),
      (p._onMultiSelectStart = function(e) {
        var t = d.getNodeFromTarget(e.target)
        if (
          'tree' === this.options.mode &&
          void 0 === this.options.onEditable
        ) {
          ;(this.multiselection = { start: t || null, end: null, nodes: [] }),
            this._startDragDistance(e)
          var o = this
          this.mousemove ||
            (this.mousemove = u.addEventListener(window, 'mousemove', function(
              e
            ) {
              o._onMultiSelect(e)
            })),
            this.mouseup ||
              (this.mouseup = u.addEventListener(window, 'mouseup', function(
                e
              ) {
                o._onMultiSelectEnd(e)
              }))
        }
      }),
      (p._onMultiSelect = function(e) {
        if ((e.preventDefault(), this._updateDragDistance(e), !!e.hasMoved)) {
          var t = d.getNodeFromTarget(e.target)
          t &&
            (null == this.multiselection.start &&
              (this.multiselection.start = t),
            (this.multiselection.end = t)),
            this.deselect()
          var o = this.multiselection.start,
            n = this.multiselection.end || this.multiselection.start
          o &&
            n &&
            ((this.multiselection.nodes = this._findTopLevelNodes(o, n)),
            this.select(this.multiselection.nodes))
        }
      }),
      (p._onMultiSelectEnd = function() {
        this.multiselection.nodes[0] &&
          this.multiselection.nodes[0].dom.menu.focus(),
          (this.multiselection.start = null),
          (this.multiselection.end = null),
          this.mousemove &&
            (u.removeEventListener(window, 'mousemove', this.mousemove),
            delete this.mousemove),
          this.mouseup &&
            (u.removeEventListener(window, 'mouseup', this.mouseup),
            delete this.mouseup)
      }),
      (p.deselect = function(e) {
        this.multiselection.nodes.forEach(function(e) {
          e.setSelected(!1)
        }),
          (this.multiselection.nodes = []),
          e &&
            ((this.multiselection.start = null),
            (this.multiselection.end = null))
      }),
      (p.select = function(e) {
        if (!Array.isArray(e)) return this.select([e])
        if (e) {
          this.deselect(), (this.multiselection.nodes = e.slice(0))
          var t = e[0]
          e.forEach(function(e) {
            e.setSelected(!0, e === t)
          })
        }
      }),
      (p._findTopLevelNodes = function(e, t) {
        for (
          var o = e.getNodePath(), a = t.getNodePath(), s = 0;
          s < o.length && o[s] === a[s];

        )
          s++
        var i = o[s - 1],
          l = o[s],
          d = a[s]
        if (
          ((l && d) ||
            (i.parent
              ? ((l = i), (d = i), (i = i.parent))
              : ((l = i.childs[0]), (d = i.childs[i.childs.length - 1]))),
          i && l && d)
        ) {
          var c = i.childs.indexOf(l),
            u = i.childs.indexOf(d),
            p = n(c, u),
            g = r(c, u)
          return i.childs.slice(p, g + 1)
        }
        return []
      }),
      (p._onKeyDown = function(e) {
        var t = e.which || e.keyCode,
          o = e.ctrlKey,
          n = e.shiftKey,
          r = !1
        if (9 == t) {
          var a = this
          setTimeout(function() {
            u.selectContentEditable(a.focusTarget)
          }, 0)
        }
        if (this.searchBox)
          if (o && 70 == t)
            this.searchBox.dom.search.focus(),
              this.searchBox.dom.search.select(),
              (r = !0)
          else if (114 == t || (o && 71 == t)) {
            var i = !0
            n ? this.searchBox.previous(i) : this.searchBox.next(i), (r = !0)
          }
        this.history &&
          (o && !n && 90 == t
            ? (this._onUndo(), (r = !0))
            : o && n && 90 == t && (this._onRedo(), (r = !0))),
          r && (e.preventDefault(), e.stopPropagation())
      }),
      (p._createTable = function() {
        var e = document.createElement('div')
        ;(e.className = 'jsoneditor-outer'),
          (this.contentOuter = e),
          (this.content = document.createElement('div')),
          (this.content.className = 'jsoneditor-tree'),
          e.appendChild(this.content),
          (this.table = document.createElement('table')),
          (this.table.className = 'jsoneditor-tree'),
          this.content.appendChild(this.table)
        var t
        ;(this.colgroupContent = document.createElement('colgroup')),
          'tree' === this.options.mode &&
            ((t = document.createElement('col')),
            (t.width = '24px'),
            this.colgroupContent.appendChild(t)),
          (t = document.createElement('col')),
          (t.width = '24px'),
          this.colgroupContent.appendChild(t),
          (t = document.createElement('col')),
          this.colgroupContent.appendChild(t),
          this.table.appendChild(this.colgroupContent),
          (this.tbody = document.createElement('tbody')),
          this.table.appendChild(this.tbody),
          this.frame.appendChild(e)
      }),
      (p.showContextMenu = function(e, t) {
        var o = [],
          n = this
        o.push({
          text: 'Duplicate',
          title: 'Duplicate selected fields (Ctrl+D)',
          className: 'jsoneditor-duplicate',
          click: function() {
            d.onDuplicate(n.multiselection.nodes)
          }
        }),
          o.push({
            text: 'Remove',
            title: 'Remove selected fields (Ctrl+Del)',
            className: 'jsoneditor-remove',
            click: function() {
              d.onRemove(n.multiselection.nodes)
            }
          })
        var r = new l(o, { close: t })
        r.show(e, this.content)
      }),
      (e.exports = [
        { mode: 'tree', mixin: p, data: 'json' },
        { mode: 'view', mixin: p, data: 'json' },
        { mode: 'form', mixin: p, data: 'json' }
      ])
  },
  function(e, t, o) {
    ;(t.parse = o(381)), (t.stringify = o(382))
  },
  function(e) {
    var t = {
        '"': '"',
        '\\': '\\',
        '/': '/',
        b: '\b',
        f: '\f',
        n: '\n',
        r: '\r',
        t: '\t'
      },
      o = function(e) {
        throw { name: 'SyntaxError', message: e, at: u, text: g }
      },
      n = function(e) {
        return (
          e && e !== p && o("Expected '" + e + "' instead of '" + p + "'"),
          (p = g.charAt(u)),
          (u += 1),
          p
        )
      },
      r = function() {
        var e = '',
          t
        for ('-' === p && ((e = '-'), n('-')); '0' <= p && '9' >= p; )
          (e += p), n()
        if ('.' === p) for (e += '.'; n() && '0' <= p && '9' >= p; ) e += p
        if ('e' === p || 'E' === p)
          for (
            e += p, n(), ('-' === p || '+' === p) && ((e += p), n());
            '0' <= p && '9' >= p;

          )
            (e += p), n()
        return (t = +e), isFinite(t) ? t : void o('Bad number')
      },
      a = function() {
        var e = '',
          r,
          a,
          i
        if ('"' === p)
          for (; n(); ) {
            if ('"' === p) return n(), e
            if ('\\' !== p) e += p
            else if ((n(), 'u' === p)) {
              for (
                i = 0, a = 0;
                4 > a && ((r = parseInt(n(), 16)), !!isFinite(r));
                a += 1
              )
                i = 16 * i + r
              e += String.fromCharCode(i)
            } else if ('string' == typeof t[p]) e += t[p]
            else break
          }
        o('Bad string')
      },
      i = function() {
        for (; p && ' ' >= p; ) n()
      },
      s = function() {
        switch (p) {
          case 't':
            return n('t'), n('r'), n('u'), n('e'), !0
          case 'f':
            return n('f'), n('a'), n('l'), n('s'), n('e'), !1
          case 'n':
            return n('n'), n('u'), n('l'), n('l'), null
        }
        o("Unexpected '" + p + "'")
      },
      l = function() {
        var e = []
        if ('[' === p) {
          if ((n('['), i(), ']' === p)) return n(']'), e
          for (; p; ) {
            if ((e.push(c()), i(), ']' === p)) return n(']'), e
            n(','), i()
          }
        }
        o('Bad array')
      },
      d = function() {
        var e = {},
          t
        if ('{' === p) {
          if ((n('{'), i(), '}' === p)) return n('}'), e
          for (; p; ) {
            if (
              ((t = a()),
              i(),
              n(':'),
              Object.hasOwnProperty.call(e, t) &&
                o('Duplicate key "' + t + '"'),
              (e[t] = c()),
              i(),
              '}' === p)
            )
              return n('}'), e
            n(','), i()
          }
        }
        o('Bad object')
      },
      u,
      p,
      g,
      c
    ;(c = function() {
      return (
        i(),
        '{' === p
          ? d()
          : '[' === p
            ? l()
            : '"' === p
              ? a()
              : '-' === p
                ? r()
                : '0' <= p && '9' >= p
                  ? r()
                  : s()
      )
    }),
      (e.exports = function(e, t) {
        var n
        return (
          (g = e),
          (u = 0),
          (p = ' '),
          (n = c()),
          i(),
          p && o('Syntax error'),
          'function' == typeof t
            ? (function e(o, n) {
                var r = o[n],
                  a,
                  i
                if (r && 'object' == typeof r)
                  for (a in r)
                    Object.prototype.hasOwnProperty.call(r, a) &&
                      ((i = e(r, a)), void 0 === i ? delete r[a] : (r[a] = i))
                return t.call(o, n, r)
              })({ '': n }, '')
            : n
        )
      })
  },
  function(e) {
    function t(e) {
      return (
        (r.lastIndex = 0),
        r.test(e)
          ? '"' +
            e.replace(r, function(e) {
              var t = i[e]
              return 'string' == typeof t
                ? t
                : '\\u' + ('0000' + e.charCodeAt(0).toString(16)).slice(-4)
            }) +
            '"'
          : '"' + e + '"'
      )
    }
    function o(e, n) {
      var r = a,
        d = n[e],
        c,
        i,
        u,
        p,
        g
      switch (
        (d &&
          'object' == typeof d &&
          'function' == typeof d.toJSON &&
          (d = d.toJSON(e)),
        'function' == typeof l && (d = l.call(n, e, d)),
        typeof d)
      ) {
        case 'string':
          return t(d)
        case 'number':
          return isFinite(d) ? d + '' : 'null'
        case 'boolean':
        case 'null':
          return d + ''
        case 'object':
          if (!d) return 'null'
          if (
            ((a += s),
            (g = []),
            '[object Array]' === Object.prototype.toString.apply(d))
          ) {
            for (p = d.length, c = 0; c < p; c += 1) g[c] = o(c, d) || 'null'
            return (
              (u =
                0 === g.length
                  ? '[]'
                  : a
                    ? '[\n' + a + g.join(',\n' + a) + '\n' + r + ']'
                    : '[' + g.join(',') + ']'),
              (a = r),
              u
            )
          }
          if (l && 'object' == typeof l)
            for (p = l.length, c = 0; c < p; c += 1)
              (i = l[c]),
                'string' == typeof i &&
                  ((u = o(i, d)), u && g.push(t(i) + (a ? ': ' : ':') + u))
          else
            for (i in d)
              Object.prototype.hasOwnProperty.call(d, i) &&
                ((u = o(i, d)), u && g.push(t(i) + (a ? ': ' : ':') + u))
          return (
            (u =
              0 === g.length
                ? '{}'
                : a
                  ? '{\n' + a + g.join(',\n' + a) + '\n' + r + '}'
                  : '{' + g.join(',') + '}'),
            (a = r),
            u
          )
      }
    }
    var n = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
      r = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
      i = {
        '': '\\b',
        '	': '\\t',
        '\n': '\\n',
        '': '\\f',
        '\r': '\\r',
        '"': '\\"',
        '\\': '\\\\'
      },
      a,
      s,
      l
    e.exports = function(e, t, n) {
      var r
      if (((a = ''), (s = ''), 'number' == typeof n))
        for (r = 0; r < n; r += 1) s += ' '
      else 'string' == typeof n && (s = n)
      if (
        ((l = t),
        t &&
          'function' != typeof t &&
          ('object' != typeof t || 'number' != typeof t.length))
      )
        throw new Error('JSON.stringify')
      return o('', { '': e })
    }
  },
  ,
  function(e, t, o) {
    ;(function(e, n) {
      var r
      ;(function(a) {
        function s(e) {
          throw new RangeError(_[e])
        }
        function i(e, t) {
          for (var o = e.length, n = []; o--; ) n[o] = t(e[o])
          return n
        }
        function l(e, t) {
          var o = e.split('@'),
            n = ''
          1 < o.length && ((n = o[0] + '@'), (e = o[1])),
            (e = e.replace(B, '.'))
          var r = e.split('.'),
            a = i(r, t).join('.')
          return n + a
        }
        function d(e) {
          for (var t = [], o = 0, n = e.length, r, a; o < n; )
            (r = e.charCodeAt(o++)),
              55296 <= r && 56319 >= r && o < n
                ? ((a = e.charCodeAt(o++)),
                  56320 == (64512 & a)
                    ? t.push(((1023 & r) << 10) + (1023 & a) + 65536)
                    : (t.push(r), o--))
                : t.push(r)
          return t
        }
        function c(e) {
          return i(e, function(e) {
            var t = ''
            return (
              65535 < e &&
                ((e -= 65536),
                (t += P(55296 | (1023 & (e >>> 10)))),
                (e = 56320 | (1023 & e))),
              (t += P(e)),
              t
            )
          }).join('')
        }
        function u(e) {
          return 10 > e - 48
            ? e - 22
            : 26 > e - 65
              ? e - 65
              : 26 > e - 97
                ? e - 97
                : E
        }
        function p(e, t) {
          return e + 22 + 75 * (26 > e) - ((0 != t) << 5)
        }
        function g(e, t, o) {
          var n = 0
          for (
            e = o ? R(e / F) : e >> 1, e += R(e / t);
            e > (L * v) >> 1;
            n += E
          )
            e = R(e / L)
          return R(n + ((L + 1) * e) / (e + w))
        }
        function h(e) {
          var o = [],
            r = e.length,
            a = 0,
            i = S,
            n = x,
            l,
            d,
            p,
            h,
            m,
            f,
            y,
            A,
            w,
            t
          for (d = e.lastIndexOf($), 0 > d && (d = 0), p = 0; p < d; ++p)
            128 <= e.charCodeAt(p) && s('not-basic'), o.push(e.charCodeAt(p))
          for (h = 0 < d ? d + 1 : 0; h < r; ) {
            for (m = a, f = 1, y = E; ; y += E) {
              if (
                (h >= r && s('invalid-input'),
                (A = u(e.charCodeAt(h++))),
                (A >= E || A > R((C - a) / f)) && s('overflow'),
                (a += A * f),
                (w = y <= n ? b : y >= n + v ? v : y - n),
                A < w)
              )
                break
              ;(t = E - w), f > R(C / t) && s('overflow'), (f *= t)
            }
            ;(l = o.length + 1),
              (n = g(a - m, l, 0 == m)),
              R(a / l) > C - i && s('overflow'),
              (i += R(a / l)),
              (a %= l),
              o.splice(a++, 0, i)
          }
          return c(o)
        }
        function m(e) {
          var o = [],
            r,
            n,
            a,
            i,
            l,
            c,
            u,
            h,
            m,
            f,
            t,
            y,
            A,
            w,
            F
          for (e = d(e), y = e.length, r = S, n = 0, l = x, c = 0; c < y; ++c)
            (t = e[c]), 128 > t && o.push(P(t))
          for (a = i = o.length, i && o.push($); a < y; ) {
            for (u = C, c = 0; c < y; ++c)
              (t = e[c]), t >= r && t < u && (u = t)
            for (
              A = a + 1,
                u - r > R((C - n) / A) && s('overflow'),
                n += (u - r) * A,
                r = u,
                c = 0;
              c < y;
              ++c
            )
              if (((t = e[c]), t < r && ++n > C && s('overflow'), t == r)) {
                for (h = n, m = E; ; m += E) {
                  if (((f = m <= l ? b : m >= l + v ? v : m - l), h < f)) break
                  ;(F = h - f),
                    (w = E - f),
                    o.push(P(p(f + (F % w), 0))),
                    (h = R(F / w))
                }
                o.push(P(p(h, 0))), (l = g(n, A, a == i)), (n = 0), ++a
              }
            ++n, ++r
          }
          return o.join('')
        }
        var f = 'object' == typeof t && t && !t.nodeType && t,
          y = 'object' == typeof e && e && !e.nodeType && e,
          A = 'object' == typeof n && n
        ;(A.global === A || A.window === A || A.self === A) && (a = A)
        var C = 2147483647,
          E = 36,
          b = 1,
          v = 26,
          w = 38,
          F = 700,
          x = 72,
          S = 128,
          $ = '-',
          k = /^xn--/,
          D = /[^\x20-\x7E]/,
          B = /[\x2E\u3002\uFF0E\uFF61]/g,
          _ = {
            overflow: 'Overflow: input needs wider integers to process',
            'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
            'invalid-input': 'Invalid input'
          },
          L = E - b,
          R = Math.floor,
          P = String.fromCharCode,
          T
        T = {
          version: '1.4.1',
          ucs2: { decode: d, encode: c },
          decode: h,
          encode: m,
          toASCII: function(e) {
            return l(e, function(e) {
              return D.test(e) ? 'xn--' + m(e) : e
            })
          },
          toUnicode: function(e) {
            return l(e, function(e) {
              return k.test(e) ? h(e.slice(4).toLowerCase()) : e
            })
          }
        }
        ;(r = function() {
          return T
        }.call(t, o, t, e)),
          !(void 0 !== r && (e.exports = r))
      })(this)
    }.call(t, o(12)(e), o(4)))
  },
  function(e) {
    'use strict'
    function t(e, t) {
      return Object.prototype.hasOwnProperty.call(e, t)
    }
    e.exports = function(e, n, r, a) {
      ;(n = n || '&'), (r = r || '=')
      var s = {}
      if ('string' != typeof e || 0 === e.length) return s
      var l = /\+/g
      e = e.split(n)
      var d = 1e3
      a && 'number' == typeof a.maxKeys && (d = a.maxKeys)
      var c = e.length
      0 < d && c > d && (c = d)
      for (var u = 0; u < c; ++u) {
        var i = e[u].replace(l, '%20'),
          p = i.indexOf(r),
          g,
          h,
          m,
          f
        0 <= p
          ? ((g = i.substr(0, p)), (h = i.substr(p + 1)))
          : ((g = i), (h = '')),
          (m = decodeURIComponent(g)),
          (f = decodeURIComponent(h)),
          t(s, m) ? (o(s[m]) ? s[m].push(f) : (s[m] = [s[m], f])) : (s[m] = f)
      }
      return s
    }
    var o =
      Array.isArray ||
      function(e) {
        return '[object Array]' === Object.prototype.toString.call(e)
      }
  },
  function(e) {
    'use strict'
    function t(e, t) {
      if (e.map) return e.map(t)
      for (var o = [], n = 0; n < e.length; n++) o.push(t(e[n], n))
      return o
    }
    var o = function(e) {
      switch (typeof e) {
        case 'string':
          return e
        case 'boolean':
          return e ? 'true' : 'false'
        case 'number':
          return isFinite(e) ? e : ''
        default:
          return ''
      }
    }
    e.exports = function(e, a, i, s) {
      return (
        (a = a || '&'),
        (i = i || '='),
        null === e && (e = void 0),
        'object' == typeof e
          ? t(r(e), function(r) {
              var s = encodeURIComponent(o(r)) + i
              return n(e[r])
                ? t(e[r], function(e) {
                    return s + encodeURIComponent(o(e))
                  }).join(a)
                : s + encodeURIComponent(o(e[r]))
            }).join(a)
          : s
            ? encodeURIComponent(o(s)) + i + encodeURIComponent(o(e))
            : ''
      )
    }
    var n =
        Array.isArray ||
        function(e) {
          return '[object Array]' === Object.prototype.toString.call(e)
        },
      r =
        Object.keys ||
        function(e) {
          var t = []
          for (var o in e)
            Object.prototype.hasOwnProperty.call(e, o) && t.push(o)
          return t
        }
  },
  function(e, t, o) {
    'use strict'
    ;(t.decode = t.parse = o(385)), (t.encode = t.stringify = o(386))
  },
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  function(e, t, o) {
    'use strict'
    function n() {
      ;(this.protocol = null),
        (this.slashes = null),
        (this.auth = null),
        (this.host = null),
        (this.port = null),
        (this.hostname = null),
        (this.hash = null),
        (this.search = null),
        (this.query = null),
        (this.pathname = null),
        (this.path = null),
        (this.href = null)
    }
    function r(e, t, o) {
      if (e && d.isObject(e) && e instanceof n) return e
      var r = new n()
      return r.parse(e, t, o), r
    }
    var a = o(384),
      d = o(398)
    ;(t.parse = r),
      (t.resolve = function(e, t) {
        return r(e, !1, !0).resolve(t)
      }),
      (t.resolveObject = function(e, t) {
        return e ? r(e, !1, !0).resolveObject(t) : t
      }),
      (t.format = function(e) {
        return (
          d.isString(e) && (e = r(e)),
          e instanceof n ? e.format() : n.prototype.format.call(e)
        )
      }),
      (t.Url = n)
    var c = /^([a-z0-9.+-]+:)/i,
      i = /:[0-9]*$/,
      s = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
      l = ['{', '}', '|', '\\', '^', '`'].concat([
        '<',
        '>',
        '"',
        '`',
        ' ',
        '\r',
        '\n',
        '\t'
      ]),
      u = ["'"].concat(l),
      p = ['%', '/', '?', ';', '#'].concat(u),
      g = ['/', '?', '#'],
      h = /^[+a-z0-9A-Z_-]{0,63}$/,
      m = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
      f = { javascript: !0, 'javascript:': !0 },
      y = { javascript: !0, 'javascript:': !0 },
      A = {
        http: !0,
        https: !0,
        ftp: !0,
        gopher: !0,
        file: !0,
        'http:': !0,
        'https:': !0,
        'ftp:': !0,
        'gopher:': !0,
        'file:': !0
      },
      C = o(387)
    ;(n.prototype.parse = function(e, t, o) {
      if (!d.isString(e))
        throw new TypeError("Parameter 'url' must be a string, not " + typeof e)
      var n = e.indexOf('?'),
        r = -1 !== n && n < e.indexOf('#') ? '?' : '#',
        w = e.split(r),
        E = /\\/g
      ;(w[0] = w[0].replace(E, '/')), (e = w.join(r))
      var b = e
      if (((b = b.trim()), !o && 1 === e.split('#').length)) {
        var v = s.exec(b)
        if (v)
          return (
            (this.path = b),
            (this.href = b),
            (this.pathname = v[1]),
            v[2]
              ? ((this.search = v[2]),
                (this.query = t
                  ? C.parse(this.search.substr(1))
                  : this.search.substr(1)))
              : t && ((this.search = ''), (this.query = {})),
            this
          )
      }
      var F = c.exec(b)
      if (F) {
        F = F[0]
        var x = F.toLowerCase()
        ;(this.protocol = x), (b = b.substr(F.length))
      }
      if (o || F || b.match(/^\/\/[^@\/]+@[^@\/]+/)) {
        var S = '//' === b.substr(0, 2)
        S && !(F && y[F]) && ((b = b.substr(2)), (this.slashes = !0))
      }
      if (!y[F] && (S || (F && !A[F]))) {
        for (var $ = -1, D = 0, i; D < g.length; D++)
          (i = b.indexOf(g[D])), -1 !== i && (-1 == $ || i < $) && ($ = i)
        var B, _
        ;(_ = -1 === $ ? b.lastIndexOf('@') : b.lastIndexOf('@', $)),
          -1 !== _ &&
            ((B = b.slice(0, _)),
            (b = b.slice(_ + 1)),
            (this.auth = decodeURIComponent(B))),
          ($ = -1)
        for (var D = 0, i; D < p.length; D++)
          (i = b.indexOf(p[D])), -1 !== i && (-1 === $ || i < $) && ($ = i)
        ;-1 === $ && ($ = b.length),
          (this.host = b.slice(0, $)),
          (b = b.slice($)),
          this.parseHost(),
          (this.hostname = this.hostname || '')
        var L =
          '[' === this.hostname[0] &&
          ']' === this.hostname[this.hostname.length - 1]
        if (!L)
          for (
            var R = this.hostname.split(/\./), D = 0, P = R.length, l;
            D < P;
            D++
          )
            if (((l = R[D]), l && !l.match(h))) {
              for (var T = '', M = 0, O = l.length; M < O; M++)
                T += 127 < l.charCodeAt(M) ? 'x' : l[M]
              if (!T.match(h)) {
                var k = R.slice(0, D),
                  N = R.slice(D + 1),
                  I = l.match(m)
                I && (k.push(I[1]), N.unshift(I[2])),
                  N.length && (b = '/' + N.join('.') + b),
                  (this.hostname = k.join('.'))
                break
              }
            }
        ;(this.hostname =
          this.hostname.length > 255 ? '' : this.hostname.toLowerCase()),
          L || (this.hostname = a.toASCII(this.hostname))
        var j = this.port ? ':' + this.port : '',
          W = this.hostname || ''
        ;(this.host = W + j),
          (this.href += this.host),
          L &&
            ((this.hostname = this.hostname.substr(
              1,
              this.hostname.length - 2
            )),
            '/' !== b[0] && (b = '/' + b))
      }
      if (!f[x])
        for (var D = 0, P = u.length, H; D < P; D++)
          if (((H = u[D]), -1 !== b.indexOf(H))) {
            var V = encodeURIComponent(H)
            V === H && (V = escape(H)), (b = b.split(H).join(V))
          }
      var U = b.indexOf('#')
      ;-1 !== U && ((this.hash = b.substr(U)), (b = b.slice(0, U)))
      var z = b.indexOf('?')
      if (
        (-1 === z
          ? t && ((this.search = ''), (this.query = {}))
          : ((this.search = b.substr(z)),
            (this.query = b.substr(z + 1)),
            t && (this.query = C.parse(this.query)),
            (b = b.slice(0, z))),
        b && (this.pathname = b),
        A[x] && this.hostname && !this.pathname && (this.pathname = '/'),
        this.pathname || this.search)
      ) {
        var j = this.pathname || '',
          K = this.search || ''
        this.path = j + K
      }
      return (this.href = this.format()), this
    }),
      (n.prototype.format = function() {
        var e = this.auth || ''
        e &&
          ((e = encodeURIComponent(e)),
          (e = e.replace(/%3A/i, ':')),
          (e += '@'))
        var t = this.protocol || '',
          o = this.pathname || '',
          n = this.hash || '',
          r = !1,
          a = ''
        this.host
          ? (r = e + this.host)
          : this.hostname &&
            ((r =
              e +
              (-1 === this.hostname.indexOf(':')
                ? this.hostname
                : '[' + this.hostname + ']')),
            this.port && (r += ':' + this.port)),
          this.query &&
            d.isObject(this.query) &&
            Object.keys(this.query).length &&
            (a = C.stringify(this.query))
        var i = this.search || (a && '?' + a) || ''
        return (
          t && ':' !== t.substr(-1) && (t += ':'),
          this.slashes || ((!t || A[t]) && !1 !== r)
            ? ((r = '//' + (r || '')),
              o && '/' !== o.charAt(0) && (o = '/' + o))
            : !r && (r = ''),
          n && '#' !== n.charAt(0) && (n = '#' + n),
          i && '?' !== i.charAt(0) && (i = '?' + i),
          (o = o.replace(/[?#]/g, function(e) {
            return encodeURIComponent(e)
          })),
          (i = i.replace('#', '%23')),
          t + r + o + i + n
        )
      }),
      (n.prototype.resolve = function(e) {
        return this.resolveObject(r(e, !1, !0)).format()
      }),
      (n.prototype.resolveObject = function(e) {
        if (d.isString(e)) {
          var t = new n()
          t.parse(e, !1, !0), (e = t)
        }
        for (
          var o = new n(), r = Object.keys(this), a = 0, l;
          a < r.length;
          a++
        )
          (l = r[a]), (o[l] = this[l])
        if (((o.hash = e.hash), '' === e.href)) return (o.href = o.format()), o
        if (e.slashes && !e.protocol) {
          for (var c = Object.keys(e), u = 0, g; u < c.length; u++)
            (g = c[u]), 'protocol' !== g && (o[g] = e[g])
          return (
            A[o.protocol] &&
              o.hostname &&
              !o.pathname &&
              (o.path = o.pathname = '/'),
            (o.href = o.format()),
            o
          )
        }
        if (e.protocol && e.protocol !== o.protocol) {
          if (!A[e.protocol]) {
            for (var h = Object.keys(e), m = 0, f; m < h.length; m++)
              (f = h[m]), (o[f] = e[f])
            return (o.href = o.format()), o
          }
          if (((o.protocol = e.protocol), !e.host && !y[e.protocol])) {
            for (
              var C = (e.pathname || '').split('/');
              C.length && !(e.host = C.shift());

            );
            e.host || (e.host = ''),
              e.hostname || (e.hostname = ''),
              '' !== C[0] && C.unshift(''),
              2 > C.length && C.unshift(''),
              (o.pathname = C.join('/'))
          } else o.pathname = e.pathname
          if (
            ((o.search = e.search),
            (o.query = e.query),
            (o.host = e.host || ''),
            (o.auth = e.auth),
            (o.hostname = e.hostname || e.host),
            (o.port = e.port),
            o.pathname || o.search)
          ) {
            var w = o.pathname || '',
              p = o.search || ''
            o.path = w + p
          }
          return (o.slashes = o.slashes || e.slashes), (o.href = o.format()), o
        }
        var s = o.pathname && '/' === o.pathname.charAt(0),
          E = e.host || (e.pathname && '/' === e.pathname.charAt(0)),
          b = E || s || (o.host && e.pathname),
          v = b,
          F = (o.pathname && o.pathname.split('/')) || [],
          C = (e.pathname && e.pathname.split('/')) || [],
          x = o.protocol && !A[o.protocol]
        if (
          (x &&
            ((o.hostname = ''),
            (o.port = null),
            o.host && ('' === F[0] ? (F[0] = o.host) : F.unshift(o.host)),
            (o.host = ''),
            e.protocol &&
              ((e.hostname = null),
              (e.port = null),
              e.host && ('' === C[0] ? (C[0] = e.host) : C.unshift(e.host)),
              (e.host = null)),
            (b = b && ('' === C[0] || '' === F[0]))),
          E)
        )
          (o.host = e.host || '' === e.host ? e.host : o.host),
            (o.hostname =
              e.hostname || '' === e.hostname ? e.hostname : o.hostname),
            (o.search = e.search),
            (o.query = e.query),
            (F = C)
        else if (C.length)
          F || (F = []),
            F.pop(),
            (F = F.concat(C)),
            (o.search = e.search),
            (o.query = e.query)
        else if (!d.isNullOrUndefined(e.search)) {
          if (x) {
            o.hostname = o.host = F.shift()
            var S = o.host && 0 < o.host.indexOf('@') && o.host.split('@')
            S && ((o.auth = S.shift()), (o.host = o.hostname = S.shift()))
          }
          return (
            (o.search = e.search),
            (o.query = e.query),
            (d.isNull(o.pathname) && d.isNull(o.search)) ||
              (o.path =
                (o.pathname ? o.pathname : '') + (o.search ? o.search : '')),
            (o.href = o.format()),
            o
          )
        }
        if (!F.length)
          return (
            (o.pathname = null),
            (o.path = o.search ? '/' + o.search : null),
            (o.href = o.format()),
            o
          )
        for (
          var $ = F.slice(-1)[0],
            k =
              ((o.host || e.host || 1 < F.length) &&
                ('.' === $ || '..' === $)) ||
              '' === $,
            D = 0,
            B = F.length;
          0 <= B;
          B--
        )
          ($ = F[B]),
            '.' === $
              ? F.splice(B, 1)
              : '..' === $
                ? (F.splice(B, 1), D++)
                : D && (F.splice(B, 1), D--)
        if (!b && !v) for (; D--; D) F.unshift('..')
        b && '' !== F[0] && (!F[0] || '/' !== F[0].charAt(0)) && F.unshift(''),
          k && '/' !== F.join('/').substr(-1) && F.push('')
        var i = '' === F[0] || (F[0] && '/' === F[0].charAt(0))
        if (x) {
          o.hostname = o.host = i ? '' : F.length ? F.shift() : ''
          var S = o.host && 0 < o.host.indexOf('@') && o.host.split('@')
          S && ((o.auth = S.shift()), (o.host = o.hostname = S.shift()))
        }
        return (
          (b = b || (o.host && F.length)),
          b && !i && F.unshift(''),
          F.length
            ? (o.pathname = F.join('/'))
            : ((o.pathname = null), (o.path = null)),
          (d.isNull(o.pathname) && d.isNull(o.search)) ||
            (o.path =
              (o.pathname ? o.pathname : '') + (o.search ? o.search : '')),
          (o.auth = e.auth || o.auth),
          (o.slashes = o.slashes || e.slashes),
          (o.href = o.format()),
          o
        )
      }),
      (n.prototype.parseHost = function() {
        var e = this.host,
          t = i.exec(e)
        t &&
          ((t = t[0]),
          ':' !== t && (this.port = t.substr(1)),
          (e = e.substr(0, e.length - t.length))),
          e && (this.hostname = e)
      })
  },
  function(e) {
    'use strict'
    e.exports = {
      isString: function(e) {
        return 'string' == typeof e
      },
      isObject: function(e) {
        return 'object' == typeof e && null !== e
      },
      isNull: function(e) {
        return null === e
      },
      isNullOrUndefined: function(e) {
        return null == e
      }
    }
  },
  function(e, t, o) {
    ;(function(t) {
      e.exports = (function() {
        if (t.Blob)
          try {
            return new Blob(['asdf'], { type: 'text/plain' }), Blob
          } catch (e) {}
        var e = t.WebKitBlobBuilder || t.MozBlobBuilder || t.MSBlobBuilder
        return function(t, o) {
          var n = new e(),
            r = o.endings,
            a = o.type
          if (r) for (var s = 0, i = t.length; s < i; ++s) n.append(t[s], r)
          else for (var s = 0, i = t.length; s < i; ++s) n.append(t[s])
          return a ? n.getBlob(a) : n.getBlob()
        }
      })()
    }.call(t, o(4)))
  }
])
