/*! For license information please see main.js.LICENSE.txt */
!(function (e, t) {
  'object' == typeof exports && 'object' == typeof module
    ? (module.exports = t())
    : 'function' == typeof define && define.amd
    ? define([], t)
    : 'object' == typeof exports
    ? (exports.ReactAce = t())
    : (e.ReactAce = t());
})(self, () =>
  (() => {
    var e = {
        239: (e, t, i) => {
          (e = i.nmd(e)),
            (function () {
              var e = (function () {
                return this;
              })();
              e || 'undefined' == typeof window || (e = window);
              var t = function (e, i, n) {
                'string' == typeof e
                  ? (2 == arguments.length && (n = i), t.modules[e] || ((t.payloads[e] = n), (t.modules[e] = null)))
                  : t.original
                  ? t.original.apply(this, arguments)
                  : (console.error("dropping module because define wasn't a string."), console.trace());
              };
              (t.modules = {}), (t.payloads = {});
              var i,
                n = function (e, t, i) {
                  if ('string' == typeof t) {
                    var n = o(e, t);
                    if (null != n) return i && i(), n;
                  } else if ('[object Array]' === Object.prototype.toString.call(t)) {
                    for (var r = [], a = 0, l = t.length; a < l; ++a) {
                      var h = o(e, t[a]);
                      if (null == h && s.original) return;
                      r.push(h);
                    }
                    return (i && i.apply(null, r)) || !0;
                  }
                },
                s = function (e, t) {
                  var i = n('', e, t);
                  return null == i && s.original ? s.original.apply(this, arguments) : i;
                },
                r = function (e, t) {
                  if (-1 !== t.indexOf('!')) {
                    var i = t.split('!');
                    return r(e, i[0]) + '!' + r(e, i[1]);
                  }
                  if ('.' == t.charAt(0))
                    for (t = e.split('/').slice(0, -1).join('/') + '/' + t; -1 !== t.indexOf('.') && n != t; ) {
                      var n = t;
                      t = t.replace(/\/\.\//, '/').replace(/[^\/]+\/\.\.\//, '');
                    }
                  return t;
                },
                o = function (e, i) {
                  i = r(e, i);
                  var s = t.modules[i];
                  if (!s) {
                    if ('function' == typeof (s = t.payloads[i])) {
                      var o = {},
                        a = { id: i, uri: '', exports: o, packaged: !0 };
                      (o =
                        s(
                          function (e, t) {
                            return n(i, e, t);
                          },
                          o,
                          a
                        ) || a.exports),
                        (t.modules[i] = o),
                        delete t.payloads[i];
                    }
                    s = t.modules[i] = o || s;
                  }
                  return s;
                };
              (i = e),
                'ace' && (e.ace || (e.ace = {}), (i = e.ace)),
                (i.define && i.define.packaged) || ((t.original = i.define), (i.define = t), (i.define.packaged = !0)),
                (i.require && i.require.packaged) ||
                  ((s.original = i.require), (i.require = s), (i.require.packaged = !0));
            })(),
            ace.define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              'undefined' == typeof Element ||
                Element.prototype.remove ||
                Object.defineProperty(Element.prototype, 'remove', {
                  enumerable: !1,
                  writable: !0,
                  configurable: !0,
                  value: function () {
                    this.parentNode && this.parentNode.removeChild(this);
                  },
                });
            }),
            ace.define('ace/lib/useragent', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              (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;
                });
              var n = 'object' == typeof navigator ? navigator : {},
                s = (/mac|win|linux/i.exec(n.platform) || ['other'])[0].toLowerCase(),
                r = n.userAgent || '',
                o = n.appName || '';
              (t.isWin = 'win' == s),
                (t.isMac = 'mac' == s),
                (t.isLinux = 'linux' == s),
                (t.isIE =
                  'Microsoft Internet Explorer' == o || o.indexOf('MSAppHost') >= 0
                    ? parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || [])[1])
                    : parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || [])[1])),
                (t.isOldIE = t.isIE && t.isIE < 9),
                (t.isGecko = t.isMozilla = r.match(/ Gecko\/\d+/)),
                (t.isOpera =
                  'object' == typeof opera && '[object Opera]' == Object.prototype.toString.call(window.opera)),
                (t.isWebKit = parseFloat(r.split('WebKit/')[1]) || void 0),
                (t.isChrome = parseFloat(r.split(' Chrome/')[1]) || void 0),
                (t.isEdge = parseFloat(r.split(' Edge/')[1]) || void 0),
                (t.isAIR = r.indexOf('AdobeAIR') >= 0),
                (t.isAndroid = r.indexOf('Android') >= 0),
                (t.isChromeOS = r.indexOf(' CrOS ') >= 0),
                (t.isIOS = /iPad|iPhone|iPod/.test(r) && !window.MSStream),
                t.isIOS && (t.isMac = !0),
                (t.isMobile = t.isIOS || t.isAndroid);
            }),
            ace.define('ace/lib/dom', ['require', 'exports', 'module', 'ace/lib/useragent'], function (e, t, i) {
              'use strict';
              var n,
                s = e('./useragent');
              (t.buildDom = function e(t, i, n) {
                if ('string' == typeof t && t) {
                  var s = document.createTextNode(t);
                  return i && i.appendChild(s), s;
                }
                if (!Array.isArray(t)) return t && t.appendChild && i && i.appendChild(t), t;
                if ('string' != typeof t[0] || !t[0]) {
                  for (var r = [], o = 0; o < t.length; o++) {
                    var a = e(t[o], i, n);
                    a && r.push(a);
                  }
                  return r;
                }
                var l = document.createElement(t[0]),
                  h = t[1],
                  c = 1;
                for (h && 'object' == typeof h && !Array.isArray(h) && (c = 2), o = c; o < t.length; o++) e(t[o], l, n);
                return (
                  2 == c &&
                    Object.keys(h).forEach(function (e) {
                      var t = h[e];
                      'class' === e
                        ? (l.className = Array.isArray(t) ? t.join(' ') : t)
                        : 'function' == typeof t || 'value' == e || '$' == e[0]
                        ? (l[e] = t)
                        : 'ref' === e
                        ? n && (n[t] = l)
                        : 'style' === e
                        ? 'string' == typeof t && (l.style.cssText = t)
                        : null != t && l.setAttribute(e, t);
                    }),
                  i && i.appendChild(l),
                  l
                );
              }),
                (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.removeChildren = function (e) {
                  e.innerHTML = '';
                }),
                (t.createTextNode = function (e, t) {
                  return (t ? t.ownerDocument : document).createTextNode(e);
                }),
                (t.createFragment = function (e) {
                  return (e ? e.ownerDocument : document).createDocumentFragment();
                }),
                (t.hasCssClass = function (e, t) {
                  return -1 !== (e.className + '').split(/\s+/g).indexOf(t);
                }),
                (t.addCssClass = function (e, i) {
                  t.hasCssClass(e, i) || (e.className += ' ' + i);
                }),
                (t.removeCssClass = function (e, t) {
                  for (var i = e.className.split(/\s+/g); ; ) {
                    var n = i.indexOf(t);
                    if (-1 == n) break;
                    i.splice(n, 1);
                  }
                  e.className = i.join(' ');
                }),
                (t.toggleCssClass = function (e, t) {
                  for (var i = e.className.split(/\s+/g), n = !0; ; ) {
                    var s = i.indexOf(t);
                    if (-1 == s) break;
                    (n = !1), i.splice(s, 1);
                  }
                  return n && i.push(t), (e.className = i.join(' ')), n;
                }),
                (t.setCssClass = function (e, i, n) {
                  n ? t.addCssClass(e, i) : t.removeCssClass(e, i);
                }),
                (t.hasCssString = function (e, t) {
                  var i,
                    n = 0;
                  if ((i = (t = t || document).querySelectorAll('style')))
                    for (; n < i.length; ) if (i[n++].id === e) return !0;
                });
              var r = [];
              function o() {
                var e = r;
                (r = null),
                  e &&
                    e.forEach(function (e) {
                      a(e[0], e[1]);
                    });
              }
              function a(e, i, s) {
                if ('undefined' != typeof document) {
                  if (r)
                    if (s) o();
                    else if (!1 === s) return r.push([e, i]);
                  if (!n) {
                    var a = s;
                    (s && s.getRootNode && (a = s.getRootNode()) && a != s) || (a = document);
                    var l = a.ownerDocument || a;
                    if (i && t.hasCssString(i, a)) return null;
                    i && (e += '\n/*# sourceURL=ace/css/' + i + ' */');
                    var h = t.createElement('style');
                    h.appendChild(l.createTextNode(e)),
                      i && (h.id = i),
                      a == l && (a = t.getDocumentHead(l)),
                      a.insertBefore(h, a.firstChild);
                  }
                }
              }
              if (
                ((t.useStrictCSP = function (e) {
                  (n = e), 0 == e ? o() : r || (r = []);
                }),
                (t.importCssString = a),
                (t.importCssStylsheet = function (e, i) {
                  t.buildDom(['link', { rel: 'stylesheet', href: e }], t.getDocumentHead(i));
                }),
                (t.scrollbarWidth = function (e) {
                  var i = t.createElement('ace_inner');
                  (i.style.width = '100%'),
                    (i.style.minWidth = '0px'),
                    (i.style.height = '200px'),
                    (i.style.display = 'block');
                  var n = t.createElement('ace_outer'),
                    s = n.style;
                  (s.position = 'absolute'),
                    (s.left = '-10000px'),
                    (s.overflow = 'hidden'),
                    (s.width = '200px'),
                    (s.minWidth = '0px'),
                    (s.height = '150px'),
                    (s.display = 'block'),
                    n.appendChild(i);
                  var r = e.documentElement;
                  r.appendChild(n);
                  var o = i.offsetWidth;
                  s.overflow = 'scroll';
                  var a = i.offsetWidth;
                  return o == a && (a = n.clientWidth), r.removeChild(n), o - a;
                }),
                (t.computedStyle = function (e, t) {
                  return window.getComputedStyle(e, '') || {};
                }),
                (t.setStyle = function (e, t, i) {
                  e[t] !== i && (e[t] = i);
                }),
                (t.HAS_CSS_ANIMATION = !1),
                (t.HAS_CSS_TRANSFORMS = !1),
                (t.HI_DPI = !s.isWin || ('undefined' != typeof window && window.devicePixelRatio >= 1.5)),
                s.isChromeOS && (t.HI_DPI = !1),
                'undefined' != typeof document)
              ) {
                var l = document.createElement('div');
                t.HI_DPI && void 0 !== l.style.transform && (t.HAS_CSS_TRANSFORMS = !0),
                  s.isEdge || void 0 === l.style.animationName || (t.HAS_CSS_ANIMATION = !0),
                  (l = null);
              }
              t.HAS_CSS_TRANSFORMS
                ? (t.translate = function (e, t, i) {
                    e.style.transform = 'translate(' + Math.round(t) + 'px, ' + Math.round(i) + 'px)';
                  })
                : (t.translate = function (e, t, i) {
                    (e.style.top = Math.round(i) + 'px'), (e.style.left = Math.round(t) + 'px');
                  });
            }),
            ace.define('ace/lib/oop', ['require', 'exports', 'module'], function (e, t, i) {
              '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 i in t) e[i] = t[i];
                  return e;
                }),
                (t.implement = function (e, i) {
                  t.mixin(e, i);
                });
            }),
            ace.define('ace/lib/keys', ['require', 'exports', 'module', 'ace/lib/oop'], function (e, t, i) {
              'use strict';
              var n = e('./oop'),
                s = (function () {
                  var e,
                    t,
                    i = {
                      MODIFIER_KEYS: {
                        16: 'Shift',
                        17: 'Ctrl',
                        18: 'Alt',
                        224: 'Meta',
                        91: 'MetaLeft',
                        92: 'MetaRight',
                        93: 'ContextMenu',
                      },
                      KEY_MODS: {
                        ctrl: 1,
                        alt: 2,
                        option: 2,
                        shift: 4,
                        super: 8,
                        meta: 8,
                        command: 8,
                        cmd: 8,
                        control: 1,
                      },
                      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',
                        '-13': 'NumpadEnter',
                        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',
                      },
                      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',
                        107: '+',
                        109: '-',
                        110: '.',
                        186: ';',
                        187: '=',
                        188: ',',
                        189: '-',
                        190: '.',
                        191: '/',
                        192: '`',
                        219: '[',
                        220: '\\',
                        221: ']',
                        222: "'",
                        111: '/',
                        106: '*',
                      },
                    };
                  for (t in i.FUNCTION_KEYS) (e = i.FUNCTION_KEYS[t].toLowerCase()), (i[e] = parseInt(t, 10));
                  for (t in i.PRINTABLE_KEYS) (e = i.PRINTABLE_KEYS[t].toLowerCase()), (i[e] = parseInt(t, 10));
                  return (
                    n.mixin(i, i.MODIFIER_KEYS),
                    n.mixin(i, i.PRINTABLE_KEYS),
                    n.mixin(i, i.FUNCTION_KEYS),
                    (i.enter = i.return),
                    (i.escape = i.esc),
                    (i.del = i.delete),
                    (i[173] = '-'),
                    (function () {
                      for (var e = ['cmd', 'ctrl', 'alt', 'shift'], t = Math.pow(2, e.length); t--; )
                        i.KEY_MODS[t] =
                          e
                            .filter(function (e) {
                              return t & i.KEY_MODS[e];
                            })
                            .join('-') + '-';
                    })(),
                    (i.KEY_MODS[0] = ''),
                    (i.KEY_MODS[-1] = 'input-'),
                    i
                  );
                })();
              n.mixin(t, s),
                (t.keyCodeToString = function (e) {
                  var t = s[e];
                  return 'string' != typeof t && (t = String.fromCharCode(e)), t.toLowerCase();
                });
            }),
            ace.define(
              'ace/lib/event',
              ['require', 'exports', 'module', 'ace/lib/keys', 'ace/lib/useragent'],
              function (e, t, i) {
                'use strict';
                var n,
                  s = e('./keys'),
                  r = e('./useragent'),
                  o = null,
                  a = 0;
                function l() {
                  return (
                    null == n &&
                      (function () {
                        n = !1;
                        try {
                          document.createComment('').addEventListener('test', function () {}, {
                            get passive() {
                              n = { passive: !1 };
                            },
                          });
                        } catch (e) {}
                      })(),
                    n
                  );
                }
                function h(e, t, i) {
                  (this.elem = e), (this.type = t), (this.callback = i);
                }
                h.prototype.destroy = function () {
                  u(this.elem, this.type, this.callback), (this.elem = this.type = this.callback = void 0);
                };
                var c = (t.addListener = function (e, t, i, n) {
                    e.addEventListener(t, i, l()), n && n.$toDestroy.push(new h(e, t, i));
                  }),
                  u = (t.removeListener = function (e, t, i) {
                    e.removeEventListener(t, i, l());
                  });
                (t.stopEvent = function (e) {
                  return t.stopPropagation(e), t.preventDefault(e), !1;
                }),
                  (t.stopPropagation = function (e) {
                    e.stopPropagation && e.stopPropagation();
                  }),
                  (t.preventDefault = function (e) {
                    e.preventDefault && e.preventDefault();
                  }),
                  (t.getButton = function (e) {
                    return 'dblclick' == e.type
                      ? 0
                      : 'contextmenu' == e.type || (r.isMac && e.ctrlKey && !e.altKey && !e.shiftKey)
                      ? 2
                      : e.button;
                  }),
                  (t.capture = function (e, t, i) {
                    var n = (e && e.ownerDocument) || document;
                    function s(e) {
                      t && t(e), i && i(e), u(n, 'mousemove', t), u(n, 'mouseup', s), u(n, 'dragstart', s);
                    }
                    return c(n, 'mousemove', t), c(n, 'mouseup', s), c(n, 'dragstart', s), s;
                  }),
                  (t.addMouseWheelListener = function (e, t, i) {
                    'onmousewheel' in e
                      ? c(
                          e,
                          'mousewheel',
                          function (e) {
                            void 0 !== e.wheelDeltaX
                              ? ((e.wheelX = -e.wheelDeltaX / 8), (e.wheelY = -e.wheelDeltaY / 8))
                              : ((e.wheelX = 0), (e.wheelY = -e.wheelDelta / 8)),
                              t(e);
                          },
                          i
                        )
                      : 'onwheel' in e
                      ? c(
                          e,
                          'wheel',
                          function (e) {
                            switch (e.deltaMode) {
                              case e.DOM_DELTA_PIXEL:
                                (e.wheelX = 0.35 * e.deltaX || 0), (e.wheelY = 0.35 * e.deltaY || 0);
                                break;
                              case e.DOM_DELTA_LINE:
                              case e.DOM_DELTA_PAGE:
                                (e.wheelX = 5 * (e.deltaX || 0)), (e.wheelY = 5 * (e.deltaY || 0));
                            }
                            t(e);
                          },
                          i
                        )
                      : c(
                          e,
                          'DOMMouseScroll',
                          function (e) {
                            e.axis && e.axis == e.HORIZONTAL_AXIS
                              ? ((e.wheelX = 5 * (e.detail || 0)), (e.wheelY = 0))
                              : ((e.wheelX = 0), (e.wheelY = 5 * (e.detail || 0))),
                              t(e);
                          },
                          i
                        );
                  }),
                  (t.addMultiMouseDownListener = function (e, i, n, s, o) {
                    var a,
                      l,
                      h,
                      u = 0,
                      d = { 2: 'dblclick', 3: 'tripleclick', 4: 'quadclick' };
                    function f(e) {
                      if ((0 !== t.getButton(e) ? (u = 0) : e.detail > 1 ? ++u > 4 && (u = 1) : (u = 1), r.isIE)) {
                        var o = Math.abs(e.clientX - a) > 5 || Math.abs(e.clientY - l) > 5;
                        (h && !o) || (u = 1),
                          h && clearTimeout(h),
                          (h = setTimeout(function () {
                            h = null;
                          }, i[u - 1] || 600)),
                          1 == u && ((a = e.clientX), (l = e.clientY));
                      }
                      if (((e._clicks = u), n[s]('mousedown', e), u > 4)) u = 0;
                      else if (u > 1) return n[s](d[u], e);
                    }
                    Array.isArray(e) || (e = [e]),
                      e.forEach(function (e) {
                        c(e, 'mousedown', f, o);
                      });
                  });
                var d = function (e) {
                  return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
                };
                function f(e, t, i) {
                  var n = d(t);
                  if (!r.isMac && o) {
                    if (
                      (t.getModifierState && (t.getModifierState('OS') || t.getModifierState('Win')) && (n |= 8),
                      o.altGr)
                    ) {
                      if (3 == (3 & n)) return;
                      o.altGr = 0;
                    }
                    if (18 === i || 17 === i) {
                      var l = 'location' in t ? t.location : t.keyLocation;
                      17 === i && 1 === l
                        ? 1 == o[i] && (a = t.timeStamp)
                        : 18 === i && 3 === n && 2 === l && t.timeStamp - a < 50 && (o.altGr = !0);
                    }
                  }
                  if (
                    (i in s.MODIFIER_KEYS && (i = -1),
                    n ||
                      13 !== i ||
                      3 !== (l = 'location' in t ? t.location : t.keyLocation) ||
                      (e(t, n, -i), !t.defaultPrevented))
                  ) {
                    if (r.isChromeOS && 8 & n) {
                      if ((e(t, n, i), t.defaultPrevented)) return;
                      n &= -9;
                    }
                    return !!(n || i in s.FUNCTION_KEYS || i in s.PRINTABLE_KEYS) && e(t, n, i);
                  }
                }
                function g() {
                  o = Object.create(null);
                }
                if (
                  ((t.getModifierString = function (e) {
                    return s.KEY_MODS[d(e)];
                  }),
                  (t.addCommandKeyListener = function (e, i, n) {
                    if (r.isOldGecko || (r.isOpera && !('KeyboardEvent' in window))) {
                      var s = null;
                      c(
                        e,
                        'keydown',
                        function (e) {
                          s = e.keyCode;
                        },
                        n
                      ),
                        c(
                          e,
                          'keypress',
                          function (e) {
                            return f(i, e, s);
                          },
                          n
                        );
                    } else {
                      var a = null;
                      c(
                        e,
                        'keydown',
                        function (e) {
                          o[e.keyCode] = (o[e.keyCode] || 0) + 1;
                          var t = f(i, e, e.keyCode);
                          return (a = e.defaultPrevented), t;
                        },
                        n
                      ),
                        c(
                          e,
                          'keypress',
                          function (e) {
                            a && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && (t.stopEvent(e), (a = null));
                          },
                          n
                        ),
                        c(
                          e,
                          'keyup',
                          function (e) {
                            o[e.keyCode] = null;
                          },
                          n
                        ),
                        o || (g(), c(window, 'focus', g));
                    }
                  }),
                  'object' == typeof window && window.postMessage && !r.isOldIE)
                ) {
                  var p = 1;
                  t.nextTick = function (e, i) {
                    i = i || window;
                    var n = 'zero-timeout-message-' + p++,
                      s = function (r) {
                        r.data == n && (t.stopPropagation(r), u(i, 'message', s), e());
                      };
                    c(i, 'message', s), i.postMessage(n, '*');
                  };
                }
                (t.$idleBlocked = !1),
                  (t.onIdle = function (e, i) {
                    return setTimeout(function i() {
                      t.$idleBlocked ? setTimeout(i, 100) : e();
                    }, i);
                  }),
                  (t.$idleBlockId = null),
                  (t.blockIdle = function (e) {
                    t.$idleBlockId && clearTimeout(t.$idleBlockId),
                      (t.$idleBlocked = !0),
                      (t.$idleBlockId = setTimeout(function () {
                        t.$idleBlocked = !1;
                      }, e || 100));
                  }),
                  (t.nextFrame =
                    'object' == typeof window &&
                    (window.requestAnimationFrame ||
                      window.mozRequestAnimationFrame ||
                      window.webkitRequestAnimationFrame ||
                      window.msRequestAnimationFrame ||
                      window.oRequestAnimationFrame)),
                  t.nextFrame
                    ? (t.nextFrame = t.nextFrame.bind(window))
                    : (t.nextFrame = function (e) {
                        setTimeout(e, 17);
                      });
              }
            ),
            ace.define('ace/range', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              var n = function (e, t, i, n) {
                (this.start = { row: e, column: t }), (this.end = { row: i, 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,
                      i = e.end,
                      n = e.start;
                    return 1 == (t = this.compare(i.row, i.column))
                      ? 1 == (t = this.compare(n.row, n.column))
                        ? 2
                        : 0 == t
                        ? 1
                        : 0
                      : -1 == t
                      ? -2
                      : -1 == (t = this.compare(n.row, n.column))
                      ? -1
                      : 1 == t
                      ? 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);
                  }),
                  (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 i = { row: t + 1, column: 0 };
                    else this.end.row < e && (i = { row: e, column: 0 });
                    if (this.start.row > t) var s = { row: t + 1, column: 0 };
                    else this.start.row < e && (s = { row: e, column: 0 });
                    return n.fromPoints(s || this.start, i || this.end);
                  }),
                  (this.extend = function (e, t) {
                    var i = this.compare(e, t);
                    if (0 == i) return this;
                    if (-1 == i) var s = { row: e, column: t };
                    else var r = { row: e, column: t };
                    return n.fromPoints(s || this.start, r || 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 n.fromPoints(this.start, this.end);
                  }),
                  (this.collapseRows = function () {
                    return 0 == this.end.column
                      ? new n(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0)
                      : new n(this.start.row, 0, this.end.row, 0);
                  }),
                  (this.toScreenRange = function (e) {
                    var t = e.documentToScreenPosition(this.start),
                      i = e.documentToScreenPosition(this.end);
                    return new n(t.row, t.column, i.row, i.column);
                  }),
                  (this.moveBy = function (e, t) {
                    (this.start.row += e), (this.start.column += t), (this.end.row += e), (this.end.column += t);
                  });
              }).call(n.prototype),
                (n.fromPoints = function (e, t) {
                  return new n(e.row, e.column, t.row, t.column);
                }),
                (n.comparePoints = function (e, t) {
                  return e.row - t.row || e.column - t.column;
                }),
                (n.comparePoints = function (e, t) {
                  return e.row - t.row || e.column - t.column;
                }),
                (t.Range = n);
            }),
            ace.define('ace/lib/lang', ['require', 'exports', 'module'], function (e, t, i) {
              '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 i = ''; t > 0; ) 1 & t && (i += e), (t >>= 1) && (e += e);
                  return i;
                });
              var n = /^\s\s*/,
                s = /\s\s*$/;
              (t.stringTrimLeft = function (e) {
                return e.replace(n, '');
              }),
                (t.stringTrimRight = function (e) {
                  return e.replace(s, '');
                }),
                (t.copyObject = function (e) {
                  var t = {};
                  for (var i in e) t[i] = e[i];
                  return t;
                }),
                (t.copyArray = function (e) {
                  for (var t = [], i = 0, n = e.length; i < n; i++)
                    e[i] && 'object' == typeof e[i] ? (t[i] = this.copyObject(e[i])) : (t[i] = e[i]);
                  return t;
                }),
                (t.deepCopy = function e(t) {
                  if ('object' != typeof t || !t) return t;
                  var i;
                  if (Array.isArray(t)) {
                    i = [];
                    for (var n = 0; n < t.length; n++) i[n] = e(t[n]);
                    return i;
                  }
                  if ('[object Object]' !== Object.prototype.toString.call(t)) return t;
                  for (var n in ((i = {}), t)) i[n] = e(t[n]);
                  return i;
                }),
                (t.arrayToMap = function (e) {
                  for (var t = {}, i = 0; i < e.length; i++) t[e[i]] = 1;
                  return t;
                }),
                (t.createMap = function (e) {
                  var t = Object.create(null);
                  for (var i in e) t[i] = e[i];
                  return t;
                }),
                (t.arrayRemove = function (e, t) {
                  for (var i = 0; i <= e.length; i++) t === e[i] && e.splice(i, 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 i = [];
                  return (
                    e.replace(t, function (e) {
                      i.push({ offset: arguments[arguments.length - 2], length: e.length });
                    }),
                    i
                  );
                }),
                (t.deferredCall = function (e) {
                  var t = null,
                    i = function () {
                      (t = null), e();
                    },
                    n = function (e) {
                      return n.cancel(), (t = setTimeout(i, 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 i = null,
                    n = function () {
                      (i = null), e();
                    },
                    s = function (e) {
                      null == i && (i = setTimeout(n, e || t));
                    };
                  return (
                    (s.delay = function (e) {
                      i && clearTimeout(i), (i = setTimeout(n, e || t));
                    }),
                    (s.schedule = s),
                    (s.call = function () {
                      this.cancel(), e();
                    }),
                    (s.cancel = function () {
                      i && clearTimeout(i), (i = null);
                    }),
                    (s.isPending = function () {
                      return i;
                    }),
                    s
                  );
                });
            }),
            ace.define('ace/clipboard', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              var n;
              i.exports = {
                lineMode: !1,
                pasteCancelled: function () {
                  return !!(n && n > Date.now() - 50) || (n = !1);
                },
                cancel: function () {
                  n = Date.now();
                },
              };
            }),
            ace.define(
              'ace/keyboard/textinput',
              [
                'require',
                'exports',
                'module',
                'ace/lib/event',
                'ace/lib/useragent',
                'ace/lib/dom',
                'ace/lib/lang',
                'ace/clipboard',
                'ace/lib/keys',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/event'),
                  s = e('../lib/useragent'),
                  r = e('../lib/dom'),
                  o = e('../lib/lang'),
                  a = e('../clipboard'),
                  l = s.isChrome < 18,
                  h = s.isIE,
                  c = s.isChrome > 63,
                  u = 400,
                  d = e('../lib/keys'),
                  f = d.KEY_MODS,
                  g = s.isIOS,
                  p = g ? /\s/ : /\n/,
                  m = s.isMobile;
                (t.TextInput = function (e, t) {
                  var i = r.createElement('textarea');
                  (i.className = 'ace_text-input'),
                    i.setAttribute('wrap', 'off'),
                    i.setAttribute('autocorrect', 'off'),
                    i.setAttribute('autocapitalize', 'off'),
                    i.setAttribute('spellcheck', !1),
                    (i.style.opacity = '0'),
                    e.insertBefore(i, e.firstChild);
                  var v = !1,
                    w = !1,
                    b = !1,
                    y = !1,
                    $ = '';
                  m || (i.style.fontSize = '1px');
                  var S = !1,
                    C = !1,
                    x = '',
                    k = 0,
                    A = 0,
                    _ = 0;
                  try {
                    var L = document.activeElement === i;
                  } catch (e) {}
                  n.addListener(
                    i,
                    'blur',
                    function (e) {
                      C || (t.onBlur(e), (L = !1));
                    },
                    t
                  ),
                    n.addListener(
                      i,
                      'focus',
                      function (e) {
                        if (!C) {
                          if (((L = !0), s.isEdge))
                            try {
                              if (!document.hasFocus()) return;
                            } catch (e) {}
                          t.onFocus(e), s.isEdge ? setTimeout(R) : R();
                        }
                      },
                      t
                    ),
                    (this.$focusScroll = !1),
                    (this.focus = function () {
                      if ($ || c || 'browser' == this.$focusScroll) return i.focus({ preventScroll: !0 });
                      var e = i.style.top;
                      (i.style.position = 'fixed'), (i.style.top = '0px');
                      try {
                        var t = 0 != i.getBoundingClientRect().top;
                      } catch (e) {
                        return;
                      }
                      var n = [];
                      if (t)
                        for (var s = i.parentElement; s && 1 == s.nodeType; )
                          n.push(s),
                            s.setAttribute('ace_nocontext', !0),
                            (s = !s.parentElement && s.getRootNode ? s.getRootNode().host : s.parentElement);
                      i.focus({ preventScroll: !0 }),
                        t &&
                          n.forEach(function (e) {
                            e.removeAttribute('ace_nocontext');
                          }),
                        setTimeout(function () {
                          (i.style.position = ''), '0px' == i.style.top && (i.style.top = e);
                        }, 0);
                    }),
                    (this.blur = function () {
                      i.blur();
                    }),
                    (this.isFocused = function () {
                      return L;
                    }),
                    t.on('beforeEndOperation', function () {
                      var e = t.curOp,
                        n = e && e.command && e.command.name;
                      if ('insertstring' != n) {
                        var s = n && (e.docChanged || e.selectionChanged);
                        b && s && ((x = i.value = ''), H()), R();
                      }
                    });
                  var R = g
                    ? function (e) {
                        if (L && (!v || e) && !y) {
                          e || (e = '');
                          var n = '\n ab' + e + 'cde fg\n';
                          n != i.value && (i.value = x = n);
                          var s = 4 + (e.length || (t.selection.isEmpty() ? 0 : 1));
                          (4 == k && A == s) || i.setSelectionRange(4, s), (k = 4), (A = s);
                        }
                      }
                    : function () {
                        if (!b && !y && (L || E)) {
                          b = !0;
                          var e = 0,
                            n = 0,
                            s = '';
                          if (t.session) {
                            var r = t.selection,
                              o = r.getRange(),
                              a = r.cursor.row;
                            if (
                              ((e = o.start.column), (n = o.end.column), (s = t.session.getLine(a)), o.start.row != a)
                            ) {
                              var l = t.session.getLine(a - 1);
                              (e = o.start.row < a - 1 ? 0 : e), (n += l.length + 1), (s = l + '\n' + s);
                            } else if (o.end.row != a) {
                              var h = t.session.getLine(a + 1);
                              (n = o.end.row > a + 1 ? h.length : n), (n += s.length + 1), (s = s + '\n' + h);
                            } else m && a > 0 && ((s = '\n' + s), (n += 1), (e += 1));
                            s.length > u &&
                              (e < u && n < u
                                ? (s = s.slice(0, u))
                                : ((s = '\n'), e == n ? (e = n = 0) : ((e = 0), (n = 1))));
                          }
                          var c = s + '\n\n';
                          if (
                            (c != x && ((i.value = x = c), (k = A = c.length)),
                            E && ((k = i.selectionStart), (A = i.selectionEnd)),
                            A != n || k != e || i.selectionEnd != A)
                          )
                            try {
                              i.setSelectionRange(e, n), (k = e), (A = n);
                            } catch (e) {}
                          b = !1;
                        }
                      };
                  (this.resetSelection = R), L && t.onFocus();
                  var M = null;
                  (this.setInputHandler = function (e) {
                    M = e;
                  }),
                    (this.getInputHandler = function () {
                      return M;
                    });
                  var E = !1,
                    T = function (e, n) {
                      if ((E && (E = !1), w)) return R(), e && t.onPaste(e), (w = !1), '';
                      for (
                        var r = i.selectionStart,
                          o = i.selectionEnd,
                          a = k,
                          l = x.length - A,
                          h = e,
                          c = e.length - r,
                          u = e.length - o,
                          d = 0;
                        a > 0 && x[d] == e[d];

                      )
                        d++, a--;
                      for (h = h.slice(d), d = 1; l > 0 && x.length - d > k - 1 && x[x.length - d] == e[e.length - d]; )
                        d++, l--;
                      (c -= d - 1), (u -= d - 1);
                      var f = h.length - d + 1;
                      if ((f < 0 && ((a = -f), (f = 0)), (h = h.slice(0, f)), !(n || h || c || a || l || u))) return '';
                      y = !0;
                      var g = !1;
                      return (
                        s.isAndroid && '. ' == h && ((h = '  '), (g = !0)),
                        (h && !a && !l && !c && !u) || S
                          ? t.onTextInput(h)
                          : t.onTextInput(h, { extendLeft: a, extendRight: l, restoreStart: c, restoreEnd: u }),
                        (y = !1),
                        (x = e),
                        (k = r),
                        (A = o),
                        (_ = u),
                        g ? '\n' : h
                      );
                    },
                    O = function (e) {
                      if (b) return B();
                      if (e && e.inputType) {
                        if ('historyUndo' == e.inputType) return t.execCommand('undo');
                        if ('historyRedo' == e.inputType) return t.execCommand('redo');
                      }
                      var n = i.value,
                        s = T(n, !0);
                      (n.length > 500 || p.test(s) || (m && k < 1 && k == A)) && R();
                    },
                    F = function (e, t, i) {
                      var n = e.clipboardData || window.clipboardData;
                      if (n && !l) {
                        var s = h || i ? 'Text' : 'text/plain';
                        try {
                          return t ? !1 !== n.setData(s, t) : n.getData(s);
                        } catch (e) {
                          if (!i) return F(e, t, !0);
                        }
                      }
                    },
                    I = function (e, s) {
                      var r = t.getCopyText();
                      if (!r) return n.preventDefault(e);
                      F(e, r)
                        ? (g &&
                            (R(r),
                            (v = r),
                            setTimeout(function () {
                              v = !1;
                            }, 10)),
                          s ? t.onCut() : t.onCopy(),
                          n.preventDefault(e))
                        : ((v = !0),
                          (i.value = r),
                          i.select(),
                          setTimeout(function () {
                            (v = !1), R(), s ? t.onCut() : t.onCopy();
                          }));
                    },
                    P = function (e) {
                      I(e, !0);
                    },
                    D = function (e) {
                      I(e, !1);
                    },
                    W = function (e) {
                      var r = F(e);
                      a.pasteCancelled() ||
                        ('string' == typeof r
                          ? (r && t.onPaste(r, e), s.isIE && setTimeout(R), n.preventDefault(e))
                          : ((i.value = ''), (w = !0)));
                    };
                  n.addCommandKeyListener(i, t.onCommandKey.bind(t), t),
                    n.addListener(
                      i,
                      'select',
                      function (e) {
                        b ||
                          (v
                            ? (v = !1)
                            : (function (e) {
                                return (
                                  0 === e.selectionStart &&
                                  e.selectionEnd >= x.length &&
                                  e.value === x &&
                                  x &&
                                  e.selectionEnd !== A
                                );
                              })(i)
                            ? (t.selectAll(), R())
                            : m && i.selectionStart != k && R());
                      },
                      t
                    ),
                    n.addListener(i, 'input', O, t),
                    n.addListener(i, 'cut', P, t),
                    n.addListener(i, 'copy', D, t),
                    n.addListener(i, 'paste', W, t),
                    ('oncut' in i && 'oncopy' in i && 'onpaste' in i) ||
                      n.addListener(
                        e,
                        'keydown',
                        function (e) {
                          if ((!s.isMac || e.metaKey) && e.ctrlKey)
                            switch (e.keyCode) {
                              case 67:
                                D(e);
                                break;
                              case 86:
                                W(e);
                                break;
                              case 88:
                                P(e);
                            }
                        },
                        t
                      );
                  var B = function () {
                      if (b && t.onCompositionUpdate && !t.$readOnly) {
                        if (S) return N();
                        if (b.useTextareaForIME) t.onCompositionUpdate(i.value);
                        else {
                          var e = i.value;
                          T(e),
                            b.markerRange &&
                              (b.context &&
                                (b.markerRange.start.column = b.selectionStart = b.context.compositionStartOffset),
                              (b.markerRange.end.column = b.markerRange.start.column + A - b.selectionStart + _));
                        }
                      }
                    },
                    H = function (e) {
                      t.onCompositionEnd &&
                        !t.$readOnly &&
                        ((b = !1), t.onCompositionEnd(), t.off('mousedown', N), e && O());
                    };
                  function N() {
                    (C = !0), i.blur(), i.focus(), (C = !1);
                  }
                  var z,
                    V = o.delayedCall(B, 50).schedule.bind(null, null);
                  function U() {
                    clearTimeout(z),
                      (z = setTimeout(function () {
                        $ && ((i.style.cssText = $), ($ = '')),
                          (t.renderer.$isMousePressed = !1),
                          t.renderer.$keepTextAreaAtCursor && t.renderer.$moveTextAreaToCursor();
                      }, 0));
                  }
                  n.addListener(
                    i,
                    'compositionstart',
                    function (e) {
                      if (!b && t.onCompositionStart && !t.$readOnly && ((b = {}), !S)) {
                        e.data && (b.useTextareaForIME = !1),
                          setTimeout(B, 0),
                          t._signal('compositionStart'),
                          t.on('mousedown', N);
                        var n = t.getSelectionRange();
                        (n.end.row = n.start.row),
                          (n.end.column = n.start.column),
                          (b.markerRange = n),
                          (b.selectionStart = k),
                          t.onCompositionStart(b),
                          b.useTextareaForIME
                            ? ((x = i.value = ''), (k = 0), (A = 0))
                            : (i.msGetInputContext && (b.context = i.msGetInputContext()),
                              i.getInputContext && (b.context = i.getInputContext()));
                      }
                    },
                    t
                  ),
                    n.addListener(i, 'compositionupdate', B, t),
                    n.addListener(
                      i,
                      'keyup',
                      function (e) {
                        27 == e.keyCode && i.value.length < i.selectionStart && (b || (x = i.value), (k = A = -1), R()),
                          V();
                      },
                      t
                    ),
                    n.addListener(i, 'keydown', V, t),
                    n.addListener(i, 'compositionend', H, t),
                    (this.getElement = function () {
                      return i;
                    }),
                    (this.setCommandMode = function (e) {
                      (S = e), (i.readOnly = !1);
                    }),
                    (this.setReadOnly = function (e) {
                      S || (i.readOnly = e);
                    }),
                    (this.setCopyWithEmptySelection = function (e) {}),
                    (this.onContextMenu = function (e) {
                      (E = !0), R(), t._emit('nativecontextmenu', { target: t, domEvent: e }), this.moveToMouse(e, !0);
                    }),
                    (this.moveToMouse = function (e, o) {
                      $ || ($ = i.style.cssText),
                        (i.style.cssText =
                          (o ? 'z-index:100000;' : '') +
                          (s.isIE ? 'opacity:0.1;' : '') +
                          'text-indent: -' +
                          (k + A) * t.renderer.characterWidth * 0.5 +
                          'px;');
                      var a = t.container.getBoundingClientRect(),
                        l = r.computedStyle(t.container),
                        h = a.top + (parseInt(l.borderTopWidth) || 0),
                        c = a.left + (parseInt(a.borderLeftWidth) || 0),
                        u = a.bottom - h - i.clientHeight - 2,
                        d = function (e) {
                          r.translate(i, e.clientX - c - 2, Math.min(e.clientY - h - 2, u));
                        };
                      d(e),
                        'mousedown' == e.type &&
                          ((t.renderer.$isMousePressed = !0), clearTimeout(z), s.isWin && n.capture(t.container, d, U));
                    }),
                    (this.onContextMenuClose = U);
                  var K = function (e) {
                    t.textInput.onContextMenu(e), U();
                  };
                  n.addListener(i, 'mouseup', K, t),
                    n.addListener(
                      i,
                      'mousedown',
                      function (e) {
                        e.preventDefault(), U();
                      },
                      t
                    ),
                    n.addListener(t.renderer.scroller, 'contextmenu', K, t),
                    n.addListener(i, 'contextmenu', K, t),
                    g &&
                      (function (e, t, i) {
                        var n = null,
                          s = !1;
                        i.addEventListener(
                          'keydown',
                          function (e) {
                            n && clearTimeout(n), (s = !0);
                          },
                          !0
                        ),
                          i.addEventListener(
                            'keyup',
                            function (e) {
                              n = setTimeout(function () {
                                s = !1;
                              }, 100);
                            },
                            !0
                          );
                        var r = function (e) {
                          if (document.activeElement === i && !(s || b || t.$mouseHandler.isMousePressed || v)) {
                            var n = i.selectionStart,
                              r = i.selectionEnd,
                              o = null,
                              a = 0;
                            if (
                              (0 == n
                                ? (o = d.up)
                                : 1 == n
                                ? (o = d.home)
                                : r > A && '\n' == x[r]
                                ? (o = d.end)
                                : n < k && ' ' == x[n - 1]
                                ? ((o = d.left), (a = f.option))
                                : n < k || (n == k && A != k && n == r)
                                ? (o = d.left)
                                : r > A && x.slice(0, r).split('\n').length > 2
                                ? (o = d.down)
                                : r > A && ' ' == x[r - 1]
                                ? ((o = d.right), (a = f.option))
                                : (r > A || (r == A && A != k && n == r)) && (o = d.right),
                              n !== r && (a |= f.shift),
                              o)
                            ) {
                              if (!t.onCommandKey({}, a, o) && t.commands) {
                                o = d.keyCodeToString(o);
                                var l = t.commands.findKeyCommand(a, o);
                                l && t.execCommand(l);
                              }
                              (k = n), (A = r), R('');
                            }
                          }
                        };
                        document.addEventListener('selectionchange', r),
                          t.on('destroy', function () {
                            document.removeEventListener('selectionchange', r);
                          });
                      })(0, t, i);
                }),
                  (t.$setUserAgentForTests = function (e, t) {
                    (m = e), (g = t);
                  });
              }
            ),
            ace.define(
              'ace/mouse/default_handlers',
              ['require', 'exports', 'module', 'ace/lib/useragent'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/useragent');
                function s(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)),
                    [
                      '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 r(e, t) {
                  if (e.start.row == e.end.row) var i = 2 * t.column - e.start.column - e.end.column;
                  else if (e.start.row != e.end.row - 1 || e.start.column || e.end.column)
                    i = 2 * t.row - e.start.row - e.end.row;
                  else i = t.column - 4;
                  return i < 0 ? { cursor: e.start, anchor: e.end } : { cursor: e.end, anchor: e.start };
                }
                (function () {
                  (this.onMouseDown = function (e) {
                    var t = e.inSelection(),
                      i = e.getDocumentPosition();
                    this.mousedownEvent = e;
                    var s = this.editor,
                      r = e.getButton();
                    return 0 !== r
                      ? ((s.getSelectionRange().isEmpty() || 1 == r) && s.selection.moveToPosition(i),
                        void (2 == r && (s.textInput.onContextMenu(e.domEvent), n.isMozilla || e.preventDefault())))
                      : ((this.mousedownEvent.time = Date.now()),
                        !t ||
                        s.isFocused() ||
                        (s.focus(), !this.$focusTimeout || this.$clickSelection || s.inMultiSelectMode)
                          ? (this.captureMouse(e), this.startSelect(i, e.domEvent._clicks > 1), e.preventDefault())
                          : (this.setState('focusWait'), void this.captureMouse(e)));
                  }),
                    (this.startSelect = function (e, t) {
                      e = e || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
                      var i = this.editor;
                      this.mousedownEvent &&
                        (this.mousedownEvent.getShiftKey()
                          ? i.selection.selectToPosition(e)
                          : t || i.selection.moveToPosition(e),
                        t || this.select(),
                        i.renderer.scroller.setCapture && i.renderer.scroller.setCapture(),
                        i.setStyle('ace_selecting'),
                        this.setState('select'));
                    }),
                    (this.select = function () {
                      var e,
                        t = this.editor,
                        i = t.renderer.screenToTextCoordinates(this.x, this.y);
                      if (this.$clickSelection) {
                        var n = this.$clickSelection.comparePoint(i);
                        if (-1 == n) e = this.$clickSelection.end;
                        else if (1 == n) e = this.$clickSelection.start;
                        else {
                          var s = r(this.$clickSelection, i);
                          (i = s.cursor), (e = s.anchor);
                        }
                        t.selection.setSelectionAnchor(e.row, e.column);
                      }
                      t.selection.selectToPosition(i), t.renderer.scrollCursorIntoView();
                    }),
                    (this.extendSelectionBy = function (e) {
                      var t,
                        i = this.editor,
                        n = i.renderer.screenToTextCoordinates(this.x, this.y),
                        s = i.selection[e](n.row, n.column);
                      if (this.$clickSelection) {
                        var o = this.$clickSelection.comparePoint(s.start),
                          a = this.$clickSelection.comparePoint(s.end);
                        if (-1 == o && a <= 0)
                          (t = this.$clickSelection.end),
                            (s.end.row == n.row && s.end.column == n.column) || (n = s.start);
                        else if (1 == a && o >= 0)
                          (t = this.$clickSelection.start),
                            (s.start.row == n.row && s.start.column == n.column) || (n = s.end);
                        else if (-1 == o && 1 == a) (n = s.end), (t = s.start);
                        else {
                          var l = r(this.$clickSelection, n);
                          (n = l.cursor), (t = l.anchor);
                        }
                        i.selection.setSelectionAnchor(t.row, t.column);
                      }
                      i.selection.selectToPosition(n), i.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,
                        t,
                        i,
                        n,
                        s =
                          ((e = this.mousedownEvent.x),
                          (t = this.mousedownEvent.y),
                          (i = this.x),
                          (n = this.y),
                          Math.sqrt(Math.pow(i - e, 2) + Math.pow(n - t, 2))),
                        r = Date.now();
                      (s > 0 || r - this.mousedownEvent.time > this.$focusTimeout) &&
                        this.startSelect(this.mousedownEvent.getDocumentPosition());
                    }),
                    (this.onDoubleClick = function (e) {
                      var t = e.getDocumentPosition(),
                        i = this.editor,
                        n = i.session.getBracketRange(t);
                      n
                        ? (n.isEmpty() && (n.start.column--, n.end.column++), this.setState('select'))
                        : ((n = i.selection.getWordRange(t.row, t.column)), this.setState('selectByWords')),
                        (this.$clickSelection = n),
                        this.select();
                    }),
                    (this.onTripleClick = function (e) {
                      var t = e.getDocumentPosition(),
                        i = this.editor;
                      this.setState('selectByLines');
                      var n = i.getSelectionRange();
                      n.isMultiLine() && n.contains(t.row, t.column)
                        ? ((this.$clickSelection = i.selection.getLineRange(n.start.row)),
                          (this.$clickSelection.end = i.selection.getLineRange(n.end.row).end))
                        : (this.$clickSelection = i.selection.getLineRange(t.row)),
                        this.select();
                    }),
                    (this.onQuadClick = function (e) {
                      var t = this.editor;
                      t.selectAll(), (this.$clickSelection = t.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 t = this.editor;
                        this.$lastScroll || (this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 });
                        var i = this.$lastScroll,
                          n = e.domEvent.timeStamp,
                          s = n - i.t,
                          r = s ? e.wheelX / s : i.vx,
                          o = s ? e.wheelY / s : i.vy;
                        s < 550 && ((r = (r + i.vx) / 2), (o = (o + i.vy) / 2));
                        var a = Math.abs(r / o),
                          l = !1;
                        return (
                          a >= 1 && t.renderer.isScrollableBy(e.wheelX * e.speed, 0) && (l = !0),
                          a <= 1 && t.renderer.isScrollableBy(0, e.wheelY * e.speed) && (l = !0),
                          l
                            ? (i.allowed = n)
                            : n - i.allowed < 550 &&
                              (Math.abs(r) <= 1.5 * Math.abs(i.vx) && Math.abs(o) <= 1.5 * Math.abs(i.vy)
                                ? ((l = !0), (i.allowed = n))
                                : (i.allowed = 0)),
                          (i.t = n),
                          (i.vx = r),
                          (i.vy = o),
                          l ? (t.renderer.scrollBy(e.wheelX * e.speed, e.wheelY * e.speed), e.stop()) : void 0
                        );
                      }
                    });
                }).call(s.prototype),
                  (t.DefaultHandlers = s);
              }
            ),
            ace.define(
              'ace/tooltip',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/dom'],
              function (e, t, i) {
                'use strict';
                e('./lib/oop');
                var n = e('./lib/dom');
                function s(e) {
                  (this.isOpen = !1), (this.$element = null), (this.$parentNode = e);
                }
                (function () {
                  (this.$init = function () {
                    return (
                      (this.$element = n.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) {
                      this.getElement().textContent = 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) {
                      n.addCssClass(this.getElement(), e);
                    }),
                    (this.show = function (e, t, i) {
                      null != e && this.setText(e),
                        null != t && null != i && this.setPosition(t, i),
                        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;
                    }),
                    (this.destroy = function () {
                      (this.isOpen = !1),
                        this.$element &&
                          this.$element.parentNode &&
                          this.$element.parentNode.removeChild(this.$element);
                    });
                }).call(s.prototype),
                  (t.Tooltip = s);
              }
            ),
            ace.define(
              'ace/mouse/default_gutter_handler',
              ['require', 'exports', 'module', 'ace/lib/dom', 'ace/lib/oop', 'ace/lib/event', 'ace/tooltip'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/dom'),
                  s = e('../lib/oop'),
                  r = e('../lib/event'),
                  o = e('../tooltip').Tooltip;
                function a(e) {
                  o.call(this, e);
                }
                s.inherits(a, o),
                  function () {
                    this.setPosition = function (e, t) {
                      var i = window.innerWidth || document.documentElement.clientWidth,
                        n = window.innerHeight || document.documentElement.clientHeight,
                        s = this.getWidth(),
                        r = this.getHeight();
                      (e += 15) + s > i && (e -= e + s - i),
                        (t += 15) + r > n && (t -= 20 + r),
                        o.prototype.setPosition.call(this, e, t);
                    };
                  }.call(a.prototype),
                  (t.GutterHandler = function (e) {
                    var t,
                      i,
                      s,
                      o = e.editor,
                      l = o.renderer.$gutterLayer,
                      h = new a(o.container);
                    function c() {
                      t && (t = clearTimeout(t)),
                        s && (h.hide(), (s = null), o._signal('hideGutterTooltip', h), o.off('mousewheel', c));
                    }
                    function u(e) {
                      h.setPosition(e.x, e.y);
                    }
                    e.editor.setDefaultHandler('guttermousedown', function (t) {
                      if (o.isFocused() && 0 == t.getButton() && 'foldWidgets' != l.getRegion(t)) {
                        var i = t.getDocumentPosition().row,
                          n = o.session.selection;
                        if (t.getShiftKey()) n.selectTo(i, 0);
                        else {
                          if (2 == t.domEvent.detail) return o.selectAll(), t.preventDefault();
                          e.$clickSelection = o.selection.getLineRange(i);
                        }
                        return e.setState('selectByLines'), e.captureMouse(t), t.preventDefault();
                      }
                    }),
                      e.editor.setDefaultHandler('guttermousemove', function (r) {
                        var a = r.domEvent.target || r.domEvent.srcElement;
                        if (n.hasCssClass(a, 'ace_fold-widget')) return c();
                        s && e.$tooltipFollowsMouse && u(r),
                          (i = r),
                          t ||
                            (t = setTimeout(function () {
                              (t = null),
                                i && !e.isMousePressed
                                  ? (function () {
                                      var t = i.getDocumentPosition().row,
                                        n = l.$annotations[t];
                                      if (!n) return c();
                                      if (t == o.session.getLength()) {
                                        var r = o.renderer.pixelToScreenCoordinates(0, i.y).row,
                                          a = i.$pos;
                                        if (r > o.session.documentToScreenRow(a.row, a.column)) return c();
                                      }
                                      if (s != n)
                                        if (
                                          ((s = n.text.join('<br/>')),
                                          h.setHtml(s),
                                          h.show(),
                                          o._signal('showGutterTooltip', h),
                                          o.on('mousewheel', c),
                                          e.$tooltipFollowsMouse)
                                        )
                                          u(i);
                                        else {
                                          var d = i.domEvent.target.getBoundingClientRect(),
                                            f = h.getElement().style;
                                          (f.left = d.right + 'px'), (f.top = d.bottom + 'px');
                                        }
                                    })()
                                  : c();
                            }, 50));
                      }),
                      r.addListener(
                        o.renderer.$gutter,
                        'mouseout',
                        function (e) {
                          (i = null),
                            s &&
                              !t &&
                              (t = setTimeout(function () {
                                (t = null), c();
                              }, 50));
                        },
                        o
                      ),
                      o.on('changeSession', c);
                  });
              }
            ),
            ace.define(
              'ace/mouse/mouse_event',
              ['require', 'exports', 'module', 'ace/lib/event', 'ace/lib/useragent'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/event'),
                  s = 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 () {
                    n.stopPropagation(this.domEvent), (this.propagationStopped = !0);
                  }),
                    (this.preventDefault = function () {
                      n.preventDefault(this.domEvent), (this.defaultPrevented = !0);
                    }),
                    (this.stop = function () {
                      this.stopPropagation(), this.preventDefault();
                    }),
                    (this.getDocumentPosition = function () {
                      return (
                        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.getSelectionRange();
                      if (e.isEmpty()) this.$inSelection = !1;
                      else {
                        var t = this.getDocumentPosition();
                        this.$inSelection = e.contains(t.row, t.column);
                      }
                      return this.$inSelection;
                    }),
                    (this.getButton = function () {
                      return n.getButton(this.domEvent);
                    }),
                    (this.getShiftKey = function () {
                      return this.domEvent.shiftKey;
                    }),
                    (this.getAccelKey = s.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, i) {
                'use strict';
                var n = e('../lib/dom'),
                  s = e('../lib/event'),
                  r = e('../lib/useragent');
                function o(e) {
                  var t = e.editor,
                    i = n.createElement('div');
                  (i.style.cssText = 'top:-100px;position:absolute;z-index:2147483647;opacity:0.5'),
                    (i.textContent = ' '),
                    ['dragWait', 'dragWaitEnd', 'startDrag', 'dragReadyEnd', 'onMouseDrag'].forEach(function (t) {
                      e[t] = this[t];
                    }, this),
                    t.on('mousedown', this.onMouseDown.bind(e));
                  var o,
                    l,
                    h,
                    c,
                    u,
                    d,
                    f,
                    g,
                    p,
                    m,
                    v,
                    w = t.container,
                    b = 0;
                  function y() {
                    var e = d;
                    (function (e, i) {
                      var n = Date.now(),
                        s = !i || e.row != i.row,
                        r = !i || e.column != i.column;
                      !m || s || r
                        ? (t.moveCursorToPosition(e), (m = n), (v = { x: l, y: h }))
                        : a(v.x, v.y, l, h) > 5
                        ? (m = null)
                        : n - m >= 200 && (t.renderer.scrollCursorIntoView(), (m = null));
                    })((d = t.renderer.screenToTextCoordinates(l, h)), e),
                      (function (e, i) {
                        var n = Date.now(),
                          s = t.renderer.layerConfig.lineHeight,
                          r = t.renderer.layerConfig.characterWidth,
                          o = t.renderer.scroller.getBoundingClientRect(),
                          a = {
                            x: { left: l - o.left, right: o.right - l },
                            y: { top: h - o.top, bottom: o.bottom - h },
                          },
                          c = Math.min(a.x.left, a.x.right),
                          u = Math.min(a.y.top, a.y.bottom),
                          d = { row: e.row, column: e.column };
                        c / r <= 2 && (d.column += a.x.left < a.x.right ? -3 : 2),
                          u / s <= 1 && (d.row += a.y.top < a.y.bottom ? -1 : 1);
                        var f = e.row != d.row,
                          g = e.column != d.column,
                          m = !i || e.row != i.row;
                        f || (g && !m)
                          ? p
                            ? n - p >= 200 && t.renderer.scrollCursorIntoView(d)
                            : (p = n)
                          : (p = null);
                      })(d, e);
                  }
                  function $() {
                    (u = t.selection.toOrientedRange()),
                      (o = t.session.addMarker(u, 'ace_selection', t.getSelectionStyle())),
                      t.clearSelection(),
                      t.isFocused() && t.renderer.$cursorLayer.setBlinking(!1),
                      clearInterval(c),
                      y(),
                      (c = setInterval(y, 20)),
                      (b = 0),
                      s.addListener(document, 'mousemove', x);
                  }
                  function S() {
                    clearInterval(c),
                      t.session.removeMarker(o),
                      (o = null),
                      t.selection.fromOrientedRange(u),
                      t.isFocused() && !g && t.$resetCursorStyle(),
                      (u = null),
                      (d = null),
                      (b = 0),
                      (p = null),
                      (m = null),
                      s.removeListener(document, 'mousemove', x);
                  }
                  (this.onDragStart = function (e) {
                    if (this.cancelDrag || !w.draggable) {
                      var n = this;
                      return (
                        setTimeout(function () {
                          n.startSelect(), n.captureMouse(e);
                        }, 0),
                        e.preventDefault()
                      );
                    }
                    u = t.getSelectionRange();
                    var s = e.dataTransfer;
                    (s.effectAllowed = t.getReadOnly() ? 'copy' : 'copyMove'),
                      t.container.appendChild(i),
                      s.setDragImage && s.setDragImage(i, 0, 0),
                      setTimeout(function () {
                        t.container.removeChild(i);
                      }),
                      s.clearData(),
                      s.setData('Text', t.session.getTextRange()),
                      (g = !0),
                      this.setState('drag');
                  }),
                    (this.onDragEnd = function (e) {
                      if (((w.draggable = !1), (g = !1), this.setState(null), !t.getReadOnly())) {
                        var i = e.dataTransfer.dropEffect;
                        f || 'move' != i || t.session.remove(t.getSelectionRange()), t.$resetCursorStyle();
                      }
                      this.editor.unsetStyle('ace_dragging'), this.editor.renderer.setCursorStyle('');
                    }),
                    (this.onDragEnter = function (e) {
                      if (!t.getReadOnly() && k(e.dataTransfer))
                        return (
                          (l = e.clientX),
                          (h = e.clientY),
                          o || $(),
                          b++,
                          (e.dataTransfer.dropEffect = f = A(e)),
                          s.preventDefault(e)
                        );
                    }),
                    (this.onDragOver = function (e) {
                      if (!t.getReadOnly() && k(e.dataTransfer))
                        return (
                          (l = e.clientX),
                          (h = e.clientY),
                          o || ($(), b++),
                          null !== C && (C = null),
                          (e.dataTransfer.dropEffect = f = A(e)),
                          s.preventDefault(e)
                        );
                    }),
                    (this.onDragLeave = function (e) {
                      if (--b <= 0 && o) return S(), (f = null), s.preventDefault(e);
                    }),
                    (this.onDrop = function (e) {
                      if (d) {
                        var i = e.dataTransfer;
                        if (g)
                          switch (f) {
                            case 'move':
                              u = u.contains(d.row, d.column) ? { start: d, end: d } : t.moveText(u, d);
                              break;
                            case 'copy':
                              u = t.moveText(u, d, !0);
                          }
                        else {
                          var n = i.getData('Text');
                          (u = { start: d, end: t.session.insert(d, n) }), t.focus(), (f = null);
                        }
                        return S(), s.preventDefault(e);
                      }
                    }),
                    s.addListener(w, 'dragstart', this.onDragStart.bind(e), t),
                    s.addListener(w, 'dragend', this.onDragEnd.bind(e), t),
                    s.addListener(w, 'dragenter', this.onDragEnter.bind(e), t),
                    s.addListener(w, 'dragover', this.onDragOver.bind(e), t),
                    s.addListener(w, 'dragleave', this.onDragLeave.bind(e), t),
                    s.addListener(w, 'drop', this.onDrop.bind(e), t);
                  var C = null;
                  function x() {
                    null == C &&
                      (C = setTimeout(function () {
                        null != C && o && S();
                      }, 20));
                  }
                  function k(e) {
                    var t = e.types;
                    return (
                      !t ||
                      Array.prototype.some.call(t, function (e) {
                        return 'text/plain' == e || 'Text' == e;
                      })
                    );
                  }
                  function A(e) {
                    var t = ['copy', 'copymove', 'all', 'uninitialized'],
                      i = r.isMac ? e.altKey : e.ctrlKey,
                      n = 'uninitialized';
                    try {
                      n = e.dataTransfer.effectAllowed.toLowerCase();
                    } catch (e) {}
                    var s = 'none';
                    return (
                      i && t.indexOf(n) >= 0
                        ? (s = 'copy')
                        : ['move', 'copymove', 'linkmove', 'all', 'uninitialized'].indexOf(n) >= 0
                        ? (s = 'move')
                        : t.indexOf(n) >= 0 && (s = 'copy'),
                      s
                    );
                  }
                }
                function a(e, t, i, n) {
                  return Math.sqrt(Math.pow(i - e, 2) + Math.pow(n - t, 2));
                }
                (function () {
                  (this.dragWait = function () {
                    Date.now() - this.mousedownEvent.time > this.editor.getDragDelay() && this.startDrag();
                  }),
                    (this.dragWaitEnd = function () {
                      (this.editor.container.draggable = !1),
                        this.startSelect(this.mousedownEvent.getDocumentPosition()),
                        this.selectEnd();
                    }),
                    (this.dragReadyEnd = function (e) {
                      this.editor.$resetCursorStyle(),
                        this.editor.unsetStyle('ace_dragging'),
                        this.editor.renderer.setCursorStyle(''),
                        this.dragWaitEnd();
                    }),
                    (this.startDrag = function () {
                      this.cancelDrag = !1;
                      var e = this.editor;
                      (e.container.draggable = !0), e.renderer.$cursorLayer.setBlinking(!1), e.setStyle('ace_dragging');
                      var t = r.isWin ? 'default' : 'move';
                      e.renderer.setCursorStyle(t), this.setState('dragReady');
                    }),
                    (this.onMouseDrag = function (e) {
                      var t = this.editor.container;
                      r.isIE &&
                        'dragReady' == this.state &&
                        a(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y) > 3 &&
                        t.dragDrop(),
                        'dragWait' === this.state &&
                          a(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y) > 0 &&
                          ((t.draggable = !1), this.startSelect(this.mousedownEvent.getDocumentPosition()));
                    }),
                    (this.onMouseDown = function (e) {
                      if (this.$dragEnabled) {
                        this.mousedownEvent = e;
                        var t = this.editor,
                          i = e.inSelection(),
                          n = e.getButton();
                        if (1 === (e.domEvent.detail || 1) && 0 === n && i) {
                          if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return;
                          this.mousedownEvent.time = Date.now();
                          var s = e.domEvent.target || e.domEvent.srcElement;
                          'unselectable' in s && (s.unselectable = 'on'),
                            t.getDragDelay()
                              ? (r.isWebKit && ((this.cancelDrag = !0), (t.container.draggable = !0)),
                                this.setState('dragWait'))
                              : this.startDrag(),
                            this.captureMouse(e, this.onMouseDrag.bind(this)),
                            (e.defaultPrevented = !0);
                        }
                      }
                    });
                }).call(o.prototype),
                  (t.DragdropHandler = o);
              }
            ),
            ace.define(
              'ace/mouse/touch_handler',
              ['require', 'exports', 'module', 'ace/mouse/mouse_event', 'ace/lib/event', 'ace/lib/dom'],
              function (e, t, i) {
                'use strict';
                var n = e('./mouse_event').MouseEvent,
                  s = e('../lib/event'),
                  r = e('../lib/dom');
                t.addTouchListeners = function (e, t) {
                  var i,
                    o,
                    a,
                    l,
                    h,
                    c,
                    u,
                    d,
                    f,
                    g = 'scroll',
                    p = 0,
                    m = 0,
                    v = 0,
                    w = 0;
                  function b() {
                    var e, i, n;
                    f ||
                      ((e = window.navigator && window.navigator.clipboard),
                      (i = !1),
                      (n = function (n) {
                        var s,
                          o,
                          a = n.target.getAttribute('action');
                        if ('more' == a || !i)
                          return (
                            (i = !i),
                            (s = t.getCopyText()),
                            (o = t.session.getUndoManager().hasUndo()),
                            void f.replaceChild(
                              r.buildDom(
                                i
                                  ? [
                                      'span',
                                      !s && ['span', { class: 'ace_mobile-button', action: 'selectall' }, 'Select All'],
                                      s && ['span', { class: 'ace_mobile-button', action: 'copy' }, 'Copy'],
                                      s && ['span', { class: 'ace_mobile-button', action: 'cut' }, 'Cut'],
                                      e && ['span', { class: 'ace_mobile-button', action: 'paste' }, 'Paste'],
                                      o && ['span', { class: 'ace_mobile-button', action: 'undo' }, 'Undo'],
                                      ['span', { class: 'ace_mobile-button', action: 'find' }, 'Find'],
                                      ['span', { class: 'ace_mobile-button', action: 'openCommandPallete' }, 'Pallete'],
                                    ]
                                  : ['span']
                              ),
                              f.firstChild
                            )
                          );
                        'paste' == a
                          ? e.readText().then(function (e) {
                              t.execCommand(a, e);
                            })
                          : a &&
                            (('cut' != a && 'copy' != a) ||
                              (e ? e.writeText(t.getCopyText()) : document.execCommand('copy')),
                            t.execCommand(a)),
                          (f.firstChild.style.display = 'none'),
                          (i = !1),
                          'openCommandPallete' != a && t.focus();
                      }),
                      (f = r.buildDom(
                        [
                          'div',
                          {
                            class: 'ace_mobile-menu',
                            ontouchstart: function (e) {
                              (g = 'menu'), e.stopPropagation(), e.preventDefault(), t.textInput.focus();
                            },
                            ontouchend: function (e) {
                              e.stopPropagation(), e.preventDefault(), n(e);
                            },
                            onclick: n,
                          },
                          ['span'],
                          ['span', { class: 'ace_mobile-button', action: 'more' }, '...'],
                        ],
                        t.container
                      )));
                    var s = t.selection.cursor,
                      o = t.renderer.textToScreenCoordinates(s.row, s.column),
                      a = t.renderer.textToScreenCoordinates(0, 0).pageX,
                      l = t.renderer.scrollLeft,
                      h = t.container.getBoundingClientRect();
                    (f.style.top = o.pageY - h.top - 3 + 'px'),
                      o.pageX - h.left < h.width - 70
                        ? ((f.style.left = ''), (f.style.right = '10px'))
                        : ((f.style.right = ''), (f.style.left = a + l - h.left + 'px')),
                      (f.style.display = ''),
                      (f.firstChild.style.display = 'none'),
                      t.on('input', y);
                  }
                  function y(e) {
                    f && (f.style.display = 'none'), t.off('input', y);
                  }
                  function $() {
                    (h = null), clearTimeout(h);
                    var e = t.selection.getRange(),
                      i = e.contains(u.row, u.column);
                    (!e.isEmpty() && i) || (t.selection.moveToPosition(u), t.selection.selectWord()), (g = 'wait'), b();
                  }
                  s.addListener(
                    e,
                    'contextmenu',
                    function (e) {
                      d && t.textInput.getElement().focus();
                    },
                    t
                  ),
                    s.addListener(
                      e,
                      'touchstart',
                      function (e) {
                        var s = e.touches;
                        if (h || s.length > 1) return clearTimeout(h), (h = null), (a = -1), void (g = 'zoom');
                        d = t.$mouseHandler.isMousePressed = !0;
                        var r = t.renderer.layerConfig.lineHeight,
                          c = t.renderer.layerConfig.lineHeight,
                          f = e.timeStamp;
                        l = f;
                        var b = s[0],
                          y = b.clientX,
                          S = b.clientY;
                        Math.abs(i - y) + Math.abs(o - S) > r && (a = -1),
                          (i = e.clientX = y),
                          (o = e.clientY = S),
                          (v = w = 0);
                        var C = new n(e, t);
                        if (((u = C.getDocumentPosition()), f - a < 500 && 1 == s.length && !p))
                          m++,
                            e.preventDefault(),
                            (e.button = 0),
                            (function () {
                              (h = null), clearTimeout(h), t.selection.moveToPosition(u);
                              var e = m >= 2 ? t.selection.getLineRange(u.row) : t.session.getBracketRange(u);
                              e && !e.isEmpty() ? t.selection.setRange(e) : t.selection.selectWord(), (g = 'wait');
                            })();
                        else {
                          m = 0;
                          var x = t.selection.cursor,
                            k = t.selection.isEmpty() ? x : t.selection.anchor,
                            A = t.renderer.$cursorLayer.getPixelPosition(x, !0),
                            _ = t.renderer.$cursorLayer.getPixelPosition(k, !0),
                            L = t.renderer.scroller.getBoundingClientRect(),
                            R = t.renderer.layerConfig.offset,
                            M = t.renderer.scrollLeft,
                            E = function (e, t) {
                              return (e /= c) * e + (t = t / r - 0.75) * t;
                            };
                          if (e.clientX < L.left) return void (g = 'zoom');
                          var T = E(e.clientX - L.left - A.left + M, e.clientY - L.top - A.top + R),
                            O = E(e.clientX - L.left - _.left + M, e.clientY - L.top - _.top + R);
                          T < 3.5 && O < 3.5 && (g = T > O ? 'cursor' : 'anchor'),
                            (g = O < 3.5 ? 'anchor' : T < 3.5 ? 'cursor' : 'scroll'),
                            (h = setTimeout($, 450));
                        }
                        a = f;
                      },
                      t
                    ),
                    s.addListener(
                      e,
                      'touchend',
                      function (e) {
                        (d = t.$mouseHandler.isMousePressed = !1),
                          c && clearInterval(c),
                          'zoom' == g
                            ? ((g = ''), (p = 0))
                            : h
                            ? (t.selection.moveToPosition(u), (p = 0), b())
                            : 'scroll' == g
                            ? ((p += 60),
                              (c = setInterval(function () {
                                p-- <= 0 && (clearInterval(c), (c = null)),
                                  Math.abs(v) < 0.01 && (v = 0),
                                  Math.abs(w) < 0.01 && (w = 0),
                                  p < 20 && (v *= 0.9),
                                  p < 20 && (w *= 0.9);
                                var e = t.session.getScrollTop();
                                t.renderer.scrollBy(10 * v, 10 * w), e == t.session.getScrollTop() && (p = 0);
                              }, 10)),
                              y())
                            : b(),
                          clearTimeout(h),
                          (h = null);
                      },
                      t
                    ),
                    s.addListener(
                      e,
                      'touchmove',
                      function (e) {
                        h && (clearTimeout(h), (h = null));
                        var s = e.touches;
                        if (!(s.length > 1 || 'zoom' == g)) {
                          var r = s[0],
                            a = i - r.clientX,
                            c = o - r.clientY;
                          if ('wait' == g) {
                            if (!(a * a + c * c > 4)) return e.preventDefault();
                            g = 'cursor';
                          }
                          (i = r.clientX), (o = r.clientY), (e.clientX = r.clientX), (e.clientY = r.clientY);
                          var u = e.timeStamp,
                            d = u - l;
                          if (((l = u), 'scroll' == g)) {
                            var f = new n(e, t);
                            (f.speed = 1),
                              (f.wheelX = a),
                              (f.wheelY = c),
                              10 * Math.abs(a) < Math.abs(c) && (a = 0),
                              10 * Math.abs(c) < Math.abs(a) && (c = 0),
                              0 != d && ((v = a / d), (w = c / d)),
                              t._emit('mousewheel', f),
                              f.propagationStopped || (v = w = 0);
                          } else {
                            var p = new n(e, t).getDocumentPosition();
                            'cursor' == g
                              ? t.selection.moveCursorToPosition(p)
                              : 'anchor' == g && t.selection.setSelectionAnchor(p.row, p.column),
                              t.renderer.scrollCursorIntoView(p),
                              e.preventDefault();
                          }
                        }
                      },
                      t
                    );
                };
              }
            ),
            ace.define('ace/lib/net', ['require', 'exports', 'module', 'ace/lib/dom'], function (e, t, i) {
              'use strict';
              var n = e('./dom');
              (t.get = function (e, t) {
                var i = new XMLHttpRequest();
                i.open('GET', e, !0),
                  (i.onreadystatechange = function () {
                    4 === i.readyState && t(i.responseText);
                  }),
                  i.send(null);
              }),
                (t.loadScript = function (e, t) {
                  var i = n.getDocumentHead(),
                    s = document.createElement('script');
                  (s.src = e),
                    i.appendChild(s),
                    (s.onload = s.onreadystatechange =
                      function (e, i) {
                        (!i && s.readyState && 'loaded' != s.readyState && 'complete' != s.readyState) ||
                          ((s = s.onload = s.onreadystatechange = null), i || 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, i) {
              'use strict';
              var n = {},
                s = function () {
                  this.propagationStopped = !0;
                },
                r = function () {
                  this.defaultPrevented = !0;
                };
              (n._emit = n._dispatchEvent =
                function (e, t) {
                  this._eventRegistry || (this._eventRegistry = {}),
                    this._defaultHandlers || (this._defaultHandlers = {});
                  var i = this._eventRegistry[e] || [],
                    n = this._defaultHandlers[e];
                  if (i.length || n) {
                    ('object' == typeof t && t) || (t = {}),
                      t.type || (t.type = e),
                      t.stopPropagation || (t.stopPropagation = s),
                      t.preventDefault || (t.preventDefault = r),
                      (i = i.slice());
                    for (var o = 0; o < i.length && (i[o](t, this), !t.propagationStopped); o++);
                    return n && !t.defaultPrevented ? n(t, this) : void 0;
                  }
                }),
                (n._signal = function (e, t) {
                  var i = (this._eventRegistry || {})[e];
                  if (i) {
                    i = i.slice();
                    for (var n = 0; n < i.length; n++) i[n](t, this);
                  }
                }),
                (n.once = function (e, t) {
                  var i = this;
                  if (
                    (this.on(e, function n() {
                      i.off(e, n), t.apply(null, arguments);
                    }),
                    !t)
                  )
                    return new Promise(function (e) {
                      t = e;
                    });
                }),
                (n.setDefaultHandler = function (e, t) {
                  var i = this._defaultHandlers;
                  if ((i || (i = this._defaultHandlers = { _disabled_: {} }), i[e])) {
                    var n = i[e],
                      s = i._disabled_[e];
                    s || (i._disabled_[e] = s = []), s.push(n);
                    var r = s.indexOf(t);
                    -1 != r && s.splice(r, 1);
                  }
                  i[e] = t;
                }),
                (n.removeDefaultHandler = function (e, t) {
                  var i = this._defaultHandlers;
                  if (i) {
                    var n = i._disabled_[e];
                    if (i[e] == t) n && this.setDefaultHandler(e, n.pop());
                    else if (n) {
                      var s = n.indexOf(t);
                      -1 != s && n.splice(s, 1);
                    }
                  }
                }),
                (n.on = n.addEventListener =
                  function (e, t, i) {
                    this._eventRegistry = this._eventRegistry || {};
                    var n = this._eventRegistry[e];
                    return (
                      n || (n = this._eventRegistry[e] = []), -1 == n.indexOf(t) && n[i ? 'unshift' : 'push'](t), t
                    );
                  }),
                (n.off =
                  n.removeListener =
                  n.removeEventListener =
                    function (e, t) {
                      this._eventRegistry = this._eventRegistry || {};
                      var i = this._eventRegistry[e];
                      if (i) {
                        var n = i.indexOf(t);
                        -1 !== n && i.splice(n, 1);
                      }
                    }),
                (n.removeAllListeners = function (e) {
                  e || (this._eventRegistry = this._defaultHandlers = void 0),
                    this._eventRegistry && (this._eventRegistry[e] = void 0),
                    this._defaultHandlers && (this._defaultHandlers[e] = void 0);
                }),
                (t.EventEmitter = n);
            }),
            ace.define(
              'ace/lib/app_config',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/event_emitter'],
              function (e, t, i) {
                var n = e('./oop'),
                  s = e('./event_emitter').EventEmitter,
                  r = {
                    setOptions: function (e) {
                      Object.keys(e).forEach(function (t) {
                        this.setOption(t, e[t]);
                      }, this);
                    },
                    getOptions: function (e) {
                      var t = {};
                      if (e) Array.isArray(e) || ((t = e), (e = Object.keys(t)));
                      else {
                        var i = this.$options;
                        e = Object.keys(i).filter(function (e) {
                          return !i[e].hidden;
                        });
                      }
                      return (
                        e.forEach(function (e) {
                          t[e] = this.getOption(e);
                        }, this),
                        t
                      );
                    },
                    setOption: function (e, t) {
                      if (this['$' + e] !== t) {
                        var i = this.$options[e];
                        if (!i) return o('misspelled option "' + e + '"');
                        if (i.forwardTo) return this[i.forwardTo] && this[i.forwardTo].setOption(e, t);
                        i.handlesSet || (this['$' + e] = t), i && i.set && i.set.call(this, t);
                      }
                    },
                    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 + '"');
                    },
                  };
                function o(e) {
                  'undefined' != typeof console && console.warn && console.warn.apply(console, arguments);
                }
                function a(e, t) {
                  var i = new Error(e);
                  (i.data = t),
                    'object' == typeof console && console.error && console.error(i),
                    setTimeout(function () {
                      throw i;
                    });
                }
                var l = function () {
                  this.$defaultOptions = {};
                };
                (function () {
                  n.implement(this, s),
                    (this.defineOptions = function (e, t, i) {
                      return (
                        e.$options || (this.$defaultOptions[t] = e.$options = {}),
                        Object.keys(i).forEach(function (t) {
                          var n = i[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);
                        }),
                        n.implement(e, r),
                        this
                      );
                    }),
                    (this.resetOptions = function (e) {
                      Object.keys(e.$options).forEach(function (t) {
                        var i = e.$options[t];
                        'value' in i && e.setOption(t, i.value);
                      });
                    }),
                    (this.setDefaultValue = function (e, t, i) {
                      if (!e) {
                        for (e in this.$defaultOptions) if (this.$defaultOptions[e][t]) break;
                        if (!this.$defaultOptions[e][t]) return !1;
                      }
                      var n = this.$defaultOptions[e] || (this.$defaultOptions[e] = {});
                      n[t] && (n.forwardTo ? this.setDefaultValue(n.forwardTo, t, i) : (n[t].value = i));
                    }),
                    (this.setDefaultValues = function (e, t) {
                      Object.keys(t).forEach(function (i) {
                        this.setDefaultValue(e, i, t[i]);
                      }, this);
                    }),
                    (this.warn = o),
                    (this.reportError = a);
                }).call(l.prototype),
                  (t.AppConfig = l);
              }
            ),
            ace.define(
              'ace/config',
              [
                'require',
                'exports',
                'module',
                'ace/lib/lang',
                'ace/lib/oop',
                'ace/lib/net',
                'ace/lib/dom',
                'ace/lib/app_config',
              ],
              function (e, t, n) {
                var s = e('./lib/lang'),
                  r = (e('./lib/oop'), e('./lib/net')),
                  o = e('./lib/dom'),
                  a = e('./lib/app_config').AppConfig;
                n.exports = t = new a();
                var l = (function () {
                    return this || ('undefined' != typeof window && window);
                  })(),
                  h = {
                    packaged: !1,
                    workerPath: null,
                    modePath: null,
                    themePath: null,
                    basePath: '',
                    suffix: '.js',
                    $moduleUrls: {},
                    loadWorkerFromBlob: !0,
                    sharedPopups: !1,
                    useStrictCSP: null,
                  };
                (t.get = function (e) {
                  if (!h.hasOwnProperty(e)) throw new Error('Unknown config key: ' + e);
                  return h[e];
                }),
                  (t.set = function (e, t) {
                    if (h.hasOwnProperty(e)) h[e] = t;
                    else if (0 == this.setDefaultValue('', e, t)) throw new Error('Unknown config key: ' + e);
                    'useStrictCSP' == e && o.useStrictCSP(t);
                  }),
                  (t.all = function () {
                    return s.copyObject(h);
                  }),
                  (t.$modes = {}),
                  (t.moduleUrl = function (e, t) {
                    if (h.$moduleUrls[e]) return h.$moduleUrls[e];
                    var i = e.split('/'),
                      n = 'snippets' == (t = t || i[i.length - 2] || '') ? '/' : '-',
                      s = i[i.length - 1];
                    if ('worker' == t && '-' == n) {
                      var r = new RegExp('^' + t + '[\\-_]|[\\-_]' + t + '$', 'g');
                      s = s.replace(r, '');
                    }
                    (!s || s == t) && i.length > 1 && (s = i[i.length - 2]);
                    var o = h[t + 'Path'];
                    return (
                      null == o ? (o = h.basePath) : '/' == n && (t = n = ''),
                      o && '/' != o.slice(-1) && (o += '/'),
                      o + t + n + s + this.get('suffix')
                    );
                  }),
                  (t.setModuleUrl = function (e, t) {
                    return (h.$moduleUrls[e] = t);
                  }),
                  (t.$loading = {}),
                  (t.loadModule = function (i, n) {
                    var s, o;
                    Array.isArray(i) && ((o = i[0]), (i = i[1]));
                    try {
                      s = e(i);
                    } catch (e) {}
                    if (s && !t.$loading[i]) return n && n(s);
                    if ((t.$loading[i] || (t.$loading[i] = []), t.$loading[i].push(n), !(t.$loading[i].length > 1))) {
                      var a = function () {
                        e([i], function (e) {
                          t._emit('load.module', { name: i, module: e });
                          var n = t.$loading[i];
                          (t.$loading[i] = null),
                            n.forEach(function (t) {
                              t && t(e);
                            });
                        });
                      };
                      if (!t.get('packaged')) return a();
                      r.loadScript(t.moduleUrl(i, o), a), c();
                    }
                  });
                var c = function () {
                  h.basePath ||
                    h.workerPath ||
                    h.modePath ||
                    h.themePath ||
                    Object.keys(h.$moduleUrls).length ||
                    (console.error(
                      'Unable to infer path to ace from script src,',
                      "use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes",
                      'or with webpack use ace/webpack-resolver'
                    ),
                    (c = function () {}));
                };
                function u(s) {
                  if (l && l.document) {
                    h.packaged = s || e.packaged || n.packaged || (l.define && i.amdD.packaged);
                    for (
                      var r,
                        o = {},
                        a = '',
                        c = document.currentScript || document._currentScript,
                        u = ((c && c.ownerDocument) || document).getElementsByTagName('script'),
                        d = 0;
                      d < u.length;
                      d++
                    ) {
                      var f = u[d],
                        g = f.src || f.getAttribute('src');
                      if (g) {
                        for (var p = f.attributes, m = 0, v = p.length; m < v; m++) {
                          var w = p[m];
                          0 === w.name.indexOf('data-ace-') &&
                            (o[
                              ((r = w.name.replace(/^data-ace-/, '')),
                              r.replace(/-(.)/g, function (e, t) {
                                return t.toUpperCase();
                              }))
                            ] = w.value);
                        }
                        var b = g.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);
                        b && (a = b[1]);
                      }
                    }
                    for (var y in (a && ((o.base = o.base || a), (o.packaged = !0)),
                    (o.basePath = o.base),
                    (o.workerPath = o.workerPath || o.base),
                    (o.modePath = o.modePath || o.base),
                    (o.themePath = o.themePath || o.base),
                    delete o.base,
                    o))
                      void 0 !== o[y] && t.set(y, o[y]);
                  }
                }
                u(!0), (t.init = u), (t.version = '1.4.14');
              }
            ),
            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/mouse/touch_handler',
                'ace/config',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/event'),
                  s = e('../lib/useragent'),
                  r = e('./default_handlers').DefaultHandlers,
                  o = e('./default_gutter_handler').GutterHandler,
                  a = e('./mouse_event').MouseEvent,
                  l = e('./dragdrop_handler').DragdropHandler,
                  h = e('./touch_handler').addTouchListeners,
                  c = e('../config'),
                  u = function (e) {
                    var t = this;
                    (this.editor = e), new r(this), new o(this), new l(this);
                    var i = function (t) {
                        (!document.hasFocus ||
                          !document.hasFocus() ||
                          (!e.isFocused() && document.activeElement == (e.textInput && e.textInput.getElement()))) &&
                          window.focus(),
                          e.focus();
                      },
                      a = e.renderer.getMouseEventTarget();
                    n.addListener(a, 'click', this.onMouseEvent.bind(this, 'click'), e),
                      n.addListener(a, 'mousemove', this.onMouseMove.bind(this, 'mousemove'), e),
                      n.addMultiMouseDownListener(
                        [
                          a,
                          e.renderer.scrollBarV && e.renderer.scrollBarV.inner,
                          e.renderer.scrollBarH && e.renderer.scrollBarH.inner,
                          e.textInput && e.textInput.getElement(),
                        ].filter(Boolean),
                        [400, 300, 250],
                        this,
                        'onMouseEvent',
                        e
                      ),
                      n.addMouseWheelListener(e.container, this.onMouseWheel.bind(this, 'mousewheel'), e),
                      h(e.container, e);
                    var c = e.renderer.$gutter;
                    n.addListener(c, 'mousedown', this.onMouseEvent.bind(this, 'guttermousedown'), e),
                      n.addListener(c, 'click', this.onMouseEvent.bind(this, 'gutterclick'), e),
                      n.addListener(c, 'dblclick', this.onMouseEvent.bind(this, 'gutterdblclick'), e),
                      n.addListener(c, 'mousemove', this.onMouseEvent.bind(this, 'guttermousemove'), e),
                      n.addListener(a, 'mousedown', i, e),
                      n.addListener(c, 'mousedown', i, e),
                      s.isIE &&
                        e.renderer.scrollBarV &&
                        (n.addListener(e.renderer.scrollBarV.element, 'mousedown', i, e),
                        n.addListener(e.renderer.scrollBarH.element, 'mousedown', i, e)),
                      e.on(
                        'mousemove',
                        function (i) {
                          if (!t.state && !t.$dragDelay && t.$dragEnabled) {
                            var n = e.renderer.screenToTextCoordinates(i.x, i.y),
                              s = e.session.selection.getRange(),
                              r = e.renderer;
                            !s.isEmpty() && s.insideStart(n.row, n.column)
                              ? r.setCursorStyle('default')
                              : r.setCursorStyle('');
                          }
                        },
                        e
                      );
                  };
                (function () {
                  (this.onMouseEvent = function (e, t) {
                    this.editor.session && this.editor._emit(e, new a(t, this.editor));
                  }),
                    (this.onMouseMove = function (e, t) {
                      var i = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
                      i && i.length && this.editor._emit(e, new a(t, this.editor));
                    }),
                    (this.onMouseWheel = function (e, t) {
                      var i = new a(t, this.editor);
                      (i.speed = 2 * this.$scrollSpeed),
                        (i.wheelX = t.wheelX),
                        (i.wheelY = t.wheelY),
                        this.editor._emit(e, i);
                    }),
                    (this.setState = function (e) {
                      this.state = e;
                    }),
                    (this.captureMouse = function (e, t) {
                      (this.x = e.x), (this.y = e.y), (this.isMousePressed = !0);
                      var i = this.editor,
                        r = this.editor.renderer;
                      r.$isMousePressed = !0;
                      var o = this,
                        l = function (e) {
                          if (e) {
                            if (s.isWebKit && !e.which && o.releaseMouse) return o.releaseMouse();
                            (o.x = e.clientX),
                              (o.y = e.clientY),
                              t && t(e),
                              (o.mouseEvent = new a(e, o.editor)),
                              (o.$mouseMoved = !0);
                          }
                        },
                        h = function (e) {
                          i.off('beforeEndOperation', u),
                            clearInterval(d),
                            i.session && c(),
                            o[o.state + 'End'] && o[o.state + 'End'](e),
                            (o.state = ''),
                            (o.isMousePressed = r.$isMousePressed = !1),
                            r.$keepTextAreaAtCursor && r.$moveTextAreaToCursor(),
                            (o.$onCaptureMouseMove = o.releaseMouse = null),
                            e && o.onMouseEvent('mouseup', e),
                            i.endOperation();
                        },
                        c = function () {
                          o[o.state] && o[o.state](), (o.$mouseMoved = !1);
                        };
                      if (s.isOldIE && 'dblclick' == e.domEvent.type)
                        return setTimeout(function () {
                          h(e);
                        });
                      var u = function (e) {
                        o.releaseMouse &&
                          i.curOp.command.name &&
                          i.curOp.selectionChanged &&
                          (o[o.state + 'End'] && o[o.state + 'End'](), (o.state = ''), o.releaseMouse());
                      };
                      i.on('beforeEndOperation', u),
                        i.startOperation({ command: { name: 'mouse' } }),
                        (o.$onCaptureMouseMove = l),
                        (o.releaseMouse = n.capture(this.editor.container, l, h));
                      var d = setInterval(c, 20);
                    }),
                    (this.releaseMouse = null),
                    (this.cancelContextMenu = function () {
                      var e = function (t) {
                        (t && t.domEvent && 'contextmenu' != t.domEvent.type) ||
                          (this.editor.off('nativecontextmenu', e), t && t.domEvent && n.stopEvent(t.domEvent));
                      }.bind(this);
                      setTimeout(e, 10), this.editor.on('nativecontextmenu', e);
                    }),
                    (this.destroy = function () {
                      this.releaseMouse && this.releaseMouse();
                    });
                }).call(u.prototype),
                  c.defineOptions(u.prototype, 'mouseHandler', {
                    scrollSpeed: { initialValue: 2 },
                    dragDelay: { initialValue: s.isMac ? 150 : 0 },
                    dragEnabled: { initialValue: !0 },
                    focusTimeout: { initialValue: 0 },
                    tooltipFollowsMouse: { initialValue: !0 },
                  }),
                  (t.MouseHandler = u);
              }
            ),
            ace.define('ace/mouse/fold_handler', ['require', 'exports', 'module', 'ace/lib/dom'], function (e, t, i) {
              'use strict';
              var n = e('../lib/dom');
              t.FoldHandler = function (e) {
                e.on('click', function (t) {
                  var i = t.getDocumentPosition(),
                    s = e.session,
                    r = s.getFoldAt(i.row, i.column, 1);
                  r && (t.getAccelKey() ? s.removeFold(r) : s.expandFold(r), t.stop());
                  var o = t.domEvent && t.domEvent.target;
                  o &&
                    n.hasCssClass(o, 'ace_inline_button') &&
                    n.hasCssClass(o, 'ace_toggle_wrap') &&
                    (s.setOption('wrap', !s.getUseWrapMode()), e.renderer.scrollCursorIntoView());
                }),
                  e.on('gutterclick', function (t) {
                    if ('foldWidgets' == e.renderer.$gutterLayer.getRegion(t)) {
                      var i = t.getDocumentPosition().row,
                        n = e.session;
                      n.foldWidgets && n.foldWidgets[i] && e.session.onFoldWidgetClick(i, t),
                        e.isFocused() || e.focus(),
                        t.stop();
                    }
                  }),
                  e.on('gutterdblclick', function (t) {
                    if ('foldWidgets' == e.renderer.$gutterLayer.getRegion(t)) {
                      var i = t.getDocumentPosition().row,
                        n = e.session,
                        s = n.getParentFoldRangeData(i, !0),
                        r = s.range || s.firstRange;
                      if (r) {
                        i = r.start.row;
                        var o = n.getFoldAt(i, n.getLine(i).length, 1);
                        o
                          ? n.removeFold(o)
                          : (n.addFold('...', r), e.renderer.scrollCursorIntoView({ row: r.start.row, column: 0 }));
                      }
                      t.stop();
                    }
                  });
              };
            }),
            ace.define(
              'ace/keyboard/keybinding',
              ['require', 'exports', 'module', 'ace/lib/keys', 'ace/lib/event'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/keys'),
                  s = 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 i = this.$handlers.indexOf(e);
                        -1 != i && this.$handlers.splice(i, 1),
                          null == t ? this.$handlers.push(e) : this.$handlers.splice(t, 0, e),
                          -1 == i && 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 (i) {
                          return (i.getStatusText && i.getStatusText(t, e)) || '';
                        })
                        .filter(Boolean)
                        .join(' ');
                    }),
                    (this.$callKeyboardHandlers = function (e, t, i, n) {
                      for (
                        var r, o = !1, a = this.$editor.commands, l = this.$handlers.length;
                        l-- &&
                        !(
                          (r = this.$handlers[l].handleKeyboard(this.$data, e, t, i, n)) &&
                          r.command &&
                          ((o = 'null' == r.command || a.exec(r.command, this.$editor, r.args, n)) &&
                            n &&
                            -1 != e &&
                            1 != r.passEvent &&
                            1 != r.command.passEvent &&
                            s.stopEvent(n),
                          o)
                        );

                      );
                      return (
                        o ||
                          -1 != e ||
                          ((r = { command: 'insertstring' }), (o = a.exec('insertstring', this.$editor, t))),
                        o && this.$editor._signal && this.$editor._signal('keyboardActivity', r),
                        o
                      );
                    }),
                    (this.onCommandKey = function (e, t, i) {
                      var s = n.keyCodeToString(i);
                      return this.$callKeyboardHandlers(t, s, i, e);
                    }),
                    (this.onTextInput = function (e) {
                      return this.$callKeyboardHandlers(-1, e);
                    });
                }).call(r.prototype),
                  (t.KeyBinding = r);
              }
            ),
            ace.define('ace/lib/bidiutil', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              var n = 0,
                s = 0,
                r = !1,
                o = !1,
                a = !1,
                l = [
                  [0, 3, 0, 1, 0, 0, 0],
                  [0, 3, 0, 1, 2, 2, 0],
                  [0, 3, 0, 17, 2, 0, 1],
                  [0, 3, 5, 5, 4, 1, 0],
                  [0, 3, 21, 21, 4, 0, 1],
                  [0, 3, 5, 5, 4, 2, 0],
                ],
                h = [
                  [2, 0, 1, 1, 0, 1, 0],
                  [2, 0, 1, 1, 0, 2, 0],
                  [2, 0, 2, 1, 3, 2, 0],
                  [2, 0, 2, 33, 3, 1, 1],
                ],
                c = 11,
                u = 18,
                d = [
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  6,
                  5,
                  6,
                  8,
                  5,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  5,
                  5,
                  5,
                  6,
                  8,
                  4,
                  4,
                  c,
                  c,
                  c,
                  4,
                  4,
                  4,
                  4,
                  4,
                  10,
                  9,
                  10,
                  9,
                  9,
                  2,
                  2,
                  2,
                  2,
                  2,
                  2,
                  2,
                  2,
                  2,
                  2,
                  9,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  4,
                  4,
                  4,
                  4,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  5,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  u,
                  9,
                  4,
                  c,
                  c,
                  c,
                  c,
                  4,
                  4,
                  4,
                  4,
                  0,
                  4,
                  4,
                  u,
                  4,
                  4,
                  c,
                  c,
                  2,
                  2,
                  4,
                  0,
                  4,
                  4,
                  4,
                  2,
                  0,
                  4,
                  4,
                  4,
                  4,
                  4,
                ],
                f = [
                  8,
                  8,
                  8,
                  8,
                  8,
                  8,
                  8,
                  8,
                  8,
                  8,
                  8,
                  u,
                  u,
                  u,
                  0,
                  1,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  8,
                  5,
                  13,
                  14,
                  15,
                  16,
                  17,
                  9,
                  c,
                  c,
                  c,
                  c,
                  c,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  9,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  4,
                  8,
                ];
              function g(e, t, i) {
                if (!(s < e))
                  if (1 != e || 1 != n || o)
                    for (var r, a, l, h, c = i.length, u = 0; u < c; ) {
                      if (t[u] >= e) {
                        for (r = u + 1; r < c && t[r] >= e; ) r++;
                        for (a = u, l = r - 1; a < l; a++, l--) (h = i[a]), (i[a] = i[l]), (i[l] = h);
                        u = r;
                      }
                      u++;
                    }
                  else i.reverse();
              }
              function p(e, t, i, s) {
                var l,
                  h,
                  d,
                  f,
                  g = t[s];
                switch (g) {
                  case 0:
                  case 1:
                    r = !1;
                  case 4:
                  case 3:
                    return g;
                  case 2:
                    return r ? 3 : 2;
                  case 7:
                    return (r = !0), 1;
                  case 8:
                    return 4;
                  case 9:
                    return s < 1 ||
                      s + 1 >= t.length ||
                      (2 != (l = i[s - 1]) && 3 != l) ||
                      (2 != (h = t[s + 1]) && 3 != h)
                      ? 4
                      : (r && (h = 3), h == l ? h : 4);
                  case 10:
                    return 2 == (l = s > 0 ? i[s - 1] : 5) && s + 1 < t.length && 2 == t[s + 1] ? 2 : 4;
                  case c:
                    if (s > 0 && 2 == i[s - 1]) return 2;
                    if (r) return 4;
                    for (f = s + 1, d = t.length; f < d && t[f] == c; ) f++;
                    return f < d && 2 == t[f] ? 2 : 4;
                  case 12:
                    for (d = t.length, f = s + 1; f < d && 12 == t[f]; ) f++;
                    if (f < d) {
                      var p = e[s],
                        m = (p >= 1425 && p <= 2303) || 64286 == p;
                      if (((l = t[f]), m && (1 == l || 7 == l))) return 1;
                    }
                    return s < 1 || 5 == (l = t[s - 1]) ? 4 : i[s - 1];
                  case 5:
                    return (r = !1), (o = !0), n;
                  case 6:
                    return (a = !0), 4;
                  case 13:
                  case 14:
                  case 16:
                  case 17:
                  case 15:
                    r = !1;
                  case u:
                    return 4;
                }
              }
              function m(e) {
                var t = e.charCodeAt(0),
                  i = t >> 8;
                return 0 == i
                  ? t > 191
                    ? 0
                    : d[t]
                  : 5 == i
                  ? /[\u0591-\u05f4]/.test(e)
                    ? 1
                    : 0
                  : 6 == i
                  ? /[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)
                    ? 12
                    : /[\u0660-\u0669\u066b-\u066c]/.test(e)
                    ? 3
                    : 1642 == t
                    ? c
                    : /[\u06f0-\u06f9]/.test(e)
                    ? 2
                    : 7
                  : 32 == i && t <= 8287
                  ? f[255 & t]
                  : 254 == i && t >= 65136
                  ? 7
                  : 4;
              }
              (t.L = 0),
                (t.R = 1),
                (t.EN = 2),
                (t.ON_R = 3),
                (t.AN = 4),
                (t.R_H = 5),
                (t.B = 6),
                (t.RLE = 7),
                (t.DOT = '·'),
                (t.doBidiReorder = function (e, i, c) {
                  if (e.length < 2) return {};
                  var d = e.split(''),
                    f = new Array(d.length),
                    v = new Array(d.length),
                    w = [];
                  (n = c ? 1 : 0),
                    (function (e, t, i, c) {
                      var u = n ? h : l,
                        d = null,
                        f = null,
                        g = null,
                        v = 0,
                        w = null,
                        b = -1,
                        y = null,
                        $ = null,
                        S = [];
                      if (!c) for (y = 0, c = []; y < i; y++) c[y] = m(e[y]);
                      for (s = n, r = !1, o = !1, a = !1, $ = 0; $ < i; $++) {
                        if (
                          ((d = v),
                          (S[$] = f = p(e, c, S, $)),
                          (w = 240 & (v = u[d][f])),
                          (v &= 15),
                          (t[$] = g = u[v][5]),
                          w > 0)
                        )
                          if (16 == w) {
                            for (y = b; y < $; y++) t[y] = 1;
                            b = -1;
                          } else b = -1;
                        if (u[v][6]) -1 == b && (b = $);
                        else if (b > -1) {
                          for (y = b; y < $; y++) t[y] = g;
                          b = -1;
                        }
                        5 == c[$] && (t[$] = 0), (s |= g);
                      }
                      if (a)
                        for (y = 0; y < i; y++)
                          if (6 == c[y]) {
                            t[y] = n;
                            for (var C = y - 1; C >= 0 && 8 == c[C]; C--) t[C] = n;
                          }
                    })(d, w, d.length, i);
                  for (var b = 0; b < f.length; f[b] = b, b++);
                  for (g(2, w, f), g(1, w, f), b = 0; b < f.length - 1; b++)
                    3 === i[b]
                      ? (w[b] = t.AN)
                      : 1 === w[b] && ((i[b] > 7 && i[b] < 13) || 4 === i[b] || i[b] === u)
                      ? (w[b] = t.ON_R)
                      : b > 0 &&
                        'ل' === d[b - 1] &&
                        /\u0622|\u0623|\u0625|\u0627/.test(d[b]) &&
                        ((w[b - 1] = w[b] = t.R_H), b++);
                  for (
                    d[d.length - 1] === t.DOT && (w[d.length - 1] = t.B), '‫' === d[0] && (w[0] = t.RLE), b = 0;
                    b < f.length;
                    b++
                  )
                    v[b] = w[f[b]];
                  return { logicalFromVisual: f, bidiLevels: v };
                }),
                (t.hasBidiCharacters = function (e, t) {
                  for (var i = !1, n = 0; n < e.length; n++)
                    (t[n] = m(e.charAt(n))), i || (1 != t[n] && 7 != t[n] && 3 != t[n]) || (i = !0);
                  return i;
                }),
                (t.getVisualFromLogicalIdx = function (e, t) {
                  for (var i = 0; i < t.logicalFromVisual.length; i++) if (t.logicalFromVisual[i] == e) return i;
                  return 0;
                });
            }),
            ace.define(
              'ace/bidihandler',
              ['require', 'exports', 'module', 'ace/lib/bidiutil', 'ace/lib/lang'],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/bidiutil'),
                  s = e('./lib/lang'),
                  r = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,
                  o = function (e) {
                    (this.session = e),
                      (this.bidiMap = {}),
                      (this.currentRow = null),
                      (this.bidiUtil = n),
                      (this.charWidths = []),
                      (this.EOL = '¬'),
                      (this.showInvisibles = !0),
                      (this.isRtlDir = !1),
                      (this.$isRtl = !1),
                      (this.line = ''),
                      (this.wrapIndent = 0),
                      (this.EOF = '¶'),
                      (this.RLE = '‫'),
                      (this.contentWidth = 0),
                      (this.fontMetrics = null),
                      (this.rtlLineOffset = 0),
                      (this.wrapOffset = 0),
                      (this.isMoveLeftOperation = !1),
                      (this.seenBidi = r.test(e.getValue()));
                  };
                (function () {
                  (this.isBidiRow = function (e, t, i) {
                    return (
                      !!this.seenBidi &&
                      (e !== this.currentRow && ((this.currentRow = e), this.updateRowLine(t, i), this.updateBidiMap()),
                      this.bidiMap.bidiLevels)
                    );
                  }),
                    (this.onChange = function (e) {
                      this.seenBidi
                        ? (this.currentRow = null)
                        : 'insert' == e.action &&
                          r.test(e.lines.join('\n')) &&
                          ((this.seenBidi = !0), (this.currentRow = null));
                    }),
                    (this.getDocumentRow = function () {
                      var e = 0,
                        t = this.session.$screenRowCache;
                      if (t.length) {
                        var i = this.session.$getRowCacheIndex(t, this.currentRow);
                        i >= 0 && (e = this.session.$docRowCache[i]);
                      }
                      return e;
                    }),
                    (this.getSplitIndex = function () {
                      var e = 0,
                        t = this.session.$screenRowCache;
                      if (t.length)
                        for (
                          var i, n = this.session.$getRowCacheIndex(t, this.currentRow);
                          this.currentRow - e > 0 &&
                          (i = this.session.$getRowCacheIndex(t, this.currentRow - e - 1)) === n;

                        )
                          (n = i), e++;
                      else e = this.currentRow;
                      return e;
                    }),
                    (this.updateRowLine = function (e, t) {
                      void 0 === e && (e = this.getDocumentRow());
                      var i = e === this.session.getLength() - 1 ? this.EOF : this.EOL;
                      if (
                        ((this.wrapIndent = 0),
                        (this.line = this.session.getLine(e)),
                        (this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE),
                        this.session.$useWrapMode)
                      ) {
                        var r = this.session.$wrapData[e];
                        r &&
                          (void 0 === t && (t = this.getSplitIndex()),
                          t > 0 && r.length
                            ? ((this.wrapIndent = r.indent),
                              (this.wrapOffset = this.wrapIndent * this.charWidths[n.L]),
                              (this.line =
                                t < r.length
                                  ? this.line.substring(r[t - 1], r[t])
                                  : this.line.substring(r[r.length - 1])))
                            : (this.line = this.line.substring(0, r[t]))),
                          t == r.length && (this.line += this.showInvisibles ? i : n.DOT);
                      } else this.line += this.showInvisibles ? i : n.DOT;
                      var o,
                        a = this.session,
                        l = 0;
                      (this.line = this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g, function (e, t) {
                        return '\t' === e || a.isFullWidth(e.charCodeAt(0))
                          ? ((o = '\t' === e ? a.getScreenTabSize(t + l) : 2), (l += o - 1), s.stringRepeat(n.DOT, o))
                          : e;
                      })),
                        this.isRtlDir &&
                          ((this.fontMetrics.$main.textContent =
                            this.line.charAt(this.line.length - 1) == n.DOT
                              ? this.line.substr(0, this.line.length - 1)
                              : this.line),
                          (this.rtlLineOffset =
                            this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width));
                    }),
                    (this.updateBidiMap = function () {
                      var e = [];
                      n.hasBidiCharacters(this.line, e) || this.isRtlDir
                        ? (this.bidiMap = n.doBidiReorder(this.line, e, this.isRtlDir))
                        : (this.bidiMap = {});
                    }),
                    (this.markAsDirty = function () {
                      this.currentRow = null;
                    }),
                    (this.updateCharacterWidths = function (e) {
                      if (this.characterWidth !== e.$characterSize.width) {
                        this.fontMetrics = e;
                        var t = (this.characterWidth = e.$characterSize.width),
                          i = e.$measureCharWidth('ה');
                        (this.charWidths[n.L] = this.charWidths[n.EN] = this.charWidths[n.ON_R] = t),
                          (this.charWidths[n.R] = this.charWidths[n.AN] = i),
                          (this.charWidths[n.R_H] = 0.45 * i),
                          (this.charWidths[n.B] = this.charWidths[n.RLE] = 0),
                          (this.currentRow = null);
                      }
                    }),
                    (this.setShowInvisibles = function (e) {
                      (this.showInvisibles = e), (this.currentRow = null);
                    }),
                    (this.setEolChar = function (e) {
                      this.EOL = e;
                    }),
                    (this.setContentWidth = function (e) {
                      this.contentWidth = e;
                    }),
                    (this.isRtlLine = function (e) {
                      return (
                        !!this.$isRtl || (null != e ? this.session.getLine(e).charAt(0) == this.RLE : this.isRtlDir)
                      );
                    }),
                    (this.setRtlDirection = function (e, t) {
                      for (var i = e.getCursorPosition(), n = e.selection.getSelectionAnchor().row; n <= i.row; n++)
                        t || e.session.getLine(n).charAt(0) !== e.session.$bidiHandler.RLE
                          ? t &&
                            e.session.getLine(n).charAt(0) !== e.session.$bidiHandler.RLE &&
                            e.session.doc.insert({ column: 0, row: n }, e.session.$bidiHandler.RLE)
                          : e.session.doc.removeInLine(n, 0, 1);
                    }),
                    (this.getPosLeft = function (e) {
                      e -= this.wrapIndent;
                      var t = this.line.charAt(0) === this.RLE ? 1 : 0,
                        i = e > t ? (this.session.getOverwrite() ? e : e - 1) : t,
                        s = n.getVisualFromLogicalIdx(i, this.bidiMap),
                        r = this.bidiMap.bidiLevels,
                        o = 0;
                      !this.session.getOverwrite() && e <= t && r[s] % 2 != 0 && s++;
                      for (var a = 0; a < s; a++) o += this.charWidths[r[a]];
                      return (
                        !this.session.getOverwrite() && e > t && r[s] % 2 == 0 && (o += this.charWidths[r[s]]),
                        this.wrapIndent && (o += this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset),
                        this.isRtlDir && (o += this.rtlLineOffset),
                        o
                      );
                    }),
                    (this.getSelections = function (e, t) {
                      var i,
                        n = this.bidiMap,
                        s = n.bidiLevels,
                        r = [],
                        o = 0,
                        a = Math.min(e, t) - this.wrapIndent,
                        l = Math.max(e, t) - this.wrapIndent,
                        h = !1,
                        c = !1,
                        u = 0;
                      this.wrapIndent && (o += this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset);
                      for (var d, f = 0; f < s.length; f++)
                        (d = n.logicalFromVisual[f]),
                          (i = s[f]),
                          (h = d >= a && d < l) && !c ? (u = o) : !h && c && r.push({ left: u, width: o - u }),
                          (o += this.charWidths[i]),
                          (c = h);
                      if ((h && f === s.length && r.push({ left: u, width: o - u }), this.isRtlDir))
                        for (var g = 0; g < r.length; g++) r[g].left += this.rtlLineOffset;
                      return r;
                    }),
                    (this.offsetToCol = function (e) {
                      this.isRtlDir && (e -= this.rtlLineOffset);
                      var t = 0,
                        i = ((e = Math.max(e, 0)), 0),
                        n = 0,
                        s = this.bidiMap.bidiLevels,
                        r = this.charWidths[s[n]];
                      for (
                        this.wrapIndent && (e -= this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset);
                        e > i + r / 2;

                      ) {
                        if (((i += r), n === s.length - 1)) {
                          r = 0;
                          break;
                        }
                        r = this.charWidths[s[++n]];
                      }
                      return (
                        n > 0 && s[n - 1] % 2 != 0 && s[n] % 2 == 0
                          ? (e < i && n--, (t = this.bidiMap.logicalFromVisual[n]))
                          : n > 0 && s[n - 1] % 2 == 0 && s[n] % 2 != 0
                          ? (t =
                              1 + (e > i ? this.bidiMap.logicalFromVisual[n] : this.bidiMap.logicalFromVisual[n - 1]))
                          : (this.isRtlDir && n === s.length - 1 && 0 === r && s[n - 1] % 2 == 0) ||
                            (!this.isRtlDir && 0 === n && s[n] % 2 != 0)
                          ? (t = 1 + this.bidiMap.logicalFromVisual[n])
                          : (n > 0 && s[n - 1] % 2 != 0 && 0 !== r && n--, (t = this.bidiMap.logicalFromVisual[n])),
                        0 === t && this.isRtlDir && t++,
                        t + this.wrapIndent
                      );
                    });
                }).call(o.prototype),
                  (t.BidiHandler = o);
              }
            ),
            ace.define(
              'ace/selection',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/lang', 'ace/lib/event_emitter', 'ace/range'],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./lib/lang'),
                  r = e('./lib/event_emitter').EventEmitter,
                  o = e('./range').Range,
                  a = function (e) {
                    (this.session = e),
                      (this.doc = e.getDocument()),
                      this.clearSelection(),
                      (this.cursor = this.lead = this.doc.createAnchor(0, 0)),
                      (this.anchor = this.doc.createAnchor(0, 0)),
                      (this.$silent = !1);
                    var t = this;
                    this.cursor.on('change', function (e) {
                      (t.$cursorChanged = !0),
                        t.$silent || t._emit('changeCursor'),
                        t.$isEmpty || t.$silent || t._emit('changeSelection'),
                        t.$keepDesiredColumnOnChange || e.old.column == e.value.column || (t.$desiredColumn = null);
                    }),
                      this.anchor.on('change', function () {
                        (t.$anchorChanged = !0), t.$isEmpty || t.$silent || t._emit('changeSelection');
                      });
                  };
                (function () {
                  n.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.anchor.row != this.cursor.row;
                    }),
                    (this.getCursor = function () {
                      return this.lead.getPosition();
                    }),
                    (this.setSelectionAnchor = function (e, t) {
                      (this.$isEmpty = !1), this.anchor.setPosition(e, t);
                    }),
                    (this.getAnchor = this.getSelectionAnchor =
                      function () {
                        return this.$isEmpty ? this.getSelectionLead() : this.anchor.getPosition();
                      }),
                    (this.getSelectionLead = function () {
                      return this.lead.getPosition();
                    }),
                    (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
                        ? o.fromPoints(t, t)
                        : this.isBackwards()
                        ? o.fromPoints(t, e)
                        : o.fromPoints(e, t);
                    }),
                    (this.clearSelection = function () {
                      this.$isEmpty || ((this.$isEmpty = !0), this._emit('changeSelection'));
                    }),
                    (this.selectAll = function () {
                      this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE);
                    }),
                    (this.setRange = this.setSelectionRange =
                      function (e, t) {
                        var i = t ? e.end : e.start,
                          n = t ? e.start : e.end;
                        this.$setSelection(i.row, i.column, n.row, n.column);
                      }),
                    (this.$setSelection = function (e, t, i, n) {
                      if (!this.$silent) {
                        var s = this.$isEmpty,
                          r = this.inMultiSelectMode;
                        (this.$silent = !0),
                          (this.$cursorChanged = this.$anchorChanged = !1),
                          this.anchor.setPosition(e, t),
                          this.cursor.setPosition(i, n),
                          (this.$isEmpty = !o.comparePoints(this.anchor, this.cursor)),
                          (this.$silent = !1),
                          this.$cursorChanged && this._emit('changeCursor'),
                          (this.$cursorChanged || this.$anchorChanged || s != this.$isEmpty || r) &&
                            this._emit('changeSelection');
                      }
                    }),
                    (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 (void 0 === t) {
                        var i = e || this.lead;
                        (e = i.row), (t = i.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 i,
                        n = 'number' == typeof e ? e : this.lead.row,
                        s = this.session.getFoldLine(n);
                      return (
                        s ? ((n = s.start.row), (i = s.end.row)) : (i = n),
                        !0 === t ? new o(n, 0, i, this.session.getLine(i).length) : new o(n, 0, i + 1, 0)
                      );
                    }),
                    (this.selectLine = function () {
                      this.setSelectionRange(this.getLineRange());
                    }),
                    (this.moveCursorUp = function () {
                      this.moveCursorBy(-1, 0);
                    }),
                    (this.moveCursorDown = function () {
                      this.moveCursorBy(1, 0);
                    }),
                    (this.wouldMoveIntoSoftTab = function (e, t, i) {
                      var n = e.column,
                        s = e.column + t;
                      return (
                        i < 0 && ((n = e.column - t), (s = e.column)),
                        this.session.isTabStop(e) && this.doc.getLine(e.row).slice(n, s).split(' ').length - 1 == t
                      );
                    }),
                    (this.moveCursorLeft = function () {
                      var e,
                        t = this.lead.getPosition();
                      if ((e = this.session.getFoldAt(t.row, t.column, -1)))
                        this.moveCursorTo(e.start.row, e.start.column);
                      else if (0 === t.column)
                        t.row > 0 && this.moveCursorTo(t.row - 1, this.doc.getLine(t.row - 1).length);
                      else {
                        var i = this.session.getTabSize();
                        this.wouldMoveIntoSoftTab(t, i, -1) && !this.session.getNavigateWithinSoftTabs()
                          ? this.moveCursorBy(0, -i)
                          : this.moveCursorBy(0, -1);
                      }
                    }),
                    (this.moveCursorRight = function () {
                      var e,
                        t = this.lead.getPosition();
                      if ((e = this.session.getFoldAt(t.row, t.column, 1))) this.moveCursorTo(e.end.row, e.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 i = this.session.getTabSize();
                        (t = this.lead),
                          this.wouldMoveIntoSoftTab(t, i, 1) && !this.session.getNavigateWithinSoftTabs()
                            ? this.moveCursorBy(0, i)
                            : this.moveCursorBy(0, 1);
                      }
                    }),
                    (this.moveCursorLineStart = function () {
                      var e = this.lead.row,
                        t = this.lead.column,
                        i = this.session.documentToScreenRow(e, t),
                        n = this.session.screenToDocumentPosition(i, 0),
                        s = this.session.getDisplayLine(e, null, n.row, n.column).match(/^\s*/);
                      s[0].length == t || this.session.$useEmacsStyleLineStart || (n.column += s[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 i = this.session.getLine(t.row);
                        if (t.column == i.length) {
                          var n = i.search(/\s+$/);
                          n > 0 && (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,
                        i = this.doc.getLine(e),
                        n = i.substring(t);
                      (this.session.nonTokenRe.lastIndex = 0), (this.session.tokenRe.lastIndex = 0);
                      var s = this.session.getFoldAt(e, t, 1);
                      if (s) this.moveCursorTo(s.end.row, s.end.column);
                      else {
                        if (
                          (this.session.nonTokenRe.exec(n) &&
                            ((t += this.session.nonTokenRe.lastIndex),
                            (this.session.nonTokenRe.lastIndex = 0),
                            (n = i.substring(t))),
                          t >= i.length)
                        )
                          return (
                            this.moveCursorTo(e, i.length),
                            this.moveCursorRight(),
                            void (e < this.doc.getLength() - 1 && this.moveCursorWordRight())
                          );
                        this.session.tokenRe.exec(n) &&
                          ((t += this.session.tokenRe.lastIndex), (this.session.tokenRe.lastIndex = 0)),
                          this.moveCursorTo(e, t);
                      }
                    }),
                    (this.moveCursorLongWordLeft = function () {
                      var e,
                        t = this.lead.row,
                        i = this.lead.column;
                      if ((e = this.session.getFoldAt(t, i, -1))) this.moveCursorTo(e.start.row, e.start.column);
                      else {
                        var n = this.session.getFoldStringAt(t, i, -1);
                        null == n && (n = this.doc.getLine(t).substring(0, i));
                        var r = s.stringReverse(n);
                        if (
                          ((this.session.nonTokenRe.lastIndex = 0),
                          (this.session.tokenRe.lastIndex = 0),
                          this.session.nonTokenRe.exec(r) &&
                            ((i -= this.session.nonTokenRe.lastIndex),
                            (r = r.slice(this.session.nonTokenRe.lastIndex)),
                            (this.session.nonTokenRe.lastIndex = 0)),
                          i <= 0)
                        )
                          return (
                            this.moveCursorTo(t, 0), this.moveCursorLeft(), void (t > 0 && this.moveCursorWordLeft())
                          );
                        this.session.tokenRe.exec(r) &&
                          ((i -= this.session.tokenRe.lastIndex), (this.session.tokenRe.lastIndex = 0)),
                          this.moveCursorTo(t, i);
                      }
                    }),
                    (this.$shortWordEndIndex = function (e) {
                      var t,
                        i = 0,
                        n = /\s/,
                        s = this.session.tokenRe;
                      if (((s.lastIndex = 0), this.session.tokenRe.exec(e))) i = this.session.tokenRe.lastIndex;
                      else {
                        for (; (t = e[i]) && n.test(t); ) i++;
                        if (i < 1)
                          for (s.lastIndex = 0; (t = e[i]) && !s.test(t); )
                            if (((s.lastIndex = 0), i++, n.test(t))) {
                              if (i > 2) {
                                i--;
                                break;
                              }
                              for (; (t = e[i]) && n.test(t); ) i++;
                              if (i > 2) break;
                            }
                      }
                      return (s.lastIndex = 0), i;
                    }),
                    (this.moveCursorShortWordRight = function () {
                      var e = this.lead.row,
                        t = this.lead.column,
                        i = this.doc.getLine(e),
                        n = i.substring(t),
                        s = this.session.getFoldAt(e, t, 1);
                      if (s) return this.moveCursorTo(s.end.row, s.end.column);
                      if (t == i.length) {
                        var r = this.doc.getLength();
                        do {
                          e++, (n = this.doc.getLine(e));
                        } while (e < r && /^\s*$/.test(n));
                        /^\s+/.test(n) || (n = ''), (t = 0);
                      }
                      var o = this.$shortWordEndIndex(n);
                      this.moveCursorTo(e, t + o);
                    }),
                    (this.moveCursorShortWordLeft = function () {
                      var e,
                        t = this.lead.row,
                        i = this.lead.column;
                      if ((e = this.session.getFoldAt(t, i, -1))) return this.moveCursorTo(e.start.row, e.start.column);
                      var n = this.session.getLine(t).substring(0, i);
                      if (0 === i) {
                        do {
                          t--, (n = this.doc.getLine(t));
                        } while (t > 0 && /^\s*$/.test(n));
                        (i = n.length), /\s+$/.test(n) || (n = '');
                      }
                      var r = s.stringReverse(n),
                        o = this.$shortWordEndIndex(r);
                      return this.moveCursorTo(t, i - o);
                    }),
                    (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 i,
                        n = this.session.documentToScreenPosition(this.lead.row, this.lead.column);
                      if (
                        (0 === t &&
                          (0 !== e &&
                            (this.session.$bidiHandler.isBidiRow(n.row, this.lead.row)
                              ? ((i = this.session.$bidiHandler.getPosLeft(n.column)),
                                (n.column = Math.round(i / this.session.$bidiHandler.charWidths[0])))
                              : (i = n.column * this.session.$bidiHandler.charWidths[0])),
                          this.$desiredColumn ? (n.column = this.$desiredColumn) : (this.$desiredColumn = n.column)),
                        0 != e && this.session.lineWidgets && this.session.lineWidgets[this.lead.row])
                      ) {
                        var s = this.session.lineWidgets[this.lead.row];
                        e < 0 ? (e -= s.rowsAbove || 0) : e > 0 && (e += s.rowCount - (s.rowsAbove || 0));
                      }
                      var r = this.session.screenToDocumentPosition(n.row + e, n.column, i);
                      0 !== e && 0 === t && r.row === this.lead.row && (r.column, this.lead.column),
                        this.moveCursorTo(r.row, r.column + t, 0 === t);
                    }),
                    (this.moveCursorToPosition = function (e) {
                      this.moveCursorTo(e.row, e.column);
                    }),
                    (this.moveCursorTo = function (e, t, i) {
                      var n = this.session.getFoldAt(e, t, 1);
                      n && ((e = n.start.row), (t = n.start.column)), (this.$keepDesiredColumnOnChange = !0);
                      var s = this.session.getLine(e);
                      /[\uDC00-\uDFFF]/.test(s.charAt(t)) &&
                        s.charAt(t - 1) &&
                        (this.lead.row == e && this.lead.column == t + 1 ? (t -= 1) : (t += 1)),
                        this.lead.setPosition(e, t),
                        (this.$keepDesiredColumnOnChange = !1),
                        i || (this.$desiredColumn = null);
                    }),
                    (this.moveCursorToScreen = function (e, t, i) {
                      var n = this.session.screenToDocumentPosition(e, t);
                      this.moveCursorTo(n.row, n.column, i);
                    }),
                    (this.detach = function () {
                      this.lead.detach(), this.anchor.detach();
                    }),
                    (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 i = this.getCursor();
                        return o.fromPoints(t, i);
                      } catch (e) {
                        return o.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 (e = this.getRange()).isBackwards = this.isBackwards();
                      return e;
                    }),
                    (this.fromJSON = function (e) {
                      if (null == e.start) {
                        if (this.rangeList && e.length > 1) {
                          this.toSingleRange(e[0]);
                          for (var t = e.length; t--; ) {
                            var i = o.fromPoints(e[t].start, e[t].end);
                            e[t].isBackwards && (i.cursor = i.start), this.addRange(i, !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(a.prototype),
                  (t.Selection = a);
              }
            ),
            ace.define('ace/tokenizer', ['require', 'exports', 'module', 'ace/config'], function (e, t, i) {
              'use strict';
              var n = e('./config'),
                s = 2e3,
                r = function (e) {
                  for (var t in ((this.states = e), (this.regExps = {}), (this.matchMappings = {}), this.states)) {
                    for (
                      var i = this.states[t],
                        n = [],
                        s = 0,
                        r = (this.matchMappings[t] = { defaultToken: 'text' }),
                        o = 'g',
                        a = [],
                        l = 0;
                      l < i.length;
                      l++
                    ) {
                      var h = i[l];
                      if (
                        (h.defaultToken && (r.defaultToken = h.defaultToken),
                        h.caseInsensitive && (o = 'gi'),
                        null != h.regex)
                      ) {
                        h.regex instanceof RegExp && (h.regex = h.regex.toString().slice(1, -1));
                        var c = h.regex,
                          u = new RegExp('(?:(' + c + ')|(.))').exec('a').length - 2;
                        Array.isArray(h.token)
                          ? 1 == h.token.length || 1 == u
                            ? (h.token = h.token[0])
                            : u - 1 != h.token.length
                            ? (this.reportError("number of classes and regexp groups doesn't match", {
                                rule: h,
                                groupCount: u - 1,
                              }),
                              (h.token = h.token[0]))
                            : ((h.tokenArray = h.token), (h.token = null), (h.onMatch = this.$arrayTokens))
                          : 'function' != typeof h.token ||
                            h.onMatch ||
                            (h.onMatch = u > 1 ? this.$applyToken : h.token),
                          u > 1 &&
                            (/\\\d/.test(h.regex)
                              ? (c = h.regex.replace(/\\([0-9]+)/g, function (e, t) {
                                  return '\\' + (parseInt(t, 10) + s + 1);
                                }))
                              : ((u = 1), (c = this.removeCapturingGroups(h.regex))),
                            h.splitRegex || 'string' == typeof h.token || a.push(h)),
                          (r[s] = l),
                          (s += u),
                          n.push(c),
                          h.onMatch || (h.onMatch = null);
                      }
                    }
                    n.length || ((r[0] = 0), n.push('$')),
                      a.forEach(function (e) {
                        e.splitRegex = this.createSplitterRegexp(e.regex, o);
                      }, this),
                      (this.regExps[t] = new RegExp('(' + n.join(')|(') + ')|($)', o));
                  }
                };
              (function () {
                (this.$setMaxTokenCount = function (e) {
                  s = 0 | e;
                }),
                  (this.$applyToken = function (e) {
                    var t = this.splitRegex.exec(e).slice(1),
                      i = this.token.apply(this, t);
                    if ('string' == typeof i) return [{ type: i, value: e }];
                    for (var n = [], s = 0, r = i.length; s < r; s++)
                      t[s] && (n[n.length] = { type: i[s], value: t[s] });
                    return n;
                  }),
                  (this.$arrayTokens = function (e) {
                    if (!e) return [];
                    var t = this.splitRegex.exec(e);
                    if (!t) return 'text';
                    for (var i = [], n = this.tokenArray, s = 0, r = n.length; s < r; s++)
                      t[s + 1] && (i[i.length] = { type: n[s], value: t[s + 1] });
                    return i;
                  }),
                  (this.removeCapturingGroups = function (e) {
                    return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g, function (e, t) {
                      return t ? '(?:' : e;
                    });
                  }),
                  (this.createSplitterRegexp = function (e, t) {
                    if (-1 != e.indexOf('(?=')) {
                      var i = 0,
                        n = !1,
                        s = {};
                      e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function (e, t, r, o, a, l) {
                        return (
                          n
                            ? (n = ']' != a)
                            : a
                            ? (n = !0)
                            : o
                            ? (i == s.stack && ((s.end = l + 1), (s.stack = -1)), i--)
                            : r && (i++, 1 != r.length && ((s.stack = i), (s.start = l))),
                          e
                        );
                      }),
                        null != s.end &&
                          /^\)*$/.test(e.substr(s.end)) &&
                          (e = e.substring(0, s.start) + e.substr(s.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 i = t.slice(0);
                      '#tmp' === (t = i[0]) && (i.shift(), (t = i.shift()));
                    } else i = [];
                    var n = t || 'start',
                      r = this.states[n];
                    r || ((n = 'start'), (r = this.states[n]));
                    var o = this.matchMappings[n],
                      a = this.regExps[n];
                    a.lastIndex = 0;
                    for (var l, h = [], c = 0, u = 0, d = { type: null, value: '' }; (l = a.exec(e)); ) {
                      var f = o.defaultToken,
                        g = null,
                        p = l[0],
                        m = a.lastIndex;
                      if (m - p.length > c) {
                        var v = e.substring(c, m - p.length);
                        d.type == f ? (d.value += v) : (d.type && h.push(d), (d = { type: f, value: v }));
                      }
                      for (var w = 0; w < l.length - 2; w++)
                        if (void 0 !== l[w + 1]) {
                          (f = (g = r[o[w]]).onMatch ? g.onMatch(p, n, i, e) : g.token),
                            g.next &&
                              ((n = 'string' == typeof g.next ? g.next : g.next(n, i)),
                              (r = this.states[n]) ||
                                (this.reportError("state doesn't exist", n), (n = 'start'), (r = this.states[n])),
                              (o = this.matchMappings[n]),
                              (c = m),
                              ((a = this.regExps[n]).lastIndex = m)),
                            g.consumeLineEnd && (c = m);
                          break;
                        }
                      if (p)
                        if ('string' == typeof f)
                          (g && !1 === g.merge) || d.type !== f
                            ? (d.type && h.push(d), (d = { type: f, value: p }))
                            : (d.value += p);
                        else if (f)
                          for (d.type && h.push(d), d = { type: null, value: '' }, w = 0; w < f.length; w++)
                            h.push(f[w]);
                      if (c == e.length) break;
                      if (((c = m), u++ > s)) {
                        for (
                          u > 2 * e.length &&
                          this.reportError('infinite loop with in ace tokenizer', { startState: t, line: e });
                          c < e.length;

                        )
                          d.type && h.push(d), (d = { value: e.substring(c, (c += 500)), type: 'overflow' });
                        (n = 'start'), (i = []);
                        break;
                      }
                    }
                    return (
                      d.type && h.push(d),
                      i.length > 1 && i[0] !== n && i.unshift('#tmp', n),
                      { tokens: h, state: i.length ? i : n }
                    );
                  }),
                  (this.reportError = n.reportError);
              }).call(r.prototype),
                (t.Tokenizer = r);
            }),
            ace.define(
              'ace/mode/text_highlight_rules',
              ['require', 'exports', 'module', 'ace/lib/lang'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/lang'),
                  s = function () {
                    this.$rules = { start: [{ token: 'empty_line', regex: '^$' }, { defaultToken: 'text' }] };
                  };
                (function () {
                  (this.addRules = function (e, t) {
                    if (t)
                      for (var i in e) {
                        for (var n = e[i], s = 0; s < n.length; s++) {
                          var r = n[s];
                          (r.next || r.onMatch) &&
                            ('string' == typeof r.next && 0 !== r.next.indexOf(t) && (r.next = t + r.next),
                            r.nextState && 0 !== r.nextState.indexOf(t) && (r.nextState = t + r.nextState));
                        }
                        this.$rules[t + i] = n;
                      }
                    else for (var i in e) this.$rules[i] = e[i];
                  }),
                    (this.getRules = function () {
                      return this.$rules;
                    }),
                    (this.embedRules = function (e, t, i, s, r) {
                      var o = 'function' == typeof e ? new e().getRules() : e;
                      if (s) for (var a = 0; a < s.length; a++) s[a] = t + s[a];
                      else for (var l in ((s = []), o)) s.push(t + l);
                      if ((this.addRules(o, t), i)) {
                        var h = Array.prototype[r ? 'push' : 'unshift'];
                        for (a = 0; a < s.length; a++) h.apply(this.$rules[s[a]], n.deepCopy(i));
                      }
                      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 () {
                    var i = 0,
                      n = this.$rules;
                    Object.keys(n).forEach(function s(r) {
                      var o = n[r];
                      o.processed = !0;
                      for (var a = 0; a < o.length; a++) {
                        var l = o[a],
                          h = null;
                        Array.isArray(l) && ((h = l), (l = {})),
                          !l.regex &&
                            l.start &&
                            ((l.regex = l.start),
                            l.next || (l.next = []),
                            l.next.push(
                              { defaultToken: l.token },
                              { token: l.token + '.end', regex: l.end || l.start, next: 'pop' }
                            ),
                            (l.token = l.token + '.start'),
                            (l.push = !0));
                        var c = l.next || l.push;
                        if (c && Array.isArray(c)) {
                          var u = l.stateName;
                          u || ('string' != typeof (u = l.token) && (u = u[0] || ''), n[u] && (u += i++)),
                            (n[u] = c),
                            (l.next = u),
                            s(u);
                        } else 'pop' == c && (l.next = t);
                        if ((l.push && ((l.nextState = l.next || l.push), (l.next = e), delete l.push), l.rules))
                          for (var d in l.rules)
                            n[d] ? n[d].push && n[d].push.apply(n[d], l.rules[d]) : (n[d] = l.rules[d]);
                        var f = 'string' == typeof l ? l : l.include;
                        if (
                          (f &&
                            (h = Array.isArray(f)
                              ? f.map(function (e) {
                                  return n[e];
                                })
                              : n[f]),
                          h)
                        ) {
                          var g = [a, 1].concat(h);
                          l.noEscape &&
                            (g = g.filter(function (e) {
                              return !e.next;
                            })),
                            o.splice.apply(o, g),
                            a--;
                        }
                        l.keywordMap &&
                          ((l.token = this.createKeywordMapper(
                            l.keywordMap,
                            l.defaultToken || 'text',
                            l.caseInsensitive
                          )),
                          delete l.defaultToken);
                      }
                    }, this);
                  }),
                    (this.createKeywordMapper = function (e, t, i, n) {
                      var s = Object.create(null);
                      return (
                        (this.$keywordList = []),
                        Object.keys(e).forEach(function (t) {
                          for (var r = e[t].split(n || '|'), o = r.length; o--; ) {
                            var a = r[o];
                            this.$keywordList.push(a), i && (a = a.toLowerCase()), (s[a] = t);
                          }
                        }, this),
                        (e = null),
                        i
                          ? function (e) {
                              return s[e.toLowerCase()] || t;
                            }
                          : function (e) {
                              return s[e] || t;
                            }
                      );
                    }),
                    (this.getKeywords = function () {
                      return this.$keywords;
                    });
                }).call(s.prototype),
                  (t.TextHighlightRules = s);
              }
            ),
            ace.define('ace/mode/behaviour', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              var n = function () {
                this.$behaviours = {};
              };
              (function () {
                (this.add = function (e, t, i) {
                  switch (void 0) {
                    case this.$behaviours:
                      this.$behaviours = {};
                    case this.$behaviours[e]:
                      this.$behaviours[e] = {};
                  }
                  this.$behaviours[e][t] = i;
                }),
                  (this.addBehaviours = function (e) {
                    for (var t in e) for (var i in e[t]) this.add(t, i, e[t][i]);
                  }),
                  (this.remove = function (e) {
                    this.$behaviours && this.$behaviours[e] && delete this.$behaviours[e];
                  }),
                  (this.inherit = function (e, t) {
                    if ('function' == typeof e) var i = new e().getBehaviours(t);
                    else i = e.getBehaviours(t);
                    this.addBehaviours(i);
                  }),
                  (this.getBehaviours = function (e) {
                    if (e) {
                      for (var t = {}, i = 0; i < e.length; i++)
                        this.$behaviours[e[i]] && (t[e[i]] = this.$behaviours[e[i]]);
                      return t;
                    }
                    return this.$behaviours;
                  });
              }).call(n.prototype),
                (t.Behaviour = n);
            }),
            ace.define('ace/token_iterator', ['require', 'exports', 'module', 'ace/range'], function (e, t, i) {
              'use strict';
              var n = e('./range').Range,
                s = function (e, t, i) {
                  (this.$session = e), (this.$row = t), (this.$rowTokens = e.getTokens(t));
                  var n = e.getTokenAt(t, i);
                  this.$tokenIndex = n ? n.index : -1;
                };
              (function () {
                (this.stepBackward = function () {
                  for (this.$tokenIndex -= 1; this.$tokenIndex < 0; ) {
                    if (((this.$row -= 1), this.$row < 0)) 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 () {
                    var e;
                    for (this.$tokenIndex += 1; 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,
                      i = e[t].start;
                    if (void 0 !== i) return i;
                    for (i = 0; t > 0; ) i += e[(t -= 1)].value.length;
                    return i;
                  }),
                  (this.getCurrentTokenPosition = function () {
                    return { row: this.$row, column: this.getCurrentTokenColumn() };
                  }),
                  (this.getCurrentTokenRange = function () {
                    var e = this.$rowTokens[this.$tokenIndex],
                      t = this.getCurrentTokenColumn();
                    return new n(this.$row, t, this.$row, t + e.value.length);
                  });
              }).call(s.prototype),
                (t.TokenIterator = s);
            }),
            ace.define(
              'ace/mode/behaviour/cstyle',
              [
                'require',
                'exports',
                'module',
                'ace/lib/oop',
                'ace/mode/behaviour',
                'ace/token_iterator',
                'ace/lib/lang',
              ],
              function (e, t, i) {
                'use strict';
                var n,
                  s = e('../../lib/oop'),
                  r = e('../behaviour').Behaviour,
                  o = e('../../token_iterator').TokenIterator,
                  a = e('../../lib/lang'),
                  l = ['text', 'paren.rparen', 'rparen', 'paren', 'punctuation.operator'],
                  h = ['text', 'paren.rparen', 'rparen', 'paren', 'punctuation.operator', 'comment'],
                  c = {},
                  u = { '"': '"', "'": "'" },
                  d = function (e) {
                    var t = -1;
                    if (
                      (e.multiSelect &&
                        ((t = e.selection.index),
                        c.rangeCount != e.multiSelect.rangeCount && (c = { rangeCount: e.multiSelect.rangeCount })),
                      c[t])
                    )
                      return (n = c[t]);
                    n = c[t] = {
                      autoInsertedBrackets: 0,
                      autoInsertedRow: -1,
                      autoInsertedLineEnd: '',
                      maybeInsertedBrackets: 0,
                      maybeInsertedRow: -1,
                      maybeInsertedLineStart: '',
                      maybeInsertedLineEnd: '',
                    };
                  },
                  f = function (e, t, i, n) {
                    var s = e.end.row - e.start.row;
                    return { text: i + t + n, selection: [0, e.start.column + 1, s, e.end.column + (s ? 0 : 1)] };
                  },
                  g = function (e) {
                    this.add('braces', 'insertion', function (t, i, s, r, o) {
                      var l = s.getCursorPosition(),
                        h = r.doc.getLine(l.row);
                      if ('{' == o) {
                        d(s);
                        var c = s.getSelectionRange(),
                          u = r.doc.getTextRange(c);
                        if ('' !== u && '{' !== u && s.getWrapBehavioursEnabled()) return f(c, u, '{', '}');
                        if (g.isSaneInsertion(s, r))
                          return /[\]\}\)]/.test(h[l.column]) || s.inMultiSelectMode || (e && e.braces)
                            ? (g.recordAutoInsert(s, r, '}'), { text: '{}', selection: [1, 1] })
                            : (g.recordMaybeInsert(s, r, '{'), { text: '{', selection: [1, 1] });
                      } else if ('}' == o) {
                        if (
                          (d(s),
                          '}' == h.substring(l.column, l.column + 1) &&
                            null !== r.$findOpeningBracket('}', { column: l.column + 1, row: l.row }) &&
                            g.isAutoInsertedClosing(l, h, o))
                        )
                          return g.popAutoInsertedClosing(), { text: '', selection: [1, 1] };
                      } else {
                        if ('\n' == o || '\r\n' == o) {
                          d(s);
                          var p = '';
                          if (
                            (g.isMaybeInsertedClosing(l, h) &&
                              ((p = a.stringRepeat('}', n.maybeInsertedBrackets)), g.clearMaybeInsertedClosing()),
                            '}' === h.substring(l.column, l.column + 1))
                          ) {
                            var m = r.findMatchingBracket({ row: l.row, column: l.column + 1 }, '}');
                            if (!m) return null;
                            var v = this.$getIndent(r.getLine(m.row));
                          } else {
                            if (!p) return void g.clearMaybeInsertedClosing();
                            v = this.$getIndent(h);
                          }
                          var w = v + r.getTabString();
                          return { text: '\n' + w + '\n' + v + p, selection: [1, w.length, 1, w.length] };
                        }
                        g.clearMaybeInsertedClosing();
                      }
                    }),
                      this.add('braces', 'deletion', function (e, t, i, s, r) {
                        var o = s.doc.getTextRange(r);
                        if (!r.isMultiLine() && '{' == o) {
                          if ((d(i), '}' == s.doc.getLine(r.start.row).substring(r.end.column, r.end.column + 1)))
                            return r.end.column++, r;
                          n.maybeInsertedBrackets--;
                        }
                      }),
                      this.add('parens', 'insertion', function (e, t, i, n, s) {
                        if ('(' == s) {
                          d(i);
                          var r = i.getSelectionRange(),
                            o = n.doc.getTextRange(r);
                          if ('' !== o && i.getWrapBehavioursEnabled()) return f(r, o, '(', ')');
                          if (g.isSaneInsertion(i, n))
                            return g.recordAutoInsert(i, n, ')'), { text: '()', selection: [1, 1] };
                        } else if (')' == s) {
                          d(i);
                          var a = i.getCursorPosition(),
                            l = n.doc.getLine(a.row);
                          if (
                            ')' == l.substring(a.column, a.column + 1) &&
                            null !== n.$findOpeningBracket(')', { column: a.column + 1, row: a.row }) &&
                            g.isAutoInsertedClosing(a, l, s)
                          )
                            return g.popAutoInsertedClosing(), { text: '', selection: [1, 1] };
                        }
                      }),
                      this.add('parens', 'deletion', function (e, t, i, n, s) {
                        var r = n.doc.getTextRange(s);
                        if (
                          !s.isMultiLine() &&
                          '(' == r &&
                          (d(i), ')' == n.doc.getLine(s.start.row).substring(s.start.column + 1, s.start.column + 2))
                        )
                          return s.end.column++, s;
                      }),
                      this.add('brackets', 'insertion', function (e, t, i, n, s) {
                        if ('[' == s) {
                          d(i);
                          var r = i.getSelectionRange(),
                            o = n.doc.getTextRange(r);
                          if ('' !== o && i.getWrapBehavioursEnabled()) return f(r, o, '[', ']');
                          if (g.isSaneInsertion(i, n))
                            return g.recordAutoInsert(i, n, ']'), { text: '[]', selection: [1, 1] };
                        } else if (']' == s) {
                          d(i);
                          var a = i.getCursorPosition(),
                            l = n.doc.getLine(a.row);
                          if (
                            ']' == l.substring(a.column, a.column + 1) &&
                            null !== n.$findOpeningBracket(']', { column: a.column + 1, row: a.row }) &&
                            g.isAutoInsertedClosing(a, l, s)
                          )
                            return g.popAutoInsertedClosing(), { text: '', selection: [1, 1] };
                        }
                      }),
                      this.add('brackets', 'deletion', function (e, t, i, n, s) {
                        var r = n.doc.getTextRange(s);
                        if (
                          !s.isMultiLine() &&
                          '[' == r &&
                          (d(i), ']' == n.doc.getLine(s.start.row).substring(s.start.column + 1, s.start.column + 2))
                        )
                          return s.end.column++, s;
                      }),
                      this.add('string_dquotes', 'insertion', function (e, t, i, n, s) {
                        var r = n.$mode.$quotes || u;
                        if (1 == s.length && r[s]) {
                          if (this.lineCommentStart && -1 != this.lineCommentStart.indexOf(s)) return;
                          d(i);
                          var o = s,
                            a = i.getSelectionRange(),
                            l = n.doc.getTextRange(a);
                          if (!('' === l || (1 == l.length && r[l])) && i.getWrapBehavioursEnabled())
                            return f(a, l, o, o);
                          if (!l) {
                            var h = i.getCursorPosition(),
                              c = n.doc.getLine(h.row),
                              g = c.substring(h.column - 1, h.column),
                              p = c.substring(h.column, h.column + 1),
                              m = n.getTokenAt(h.row, h.column),
                              v = n.getTokenAt(h.row, h.column + 1);
                            if ('\\' == g && m && /escape/.test(m.type)) return null;
                            var w,
                              b = m && /string|escape/.test(m.type),
                              y = !v || /string|escape/.test(v.type);
                            if (p == o) (w = b !== y) && /string\.end/.test(v.type) && (w = !1);
                            else {
                              if (b && !y) return null;
                              if (b && y) return null;
                              var $ = n.$mode.tokenRe;
                              $.lastIndex = 0;
                              var S = $.test(g);
                              $.lastIndex = 0;
                              var C = $.test(g);
                              if (S || C) return null;
                              if (p && !/[\s;,.})\]\\]/.test(p)) return null;
                              var x = c[h.column - 2];
                              if (g == o && (x == o || $.test(x))) return null;
                              w = !0;
                            }
                            return { text: w ? o + o : '', selection: [1, 1] };
                          }
                        }
                      }),
                      this.add('string_dquotes', 'deletion', function (e, t, i, n, s) {
                        var r = n.$mode.$quotes || u,
                          o = n.doc.getTextRange(s);
                        if (
                          !s.isMultiLine() &&
                          r.hasOwnProperty(o) &&
                          (d(i), n.doc.getLine(s.start.row).substring(s.start.column + 1, s.start.column + 2) == o)
                        )
                          return s.end.column++, s;
                      });
                  };
                (g.isSaneInsertion = function (e, t) {
                  var i = e.getCursorPosition(),
                    n = new o(t, i.row, i.column);
                  if (!this.$matchTokenType(n.getCurrentToken() || 'text', l)) {
                    if (/[)}\]]/.test(e.session.getLine(i.row)[i.column])) return !0;
                    var s = new o(t, i.row, i.column + 1);
                    if (!this.$matchTokenType(s.getCurrentToken() || 'text', l)) return !1;
                  }
                  return (
                    n.stepForward(),
                    n.getCurrentTokenRow() !== i.row || this.$matchTokenType(n.getCurrentToken() || 'text', h)
                  );
                }),
                  (g.$matchTokenType = function (e, t) {
                    return t.indexOf(e.type || e) > -1;
                  }),
                  (g.recordAutoInsert = function (e, t, i) {
                    var s = e.getCursorPosition(),
                      r = t.doc.getLine(s.row);
                    this.isAutoInsertedClosing(s, r, n.autoInsertedLineEnd[0]) || (n.autoInsertedBrackets = 0),
                      (n.autoInsertedRow = s.row),
                      (n.autoInsertedLineEnd = i + r.substr(s.column)),
                      n.autoInsertedBrackets++;
                  }),
                  (g.recordMaybeInsert = function (e, t, i) {
                    var s = e.getCursorPosition(),
                      r = t.doc.getLine(s.row);
                    this.isMaybeInsertedClosing(s, r) || (n.maybeInsertedBrackets = 0),
                      (n.maybeInsertedRow = s.row),
                      (n.maybeInsertedLineStart = r.substr(0, s.column) + i),
                      (n.maybeInsertedLineEnd = r.substr(s.column)),
                      n.maybeInsertedBrackets++;
                  }),
                  (g.isAutoInsertedClosing = function (e, t, i) {
                    return (
                      n.autoInsertedBrackets > 0 &&
                      e.row === n.autoInsertedRow &&
                      i === n.autoInsertedLineEnd[0] &&
                      t.substr(e.column) === n.autoInsertedLineEnd
                    );
                  }),
                  (g.isMaybeInsertedClosing = function (e, t) {
                    return (
                      n.maybeInsertedBrackets > 0 &&
                      e.row === n.maybeInsertedRow &&
                      t.substr(e.column) === n.maybeInsertedLineEnd &&
                      t.substr(0, e.column) == n.maybeInsertedLineStart
                    );
                  }),
                  (g.popAutoInsertedClosing = function () {
                    (n.autoInsertedLineEnd = n.autoInsertedLineEnd.substr(1)), n.autoInsertedBrackets--;
                  }),
                  (g.clearMaybeInsertedClosing = function () {
                    n && ((n.maybeInsertedBrackets = 0), (n.maybeInsertedRow = -1));
                  }),
                  s.inherits(g, r),
                  (t.CstyleBehaviour = g);
              }
            ),
            ace.define('ace/unicode', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              for (
                var n = [
                    48, 9, 8, 25, 5, 0, 2, 25, 48, 0, 11, 0, 5, 0, 6, 22, 2, 30, 2, 457, 5, 11, 15, 4, 8, 0, 2, 0, 18,
                    116, 2, 1, 3, 3, 9, 0, 2, 2, 2, 0, 2, 19, 2, 82, 2, 138, 2, 4, 3, 155, 12, 37, 3, 0, 8, 38, 10, 44,
                    2, 0, 2, 1, 2, 1, 2, 0, 9, 26, 6, 2, 30, 10, 7, 61, 2, 9, 5, 101, 2, 7, 3, 9, 2, 18, 3, 0, 17, 58,
                    3, 100, 15, 53, 5, 0, 6, 45, 211, 57, 3, 18, 2, 5, 3, 11, 3, 9, 2, 1, 7, 6, 2, 2, 2, 7, 3, 1, 3, 21,
                    2, 6, 2, 0, 4, 3, 3, 8, 3, 1, 3, 3, 9, 0, 5, 1, 2, 4, 3, 11, 16, 2, 2, 5, 5, 1, 3, 21, 2, 6, 2, 1,
                    2, 1, 2, 1, 3, 0, 2, 4, 5, 1, 3, 2, 4, 0, 8, 3, 2, 0, 8, 15, 12, 2, 2, 8, 2, 2, 2, 21, 2, 6, 2, 1,
                    2, 4, 3, 9, 2, 2, 2, 2, 3, 0, 16, 3, 3, 9, 18, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 3, 8, 3, 1,
                    3, 2, 9, 1, 5, 1, 2, 4, 3, 9, 2, 0, 17, 1, 2, 5, 4, 2, 2, 3, 4, 1, 2, 0, 2, 1, 4, 1, 4, 2, 4, 11, 5,
                    4, 4, 2, 2, 3, 3, 0, 7, 0, 15, 9, 18, 2, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 4, 7, 2, 2, 2, 3, 8, 1, 2,
                    1, 7, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 3, 8, 2, 2, 2, 3, 8, 1, 8, 0, 2, 3, 3, 9, 19,
                    1, 2, 7, 2, 2, 2, 22, 2, 15, 4, 7, 2, 2, 2, 3, 10, 0, 9, 3, 3, 9, 11, 5, 3, 1, 2, 17, 4, 23, 2, 8,
                    2, 0, 3, 6, 4, 0, 5, 5, 2, 0, 2, 7, 19, 1, 14, 57, 6, 14, 2, 9, 40, 1, 2, 0, 3, 1, 2, 0, 3, 0, 7, 3,
                    2, 6, 2, 2, 2, 0, 2, 0, 3, 1, 2, 12, 2, 2, 3, 4, 2, 0, 2, 5, 3, 9, 3, 1, 35, 0, 24, 1, 7, 9, 12, 0,
                    2, 0, 2, 0, 5, 9, 2, 35, 5, 19, 2, 5, 5, 7, 2, 35, 10, 0, 58, 73, 7, 77, 3, 37, 11, 42, 2, 0, 4,
                    328, 2, 3, 3, 6, 2, 0, 2, 3, 3, 40, 2, 3, 3, 32, 2, 3, 3, 6, 2, 0, 2, 3, 3, 14, 2, 56, 2, 3, 3, 66,
                    5, 0, 33, 15, 17, 84, 13, 619, 3, 16, 2, 25, 6, 74, 22, 12, 2, 6, 12, 20, 12, 19, 13, 12, 2, 2, 2,
                    1, 13, 51, 3, 29, 4, 0, 5, 1, 3, 9, 34, 2, 3, 9, 7, 87, 9, 42, 6, 69, 11, 28, 4, 11, 5, 11, 11, 39,
                    3, 4, 12, 43, 5, 25, 7, 10, 38, 27, 5, 62, 2, 28, 3, 10, 7, 9, 14, 0, 89, 75, 5, 9, 18, 8, 13, 42,
                    4, 11, 71, 55, 9, 9, 4, 48, 83, 2, 2, 30, 14, 230, 23, 280, 3, 5, 3, 37, 3, 5, 3, 7, 2, 0, 2, 0, 2,
                    0, 2, 30, 3, 52, 2, 6, 2, 0, 4, 2, 2, 6, 4, 3, 3, 5, 5, 12, 6, 2, 2, 6, 67, 1, 20, 0, 29, 0, 14, 0,
                    17, 4, 60, 12, 5, 0, 4, 11, 18, 0, 5, 0, 3, 9, 2, 0, 4, 4, 7, 0, 2, 0, 2, 0, 2, 3, 2, 10, 3, 3, 6,
                    4, 5, 0, 53, 1, 2684, 46, 2, 46, 2, 132, 7, 6, 15, 37, 11, 53, 10, 0, 17, 22, 10, 6, 2, 6, 2, 6, 2,
                    6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 31, 48, 0, 470, 1, 36, 5, 2, 4, 6, 1, 5, 85, 3, 1, 3, 2, 2, 89, 2, 3,
                    6, 40, 4, 93, 18, 23, 57, 15, 513, 6581, 75, 20939, 53, 1164, 68, 45, 3, 268, 4, 27, 21, 31, 3, 13,
                    13, 1, 2, 24, 9, 69, 11, 1, 38, 8, 3, 102, 3, 1, 111, 44, 25, 51, 13, 68, 12, 9, 7, 23, 4, 0, 5, 45,
                    3, 35, 13, 28, 4, 64, 15, 10, 39, 54, 10, 13, 3, 9, 7, 22, 4, 1, 5, 66, 25, 2, 227, 42, 2, 1, 3, 9,
                    7, 11171, 13, 22, 5, 48, 8453, 301, 3, 61, 3, 105, 39, 6, 13, 4, 6, 11, 2, 12, 2, 4, 2, 0, 2, 1, 2,
                    1, 2, 107, 34, 362, 19, 63, 3, 53, 41, 11, 5, 15, 17, 6, 13, 1, 25, 2, 33, 4, 2, 134, 20, 9, 8, 25,
                    5, 0, 2, 25, 12, 88, 4, 5, 3, 5, 3, 5, 3, 2,
                  ],
                  s = 0,
                  r = [],
                  o = 0;
                o < n.length;
                o += 2
              )
                r.push((s += n[o])), n[o + 1] && r.push(45, (s += n[o + 1]));
              t.wordChars = String.fromCharCode.apply(null, r);
            }),
            ace.define(
              'ace/mode/text',
              [
                'require',
                'exports',
                'module',
                'ace/config',
                'ace/tokenizer',
                'ace/mode/text_highlight_rules',
                'ace/mode/behaviour/cstyle',
                'ace/unicode',
                'ace/lib/lang',
                'ace/token_iterator',
                'ace/range',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('../config'),
                  s = e('../tokenizer').Tokenizer,
                  r = e('./text_highlight_rules').TextHighlightRules,
                  o = e('./behaviour/cstyle').CstyleBehaviour,
                  a = e('../unicode'),
                  l = e('../lib/lang'),
                  h = e('../token_iterator').TokenIterator,
                  c = e('../range').Range,
                  u = function () {
                    this.HighlightRules = r;
                  };
                (function () {
                  (this.$defaultBehaviour = new o()),
                    (this.tokenRe = new RegExp('^[' + a.wordChars + '\\$_]+', 'g')),
                    (this.nonTokenRe = new RegExp('^(?:[^' + a.wordChars + '\\$_]|\\s])+', 'g')),
                    (this.getTokenizer = function () {
                      return (
                        this.$tokenizer ||
                          ((this.$highlightRules =
                            this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig)),
                          (this.$tokenizer = new s(this.$highlightRules.getRules()))),
                        this.$tokenizer
                      );
                    }),
                    (this.lineCommentStart = ''),
                    (this.blockComment = ''),
                    (this.toggleCommentLines = function (e, t, i, n) {
                      var s = t.doc,
                        r = !0,
                        o = !0,
                        a = 1 / 0,
                        h = t.getTabSize(),
                        c = !1;
                      if (this.lineCommentStart) {
                        Array.isArray(this.lineCommentStart)
                          ? ((p = this.lineCommentStart.map(l.escapeRegExp).join('|')), (f = this.lineCommentStart[0]))
                          : ((p = l.escapeRegExp(this.lineCommentStart)), (f = this.lineCommentStart)),
                          (p = new RegExp('^(\\s*)(?:' + p + ') ?')),
                          (c = t.getUseSoftTabs()),
                          (w = function (e, t) {
                            var i = e.match(p);
                            if (i) {
                              var n = i[1].length,
                                r = i[0].length;
                              d(e, n, r) || ' ' != i[0][r - 1] || r--, s.removeInLine(t, n, r);
                            }
                          });
                        var u = f + ' ',
                          d =
                            ((v = function (e, t) {
                              (r && !/\S/.test(e)) ||
                                (d(e, a, a)
                                  ? s.insertInLine({ row: t, column: a }, u)
                                  : s.insertInLine({ row: t, column: a }, f));
                            }),
                            (b = function (e, t) {
                              return p.test(e);
                            }),
                            function (e, t, i) {
                              for (var n = 0; t-- && ' ' == e.charAt(t); ) n++;
                              if (n % h != 0) return !1;
                              for (n = 0; ' ' == e.charAt(i++); ) n++;
                              return h > 2 ? n % h != h - 1 : n % h == 0;
                            });
                      } else {
                        if (!this.blockComment) return !1;
                        var f = this.blockComment.start,
                          g = this.blockComment.end,
                          p = new RegExp('^(\\s*)(?:' + l.escapeRegExp(f) + ')'),
                          m = new RegExp('(?:' + l.escapeRegExp(g) + ')\\s*$'),
                          v = function (e, t) {
                            b(e, t) ||
                              (r && !/\S/.test(e)) ||
                              (s.insertInLine({ row: t, column: e.length }, g),
                              s.insertInLine({ row: t, column: a }, f));
                          },
                          w = function (e, t) {
                            var i;
                            (i = e.match(m)) && s.removeInLine(t, e.length - i[0].length, e.length),
                              (i = e.match(p)) && s.removeInLine(t, i[1].length, i[0].length);
                          },
                          b = function (e, i) {
                            if (p.test(e)) return !0;
                            for (var n = t.getTokens(i), s = 0; s < n.length; s++)
                              if ('comment' === n[s].type) return !0;
                          };
                      }
                      function y(e) {
                        for (var t = i; t <= n; t++) e(s.getLine(t), t);
                      }
                      var $ = 1 / 0;
                      y(function (e, t) {
                        var i = e.search(/\S/);
                        -1 !== i ? (i < a && (a = i), o && !b(e, t) && (o = !1)) : $ > e.length && ($ = e.length);
                      }),
                        a == 1 / 0 && ((a = $), (r = !1), (o = !1)),
                        c && a % h != 0 && (a = Math.floor(a / h) * h),
                        y(o ? w : v);
                    }),
                    (this.toggleBlockComment = function (e, t, i, n) {
                      var s = this.blockComment;
                      if (s) {
                        !s.start && s[0] && (s = s[0]);
                        var r,
                          o,
                          a = (p = new h(t, n.row, n.column)).getCurrentToken(),
                          l = (t.selection, t.selection.toOrientedRange());
                        if (a && /comment/.test(a.type)) {
                          for (var u, d; a && /comment/.test(a.type); ) {
                            if (-1 != (m = a.value.indexOf(s.start))) {
                              var f = p.getCurrentTokenRow(),
                                g = p.getCurrentTokenColumn() + m;
                              u = new c(f, g, f, g + s.start.length);
                              break;
                            }
                            a = p.stepBackward();
                          }
                          var p;
                          for (a = (p = new h(t, n.row, n.column)).getCurrentToken(); a && /comment/.test(a.type); ) {
                            var m;
                            if (-1 != (m = a.value.indexOf(s.end))) {
                              (f = p.getCurrentTokenRow()),
                                (g = p.getCurrentTokenColumn() + m),
                                (d = new c(f, g, f, g + s.end.length));
                              break;
                            }
                            a = p.stepForward();
                          }
                          d && t.remove(d), u && (t.remove(u), (r = u.start.row), (o = -s.start.length));
                        } else
                          (o = s.start.length), (r = i.start.row), t.insert(i.end, s.end), t.insert(i.start, s.start);
                        l.start.row == r && (l.start.column += o),
                          l.end.row == r && (l.end.column += o),
                          t.selection.fromOrientedRange(l);
                      }
                    }),
                    (this.getNextLineIndent = function (e, t, i) {
                      return this.$getIndent(t);
                    }),
                    (this.checkOutdent = function (e, t, i) {
                      return !1;
                    }),
                    (this.autoOutdent = function (e, t, i) {}),
                    (this.$getIndent = function (e) {
                      return e.match(/^\s*/)[0];
                    }),
                    (this.createWorker = function (e) {
                      return null;
                    }),
                    (this.createModeDelegates = function (e) {
                      for (var t in ((this.$embeds = []), (this.$modes = {}), e))
                        if (e[t]) {
                          var i = e[t],
                            s = i.prototype.$id,
                            r = n.$modes[s];
                          r || (n.$modes[s] = r = new i()),
                            n.$modes[t] || (n.$modes[t] = r),
                            this.$embeds.push(t),
                            (this.$modes[t] = r);
                        }
                      var o = [
                        'toggleBlockComment',
                        'toggleCommentLines',
                        'getNextLineIndent',
                        'checkOutdent',
                        'autoOutdent',
                        'transformAction',
                        'getCompletions',
                      ];
                      for (t = 0; t < o.length; t++)
                        !(function (e) {
                          var i = o[t],
                            n = e[i];
                          e[o[t]] = function () {
                            return this.$delegator(i, arguments, n);
                          };
                        })(this);
                    }),
                    (this.$delegator = function (e, t, i) {
                      var n = t[0] || 'start';
                      if ('string' != typeof n) {
                        if (Array.isArray(n[2])) {
                          var s = n[2][n[2].length - 1];
                          if ((o = this.$modes[s])) return o[e].apply(o, [n[1]].concat([].slice.call(t, 1)));
                        }
                        n = n[0] || 'start';
                      }
                      for (var r = 0; r < this.$embeds.length; r++)
                        if (this.$modes[this.$embeds[r]]) {
                          var o,
                            a = n.split(this.$embeds[r]);
                          if (!a[0] && a[1]) return (t[0] = a[1]), (o = this.$modes[this.$embeds[r]])[e].apply(o, t);
                        }
                      var l = i.apply(this, t);
                      return i ? l : void 0;
                    }),
                    (this.transformAction = function (e, t, i, n, s) {
                      if (this.$behaviour) {
                        var r = this.$behaviour.getBehaviours();
                        for (var o in r)
                          if (r[o][t]) {
                            var a = r[o][t].apply(this, arguments);
                            if (a) return a;
                          }
                      }
                    }),
                    (this.getKeywords = function (e) {
                      if (!this.completionKeywords) {
                        var t = this.$tokenizer.rules,
                          i = [];
                        for (var n in t)
                          for (var s = t[n], r = 0, o = s.length; r < o; r++)
                            if ('string' == typeof s[r].token)
                              /keyword|support|storage/.test(s[r].token) && i.push(s[r].regex);
                            else if ('object' == typeof s[r].token)
                              for (var a = 0, l = s[r].token.length; a < l; a++)
                                /keyword|support|storage/.test(s[r].token[a]) &&
                                  ((n = s[r].regex.match(/\(.+?\)/g)[a]), i.push(n.substr(1, n.length - 2)));
                        this.completionKeywords = i;
                      }
                      return e ? i.concat(this.$keywordList || []) : this.$keywordList;
                    }),
                    (this.$createKeywordList = function () {
                      return (
                        this.$highlightRules || this.getTokenizer(),
                        (this.$keywordList = this.$highlightRules.$keywordList || [])
                      );
                    }),
                    (this.getCompletions = function (e, t, i, n) {
                      return (this.$keywordList || this.$createKeywordList()).map(function (e) {
                        return { name: e, value: e, score: 0, meta: 'keyword' };
                      });
                    }),
                    (this.$id = 'ace/mode/text');
                }).call(u.prototype),
                  (t.Mode = u);
              }
            ),
            ace.define('ace/apply_delta', ['require', 'exports', 'module'], function (e, t, i) {
              'use strict';
              t.applyDelta = function (e, t, i) {
                var n = t.start.row,
                  s = t.start.column,
                  r = e[n] || '';
                switch (t.action) {
                  case 'insert':
                    if (1 === t.lines.length) e[n] = r.substring(0, s) + t.lines[0] + r.substring(s);
                    else {
                      var o = [n, 1].concat(t.lines);
                      e.splice.apply(e, o),
                        (e[n] = r.substring(0, s) + e[n]),
                        (e[n + t.lines.length - 1] += r.substring(s));
                    }
                    break;
                  case 'remove':
                    var a = t.end.column,
                      l = t.end.row;
                    n === l
                      ? (e[n] = r.substring(0, s) + r.substring(a))
                      : e.splice(n, l - n + 1, r.substring(0, s) + e[l].substring(a));
                }
              };
            }),
            ace.define(
              'ace/anchor',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/event_emitter'],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./lib/event_emitter').EventEmitter,
                  r = (t.Anchor = function (e, t, i) {
                    (this.$onChange = this.onChange.bind(this)),
                      this.attach(e),
                      void 0 === i ? this.setPosition(t.row, t.column) : this.setPosition(t, i);
                  });
                (function () {
                  function e(e, t, i) {
                    var n = i ? e.column <= t.column : e.column < t.column;
                    return e.row < t.row || (e.row == t.row && n);
                  }
                  n.implement(this, s),
                    (this.getPosition = function () {
                      return this.$clipPositionToDocument(this.row, this.column);
                    }),
                    (this.getDocument = function () {
                      return this.document;
                    }),
                    (this.$insertRight = !1),
                    (this.onChange = function (t) {
                      if (!((t.start.row == t.end.row && t.start.row != this.row) || t.start.row > this.row)) {
                        var i = (function (t, i, n) {
                          var s = 'insert' == t.action,
                            r = (s ? 1 : -1) * (t.end.row - t.start.row),
                            o = (s ? 1 : -1) * (t.end.column - t.start.column),
                            a = t.start,
                            l = s ? a : t.end;
                          return e(i, a, n)
                            ? { row: i.row, column: i.column }
                            : e(l, i, !n)
                            ? { row: i.row + r, column: i.column + (i.row == l.row ? o : 0) }
                            : { row: a.row, column: a.column };
                        })(t, { row: this.row, column: this.column }, this.$insertRight);
                        this.setPosition(i.row, i.column, !0);
                      }
                    }),
                    (this.setPosition = function (e, t, i) {
                      var n;
                      if (
                        ((n = i ? { row: e, column: t } : this.$clipPositionToDocument(e, t)),
                        this.row != n.row || this.column != n.column)
                      ) {
                        var s = { row: this.row, column: this.column };
                        (this.row = n.row), (this.column = n.column), this._signal('change', { old: s, value: n });
                      }
                    }),
                    (this.detach = function () {
                      this.document.off('change', this.$onChange);
                    }),
                    (this.attach = function (e) {
                      (this.document = e || this.document), this.document.on('change', this.$onChange);
                    }),
                    (this.$clipPositionToDocument = function (e, t) {
                      var i = {};
                      return (
                        e >= this.document.getLength()
                          ? ((i.row = Math.max(0, this.document.getLength() - 1)),
                            (i.column = this.document.getLine(i.row).length))
                          : e < 0
                          ? ((i.row = 0), (i.column = 0))
                          : ((i.row = e), (i.column = Math.min(this.document.getLine(i.row).length, Math.max(0, t)))),
                        t < 0 && (i.column = 0),
                        i
                      );
                    });
                }).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, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./apply_delta').applyDelta,
                  r = e('./lib/event_emitter').EventEmitter,
                  o = e('./range').Range,
                  a = e('./anchor').Anchor,
                  l = 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 () {
                  n.implement(this, r),
                    (this.setValue = function (e) {
                      var t = this.getLength() - 1;
                      this.remove(new o(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 a(this, e, t);
                    }),
                    0 === 'aaa'.split(/a/).length
                      ? (this.$split = function (e) {
                          return e.replace(/\r\n|\r/g, '\n').split('\n');
                        })
                      : (this.$split = 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))[0] = (t[0] || '').substring(e.start.column);
                        var i = t.length - 1;
                        e.end.row - e.start.row == i && (t[i] = t[i].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 this.getLength() <= 1 && this.$detectNewLine(t), this.insertMergedLines(e, this.$split(t));
                    }),
                    (this.insertInLine = function (e, t) {
                      var i = this.clippedPos(e.row, e.column),
                        n = this.pos(e.row, e.column + t.length);
                      return this.applyDelta({ start: i, end: n, action: 'insert', lines: [t] }, !0), this.clonePos(n);
                    }),
                    (this.clippedPos = function (e, t) {
                      var i = this.getLength();
                      void 0 === e ? (e = i) : e < 0 ? (e = 0) : e >= i && ((e = i - 1), (t = void 0));
                      var n = this.getLine(e);
                      return null == t && (t = n.length), { row: e, column: (t = Math.min(Math.max(t, 0), n.length)) };
                    }),
                    (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 = Math.max(0, t - 1)), (e.column = this.getLine(t - 1).length))
                          : ((e.row = Math.max(0, e.row)),
                            (e.column = Math.min(Math.max(e.column, 0), this.getLine(e.row).length))),
                        e
                      );
                    }),
                    (this.insertFullLines = function (e, t) {
                      var i = 0;
                      (e = Math.min(Math.max(e, 0), this.getLength())) < this.getLength()
                        ? ((t = t.concat([''])), (i = 0))
                        : ((t = [''].concat(t)), e--, (i = this.$lines[e].length)),
                        this.insertMergedLines({ row: e, column: i }, t);
                    }),
                    (this.insertMergedLines = function (e, t) {
                      var i = this.clippedPos(e.row, e.column),
                        n = {
                          row: i.row + t.length - 1,
                          column: (1 == t.length ? i.column : 0) + t[t.length - 1].length,
                        };
                      return this.applyDelta({ start: i, end: n, action: 'insert', lines: t }), this.clonePos(n);
                    }),
                    (this.remove = function (e) {
                      var t = this.clippedPos(e.start.row, e.start.column),
                        i = this.clippedPos(e.end.row, e.end.column);
                      return (
                        this.applyDelta({
                          start: t,
                          end: i,
                          action: 'remove',
                          lines: this.getLinesForRange({ start: t, end: i }),
                        }),
                        this.clonePos(t)
                      );
                    }),
                    (this.removeInLine = function (e, t, i) {
                      var n = this.clippedPos(e, t),
                        s = this.clippedPos(e, i);
                      return (
                        this.applyDelta(
                          { start: n, end: s, action: 'remove', lines: this.getLinesForRange({ start: n, end: s }) },
                          !0
                        ),
                        this.clonePos(n)
                      );
                    }),
                    (this.removeFullLines = function (e, t) {
                      e = Math.min(Math.max(0, e), this.getLength() - 1);
                      var i = (t = Math.min(Math.max(0, t), this.getLength() - 1)) == this.getLength() - 1 && e > 0,
                        n = t < this.getLength() - 1,
                        s = i ? e - 1 : e,
                        r = i ? this.getLine(s).length : 0,
                        a = n ? t + 1 : t,
                        l = n ? 0 : this.getLine(a).length,
                        h = new o(s, r, a, l),
                        c = this.$lines.slice(e, t + 1);
                      return (
                        this.applyDelta({
                          start: h.start,
                          end: h.end,
                          action: 'remove',
                          lines: this.getLinesForRange(h),
                        }),
                        c
                      );
                    }),
                    (this.removeNewLine = function (e) {
                      e < this.getLength() - 1 &&
                        e >= 0 &&
                        this.applyDelta({
                          start: this.pos(e, this.getLine(e).length),
                          end: this.pos(e + 1, 0),
                          action: 'remove',
                          lines: ['', ''],
                        });
                    }),
                    (this.replace = function (e, t) {
                      return (
                        e instanceof o || (e = o.fromPoints(e.start, e.end)),
                        0 === t.length && e.isEmpty()
                          ? e.start
                          : t == this.getTextRange(e)
                          ? e.end
                          : (this.remove(e), t ? this.insert(e.start, t) : e.start)
                      );
                    }),
                    (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; t >= 0; t--) this.revertDelta(e[t]);
                    }),
                    (this.applyDelta = function (e, t) {
                      var i = 'insert' == e.action;
                      (i ? e.lines.length <= 1 && !e.lines[0] : !o.comparePoints(e.start, e.end)) ||
                        (i && e.lines.length > 2e4
                          ? this.$splitAndapplyLargeDelta(e, 2e4)
                          : (s(this.$lines, e, t), this._signal('change', e)));
                    }),
                    (this.$safeApplyDelta = function (e) {
                      var t = this.$lines.length;
                      (('remove' == e.action && e.start.row < t && e.end.row < t) ||
                        ('insert' == e.action && e.start.row <= t)) &&
                        this.applyDelta(e);
                    }),
                    (this.$splitAndapplyLargeDelta = function (e, t) {
                      for (
                        var i = e.lines, n = i.length - t + 1, s = e.start.row, r = e.start.column, o = 0, a = 0;
                        o < n;
                        o = a
                      ) {
                        a += t - 1;
                        var l = i.slice(o, a);
                        l.push(''),
                          this.applyDelta(
                            { start: this.pos(s + o, r), end: this.pos(s + a, (r = 0)), action: e.action, lines: l },
                            !0
                          );
                      }
                      (e.lines = i.slice(o)), (e.start.row = s + o), (e.start.column = r), this.applyDelta(e, !0);
                    }),
                    (this.revertDelta = function (e) {
                      this.$safeApplyDelta({
                        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 i = this.$lines || this.getAllLines(),
                          n = this.getNewLineCharacter().length,
                          s = t || 0,
                          r = i.length;
                        s < r;
                        s++
                      )
                        if ((e -= i[s].length + n) < 0) return { row: s, column: e + i[s].length + n };
                      return { row: r - 1, column: e + i[r - 1].length + n };
                    }),
                    (this.positionToIndex = function (e, t) {
                      for (
                        var i = this.$lines || this.getAllLines(),
                          n = this.getNewLineCharacter().length,
                          s = 0,
                          r = Math.min(e.row, i.length),
                          o = t || 0;
                        o < r;
                        ++o
                      )
                        s += i[o].length + n;
                      return s + e.column;
                    });
                }).call(l.prototype),
                  (t.Document = l);
              }
            ),
            ace.define(
              'ace/background_tokenizer',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/event_emitter'],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./lib/event_emitter').EventEmitter,
                  r = function (e, t) {
                    (this.running = !1),
                      (this.lines = []),
                      (this.states = []),
                      (this.currentLine = 0),
                      (this.tokenizer = e);
                    var i = this;
                    this.$worker = function () {
                      if (i.running) {
                        for (var e = new Date(), t = i.currentLine, n = -1, s = i.doc, r = t; i.lines[t]; ) t++;
                        var o = s.getLength(),
                          a = 0;
                        for (i.running = !1; t < o; ) {
                          i.$tokenizeRow(t), (n = t);
                          do {
                            t++;
                          } while (i.lines[t]);
                          if (++a % 5 == 0 && new Date() - e > 20) {
                            i.running = setTimeout(i.$worker, 20);
                            break;
                          }
                        }
                        (i.currentLine = t), -1 == n && (n = t), r <= n && i.fireUpdateEvent(r, n);
                      }
                    };
                  };
                (function () {
                  n.implement(this, s),
                    (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) {
                      var i = { first: e, last: t };
                      this._signal('update', { data: i });
                    }),
                    (this.start = function (e) {
                      (this.currentLine = Math.min(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,
                        i = e.end.row - t;
                      if (0 === i) this.lines[t] = null;
                      else if ('remove' == e.action)
                        this.lines.splice(t, i + 1, null), this.states.splice(t, i + 1, null);
                      else {
                        var n = Array(i + 1);
                        n.unshift(t, 1),
                          this.lines.splice.apply(this.lines, n),
                          this.states.splice.apply(this.states, n);
                      }
                      (this.currentLine = Math.min(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),
                        i = this.states[e - 1],
                        n = this.tokenizer.getLineTokens(t, i, e);
                      return (
                        this.states[e] + '' != n.state + ''
                          ? ((this.states[e] = n.state),
                            (this.lines[e + 1] = null),
                            this.currentLine > e + 1 && (this.currentLine = e + 1))
                          : this.currentLine == e && (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, i) {
                'use strict';
                var n = e('./lib/lang'),
                  s = (e('./lib/oop'), e('./range').Range),
                  r = function (e, t, i) {
                    this.setRegexp(e), (this.clazz = t), (this.type = i || 'text');
                  };
                (function () {
                  (this.MAX_RANGES = 500),
                    (this.setRegexp = function (e) {
                      this.regExp + '' != e + '' && ((this.regExp = e), (this.cache = []));
                    }),
                    (this.update = function (e, t, i, r) {
                      if (this.regExp)
                        for (var o = r.firstRow, a = r.lastRow, l = o; l <= a; l++) {
                          var h = this.cache[l];
                          null == h &&
                            ((h = n.getMatchOffsets(i.getLine(l), this.regExp)).length > this.MAX_RANGES &&
                              (h = h.slice(0, this.MAX_RANGES)),
                            (h = h.map(function (e) {
                              return new s(l, e.offset, l, e.offset + e.length);
                            })),
                            (this.cache[l] = h.length ? h : ''));
                          for (var c = h.length; c--; ) t.drawSingleLineMarker(e, h[c].toScreenRange(i), this.clazz, r);
                        }
                    });
                }).call(r.prototype),
                  (t.SearchHighlight = r);
              }
            ),
            ace.define('ace/edit_session/fold_line', ['require', 'exports', 'module', 'ace/range'], function (e, t, i) {
              'use strict';
              var n = e('../range').Range;
              function s(e, t) {
                (this.foldData = e), Array.isArray(t) ? (this.folds = t) : (t = this.folds = [t]);
                var i = t[t.length - 1];
                (this.range = new n(t[0].start.row, t[0].start.column, i.end.row, i.end.column)),
                  (this.start = this.range.start),
                  (this.end = this.range.end),
                  this.folds.forEach(function (e) {
                    e.setFoldLine(this);
                  }, this);
              }
              (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);
                        }),
                        this.range.compareEnd(e.start.row, e.start.column) > 0
                          ? ((this.end.row = e.end.row), (this.end.column = e.end.column))
                          : this.range.compareStart(e.end.row, e.end.column) < 0 &&
                            ((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)
                        throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");
                      this.folds.unshift(e), (this.start.row = e.start.row), (this.start.column = e.start.column);
                    }
                    e.foldLine = this;
                  }),
                  (this.containsRow = function (e) {
                    return e >= this.start.row && e <= this.end.row;
                  }),
                  (this.walk = function (e, t, i) {
                    var n,
                      s,
                      r = 0,
                      o = this.folds,
                      a = !0;
                    null == t && ((t = this.end.row), (i = this.end.column));
                    for (var l = 0; l < o.length; l++) {
                      if (-1 == (s = (n = o[l]).range.compareStart(t, i))) return void e(null, t, i, r, a);
                      if (
                        (!e(null, n.start.row, n.start.column, r, a) &&
                          e(n.placeholder, n.start.row, n.start.column, r)) ||
                        0 === s
                      )
                        return;
                      (a = !n.sameRow), (r = n.end.column);
                    }
                    e(null, t, i, r, a);
                  }),
                  (this.getNextFoldTo = function (e, t) {
                    for (var i, n, s = 0; s < this.folds.length; s++) {
                      if (-1 == (n = (i = this.folds[s]).range.compareEnd(e, t))) return { fold: i, kind: 'after' };
                      if (0 === n) return { fold: i, kind: 'inside' };
                    }
                    return null;
                  }),
                  (this.addRemoveChars = function (e, t, i) {
                    var n,
                      s,
                      r = this.getNextFoldTo(e, t);
                    if (r)
                      if (((n = r.fold), 'inside' == r.kind && n.start.column != t && n.start.row != e))
                        window.console && window.console.log(e, t, n);
                      else if (n.start.row == e) {
                        var o = (s = this.folds).indexOf(n);
                        for (0 === o && (this.start.column += i); o < s.length; o++) {
                          if ((((n = s[o]).start.column += i), !n.sameRow)) return;
                          n.end.column += i;
                        }
                        this.end.column += i;
                      }
                  }),
                  (this.split = function (e, t) {
                    var i = this.getNextFoldTo(e, t);
                    if (!i || 'inside' == i.kind) return null;
                    var n = i.fold,
                      r = this.folds,
                      o = this.foldData,
                      a = r.indexOf(n),
                      l = r[a - 1];
                    (this.end.row = l.end.row), (this.end.column = l.end.column);
                    var h = new s(o, (r = r.splice(a, r.length - a)));
                    return o.splice(o.indexOf(this) + 1, 0, h), h;
                  }),
                  (this.merge = function (e) {
                    for (var t = e.folds, i = 0; i < t.length; i++) this.addFold(t[i]);
                    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, i = 0; i < this.folds.length; i++) {
                      var n = this.folds[i];
                      if ((e -= n.start.column - t) < 0) return { row: n.start.row, column: n.start.column + e };
                      if ((e -= n.placeholder.length) < 0) return n.start;
                      t = n.end.column;
                    }
                    return { row: this.end.row, column: this.end.column + e };
                  });
              }).call(s.prototype),
                (t.FoldLine = s);
            }),
            ace.define('ace/range_list', ['require', 'exports', 'module', 'ace/range'], function (e, t, i) {
              'use strict';
              var n = e('./range').Range.comparePoints,
                s = function () {
                  (this.ranges = []), (this.$bias = 1);
                };
              (function () {
                (this.comparePoints = n),
                  (this.pointIndex = function (e, t, i) {
                    for (var s = this.ranges, r = i || 0; r < s.length; r++) {
                      var o = s[r],
                        a = n(e, o.end);
                      if (!(a > 0)) {
                        var l = n(e, o.start);
                        return 0 === a ? (t && 0 !== l ? -r - 2 : r) : l > 0 || (0 === l && !t) ? r : -r - 1;
                      }
                    }
                    return -r - 1;
                  }),
                  (this.add = function (e) {
                    var t = !e.isEmpty(),
                      i = this.pointIndex(e.start, t);
                    i < 0 && (i = -i - 1);
                    var n = this.pointIndex(e.end, t, i);
                    return n < 0 ? (n = -n - 1) : n++, this.ranges.splice(i, n - i, e);
                  }),
                  (this.addList = function (e) {
                    for (var t = [], i = e.length; i--; ) t.push.apply(t, this.add(e[i]));
                    return t;
                  }),
                  (this.substractPoint = function (e) {
                    var t = this.pointIndex(e);
                    if (t >= 0) return this.ranges.splice(t, 1);
                  }),
                  (this.merge = function () {
                    for (
                      var e,
                        t = [],
                        i = this.ranges,
                        s = (i = i.sort(function (e, t) {
                          return n(e.start, t.start);
                        }))[0],
                        r = 1;
                      r < i.length;
                      r++
                    ) {
                      (e = s), (s = i[r]);
                      var o = n(e.end, s.start);
                      o < 0 ||
                        ((0 != o || e.isEmpty() || s.isEmpty()) &&
                          (n(e.end, s.end) < 0 && ((e.end.row = s.end.row), (e.end.column = s.end.column)),
                          i.splice(r, 1),
                          t.push(s),
                          (s = e),
                          r--));
                    }
                    return (this.ranges = i), t;
                  }),
                  (this.contains = function (e, t) {
                    return this.pointIndex({ row: e, column: t }) >= 0;
                  }),
                  (this.containsPoint = function (e) {
                    return this.pointIndex(e) >= 0;
                  }),
                  (this.rangeAtPoint = function (e) {
                    var t = this.pointIndex(e);
                    if (t >= 0) return this.ranges[t];
                  }),
                  (this.clipRows = function (e, t) {
                    var i = this.ranges;
                    if (i[0].start.row > t || i[i.length - 1].start.row < e) return [];
                    var n = this.pointIndex({ row: e, column: 0 });
                    n < 0 && (n = -n - 1);
                    var s = this.pointIndex({ row: t, column: 0 }, n);
                    s < 0 && (s = -s - 1);
                    for (var r = [], o = n; o < s; o++) r.push(i[o]);
                    return r;
                  }),
                  (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) {
                    for (
                      var t = e.start, i = e.end, n = t.row, s = i.row, r = this.ranges, o = 0, a = r.length;
                      o < a && !((c = r[o]).end.row >= n);
                      o++
                    );
                    if ('insert' == e.action) {
                      for (var l = s - n, h = -t.column + i.column; o < a && !((c = r[o]).start.row > n); o++)
                        if (
                          (c.start.row == n &&
                            c.start.column >= t.column &&
                            ((c.start.column == t.column && this.$bias <= 0) ||
                              ((c.start.column += h), (c.start.row += l))),
                          c.end.row == n && c.end.column >= t.column)
                        ) {
                          if (c.end.column == t.column && this.$bias < 0) continue;
                          c.end.column == t.column &&
                            h > 0 &&
                            o < a - 1 &&
                            c.end.column > c.start.column &&
                            c.end.column == r[o + 1].start.column &&
                            (c.end.column -= h),
                            (c.end.column += h),
                            (c.end.row += l);
                        }
                    } else
                      for (l = n - s, h = t.column - i.column; o < a && !((c = r[o]).start.row > s); o++)
                        c.end.row < s && (n < c.end.row || (n == c.end.row && t.column < c.end.column))
                          ? ((c.end.row = n), (c.end.column = t.column))
                          : c.end.row == s
                          ? c.end.column <= i.column
                            ? (l || c.end.column > t.column) && ((c.end.column = t.column), (c.end.row = t.row))
                            : ((c.end.column += h), (c.end.row += l))
                          : c.end.row > s && (c.end.row += l),
                          c.start.row < s && (n < c.start.row || (n == c.start.row && t.column < c.start.column))
                            ? ((c.start.row = n), (c.start.column = t.column))
                            : c.start.row == s
                            ? c.start.column <= i.column
                              ? (l || c.start.column > t.column) && ((c.start.column = t.column), (c.start.row = t.row))
                              : ((c.start.column += h), (c.start.row += l))
                            : c.start.row > s && (c.start.row += l);
                    if (0 != l && o < a)
                      for (; o < a; o++) {
                        var c;
                        ((c = r[o]).start.row += l), (c.end.row += l);
                      }
                  });
              }).call(s.prototype),
                (t.RangeList = s);
            }),
            ace.define(
              'ace/edit_session/fold',
              ['require', 'exports', 'module', 'ace/range_list', 'ace/lib/oop'],
              function (e, t, i) {
                'use strict';
                var n = e('../range_list').RangeList,
                  s = e('../lib/oop'),
                  r = (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 = []);
                  });
                function o(e, t) {
                  (e.row -= t.row), 0 == e.row && (e.column -= t.column);
                }
                function a(e, t) {
                  0 == e.row && (e.column += t.column), (e.row += t.row);
                }
                s.inherits(r, n),
                  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 r(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)) {
                          var t, i;
                          (t = e), (i = this.start), o(t.start, i), o(t.end, i);
                          for (
                            var n = e.start.row, s = e.start.column, r = 0, a = -1;
                            r < this.subFolds.length && 1 == (a = this.subFolds[r].range.compare(n, s));
                            r++
                          );
                          var l = this.subFolds[r],
                            h = 0;
                          if (0 == a) {
                            if (l.range.containsRange(e)) return l.addSubFold(e);
                            h = 1;
                          }
                          (n = e.range.end.row), (s = e.range.end.column);
                          var c = r;
                          for (
                            a = -1;
                            c < this.subFolds.length && 1 == (a = this.subFolds[c].range.compare(n, s));
                            c++
                          );
                          0 == a && c++;
                          for (
                            var u = this.subFolds.splice(r, c - r, e), d = 0 == a ? u.length - 1 : u.length, f = h;
                            f < d;
                            f++
                          )
                            e.addSubFold(u[f]);
                          return e.setFoldLine(this.foldLine), e;
                        }
                      }),
                      (this.restoreRange = function (e) {
                        return (function (e, t) {
                          a(e.start, t), a(e.end, t);
                        })(e, this.start);
                      });
                  }.call(r.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, i) {
                'use strict';
                var n = e('../range').Range,
                  s = e('./fold_line').FoldLine,
                  r = e('./fold').Fold,
                  o = e('../token_iterator').TokenIterator;
                t.Folding = function () {
                  (this.getFoldAt = function (e, t, i) {
                    var n = this.getFoldLine(e);
                    if (!n) return null;
                    for (var s = n.folds, r = 0; r < s.length; r++) {
                      var o = s[r].range;
                      if (o.contains(e, t)) {
                        if (1 == i && o.isEnd(e, t) && !o.isEmpty()) continue;
                        if (-1 == i && o.isStart(e, t) && !o.isEmpty()) continue;
                        return s[r];
                      }
                    }
                  }),
                    (this.getFoldsInRange = function (e) {
                      var t = e.start,
                        i = e.end,
                        n = this.$foldData,
                        s = [];
                      (t.column += 1), (i.column -= 1);
                      for (var r = 0; r < n.length; r++) {
                        var o = n[r].range.compareRange(e);
                        if (2 != o) {
                          if (-2 == o) break;
                          for (var a = n[r].folds, l = 0; l < a.length; l++) {
                            var h = a[l];
                            if (-2 == (o = h.range.compareRange(e))) break;
                            if (2 != o) {
                              if (42 == o) break;
                              s.push(h);
                            }
                          }
                        }
                      }
                      return (t.column -= 1), (i.column += 1), s;
                    }),
                    (this.getFoldsInRangeList = function (e) {
                      if (Array.isArray(e)) {
                        var t = [];
                        e.forEach(function (e) {
                          t = t.concat(this.getFoldsInRange(e));
                        }, this);
                      } else t = this.getFoldsInRange(e);
                      return t;
                    }),
                    (this.getAllFolds = function () {
                      for (var e = [], t = this.$foldData, i = 0; i < t.length; i++)
                        for (var n = 0; n < t[i].folds.length; n++) e.push(t[i].folds[n]);
                      return e;
                    }),
                    (this.getFoldStringAt = function (e, t, i, n) {
                      if (!(n = n || this.getFoldLine(e))) return null;
                      for (var s, r, o = { end: { column: 0 } }, a = 0; a < n.folds.length; a++) {
                        var l = (r = n.folds[a]).range.compareEnd(e, t);
                        if (-1 == l) {
                          s = this.getLine(r.start.row).substring(o.end.column, r.start.column);
                          break;
                        }
                        if (0 === l) return null;
                        o = r;
                      }
                      return (
                        s || (s = this.getLine(r.start.row).substring(o.end.column)),
                        -1 == i ? s.substring(0, t - o.end.column) : 1 == i ? s.substring(t - o.end.column) : s
                      );
                    }),
                    (this.getFoldLine = function (e, t) {
                      var i = this.$foldData,
                        n = 0;
                      for (t && (n = i.indexOf(t)), -1 == n && (n = 0); n < i.length; n++) {
                        var s = i[n];
                        if (s.start.row <= e && s.end.row >= e) return s;
                        if (s.end.row > e) return null;
                      }
                      return null;
                    }),
                    (this.getNextFoldLine = function (e, t) {
                      var i = this.$foldData,
                        n = 0;
                      for (t && (n = i.indexOf(t)), -1 == n && (n = 0); n < i.length; n++) {
                        var s = i[n];
                        if (s.end.row >= e) return s;
                      }
                      return null;
                    }),
                    (this.getFoldedRowCount = function (e, t) {
                      for (var i = this.$foldData, n = t - e + 1, s = 0; s < i.length; s++) {
                        var r = i[s],
                          o = r.end.row,
                          a = r.start.row;
                        if (o >= t) {
                          a < t && (a >= e ? (n -= t - a) : (n = 0));
                          break;
                        }
                        o >= e && (n -= a >= e ? o - a : o - 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 i,
                        n = this.$foldData,
                        o = !1;
                      e instanceof r ? (i = e) : ((i = new r(t, e)).collapseChildren = t.collapseChildren),
                        this.$clipRangeToDocument(i.range);
                      var a = i.start.row,
                        l = i.start.column,
                        h = i.end.row,
                        c = i.end.column,
                        u = this.getFoldAt(a, l, 1),
                        d = this.getFoldAt(h, c, -1);
                      if (u && d == u) return u.addSubFold(i);
                      u && !u.range.isStart(a, l) && this.removeFold(u),
                        d && !d.range.isEnd(h, c) && this.removeFold(d);
                      var f = this.getFoldsInRange(i.range);
                      f.length > 0 &&
                        (this.removeFolds(f),
                        i.collapseChildren ||
                          f.forEach(function (e) {
                            i.addSubFold(e);
                          }));
                      for (var g = 0; g < n.length; g++) {
                        var p = n[g];
                        if (h == p.start.row) {
                          p.addFold(i), (o = !0);
                          break;
                        }
                        if (a == p.end.row) {
                          if ((p.addFold(i), (o = !0), !i.sameRow)) {
                            var m = n[g + 1];
                            if (m && m.start.row == h) {
                              p.merge(m);
                              break;
                            }
                          }
                          break;
                        }
                        if (h <= p.start.row) break;
                      }
                      return (
                        o || (p = this.$addFoldLine(new s(this.$foldData, i))),
                        this.$useWrapMode
                          ? this.$updateWrapData(p.start.row, p.start.row)
                          : this.$updateRowLengthCache(p.start.row, p.start.row),
                        (this.$modified = !0),
                        this._signal('changeFold', { data: i, action: 'add' }),
                        i
                      );
                    }),
                    (this.addFolds = function (e) {
                      e.forEach(function (e) {
                        this.addFold(e);
                      }, this);
                    }),
                    (this.removeFold = function (e) {
                      var t = e.foldLine,
                        i = t.start.row,
                        n = t.end.row,
                        s = this.$foldData,
                        r = t.folds;
                      if (1 == r.length) s.splice(s.indexOf(t), 1);
                      else if (t.range.isEnd(e.end.row, e.end.column))
                        r.pop(), (t.end.row = r[r.length - 1].end.row), (t.end.column = r[r.length - 1].end.column);
                      else if (t.range.isStart(e.start.row, e.start.column))
                        r.shift(), (t.start.row = r[0].start.row), (t.start.column = r[0].start.column);
                      else if (e.sameRow) r.splice(r.indexOf(e), 1);
                      else {
                        var o = t.split(e.start.row, e.start.column);
                        (r = o.folds).shift(), (o.start.row = r[0].start.row), (o.start.column = r[0].start.column);
                      }
                      this.$updating ||
                        (this.$useWrapMode ? this.$updateWrapData(i, n) : this.$updateRowLengthCache(i, n)),
                        (this.$modified = !0),
                        this._signal('changeFold', { data: e, action: 'remove' });
                    }),
                    (this.removeFolds = function (e) {
                      for (var t = [], i = 0; i < e.length; i++) t.push(e[i]);
                      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),
                        e.collapseChildren > 0 && 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 i, s;
                      if (null == e) (i = new n(0, 0, this.getLength(), 0)), null == t && (t = !0);
                      else if ('number' == typeof e) i = new n(e, 0, e, this.getLine(e).length);
                      else if ('row' in e) i = n.fromPoints(e, e);
                      else {
                        if (Array.isArray(e))
                          return (
                            (s = []),
                            e.forEach(function (e) {
                              s = s.concat(this.unfold(e));
                            }, this),
                            s
                          );
                        i = e;
                      }
                      for (
                        var r = (s = this.getFoldsInRangeList(i));
                        1 == s.length &&
                        n.comparePoints(s[0].start, i.start) < 0 &&
                        n.comparePoints(s[0].end, i.end) > 0;

                      )
                        this.expandFolds(s), (s = this.getFoldsInRangeList(i));
                      if ((0 != t ? this.removeFolds(s) : this.expandFolds(s), r.length)) return r;
                    }),
                    (this.isRowFolded = function (e, t) {
                      return !!this.getFoldLine(e, t);
                    }),
                    (this.getRowFoldEnd = function (e, t) {
                      var i = this.getFoldLine(e, t);
                      return i ? i.end.row : e;
                    }),
                    (this.getRowFoldStart = function (e, t) {
                      var i = this.getFoldLine(e, t);
                      return i ? i.start.row : e;
                    }),
                    (this.getFoldDisplayLine = function (e, t, i, n, s) {
                      null == n && (n = e.start.row),
                        null == s && (s = 0),
                        null == t && (t = e.end.row),
                        null == i && (i = this.getLine(t).length);
                      var r = this.doc,
                        o = '';
                      return (
                        e.walk(
                          function (e, t, i, a) {
                            if (!(t < n)) {
                              if (t == n) {
                                if (i < s) return;
                                a = Math.max(s, a);
                              }
                              o += null != e ? e : r.getLine(t).substring(a, i);
                            }
                          },
                          t,
                          i
                        ),
                        o
                      );
                    }),
                    (this.getDisplayLine = function (e, t, i, n) {
                      var s,
                        r = this.getFoldLine(e);
                      return r
                        ? this.getFoldDisplayLine(r, e, t, i, n)
                        : (s = this.doc.getLine(e)).substring(n || 0, t || s.length);
                    }),
                    (this.$cloneFoldData = function () {
                      var e = [];
                      return (e = this.$foldData.map(function (t) {
                        var i = t.folds.map(function (e) {
                          return e.clone();
                        });
                        return new s(e, i);
                      }));
                    }),
                    (this.toggleFold = function (e) {
                      var t,
                        i,
                        n = this.selection.getRange();
                      if (n.isEmpty()) {
                        var s = n.start;
                        if ((t = this.getFoldAt(s.row, s.column))) return void this.expandFold(t);
                        (i = this.findMatchingBracket(s))
                          ? 1 == n.comparePoint(i)
                            ? (n.end = i)
                            : ((n.start = i), n.start.column++, n.end.column--)
                          : (i = this.findMatchingBracket({ row: s.row, column: s.column + 1 }))
                          ? (1 == n.comparePoint(i) ? (n.end = i) : (n.start = i), n.start.column++)
                          : (n = this.getCommentFoldRange(s.row, s.column) || n);
                      } else {
                        var r = this.getFoldsInRange(n);
                        if (e && r.length) return void this.expandFolds(r);
                        1 == r.length && (t = r[0]);
                      }
                      if (
                        (t || (t = this.getFoldAt(n.start.row, n.start.column)),
                        t && t.range.toString() == n.toString())
                      )
                        this.expandFold(t);
                      else {
                        var o = '...';
                        if (!n.isMultiLine()) {
                          if ((o = this.getTextRange(n)).length < 4) return;
                          o = o.trim().substring(0, 2) + '..';
                        }
                        this.addFold(o, n);
                      }
                    }),
                    (this.getCommentFoldRange = function (e, t, i) {
                      var s = new o(this, e, t),
                        r = s.getCurrentToken(),
                        a = r && r.type;
                      if (r && /^comment|string/.test(a)) {
                        'comment' == (a = a.match(/comment|string/)[0]) && (a += '|doc-start');
                        var l = new RegExp(a),
                          h = new n();
                        if (1 != i) {
                          do {
                            r = s.stepBackward();
                          } while (r && l.test(r.type));
                          s.stepForward();
                        }
                        if (
                          ((h.start.row = s.getCurrentTokenRow()),
                          (h.start.column = s.getCurrentTokenColumn() + 2),
                          (s = new o(this, e, t)),
                          -1 != i)
                        ) {
                          var c = -1;
                          do {
                            if (((r = s.stepForward()), -1 == c)) {
                              var u = this.getState(s.$row);
                              l.test(u) || (c = s.$row);
                            } else if (s.$row > c) break;
                          } while (r && l.test(r.type));
                          r = s.stepBackward();
                        } else r = s.getCurrentToken();
                        return (
                          (h.end.row = s.getCurrentTokenRow()),
                          (h.end.column = s.getCurrentTokenColumn() + r.value.length - 2),
                          h
                        );
                      }
                    }),
                    (this.foldAll = function (e, t, i, n) {
                      null == i && (i = 1e5);
                      var s = this.foldWidgets;
                      if (s) {
                        t = t || this.getLength();
                        for (var r = (e = e || 0); r < t; r++)
                          if ((null == s[r] && (s[r] = this.getFoldWidget(r)), 'start' == s[r] && (!n || n(r)))) {
                            var o = this.getFoldWidgetRange(r);
                            o &&
                              o.isMultiLine() &&
                              o.end.row <= t &&
                              o.start.row >= e &&
                              ((r = o.end.row), (o.collapseChildren = i), this.addFold('...', o));
                          }
                      }
                    }),
                    (this.foldToLevel = function (e) {
                      for (this.foldAll(); e-- > 0; ) this.unfold(null, !1);
                    }),
                    (this.foldAllComments = function () {
                      var e = this;
                      this.foldAll(null, null, null, function (t) {
                        for (var i = e.getTokens(t), n = 0; n < i.length; n++) {
                          var s = i[n];
                          if ('text' != s.type || !/^\s+$/.test(s.value)) return !!/comment/.test(s.type);
                        }
                      });
                    }),
                    (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) {
                      this.$foldMode != e &&
                        ((this.$foldMode = e),
                        this.off('change', this.$updateFoldWidgets),
                        this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets),
                        this._signal('changeAnnotation'),
                        e && 'manual' != this.$foldStyle
                          ? ((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))
                          : (this.foldWidgets = null));
                    }),
                    (this.getParentFoldRangeData = function (e, t) {
                      var i = this.foldWidgets;
                      if (!i || (t && i[e])) return {};
                      for (var n, s = e - 1; s >= 0; ) {
                        var r = i[s];
                        if ((null == r && (r = i[s] = this.getFoldWidget(s)), 'start' == r)) {
                          var o = this.getFoldWidgetRange(s);
                          if ((n || (n = o), o && o.end.row >= e)) break;
                        }
                        s--;
                      }
                      return { range: -1 !== s && o, firstRange: n };
                    }),
                    (this.onFoldWidgetClick = function (e, t) {
                      var i = { children: (t = t.domEvent).shiftKey, all: t.ctrlKey || t.metaKey, siblings: t.altKey };
                      if (!this.$toggleFoldWidget(e, i)) {
                        var n = t.target || t.srcElement;
                        n && /ace_fold-widget/.test(n.className) && (n.className += ' ace_invalid');
                      }
                    }),
                    (this.$toggleFoldWidget = function (e, t) {
                      if (this.getFoldWidget) {
                        var i = this.getFoldWidget(e),
                          n = this.getLine(e),
                          s = 'end' === i ? -1 : 1,
                          r = this.getFoldAt(e, -1 === s ? 0 : n.length, s);
                        if (r) return t.children || t.all ? this.removeFold(r) : this.expandFold(r), r;
                        var o = this.getFoldWidgetRange(e, !0);
                        if (
                          o &&
                          !o.isMultiLine() &&
                          (r = this.getFoldAt(o.start.row, o.start.column, 1)) &&
                          o.isEqual(r.range)
                        )
                          return this.removeFold(r), r;
                        if (t.siblings) {
                          var a = this.getParentFoldRangeData(e);
                          if (a.range)
                            var l = a.range.start.row + 1,
                              h = a.range.end.row;
                          this.foldAll(l, h, t.all ? 1e4 : 0);
                        } else
                          t.children
                            ? ((h = o ? o.end.row : this.getLength()), this.foldAll(e + 1, h, t.all ? 1e4 : 0))
                            : o && (t.all && (o.collapseChildren = 1e4), this.addFold('...', o));
                        return o;
                      }
                    }),
                    (this.toggleFoldWidget = function (e) {
                      var t = this.selection.getCursor().row;
                      t = this.getRowFoldStart(t);
                      var i = this.$toggleFoldWidget(t, {});
                      if (!i) {
                        var n = this.getParentFoldRangeData(t, !0);
                        if ((i = n.range || n.firstRange)) {
                          t = i.start.row;
                          var s = this.getFoldAt(t, this.getLine(t).length, 1);
                          s ? this.removeFold(s) : this.addFold('...', i);
                        }
                      }
                    }),
                    (this.updateFoldWidgets = function (e) {
                      var t = e.start.row,
                        i = e.end.row - t;
                      if (0 === i) this.foldWidgets[t] = null;
                      else if ('remove' == e.action) this.foldWidgets.splice(t, i + 1, null);
                      else {
                        var n = Array(i + 1);
                        n.unshift(t, 1), this.foldWidgets.splice.apply(this.foldWidgets, n);
                      }
                    }),
                    (this.tokenizerUpdateFoldWidgets = function (e) {
                      var t = e.data;
                      t.first != t.last &&
                        this.foldWidgets.length > t.first &&
                        this.foldWidgets.splice(t.first, this.foldWidgets.length);
                    });
                };
              }
            ),
            ace.define(
              'ace/edit_session/bracket_match',
              ['require', 'exports', 'module', 'ace/token_iterator', 'ace/range'],
              function (e, t, i) {
                'use strict';
                var n = e('../token_iterator').TokenIterator,
                  s = e('../range').Range;
                t.BracketMatch = function () {
                  (this.findMatchingBracket = function (e, t) {
                    if (0 == e.column) return null;
                    var i = t || this.getLine(e.row).charAt(e.column - 1);
                    if ('' == i) return null;
                    var n = i.match(/([\(\[\{])|([\)\]\}])/);
                    return n ? (n[1] ? this.$findClosingBracket(n[1], e) : this.$findOpeningBracket(n[2], e)) : null;
                  }),
                    (this.getBracketRange = function (e) {
                      var t,
                        i = this.getLine(e.row),
                        n = !0,
                        r = i.charAt(e.column - 1),
                        o = r && r.match(/([\(\[\{])|([\)\]\}])/);
                      if (
                        (o ||
                          ((r = i.charAt(e.column)),
                          (e = { row: e.row, column: e.column + 1 }),
                          (o = r && r.match(/([\(\[\{])|([\)\]\}])/)),
                          (n = !1)),
                        !o)
                      )
                        return null;
                      if (o[1]) {
                        if (!(a = this.$findClosingBracket(o[1], e))) return null;
                        (t = s.fromPoints(e, a)), n || (t.end.column++, t.start.column--), (t.cursor = t.end);
                      } else {
                        var a;
                        if (!(a = this.$findOpeningBracket(o[2], e))) return null;
                        (t = s.fromPoints(a, e)), n || (t.start.column++, t.end.column--), (t.cursor = t.start);
                      }
                      return t;
                    }),
                    (this.getMatchingBracketRanges = function (e) {
                      var t = this.getLine(e.row),
                        i = t.charAt(e.column - 1),
                        n = i && i.match(/([\(\[\{])|([\)\]\}])/);
                      if (
                        (n ||
                          ((i = t.charAt(e.column)),
                          (e = { row: e.row, column: e.column + 1 }),
                          (n = i && i.match(/([\(\[\{])|([\)\]\}])/))),
                        !n)
                      )
                        return null;
                      var r = new s(e.row, e.column - 1, e.row, e.column),
                        o = n[1] ? this.$findClosingBracket(n[1], e) : this.$findOpeningBracket(n[2], e);
                      return o ? [r, new s(o.row, o.column, o.row, o.column + 1)] : [r];
                    }),
                    (this.$brackets = {
                      ')': '(',
                      '(': ')',
                      ']': '[',
                      '[': ']',
                      '{': '}',
                      '}': '{',
                      '<': '>',
                      '>': '<',
                    }),
                    (this.$findOpeningBracket = function (e, t, i) {
                      var s = this.$brackets[e],
                        r = 1,
                        o = new n(this, t.row, t.column),
                        a = o.getCurrentToken();
                      if ((a || (a = o.stepForward()), a)) {
                        i ||
                          (i = new RegExp(
                            '(\\.?' +
                              a.type
                                .replace('.', '\\.')
                                .replace('rparen', '.paren')
                                .replace(/\b(?:end)\b/, '(?:start|begin|end)') +
                              ')+'
                          ));
                        for (var l = t.column - o.getCurrentTokenColumn() - 2, h = a.value; ; ) {
                          for (; l >= 0; ) {
                            var c = h.charAt(l);
                            if (c == s) {
                              if (0 == (r -= 1))
                                return { row: o.getCurrentTokenRow(), column: l + o.getCurrentTokenColumn() };
                            } else c == e && (r += 1);
                            l -= 1;
                          }
                          do {
                            a = o.stepBackward();
                          } while (a && !i.test(a.type));
                          if (null == a) break;
                          l = (h = a.value).length - 1;
                        }
                        return null;
                      }
                    }),
                    (this.$findClosingBracket = function (e, t, i) {
                      var s = this.$brackets[e],
                        r = 1,
                        o = new n(this, t.row, t.column),
                        a = o.getCurrentToken();
                      if ((a || (a = o.stepForward()), a)) {
                        i ||
                          (i = new RegExp(
                            '(\\.?' +
                              a.type
                                .replace('.', '\\.')
                                .replace('lparen', '.paren')
                                .replace(/\b(?:start|begin)\b/, '(?:start|begin|end)') +
                              ')+'
                          ));
                        for (var l = t.column - o.getCurrentTokenColumn(); ; ) {
                          for (var h = a.value, c = h.length; l < c; ) {
                            var u = h.charAt(l);
                            if (u == s) {
                              if (0 == (r -= 1))
                                return { row: o.getCurrentTokenRow(), column: l + o.getCurrentTokenColumn() };
                            } else u == e && (r += 1);
                            l += 1;
                          }
                          do {
                            a = o.stepForward();
                          } while (a && !i.test(a.type));
                          if (null == a) break;
                          l = 0;
                        }
                        return null;
                      }
                    });
                };
              }
            ),
            ace.define(
              'ace/edit_session',
              [
                'require',
                'exports',
                'module',
                'ace/lib/oop',
                'ace/lib/lang',
                'ace/bidihandler',
                '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, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./lib/lang'),
                  r = e('./bidihandler').BidiHandler,
                  o = e('./config'),
                  a = e('./lib/event_emitter').EventEmitter,
                  l = e('./selection').Selection,
                  h = e('./mode/text').Mode,
                  c = e('./range').Range,
                  u = e('./document').Document,
                  d = e('./background_tokenizer').BackgroundTokenizer,
                  f = e('./search_highlight').SearchHighlight,
                  g = function (e, t) {
                    (this.$breakpoints = []),
                      (this.$decorations = []),
                      (this.$frontMarkers = {}),
                      (this.$backMarkers = {}),
                      (this.$markerId = 1),
                      (this.$undoSelect = !0),
                      (this.$foldData = []),
                      (this.id = 'session' + ++g.$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 u(e)),
                      this.setDocument(e),
                      (this.selection = new l(this)),
                      (this.$bidiHandler = new r(this)),
                      o.resetOptions(this),
                      this.setMode(t),
                      o._signal('session', this);
                  };
                (g.$uid = 0),
                  function () {
                    n.implement(this, a),
                      (this.setDocument = function (e) {
                        this.doc && this.doc.off('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,
                          i = this.$getRowCacheIndex(this.$docRowCache, e) + 1;
                        t > i && (this.$docRowCache.splice(i, t), this.$screenRowCache.splice(i, t));
                      }),
                      (this.$getRowCacheIndex = function (e, t) {
                        for (var i = 0, n = e.length - 1; i <= n; ) {
                          var s = (i + n) >> 1,
                            r = e[s];
                          if (t > r) i = s + 1;
                          else {
                            if (!(t < r)) return s;
                            n = s - 1;
                          }
                        }
                        return i - 1;
                      }),
                      (this.resetCaches = function () {
                        (this.$modified = !0),
                          (this.$wrapData = []),
                          (this.$rowLengthCache = []),
                          this.$resetRowCache(0),
                          this.bgTokenizer && this.bgTokenizer.start(0);
                      }),
                      (this.onChangeFold = function (e) {
                        var t = e.data;
                        this.$resetRowCache(t.start.row);
                      }),
                      (this.onChange = function (e) {
                        (this.$modified = !0), this.$bidiHandler.onChange(e), this.$resetRowCache(e.start.row);
                        var t = this.$updateInternalDataOnChange(e);
                        !this.$fromUndo &&
                          this.$undoManager &&
                          (t &&
                            t.length &&
                            (this.$undoManager.add({ action: 'removeFolds', folds: t }, this.mergeUndoDeltas),
                            (this.mergeUndoDeltas = !0)),
                          this.$undoManager.add(e, this.mergeUndoDeltas),
                          (this.mergeUndoDeltas = !0),
                          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.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 i,
                          n = this.bgTokenizer.getTokens(e),
                          s = 0;
                        if (null == t) {
                          var r = n.length - 1;
                          s = this.getLine(e).length;
                        } else for (r = 0; r < n.length && !((s += n[r].value.length) >= t); r++);
                        return (i = n[r]) ? ((i.index = r), (i.start = s - i.value.length), i) : null;
                      }),
                      (this.setUndoManager = function (e) {
                        if (((this.$undoManager = e), this.$informUndoManager && this.$informUndoManager.cancel(), e)) {
                          var t = this;
                          e.addSession(this),
                            (this.$syncInformUndoManager = function () {
                              t.$informUndoManager.cancel(), (t.mergeUndoDeltas = !1);
                            }),
                            (this.$informUndoManager = s.delayedCall(this.$syncInformUndoManager));
                        } else this.$syncInformUndoManager = function () {};
                      }),
                      (this.markUndoGroup = function () {
                        this.$syncInformUndoManager && this.$syncInformUndoManager();
                      }),
                      (this.$defaultUndoManager = {
                        undo: function () {},
                        redo: function () {},
                        hasUndo: function () {},
                        hasRedo: function () {},
                        reset: function () {},
                        add: function () {},
                        addSelection: function () {},
                        startNewGroup: function () {},
                        addSession: function () {},
                      }),
                      (this.getUndoManager = function () {
                        return this.$undoManager || this.$defaultUndoManager;
                      }),
                      (this.getTabString = function () {
                        return this.getUseSoftTabs() ? s.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 && e.column % this.$tabSize == 0;
                      }),
                      (this.setNavigateWithinSoftTabs = function (e) {
                        this.setOption('navigateWithinSoftTabs', e);
                      }),
                      (this.getNavigateWithinSoftTabs = function () {
                        return this.$navigateWithinSoftTabs;
                      }),
                      (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) {
                        void 0 === t && (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, i, n) {
                        var s = this.$markerId++,
                          r = {
                            range: e,
                            type: i || 'line',
                            renderer: 'function' == typeof i ? i : null,
                            clazz: t,
                            inFront: !!n,
                            id: s,
                          };
                        return (
                          n
                            ? ((this.$frontMarkers[s] = r), this._signal('changeFrontMarker'))
                            : ((this.$backMarkers[s] = r), this._signal('changeBackMarker')),
                          s
                        );
                      }),
                      (this.addDynamicMarker = function (e, t) {
                        if (e.update) {
                          var i = this.$markerId++;
                          return (
                            (e.id = i),
                            (e.inFront = !!t),
                            t
                              ? ((this.$frontMarkers[i] = e), this._signal('changeFrontMarker'))
                              : ((this.$backMarkers[i] = e), this._signal('changeBackMarker')),
                            e
                          );
                        }
                      }),
                      (this.removeMarker = function (e) {
                        var t = this.$frontMarkers[e] || this.$backMarkers[e];
                        t &&
                          (delete (t.inFront ? this.$frontMarkers : this.$backMarkers)[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, i, n) {
                        'number' != typeof t && ((i = t), (t = e)), i || (i = 'ace_step');
                        var s = new c(e, 0, t, 1 / 0);
                        return (s.id = this.addMarker(s, i, 'fullLine', n)), s;
                      }),
                      (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 i = this.getLine(e),
                          n = !1;
                        if (
                          (t > 0 && (n = !!i.charAt(t - 1).match(this.tokenRe)),
                          n || (n = !!i.charAt(t).match(this.tokenRe)),
                          n)
                        )
                          var s = this.tokenRe;
                        else s = /^\s+$/.test(i.slice(t - 1, t + 1)) ? /\s/ : this.nonTokenRe;
                        var r = t;
                        if (r > 0) {
                          do {
                            r--;
                          } while (r >= 0 && i.charAt(r).match(s));
                          r++;
                        }
                        for (var o = t; o < i.length && i.charAt(o).match(s); ) o++;
                        return new c(e, r, e, o);
                      }),
                      (this.getAWordRange = function (e, t) {
                        for (
                          var i = this.getWordRange(e, t), n = this.getLine(i.end.row);
                          n.charAt(i.end.column).match(/[ \t]/);

                        )
                          i.end.column += 1;
                        return i;
                      }),
                      (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 (e) {
                        var t = e.data;
                        this.bgTokenizer.start(t.first), this._signal('tokenizerUpdate', e);
                      }),
                      (this.$modes = o.$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 i = e,
                            n = i.path;
                        } else n = e || 'ace/mode/text';
                        if (
                          (this.$modes['ace/mode/text'] || (this.$modes['ace/mode/text'] = new h()),
                          this.$modes[n] && !i)
                        )
                          return this.$onChangeMode(this.$modes[n]), void (t && t());
                        (this.$modeId = n),
                          o.loadModule(
                            ['mode', n],
                            function (e) {
                              if (this.$modeId !== n) return t && t();
                              this.$modes[n] && !i
                                ? this.$onChangeMode(this.$modes[n])
                                : e &&
                                  e.Mode &&
                                  ((e = new e.Mode(i)),
                                  i || ((this.$modes[n] = e), (e.$id = n)),
                                  this.$onChangeMode(e)),
                                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)) {
                          var i = this.$mode;
                          (this.$mode = e), this.$stopWorker(), this.$useWorker && this.$startWorker();
                          var n = e.getTokenizer();
                          if (void 0 !== n.on) {
                            var s = this.onReloadTokenizer.bind(this);
                            n.on('update', s);
                          }
                          if (this.bgTokenizer) this.bgTokenizer.setTokenizer(n);
                          else {
                            this.bgTokenizer = new d(n);
                            var r = this;
                            this.bgTokenizer.on('update', function (e) {
                              r._signal('tokenizerUpdate', e);
                            });
                          }
                          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', { oldMode: i, mode: e }));
                        }
                      }),
                      (this.$stopWorker = function () {
                        this.$worker && (this.$worker.terminate(), (this.$worker = null));
                      }),
                      (this.$startWorker = function () {
                        try {
                          this.$worker = this.$mode.createWorker(this);
                        } catch (e) {
                          o.warn('Could not load worker', e), (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 ? Math.max(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(),
                              i = this.$rowLengthCache,
                              n = 0,
                              s = 0,
                              r = this.$foldData[s],
                              o = r ? r.start.row : 1 / 0,
                              a = t.length,
                              l = 0;
                            l < a;
                            l++
                          ) {
                            if (l > o) {
                              if ((l = r.end.row + 1) >= a) break;
                              o = (r = this.$foldData[s++]) ? r.start.row : 1 / 0;
                            }
                            null == i[l] && (i[l] = this.$getStringScreenWidth(t[l])[0]), i[l] > n && (n = i[l]);
                          }
                          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 i = e.length - 1; -1 != i; i--) {
                            var n = e[i];
                            'insert' == n.action || 'remove' == n.action
                              ? this.doc.revertDelta(n)
                              : n.folds && this.addFolds(n.folds);
                          }
                          !t &&
                            this.$undoSelect &&
                            (e.selectionBefore
                              ? this.selection.fromJSON(e.selectionBefore)
                              : this.selection.setRange(this.$getUndoSelection(e, !0))),
                            (this.$fromUndo = !1);
                        }
                      }),
                      (this.redoChanges = function (e, t) {
                        if (e.length) {
                          this.$fromUndo = !0;
                          for (var i = 0; i < e.length; i++) {
                            var n = e[i];
                            ('insert' != n.action && 'remove' != n.action) || this.doc.$safeApplyDelta(n);
                          }
                          !t &&
                            this.$undoSelect &&
                            (e.selectionAfter
                              ? this.selection.fromJSON(e.selectionAfter)
                              : this.selection.setRange(this.$getUndoSelection(e, !1))),
                            (this.$fromUndo = !1);
                        }
                      }),
                      (this.setUndoSelect = function (e) {
                        this.$undoSelect = e;
                      }),
                      (this.$getUndoSelection = function (e, t) {
                        function i(e) {
                          return t ? 'insert' !== e.action : 'insert' === e.action;
                        }
                        for (var n, s, r = 0; r < e.length; r++) {
                          var o = e[r];
                          o.start &&
                            (n
                              ? i(o)
                                ? ((s = o.start),
                                  -1 == n.compare(s.row, s.column) && n.setStart(s),
                                  (s = o.end),
                                  1 == n.compare(s.row, s.column) && n.setEnd(s))
                                : ((s = o.start),
                                  -1 == n.compare(s.row, s.column) && (n = c.fromPoints(o.start, o.start)))
                              : (n = i(o) ? c.fromPoints(o.start, o.end) : c.fromPoints(o.start, o.start)));
                        }
                        return n;
                      }),
                      (this.replace = function (e, t) {
                        return this.doc.replace(e, t);
                      }),
                      (this.moveText = function (e, t, i) {
                        var n = this.getTextRange(e),
                          s = this.getFoldsInRange(e),
                          r = c.fromPoints(t, t);
                        if (!i) {
                          this.remove(e);
                          var o = e.start.row - e.end.row;
                          (h = o ? -e.end.column : e.start.column - e.end.column) &&
                            (r.start.row == e.end.row && r.start.column > e.end.column && (r.start.column += h),
                            r.end.row == e.end.row && r.end.column > e.end.column && (r.end.column += h)),
                            o && r.start.row >= e.end.row && ((r.start.row += o), (r.end.row += o));
                        }
                        if (((r.end = this.insert(r.start, n)), s.length)) {
                          var a = e.start,
                            l = r.start,
                            h = ((o = l.row - a.row), l.column - a.column);
                          this.addFolds(
                            s.map(function (e) {
                              return (
                                (e = e.clone()).start.row == a.row && (e.start.column += h),
                                e.end.row == a.row && (e.end.column += h),
                                (e.start.row += o),
                                (e.end.row += o),
                                e
                              );
                            })
                          );
                        }
                        return r;
                      }),
                      (this.indentRows = function (e, t, i) {
                        i = i.replace(/\t/g, this.getTabString());
                        for (var n = e; n <= t; n++) this.doc.insertInLine({ row: n, column: 0 }, i);
                      }),
                      (this.outdentRows = function (e) {
                        for (
                          var t = e.collapseRows(), i = new c(0, 0, 0, 0), n = this.getTabSize(), s = t.start.row;
                          s <= t.end.row;
                          ++s
                        ) {
                          var r = this.getLine(s);
                          (i.start.row = s), (i.end.row = s);
                          for (var o = 0; o < n && ' ' == r.charAt(o); ++o);
                          o < n && '\t' == r.charAt(o)
                            ? ((i.start.column = o), (i.end.column = o + 1))
                            : ((i.start.column = 0), (i.end.column = o)),
                            this.remove(i);
                        }
                      }),
                      (this.$moveLines = function (e, t, i) {
                        if (((e = this.getRowFoldStart(e)), (t = this.getRowFoldEnd(t)), i < 0)) {
                          if ((s = this.getRowFoldStart(e + i)) < 0) return 0;
                          var n = s - e;
                        } else if (i > 0) {
                          var s;
                          if ((s = this.getRowFoldEnd(t + i)) > this.doc.getLength() - 1) return 0;
                          n = s - t;
                        } else (e = this.$clipRowToDocument(e)), (n = (t = this.$clipRowToDocument(t)) - e + 1);
                        var r = new c(e, 0, t, Number.MAX_VALUE),
                          o = this.getFoldsInRange(r).map(function (e) {
                            return ((e = e.clone()).start.row += n), (e.end.row += n), e;
                          }),
                          a = 0 == i ? this.doc.getLines(e, t) : this.doc.removeFullLines(e, t);
                        return this.doc.insertFullLines(e + n, a), o.length && this.addFolds(o), n;
                      }),
                      (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 Math.max(0, Math.min(e, this.doc.getLength() - 1));
                      }),
                      (this.$clipColumnToRow = function (e, t) {
                        return t < 0 ? 0 : Math.min(this.doc.getLine(e).length, t);
                      }),
                      (this.$clipPositionToDocument = function (e, t) {
                        if (((t = Math.max(0, t)), e < 0)) (e = 0), (t = 0);
                        else {
                          var i = this.doc.getLength();
                          e >= i
                            ? ((e = i - 1), (t = this.doc.getLine(i - 1).length))
                            : (t = Math.min(this.doc.getLine(e).length, t));
                        }
                        return { row: e, column: t };
                      }),
                      (this.$clipRangeToDocument = function (e) {
                        e.start.row < 0
                          ? ((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.$bidiHandler.markAsDirty(),
                          this.$useWrapMode && this._signal('changeWrapMode'));
                      }),
                      (this.adjustWrapLimit = function (e, t) {
                        var i = this.$wrapLimitRange;
                        i.max < 0 && (i = { min: t, max: t });
                        var n = this.$constrainWrapLimit(e, i.min, i.max);
                        return (
                          n != this.$wrapLimit &&
                          n > 1 &&
                          ((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, i) {
                        return t && (e = Math.max(t, e)), i && (e = Math.min(i, 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,
                          i = e.action,
                          n = e.start,
                          s = e.end,
                          r = n.row,
                          o = s.row,
                          a = o - r,
                          l = null;
                        if (((this.$updating = !0), 0 != a))
                          if ('remove' === i) {
                            this[t ? '$wrapData' : '$rowLengthCache'].splice(r, a);
                            var h = this.$foldData;
                            (l = this.getFoldsInRange(e)), this.removeFolds(l);
                            var c = 0;
                            if ((p = this.getFoldLine(s.row))) {
                              p.addRemoveChars(s.row, s.column, n.column - s.column), p.shiftRow(-a);
                              var u = this.getFoldLine(r);
                              u && u !== p && (u.merge(p), (p = u)), (c = h.indexOf(p) + 1);
                            }
                            for (; c < h.length; c++) (p = h[c]).start.row >= s.row && p.shiftRow(-a);
                            o = r;
                          } else {
                            var d = Array(a);
                            d.unshift(r, 0);
                            var f = t ? this.$wrapData : this.$rowLengthCache;
                            if ((f.splice.apply(f, d), (h = this.$foldData), (c = 0), (p = this.getFoldLine(r)))) {
                              var g = p.range.compareInside(n.row, n.column);
                              0 == g
                                ? (p = p.split(n.row, n.column)) &&
                                  (p.shiftRow(a), p.addRemoveChars(o, 0, s.column - n.column))
                                : -1 == g && (p.addRemoveChars(r, 0, s.column - n.column), p.shiftRow(a)),
                                (c = h.indexOf(p) + 1);
                            }
                            for (; c < h.length; c++) {
                              var p;
                              (p = h[c]).start.row >= r && p.shiftRow(a);
                            }
                          }
                        else
                          (a = Math.abs(e.start.column - e.end.column)),
                            'remove' === i && ((l = this.getFoldsInRange(e)), this.removeFolds(l), (a = -a)),
                            (p = this.getFoldLine(r)) && p.addRemoveChars(r, n.column, a);
                        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(r, o) : this.$updateRowLengthCache(r, o),
                          l
                        );
                      }),
                      (this.$updateRowLengthCache = function (e, t, i) {
                        (this.$rowLengthCache[e] = null), (this.$rowLengthCache[t] = null);
                      }),
                      (this.$updateWrapData = function (i, n) {
                        var s,
                          r,
                          o = this.doc.getAllLines(),
                          a = this.getTabSize(),
                          l = this.$wrapData,
                          h = this.$wrapLimit,
                          c = i;
                        for (n = Math.min(n, o.length - 1); c <= n; )
                          (r = this.getFoldLine(c, r))
                            ? ((s = []),
                              r.walk(
                                function (i, n, r, a) {
                                  var l;
                                  if (null != i) {
                                    (l = this.$getDisplayTokens(i, s.length))[0] = e;
                                    for (var h = 1; h < l.length; h++) l[h] = t;
                                  } else l = this.$getDisplayTokens(o[n].substring(a, r), s.length);
                                  s = s.concat(l);
                                }.bind(this),
                                r.end.row,
                                o[r.end.row].length + 1
                              ),
                              (l[r.start.row] = this.$computeWrapSplits(s, h, a)),
                              (c = r.end.row + 1))
                            : ((s = this.$getDisplayTokens(o[c])), (l[c] = this.$computeWrapSplits(s, h, a)), c++);
                      });
                    var e = 3,
                      t = 4;
                    function i(e) {
                      return (
                        !(e < 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))
                      );
                    }
                    (this.$computeWrapSplits = function (i, n, s) {
                      if (0 == i.length) return [];
                      var r = [],
                        o = i.length,
                        a = 0,
                        l = 0,
                        h = this.$wrapAsCode,
                        c = this.$indentedSoftWrap,
                        u = n <= Math.max(2 * s, 8) || !1 === c ? 0 : Math.floor(n / 2);
                      function d(e) {
                        for (var t = e - a, n = a; n < e; n++) {
                          var o = i[n];
                          (12 !== o && 2 !== o) || (t -= 1);
                        }
                        r.length ||
                          ((f = (function () {
                            var e = 0;
                            if (0 === u) return e;
                            if (c)
                              for (var t = 0; t < i.length; t++) {
                                var n = i[t];
                                if (10 == n) e += 1;
                                else {
                                  if (11 != n) {
                                    if (12 == n) continue;
                                    break;
                                  }
                                  e += s;
                                }
                              }
                            return h && !1 !== c && (e += s), Math.min(e, u);
                          })()),
                          (r.indent = f)),
                          (l += t),
                          r.push(l),
                          (a = e);
                      }
                      for (var f = 0; o - a > n - f; ) {
                        var g = a + n - f;
                        if (i[g - 1] >= 10 && i[g] >= 10) d(g);
                        else if (i[g] != e && i[g] != t) {
                          for (var p = Math.max(g - (n - (n >> 2)), a - 1); g > p && i[g] < e; ) g--;
                          if (h) {
                            for (; g > p && i[g] < e; ) g--;
                            for (; g > p && 9 == i[g]; ) g--;
                          } else for (; g > p && i[g] < 10; ) g--;
                          g > p ? d(++g) : (2 == i[(g = a + n)] && g--, d(g - f));
                        } else {
                          for (; g != a - 1 && i[g] != e; g--);
                          if (g > a) {
                            d(g);
                            continue;
                          }
                          for (g = a + n; g < i.length && i[g] == t; g++);
                          if (g == i.length) break;
                          d(g);
                        }
                      }
                      return r;
                    }),
                      (this.$getDisplayTokens = function (e, t) {
                        var n,
                          s = [];
                        t = t || 0;
                        for (var r = 0; r < e.length; r++) {
                          var o = e.charCodeAt(r);
                          if (9 == o) {
                            (n = this.getScreenTabSize(s.length + t)), s.push(11);
                            for (var a = 1; a < n; a++) s.push(12);
                          } else
                            32 == o
                              ? s.push(10)
                              : (o > 39 && o < 48) || (o > 57 && o < 64)
                              ? s.push(9)
                              : o >= 4352 && i(o)
                              ? s.push(1, 2)
                              : s.push(1);
                        }
                        return s;
                      }),
                      (this.$getStringScreenWidth = function (e, t, n) {
                        if (0 == t) return [0, 0];
                        var s, r;
                        for (
                          null == t && (t = 1 / 0), n = n || 0, r = 0;
                          r < e.length &&
                          (9 == (s = e.charCodeAt(r))
                            ? (n += this.getScreenTabSize(n))
                            : s >= 4352 && i(s)
                            ? (n += 2)
                            : (n += 1),
                          !(n > t));
                          r++
                        );
                        return [n, r];
                      }),
                      (this.lineWidgets = null),
                      (this.getRowLength = function (e) {
                        var t = 1;
                        return (
                          this.lineWidgets && (t += (this.lineWidgets[e] && this.lineWidgets[e].rowCount) || 0),
                          this.$useWrapMode && this.$wrapData[e] ? this.$wrapData[e].length + t : 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),
                            i = this.$wrapData[t.row];
                          return i.length && i[0] < t.column ? i.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 i = this.documentToScreenRow(e, t);
                        return this.getScreenLastRowColumn(i);
                      }),
                      (this.getDocumentLastRowColumnPosition = function (e, t) {
                        var i = this.documentToScreenRow(e, t);
                        return this.screenToDocumentPosition(i, Number.MAX_VALUE / 10);
                      }),
                      (this.getRowSplitData = function (e) {
                        return this.$useWrapMode ? this.$wrapData[e] : void 0;
                      }),
                      (this.getScreenTabSize = function (e) {
                        return this.$tabSize - (e % this.$tabSize | 0);
                      }),
                      (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, i) {
                        if (e < 0) return { row: 0, column: 0 };
                        var n,
                          s,
                          r = 0,
                          o = 0,
                          a = 0,
                          l = 0,
                          h = this.$screenRowCache,
                          c = this.$getRowCacheIndex(h, e),
                          u = h.length;
                        if (u && c >= 0) {
                          (a = h[c]), (r = this.$docRowCache[c]);
                          var d = e > h[u - 1];
                        } else d = !u;
                        for (
                          var f = this.getLength() - 1, g = this.getNextFoldLine(r), p = g ? g.start.row : 1 / 0;
                          a <= e && !(a + (l = this.getRowLength(r)) > e || r >= f);

                        )
                          (a += l),
                            ++r > p &&
                              ((r = g.end.row + 1), (p = (g = this.getNextFoldLine(r, g)) ? g.start.row : 1 / 0)),
                            d && (this.$docRowCache.push(r), this.$screenRowCache.push(a));
                        if (g && g.start.row <= r) (n = this.getFoldDisplayLine(g)), (r = g.start.row);
                        else {
                          if (a + l <= e || r > f) return { row: f, column: this.getLine(f).length };
                          (n = this.getLine(r)), (g = null);
                        }
                        var m = 0,
                          v = Math.floor(e - a);
                        if (this.$useWrapMode) {
                          var w = this.$wrapData[r];
                          w &&
                            ((s = w[v]),
                            v > 0 &&
                              w.length &&
                              ((m = w.indent), (o = w[v - 1] || w[w.length - 1]), (n = n.substring(o))));
                        }
                        return (
                          void 0 !== i &&
                            this.$bidiHandler.isBidiRow(a + v, r, v) &&
                            (t = this.$bidiHandler.offsetToCol(i)),
                          (o += this.$getStringScreenWidth(n, t - m)[1]),
                          this.$useWrapMode && o >= s && (o = s - 1),
                          g ? g.idxToPosition(o) : { row: r, column: o }
                        );
                      }),
                      (this.documentToScreenPosition = function (e, t) {
                        if (void 0 === t) var i = this.$clipPositionToDocument(e.row, e.column);
                        else i = this.$clipPositionToDocument(e, t);
                        (e = i.row), (t = i.column);
                        var n,
                          s = 0,
                          r = null;
                        (n = this.getFoldAt(e, t, 1)) && ((e = n.start.row), (t = n.start.column));
                        var o,
                          a = 0,
                          l = this.$docRowCache,
                          h = this.$getRowCacheIndex(l, e),
                          c = l.length;
                        if (c && h >= 0) {
                          (a = l[h]), (s = this.$screenRowCache[h]);
                          var u = e > l[c - 1];
                        } else u = !c;
                        for (var d = this.getNextFoldLine(a), f = d ? d.start.row : 1 / 0; a < e; ) {
                          if (a >= f) {
                            if ((o = d.end.row + 1) > e) break;
                            f = (d = this.getNextFoldLine(o, d)) ? d.start.row : 1 / 0;
                          } else o = a + 1;
                          (s += this.getRowLength(a)),
                            (a = o),
                            u && (this.$docRowCache.push(a), this.$screenRowCache.push(s));
                        }
                        var g = '';
                        d && a >= f
                          ? ((g = this.getFoldDisplayLine(d, e, t)), (r = d.start.row))
                          : ((g = this.getLine(e).substring(0, t)), (r = e));
                        var p = 0;
                        if (this.$useWrapMode) {
                          var m = this.$wrapData[r];
                          if (m) {
                            for (var v = 0; g.length >= m[v]; ) s++, v++;
                            (g = g.substring(m[v - 1] || 0, g.length)), (p = v > 0 ? m.indent : 0);
                          }
                        }
                        return (
                          this.lineWidgets &&
                            this.lineWidgets[a] &&
                            this.lineWidgets[a].rowsAbove &&
                            (s += this.lineWidgets[a].rowsAbove),
                          { row: s, column: p + this.$getStringScreenWidth(g)[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)
                          for (
                            var i = this.$wrapData.length,
                              n = 0,
                              s = ((a = 0), (t = this.$foldData[a++]) ? t.start.row : 1 / 0);
                            n < i;

                          ) {
                            var r = this.$wrapData[n];
                            (e += r ? r.length + 1 : 1),
                              ++n > s && ((n = t.end.row + 1), (s = (t = this.$foldData[a++]) ? t.start.row : 1 / 0));
                          }
                        else {
                          e = this.getLength();
                          for (var o = this.$foldData, a = 0; a < o.length; a++) e -= (t = o[a]).end.row - t.start.row;
                        }
                        return this.lineWidgets && (e += this.$getWidgetScreenLength()), e;
                      }),
                      (this.$setFontMetrics = function (e) {
                        this.$enableVarChar &&
                          (this.$getStringScreenWidth = function (t, i, n) {
                            if (0 === i) return [0, 0];
                            var s, r;
                            for (
                              i || (i = 1 / 0), n = n || 0, r = 0;
                              r < t.length &&
                              !(
                                (n += '\t' === (s = t.charAt(r)) ? this.getScreenTabSize(n) : e.getCharacterWidth(s)) >
                                i
                              );
                              r++
                            );
                            return [n, r];
                          });
                      }),
                      (this.destroy = function () {
                        this.bgTokenizer && (this.bgTokenizer.setDocument(null), (this.bgTokenizer = null)),
                          this.$stopWorker(),
                          this.removeAllListeners(),
                          this.doc && this.doc.off('change', this.$onChange),
                          this.selection.detach();
                      }),
                      (this.isFullWidth = i);
                  }.call(g.prototype),
                  e('./edit_session/folding').Folding.call(g.prototype),
                  e('./edit_session/bracket_match').BracketMatch.call(g.prototype),
                  o.defineOptions(g.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)) {
                            var t = 'number' == typeof e ? e : null;
                            this.setWrapLimitRange(t, t), this.setUseWrapMode(!0);
                          } else this.setUseWrapMode(!1);
                      },
                      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) != this.$wrapAsCode &&
                          ((this.$wrapAsCode = e),
                          this.$useWrapMode && ((this.$useWrapMode = !1), this.setUseWrapMode(!0)));
                      },
                      initialValue: 'auto',
                    },
                    indentedSoftWrap: {
                      set: function () {
                        this.$useWrapMode && ((this.$useWrapMode = !1), this.setUseWrapMode(!0));
                      },
                      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) {
                        (e = parseInt(e)) > 0 &&
                          this.$tabSize !== e &&
                          ((this.$modified = !0),
                          (this.$rowLengthCache = []),
                          (this.$tabSize = e),
                          this._signal('changeTabSize'));
                      },
                      initialValue: 4,
                      handlesSet: !0,
                    },
                    navigateWithinSoftTabs: { initialValue: !1 },
                    foldStyle: {
                      set: function (e) {
                        this.setFoldStyle(e);
                      },
                      handlesSet: !0,
                    },
                    overwrite: {
                      set: function (e) {
                        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;
                      },
                      handlesSet: !0,
                    },
                  }),
                  (t.EditSession = g);
              }
            ),
            ace.define(
              'ace/search',
              ['require', 'exports', 'module', 'ace/lib/lang', 'ace/lib/oop', 'ace/range'],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/lang'),
                  s = e('./lib/oop'),
                  r = e('./range').Range,
                  o = function () {
                    this.$options = {};
                  };
                (function () {
                  (this.set = function (e) {
                    return s.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,
                        i = this.$matchIterator(e, t);
                      if (!i) return !1;
                      var n = null;
                      return (
                        i.forEach(function (e, i, s, o) {
                          return (
                            (n = new r(e, i, s, o)),
                            !(
                              i == o &&
                              t.start &&
                              t.start.start &&
                              0 != t.skipCurrent &&
                              n.isEqual(t.start) &&
                              ((n = null), 1)
                            )
                          );
                        }),
                        n
                      );
                    }),
                    (this.findAll = function (e) {
                      var t = this.$options;
                      if (!t.needle) return [];
                      this.$assembleRegExp(t);
                      var i = t.range,
                        s = i ? e.getLines(i.start.row, i.end.row) : e.doc.getAllLines(),
                        o = [],
                        a = t.re;
                      if (t.$isMultiLine) {
                        var l,
                          h = a.length,
                          c = s.length - h;
                        e: for (var u = a.offset || 0; u <= c; u++) {
                          for (var d = 0; d < h; d++) if (-1 == s[u + d].search(a[d])) continue e;
                          var f = s[u],
                            g = s[u + h - 1],
                            p = f.length - f.match(a[0])[0].length,
                            m = g.match(a[h - 1])[0].length;
                          (l && l.end.row === u && l.end.column > p) ||
                            (o.push((l = new r(u, p, u + h - 1, m))), h > 2 && (u = u + h - 2));
                        }
                      } else
                        for (var v = 0; v < s.length; v++) {
                          var w = n.getMatchOffsets(s[v], a);
                          for (d = 0; d < w.length; d++) {
                            var b = w[d];
                            o.push(new r(v, b.offset, v, b.offset + b.length));
                          }
                        }
                      if (i) {
                        var y = i.start.column,
                          $ = i.start.column;
                        for (v = 0, d = o.length - 1; v < d && o[v].start.column < y && o[v].start.row == i.start.row; )
                          v++;
                        for (; v < d && o[d].end.column > $ && o[d].end.row == i.end.row; ) d--;
                        for (o = o.slice(v, d + 1), v = 0, d = o.length; v < d; v++)
                          (o[v].start.row += i.start.row), (o[v].end.row += i.start.row);
                      }
                      return o;
                    }),
                    (this.replace = function (e, t) {
                      var i = this.$options,
                        n = this.$assembleRegExp(i);
                      if (i.$isMultiLine) return t;
                      if (n) {
                        var s = n.exec(e);
                        if (!s || s[0].length != e.length) return null;
                        if (((t = e.replace(n, t)), i.preserveCase)) {
                          t = t.split('');
                          for (var r = Math.min(e.length, e.length); r--; ) {
                            var o = e[r];
                            o && o.toLowerCase() != o ? (t[r] = t[r].toUpperCase()) : (t[r] = t[r].toLowerCase());
                          }
                          t = t.join('');
                        }
                        return t;
                      }
                    }),
                    (this.$assembleRegExp = function (e, t) {
                      if (e.needle instanceof RegExp) return (e.re = e.needle);
                      var i = e.needle;
                      if (!e.needle) return (e.re = !1);
                      e.regExp || (i = n.escapeRegExp(i)),
                        e.wholeWord &&
                          (i = (function (e, t) {
                            function i(e) {
                              return /\w/.test(e) || t.regExp ? '\\b' : '';
                            }
                            return i(e[0]) + e + i(e[e.length - 1]);
                          })(i, e));
                      var s = e.caseSensitive ? 'gm' : 'gmi';
                      if (((e.$isMultiLine = !t && /[\n\r]/.test(i)), e.$isMultiLine))
                        return (e.re = this.$assembleMultilineRegExp(i, s));
                      try {
                        var r = new RegExp(i, s);
                      } catch (e) {
                        r = !1;
                      }
                      return (e.re = r);
                    }),
                    (this.$assembleMultilineRegExp = function (e, t) {
                      for (var i = e.replace(/\r\n|\r|\n/g, '$\n^').split('\n'), n = [], s = 0; s < i.length; s++)
                        try {
                          n.push(new RegExp(i[s], t));
                        } catch (e) {
                          return !1;
                        }
                      return n;
                    }),
                    (this.$matchIterator = function (e, t) {
                      var i = this.$assembleRegExp(t);
                      if (!i) return !1;
                      var n = 1 == t.backwards,
                        s = 0 != t.skipCurrent,
                        r = t.range,
                        o = t.start;
                      o || (o = r ? r[n ? 'end' : 'start'] : e.selection.getRange()),
                        o.start && (o = o[s != n ? 'end' : 'start']);
                      var a = r ? r.start.row : 0,
                        l = r ? r.end.row : e.getLength() - 1;
                      if (n)
                        var h = function (e) {
                          var i = o.row;
                          if (!u(i, o.column, e)) {
                            for (i--; i >= a; i--) if (u(i, Number.MAX_VALUE, e)) return;
                            if (0 != t.wrap) for (i = l, a = o.row; i >= a; i--) if (u(i, Number.MAX_VALUE, e)) return;
                          }
                        };
                      else
                        h = function (e) {
                          var i = o.row;
                          if (!u(i, o.column, e)) {
                            for (i += 1; i <= l; i++) if (u(i, 0, e)) return;
                            if (0 != t.wrap) for (i = a, l = o.row; i <= l; i++) if (u(i, 0, e)) return;
                          }
                        };
                      if (t.$isMultiLine)
                        var c = i.length,
                          u = function (t, s, r) {
                            var o = n ? t - c + 1 : t;
                            if (!(o < 0 || o + c > e.getLength())) {
                              var a = e.getLine(o),
                                l = a.search(i[0]);
                              if (!((!n && l < s) || -1 === l)) {
                                for (var h = 1; h < c; h++) if (-1 == (a = e.getLine(o + h)).search(i[h])) return;
                                var u = a.match(i[c - 1])[0].length;
                                if (!(n && u > s)) return !!r(o, l, o + c - 1, u) || void 0;
                              }
                            }
                          };
                      else
                        u = n
                          ? function (t, n, s) {
                              var r,
                                o = e.getLine(t),
                                a = [],
                                l = 0;
                              for (i.lastIndex = 0; (r = i.exec(o)); ) {
                                var h = r[0].length;
                                if (((l = r.index), !h)) {
                                  if (l >= o.length) break;
                                  i.lastIndex = l += 1;
                                }
                                if (r.index + h > n) break;
                                a.push(r.index, h);
                              }
                              for (var c = a.length - 1; c >= 0; c -= 2) {
                                var u = a[c - 1];
                                if (s(t, u, t, u + (h = a[c]))) return !0;
                              }
                            }
                          : function (t, n, s) {
                              var r,
                                o,
                                a = e.getLine(t);
                              for (i.lastIndex = n; (o = i.exec(a)); ) {
                                var l = o[0].length;
                                if (s(t, (r = o.index), t, r + l)) return !0;
                                if (!l && ((i.lastIndex = r += 1), r >= a.length)) return !1;
                              }
                            };
                      return { forEach: h };
                    });
                }).call(o.prototype),
                  (t.Search = o);
              }
            ),
            ace.define(
              'ace/keyboard/hash_handler',
              ['require', 'exports', 'module', 'ace/lib/keys', 'ace/lib/useragent'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/keys'),
                  s = e('../lib/useragent'),
                  r = n.KEY_MODS;
                function o(e, t) {
                  (this.platform = t || (s.isMac ? 'mac' : 'win')),
                    (this.commands = {}),
                    (this.commandKeyBinding = {}),
                    this.addCommands(e),
                    (this.$singleCommand = !0);
                }
                function a(e, t) {
                  o.call(this, e, t), (this.$singleCommand = !1);
                }
                (a.prototype = o.prototype),
                  function () {
                    function e(e) {
                      return ('object' == typeof e && e.bindKey && e.bindKey.position) || (e.isDefault ? -100 : 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 i = e && ('string' == typeof e ? e : e.name);
                        (e = this.commands[i]), t || delete this.commands[i];
                        var n = this.commandKeyBinding;
                        for (var s in n) {
                          var r = n[s];
                          if (r == e) delete n[s];
                          else if (Array.isArray(r)) {
                            var o = r.indexOf(e);
                            -1 != o && (r.splice(o, 1), 1 == r.length && (n[s] = r[0]));
                          }
                        }
                      }),
                      (this.bindKey = function (e, t, i) {
                        if (('object' == typeof e && e && (null == i && (i = e.position), (e = e[this.platform])), e))
                          return '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 s = e.split(/\s+/);
                                  (e = s.pop()),
                                    s.forEach(function (e) {
                                      var t = this.parseKeys(e),
                                        i = r[t.hashId] + t.key;
                                      (n += (n ? ' ' : '') + i), this._addCommandToBinding(n, 'chainKeys');
                                    }, this),
                                    (n += ' ');
                                }
                                var o = this.parseKeys(e),
                                  a = r[o.hashId] + o.key;
                                this._addCommandToBinding(n + a, t, i);
                              }, this);
                      }),
                      (this._addCommandToBinding = function (t, i, n) {
                        var s,
                          r = this.commandKeyBinding;
                        if (i)
                          if (!r[t] || this.$singleCommand) r[t] = i;
                          else {
                            Array.isArray(r[t]) ? -1 != (s = r[t].indexOf(i)) && r[t].splice(s, 1) : (r[t] = [r[t]]),
                              'number' != typeof n && (n = e(i));
                            var o = r[t];
                            for (s = 0; s < o.length && !(e(o[s]) > n); s++);
                            o.splice(s, 0, i);
                          }
                        else delete r[t];
                      }),
                      (this.addCommands = function (e) {
                        e &&
                          Object.keys(e).forEach(function (t) {
                            var i = e[t];
                            if (i) {
                              if ('string' == typeof i) return this.bindKey(i, t);
                              'function' == typeof i && (i = { exec: i }),
                                'object' == typeof i && (i.name || (i.name = t), this.addCommand(i));
                            }
                          }, 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;
                            }),
                          i = t.pop(),
                          s = n[i];
                        if (n.FUNCTION_KEYS[s]) i = n.FUNCTION_KEYS[s].toLowerCase();
                        else {
                          if (!t.length) return { key: i, hashId: -1 };
                          if (1 == t.length && 'shift' == t[0]) return { key: i.toUpperCase(), hashId: -1 };
                        }
                        for (var r = 0, o = t.length; o--; ) {
                          var a = n.KEY_MODS[t[o]];
                          if (null == a)
                            return (
                              'undefined' != typeof console && console.error('invalid modifier ' + t[o] + ' in ' + e),
                              !1
                            );
                          r |= a;
                        }
                        return { key: i, hashId: r };
                      }),
                      (this.findKeyCommand = function (e, t) {
                        var i = r[e] + t;
                        return this.commandKeyBinding[i];
                      }),
                      (this.handleKeyboard = function (e, t, i, n) {
                        if (!(n < 0)) {
                          var s = r[t] + i,
                            o = this.commandKeyBinding[s];
                          return (
                            e.$keyChain && ((e.$keyChain += ' ' + s), (o = this.commandKeyBinding[e.$keyChain] || o)),
                            !o || ('chainKeys' != o && 'chainKeys' != o[o.length - 1])
                              ? (e.$keyChain &&
                                  ((t && 4 != t) || 1 != i.length
                                    ? (-1 == t || n > 0) && (e.$keyChain = '')
                                    : (e.$keyChain = e.$keyChain.slice(0, -s.length - 1))),
                                { command: o })
                              : ((e.$keyChain = e.$keyChain || s), { command: 'null' })
                          );
                        }
                      }),
                      (this.getStatusText = function (e, t) {
                        return t.$keyChain || '';
                      });
                  }.call(o.prototype),
                  (t.HashHandler = o),
                  (t.MultiHashHandler = a);
              }
            ),
            ace.define(
              'ace/commands/command_manager',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/keyboard/hash_handler', 'ace/lib/event_emitter'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/oop'),
                  s = e('../keyboard/hash_handler').MultiHashHandler,
                  r = e('../lib/event_emitter').EventEmitter,
                  o = function (e, t) {
                    s.call(this, t, e),
                      (this.byName = this.commands),
                      this.setDefaultHandler('exec', function (e) {
                        return e.command.exec(e.editor, e.args || {});
                      });
                  };
                n.inherits(o, s),
                  function () {
                    n.implement(this, r),
                      (this.exec = function (e, t, i) {
                        if (Array.isArray(e)) {
                          for (var n = e.length; n--; ) if (this.exec(e[n], t, i)) return !0;
                          return !1;
                        }
                        if (('string' == typeof e && (e = this.commands[e]), !e)) return !1;
                        if (t && t.$readOnly && !e.readOnly) return !1;
                        if (0 != this.$checkCommandState && e.isAvailable && !e.isAvailable(t)) return !1;
                        var s = { editor: t, command: e, args: i };
                        return (
                          (s.returnValue = this._emit('exec', s)), this._signal('afterExec', s), !1 !== s.returnValue
                        );
                      }),
                      (this.toggleRecording = function (e) {
                        if (!this.$inReplay)
                          return (
                            e && e._emit('changeStatus'),
                            this.recording
                              ? (this.macro.pop(),
                                this.off('exec', this.$addCommandToMacro),
                                this.macro.length || (this.macro = this.oldMacro),
                                (this.recording = !1))
                              : (this.$addCommandToMacro ||
                                  (this.$addCommandToMacro = function (e) {
                                    this.macro.push([e.command, e.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(o.prototype),
                  (t.CommandManager = o);
              }
            ),
            ace.define(
              'ace/commands/default_commands',
              ['require', 'exports', 'module', 'ace/lib/lang', 'ace/config', 'ace/range'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/lang'),
                  s = e('../config'),
                  r = e('../range').Range;
                function o(e, t) {
                  return { win: e, mac: t };
                }
                t.commands = [
                  {
                    name: 'showSettingsMenu',
                    description: 'Show settings menu',
                    bindKey: o('Ctrl-,', 'Command-,'),
                    exec: function (e) {
                      s.loadModule('ace/ext/settings_menu', function (t) {
                        t.init(e), e.showSettingsMenu();
                      });
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'goToNextError',
                    description: 'Go to next error',
                    bindKey: o('Alt-E', 'F4'),
                    exec: function (e) {
                      s.loadModule('./ext/error_marker', function (t) {
                        t.showErrorMarker(e, 1);
                      });
                    },
                    scrollIntoView: 'animate',
                    readOnly: !0,
                  },
                  {
                    name: 'goToPreviousError',
                    description: 'Go to previous error',
                    bindKey: o('Alt-Shift-E', 'Shift-F4'),
                    exec: function (e) {
                      s.loadModule('./ext/error_marker', function (t) {
                        t.showErrorMarker(e, -1);
                      });
                    },
                    scrollIntoView: 'animate',
                    readOnly: !0,
                  },
                  {
                    name: 'selectall',
                    description: 'Select all',
                    bindKey: o('Ctrl-A', 'Command-A'),
                    exec: function (e) {
                      e.selectAll();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'centerselection',
                    description: 'Center selection',
                    bindKey: o(null, 'Ctrl-L'),
                    exec: function (e) {
                      e.centerSelection();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'gotoline',
                    description: 'Go to line...',
                    bindKey: o('Ctrl-L', 'Command-L'),
                    exec: function (e, t) {
                      'number' != typeof t || isNaN(t) || e.gotoLine(t), e.prompt({ $type: 'gotoLine' });
                    },
                    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',
                    description: 'Toggle fold widget',
                    bindKey: o('F2', 'F2'),
                    exec: function (e) {
                      e.session.toggleFoldWidget();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'toggleParentFoldWidget',
                    description: 'Toggle parent fold widget',
                    bindKey: o('Alt-F2', 'Alt-F2'),
                    exec: function (e) {
                      e.session.toggleFoldWidget(!0);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'foldall',
                    description: 'Fold all',
                    bindKey: o(null, 'Ctrl-Command-Option-0'),
                    exec: function (e) {
                      e.session.foldAll();
                    },
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'foldAllComments',
                    description: 'Fold all comments',
                    bindKey: o(null, 'Ctrl-Command-Option-0'),
                    exec: function (e) {
                      e.session.foldAllComments();
                    },
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'foldOther',
                    description: 'Fold other',
                    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',
                    description: 'Unfold all',
                    bindKey: o('Alt-Shift-0', 'Command-Option-Shift-0'),
                    exec: function (e) {
                      e.session.unfold();
                    },
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'findnext',
                    description: 'Find next',
                    bindKey: o('Ctrl-K', 'Command-G'),
                    exec: function (e) {
                      e.findNext();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'findprevious',
                    description: 'Find previous',
                    bindKey: o('Ctrl-Shift-K', 'Command-Shift-G'),
                    exec: function (e) {
                      e.findPrevious();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'center',
                    readOnly: !0,
                  },
                  {
                    name: 'selectOrFindNext',
                    description: 'Select or find next',
                    bindKey: o('Alt-K', 'Ctrl-G'),
                    exec: function (e) {
                      e.selection.isEmpty() ? e.selection.selectWord() : e.findNext();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'selectOrFindPrevious',
                    description: 'Select or find previous',
                    bindKey: o('Alt-Shift-K', 'Ctrl-Shift-G'),
                    exec: function (e) {
                      e.selection.isEmpty() ? e.selection.selectWord() : e.findPrevious();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'find',
                    description: 'Find',
                    bindKey: o('Ctrl-F', 'Command-F'),
                    exec: function (e) {
                      s.loadModule('ace/ext/searchbox', function (t) {
                        t.Search(e);
                      });
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'overwrite',
                    description: 'Overwrite',
                    bindKey: 'Insert',
                    exec: function (e) {
                      e.toggleOverwrite();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'selecttostart',
                    description: 'Select to start',
                    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',
                    description: 'Go to start',
                    bindKey: o('Ctrl-Home', 'Command-Home|Command-Up'),
                    exec: function (e) {
                      e.navigateFileStart();
                    },
                    multiSelectAction: 'forEach',
                    readOnly: !0,
                    scrollIntoView: 'animate',
                    aceCommandGroup: 'fileJump',
                  },
                  {
                    name: 'selectup',
                    description: 'Select up',
                    bindKey: o('Shift-Up', 'Shift-Up|Ctrl-Shift-P'),
                    exec: function (e) {
                      e.getSelection().selectUp();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'golineup',
                    description: 'Go line up',
                    bindKey: o('Up', 'Up|Ctrl-P'),
                    exec: function (e, t) {
                      e.navigateUp(t.times);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selecttoend',
                    description: 'Select to end',
                    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',
                    description: 'Go to end',
                    bindKey: o('Ctrl-End', 'Command-End|Command-Down'),
                    exec: function (e) {
                      e.navigateFileEnd();
                    },
                    multiSelectAction: 'forEach',
                    readOnly: !0,
                    scrollIntoView: 'animate',
                    aceCommandGroup: 'fileJump',
                  },
                  {
                    name: 'selectdown',
                    description: 'Select down',
                    bindKey: o('Shift-Down', 'Shift-Down|Ctrl-Shift-N'),
                    exec: function (e) {
                      e.getSelection().selectDown();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'golinedown',
                    description: 'Go line down',
                    bindKey: o('Down', 'Down|Ctrl-N'),
                    exec: function (e, t) {
                      e.navigateDown(t.times);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectwordleft',
                    description: 'Select word left',
                    bindKey: o('Ctrl-Shift-Left', 'Option-Shift-Left'),
                    exec: function (e) {
                      e.getSelection().selectWordLeft();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'gotowordleft',
                    description: 'Go to word left',
                    bindKey: o('Ctrl-Left', 'Option-Left'),
                    exec: function (e) {
                      e.navigateWordLeft();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selecttolinestart',
                    description: 'Select to line start',
                    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',
                    description: 'Go to line start',
                    bindKey: o('Alt-Left|Home', 'Command-Left|Home|Ctrl-A'),
                    exec: function (e) {
                      e.navigateLineStart();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectleft',
                    description: 'Select left',
                    bindKey: o('Shift-Left', 'Shift-Left|Ctrl-Shift-B'),
                    exec: function (e) {
                      e.getSelection().selectLeft();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'gotoleft',
                    description: 'Go to left',
                    bindKey: o('Left', 'Left|Ctrl-B'),
                    exec: function (e, t) {
                      e.navigateLeft(t.times);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectwordright',
                    description: 'Select word right',
                    bindKey: o('Ctrl-Shift-Right', 'Option-Shift-Right'),
                    exec: function (e) {
                      e.getSelection().selectWordRight();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'gotowordright',
                    description: 'Go to word right',
                    bindKey: o('Ctrl-Right', 'Option-Right'),
                    exec: function (e) {
                      e.navigateWordRight();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selecttolineend',
                    description: 'Select to line end',
                    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',
                    description: 'Go to line end',
                    bindKey: o('Alt-Right|End', 'Command-Right|End|Ctrl-E'),
                    exec: function (e) {
                      e.navigateLineEnd();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectright',
                    description: 'Select right',
                    bindKey: o('Shift-Right', 'Shift-Right'),
                    exec: function (e) {
                      e.getSelection().selectRight();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'gotoright',
                    description: 'Go to right',
                    bindKey: o('Right', 'Right|Ctrl-F'),
                    exec: function (e, t) {
                      e.navigateRight(t.times);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectpagedown',
                    description: 'Select page down',
                    bindKey: 'Shift-PageDown',
                    exec: function (e) {
                      e.selectPageDown();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'pagedown',
                    description: 'Page down',
                    bindKey: o(null, 'Option-PageDown'),
                    exec: function (e) {
                      e.scrollPageDown();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'gotopagedown',
                    description: 'Go to page down',
                    bindKey: o('PageDown', 'PageDown|Ctrl-V'),
                    exec: function (e) {
                      e.gotoPageDown();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'selectpageup',
                    description: 'Select page up',
                    bindKey: 'Shift-PageUp',
                    exec: function (e) {
                      e.selectPageUp();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'pageup',
                    description: 'Page up',
                    bindKey: o(null, 'Option-PageUp'),
                    exec: function (e) {
                      e.scrollPageUp();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'gotopageup',
                    description: 'Go to page up',
                    bindKey: 'PageUp',
                    exec: function (e) {
                      e.gotoPageUp();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'scrollup',
                    description: 'Scroll up',
                    bindKey: o('Ctrl-Up', null),
                    exec: function (e) {
                      e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight);
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'scrolldown',
                    description: 'Scroll down',
                    bindKey: o('Ctrl-Down', null),
                    exec: function (e) {
                      e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight);
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'selectlinestart',
                    description: 'Select line start',
                    bindKey: 'Shift-Home',
                    exec: function (e) {
                      e.getSelection().selectLineStart();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectlineend',
                    description: 'Select line end',
                    bindKey: 'Shift-End',
                    exec: function (e) {
                      e.getSelection().selectLineEnd();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'togglerecording',
                    description: 'Toggle recording',
                    bindKey: o('Ctrl-Alt-E', 'Command-Option-E'),
                    exec: function (e) {
                      e.commands.toggleRecording(e);
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'replaymacro',
                    description: 'Replay macro',
                    bindKey: o('Ctrl-Shift-E', 'Command-Shift-E'),
                    exec: function (e) {
                      e.commands.replay(e);
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'jumptomatching',
                    description: 'Jump to matching',
                    bindKey: o('Ctrl-\\|Ctrl-P', 'Command-\\'),
                    exec: function (e) {
                      e.jumpToMatching();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'animate',
                    readOnly: !0,
                  },
                  {
                    name: 'selecttomatching',
                    description: 'Select to matching',
                    bindKey: o('Ctrl-Shift-\\|Ctrl-Shift-P', 'Command-Shift-\\'),
                    exec: function (e) {
                      e.jumpToMatching(!0);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'animate',
                    readOnly: !0,
                  },
                  {
                    name: 'expandToMatching',
                    description: 'Expand to matching',
                    bindKey: o('Ctrl-Shift-M', 'Ctrl-Shift-M'),
                    exec: function (e) {
                      e.jumpToMatching(!0, !0);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'animate',
                    readOnly: !0,
                  },
                  {
                    name: 'passKeysToBrowser',
                    description: 'Pass keys to browser',
                    bindKey: o(null, null),
                    exec: function () {},
                    passEvent: !0,
                    readOnly: !0,
                  },
                  { name: 'copy', description: 'Copy', exec: function (e) {}, readOnly: !0 },
                  {
                    name: 'cut',
                    description: 'Cut',
                    exec: function (e) {
                      var t =
                        e.$copyWithEmptySelection && e.selection.isEmpty()
                          ? e.selection.getLineRange()
                          : e.selection.getRange();
                      e._emit('cut', t), t.isEmpty() || e.session.remove(t), e.clearSelection();
                    },
                    scrollIntoView: 'cursor',
                    multiSelectAction: 'forEach',
                  },
                  {
                    name: 'paste',
                    description: 'Paste',
                    exec: function (e, t) {
                      e.$handlePaste(t);
                    },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removeline',
                    description: 'Remove line',
                    bindKey: o('Ctrl-D', 'Command-D'),
                    exec: function (e) {
                      e.removeLines();
                    },
                    scrollIntoView: 'cursor',
                    multiSelectAction: 'forEachLine',
                  },
                  {
                    name: 'duplicateSelection',
                    description: 'Duplicate selection',
                    bindKey: o('Ctrl-Shift-D', 'Command-Shift-D'),
                    exec: function (e) {
                      e.duplicateSelection();
                    },
                    scrollIntoView: 'cursor',
                    multiSelectAction: 'forEach',
                  },
                  {
                    name: 'sortlines',
                    description: 'Sort lines',
                    bindKey: o('Ctrl-Alt-S', 'Command-Alt-S'),
                    exec: function (e) {
                      e.sortLines();
                    },
                    scrollIntoView: 'selection',
                    multiSelectAction: 'forEachLine',
                  },
                  {
                    name: 'togglecomment',
                    description: 'Toggle comment',
                    bindKey: o('Ctrl-/', 'Command-/'),
                    exec: function (e) {
                      e.toggleCommentLines();
                    },
                    multiSelectAction: 'forEachLine',
                    scrollIntoView: 'selectionPart',
                  },
                  {
                    name: 'toggleBlockComment',
                    description: 'Toggle block comment',
                    bindKey: o('Ctrl-Shift-/', 'Command-Shift-/'),
                    exec: function (e) {
                      e.toggleBlockComment();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'selectionPart',
                  },
                  {
                    name: 'modifyNumberUp',
                    description: 'Modify number up',
                    bindKey: o('Ctrl-Shift-Up', 'Alt-Shift-Up'),
                    exec: function (e) {
                      e.modifyNumber(1);
                    },
                    scrollIntoView: 'cursor',
                    multiSelectAction: 'forEach',
                  },
                  {
                    name: 'modifyNumberDown',
                    description: 'Modify number down',
                    bindKey: o('Ctrl-Shift-Down', 'Alt-Shift-Down'),
                    exec: function (e) {
                      e.modifyNumber(-1);
                    },
                    scrollIntoView: 'cursor',
                    multiSelectAction: 'forEach',
                  },
                  {
                    name: 'replace',
                    description: 'Replace',
                    bindKey: o('Ctrl-H', 'Command-Option-F'),
                    exec: function (e) {
                      s.loadModule('ace/ext/searchbox', function (t) {
                        t.Search(e, !0);
                      });
                    },
                  },
                  {
                    name: 'undo',
                    description: 'Undo',
                    bindKey: o('Ctrl-Z', 'Command-Z'),
                    exec: function (e) {
                      e.undo();
                    },
                  },
                  {
                    name: 'redo',
                    description: 'Redo',
                    bindKey: o('Ctrl-Shift-Z|Ctrl-Y', 'Command-Shift-Z|Command-Y'),
                    exec: function (e) {
                      e.redo();
                    },
                  },
                  {
                    name: 'copylinesup',
                    description: 'Copy lines up',
                    bindKey: o('Alt-Shift-Up', 'Command-Option-Up'),
                    exec: function (e) {
                      e.copyLinesUp();
                    },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'movelinesup',
                    description: 'Move lines up',
                    bindKey: o('Alt-Up', 'Option-Up'),
                    exec: function (e) {
                      e.moveLinesUp();
                    },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'copylinesdown',
                    description: 'Copy lines down',
                    bindKey: o('Alt-Shift-Down', 'Command-Option-Down'),
                    exec: function (e) {
                      e.copyLinesDown();
                    },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'movelinesdown',
                    description: 'Move lines down',
                    bindKey: o('Alt-Down', 'Option-Down'),
                    exec: function (e) {
                      e.moveLinesDown();
                    },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'del',
                    description: 'Delete',
                    bindKey: o('Delete', 'Delete|Ctrl-D|Shift-Delete'),
                    exec: function (e) {
                      e.remove('right');
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'backspace',
                    description: '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',
                    description: 'Cut or delete',
                    bindKey: o('Shift-Delete', null),
                    exec: function (e) {
                      if (!e.selection.isEmpty()) return !1;
                      e.remove('left');
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removetolinestart',
                    description: 'Remove to line start',
                    bindKey: o('Alt-Backspace', 'Command-Backspace'),
                    exec: function (e) {
                      e.removeToLineStart();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removetolineend',
                    description: 'Remove to line end',
                    bindKey: o('Alt-Delete', 'Ctrl-K|Command-Delete'),
                    exec: function (e) {
                      e.removeToLineEnd();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removetolinestarthard',
                    description: 'Remove to line start hard',
                    bindKey: o('Ctrl-Shift-Backspace', null),
                    exec: function (e) {
                      var t = e.selection.getRange();
                      (t.start.column = 0), e.session.remove(t);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removetolineendhard',
                    description: 'Remove to line end hard',
                    bindKey: o('Ctrl-Shift-Delete', null),
                    exec: function (e) {
                      var t = e.selection.getRange();
                      (t.end.column = Number.MAX_VALUE), e.session.remove(t);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removewordleft',
                    description: 'Remove word left',
                    bindKey: o('Ctrl-Backspace', 'Alt-Backspace|Ctrl-Alt-Backspace'),
                    exec: function (e) {
                      e.removeWordLeft();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'removewordright',
                    description: 'Remove word right',
                    bindKey: o('Ctrl-Delete', 'Alt-Delete'),
                    exec: function (e) {
                      e.removeWordRight();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'outdent',
                    description: 'Outdent',
                    bindKey: o('Shift-Tab', 'Shift-Tab'),
                    exec: function (e) {
                      e.blockOutdent();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'selectionPart',
                  },
                  {
                    name: 'indent',
                    description: 'Indent',
                    bindKey: o('Tab', 'Tab'),
                    exec: function (e) {
                      e.indent();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'selectionPart',
                  },
                  {
                    name: 'blockoutdent',
                    description: 'Block outdent',
                    bindKey: o('Ctrl-[', 'Ctrl-['),
                    exec: function (e) {
                      e.blockOutdent();
                    },
                    multiSelectAction: 'forEachLine',
                    scrollIntoView: 'selectionPart',
                  },
                  {
                    name: 'blockindent',
                    description: 'Block indent',
                    bindKey: o('Ctrl-]', 'Ctrl-]'),
                    exec: function (e) {
                      e.blockIndent();
                    },
                    multiSelectAction: 'forEachLine',
                    scrollIntoView: 'selectionPart',
                  },
                  {
                    name: 'insertstring',
                    description: 'Insert string',
                    exec: function (e, t) {
                      e.insert(t);
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'inserttext',
                    description: 'Insert text',
                    exec: function (e, t) {
                      e.insert(n.stringRepeat(t.text || '', t.times || 1));
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'splitline',
                    description: 'Split line',
                    bindKey: o(null, 'Ctrl-O'),
                    exec: function (e) {
                      e.splitLine();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'transposeletters',
                    description: 'Transpose letters',
                    bindKey: o('Alt-Shift-X', 'Ctrl-T'),
                    exec: function (e) {
                      e.transposeLetters();
                    },
                    multiSelectAction: function (e) {
                      e.transposeSelections(1);
                    },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'touppercase',
                    description: 'To uppercase',
                    bindKey: o('Ctrl-U', 'Ctrl-U'),
                    exec: function (e) {
                      e.toUpperCase();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'tolowercase',
                    description: 'To lowercase',
                    bindKey: o('Ctrl-Shift-U', 'Ctrl-Shift-U'),
                    exec: function (e) {
                      e.toLowerCase();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'autoindent',
                    description: 'Auto Indent',
                    bindKey: o(null, null),
                    exec: function (e) {
                      e.autoIndent();
                    },
                    multiSelectAction: 'forEachLine',
                    scrollIntoView: 'animate',
                  },
                  {
                    name: 'expandtoline',
                    description: 'Expand to line',
                    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',
                    description: 'Join lines',
                    bindKey: o(null, null),
                    exec: function (e) {
                      for (
                        var t = e.selection.isBackwards(),
                          i = t ? e.selection.getSelectionLead() : e.selection.getSelectionAnchor(),
                          s = t ? e.selection.getSelectionAnchor() : e.selection.getSelectionLead(),
                          o = e.session.doc.getLine(i.row).length,
                          a = e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/, ' ').length,
                          l = e.session.doc.getLine(i.row),
                          h = i.row + 1;
                        h <= s.row + 1;
                        h++
                      ) {
                        var c = n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(h)));
                        0 !== c.length && (c = ' ' + c), (l += c);
                      }
                      s.row + 1 < e.session.doc.getLength() - 1 && (l += e.session.doc.getNewLineCharacter()),
                        e.clearSelection(),
                        e.session.doc.replace(new r(i.row, 0, s.row + 2, 0), l),
                        a > 0
                          ? (e.selection.moveCursorTo(i.row, i.column), e.selection.selectTo(i.row, i.column + a))
                          : ((o = e.session.doc.getLine(i.row).length > o ? o + 1 : o),
                            e.selection.moveCursorTo(i.row, o));
                    },
                    multiSelectAction: 'forEach',
                    readOnly: !0,
                  },
                  {
                    name: 'invertSelection',
                    description: 'Invert selection',
                    bindKey: o(null, null),
                    exec: function (e) {
                      var t = e.session.doc.getLength() - 1,
                        i = e.session.doc.getLine(t).length,
                        n = e.selection.rangeList.ranges,
                        s = [];
                      n.length < 1 && (n = [e.selection.getRange()]);
                      for (var o = 0; o < n.length; o++)
                        o == n.length - 1 &&
                          ((n[o].end.row === t && n[o].end.column === i) ||
                            s.push(new r(n[o].end.row, n[o].end.column, t, i))),
                          0 === o
                            ? (0 === n[o].start.row && 0 === n[o].start.column) ||
                              s.push(new r(0, 0, n[o].start.row, n[o].start.column))
                            : s.push(new r(n[o - 1].end.row, n[o - 1].end.column, n[o].start.row, n[o].start.column));
                      for (e.exitMultiSelectMode(), e.clearSelection(), o = 0; o < s.length; o++)
                        e.selection.addRange(s[o], !1);
                    },
                    readOnly: !0,
                    scrollIntoView: 'none',
                  },
                  {
                    name: 'addLineAfter',
                    description: 'Add new line after the current line',
                    exec: function (e) {
                      e.selection.clearSelection(), e.navigateLineEnd(), e.insert('\n');
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'addLineBefore',
                    description: 'Add new line before the current line',
                    exec: function (e) {
                      e.selection.clearSelection();
                      var t = e.getCursorPosition();
                      e.selection.moveTo(t.row - 1, Number.MAX_VALUE), e.insert('\n'), 0 === t.row && e.navigateUp();
                    },
                    multiSelectAction: 'forEach',
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'openCommandPallete',
                    description: 'Open command pallete',
                    bindKey: o('F1', 'F1'),
                    exec: function (e) {
                      e.prompt({ $type: 'commands' });
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'modeSelect',
                    description: 'Change language mode...',
                    bindKey: o(null, null),
                    exec: function (e) {
                      e.prompt({ $type: 'modes' });
                    },
                    readOnly: !0,
                  },
                ];
                for (var a = 1; a < 9; a++)
                  t.commands.push({
                    name: 'foldToLevel' + a,
                    description: 'Fold To Level ' + a,
                    level: a,
                    exec: function (e) {
                      e.session.foldToLevel(this.level);
                    },
                    scrollIntoView: 'center',
                    readOnly: !0,
                  });
              }
            ),
            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',
                'ace/clipboard',
              ],
              function (e, t, i) {
                'use strict';
                e('./lib/fixoldbrowsers');
                var n = e('./lib/oop'),
                  s = e('./lib/dom'),
                  r = e('./lib/lang'),
                  o = e('./lib/useragent'),
                  a = e('./keyboard/textinput').TextInput,
                  l = e('./mouse/mouse_handler').MouseHandler,
                  h = e('./mouse/fold_handler').FoldHandler,
                  c = e('./keyboard/keybinding').KeyBinding,
                  u = e('./edit_session').EditSession,
                  d = e('./search').Search,
                  f = e('./range').Range,
                  g = e('./lib/event_emitter').EventEmitter,
                  p = e('./commands/command_manager').CommandManager,
                  m = e('./commands/default_commands').commands,
                  v = e('./config'),
                  w = e('./token_iterator').TokenIterator,
                  b = e('./clipboard'),
                  y = function (e, t, i) {
                    this.$toDestroy = [];
                    var n = e.getContainerElement();
                    (this.container = n),
                      (this.renderer = e),
                      (this.id = 'editor' + ++y.$uid),
                      (this.commands = new p(o.isMac ? 'mac' : 'win', m)),
                      'object' == typeof document &&
                        ((this.textInput = new a(e.getTextAreaContainer(), this)),
                        (this.renderer.textarea = this.textInput.getElement()),
                        (this.$mouseHandler = new l(this)),
                        new h(this)),
                      (this.keyBinding = new c(this)),
                      (this.$search = new d().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 || (i && i.session) || new u('')),
                      v.resetOptions(this),
                      i && this.setOptions(i),
                      v._signal('editor', this);
                  };
                (y.$uid = 0),
                  function () {
                    n.implement(this, g),
                      (this.$initOperationListeners = function () {
                        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, !0))),
                          this.on(
                            'change',
                            function () {
                              this.curOp || (this.startOperation(), (this.curOp.selectionBefore = this.$lastSel)),
                                (this.curOp.docChanged = !0);
                            }.bind(this),
                            !0
                          ),
                          this.on(
                            'changeSelection',
                            function () {
                              this.curOp || (this.startOperation(), (this.curOp.selectionBefore = this.$lastSel)),
                                (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 = this.session.curOp =
                            { command: e.command || {}, args: e.args, scrollTop: this.renderer.scrollTop }),
                          (this.curOp.selectionBefore = this.selection.toJSON());
                      }),
                      (this.endOperation = function (e) {
                        if (this.curOp && this.session) {
                          if ((e && !1 === e.returnValue) || !this.session) return (this.curOp = null);
                          if (1 == e && this.curOp.command && 'mouse' == this.curOp.command.name) return;
                          if ((this._signal('beforeEndOperation'), !this.curOp)) return;
                          var t = this.curOp.command,
                            i = t && t.scrollIntoView;
                          if (i) {
                            switch (i) {
                              case 'center-animate':
                                i = '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(),
                                  s = this.renderer.layerConfig;
                                (n.start.row >= s.lastRow || n.end.row <= s.firstRow) &&
                                  this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);
                            }
                            'animate' == i && this.renderer.animateScrolling(this.curOp.scrollTop);
                          }
                          var r = this.selection.toJSON();
                          (this.curOp.selectionAfter = r),
                            (this.$lastSel = this.selection.toJSON()),
                            this.session.getUndoManager().addSelection(r),
                            (this.prevOp = this.curOp),
                            (this.curOp = null);
                        }
                      }),
                      (this.$mergeableCommands = ['backspace', 'del', 'insertstring']),
                      (this.$historyTracker = function (e) {
                        if (this.$mergeUndoDeltas) {
                          var t = this.prevOp,
                            i = this.$mergeableCommands,
                            n = t.command && e.command.name == t.command.name;
                          if ('insertstring' == e.command.name) {
                            var s = e.args;
                            void 0 === this.mergeNextCommand && (this.mergeNextCommand = !0),
                              (n = n && this.mergeNextCommand && (!/\s/.test(s) || /\s/.test(t.args))),
                              (this.mergeNextCommand = !0);
                          } else n = n && -1 !== i.indexOf(e.command.name);
                          'always' != this.$mergeUndoDeltas && Date.now() - this.sequenceStartTime > 2e3 && (n = !1),
                            n
                              ? (this.session.mergeUndoDeltas = !0)
                              : -1 !== i.indexOf(e.command.name) && (this.sequenceStartTime = Date.now());
                        }
                      }),
                      (this.setKeyboardHandler = function (e, t) {
                        if (e && 'string' == typeof e && 'ace' != e) {
                          this.$keybindingId = e;
                          var i = this;
                          v.loadModule(['keybinding', e], function (n) {
                            i.$keybindingId == e && i.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 i = this.session.getSelection();
                            i.off('changeCursor', this.$onCursorChange),
                              i.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.onCursorChange(),
                                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 }),
                            e && e.bgTokenizer && e.bgTokenizer.scheduleStart();
                        }
                      }),
                      (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') || s.computedStyle(this.container).fontSize;
                      }),
                      (this.setFontSize = function (e) {
                        this.setOption('fontSize', e);
                      }),
                      (this.$highlightBrackets = function () {
                        if (!this.$highlightPending) {
                          var e = this;
                          (this.$highlightPending = !0),
                            setTimeout(function () {
                              e.$highlightPending = !1;
                              var t = e.session;
                              if (t && t.bgTokenizer) {
                                t.$bracketHighlight &&
                                  (t.$bracketHighlight.markerIds.forEach(function (e) {
                                    t.removeMarker(e);
                                  }),
                                  (t.$bracketHighlight = null));
                                var i = t.getMatchingBracketRanges(e.getCursorPosition());
                                if ((!i && t.$mode.getMatching && (i = t.$mode.getMatching(e.session)), i)) {
                                  var n = 'ace_bracket';
                                  Array.isArray(i) ? 1 == i.length && (n = 'ace_error_bracket') : (i = [i]),
                                    2 == i.length &&
                                      (0 == f.comparePoints(i[0].end, i[1].start)
                                        ? (i = [f.fromPoints(i[0].start, i[1].end)])
                                        : 0 == f.comparePoints(i[0].start, i[1].end) &&
                                          (i = [f.fromPoints(i[1].start, i[0].end)])),
                                    (t.$bracketHighlight = {
                                      ranges: i,
                                      markerIds: i.map(function (e) {
                                        return t.addMarker(e, n, '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 i = e.getCursorPosition(),
                                  n = new w(e.session, i.row, i.column),
                                  s = n.getCurrentToken();
                                if (!s || !/\b(?:tag-open|tag-name)/.test(s.type))
                                  return t.removeMarker(t.$tagHighlight), void (t.$tagHighlight = null);
                                if (-1 === s.type.indexOf('tag-open') || (s = n.stepForward())) {
                                  var r = s.value,
                                    o = s.value,
                                    a = 0,
                                    l = n.stepBackward();
                                  if ('<' === l.value)
                                    do {
                                      (l = s),
                                        (s = n.stepForward()) &&
                                          (-1 !== s.type.indexOf('tag-name')
                                            ? r === (o = s.value) && ('<' === l.value ? a++ : '</' === l.value && a--)
                                            : r === o && '/>' === s.value && a--);
                                    } while (s && a >= 0);
                                  else {
                                    do {
                                      if (((s = l), (l = n.stepBackward()), s))
                                        if (-1 !== s.type.indexOf('tag-name'))
                                          r === s.value && ('<' === l.value ? a++ : '</' === l.value && a--);
                                        else if ('/>' === s.value) {
                                          for (var h = 0, c = l; c; ) {
                                            if (-1 !== c.type.indexOf('tag-name') && c.value === r) {
                                              a--;
                                              break;
                                            }
                                            if ('<' === c.value) break;
                                            (c = n.stepBackward()), h++;
                                          }
                                          for (var u = 0; u < h; u++) n.stepForward();
                                        }
                                    } while (l && a <= 0);
                                    n.stepForward();
                                  }
                                  if (!s) return t.removeMarker(t.$tagHighlight), void (t.$tagHighlight = null);
                                  var d = n.getCurrentTokenRow(),
                                    g = n.getCurrentTokenColumn(),
                                    p = new f(d, g, d, g + s.value.length),
                                    m = t.$backMarkers[t.$tagHighlight];
                                  t.$tagHighlight &&
                                    null != m &&
                                    0 !== p.compareRange(m.range) &&
                                    (t.removeMarker(t.$tagHighlight), (t.$tagHighlight = null)),
                                    t.$tagHighlight || (t.$tagHighlight = t.addMarker(p, 'ace_bracket', 'text'));
                                }
                              }
                            }, 50);
                        }
                      }),
                      (this.focus = function () {
                        var e = this;
                        setTimeout(function () {
                          e.isFocused() || e.textInput.focus();
                        }),
                          this.textInput.focus();
                      }),
                      (this.isFocused = function () {
                        return this.textInput.isFocused();
                      }),
                      (this.blur = function () {
                        this.textInput.blur();
                      }),
                      (this.onFocus = function (e) {
                        this.$isFocused ||
                          ((this.$isFocused = !0),
                          this.renderer.showCursor(),
                          this.renderer.visualizeFocus(),
                          this._emit('focus', e));
                      }),
                      (this.onBlur = function (e) {
                        this.$isFocused &&
                          ((this.$isFocused = !1),
                          this.renderer.hideCursor(),
                          this.renderer.visualizeBlur(),
                          this._emit('blur', e));
                      }),
                      (this.$cursorChange = function () {
                        this.renderer.updateCursor(),
                          this.$highlightBrackets(),
                          this.$highlightTags(),
                          this.$updateHighlightActiveLine();
                      }),
                      (this.onDocumentChange = function (e) {
                        var t = this.session.$useWrapMode,
                          i = e.start.row == e.end.row ? e.end.row : 1 / 0;
                        this.renderer.updateLines(e.start.row, i, t), this._signal('change', e), this.$cursorChange();
                      }),
                      (this.onTokenizerUpdate = function (e) {
                        var t = e.data;
                        this.renderer.updateLines(t.first, t.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._signal('changeSelection');
                      }),
                      (this.$updateHighlightActiveLine = function () {
                        var e,
                          t = this.getSession();
                        if (
                          (this.$highlightActiveLine &&
                            (('line' == this.$selectionStyle && this.selection.isMultiLine()) ||
                              (e = this.getCursorPosition()),
                            this.renderer.theme &&
                              this.renderer.theme.$selectionColorConflict &&
                              !this.selection.isEmpty() &&
                              (e = !1),
                            !this.renderer.$maxLines ||
                              1 !== this.session.getLength() ||
                              this.renderer.$minLines > 1 ||
                              (e = !1)),
                          t.$highlightLineMarker && !e)
                        )
                          t.removeMarker(t.$highlightLineMarker.id), (t.$highlightLineMarker = null);
                        else if (!t.$highlightLineMarker && e) {
                          var i = new f(e.row, e.column, e.row, 1 / 0);
                          (i.id = t.addMarker(i, 'ace_active-line', 'screenLine')), (t.$highlightLineMarker = i);
                        } else
                          e &&
                            ((t.$highlightLineMarker.start.row = e.row),
                            (t.$highlightLineMarker.end.row = e.row),
                            (t.$highlightLineMarker.start.column = e.column),
                            t._signal('changeBackMarker'));
                      }),
                      (this.onSelectionChange = function (e) {
                        var t = this.session;
                        if (
                          (t.$selectionMarker && t.removeMarker(t.$selectionMarker),
                          (t.$selectionMarker = null),
                          this.selection.isEmpty())
                        )
                          this.$updateHighlightActiveLine();
                        else {
                          var i = this.selection.getRange(),
                            n = this.getSelectionStyle();
                          t.$selectionMarker = t.addMarker(i, 'ace_selection', n);
                        }
                        var s = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();
                        this.session.highlight(s), this._signal('changeSelection');
                      }),
                      (this.$getSelectionHighLightRegexp = function () {
                        var e = this.session,
                          t = this.getSelectionRange();
                        if (!t.isEmpty() && !t.isMultiLine()) {
                          var i = t.start.column,
                            n = t.end.column,
                            s = e.getLine(t.start.row),
                            r = s.substring(i, n);
                          if (!(r.length > 5e3) && /[\w\d]/.test(r)) {
                            var o = this.$search.$assembleRegExp({ wholeWord: !0, caseSensitive: !0, needle: r }),
                              a = s.substring(i - 1, n + 1);
                            if (o.test(a)) return o;
                          }
                        }
                      }),
                      (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 (e) {
                        this.renderer.updateText(), this._emit('changeMode', e);
                      }),
                      (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(),
                          t = this.session.doc.getNewLineCharacter(),
                          i = !1;
                        if (!e && this.$copyWithEmptySelection) {
                          i = !0;
                          for (var n = this.selection.getAllRanges(), s = 0; s < n.length; s++) {
                            var r = n[s];
                            (s && n[s - 1].start.row == r.start.row) || (e += this.session.getLine(r.start.row) + t);
                          }
                        }
                        var o = { text: e };
                        return this._signal('copy', o), (b.lineMode = !!i && o.text), o.text;
                      }),
                      (this.onCopy = function () {
                        this.commands.exec('copy', this);
                      }),
                      (this.onCut = function () {
                        this.commands.exec('cut', this);
                      }),
                      (this.onPaste = function (e, t) {
                        var i = { text: e, event: t };
                        this.commands.exec('paste', this, i);
                      }),
                      (this.$handlePaste = function (e) {
                        'string' == typeof e && (e = { text: e }), this._signal('paste', e);
                        var t = e.text,
                          i = t === b.lineMode,
                          n = this.session;
                        if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
                          i ? n.insert({ row: this.selection.lead.row, column: 0 }, t) : this.insert(t);
                        else if (i)
                          this.selection.rangeList.ranges.forEach(function (e) {
                            n.insert({ row: e.start.row, column: 0 }, t);
                          });
                        else {
                          var s = t.split(/\r\n|\r|\n/),
                            r = this.selection.rangeList.ranges,
                            o = !(2 != s.length || (s[0] && s[1]));
                          if (s.length != r.length || o) return this.commands.exec('insertstring', this, t);
                          for (var a = r.length; a--; ) {
                            var l = r[a];
                            l.isEmpty() || n.remove(l), n.insert(l.start, s[a]);
                          }
                        }
                      }),
                      (this.execCommand = function (e, t) {
                        return this.commands.exec(e, this, t);
                      }),
                      (this.insert = function (e, t) {
                        var i = this.session,
                          n = i.getMode(),
                          s = this.getCursorPosition();
                        if (this.getBehavioursEnabled() && !t) {
                          var r = n.transformAction(i.getState(s.row), 'insertion', this, i, e);
                          r &&
                            (e !== r.text &&
                              (this.inVirtualSelectionMode ||
                                ((this.session.mergeUndoDeltas = !1), (this.mergeNextCommand = !1))),
                            (e = r.text));
                        }
                        if (('\t' == e && (e = this.session.getTabString()), this.selection.isEmpty()))
                          this.session.getOverwrite() &&
                            -1 == e.indexOf('\n') &&
                            (((o = new f.fromPoints(s, s)).end.column += e.length), this.session.remove(o));
                        else {
                          var o = this.getSelectionRange();
                          (s = this.session.remove(o)), this.clearSelection();
                        }
                        if ('\n' == e || '\r\n' == e) {
                          var a = i.getLine(s.row);
                          if (s.column > a.search(/\S|$/)) {
                            var l = a.substr(s.column).search(/\S|$/);
                            i.doc.removeInLine(s.row, s.column, s.column + l);
                          }
                        }
                        this.clearSelection();
                        var h = s.column,
                          c = i.getState(s.row),
                          u = ((a = i.getLine(s.row)), n.checkOutdent(c, a, e));
                        if (
                          (i.insert(s, e),
                          r &&
                            r.selection &&
                            (2 == r.selection.length
                              ? this.selection.setSelectionRange(
                                  new f(s.row, h + r.selection[0], s.row, h + r.selection[1])
                                )
                              : this.selection.setSelectionRange(
                                  new f(s.row + r.selection[0], r.selection[1], s.row + r.selection[2], r.selection[3])
                                )),
                          this.$enableAutoIndent)
                        ) {
                          if (i.getDocument().isNewLine(e)) {
                            var d = n.getNextLineIndent(c, a.slice(0, s.column), i.getTabString());
                            i.insert({ row: s.row + 1, column: 0 }, d);
                          }
                          u && n.autoOutdent(c, i, s.row);
                        }
                      }),
                      (this.autoIndent = function () {
                        var e,
                          t,
                          i = this.session,
                          n = i.getMode();
                        if (this.selection.isEmpty()) (e = 0), (t = i.doc.getLength() - 1);
                        else {
                          var s = this.getSelectionRange();
                          (e = s.start.row), (t = s.end.row);
                        }
                        for (var r, o, a, l = '', h = '', c = '', u = i.getTabString(), d = e; d <= t; d++)
                          d > 0 &&
                            ((l = i.getState(d - 1)), (h = i.getLine(d - 1)), (c = n.getNextLineIndent(l, h, u))),
                            (r = i.getLine(d)),
                            c !== (o = n.$getIndent(r)) &&
                              (o.length > 0 && ((a = new f(d, 0, d, o.length)), i.remove(a)),
                              c.length > 0 && i.insert({ row: d, column: 0 }, c)),
                            n.autoOutdent(l, i, d);
                      }),
                      (this.onTextInput = function (e, t) {
                        if (!t) return this.keyBinding.onTextInput(e);
                        this.startOperation({ command: { name: 'insertstring' } });
                        var i = this.applyComposition.bind(this, e, t);
                        this.selection.rangeCount ? this.forEachSelection(i) : i(), this.endOperation();
                      }),
                      (this.applyComposition = function (e, t) {
                        var i;
                        (t.extendLeft || t.extendRight) &&
                          (((i = this.selection.getRange()).start.column -= t.extendLeft),
                          (i.end.column += t.extendRight),
                          i.start.column < 0 &&
                            (i.start.row--, (i.start.column += this.session.getLine(i.start.row).length + 1)),
                          this.selection.setRange(i),
                          e || i.isEmpty() || this.remove()),
                          (!e && this.selection.isEmpty()) || this.insert(e, !0),
                          (t.restoreStart || t.restoreEnd) &&
                            (((i = this.selection.getRange()).start.column -= t.restoreStart),
                            (i.end.column -= t.restoreEnd),
                            this.selection.setRange(i));
                      }),
                      (this.onCommandKey = function (e, t, i) {
                        return this.keyBinding.onCommandKey(e, t, i);
                      }),
                      (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 i = this.session,
                            n = i.getState(t.start.row),
                            s = i.getMode().transformAction(n, 'deletion', this, i, t);
                          if (0 === t.end.column) {
                            var r = i.getTextRange(t);
                            if ('\n' == r[r.length - 1]) {
                              var o = i.getLine(t.end.row);
                              /^\s+$/.test(o) && (t.end.column = o.length);
                            }
                          }
                          s && (t = s);
                        }
                        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.selection.isEmpty() && this.selection.selectLeft(),
                          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 i,
                              n,
                              s = this.session.getLine(e.row);
                            t < s.length
                              ? ((i = s.charAt(t) + s.charAt(t - 1)), (n = new f(e.row, t - 1, e.row, t + 1)))
                              : ((i = s.charAt(t - 1) + s.charAt(t - 2)), (n = new f(e.row, t - 2, e.row, t))),
                              this.session.replace(n, i),
                              this.session.selection.moveToPosition(n.end);
                          }
                        }
                      }),
                      (this.toLowerCase = function () {
                        var e = this.getSelectionRange();
                        this.selection.isEmpty() && this.selection.selectWord();
                        var t = this.getSelectionRange(),
                          i = this.session.getTextRange(t);
                        this.session.replace(t, i.toLowerCase()), this.selection.setSelectionRange(e);
                      }),
                      (this.toUpperCase = function () {
                        var e = this.getSelectionRange();
                        this.selection.isEmpty() && this.selection.selectWord();
                        var t = this.getSelectionRange(),
                          i = this.session.getTextRange(t);
                        this.session.replace(t, i.toUpperCase()), this.selection.setSelectionRange(e);
                      }),
                      (this.indent = function () {
                        var e = this.session,
                          t = this.getSelectionRange();
                        if (!(t.start.row < t.end.row)) {
                          if (t.start.column < t.end.column) {
                            var i = e.getTextRange(t);
                            if (!/^\s+$/.test(i))
                              return (c = this.$getSelectedRows()), void e.indentRows(c.first, c.last, '\t');
                          }
                          var n = e.getLine(t.start.row),
                            s = t.start,
                            o = e.getTabSize(),
                            a = e.documentToScreenColumn(s.row, s.column);
                          if (this.session.getUseSoftTabs())
                            var l = o - (a % o),
                              h = r.stringRepeat(' ', l);
                          else {
                            for (l = a % o; ' ' == n[t.start.column - 1] && l; ) t.start.column--, l--;
                            this.selection.setSelectionRange(t), (h = '\t');
                          }
                          return this.insert(h);
                        }
                        var c = this.$getSelectedRows();
                        e.indentRows(c.first, c.last, '\t');
                      }),
                      (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 () {
                        for (var e = this.$getSelectedRows(), t = this.session, i = [], n = e.first; n <= e.last; n++)
                          i.push(t.getLine(n));
                        i.sort(function (e, t) {
                          return e.toLowerCase() < t.toLowerCase() ? -1 : e.toLowerCase() > t.toLowerCase() ? 1 : 0;
                        });
                        var s = new f(0, 0, 0, 0);
                        for (n = e.first; n <= e.last; n++) {
                          var r = t.getLine(n);
                          (s.start.row = n), (s.end.row = n), (s.end.column = r.length), t.replace(s, i[n - 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),
                          i = this.getSelectionRange();
                        this.session.getMode().toggleBlockComment(t, this.session, i, e);
                      }),
                      (this.getNumberAt = function (e, t) {
                        var i = /[\-]?[0-9]+(?:\.[0-9]+)?/g;
                        i.lastIndex = 0;
                        for (var n = this.session.getLine(e); i.lastIndex < t; ) {
                          var s = i.exec(n);
                          if (s.index <= t && s.index + s[0].length >= t)
                            return { value: s[0], start: s.index, end: s.index + s[0].length };
                        }
                        return null;
                      }),
                      (this.modifyNumber = function (e) {
                        var t = this.selection.getCursor().row,
                          i = this.selection.getCursor().column,
                          n = new f(t, i - 1, t, i),
                          s = this.session.getTextRange(n);
                        if (!isNaN(parseFloat(s)) && isFinite(s)) {
                          var r = this.getNumberAt(t, i);
                          if (r) {
                            var o = r.value.indexOf('.') >= 0 ? r.start + r.value.indexOf('.') + 1 : r.end,
                              a = r.start + r.value.length - o,
                              l = parseFloat(r.value);
                            (l *= Math.pow(10, a)),
                              o !== r.end && i < o
                                ? (e *= Math.pow(10, r.end - i - 1))
                                : (e *= Math.pow(10, r.end - i)),
                              (l += e);
                            var h = (l /= Math.pow(10, a)).toFixed(a),
                              c = new f(t, r.start, t, r.end);
                            this.session.replace(c, h),
                              this.moveCursorTo(t, Math.max(r.start + 1, i + h.length - r.value.length));
                          }
                        } else this.toggleWord();
                      }),
                      (this.$toggleWordPairs = [
                        ['first', 'last'],
                        ['true', 'false'],
                        ['yes', 'no'],
                        ['width', 'height'],
                        ['top', 'bottom'],
                        ['right', 'left'],
                        ['on', 'off'],
                        ['x', 'y'],
                        ['get', 'set'],
                        ['max', 'min'],
                        ['horizontal', 'vertical'],
                        ['show', 'hide'],
                        ['add', 'remove'],
                        ['up', 'down'],
                        ['before', 'after'],
                        ['even', 'odd'],
                        ['in', 'out'],
                        ['inside', 'outside'],
                        ['next', 'previous'],
                        ['increase', 'decrease'],
                        ['attach', 'detach'],
                        ['&&', '||'],
                        ['==', '!='],
                      ]),
                      (this.toggleWord = function () {
                        var e = this.selection.getCursor().row,
                          t = this.selection.getCursor().column;
                        this.selection.selectWord();
                        var i = this.getSelectedText(),
                          n = this.selection.getWordRange().start.column,
                          s = i.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, '$1 ').split(/\s/),
                          o = t - n - 1;
                        o < 0 && (o = 0);
                        var a = 0,
                          l = 0,
                          h = this;
                        i.match(/[A-Za-z0-9_]+/) &&
                          s.forEach(function (t, s) {
                            (l = a + t.length),
                              o >= a &&
                                o <= l &&
                                ((i = t),
                                h.selection.clearSelection(),
                                h.moveCursorTo(e, a + n),
                                h.selection.selectTo(e, l + n)),
                              (a = l);
                          });
                        for (var c, u = this.$toggleWordPairs, d = 0; d < u.length; d++)
                          for (var f = u[d], g = 0; g <= 1; g++) {
                            var p = +!g,
                              m = i.match(new RegExp('^\\s?_?(' + r.escapeRegExp(f[g]) + ')\\s?$', 'i'));
                            m &&
                              i.match(new RegExp('([_]|^|\\s)(' + r.escapeRegExp(m[1]) + ')($|\\s)', 'g')) &&
                              ((c = i.replace(new RegExp(r.escapeRegExp(f[g]), 'i'), function (e) {
                                var t = f[p];
                                return (
                                  e.toUpperCase() == e
                                    ? (t = t.toUpperCase())
                                    : e.charAt(0).toUpperCase() == e.charAt(0) &&
                                      (t = t.substr(0, 0) + f[p].charAt(0).toUpperCase() + t.substr(1)),
                                  t
                                );
                              })),
                              this.insert(c),
                              (c = ''));
                          }
                      }),
                      (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,
                          i = e.getRange(),
                          n = e.isBackwards();
                        if (i.isEmpty()) {
                          var s = i.start.row;
                          t.duplicateLines(s, s);
                        } else {
                          var r = n ? i.start : i.end,
                            o = t.insert(r, t.getTextRange(i), !1);
                          (i.start = r), (i.end = o), e.setSelectionRange(i, n);
                        }
                      }),
                      (this.moveLinesDown = function () {
                        this.$moveLines(1, !1);
                      }),
                      (this.moveLinesUp = function () {
                        this.$moveLines(-1, !1);
                      }),
                      (this.moveText = function (e, t, i) {
                        return this.session.moveText(e, t, i);
                      }),
                      (this.copyLinesUp = function () {
                        this.$moveLines(-1, !0);
                      }),
                      (this.copyLinesDown = function () {
                        this.$moveLines(1, !0);
                      }),
                      (this.$moveLines = function (e, t) {
                        var i,
                          n,
                          s = this.selection;
                        if (!s.inMultiSelectMode || this.inVirtualSelectionMode) {
                          var r = s.toOrientedRange();
                          (i = this.$getSelectedRows(r)),
                            (n = this.session.$moveLines(i.first, i.last, t ? 0 : e)),
                            t && -1 == e && (n = 0),
                            r.moveBy(n, 0),
                            s.fromOrientedRange(r);
                        } else {
                          var o = s.rangeList.ranges;
                          s.rangeList.detach(this.session), (this.inVirtualSelectionMode = !0);
                          for (var a = 0, l = 0, h = o.length, c = 0; c < h; c++) {
                            var u = c;
                            o[c].moveBy(a, 0);
                            for (var d = (i = this.$getSelectedRows(o[c])).first, f = i.last; ++c < h; ) {
                              l && o[c].moveBy(l, 0);
                              var g = this.$getSelectedRows(o[c]);
                              if (t && g.first != f) break;
                              if (!t && g.first > f + 1) break;
                              f = g.last;
                            }
                            for (
                              c--, a = this.session.$moveLines(d, f, t ? 0 : e), t && -1 == e && (u = c + 1);
                              u <= c;

                            )
                              o[u].moveBy(a, 0), u++;
                            t || (a = 0), (l += a);
                          }
                          s.fromOrientedRange(s.ranges[0]),
                            s.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 (e) {
                        this.renderer.showComposition(e);
                      }),
                      (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 i = this.renderer,
                          n = this.renderer.layerConfig,
                          s = e * Math.floor(n.height / n.lineHeight);
                        !0 === t
                          ? this.selection.$moveSelection(function () {
                              this.moveCursorBy(s, 0);
                            })
                          : !1 === t && (this.selection.moveCursorBy(s, 0), this.selection.clearSelection());
                        var r = i.scrollTop;
                        i.scrollBy(0, s * n.lineHeight),
                          null != t && i.scrollCursorIntoView(null, 0.5),
                          i.animateScrolling(r);
                      }),
                      (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, i, n) {
                        this.renderer.scrollToLine(e, t, i, n);
                      }),
                      (this.centerSelection = function () {
                        var e = this.getSelectionRange(),
                          t = {
                            row: Math.floor(e.start.row + (e.end.row - e.start.row) / 2),
                            column: Math.floor(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.selection.selectAll();
                      }),
                      (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 i = this.getCursorPosition(),
                          n = new w(this.session, i.row, i.column),
                          s = n.getCurrentToken(),
                          r = s || n.stepForward();
                        if (r) {
                          var o,
                            a,
                            l = !1,
                            h = {},
                            c = i.column - r.start,
                            u = { ')': '(', '(': '(', ']': '[', '[': '[', '{': '{', '}': '{' };
                          do {
                            if (r.value.match(/[{}()\[\]]/g)) {
                              for (; c < r.value.length && !l; c++)
                                if (u[r.value[c]])
                                  switch (
                                    ((a = u[r.value[c]] + '.' + r.type.replace('rparen', 'lparen')),
                                    isNaN(h[a]) && (h[a] = 0),
                                    r.value[c])
                                  ) {
                                    case '(':
                                    case '[':
                                    case '{':
                                      h[a]++;
                                      break;
                                    case ')':
                                    case ']':
                                    case '}':
                                      h[a]--, -1 === h[a] && ((o = 'bracket'), (l = !0));
                                  }
                            } else
                              -1 !== r.type.indexOf('tag-name') &&
                                (isNaN(h[r.value]) && (h[r.value] = 0),
                                '<' === s.value ? h[r.value]++ : '</' === s.value && h[r.value]--,
                                -1 === h[r.value] && ((o = 'tag'), (l = !0)));
                            l || ((s = r), (r = n.stepForward()), (c = 0));
                          } while (r && !l);
                          if (o) {
                            var d, g;
                            if ('bracket' === o)
                              (d = this.session.getBracketRange(i)) ||
                                ((g = (d = new f(
                                  n.getCurrentTokenRow(),
                                  n.getCurrentTokenColumn() + c - 1,
                                  n.getCurrentTokenRow(),
                                  n.getCurrentTokenColumn() + c - 1
                                )).start),
                                (t || (g.row === i.row && Math.abs(g.column - i.column) < 2)) &&
                                  (d = this.session.getBracketRange(g)));
                            else if ('tag' === o) {
                              if (!r || -1 === r.type.indexOf('tag-name')) return;
                              var p = r.value;
                              if (
                                0 ===
                                (d = new f(
                                  n.getCurrentTokenRow(),
                                  n.getCurrentTokenColumn() - 2,
                                  n.getCurrentTokenRow(),
                                  n.getCurrentTokenColumn() - 2
                                )).compare(i.row, i.column)
                              ) {
                                l = !1;
                                do {
                                  (r = s),
                                    (s = n.stepBackward()) &&
                                      (-1 !== s.type.indexOf('tag-close') &&
                                        d.setEnd(n.getCurrentTokenRow(), n.getCurrentTokenColumn() + 1),
                                      r.value === p &&
                                        -1 !== r.type.indexOf('tag-name') &&
                                        ('<' === s.value ? h[p]++ : '</' === s.value && h[p]--,
                                        0 === h[p] && (l = !0)));
                                } while (s && !l);
                              }
                              r &&
                                r.type.indexOf('tag-name') &&
                                (g = d.start).row == i.row &&
                                Math.abs(g.column - i.column) < 2 &&
                                (g = d.end);
                            }
                            (g = (d && d.cursor) || g) &&
                              (e
                                ? d && t
                                  ? this.selection.setRange(d)
                                  : d && d.isEqual(this.getSelectionRange())
                                  ? this.clearSelection()
                                  : this.selection.selectTo(g.row, g.column)
                                : this.selection.moveTo(g.row, g.column));
                          }
                        }
                      }),
                      (this.gotoLine = function (e, t, i) {
                        this.selection.clearSelection(),
                          this.session.unfold({ row: e - 1, column: t || 0 }),
                          this.exitMultiSelectMode && this.exitMultiSelectMode(),
                          this.moveCursorTo(e - 1, t || 0),
                          this.isRowFullyVisible(e - 1) || this.scrollToLine(e - 1, !0, i);
                      }),
                      (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()) for (e = e || 1; e--; ) this.selection.moveCursorLeft();
                        else {
                          var t = this.getSelectionRange().start;
                          this.moveCursorToPosition(t);
                        }
                        this.clearSelection();
                      }),
                      (this.navigateRight = function (e) {
                        if (this.selection.isEmpty()) for (e = e || 1; e--; ) this.selection.moveCursorRight();
                        else {
                          var t = this.getSelectionRange().end;
                          this.moveCursorToPosition(t);
                        }
                        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 i = this.$search.find(this.session),
                          n = 0;
                        return i
                          ? (this.$tryReplace(i, e) && (n = 1),
                            this.selection.setSelectionRange(i),
                            this.renderer.scrollSelectionIntoView(i.start, i.end),
                            n)
                          : n;
                      }),
                      (this.replaceAll = function (e, t) {
                        t && this.$search.set(t);
                        var i = this.$search.findAll(this.session),
                          n = 0;
                        if (!i.length) return n;
                        var s = this.getSelectionRange();
                        this.selection.moveTo(0, 0);
                        for (var r = i.length - 1; r >= 0; --r) this.$tryReplace(i[r], e) && n++;
                        return this.selection.setSelectionRange(s), n;
                      }),
                      (this.$tryReplace = function (e, t) {
                        var i = this.session.getTextRange(e);
                        return null !== (t = this.$search.replace(i, t))
                          ? ((e.end = this.session.replace(e, t)), e)
                          : null;
                      }),
                      (this.getLastSearchOptions = function () {
                        return this.$search.getOptions();
                      }),
                      (this.find = function (e, t, i) {
                        t || (t = {}),
                          'string' == typeof e || e instanceof RegExp
                            ? (t.needle = e)
                            : 'object' == typeof e && n.mixin(t, e);
                        var s = this.selection.getRange();
                        null == t.needle &&
                          ((e = this.session.getTextRange(s) || this.$search.$options.needle) ||
                            ((s = this.session.getWordRange(s.start.row, s.start.column)),
                            (e = this.session.getTextRange(s))),
                          this.$search.set({ needle: e })),
                          this.$search.set(t),
                          t.start || this.$search.set({ start: s });
                        var r = this.$search.find(this.session);
                        return t.preventScroll
                          ? r
                          : r
                          ? (this.revealRange(r, i), r)
                          : (t.backwards ? (s.start = s.end) : (s.end = s.start), void this.selection.setRange(s));
                      }),
                      (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.session.unfold(e), this.selection.setSelectionRange(e);
                        var i = this.renderer.scrollTop;
                        this.renderer.scrollSelectionIntoView(e.start, e.end, 0.5),
                          !1 !== t && this.renderer.animateScrolling(i);
                      }),
                      (this.undo = function () {
                        this.session.getUndoManager().undo(this.session), this.renderer.scrollCursorIntoView(null, 0.5);
                      }),
                      (this.redo = function () {
                        this.session.getUndoManager().redo(this.session), this.renderer.scrollCursorIntoView(null, 0.5);
                      }),
                      (this.destroy = function () {
                        this.$toDestroy &&
                          (this.$toDestroy.forEach(function (e) {
                            e.destroy();
                          }),
                          (this.$toDestroy = null)),
                          this.$mouseHandler && this.$mouseHandler.destroy(),
                          this.renderer.destroy(),
                          this._signal('destroy', this),
                          this.session && this.session.destroy(),
                          this._$emitInputEvent && this._$emitInputEvent.cancel(),
                          this.removeAllListeners();
                      }),
                      (this.setAutoScrollEditorIntoView = function (e) {
                        if (e) {
                          var t,
                            i = this,
                            n = !1;
                          this.$scrollAnchor || (this.$scrollAnchor = document.createElement('div'));
                          var s = this.$scrollAnchor;
                          (s.style.cssText = 'position:absolute'),
                            this.container.insertBefore(s, this.container.firstChild);
                          var r = this.on('changeSelection', function () {
                              n = !0;
                            }),
                            o = this.renderer.on('beforeRender', function () {
                              n && (t = i.renderer.container.getBoundingClientRect());
                            }),
                            a = this.renderer.on('afterRender', function () {
                              if (n && t && (i.isFocused() || (i.searchBox && i.searchBox.isFocused()))) {
                                var e = i.renderer,
                                  r = e.$cursorLayer.$pixelPos,
                                  o = e.layerConfig,
                                  a = r.top - o.offset;
                                null !=
                                  (n =
                                    (r.top >= 0 && a + t.top < 0) ||
                                    (!(r.top < o.height && r.top + t.top + o.lineHeight > window.innerHeight) &&
                                      null)) &&
                                  ((s.style.top = a + 'px'),
                                  (s.style.left = r.left + 'px'),
                                  (s.style.height = o.lineHeight + 'px'),
                                  s.scrollIntoView(n)),
                                  (n = t = null);
                              }
                            });
                          this.setAutoScrollEditorIntoView = function (e) {
                            e ||
                              (delete this.setAutoScrollEditorIntoView,
                              this.off('changeSelection', r),
                              this.renderer.off('afterRender', a),
                              this.renderer.off('beforeRender', o));
                          };
                        }
                      }),
                      (this.$resetCursorStyle = function () {
                        var e = this.$cursorStyle || 'ace',
                          t = this.renderer.$cursorLayer;
                        t &&
                          (t.setSmoothBlinking(/smooth/.test(e)),
                          (t.isBlinking = !this.$readOnly && 'wide' != e),
                          s.setCssClass(t.element, 'ace_slim-cursors', /slim/.test(e)));
                      }),
                      (this.prompt = function (e, t, i) {
                        var n = this;
                        v.loadModule('./ext/prompt', function (s) {
                          s.prompt(n, e, t, i);
                        });
                      });
                  }.call(y.prototype),
                  v.defineOptions(y.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 (e) {
                        this.$onSelectionChange();
                      },
                      initialValue: !0,
                    },
                    readOnly: {
                      set: function (e) {
                        this.textInput.setReadOnly(e), this.$resetCursorStyle();
                      },
                      initialValue: !1,
                    },
                    copyWithEmptySelection: {
                      set: function (e) {
                        this.textInput.setCopyWithEmptySelection(e);
                      },
                      initialValue: !1,
                    },
                    cursorStyle: {
                      set: function (e) {
                        this.$resetCursorStyle();
                      },
                      values: ['ace', 'slim', 'smooth', 'wide'],
                      initialValue: 'ace',
                    },
                    mergeUndoDeltas: { values: [!1, !0, 'always'], initialValue: !0 },
                    behavioursEnabled: { initialValue: !0 },
                    wrapBehavioursEnabled: { initialValue: !0 },
                    enableAutoIndent: { initialValue: !0 },
                    autoScrollEditorIntoView: {
                      set: function (e) {
                        this.setAutoScrollEditorIntoView(e);
                      },
                    },
                    keyboardHandler: {
                      set: function (e) {
                        this.setKeyboardHandler(e);
                      },
                      get: function () {
                        return this.$keybindingId;
                      },
                      handlesSet: !0,
                    },
                    value: {
                      set: function (e) {
                        this.session.setValue(e);
                      },
                      get: function () {
                        return this.getValue();
                      },
                      handlesSet: !0,
                      hidden: !0,
                    },
                    session: {
                      set: function (e) {
                        this.setSession(e);
                      },
                      get: function () {
                        return this.session;
                      },
                      handlesSet: !0,
                      hidden: !0,
                    },
                    showLineNumbers: {
                      set: function (e) {
                        this.renderer.$gutterLayer.setShowLineNumbers(e),
                          this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),
                          e && this.$relativeLineNumbers ? $.attach(this) : $.detach(this);
                      },
                      initialValue: !0,
                    },
                    relativeLineNumbers: {
                      set: function (e) {
                        this.$showLineNumbers && e ? $.attach(this) : $.detach(this);
                      },
                    },
                    placeholder: {
                      set: function (e) {
                        this.$updatePlaceholder ||
                          ((this.$updatePlaceholder = function () {
                            var e = this.session && (this.renderer.$composition || this.getValue());
                            if (e && this.renderer.placeholderNode)
                              this.renderer.off('afterRender', this.$updatePlaceholder),
                                s.removeCssClass(this.container, 'ace_hasPlaceholder'),
                                this.renderer.placeholderNode.remove(),
                                (this.renderer.placeholderNode = null);
                            else if (e || this.renderer.placeholderNode)
                              !e &&
                                this.renderer.placeholderNode &&
                                (this.renderer.placeholderNode.textContent = this.$placeholder || '');
                            else {
                              this.renderer.on('afterRender', this.$updatePlaceholder),
                                s.addCssClass(this.container, 'ace_hasPlaceholder');
                              var t = s.createElement('div');
                              (t.className = 'ace_placeholder'),
                                (t.textContent = this.$placeholder || ''),
                                (this.renderer.placeholderNode = t),
                                this.renderer.content.appendChild(this.renderer.placeholderNode);
                            }
                          }.bind(this)),
                          this.on('input', this.$updatePlaceholder)),
                          this.$updatePlaceholder();
                      },
                    },
                    hScrollBarAlwaysVisible: 'renderer',
                    vScrollBarAlwaysVisible: 'renderer',
                    highlightGutterLine: 'renderer',
                    animatedScroll: 'renderer',
                    showInvisibles: 'renderer',
                    showPrintMargin: 'renderer',
                    printMarginColumn: 'renderer',
                    printMargin: 'renderer',
                    fadeFoldWidgets: 'renderer',
                    showFoldWidgets: 'renderer',
                    displayIndentGuides: 'renderer',
                    showGutter: 'renderer',
                    fontSize: 'renderer',
                    fontFamily: 'renderer',
                    maxLines: 'renderer',
                    minLines: 'renderer',
                    scrollPastEnd: 'renderer',
                    fixedWidthGutter: 'renderer',
                    theme: 'renderer',
                    hasCssTransforms: 'renderer',
                    maxPixelHeight: 'renderer',
                    useTextareaForIME: 'renderer',
                    scrollSpeed: '$mouseHandler',
                    dragDelay: '$mouseHandler',
                    dragEnabled: '$mouseHandler',
                    focusTimeout: '$mouseHandler',
                    tooltipFollowsMouse: '$mouseHandler',
                    firstLineNumber: 'session',
                    overwrite: 'session',
                    newLineMode: 'session',
                    useWorker: 'session',
                    useSoftTabs: 'session',
                    navigateWithinSoftTabs: 'session',
                    tabSize: 'session',
                    wrap: 'session',
                    indentedSoftWrap: 'session',
                    foldStyle: 'session',
                    mode: 'session',
                  });
                var $ = {
                  getText: function (e, t) {
                    return (Math.abs(e.selection.lead.row - t) || t + 1 + (t < 9 ? '·' : '')) + '';
                  },
                  getWidth: function (e, t, i) {
                    return Math.max(t.toString().length, (i.lastRow + 1).toString().length, 2) * i.characterWidth;
                  },
                  update: function (e, t) {
                    t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER);
                  },
                  attach: function (e) {
                    (e.renderer.$gutterLayer.$renderer = this),
                      e.on('changeSelection', this.update),
                      this.update(null, e);
                  },
                  detach: function (e) {
                    e.renderer.$gutterLayer.$renderer == this && (e.renderer.$gutterLayer.$renderer = null),
                      e.off('changeSelection', this.update),
                      this.update(null, e);
                  },
                };
                t.Editor = y;
              }
            ),
            ace.define('ace/undomanager', ['require', 'exports', 'module', 'ace/range'], function (e, t, i) {
              'use strict';
              var n = function () {
                (this.$maxRev = 0), (this.$fromUndo = !1), this.reset();
              };
              (function () {
                (this.addSession = function (e) {
                  this.$session = e;
                }),
                  (this.add = function (e, t, i) {
                    this.$fromUndo ||
                      (e != this.$lastDelta &&
                        (this.$keepRedoStack || (this.$redoStack.length = 0),
                        (!1 !== t && this.lastDeltas) ||
                          ((this.lastDeltas = []),
                          this.$undoStack.push(this.lastDeltas),
                          (e.id = this.$rev = ++this.$maxRev)),
                        ('remove' != e.action && 'insert' != e.action) || (this.$lastDelta = e),
                        this.lastDeltas.push(e)));
                  }),
                  (this.addSelection = function (e, t) {
                    this.selections.push({ value: e, rev: t || this.$rev });
                  }),
                  (this.startNewGroup = function () {
                    return (this.lastDeltas = null), this.$rev;
                  }),
                  (this.markIgnored = function (e, t) {
                    null == t && (t = this.$rev + 1);
                    for (var i = this.$undoStack, n = i.length; n--; ) {
                      var s = i[n][0];
                      if (s.id <= e) break;
                      s.id < t && (s.ignore = !0);
                    }
                    this.lastDeltas = null;
                  }),
                  (this.getSelection = function (e, t) {
                    for (var i = this.selections, n = i.length; n--; ) {
                      var s = i[n];
                      if (s.rev < e) return t && (s = i[n + 1]), s;
                    }
                  }),
                  (this.getRevision = function () {
                    return this.$rev;
                  }),
                  (this.getDeltas = function (e, t) {
                    null == t && (t = this.$rev + 1);
                    for (var i = this.$undoStack, n = null, s = 0, r = i.length; r--; ) {
                      var o = i[r][0];
                      if ((o.id < t && !n && (n = r + 1), o.id <= e)) {
                        s = r + 1;
                        break;
                      }
                    }
                    return i.slice(s, n);
                  }),
                  (this.getChangedRanges = function (e, t) {
                    null == t && (t = this.$rev + 1);
                  }),
                  (this.getChangedLines = function (e, t) {
                    null == t && (t = this.$rev + 1);
                  }),
                  (this.undo = function (e, t) {
                    this.lastDeltas = null;
                    var i = this.$undoStack;
                    if (
                      (function (e, t) {
                        for (var i = t; i--; ) {
                          var n = e[i];
                          if (n && !n[0].ignore) {
                            for (; i < t - 1; ) {
                              var s = c(e[i], e[i + 1]);
                              (e[i] = s[0]), (e[i + 1] = s[1]), i++;
                            }
                            return !0;
                          }
                        }
                      })(i, i.length)
                    ) {
                      e || (e = this.$session),
                        this.$redoStackBaseRev !== this.$rev && this.$redoStack.length && (this.$redoStack = []),
                        (this.$fromUndo = !0);
                      var n = i.pop(),
                        s = null;
                      return (
                        n && ((s = e.undoChanges(n, t)), this.$redoStack.push(n), this.$syncRev()),
                        (this.$fromUndo = !1),
                        s
                      );
                    }
                  }),
                  (this.redo = function (e, t) {
                    if (
                      ((this.lastDeltas = null),
                      e || (e = this.$session),
                      (this.$fromUndo = !0),
                      this.$redoStackBaseRev != this.$rev)
                    ) {
                      var i = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1);
                      !(function (e, t) {
                        for (var i = 0; i < t.length; i++) for (var n = t[i], s = 0; s < n.length; s++) p(e, n[s]);
                      })(this.$redoStack, i),
                        (this.$redoStackBaseRev = this.$rev),
                        this.$redoStack.forEach(function (e) {
                          e[0].id = ++this.$maxRev;
                        }, this);
                    }
                    var n = this.$redoStack.pop(),
                      s = null;
                    return (
                      n && ((s = e.redoChanges(n, t)), this.$undoStack.push(n), this.$syncRev()),
                      (this.$fromUndo = !1),
                      s
                    );
                  }),
                  (this.$syncRev = function () {
                    var e = this.$undoStack,
                      t = e[e.length - 1],
                      i = (t && t[0].id) || 0;
                    (this.$redoStackBaseRev = i), (this.$rev = i);
                  }),
                  (this.reset = function () {
                    (this.lastDeltas = null),
                      (this.$lastDelta = null),
                      (this.$undoStack = []),
                      (this.$redoStack = []),
                      (this.$rev = 0),
                      (this.mark = 0),
                      (this.$redoStackBaseRev = this.$rev),
                      (this.selections = []);
                  }),
                  (this.canUndo = function () {
                    return this.$undoStack.length > 0;
                  }),
                  (this.canRedo = function () {
                    return this.$redoStack.length > 0;
                  }),
                  (this.bookmark = function (e) {
                    null == e && (e = this.$rev), (this.mark = e);
                  }),
                  (this.isAtBookmark = function () {
                    return this.$rev === this.mark;
                  }),
                  (this.toJSON = function () {}),
                  (this.fromJSON = function () {}),
                  (this.hasUndo = this.canUndo),
                  (this.hasRedo = this.canRedo),
                  (this.isClean = this.isAtBookmark),
                  (this.markClean = this.bookmark),
                  (this.$prettyPrint = function (e) {
                    return e ? a(e) : a(this.$undoStack) + '\n---\n' + a(this.$redoStack);
                  });
              }).call(n.prototype);
              var s = e('./range').Range,
                r = s.comparePoints;
              function o(e) {
                return { row: e.row, column: e.column };
              }
              function a(e) {
                if (((e = e || this), Array.isArray(e))) return e.map(a).join('\n');
                var t = '';
                return (
                  e.action
                    ? ((t = 'insert' == e.action ? '+' : '-'), (t += '[' + e.lines + ']'))
                    : e.value && (t = Array.isArray(e.value) ? e.value.map(l).join('\n') : l(e.value)),
                  e.start && (t += l(e)),
                  (e.id || e.rev) && (t += '\t(' + (e.id || e.rev) + ')'),
                  t
                );
              }
              function l(e) {
                return e.start.row + ':' + e.start.column + '=>' + e.end.row + ':' + e.end.column;
              }
              function h(e, t) {
                var i = 'insert' == e.action,
                  n = 'insert' == t.action;
                if (i && n)
                  if (r(t.start, e.end) >= 0) d(t, e, -1);
                  else {
                    if (!(r(t.start, e.start) <= 0)) return null;
                    d(e, t, 1);
                  }
                else if (i && !n)
                  if (r(t.start, e.end) >= 0) d(t, e, -1);
                  else {
                    if (!(r(t.end, e.start) <= 0)) return null;
                    d(e, t, -1);
                  }
                else if (!i && n)
                  if (r(t.start, e.start) >= 0) d(t, e, 1);
                  else {
                    if (!(r(t.start, e.start) <= 0)) return null;
                    d(e, t, 1);
                  }
                else if (!i && !n)
                  if (r(t.start, e.start) >= 0) d(t, e, 1);
                  else {
                    if (!(r(t.end, e.start) <= 0)) return null;
                    d(e, t, -1);
                  }
                return [t, e];
              }
              function c(e, t) {
                for (var i = e.length; i--; )
                  for (var n = 0; n < t.length; n++)
                    if (!h(e[i], t[n])) {
                      for (; i < e.length; ) {
                        for (; n--; ) h(t[n], e[i]);
                        (n = t.length), i++;
                      }
                      return [e, t];
                    }
                return (e.selectionBefore = t.selectionBefore = e.selectionAfter = t.selectionAfter = null), [t, e];
              }
              function u(e, t) {
                var i = 'insert' == e.action,
                  n = 'insert' == t.action;
                if (i && n) r(e.start, t.start) < 0 ? d(t, e, 1) : d(e, t, 1);
                else if (i && !n)
                  r(e.start, t.end) >= 0
                    ? d(e, t, -1)
                    : (r(e.start, t.start) <= 0 || d(e, s.fromPoints(t.start, e.start), -1), d(t, e, 1));
                else if (!i && n)
                  r(t.start, e.end) >= 0
                    ? d(t, e, -1)
                    : (r(t.start, e.start) <= 0 || d(t, s.fromPoints(e.start, t.start), -1), d(e, t, 1));
                else if (!i && !n)
                  if (r(t.start, e.end) >= 0) d(t, e, -1);
                  else {
                    var o, a;
                    if (!(r(t.end, e.start) <= 0))
                      return (
                        r(e.start, t.start) < 0 && ((o = e), (e = g(e, t.start))),
                        r(e.end, t.end) > 0 && (a = g(e, t.end)),
                        f(t.end, e.start, e.end, -1),
                        a && !o && ((e.lines = a.lines), (e.start = a.start), (e.end = a.end), (a = e)),
                        [t, o, a].filter(Boolean)
                      );
                    d(e, t, -1);
                  }
                return [t, e];
              }
              function d(e, t, i) {
                f(e.start, t.start, t.end, i), f(e.end, t.start, t.end, i);
              }
              function f(e, t, i, n) {
                e.row == (1 == n ? t : i).row && (e.column += n * (i.column - t.column)),
                  (e.row += n * (i.row - t.row));
              }
              function g(e, t) {
                var i = e.lines,
                  n = e.end;
                e.end = o(t);
                var s = e.end.row - e.start.row,
                  r = i.splice(s, i.length),
                  a = s ? t.column : t.column - e.start.column;
                return (
                  i.push(r[0].substring(0, a)),
                  (r[0] = r[0].substr(a)),
                  { start: o(t), end: n, lines: r, action: e.action }
                );
              }
              function p(e, t) {
                t = (function (e) {
                  return { start: o(e.start), end: o(e.end), action: e.action, lines: e.lines.slice() };
                })(t);
                for (var i = e.length; i--; ) {
                  for (var n = e[i], s = 0; s < n.length; s++) {
                    var r = u(n[s], t);
                    (t = r[0]),
                      2 != r.length && (r[2] ? (n.splice(s + 1, 1, r[1], r[2]), s++) : r[1] || (n.splice(s, 1), s--));
                  }
                  n.length || e.splice(i, 1);
                }
                return e;
              }
              s.comparePoints, (t.UndoManager = n);
            }),
            ace.define('ace/layer/lines', ['require', 'exports', 'module', 'ace/lib/dom'], function (e, t, i) {
              'use strict';
              var n = e('../lib/dom'),
                s = function (e, t) {
                  (this.element = e),
                    (this.canvasHeight = t || 5e5),
                    (this.element.style.height = 2 * this.canvasHeight + 'px'),
                    (this.cells = []),
                    (this.cellCache = []),
                    (this.$offsetCoefficient = 0);
                };
              (function () {
                (this.moveContainer = function (e) {
                  n.translate(
                    this.element,
                    0,
                    ((-e.firstRowScreen * e.lineHeight) % this.canvasHeight) - e.offset * this.$offsetCoefficient
                  );
                }),
                  (this.pageChanged = function (e, t) {
                    return (
                      Math.floor((e.firstRowScreen * e.lineHeight) / this.canvasHeight) !==
                      Math.floor((t.firstRowScreen * t.lineHeight) / this.canvasHeight)
                    );
                  }),
                  (this.computeLineTop = function (e, t, i) {
                    var n = t.firstRowScreen * t.lineHeight,
                      s = Math.floor(n / this.canvasHeight);
                    return i.documentToScreenRow(e, 0) * t.lineHeight - s * this.canvasHeight;
                  }),
                  (this.computeLineHeight = function (e, t, i) {
                    return t.lineHeight * i.getRowLineCount(e);
                  }),
                  (this.getLength = function () {
                    return this.cells.length;
                  }),
                  (this.get = function (e) {
                    return this.cells[e];
                  }),
                  (this.shift = function () {
                    this.$cacheCell(this.cells.shift());
                  }),
                  (this.pop = function () {
                    this.$cacheCell(this.cells.pop());
                  }),
                  (this.push = function (e) {
                    if (Array.isArray(e)) {
                      this.cells.push.apply(this.cells, e);
                      for (var t = n.createFragment(this.element), i = 0; i < e.length; i++)
                        t.appendChild(e[i].element);
                      this.element.appendChild(t);
                    } else this.cells.push(e), this.element.appendChild(e.element);
                  }),
                  (this.unshift = function (e) {
                    if (Array.isArray(e)) {
                      this.cells.unshift.apply(this.cells, e);
                      for (var t = n.createFragment(this.element), i = 0; i < e.length; i++)
                        t.appendChild(e[i].element);
                      this.element.firstChild
                        ? this.element.insertBefore(t, this.element.firstChild)
                        : this.element.appendChild(t);
                    } else this.cells.unshift(e), this.element.insertAdjacentElement('afterbegin', e.element);
                  }),
                  (this.last = function () {
                    return this.cells.length ? this.cells[this.cells.length - 1] : null;
                  }),
                  (this.$cacheCell = function (e) {
                    e && (e.element.remove(), this.cellCache.push(e));
                  }),
                  (this.createCell = function (e, t, i, s) {
                    var r = this.cellCache.pop();
                    if (!r) {
                      var o = n.createElement('div');
                      s && s(o), this.element.appendChild(o), (r = { element: o, text: '', row: e });
                    }
                    return (r.row = e), r;
                  });
              }).call(s.prototype),
                (t.Lines = s);
            }),
            ace.define(
              'ace/layer/gutter',
              [
                'require',
                'exports',
                'module',
                'ace/lib/dom',
                'ace/lib/oop',
                'ace/lib/lang',
                'ace/lib/event_emitter',
                'ace/layer/lines',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/dom'),
                  s = e('../lib/oop'),
                  r = e('../lib/lang'),
                  o = e('../lib/event_emitter').EventEmitter,
                  a = e('./lines').Lines,
                  l = function (e) {
                    (this.element = n.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.$lines = new a(this.element)),
                      (this.$lines.$offsetCoefficient = 1);
                  };
                function h(e) {
                  var t = document.createTextNode('');
                  e.appendChild(t);
                  var i = n.createElement('span');
                  return e.appendChild(i), e;
                }
                (function () {
                  s.implement(this, o),
                    (this.setSession = function (e) {
                      this.session && this.session.off('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 i = e[t],
                          n = i.row,
                          s = this.$annotations[n];
                        s || (s = this.$annotations[n] = { text: [] });
                        var o = i.text;
                        (o = o ? r.escapeHTML(o) : i.html || ''), -1 === s.text.indexOf(o) && s.text.push(o);
                        var a = i.type;
                        'error' == a
                          ? (s.className = ' ace_error')
                          : 'warning' == a && ' ace_error' != s.className
                          ? (s.className = ' ace_warning')
                          : 'info' != a || s.className || (s.className = ' ace_info');
                      }
                    }),
                    (this.$updateAnnotations = function (e) {
                      if (this.$annotations.length) {
                        var t = e.start.row,
                          i = e.end.row - t;
                        if (0 === i);
                        else if ('remove' == e.action) this.$annotations.splice(t, i + 1, null);
                        else {
                          var n = new Array(i + 1);
                          n.unshift(t, 1), this.$annotations.splice.apply(this.$annotations, n);
                        }
                      }
                    }),
                    (this.update = function (e) {
                      this.config = e;
                      var t = this.session,
                        i = e.firstRow,
                        n = Math.min(e.lastRow + e.gutterOffset, t.getLength() - 1);
                      (this.oldLastRow = n), (this.config = e), this.$lines.moveContainer(e), this.$updateCursorRow();
                      for (var s = t.getNextFoldLine(i), r = s ? s.start.row : 1 / 0, o = null, a = -1, l = i; ; ) {
                        if (
                          (l > r && ((l = s.end.row + 1), (r = (s = t.getNextFoldLine(l, s)) ? s.start.row : 1 / 0)),
                          l > n)
                        ) {
                          for (; this.$lines.getLength() > a + 1; ) this.$lines.pop();
                          break;
                        }
                        (o = this.$lines.get(++a))
                          ? (o.row = l)
                          : ((o = this.$lines.createCell(l, e, this.session, h)), this.$lines.push(o)),
                          this.$renderCell(o, e, s, l),
                          l++;
                      }
                      this._signal('afterRender'), this.$updateGutterWidth(e);
                    }),
                    (this.$updateGutterWidth = function (e) {
                      var t = this.session,
                        i = t.gutterRenderer || this.$renderer,
                        n = t.$firstLineNumber,
                        s = this.$lines.last() ? this.$lines.last().text : '';
                      (this.$fixedWidth || t.$useWrapMode) && (s = t.getLength() + n - 1);
                      var r = i ? i.getWidth(t, s, e) : s.toString().length * e.characterWidth,
                        o = this.$padding || this.$computePadding();
                      (r += o.left + o.right) === this.gutterWidth ||
                        isNaN(r) ||
                        ((this.gutterWidth = r),
                        (this.element.parentNode.style.width = this.element.style.width =
                          Math.ceil(this.gutterWidth) + 'px'),
                        this._signal('changeGutterWidth', r));
                    }),
                    (this.$updateCursorRow = function () {
                      if (this.$highlightGutterLine) {
                        var e = this.session.selection.getCursor();
                        this.$cursorRow !== e.row && (this.$cursorRow = e.row);
                      }
                    }),
                    (this.updateLineHighlight = function () {
                      if (this.$highlightGutterLine) {
                        var e = this.session.selection.cursor.row;
                        if (((this.$cursorRow = e), !this.$cursorCell || this.$cursorCell.row != e)) {
                          this.$cursorCell &&
                            (this.$cursorCell.element.className = this.$cursorCell.element.className.replace(
                              'ace_gutter-active-line ',
                              ''
                            ));
                          var t = this.$lines.cells;
                          this.$cursorCell = null;
                          for (var i = 0; i < t.length; i++) {
                            var n = t[i];
                            if (n.row >= this.$cursorRow) {
                              if (n.row > this.$cursorRow) {
                                var s = this.session.getFoldLine(this.$cursorRow);
                                if (!(i > 0 && s && s.start.row == t[i - 1].row)) break;
                                n = t[i - 1];
                              }
                              (n.element.className = 'ace_gutter-active-line ' + n.element.className),
                                (this.$cursorCell = n);
                              break;
                            }
                          }
                        }
                      }
                    }),
                    (this.scrollLines = function (e) {
                      var t = this.config;
                      if (((this.config = e), this.$updateCursorRow(), this.$lines.pageChanged(t, e)))
                        return this.update(e);
                      this.$lines.moveContainer(e);
                      var i = Math.min(e.lastRow + e.gutterOffset, this.session.getLength() - 1),
                        n = this.oldLastRow;
                      if (((this.oldLastRow = i), !t || n < e.firstRow)) return this.update(e);
                      if (i < t.firstRow) return this.update(e);
                      if (t.firstRow < e.firstRow)
                        for (var s = this.session.getFoldedRowCount(t.firstRow, e.firstRow - 1); s > 0; s--)
                          this.$lines.shift();
                      if (n > i) for (s = this.session.getFoldedRowCount(i + 1, n); s > 0; s--) this.$lines.pop();
                      e.firstRow < t.firstRow && this.$lines.unshift(this.$renderLines(e, e.firstRow, t.firstRow - 1)),
                        i > n && this.$lines.push(this.$renderLines(e, n + 1, i)),
                        this.updateLineHighlight(),
                        this._signal('afterRender'),
                        this.$updateGutterWidth(e);
                    }),
                    (this.$renderLines = function (e, t, i) {
                      for (
                        var n = [], s = t, r = this.session.getNextFoldLine(s), o = r ? r.start.row : 1 / 0;
                        s > o &&
                          ((s = r.end.row + 1), (o = (r = this.session.getNextFoldLine(s, r)) ? r.start.row : 1 / 0)),
                          !(s > i);

                      ) {
                        var a = this.$lines.createCell(s, e, this.session, h);
                        this.$renderCell(a, e, r, s), n.push(a), s++;
                      }
                      return n;
                    }),
                    (this.$renderCell = function (e, t, i, s) {
                      var r = e.element,
                        o = this.session,
                        a = r.childNodes[0],
                        l = r.childNodes[1],
                        h = o.$firstLineNumber,
                        c = o.$breakpoints,
                        u = o.$decorations,
                        d = o.gutterRenderer || this.$renderer,
                        f = this.$showFoldWidgets && o.foldWidgets,
                        g = i ? i.start.row : Number.MAX_VALUE,
                        p = 'ace_gutter-cell ';
                      if (
                        (this.$highlightGutterLine &&
                          (s == this.$cursorRow ||
                            (i && s < this.$cursorRow && s >= g && this.$cursorRow <= i.end.row)) &&
                          ((p += 'ace_gutter-active-line '),
                          this.$cursorCell != e &&
                            (this.$cursorCell &&
                              (this.$cursorCell.element.className = this.$cursorCell.element.className.replace(
                                'ace_gutter-active-line ',
                                ''
                              )),
                            (this.$cursorCell = e))),
                        c[s] && (p += c[s]),
                        u[s] && (p += u[s]),
                        this.$annotations[s] && (p += this.$annotations[s].className),
                        r.className != p && (r.className = p),
                        f)
                      ) {
                        var m = f[s];
                        null == m && (m = f[s] = o.getFoldWidget(s));
                      }
                      if (m) {
                        (p = 'ace_fold-widget ace_' + m),
                          'start' == m && s == g && s < i.end.row ? (p += ' ace_closed') : (p += ' ace_open'),
                          l.className != p && (l.className = p);
                        var v = t.lineHeight + 'px';
                        n.setStyle(l.style, 'height', v), n.setStyle(l.style, 'display', 'inline-block');
                      } else l && n.setStyle(l.style, 'display', 'none');
                      var w = (d ? d.getText(o, s) : s + h).toString();
                      return (
                        w !== a.data && (a.data = w),
                        n.setStyle(e.element.style, 'height', this.$lines.computeLineHeight(s, t, o) + 'px'),
                        n.setStyle(e.element.style, 'top', this.$lines.computeLineTop(s, t, o) + 'px'),
                        (e.text = w),
                        e
                      );
                    }),
                    (this.$fixedWidth = !1),
                    (this.$highlightGutterLine = !0),
                    (this.$renderer = ''),
                    (this.setHighlightGutterLine = function (e) {
                      this.$highlightGutterLine = e;
                    }),
                    (this.$showLineNumbers = !0),
                    (this.$renderer = ''),
                    (this.setShowLineNumbers = function (e) {
                      this.$renderer = !e && {
                        getWidth: function () {
                          return 0;
                        },
                        getText: function () {
                          return '';
                        },
                      };
                    }),
                    (this.getShowLineNumbers = function () {
                      return this.$showLineNumbers;
                    }),
                    (this.$showFoldWidgets = !0),
                    (this.setShowFoldWidgets = function (e) {
                      e
                        ? n.addCssClass(this.element, 'ace_folding-enabled')
                        : n.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 = n.computedStyle(this.element.firstChild);
                      return (
                        (this.$padding = {}),
                        (this.$padding.left = (parseInt(e.borderLeftWidth) || 0) + (parseInt(e.paddingLeft) || 0) + 1),
                        (this.$padding.right = (parseInt(e.borderRightWidth) || 0) + (parseInt(e.paddingRight) || 0)),
                        this.$padding
                      );
                    }),
                    (this.getRegion = function (e) {
                      var t = this.$padding || this.$computePadding(),
                        i = this.element.getBoundingClientRect();
                      return e.x < t.left + i.left
                        ? 'markers'
                        : this.$showFoldWidgets && e.x > i.right - t.right
                        ? 'foldWidgets'
                        : void 0;
                    });
                }).call(l.prototype),
                  (t.Gutter = l);
              }
            ),
            ace.define(
              'ace/layer/marker',
              ['require', 'exports', 'module', 'ace/range', 'ace/lib/dom'],
              function (e, t, i) {
                'use strict';
                var n = e('../range').Range,
                  s = e('../lib/dom'),
                  r = function (e) {
                    (this.element = s.createElement('div')),
                      (this.element.className = 'ace_layer ace_marker-layer'),
                      e.appendChild(this.element);
                  };
                (function () {
                  (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.elt = function (e, t) {
                      var i = -1 != this.i && this.element.childNodes[this.i];
                      i ? this.i++ : ((i = document.createElement('div')), this.element.appendChild(i), (this.i = -1)),
                        (i.style.cssText = t),
                        (i.className = e);
                    }),
                    (this.update = function (e) {
                      if (e) {
                        var t;
                        for (var i in ((this.config = e), (this.i = 0), this.markers)) {
                          var n = this.markers[i];
                          if (n.range) {
                            var s = n.range.clipRows(e.firstRow, e.lastRow);
                            if (!s.isEmpty())
                              if (((s = s.toScreenRange(this.session)), n.renderer)) {
                                var r = this.$getTop(s.start.row, e),
                                  o = this.$padding + s.start.column * e.characterWidth;
                                n.renderer(t, s, o, r, e);
                              } else
                                'fullLine' == n.type
                                  ? this.drawFullLineMarker(t, s, n.clazz, e)
                                  : 'screenLine' == n.type
                                  ? this.drawScreenLineMarker(t, s, n.clazz, e)
                                  : s.isMultiLine()
                                  ? 'text' == n.type
                                    ? this.drawTextMarker(t, s, n.clazz, e)
                                    : this.drawMultiLineMarker(t, s, n.clazz, e)
                                  : this.drawSingleLineMarker(t, s, n.clazz + ' ace_start ace_br15', e);
                          } else n.update(t, this, this.session, e);
                        }
                        if (-1 != this.i)
                          for (; this.i < this.element.childElementCount; )
                            this.element.removeChild(this.element.lastChild);
                      }
                    }),
                    (this.$getTop = function (e, t) {
                      return (e - t.firstRowScreen) * t.lineHeight;
                    }),
                    (this.drawTextMarker = function (e, t, i, s, r) {
                      for (
                        var o = this.session,
                          a = t.start.row,
                          l = t.end.row,
                          h = a,
                          c = 0,
                          u = 0,
                          d = o.getScreenLastRowColumn(h),
                          f = new n(h, t.start.column, h, u);
                        h <= l;
                        h++
                      )
                        (f.start.row = f.end.row = h),
                          (f.start.column = h == a ? t.start.column : o.getRowWrapIndent(h)),
                          (f.end.column = d),
                          (c = u),
                          (u = d),
                          (d = h + 1 < l ? o.getScreenLastRowColumn(h + 1) : h == l ? 0 : t.end.column),
                          this.drawSingleLineMarker(
                            e,
                            f,
                            i +
                              (h == a ? ' ace_start' : '') +
                              ' ace_br' +
                              ((h == a || (h == a + 1 && t.start.column) ? 1 : 0) |
                                (c < u ? 2 : 0) |
                                (u > d ? 4 : 0) |
                                (h == l ? 8 : 0)),
                            s,
                            h == l ? 0 : 1,
                            r
                          );
                    }),
                    (this.drawMultiLineMarker = function (e, t, i, n, s) {
                      var r = this.$padding,
                        o = n.lineHeight,
                        a = this.$getTop(t.start.row, n),
                        l = r + t.start.column * n.characterWidth;
                      if (
                        ((s = s || ''),
                        this.session.$bidiHandler.isBidiRow(t.start.row)
                          ? (((h = t.clone()).end.row = h.start.row),
                            (h.end.column = this.session.getLine(h.start.row).length),
                            this.drawBidiSingleLineMarker(e, h, i + ' ace_br1 ace_start', n, null, s))
                          : this.elt(
                              i + ' ace_br1 ace_start',
                              'height:' + o + 'px;right:0;top:' + a + 'px;left:' + l + 'px;' + (s || '')
                            ),
                        this.session.$bidiHandler.isBidiRow(t.end.row))
                      ) {
                        var h;
                        ((h = t.clone()).start.row = h.end.row),
                          (h.start.column = 0),
                          this.drawBidiSingleLineMarker(e, h, i + ' ace_br12', n, null, s);
                      } else {
                        a = this.$getTop(t.end.row, n);
                        var c = t.end.column * n.characterWidth;
                        this.elt(
                          i + ' ace_br12',
                          'height:' + o + 'px;width:' + c + 'px;top:' + a + 'px;left:' + r + 'px;' + (s || '')
                        );
                      }
                      if (!((o = (t.end.row - t.start.row - 1) * n.lineHeight) <= 0)) {
                        a = this.$getTop(t.start.row + 1, n);
                        var u = (t.start.column ? 1 : 0) | (t.end.column ? 0 : 8);
                        this.elt(
                          i + (u ? ' ace_br' + u : ''),
                          'height:' + o + 'px;right:0;top:' + a + 'px;left:' + r + 'px;' + (s || '')
                        );
                      }
                    }),
                    (this.drawSingleLineMarker = function (e, t, i, n, s, r) {
                      if (this.session.$bidiHandler.isBidiRow(t.start.row))
                        return this.drawBidiSingleLineMarker(e, t, i, n, s, r);
                      var o = n.lineHeight,
                        a = (t.end.column + (s || 0) - t.start.column) * n.characterWidth,
                        l = this.$getTop(t.start.row, n),
                        h = this.$padding + t.start.column * n.characterWidth;
                      this.elt(i, 'height:' + o + 'px;width:' + a + 'px;top:' + l + 'px;left:' + h + 'px;' + (r || ''));
                    }),
                    (this.drawBidiSingleLineMarker = function (e, t, i, n, s, r) {
                      var o = n.lineHeight,
                        a = this.$getTop(t.start.row, n),
                        l = this.$padding;
                      this.session.$bidiHandler.getSelections(t.start.column, t.end.column).forEach(function (e) {
                        this.elt(
                          i,
                          'height:' +
                            o +
                            'px;width:' +
                            e.width +
                            (s || 0) +
                            'px;top:' +
                            a +
                            'px;left:' +
                            (l + e.left) +
                            'px;' +
                            (r || '')
                        );
                      }, this);
                    }),
                    (this.drawFullLineMarker = function (e, t, i, n, s) {
                      var r = this.$getTop(t.start.row, n),
                        o = n.lineHeight;
                      t.start.row != t.end.row && (o += this.$getTop(t.end.row, n) - r),
                        this.elt(i, 'height:' + o + 'px;top:' + r + 'px;left:0;right:0;' + (s || ''));
                    }),
                    (this.drawScreenLineMarker = function (e, t, i, n, s) {
                      var r = this.$getTop(t.start.row, n),
                        o = n.lineHeight;
                      this.elt(i, 'height:' + o + 'px;top:' + r + 'px;left:0;right:0;' + (s || ''));
                    });
                }).call(r.prototype),
                  (t.Marker = r);
              }
            ),
            ace.define(
              'ace/layer/text',
              [
                'require',
                'exports',
                'module',
                'ace/lib/oop',
                'ace/lib/dom',
                'ace/lib/lang',
                'ace/layer/lines',
                'ace/lib/event_emitter',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/oop'),
                  s = e('../lib/dom'),
                  r = e('../lib/lang'),
                  o = e('./lines').Lines,
                  a = e('../lib/event_emitter').EventEmitter,
                  l = function (e) {
                    (this.dom = s),
                      (this.element = this.dom.createElement('div')),
                      (this.element.className = 'ace_layer ace_text-layer'),
                      e.appendChild(this.element),
                      (this.$updateEolChar = this.$updateEolChar.bind(this)),
                      (this.$lines = new o(this.element));
                  };
                (function () {
                  n.implement(this, a),
                    (this.EOF_CHAR = '¶'),
                    (this.EOL_CHAR_LF = '¬'),
                    (this.EOL_CHAR_CRLF = '¤'),
                    (this.EOL_CHAR = this.EOL_CHAR_LF),
                    (this.TAB_CHAR = '—'),
                    (this.SPACE_CHAR = '·'),
                    (this.$padding = 0),
                    (this.MAX_LINE_LENGTH = 1e4),
                    (this.$updateEolChar = function () {
                      var e = this.session.doc,
                        t =
                          '\n' == e.getNewLineCharacter() && 'windows' != e.getNewLineMode()
                            ? this.EOL_CHAR_LF
                            : this.EOL_CHAR_CRLF;
                      if (this.EOL_CHAR != t) return (this.EOL_CHAR = t), !0;
                    }),
                    (this.setPadding = function (e) {
                      (this.$padding = e), (this.element.style.margin = '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 (e) {
                            this._signal('changeCharacterSize', e);
                          }.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.showSpaces = !1),
                    (this.showTabs = !1),
                    (this.showEOL = !1),
                    (this.setShowInvisibles = function (e) {
                      return (
                        this.showInvisibles != e &&
                        ((this.showInvisibles = e),
                        'string' == typeof e
                          ? ((this.showSpaces = /tab/i.test(e)),
                            (this.showTabs = /space/i.test(e)),
                            (this.showEOL = /eol/i.test(e)))
                          : (this.showSpaces = this.showTabs = this.showEOL = 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]), i = 1; i < e + 1; i++)
                          this.showTabs
                            ? (((n = this.dom.createElement('span')).className = 'ace_invisible ace_invisible_tab'),
                              (n.textContent = r.stringRepeat(this.TAB_CHAR, i)),
                              t.push(n))
                            : t.push(this.dom.createTextNode(r.stringRepeat(' ', i), this.element));
                        if (this.displayIndentGuides) {
                          this.$indentGuideRe = /\s\S| \t|\t |\s$/;
                          var n,
                            s = 'ace_indent-guide',
                            o = this.showSpaces ? ' ace_invisible ace_invisible_space' : '',
                            a = this.showSpaces
                              ? r.stringRepeat(this.SPACE_CHAR, this.tabSize)
                              : r.stringRepeat(' ', this.tabSize),
                            l = this.showTabs ? ' ace_invisible ace_invisible_tab' : '',
                            h = this.showTabs ? r.stringRepeat(this.TAB_CHAR, this.tabSize) : a;
                          ((n = this.dom.createElement('span')).className = s + o),
                            (n.textContent = a),
                            (this.$tabStrings[' '] = n),
                            ((n = this.dom.createElement('span')).className = s + l),
                            (n.textContent = h),
                            (this.$tabStrings['\t'] = n);
                        }
                      }),
                    (this.updateLines = function (e, t, i) {
                      if (this.config.lastRow != e.lastRow || this.config.firstRow != e.firstRow) return this.update(e);
                      this.config = e;
                      for (
                        var n = Math.max(t, e.firstRow),
                          s = Math.min(i, e.lastRow),
                          r = this.element.childNodes,
                          o = 0,
                          a = e.firstRow;
                        a < n;
                        a++
                      ) {
                        if ((l = this.session.getFoldLine(a))) {
                          if (l.containsRow(n)) {
                            n = l.start.row;
                            break;
                          }
                          a = l.end.row;
                        }
                        o++;
                      }
                      for (
                        var l, h = !1, c = ((a = n), (l = this.session.getNextFoldLine(a)) ? l.start.row : 1 / 0);
                        a > c &&
                          ((a = l.end.row + 1), (c = (l = this.session.getNextFoldLine(a, l)) ? l.start.row : 1 / 0)),
                          !(a > s);

                      ) {
                        var u = r[o++];
                        if (u) {
                          this.dom.removeChildren(u),
                            this.$renderLine(u, a, a == c && l),
                            h && (u.style.top = this.$lines.computeLineTop(a, e, this.session) + 'px');
                          var d = e.lineHeight * this.session.getRowLength(a) + 'px';
                          u.style.height != d && ((h = !0), (u.style.height = d));
                        }
                        a++;
                      }
                      if (h)
                        for (; o < this.$lines.cells.length; ) {
                          var f = this.$lines.cells[o++];
                          f.element.style.top = this.$lines.computeLineTop(f.row, e, this.session) + 'px';
                        }
                    }),
                    (this.scrollLines = function (e) {
                      var t = this.config;
                      if (((this.config = e), this.$lines.pageChanged(t, e))) return this.update(e);
                      this.$lines.moveContainer(e);
                      var i = e.lastRow,
                        n = t ? t.lastRow : -1;
                      if (!t || n < e.firstRow) return this.update(e);
                      if (i < t.firstRow) return this.update(e);
                      if (!t || t.lastRow < e.firstRow) return this.update(e);
                      if (e.lastRow < t.firstRow) return this.update(e);
                      if (t.firstRow < e.firstRow)
                        for (var s = this.session.getFoldedRowCount(t.firstRow, e.firstRow - 1); s > 0; s--)
                          this.$lines.shift();
                      if (t.lastRow > e.lastRow)
                        for (s = this.session.getFoldedRowCount(e.lastRow + 1, t.lastRow); s > 0; s--)
                          this.$lines.pop();
                      e.firstRow < t.firstRow &&
                        this.$lines.unshift(this.$renderLinesFragment(e, e.firstRow, t.firstRow - 1)),
                        e.lastRow > t.lastRow &&
                          this.$lines.push(this.$renderLinesFragment(e, t.lastRow + 1, e.lastRow));
                    }),
                    (this.$renderLinesFragment = function (e, t, i) {
                      for (
                        var n = [], r = t, o = this.session.getNextFoldLine(r), a = o ? o.start.row : 1 / 0;
                        r > a &&
                          ((r = o.end.row + 1), (a = (o = this.session.getNextFoldLine(r, o)) ? o.start.row : 1 / 0)),
                          !(r > i);

                      ) {
                        var l = this.$lines.createCell(r, e, this.session),
                          h = l.element;
                        this.dom.removeChildren(h),
                          s.setStyle(h.style, 'height', this.$lines.computeLineHeight(r, e, this.session) + 'px'),
                          s.setStyle(h.style, 'top', this.$lines.computeLineTop(r, e, this.session) + 'px'),
                          this.$renderLine(h, r, r == a && o),
                          this.$useLineGroups() ? (h.className = 'ace_line_group') : (h.className = 'ace_line'),
                          n.push(l),
                          r++;
                      }
                      return n;
                    }),
                    (this.update = function (e) {
                      this.$lines.moveContainer(e), (this.config = e);
                      for (var t = e.firstRow, i = e.lastRow, n = this.$lines; n.getLength(); ) n.pop();
                      n.push(this.$renderLinesFragment(e, t, i));
                    }),
                    (this.$textToken = { text: !0, rparen: !0, lparen: !0 }),
                    (this.$renderToken = function (e, t, i, n) {
                      for (
                        var s,
                          o = this,
                          a =
                            /(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\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]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,
                          l = this.dom.createFragment(this.element),
                          h = 0;
                        (s = a.exec(n));

                      ) {
                        var c = s[1],
                          u = s[2],
                          d = s[3],
                          f = s[4],
                          g = s[5];
                        if (o.showSpaces || !u) {
                          var p = h != s.index ? n.slice(h, s.index) : '';
                          if (
                            ((h = s.index + s[0].length),
                            p && l.appendChild(this.dom.createTextNode(p, this.element)),
                            c)
                          ) {
                            var m = o.session.getScreenTabSize(t + s.index);
                            l.appendChild(o.$tabStrings[m].cloneNode(!0)), (t += m - 1);
                          } else
                            u
                              ? o.showSpaces
                                ? (((w = this.dom.createElement('span')).className =
                                    'ace_invisible ace_invisible_space'),
                                  (w.textContent = r.stringRepeat(o.SPACE_CHAR, u.length)),
                                  l.appendChild(w))
                                : l.appendChild(this.com.createTextNode(u, this.element))
                              : d
                              ? (((w = this.dom.createElement('span')).className =
                                  'ace_invisible ace_invisible_space ace_invalid'),
                                (w.textContent = r.stringRepeat(o.SPACE_CHAR, d.length)),
                                l.appendChild(w))
                              : f
                              ? ((t += 1),
                                ((w = this.dom.createElement('span')).style.width = 2 * o.config.characterWidth + 'px'),
                                (w.className = o.showSpaces ? 'ace_cjk ace_invisible ace_invisible_space' : 'ace_cjk'),
                                (w.textContent = o.showSpaces ? o.SPACE_CHAR : f),
                                l.appendChild(w))
                              : g &&
                                ((t += 1),
                                ((w = this.dom.createElement('span')).style.width = 2 * o.config.characterWidth + 'px'),
                                (w.className = 'ace_cjk'),
                                (w.textContent = g),
                                l.appendChild(w));
                        }
                      }
                      if (
                        (l.appendChild(this.dom.createTextNode(h ? n.slice(h) : n, this.element)),
                        this.$textToken[i.type])
                      )
                        e.appendChild(l);
                      else {
                        var v = 'ace_' + i.type.replace(/\./g, ' ace_'),
                          w = this.dom.createElement('span');
                        'fold' == i.type && (w.style.width = i.value.length * this.config.characterWidth + 'px'),
                          (w.className = v),
                          w.appendChild(l),
                          e.appendChild(w);
                      }
                      return t + n.length;
                    }),
                    (this.renderIndentGuide = function (e, t, i) {
                      var n = t.search(this.$indentGuideRe);
                      if (n <= 0 || n >= i) return t;
                      if (' ' == t[0]) {
                        for (var s = (n -= n % this.tabSize) / this.tabSize, r = 0; r < s; r++)
                          e.appendChild(this.$tabStrings[' '].cloneNode(!0));
                        return t.substr(n);
                      }
                      if ('\t' == t[0]) {
                        for (r = 0; r < n; r++) e.appendChild(this.$tabStrings['\t'].cloneNode(!0));
                        return t.substr(n);
                      }
                      return t;
                    }),
                    (this.$createLineElement = function (e) {
                      var t = this.dom.createElement('div');
                      return (t.className = 'ace_line'), (t.style.height = this.config.lineHeight + 'px'), t;
                    }),
                    (this.$renderWrappedLine = function (e, t, i) {
                      var n = 0,
                        s = 0,
                        o = i[0],
                        a = 0,
                        l = this.$createLineElement();
                      e.appendChild(l);
                      for (var h = 0; h < t.length; h++) {
                        var c = t[h],
                          u = c.value;
                        if (0 == h && this.displayIndentGuides) {
                          if (((n = u.length), !(u = this.renderIndentGuide(l, u, o)))) continue;
                          n -= u.length;
                        }
                        if (n + u.length < o) (a = this.$renderToken(l, a, c, u)), (n += u.length);
                        else {
                          for (; n + u.length >= o; )
                            (a = this.$renderToken(l, a, c, u.substring(0, o - n))),
                              (u = u.substring(o - n)),
                              (n = o),
                              (l = this.$createLineElement()),
                              e.appendChild(l),
                              l.appendChild(this.dom.createTextNode(r.stringRepeat(' ', i.indent), this.element)),
                              (a = 0),
                              (o = i[++s] || Number.MAX_VALUE);
                          0 != u.length && ((n += u.length), (a = this.$renderToken(l, a, c, u)));
                        }
                      }
                      i[i.length - 1] > this.MAX_LINE_LENGTH && this.$renderOverflowMessage(l, a, null, '', !0);
                    }),
                    (this.$renderSimpleLine = function (e, t) {
                      var i = 0,
                        n = t[0],
                        s = n.value;
                      this.displayIndentGuides && (s = this.renderIndentGuide(e, s)),
                        s && (i = this.$renderToken(e, i, n, s));
                      for (var r = 1; r < t.length; r++) {
                        if (i + (s = (n = t[r]).value).length > this.MAX_LINE_LENGTH)
                          return this.$renderOverflowMessage(e, i, n, s);
                        i = this.$renderToken(e, i, n, s);
                      }
                    }),
                    (this.$renderOverflowMessage = function (e, t, i, n, s) {
                      i && this.$renderToken(e, t, i, n.slice(0, this.MAX_LINE_LENGTH - t));
                      var r = this.dom.createElement('span');
                      (r.className = 'ace_inline_button ace_keyword ace_toggle_wrap'),
                        (r.textContent = s ? '<hide>' : '<click to see more...>'),
                        e.appendChild(r);
                    }),
                    (this.$renderLine = function (e, t, i) {
                      if ((i || 0 == i || (i = this.session.getFoldLine(t)), i)) var n = this.$getFoldLineTokens(t, i);
                      else n = this.session.getTokens(t);
                      var s = e;
                      if (n.length) {
                        var r = this.session.getRowSplitData(t);
                        r && r.length
                          ? (this.$renderWrappedLine(e, n, r), (s = e.lastChild))
                          : ((s = e),
                            this.$useLineGroups() && ((s = this.$createLineElement()), e.appendChild(s)),
                            this.$renderSimpleLine(s, n));
                      } else this.$useLineGroups() && ((s = this.$createLineElement()), e.appendChild(s));
                      if (this.showEOL && s) {
                        i && (t = i.end.row);
                        var o = this.dom.createElement('span');
                        (o.className = 'ace_invisible ace_invisible_eol'),
                          (o.textContent = t == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR),
                          s.appendChild(o);
                      }
                    }),
                    (this.$getFoldLineTokens = function (e, t) {
                      var i = this.session,
                        n = [],
                        s = i.getTokens(e);
                      return (
                        t.walk(
                          function (e, t, r, o, a) {
                            null != e
                              ? n.push({ type: 'fold', value: e })
                              : (a && (s = i.getTokens(t)),
                                s.length &&
                                  (function (e, t, i) {
                                    for (var s = 0, r = 0; r + e[s].value.length < t; )
                                      if (((r += e[s].value.length), ++s == e.length)) return;
                                    for (
                                      r != t &&
                                      ((o = e[s].value.substring(t - r)).length > i - t && (o = o.substring(0, i - t)),
                                      n.push({ type: e[s].type, value: o }),
                                      (r = t + o.length),
                                      (s += 1));
                                      r < i && s < e.length;

                                    ) {
                                      var o;
                                      (o = e[s].value).length + r > i
                                        ? n.push({ type: e[s].type, value: o.substring(0, i - r) })
                                        : n.push(e[s]),
                                        (r += o.length),
                                        (s += 1);
                                    }
                                  })(s, o, r));
                          },
                          t.end.row,
                          this.session.getLine(t.end.row).length
                        ),
                        n
                      );
                    }),
                    (this.$useLineGroups = function () {
                      return this.session.getUseWrapMode();
                    }),
                    (this.destroy = function () {});
                }).call(l.prototype),
                  (t.Text = l);
              }
            ),
            ace.define('ace/layer/cursor', ['require', 'exports', 'module', 'ace/lib/dom'], function (e, t, i) {
              'use strict';
              var n = e('../lib/dom'),
                s = function (e) {
                  (this.element = n.createElement('div')),
                    (this.element.className = 'ace_layer ace_cursor-layer'),
                    e.appendChild(this.element),
                    (this.isVisible = !1),
                    (this.isBlinking = !0),
                    (this.blinkInterval = 1e3),
                    (this.smoothBlinking = !1),
                    (this.cursors = []),
                    (this.cursor = this.addCursor()),
                    n.addCssClass(this.element, 'ace_hidden-cursors'),
                    (this.$updateCursors = this.$updateOpacity.bind(this));
                };
              (function () {
                (this.$updateOpacity = function (e) {
                  for (var t = this.cursors, i = t.length; i--; ) n.setStyle(t[i].style, 'opacity', e ? '' : '0');
                }),
                  (this.$startCssAnimation = function () {
                    for (var e = this.cursors, t = e.length; t--; )
                      e[t].style.animationDuration = this.blinkInterval + 'ms';
                    (this.$isAnimating = !0),
                      setTimeout(
                        function () {
                          this.$isAnimating && n.addCssClass(this.element, 'ace_animate-blinking');
                        }.bind(this)
                      );
                  }),
                  (this.$stopCssAnimation = function () {
                    (this.$isAnimating = !1), n.removeCssClass(this.element, 'ace_animate-blinking');
                  }),
                  (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 &&
                      ((this.smoothBlinking = e),
                      n.setCssClass(this.element, 'ace_smooth-blinking', e),
                      this.$updateCursors(!0),
                      this.restartTimer());
                  }),
                  (this.addCursor = function () {
                    var e = n.createElement('div');
                    return (e.className = 'ace_cursor'), this.element.appendChild(e), this.cursors.push(e), e;
                  }),
                  (this.removeCursor = function () {
                    if (this.cursors.length > 1) {
                      var e = this.cursors.pop();
                      return e.parentNode.removeChild(e), e;
                    }
                  }),
                  (this.hideCursor = function () {
                    (this.isVisible = !1), n.addCssClass(this.element, 'ace_hidden-cursors'), this.restartTimer();
                  }),
                  (this.showCursor = function () {
                    (this.isVisible = !0), n.removeCssClass(this.element, 'ace_hidden-cursors'), this.restartTimer();
                  }),
                  (this.restartTimer = function () {
                    var e = this.$updateCursors;
                    if (
                      (clearInterval(this.intervalId),
                      clearTimeout(this.timeoutId),
                      this.$stopCssAnimation(),
                      this.smoothBlinking &&
                        ((this.$isSmoothBlinking = !1), n.removeCssClass(this.element, 'ace_smooth-blinking')),
                      e(!0),
                      this.isBlinking && this.blinkInterval && this.isVisible)
                    )
                      if (
                        (this.smoothBlinking &&
                          ((this.$isSmoothBlinking = !0),
                          setTimeout(
                            function () {
                              this.$isSmoothBlinking && n.addCssClass(this.element, 'ace_smooth-blinking');
                            }.bind(this)
                          )),
                        n.HAS_CSS_ANIMATION)
                      )
                        this.$startCssAnimation();
                      else {
                        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();
                      }
                    else this.$stopCssAnimation();
                  }),
                  (this.getPixelPosition = function (e, t) {
                    if (!this.config || !this.session) return { left: 0, top: 0 };
                    e || (e = this.session.selection.getCursor());
                    var i = this.session.documentToScreenPosition(e);
                    return {
                      left:
                        this.$padding +
                        (this.session.$bidiHandler.isBidiRow(i.row, e.row)
                          ? this.session.$bidiHandler.getPosLeft(i.column)
                          : i.column * this.config.characterWidth),
                      top: (i.row - (t ? this.config.firstRowScreen : 0)) * this.config.lineHeight,
                    };
                  }),
                  (this.isCursorInView = function (e, t) {
                    return e.top >= 0 && e.top < t.maxHeight;
                  }),
                  (this.update = function (e) {
                    this.config = e;
                    var t = this.session.$selectionMarkers,
                      i = 0,
                      s = 0;
                    (void 0 !== t && 0 !== t.length) || (t = [{ cursor: null }]), (i = 0);
                    for (var r = t.length; i < r; i++) {
                      var o = this.getPixelPosition(t[i].cursor, !0);
                      if (!((o.top > e.height + e.offset || o.top < 0) && i > 1)) {
                        var a = this.cursors[s++] || this.addCursor(),
                          l = a.style;
                        this.drawCursor
                          ? this.drawCursor(a, o, e, t[i], this.session)
                          : this.isCursorInView(o, e)
                          ? (n.setStyle(l, 'display', 'block'),
                            n.translate(a, o.left, o.top),
                            n.setStyle(l, 'width', Math.round(e.characterWidth) + 'px'),
                            n.setStyle(l, 'height', e.lineHeight + 'px'))
                          : n.setStyle(l, 'display', 'none');
                      }
                    }
                    for (; this.cursors.length > s; ) this.removeCursor();
                    var h = this.session.getOverwrite();
                    this.$setOverwrite(h), (this.$pixelPos = o), this.restartTimer();
                  }),
                  (this.drawCursor = null),
                  (this.$setOverwrite = function (e) {
                    e != this.overwrite &&
                      ((this.overwrite = e),
                      e
                        ? n.addCssClass(this.element, 'ace_overwrite-cursors')
                        : n.removeCssClass(this.element, 'ace_overwrite-cursors'));
                  }),
                  (this.destroy = function () {
                    clearInterval(this.intervalId), clearTimeout(this.timeoutId);
                  });
              }).call(s.prototype),
                (t.Cursor = s);
            }),
            ace.define(
              'ace/scrollbar',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/dom', 'ace/lib/event', 'ace/lib/event_emitter'],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./lib/dom'),
                  r = e('./lib/event'),
                  o = e('./lib/event_emitter').EventEmitter,
                  a = 32768,
                  l = function (e) {
                    (this.element = s.createElement('div')),
                      (this.element.className = 'ace_scrollbar ace_scrollbar' + this.classSuffix),
                      (this.inner = s.createElement('div')),
                      (this.inner.className = 'ace_scrollbar-inner'),
                      (this.inner.textContent = ' '),
                      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 () {
                  n.implement(this, o),
                    (this.setVisible = function (e) {
                      (this.element.style.display = e ? '' : 'none'), (this.isVisible = e), (this.coeff = 1);
                    });
                }).call(l.prototype);
                var h = function (e, t) {
                  l.call(this, e),
                    (this.scrollTop = 0),
                    (this.scrollHeight = 0),
                    (t.$scrollbarWidth = this.width = s.scrollbarWidth(e.ownerDocument)),
                    (this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + 'px'),
                    (this.$minWidth = 0);
                };
                n.inherits(h, l),
                  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 Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);
                      }),
                      (this.setHeight = function (e) {
                        this.element.style.height = e + 'px';
                      }),
                      (this.setInnerHeight = this.setScrollHeight =
                        function (e) {
                          (this.scrollHeight = e),
                            e > a ? ((this.coeff = a / e), (e = a)) : 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(h.prototype);
                var c = function (e, t) {
                  l.call(this, e),
                    (this.scrollLeft = 0),
                    (this.height = t.$scrollbarWidth),
                    (this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + 'px');
                };
                n.inherits(c, l),
                  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(c.prototype),
                  (t.ScrollBar = h),
                  (t.ScrollBarV = h),
                  (t.ScrollBarH = c),
                  (t.VScrollBar = h),
                  (t.HScrollBar = c);
              }
            ),
            ace.define('ace/renderloop', ['require', 'exports', 'module', 'ace/lib/event'], function (e, t, i) {
              'use strict';
              var n = e('./lib/event'),
                s = function (e, t) {
                  (this.onRender = e),
                    (this.pending = !1),
                    (this.changes = 0),
                    (this.$recursionLimit = 2),
                    (this.window = t || window);
                  var i = this;
                  this._flush = function (e) {
                    i.pending = !1;
                    var t = i.changes;
                    if ((t && (n.blockIdle(100), (i.changes = 0), i.onRender(t)), i.changes)) {
                      if (i.$recursionLimit-- < 0) return;
                      i.schedule();
                    } else i.$recursionLimit = 2;
                  };
                };
              (function () {
                (this.schedule = function (e) {
                  (this.changes = this.changes | e),
                    this.changes && !this.pending && (n.nextFrame(this._flush), (this.pending = !0));
                }),
                  (this.clear = function (e) {
                    var t = this.changes;
                    return (this.changes = 0), t;
                  });
              }).call(s.prototype),
                (t.RenderLoop = s);
            }),
            ace.define(
              'ace/layer/font_metrics',
              [
                'require',
                'exports',
                'module',
                'ace/lib/oop',
                'ace/lib/dom',
                'ace/lib/lang',
                'ace/lib/event',
                'ace/lib/useragent',
                'ace/lib/event_emitter',
              ],
              function (e, t, i) {
                var n = e('../lib/oop'),
                  s = e('../lib/dom'),
                  r = e('../lib/lang'),
                  o = e('../lib/event'),
                  a = e('../lib/useragent'),
                  l = e('../lib/event_emitter').EventEmitter,
                  h = 256,
                  c = 'function' == typeof ResizeObserver,
                  u = 200,
                  d = (t.FontMetrics = function (e) {
                    (this.el = s.createElement('div')),
                      this.$setMeasureNodeStyles(this.el.style, !0),
                      (this.$main = s.createElement('div')),
                      this.$setMeasureNodeStyles(this.$main.style),
                      (this.$measureNode = s.createElement('div')),
                      this.$setMeasureNodeStyles(this.$measureNode.style),
                      this.el.appendChild(this.$main),
                      this.el.appendChild(this.$measureNode),
                      e.appendChild(this.el),
                      (this.$measureNode.textContent = r.stringRepeat('X', h)),
                      (this.$characterSize = { width: 0, height: 0 }),
                      c ? this.$addObserver() : this.checkForSizeChanges();
                  });
                (function () {
                  n.implement(this, l),
                    (this.$characterSize = { width: 0, height: 0 }),
                    (this.$setMeasureNodeStyles = function (e, t) {
                      (e.width = e.height = 'auto'),
                        (e.left = e.top = '0px'),
                        (e.visibility = 'hidden'),
                        (e.position = 'absolute'),
                        (e.whiteSpace = 'pre'),
                        a.isIE < 8 ? (e['font-family'] = 'inherit') : (e.font = 'inherit'),
                        (e.overflow = t ? 'hidden' : 'visible');
                    }),
                    (this.checkForSizeChanges = function (e) {
                      if (
                        (void 0 === e && (e = this.$measureSizes()),
                        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.$addObserver = function () {
                      var e = this;
                      (this.$observer = new window.ResizeObserver(function (t) {
                        e.checkForSizeChanges();
                      })),
                        this.$observer.observe(this.$measureNode);
                    }),
                    (this.$pollSizeChanges = function () {
                      if (this.$pollSizeChangesTimer || this.$observer) return this.$pollSizeChangesTimer;
                      var e = this;
                      return (this.$pollSizeChangesTimer = o.onIdle(function t() {
                        e.checkForSizeChanges(), o.onIdle(t, 500);
                      }, 500));
                    }),
                    (this.setPolling = function (e) {
                      e
                        ? this.$pollSizeChanges()
                        : this.$pollSizeChangesTimer &&
                          (clearInterval(this.$pollSizeChangesTimer), (this.$pollSizeChangesTimer = 0));
                    }),
                    (this.$measureSizes = function (e) {
                      var t = {
                        height: (e || this.$measureNode).clientHeight,
                        width: (e || this.$measureNode).clientWidth / h,
                      };
                      return 0 === t.width || 0 === t.height ? null : t;
                    }),
                    (this.$measureCharWidth = function (e) {
                      return (
                        (this.$main.textContent = r.stringRepeat(e, h)), this.$main.getBoundingClientRect().width / h
                      );
                    }),
                    (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.$observer && this.$observer.disconnect(),
                        this.el && this.el.parentNode && this.el.parentNode.removeChild(this.el);
                    }),
                    (this.$getZoom = function e(t) {
                      return t && t.parentElement ? (window.getComputedStyle(t).zoom || 1) * e(t.parentElement) : 1;
                    }),
                    (this.$initTransformMeasureNodes = function () {
                      var e = function (e, t) {
                        return ['div', { style: 'position: absolute;top:' + e + 'px;left:' + t + 'px;' }];
                      };
                      this.els = s.buildDom([e(0, 0), e(u, 0), e(0, u), e(u, u)], this.el);
                    }),
                    (this.transformCoordinates = function (e, t) {
                      function i(e, t, i) {
                        var n = e[1] * t[0] - e[0] * t[1];
                        return [(-t[1] * i[0] + t[0] * i[1]) / n, (+e[1] * i[0] - e[0] * i[1]) / n];
                      }
                      function n(e, t) {
                        return [e[0] - t[0], e[1] - t[1]];
                      }
                      function s(e, t) {
                        return [e[0] + t[0], e[1] + t[1]];
                      }
                      function r(e, t) {
                        return [e * t[0], e * t[1]];
                      }
                      function o(e) {
                        var t = e.getBoundingClientRect();
                        return [t.left, t.top];
                      }
                      e && (e = r(1 / this.$getZoom(this.el), e)), this.els || this.$initTransformMeasureNodes();
                      var a = o(this.els[0]),
                        l = o(this.els[1]),
                        h = o(this.els[2]),
                        c = o(this.els[3]),
                        d = i(n(c, l), n(c, h), n(s(l, h), s(c, a))),
                        f = r(1 + d[0], n(l, a)),
                        g = r(1 + d[1], n(h, a));
                      if (t) {
                        var p = t,
                          m = (d[0] * p[0]) / u + (d[1] * p[1]) / u + 1,
                          v = s(r(p[0], f), r(p[1], g));
                        return s(r(1 / m / u, v), a);
                      }
                      var w = n(e, a),
                        b = i(n(f, r(d[0], w)), n(g, r(d[1], w)), w);
                      return r(u, b);
                    });
                }).call(d.prototype);
              }
            ),
            ace.define(
              'ace/virtual_renderer',
              [
                'require',
                'exports',
                'module',
                'ace/lib/oop',
                'ace/lib/dom',
                'ace/config',
                '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',
                'ace/lib/useragent',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = e('./lib/dom'),
                  r = e('./config'),
                  o = e('./layer/gutter').Gutter,
                  a = e('./layer/marker').Marker,
                  l = e('./layer/text').Text,
                  h = e('./layer/cursor').Cursor,
                  c = e('./scrollbar').HScrollBar,
                  u = e('./scrollbar').VScrollBar,
                  d = e('./renderloop').RenderLoop,
                  f = e('./layer/font_metrics').FontMetrics,
                  g = e('./lib/event_emitter').EventEmitter,
                  p =
                    '.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 {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.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;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.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;contain: style size layout;}.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 {position: absolute;top: 0;left: 0;right: 0;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 {contain: strict;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;contain: strict;-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: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.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_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.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_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {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: 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;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 {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_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {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_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',
                  m = e('./lib/useragent'),
                  v = m.isIE;
                s.importCssString(p, 'ace_editor.css', !1);
                var w = function (e, t) {
                  var i = this;
                  (this.container = e || s.createElement('div')),
                    s.addCssClass(this.container, 'ace_editor'),
                    s.HI_DPI && s.addCssClass(this.container, 'ace_hidpi'),
                    this.setTheme(t),
                    null == r.get('useStrictCSP') && r.set('useStrictCSP', !1),
                    (this.$gutter = s.createElement('div')),
                    (this.$gutter.className = 'ace_gutter'),
                    this.container.appendChild(this.$gutter),
                    this.$gutter.setAttribute('aria-hidden', !0),
                    (this.scroller = s.createElement('div')),
                    (this.scroller.className = 'ace_scroller'),
                    this.container.appendChild(this.scroller),
                    (this.content = s.createElement('div')),
                    (this.content.className = 'ace_content'),
                    this.scroller.appendChild(this.content),
                    (this.$gutterLayer = new o(this.$gutter)),
                    this.$gutterLayer.on('changeGutterWidth', this.onGutterResize.bind(this)),
                    (this.$markerBack = new a(this.content));
                  var n = (this.$textLayer = new l(this.content));
                  (this.canvas = n.element),
                    (this.$markerFront = new a(this.content)),
                    (this.$cursorLayer = new h(this.content)),
                    (this.$horizScroll = !1),
                    (this.$vScroll = !1),
                    (this.scrollBar = this.scrollBarV = new u(this.container, this)),
                    (this.scrollBarH = new c(this.container, this)),
                    this.scrollBarV.on('scroll', function (e) {
                      i.$scrollAnimation || i.session.setScrollTop(e.data - i.scrollMargin.top);
                    }),
                    this.scrollBarH.on('scroll', function (e) {
                      i.$scrollAnimation || i.session.setScrollLeft(e.data - i.scrollMargin.left);
                    }),
                    (this.scrollTop = 0),
                    (this.scrollLeft = 0),
                    (this.cursorPos = { row: 0, column: 0 }),
                    (this.$fontMetrics = new f(this.container)),
                    this.$textLayer.$setFontMetrics(this.$fontMetrics),
                    this.$textLayer.on('changeCharacterSize', function (e) {
                      i.updateCharacterSize(),
                        i.onResize(!0, i.gutterWidth, i.$size.width, i.$size.height),
                        i._signal('changeCharacterSize', e);
                    }),
                    (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.margin = { left: 0, right: 0, top: 0, bottom: 0, v: 0, h: 0 }),
                    (this.$keepTextAreaAtCursor = !m.isIOS),
                    (this.$loop = new d(this.$renderChanges.bind(this), this.container.ownerDocument.defaultView)),
                    this.$loop.schedule(this.CHANGE_FULL),
                    this.updateCharacterSize(),
                    this.setPadding(4),
                    r.resetOptions(this),
                    r._signal('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),
                    n.implement(this, g),
                    (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(),
                        s.setStyle(this.scroller.style, 'line-height', this.lineHeight + 'px');
                    }),
                    (this.setSession = function (e) {
                      this.session && this.session.doc.off('changeNewLineMode', this.onChangeNewLineMode),
                        (this.session = e),
                        e && this.scrollMargin.top && e.getScrollTop() <= 0 && 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.scrollBarH.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, i) {
                      if (
                        (void 0 === t && (t = 1 / 0),
                        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 (!i) return;
                        this.$changedLines.lastRow = this.layerConfig.lastRow;
                      }
                      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.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);
                    }),
                    (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, i, n) {
                      if (!(this.resizing > 2)) {
                        this.resizing > 0 ? this.resizing++ : (this.resizing = e ? 1 : 0);
                        var s = this.container;
                        n || (n = s.clientHeight || s.scrollHeight), i || (i = s.clientWidth || s.scrollWidth);
                        var r = this.$updateCachedSize(e, t, i, n);
                        if (!this.$size.scrollerHeight || (!i && !n)) return (this.resizing = 0);
                        e && (this.$gutterLayer.$padding = null),
                          e ? this.$renderChanges(r | this.$changes, !0) : this.$loop.schedule(r | this.$changes),
                          this.resizing && (this.resizing = 0),
                          (this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null);
                      }
                    }),
                    (this.$updateCachedSize = function (e, t, i, n) {
                      n -= this.$extraHeight || 0;
                      var r = 0,
                        o = this.$size,
                        a = {
                          width: o.width,
                          height: o.height,
                          scrollerHeight: o.scrollerHeight,
                          scrollerWidth: o.scrollerWidth,
                        };
                      if (
                        (n &&
                          (e || o.height != n) &&
                          ((o.height = n),
                          (r |= this.CHANGE_SIZE),
                          (o.scrollerHeight = o.height),
                          this.$horizScroll && (o.scrollerHeight -= this.scrollBarH.getHeight()),
                          (this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + 'px'),
                          (r |= this.CHANGE_SCROLL)),
                        i && (e || o.width != i))
                      ) {
                        (r |= this.CHANGE_SIZE),
                          (o.width = i),
                          null == t && (t = this.$showGutter ? this.$gutter.offsetWidth : 0),
                          (this.gutterWidth = t),
                          s.setStyle(this.scrollBarH.element.style, 'left', t + 'px'),
                          s.setStyle(this.scroller.style, 'left', t + this.margin.left + 'px'),
                          (o.scrollerWidth = Math.max(0, i - t - this.scrollBarV.getWidth() - this.margin.h)),
                          s.setStyle(this.$gutter.style, 'left', this.margin.left + 'px');
                        var l = this.scrollBarV.getWidth() + 'px';
                        s.setStyle(this.scrollBarH.element.style, 'right', l),
                          s.setStyle(this.scroller.style, 'right', l),
                          s.setStyle(this.scroller.style, 'bottom', this.scrollBarH.getHeight()),
                          ((this.session && this.session.getUseWrapMode() && this.adjustWrapLimit()) || e) &&
                            (r |= this.CHANGE_FULL);
                      }
                      return (o.$dirty = !i || !n), r && this._signal('resize', a), r;
                    }),
                    (this.onGutterResize = function (e) {
                      var t = this.$showGutter ? e : 0;
                      t != this.gutterWidth &&
                        (this.$changes |= this.$updateCachedSize(!0, t, this.$size.width, this.$size.height)),
                        (this.session.getUseWrapMode() && this.adjustWrapLimit()) || this.$size.$dirty
                          ? this.$loop.schedule(this.CHANGE_FULL)
                          : this.$computeLayerConfig();
                    }),
                    (this.adjustWrapLimit = function () {
                      var e = this.$size.scrollerWidth - 2 * this.$padding,
                        t = Math.floor(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.session.$bidiHandler.setShowInvisibles(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.$updatePrintMargin = function () {
                      if (this.$showPrintMargin || this.$printMarginEl) {
                        if (!this.$printMarginEl) {
                          var e = s.createElement('div');
                          (e.className = 'ace_layer ace_print-margin-layer'),
                            (this.$printMarginEl = s.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 = Math.round(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.$isMousePressed) {
                        var e = this.textarea.style,
                          t = this.$composition;
                        if (this.$keepTextAreaAtCursor || t) {
                          var i = this.$cursorLayer.$pixelPos;
                          if (i) {
                            t && t.markerRange && (i = this.$cursorLayer.getPixelPosition(t.markerRange.start, !0));
                            var n = this.layerConfig,
                              r = i.top,
                              o = i.left;
                            r -= n.offset;
                            var a = t && t.useTextareaForIME ? this.lineHeight : v ? 0 : 1;
                            if (r < 0 || r > n.height - a) s.translate(this.textarea, 0, 0);
                            else {
                              var l = 1,
                                h = this.$size.height - a;
                              if (t)
                                if (t.useTextareaForIME) {
                                  var c = this.textarea.value;
                                  l = this.characterWidth * this.session.$getStringScreenWidth(c)[0];
                                } else r += this.lineHeight + 2;
                              else r += this.lineHeight;
                              (o -= this.scrollLeft) > this.$size.scrollerWidth - l &&
                                (o = this.$size.scrollerWidth - l),
                                (o += this.gutterWidth + this.margin.left),
                                s.setStyle(e, 'height', a + 'px'),
                                s.setStyle(e, 'width', l + 'px'),
                                s.translate(this.textarea, Math.min(o, this.$size.scrollerWidth - l), Math.min(r, h));
                            }
                          }
                        } else s.translate(this.textarea, -100, 0);
                      }
                    }),
                    (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;
                      return this.session.documentToScreenRow(t, 0) * e.lineHeight - 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, i, n) {
                      var s = this.scrollMargin;
                      (s.top = 0 | e),
                        (s.bottom = 0 | t),
                        (s.right = 0 | n),
                        (s.left = 0 | i),
                        (s.v = s.top + s.bottom),
                        (s.h = s.left + s.right),
                        s.top && this.scrollTop <= 0 && this.session && this.session.setScrollTop(-s.top),
                        this.updateFull();
                    }),
                    (this.setMargin = function (e, t, i, n) {
                      var s = this.margin;
                      (s.top = 0 | e),
                        (s.bottom = 0 | t),
                        (s.right = 0 | n),
                        (s.left = 0 | i),
                        (s.v = s.top + s.bottom),
                        (s.h = s.left + s.right),
                        this.$updateCachedSize(!0, this.gutterWidth, this.$size.width, this.$size.height),
                        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))
                      ) {
                        if (this.$size.$dirty) return (this.$changes |= e), this.onResize(!0);
                        this.lineHeight || this.$textLayer.checkForSizeChanges(),
                          this._signal('beforeRender', e),
                          this.session &&
                            this.session.$bidiHandler &&
                            this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);
                        var i = 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() | this.$loop.clear()),
                            i.firstRow != this.layerConfig.firstRow &&
                              i.firstRowScreen == this.layerConfig.firstRowScreen)
                          ) {
                            var n = this.scrollTop + (i.firstRow - this.layerConfig.firstRow) * this.lineHeight;
                            n > 0 &&
                              ((this.scrollTop = n),
                              (e |= this.CHANGE_SCROLL),
                              (e |= this.$computeLayerConfig() | this.$loop.clear()));
                          }
                          (i = this.layerConfig),
                            this.$updateScrollBarV(),
                            e & this.CHANGE_H_SCROLL && this.$updateScrollBarH(),
                            s.translate(this.content, -this.scrollLeft, -i.offset);
                          var r = i.width + 2 * this.$padding + 'px',
                            o = i.minHeight + 'px';
                          s.setStyle(this.content.style, 'width', r), s.setStyle(this.content.style, 'height', o);
                        }
                        if (
                          (e & this.CHANGE_H_SCROLL &&
                            (s.translate(this.content, -this.scrollLeft, -i.offset),
                            (this.scroller.className =
                              this.scrollLeft <= 0 ? 'ace_scroller' : 'ace_scroller ace_scroll-left')),
                          e & this.CHANGE_FULL)
                        )
                          return (
                            (this.$changedLines = null),
                            this.$textLayer.update(i),
                            this.$showGutter && this.$gutterLayer.update(i),
                            this.$markerBack.update(i),
                            this.$markerFront.update(i),
                            this.$cursorLayer.update(i),
                            this.$moveTextAreaToCursor(),
                            void this._signal('afterRender', e)
                          );
                        if (e & this.CHANGE_SCROLL)
                          return (
                            (this.$changedLines = null),
                            e & this.CHANGE_TEXT || e & this.CHANGE_LINES
                              ? this.$textLayer.update(i)
                              : this.$textLayer.scrollLines(i),
                            this.$showGutter &&
                              (e & this.CHANGE_GUTTER || e & this.CHANGE_LINES
                                ? this.$gutterLayer.update(i)
                                : this.$gutterLayer.scrollLines(i)),
                            this.$markerBack.update(i),
                            this.$markerFront.update(i),
                            this.$cursorLayer.update(i),
                            this.$moveTextAreaToCursor(),
                            void this._signal('afterRender', e)
                          );
                        e & this.CHANGE_TEXT
                          ? ((this.$changedLines = null),
                            this.$textLayer.update(i),
                            this.$showGutter && this.$gutterLayer.update(i))
                          : e & this.CHANGE_LINES
                          ? (this.$updateLines() || (e & this.CHANGE_GUTTER && this.$showGutter)) &&
                            this.$gutterLayer.update(i)
                          : e & this.CHANGE_TEXT || e & this.CHANGE_GUTTER
                          ? this.$showGutter && this.$gutterLayer.update(i)
                          : e & this.CHANGE_CURSOR &&
                            this.$highlightGutterLine &&
                            this.$gutterLayer.updateLineHighlight(i),
                          e & this.CHANGE_CURSOR && (this.$cursorLayer.update(i), this.$moveTextAreaToCursor()),
                          e & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT) && this.$markerFront.update(i),
                          e & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK) && this.$markerBack.update(i),
                          this._signal('afterRender', e);
                      } else this.$changes |= e;
                    }),
                    (this.$autosize = function () {
                      var e = this.session.getScreenLength() * this.lineHeight,
                        t = this.$maxLines * this.lineHeight,
                        i =
                          Math.min(t, Math.max((this.$minLines || 1) * this.lineHeight, e)) +
                          this.scrollMargin.v +
                          (this.$extraHeight || 0);
                      this.$horizScroll && (i += this.scrollBarH.getHeight()),
                        this.$maxPixelHeight && i > this.$maxPixelHeight && (i = this.$maxPixelHeight);
                      var n = !(i <= 2 * this.lineHeight) && e > t;
                      if (i != this.desiredHeight || this.$size.height != this.desiredHeight || n != this.$vScroll) {
                        n != this.$vScroll && ((this.$vScroll = n), this.scrollBarV.setVisible(n));
                        var s = this.container.clientWidth;
                        (this.container.style.height = i + 'px'),
                          this.$updateCachedSize(!0, this.$gutterWidth, s, i),
                          (this.desiredHeight = i),
                          this._signal('autosize');
                      }
                    }),
                    (this.$computeLayerConfig = function () {
                      var e = this.session,
                        t = this.$size,
                        i = t.height <= 2 * this.lineHeight,
                        n = this.session.getScreenLength() * this.lineHeight,
                        s = this.$getLongestLine(),
                        r = !i && (this.$hScrollBarAlwaysVisible || t.scrollerWidth - s - 2 * this.$padding < 0),
                        o = this.$horizScroll !== r;
                      o && ((this.$horizScroll = r), this.scrollBarH.setVisible(r));
                      var a = this.$vScroll;
                      this.$maxLines && this.lineHeight > 1 && this.$autosize();
                      var l = t.scrollerHeight + this.lineHeight,
                        h =
                          !this.$maxLines && this.$scrollPastEnd
                            ? (t.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
                            : 0;
                      n += h;
                      var c = this.scrollMargin;
                      this.session.setScrollTop(
                        Math.max(-c.top, Math.min(this.scrollTop, n - t.scrollerHeight + c.bottom))
                      ),
                        this.session.setScrollLeft(
                          Math.max(
                            -c.left,
                            Math.min(this.scrollLeft, s + 2 * this.$padding - t.scrollerWidth + c.right)
                          )
                        );
                      var u =
                          !i &&
                          (this.$vScrollBarAlwaysVisible || t.scrollerHeight - n + h < 0 || this.scrollTop > c.top),
                        d = a !== u;
                      d && ((this.$vScroll = u), this.scrollBarV.setVisible(u));
                      var f,
                        g,
                        p = this.scrollTop % this.lineHeight,
                        m = Math.ceil(l / this.lineHeight) - 1,
                        v = Math.max(0, Math.round((this.scrollTop - p) / this.lineHeight)),
                        w = v + m,
                        b = this.lineHeight;
                      v = e.screenToDocumentRow(v, 0);
                      var y = e.getFoldLine(v);
                      y && (v = y.start.row),
                        (f = e.documentToScreenRow(v, 0)),
                        (g = e.getRowLength(v) * b),
                        (w = Math.min(e.screenToDocumentRow(w, 0), e.getLength() - 1)),
                        (l = t.scrollerHeight + e.getRowLength(w) * b + g),
                        (p = this.scrollTop - f * b);
                      var $ = 0;
                      return (
                        (this.layerConfig.width != s || o) && ($ = this.CHANGE_H_SCROLL),
                        (o || d) &&
                          (($ |= this.$updateCachedSize(!0, this.gutterWidth, t.width, t.height)),
                          this._signal('scrollbarVisibilityChanged'),
                          d && (s = this.$getLongestLine())),
                        (this.layerConfig = {
                          width: s,
                          padding: this.$padding,
                          firstRow: v,
                          firstRowScreen: f,
                          lastRow: w,
                          lineHeight: b,
                          characterWidth: this.characterWidth,
                          minHeight: l,
                          maxHeight: n,
                          offset: p,
                          gutterOffset: b ? Math.max(0, Math.ceil((p + t.height - t.scrollerHeight) / b)) : 0,
                          height: this.$size.scrollerHeight,
                        }),
                        this.session.$bidiHandler && this.session.$bidiHandler.setContentWidth(s - this.$padding),
                        $
                      );
                    }),
                    (this.$updateLines = function () {
                      if (this.$changedLines) {
                        var e = this.$changedLines.firstRow,
                          t = this.$changedLines.lastRow;
                        this.$changedLines = null;
                        var i = this.layerConfig;
                        if (!(e > i.lastRow + 1 || t < i.firstRow))
                          return t === 1 / 0
                            ? (this.$showGutter && this.$gutterLayer.update(i), void this.$textLayer.update(i))
                            : (this.$textLayer.updateLines(i, e, t), !0);
                      }
                    }),
                    (this.$getLongestLine = function () {
                      var e = this.session.getScreenWidth();
                      return (
                        this.showInvisibles && !this.session.$useWrapMode && (e += 1),
                        this.$textLayer &&
                          e > this.$textLayer.MAX_LINE_LENGTH &&
                          (e = this.$textLayer.MAX_LINE_LENGTH + 30),
                        Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(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 (e) {
                      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, i) {
                      this.scrollCursorIntoView(e, i), this.scrollCursorIntoView(t, i);
                    }),
                    (this.scrollCursorIntoView = function (e, t, i) {
                      if (0 !== this.$size.scrollerHeight) {
                        var n = this.$cursorLayer.getPixelPosition(e),
                          s = n.left,
                          r = n.top,
                          o = (i && i.top) || 0,
                          a = (i && i.bottom) || 0,
                          l = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
                        l + o > r
                          ? (t && l + o > r + this.lineHeight && (r -= t * this.$size.scrollerHeight),
                            0 === r && (r = -this.scrollMargin.top),
                            this.session.setScrollTop(r))
                          : l + this.$size.scrollerHeight - a < r + this.lineHeight &&
                            (t &&
                              l + this.$size.scrollerHeight - a < r - this.lineHeight &&
                              (r += t * this.$size.scrollerHeight),
                            this.session.setScrollTop(r + this.lineHeight + a - this.$size.scrollerHeight));
                        var h = this.scrollLeft;
                        h > s
                          ? (s < this.$padding + 2 * this.layerConfig.characterWidth && (s = -this.scrollMargin.left),
                            this.session.setScrollLeft(s))
                          : h + this.$size.scrollerWidth < s + this.characterWidth
                          ? this.session.setScrollLeft(Math.round(s + this.characterWidth - this.$size.scrollerWidth))
                          : h <= this.$padding && s - h < 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 Math.max(
                        0,
                        Math.floor((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 i = this.$cursorLayer.getPixelPosition(e),
                        n = this.$size.scrollerHeight - this.lineHeight,
                        s = i.top - n * (t || 0);
                      return this.session.setScrollTop(s), s;
                    }),
                    (this.STEPS = 8),
                    (this.$calcSteps = function (e, t) {
                      var i,
                        n,
                        s = 0,
                        r = this.STEPS,
                        o = [];
                      for (s = 0; s < r; ++s)
                        o.push(((i = s / this.STEPS), (n = e), (t - e) * (Math.pow(i - 1, 3) + 1) + n));
                      return o;
                    }),
                    (this.scrollToLine = function (e, t, i, n) {
                      var s = this.$cursorLayer.getPixelPosition({ row: e, column: 0 }).top;
                      t && (s -= this.$size.scrollerHeight / 2);
                      var r = this.scrollTop;
                      this.session.setScrollTop(s), !1 !== i && this.animateScrolling(r, n);
                    }),
                    (this.animateScrolling = function (e, t) {
                      var i = this.scrollTop;
                      if (this.$animatedScroll) {
                        var n = this;
                        if (e != i) {
                          if (this.$scrollAnimation) {
                            var s = this.$scrollAnimation.steps;
                            if (s.length && (e = s[0]) == i) return;
                          }
                          var r = n.$calcSteps(e, i);
                          (this.$scrollAnimation = { from: e, to: i, steps: r }),
                            clearInterval(this.$timer),
                            n.session.setScrollTop(r.shift()),
                            (n.session.$scrollTop = i),
                            (this.$timer = setInterval(function () {
                              if (!n.session) return clearInterval(n.$timer);
                              r.length
                                ? (n.session.setScrollTop(r.shift()), (n.session.$scrollTop = i))
                                : null != i
                                ? ((n.session.$scrollTop = -1), n.session.setScrollTop(i), (i = null))
                                : ((n.$timer = clearInterval(n.$timer)), (n.$scrollAnimation = null), t && t());
                            }, 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(e);
                    }),
                    (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 (
                        (t < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) ||
                        (t > 0 &&
                          this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight <
                            -1 + this.scrollMargin.bottom) ||
                        (e < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) ||
                        (e > 0 &&
                          this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width <
                            -1 + this.scrollMargin.right) ||
                        void 0
                      );
                    }),
                    (this.pixelToScreenCoordinates = function (e, t) {
                      var i;
                      if (this.$hasCssTransforms) {
                        i = { top: 0, left: 0 };
                        var n = this.$fontMetrics.transformCoordinates([e, t]);
                        (e = n[1] - this.gutterWidth - this.margin.left), (t = n[0]);
                      } else i = this.scroller.getBoundingClientRect();
                      var s = e + this.scrollLeft - i.left - this.$padding,
                        r = s / this.characterWidth,
                        o = Math.floor((t + this.scrollTop - i.top) / this.lineHeight),
                        a = this.$blockCursor ? Math.floor(r) : Math.round(r);
                      return { row: o, column: a, side: r - a > 0 ? 1 : -1, offsetX: s };
                    }),
                    (this.screenToTextCoordinates = function (e, t) {
                      var i;
                      if (this.$hasCssTransforms) {
                        i = { top: 0, left: 0 };
                        var n = this.$fontMetrics.transformCoordinates([e, t]);
                        (e = n[1] - this.gutterWidth - this.margin.left), (t = n[0]);
                      } else i = this.scroller.getBoundingClientRect();
                      var s = e + this.scrollLeft - i.left - this.$padding,
                        r = s / this.characterWidth,
                        o = this.$blockCursor ? Math.floor(r) : Math.round(r),
                        a = Math.floor((t + this.scrollTop - i.top) / this.lineHeight);
                      return this.session.screenToDocumentPosition(a, Math.max(o, 0), s);
                    }),
                    (this.textToScreenCoordinates = function (e, t) {
                      var i = this.scroller.getBoundingClientRect(),
                        n = this.session.documentToScreenPosition(e, t),
                        s =
                          this.$padding +
                          (this.session.$bidiHandler.isBidiRow(n.row, e)
                            ? this.session.$bidiHandler.getPosLeft(n.column)
                            : Math.round(n.column * this.characterWidth)),
                        r = n.row * this.lineHeight;
                      return { pageX: i.left + s - this.scrollLeft, pageY: i.top + r - this.scrollTop };
                    }),
                    (this.visualizeFocus = function () {
                      s.addCssClass(this.container, 'ace_focus');
                    }),
                    (this.visualizeBlur = function () {
                      s.removeCssClass(this.container, 'ace_focus');
                    }),
                    (this.showComposition = function (e) {
                      (this.$composition = e),
                        e.cssText || (e.cssText = this.textarea.style.cssText),
                        null == e.useTextareaForIME && (e.useTextareaForIME = this.$useTextareaForIME),
                        this.$useTextareaForIME
                          ? (s.addCssClass(this.textarea, 'ace_composition'),
                            (this.textarea.style.cssText = ''),
                            this.$moveTextAreaToCursor(),
                            (this.$cursorLayer.element.style.display = 'none'))
                          : (e.markerId = this.session.addMarker(e.markerRange, 'ace_composition_marker', 'text'));
                    }),
                    (this.setCompositionText = function (e) {
                      var t = this.session.selection.cursor;
                      this.addToken(e, 'composition_placeholder', t.row, t.column), this.$moveTextAreaToCursor();
                    }),
                    (this.hideComposition = function () {
                      if (this.$composition) {
                        this.$composition.markerId && this.session.removeMarker(this.$composition.markerId),
                          s.removeCssClass(this.textarea, 'ace_composition'),
                          (this.textarea.style.cssText = this.$composition.cssText);
                        var e = this.session.selection.cursor;
                        this.removeExtraToken(e.row, e.column),
                          (this.$composition = null),
                          (this.$cursorLayer.element.style.display = '');
                      }
                    }),
                    (this.addToken = function (e, t, i, n) {
                      var s = this.session;
                      s.bgTokenizer.lines[i] = null;
                      var r = { type: t, value: e },
                        o = s.getTokens(i);
                      if (null == n) o.push(r);
                      else
                        for (var a = 0, l = 0; l < o.length; l++) {
                          var h = o[l];
                          if (n <= (a += h.value.length)) {
                            var c = h.value.length - (a - n),
                              u = h.value.slice(0, c),
                              d = h.value.slice(c);
                            o.splice(l, 1, { type: h.type, value: u }, r, { type: h.type, value: d });
                            break;
                          }
                        }
                      this.updateLines(i, i);
                    }),
                    (this.removeExtraToken = function (e, t) {
                      this.updateLines(e, e);
                    }),
                    (this.setTheme = function (e, t) {
                      var i = this;
                      if (
                        ((this.$themeId = e), i._dispatchEvent('themeChange', { theme: e }), e && 'string' != typeof e)
                      )
                        o(e);
                      else {
                        var n = e || this.$options.theme.initialValue;
                        r.loadModule(['theme', n], o);
                      }
                      function o(n) {
                        if (i.$themeId != e) return t && t();
                        if (!n || !n.cssClass)
                          throw new Error("couldn't load module " + e + " or it didn't call define");
                        n.$id && (i.$themeId = n.$id),
                          s.importCssString(n.cssText, n.cssClass, i.container),
                          i.theme && s.removeCssClass(i.container, i.theme.cssClass);
                        var r = 'padding' in n ? n.padding : 'padding' in (i.theme || {}) ? 4 : i.$padding;
                        i.$padding && r != i.$padding && i.setPadding(r),
                          (i.$theme = n.cssClass),
                          (i.theme = n),
                          s.addCssClass(i.container, n.cssClass),
                          s.setCssClass(i.container, 'ace_dark', n.isDark),
                          i.$size && ((i.$size.width = 0), i.$updateSizeAsync()),
                          i._dispatchEvent('themeLoaded', { theme: n }),
                          t && t();
                      }
                    }),
                    (this.getTheme = function () {
                      return this.$themeId;
                    }),
                    (this.setStyle = function (e, t) {
                      s.setCssClass(this.container, e, !1 !== t);
                    }),
                    (this.unsetStyle = function (e) {
                      s.removeCssClass(this.container, e);
                    }),
                    (this.setCursorStyle = function (e) {
                      s.setStyle(this.scroller.style, 'cursor', e);
                    }),
                    (this.setMouseCursor = function (e) {
                      s.setStyle(this.scroller.style, 'cursor', e);
                    }),
                    (this.attachToShadowRoot = function () {
                      s.importCssString(p, 'ace_editor.css', this.container);
                    }),
                    (this.destroy = function () {
                      this.freeze(),
                        this.$fontMetrics.destroy(),
                        this.$cursorLayer.destroy(),
                        this.removeAllListeners(),
                        (this.container.textContent = '');
                    });
                }).call(w.prototype),
                  r.defineOptions(w.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) {
                        s.setCssClass(this.$gutter, 'ace_fade-fold-widgets', e);
                      },
                      initialValue: !1,
                    },
                    showFoldWidgets: {
                      set: function (e) {
                        this.$gutterLayer.setShowFoldWidgets(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) {
                        this.$gutterLayer.setHighlightGutterLine(e), this.$loop.schedule(this.CHANGE_GUTTER);
                      },
                      initialValue: !0,
                    },
                    hScrollBarAlwaysVisible: {
                      set: function (e) {
                        (this.$hScrollBarAlwaysVisible && this.$horizScroll) || this.$loop.schedule(this.CHANGE_SCROLL);
                      },
                      initialValue: !1,
                    },
                    vScrollBarAlwaysVisible: {
                      set: function (e) {
                        (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 (e) {
                        this.updateFull();
                      },
                    },
                    minLines: {
                      set: function (e) {
                        this.$minLines < 562949953421311 || (this.$minLines = 0), this.updateFull();
                      },
                    },
                    maxPixelHeight: {
                      set: function (e) {
                        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,
                    },
                    hasCssTransforms: {},
                    useTextareaForIME: { initialValue: !m.isMobile && !m.isIE },
                  }),
                  (t.VirtualRenderer = w);
              }
            ),
            ace.define(
              'ace/worker/worker_client',
              ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/net', 'ace/lib/event_emitter', 'ace/config'],
              function (e, t, i) {
                'use strict';
                var n = e('../lib/oop'),
                  s = e('../lib/net'),
                  r = e('../lib/event_emitter').EventEmitter,
                  o = e('../config');
                function a(e) {
                  if ('undefined' == typeof Worker) return { postMessage: function () {}, terminate: function () {} };
                  if (o.get('loadWorkerFromBlob')) {
                    var t = (function (e) {
                        var t = "importScripts('" + s.qualifyURL(e) + "');";
                        try {
                          return new Blob([t], { type: 'application/javascript' });
                        } catch (e) {
                          var i = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)();
                          return i.append(t), i.getBlob('application/javascript');
                        }
                      })(e),
                      i = (window.URL || window.webkitURL).createObjectURL(t);
                    return new Worker(i);
                  }
                  return new Worker(e);
                }
                var l = function (e) {
                  e.postMessage || (e = this.$createWorkerFromOldConfig.apply(this, arguments)),
                    (this.$worker = e),
                    (this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this)),
                    (this.changeListener = this.changeListener.bind(this)),
                    (this.onMessage = this.onMessage.bind(this)),
                    (this.callbackId = 1),
                    (this.callbacks = {}),
                    (this.$worker.onmessage = this.onMessage);
                };
                (function () {
                  n.implement(this, r),
                    (this.$createWorkerFromOldConfig = function (t, i, n, s, r) {
                      if ((e.nameToUrl && !e.toUrl && (e.toUrl = e.nameToUrl), o.get('packaged') || !e.toUrl))
                        s = s || o.moduleUrl(i, 'worker');
                      else {
                        var l = this.$normalizePath;
                        s = s || l(e.toUrl('ace/worker/worker.js', null, '_'));
                        var h = {};
                        t.forEach(function (t) {
                          h[t] = l(e.toUrl(t, null, '_').replace(/(\.js)?(\?.*)?$/, ''));
                        });
                      }
                      return (
                        (this.$worker = a(s)),
                        r && this.send('importScripts', r),
                        this.$worker.postMessage({ init: !0, tlns: h, module: i, classname: n }),
                        this.$worker
                      );
                    }),
                    (this.onMessage = function (e) {
                      var t = e.data;
                      switch (t.type) {
                        case 'event':
                          this._signal(t.name, { data: t.data });
                          break;
                        case 'call':
                          var i = this.callbacks[t.id];
                          i && (i(t.data), delete this.callbacks[t.id]);
                          break;
                        case 'error':
                          this.reportError(t.data);
                          break;
                        case 'log':
                          window.console && console.log && console.log.apply(console, t.data);
                      }
                    }),
                    (this.reportError = function (e) {
                      window.console && console.error && console.error(e);
                    }),
                    (this.$normalizePath = function (e) {
                      return s.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, i) {
                      if (i) {
                        var n = this.callbackId++;
                        (this.callbacks[n] = i), t.push(n);
                      }
                      this.send(e, t);
                    }),
                    (this.emit = function (e, t) {
                      try {
                        t.data &&
                          t.data.err &&
                          (t.data.err = {
                            message: t.data.err.message,
                            stack: t.data.err.stack,
                            code: t.data.err.code,
                          }),
                          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),
                        e.length > 50 && e.length > this.$doc.getLength() >> 1
                          ? this.call('setValue', [this.$doc.getValue()])
                          : this.emit('change', { data: e }));
                    });
                }).call(l.prototype),
                  (t.UIWorkerClient = function (e, t, i) {
                    var n = null,
                      s = !1,
                      a = Object.create(r),
                      h = [],
                      c = new l({
                        messageBuffer: h,
                        terminate: function () {},
                        postMessage: function (e) {
                          h.push(e), n && (s ? setTimeout(u) : u());
                        },
                      });
                    c.setEmitSync = function (e) {
                      s = e;
                    };
                    var u = function () {
                      var e = h.shift();
                      e.command ? n[e.command].apply(n, e.args) : e.event && a._signal(e.event, e.data);
                    };
                    return (
                      (a.postMessage = function (e) {
                        c.onMessage({ data: e });
                      }),
                      (a.callback = function (e, t) {
                        this.postMessage({ type: 'call', id: t, data: e });
                      }),
                      (a.emit = function (e, t) {
                        this.postMessage({ type: 'event', name: e, data: t });
                      }),
                      o.loadModule(['worker', t], function (e) {
                        for (n = new e[i](a); h.length; ) u();
                      }),
                      c
                    );
                  }),
                  (t.WorkerClient = l),
                  (t.createWorker = a);
              }
            ),
            ace.define(
              'ace/placeholder',
              ['require', 'exports', 'module', 'ace/range', 'ace/lib/event_emitter', 'ace/lib/oop'],
              function (e, t, i) {
                'use strict';
                var n = e('./range').Range,
                  s = e('./lib/event_emitter').EventEmitter,
                  r = e('./lib/oop'),
                  o = function (e, t, i, n, s, r) {
                    var o = this;
                    (this.length = t),
                      (this.session = e),
                      (this.doc = e.getDocument()),
                      (this.mainClass = s),
                      (this.othersClass = r),
                      (this.$onUpdate = this.onUpdate.bind(this)),
                      this.doc.on('change', this.$onUpdate),
                      (this.$others = n),
                      (this.$onCursorChange = function () {
                        setTimeout(function () {
                          o.onCursorChange();
                        });
                      }),
                      (this.$pos = i);
                    var a = e.getUndoManager().$undoStack || e.getUndoManager().$undostack || { length: -1 };
                    (this.$undoStackDepth = a.length),
                      this.setup(),
                      e.selection.on('changeCursor', this.$onCursorChange);
                  };
                (function () {
                  r.implement(this, s),
                    (this.setup = function () {
                      var e = this,
                        t = this.doc,
                        i = this.session;
                      (this.selectionBefore = i.selection.toJSON()),
                        i.selection.inMultiSelectMode && i.selection.toSingleRange(),
                        (this.pos = t.createAnchor(this.$pos.row, this.$pos.column));
                      var s = this.pos;
                      (s.$insertRight = !0),
                        s.detach(),
                        (s.markerId = i.addMarker(
                          new n(s.row, s.column, s.row, s.column + this.length),
                          this.mainClass,
                          null,
                          !1
                        )),
                        (this.others = []),
                        this.$others.forEach(function (i) {
                          var n = t.createAnchor(i.row, i.column);
                          (n.$insertRight = !0), n.detach(), e.others.push(n);
                        }),
                        i.setUndoSelect(!1);
                    }),
                    (this.showOtherMarkers = function () {
                      if (!this.othersActive) {
                        var e = this.session,
                          t = this;
                        (this.othersActive = !0),
                          this.others.forEach(function (i) {
                            i.markerId = e.addMarker(
                              new n(i.row, i.column, i.row, i.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 i = 'insert' === e.action ? t.end.column - t.start.column : t.start.column - t.end.column,
                          s = t.start.column >= this.pos.column && t.start.column <= this.pos.column + this.length + 1,
                          r = t.start.column - this.pos.column;
                        if ((this.updateAnchors(e), s && (this.length += i), s && !this.session.$fromUndo))
                          if ('insert' === e.action)
                            for (var o = this.others.length - 1; o >= 0; o--) {
                              var a = { row: (l = this.others[o]).row, column: l.column + r };
                              this.doc.insertMergedLines(a, e.lines);
                            }
                          else if ('remove' === e.action)
                            for (o = this.others.length - 1; o >= 0; o--) {
                              var l;
                              (a = { row: (l = this.others[o]).row, column: l.column + r }),
                                this.doc.remove(new n(a.row, a.column, a.row, a.column - i));
                            }
                        (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,
                          i = function (i, s) {
                            t.removeMarker(i.markerId),
                              (i.markerId = t.addMarker(
                                new n(i.row, i.column, i.row, i.column + e.length),
                                s,
                                null,
                                !1
                              ));
                          };
                        i(this.pos, this.mainClass);
                        for (var s = this.others.length; s--; ) i(this.others[s], 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.off('change', this.$onUpdate),
                        this.session.selection.off('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,
                            i = 0;
                          i < t;
                          i++
                        )
                          e.undo(this.session, !0);
                        this.selectionBefore && this.session.selection.fromJSON(this.selectionBefore);
                      }
                    });
                }).call(o.prototype),
                  (t.PlaceHolder = o);
              }
            ),
            ace.define(
              'ace/mouse/multi_select_handler',
              ['require', 'exports', 'module', 'ace/lib/event', 'ace/lib/useragent'],
              function (e, t, i) {
                var n = e('../lib/event'),
                  s = e('../lib/useragent');
                function r(e, t) {
                  return e.row == t.row && e.column == t.column;
                }
                t.onMouseDown = function (e) {
                  var t = e.domEvent,
                    i = t.altKey,
                    o = t.shiftKey,
                    a = t.ctrlKey,
                    l = e.getAccelKey(),
                    h = e.getButton();
                  if ((a && s.isMac && (h = t.button), e.editor.inMultiSelectMode && 2 == h))
                    e.editor.textInput.onContextMenu(e.domEvent);
                  else if (a || i || l) {
                    if (0 === h) {
                      var c,
                        u = e.editor,
                        d = u.selection,
                        f = u.inMultiSelectMode,
                        g = e.getDocumentPosition(),
                        p = d.getCursor(),
                        m = e.inSelection() || (d.isEmpty() && r(g, p)),
                        v = e.x,
                        w = e.y,
                        b = u.session,
                        y = u.renderer.pixelToScreenCoordinates(v, w),
                        $ = y;
                      if (u.$mouseHandler.$enableJumpToDef)
                        (a && i) || (l && i) ? (c = o ? 'block' : 'add') : i && u.$blockSelectEnabled && (c = 'block');
                      else if (l && !i) {
                        if (((c = 'add'), !f && o)) return;
                      } else i && u.$blockSelectEnabled && (c = 'block');
                      if ((c && s.isMac && t.ctrlKey && u.$mouseHandler.cancelContextMenu(), 'add' == c)) {
                        if (!f && m) return;
                        if (!f) {
                          var S = d.toOrientedRange();
                          u.addSelectionMarker(S);
                        }
                        var C = d.rangeList.rangeAtPoint(g);
                        (u.inVirtualSelectionMode = !0),
                          o && ((C = null), (S = d.ranges[0] || S), u.removeSelectionMarker(S)),
                          u.once('mouseup', function () {
                            var e = d.toOrientedRange();
                            C && e.isEmpty() && r(C.cursor, e.cursor)
                              ? d.substractPoint(e.cursor)
                              : (o ? d.substractPoint(S.cursor) : S && (u.removeSelectionMarker(S), d.addRange(S)),
                                d.addRange(e)),
                              (u.inVirtualSelectionMode = !1);
                          });
                      } else if ('block' == c) {
                        var x;
                        e.stop(), (u.inVirtualSelectionMode = !0);
                        var k = [],
                          A = function () {
                            var e = u.renderer.pixelToScreenCoordinates(v, w),
                              t = b.screenToDocumentPosition(e.row, e.column, e.offsetX);
                            (r($, e) && r(t, d.lead)) ||
                              (($ = e),
                              u.selection.moveToPosition(t),
                              u.renderer.scrollCursorIntoView(),
                              u.removeSelectionMarkers(k),
                              (k = d.rectangularRangeBlock($, y)),
                              u.$mouseHandler.$clickSelection &&
                                1 == k.length &&
                                k[0].isEmpty() &&
                                (k[0] = u.$mouseHandler.$clickSelection.clone()),
                              k.forEach(u.addSelectionMarker, u),
                              u.updateSelectionMarkers());
                          };
                        f && !l ? d.toSingleRange() : !f && l && ((x = d.toOrientedRange()), u.addSelectionMarker(x)),
                          o ? (y = b.documentToScreenPosition(d.lead)) : d.moveToPosition(g),
                          ($ = { row: -1, column: -1 });
                        var _ = A;
                        n.capture(
                          u.container,
                          function (e) {
                            (v = e.clientX), (w = e.clientY);
                          },
                          function (e) {
                            A(),
                              clearInterval(L),
                              u.removeSelectionMarkers(k),
                              k.length || (k = [d.toOrientedRange()]),
                              x && (u.removeSelectionMarker(x), d.toSingleRange(x));
                            for (var t = 0; t < k.length; t++) d.addRange(k[t]);
                            (u.inVirtualSelectionMode = !1), (u.$mouseHandler.$clickSelection = null);
                          }
                        );
                        var L = setInterval(function () {
                          _();
                        }, 20);
                        return e.preventDefault();
                      }
                    }
                  } else 0 === h && e.editor.inMultiSelectMode && e.editor.exitMultiSelectMode();
                };
              }
            ),
            ace.define(
              'ace/commands/multi_select_commands',
              ['require', 'exports', 'module', 'ace/keyboard/hash_handler'],
              function (e, t, i) {
                (t.defaultCommands = [
                  {
                    name: 'addCursorAbove',
                    description: 'Add cursor above',
                    exec: function (e) {
                      e.selectMoreLines(-1);
                    },
                    bindKey: { win: 'Ctrl-Alt-Up', mac: 'Ctrl-Alt-Up' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'addCursorBelow',
                    description: 'Add cursor below',
                    exec: function (e) {
                      e.selectMoreLines(1);
                    },
                    bindKey: { win: 'Ctrl-Alt-Down', mac: 'Ctrl-Alt-Down' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'addCursorAboveSkipCurrent',
                    description: 'Add cursor above (skip current)',
                    exec: function (e) {
                      e.selectMoreLines(-1, !0);
                    },
                    bindKey: { win: 'Ctrl-Alt-Shift-Up', mac: 'Ctrl-Alt-Shift-Up' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'addCursorBelowSkipCurrent',
                    description: 'Add cursor below (skip current)',
                    exec: function (e) {
                      e.selectMoreLines(1, !0);
                    },
                    bindKey: { win: 'Ctrl-Alt-Shift-Down', mac: 'Ctrl-Alt-Shift-Down' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectMoreBefore',
                    description: 'Select more before',
                    exec: function (e) {
                      e.selectMore(-1);
                    },
                    bindKey: { win: 'Ctrl-Alt-Left', mac: 'Ctrl-Alt-Left' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectMoreAfter',
                    description: 'Select more after',
                    exec: function (e) {
                      e.selectMore(1);
                    },
                    bindKey: { win: 'Ctrl-Alt-Right', mac: 'Ctrl-Alt-Right' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectNextBefore',
                    description: 'Select next before',
                    exec: function (e) {
                      e.selectMore(-1, !0);
                    },
                    bindKey: { win: 'Ctrl-Alt-Shift-Left', mac: 'Ctrl-Alt-Shift-Left' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'selectNextAfter',
                    description: 'Select next after',
                    exec: function (e) {
                      e.selectMore(1, !0);
                    },
                    bindKey: { win: 'Ctrl-Alt-Shift-Right', mac: 'Ctrl-Alt-Shift-Right' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                  {
                    name: 'toggleSplitSelectionIntoLines',
                    description: 'Split into lines',
                    exec: function (e) {
                      e.multiSelect.rangeCount > 1 ? e.multiSelect.joinSelections() : e.multiSelect.splitIntoLines();
                    },
                    bindKey: { win: 'Ctrl-Alt-L', mac: 'Ctrl-Alt-L' },
                    readOnly: !0,
                  },
                  {
                    name: 'splitSelectionIntoLines',
                    description: 'Split into lines',
                    exec: function (e) {
                      e.multiSelect.splitIntoLines();
                    },
                    readOnly: !0,
                  },
                  {
                    name: 'alignCursors',
                    description: 'Align cursors',
                    exec: function (e) {
                      e.alignCursors();
                    },
                    bindKey: { win: 'Ctrl-Alt-A', mac: 'Ctrl-Alt-A' },
                    scrollIntoView: 'cursor',
                  },
                  {
                    name: 'findAll',
                    description: 'Find all',
                    exec: function (e) {
                      e.findAll();
                    },
                    bindKey: { win: 'Ctrl-Alt-K', mac: 'Ctrl-Alt-G' },
                    scrollIntoView: 'cursor',
                    readOnly: !0,
                  },
                ]),
                  (t.multiSelectCommands = [
                    {
                      name: 'singleSelection',
                      description: 'Single selection',
                      bindKey: 'esc',
                      exec: function (e) {
                        e.exitMultiSelectMode();
                      },
                      scrollIntoView: 'cursor',
                      readOnly: !0,
                      isAvailable: function (e) {
                        return e && e.inMultiSelectMode;
                      },
                    },
                  ]);
                var n = e('../keyboard/hash_handler').HashHandler;
                t.keyboardHandler = new n(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, i) {
                var n = e('./range_list').RangeList,
                  s = e('./range').Range,
                  r = e('./selection').Selection,
                  o = e('./mouse/multi_select_handler').onMouseDown,
                  a = e('./lib/event'),
                  l = e('./lib/lang'),
                  h = e('./commands/multi_select_commands');
                t.commands = h.defaultCommands.concat(h.multiSelectCommands);
                var c = new (0, e('./search').Search)(),
                  u = e('./edit_session').EditSession;
                (function () {
                  this.getSelectionMarkers = function () {
                    return this.$selectionMarkers;
                  };
                }).call(u.prototype),
                  function () {
                    (this.ranges = null),
                      (this.rangeList = null),
                      (this.addRange = function (e, t) {
                        if (e) {
                          if (!this.inMultiSelectMode && 0 === this.rangeCount) {
                            var i = this.toOrientedRange();
                            if ((this.rangeList.add(i), this.rangeList.add(e), 2 != this.rangeList.ranges.length))
                              return this.rangeList.removeAll(), t || this.fromOrientedRange(e);
                            this.rangeList.removeAll(), this.rangeList.add(i), this.$onAddRange(i);
                          }
                          e.cursor || (e.cursor = e.end);
                          var n = this.rangeList.add(e);
                          return (
                            this.$onAddRange(e),
                            n.length && this.$onRemoveRange(n),
                            this.rangeCount > 1 &&
                              !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.$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 i = e.length; i--; ) {
                          var n = this.ranges.indexOf(e[i]);
                          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.isEqual(this.getRange()) && this.fromOrientedRange(t);
                      }),
                      (this.$initRangeList = function () {
                        this.rangeList || ((this.rangeList = new n()), (this.ranges = []), (this.rangeCount = 0));
                      }),
                      (this.getAllRanges = function () {
                        return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];
                      }),
                      (this.splitIntoLines = function () {
                        for (
                          var e = this.ranges.length ? this.ranges : [this.getRange()], t = [], i = 0;
                          i < e.length;
                          i++
                        ) {
                          var n = e[i],
                            r = n.start.row,
                            o = n.end.row;
                          if (r === o) t.push(n.clone());
                          else {
                            for (t.push(new s(r, n.start.column, r, this.session.getLine(r).length)); ++r < o; )
                              t.push(this.getLineRange(r, !0));
                            t.push(new s(o, 0, o, n.end.column));
                          }
                          0 != i || this.isBackwards() || (t = t.reverse());
                        }
                        for (this.toSingleRange(), i = t.length; i--; ) this.addRange(t[i]);
                      }),
                      (this.joinSelections = function () {
                        var e = this.rangeList.ranges,
                          t = e[e.length - 1],
                          i = s.fromPoints(e[0].start, t.end);
                        this.toSingleRange(), this.setSelectionRange(i, t.cursor == t.start);
                      }),
                      (this.toggleBlockSelection = function () {
                        if (this.rangeCount > 1) {
                          var e = this.rangeList.ranges,
                            t = e[e.length - 1],
                            i = s.fromPoints(e[0].start, t.end);
                          this.toSingleRange(), this.setSelectionRange(i, t.cursor == t.start);
                        } else {
                          var n = this.session.documentToScreenPosition(this.cursor),
                            r = this.session.documentToScreenPosition(this.anchor);
                          this.rectangularRangeBlock(n, r).forEach(this.addRange, this);
                        }
                      }),
                      (this.rectangularRangeBlock = function (e, t, i) {
                        var n = [],
                          r = e.column < t.column;
                        if (r)
                          var o = e.column,
                            a = t.column,
                            l = e.offsetX,
                            h = t.offsetX;
                        else (o = t.column), (a = e.column), (l = t.offsetX), (h = e.offsetX);
                        var c,
                          u,
                          d,
                          f = e.row < t.row;
                        if (f)
                          var g = e.row,
                            p = t.row;
                        else (g = t.row), (p = e.row);
                        o < 0 && (o = 0), g < 0 && (g = 0), g == p && (i = !0);
                        for (var m = g; m <= p; m++) {
                          var v = s.fromPoints(
                            this.session.screenToDocumentPosition(m, o, l),
                            this.session.screenToDocumentPosition(m, a, h)
                          );
                          if (v.isEmpty()) {
                            if (c && ((d = c), (u = v.end).row == d.row && u.column == d.column)) break;
                            c = v.end;
                          }
                          (v.cursor = r ? v.start : v.end), n.push(v);
                        }
                        if ((f && n.reverse(), !i)) {
                          for (var w = n.length - 1; n[w].isEmpty() && w > 0; ) w--;
                          if (w > 0) for (var b = 0; n[b].isEmpty(); ) b++;
                          for (var y = w; y >= b; y--) n[y].isEmpty() && n.splice(y, 1);
                        }
                        return n;
                      });
                  }.call(r.prototype);
                var d = e('./editor').Editor;
                function f(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', o),
                    e.commands.addCommands(h.defaultCommands),
                    (function (e) {
                      if (e.textInput) {
                        var t = e.textInput.getElement(),
                          i = !1;
                        a.addListener(
                          t,
                          'keydown',
                          function (t) {
                            var s = 18 == t.keyCode && !(t.ctrlKey || t.shiftKey || t.metaKey);
                            e.$blockSelectEnabled && s
                              ? i || (e.renderer.setMouseCursor('crosshair'), (i = !0))
                              : i && n();
                          },
                          e
                        ),
                          a.addListener(t, 'keyup', n, e),
                          a.addListener(t, 'blur', n, e);
                      }
                      function n(t) {
                        i && (e.renderer.setMouseCursor(''), (i = !1));
                      }
                    })(e));
                }
                (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, i = e.length; i--; ) {
                        var n = e[i];
                        if (n.marker) {
                          this.session.removeMarker(n.marker);
                          var s = t.indexOf(n);
                          -1 != s && t.splice(s, 1);
                        }
                      }
                      this.session.selectionMarkerCount = t.length;
                    }),
                    (this.$onAddRange = function (e) {
                      this.addSelectionMarker(e.range), this.renderer.updateCursor(), this.renderer.updateBackMarkers();
                    }),
                    (this.$onRemoveRange = function (e) {
                      this.removeSelectionMarkers(e.ranges),
                        this.renderer.updateCursor(),
                        this.renderer.updateBackMarkers();
                    }),
                    (this.$onMultiSelect = function (e) {
                      this.inMultiSelectMode ||
                        ((this.inMultiSelectMode = !0),
                        this.setStyle('ace_multiselect'),
                        this.keyBinding.addKeyboardHandler(h.keyboardHandler),
                        this.commands.setDefaultHandler('exec', this.$onMultiSelectExec),
                        this.renderer.updateCursor(),
                        this.renderer.updateBackMarkers());
                    }),
                    (this.$onSingleSelect = function (e) {
                      this.session.multiSelect.inVirtualMode ||
                        ((this.inMultiSelectMode = !1),
                        this.unsetStyle('ace_multiselect'),
                        this.keyBinding.removeKeyboardHandler(h.keyboardHandler),
                        this.commands.removeDefaultHandler('exec', this.$onMultiSelectExec),
                        this.renderer.updateCursor(),
                        this.renderer.updateBackMarkers(),
                        this._emit('changeSelection'));
                    }),
                    (this.$onMultiSelectExec = function (e) {
                      var t = e.command,
                        i = e.editor;
                      if (i.multiSelect) {
                        if (t.multiSelectAction)
                          'forEach' == t.multiSelectAction
                            ? (n = i.forEachSelection(t, e.args))
                            : 'forEachLine' == t.multiSelectAction
                            ? (n = i.forEachSelection(t, e.args, !0))
                            : 'single' == t.multiSelectAction
                            ? (i.exitMultiSelectMode(), (n = t.exec(i, e.args || {})))
                            : (n = t.multiSelectAction(i, e.args || {}));
                        else {
                          var n = t.exec(i, e.args || {});
                          i.multiSelect.addRange(i.multiSelect.toOrientedRange()),
                            i.multiSelect.mergeOverlappingRanges();
                        }
                        return n;
                      }
                    }),
                    (this.forEachSelection = function (e, t, i) {
                      if (!this.inVirtualSelectionMode) {
                        var n,
                          s = i && i.keepOrder,
                          o = 1 == i || (i && i.$byLines),
                          a = this.session,
                          l = this.selection,
                          h = l.rangeList,
                          c = (s ? l : h).ranges;
                        if (!c.length) return e.exec ? e.exec(this, t || {}) : e(this, t || {});
                        var u = l._eventRegistry;
                        l._eventRegistry = {};
                        var d = new r(a);
                        this.inVirtualSelectionMode = !0;
                        for (var f = c.length; f--; ) {
                          if (o) for (; f > 0 && c[f].start.row == c[f - 1].end.row; ) f--;
                          d.fromOrientedRange(c[f]), (d.index = f), (this.selection = a.selection = d);
                          var g = e.exec ? e.exec(this, t || {}) : e(this, t || {});
                          n || void 0 === g || (n = g), d.toOrientedRange(c[f]);
                        }
                        d.detach(),
                          (this.selection = a.selection = l),
                          (this.inVirtualSelectionMode = !1),
                          (l._eventRegistry = u),
                          l.mergeOverlappingRanges(),
                          l.ranges[0] && l.fromOrientedRange(l.ranges[0]);
                        var p = this.renderer.$scrollAnimation;
                        return (
                          this.onCursorChange(),
                          this.onSelectionChange(),
                          p && p.from == p.to && this.renderer.animateScrolling(p.from),
                          n
                        );
                      }
                    }),
                    (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, i = [], n = 0; n < t.length; n++)
                          i.push(this.session.getTextRange(t[n]));
                        var s = this.session.getDocument().getNewLineCharacter();
                        (e = i.join(s)).length == (i.length - 1) * s.length && (e = '');
                      } else this.selection.isEmpty() || (e = this.session.getTextRange(this.getSelectionRange()));
                      return e;
                    }),
                    (this.$checkMultiselectChange = function (e, t) {
                      if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
                        var i = this.multiSelect.ranges[0];
                        if (this.multiSelect.isEmpty() && t == this.multiSelect.anchor) return;
                        var n = t == this.multiSelect.anchor ? (i.cursor == i.start ? i.end : i.start) : i.cursor;
                        n.row != t.row || this.session.$clipPositionToDocument(n.row, n.column).column != t.column
                          ? this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())
                          : this.multiSelect.mergeOverlappingRanges();
                      }
                    }),
                    (this.findAll = function (e, t, i) {
                      if ((((t = t || {}).needle = e || t.needle), null == t.needle)) {
                        var n = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange();
                        t.needle = this.session.getTextRange(n);
                      }
                      this.$search.set(t);
                      var s = this.$search.findAll(this.session);
                      if (!s.length) return 0;
                      var r = this.multiSelect;
                      i || r.toSingleRange(s[0]);
                      for (var o = s.length; o--; ) r.addRange(s[o], !0);
                      return n && r.rangeList.rangeAtPoint(n.start) && r.addRange(n, !0), s.length;
                    }),
                    (this.selectMoreLines = function (e, t) {
                      var i = this.selection.toOrientedRange(),
                        n = i.cursor == i.end,
                        r = this.session.documentToScreenPosition(i.cursor);
                      this.selection.$desiredColumn && (r.column = this.selection.$desiredColumn);
                      var o,
                        a = this.session.screenToDocumentPosition(r.row + e, r.column);
                      if (i.isEmpty()) h = a;
                      else
                        var l = this.session.documentToScreenPosition(n ? i.end : i.start),
                          h = this.session.screenToDocumentPosition(l.row + e, l.column);
                      if (
                        (n ? ((o = s.fromPoints(a, h)).cursor = o.start) : ((o = s.fromPoints(h, a)).cursor = o.end),
                        (o.desiredColumn = r.column),
                        this.selection.inMultiSelectMode)
                      ) {
                        if (t) var c = i.cursor;
                      } else this.selection.addRange(i);
                      this.selection.addRange(o), c && this.selection.substractPoint(c);
                    }),
                    (this.transposeSelections = function (e) {
                      for (var t = this.session, i = t.multiSelect, n = i.ranges, s = n.length; s--; )
                        if ((a = n[s]).isEmpty()) {
                          var r = t.getWordRange(a.start.row, a.start.column);
                          (a.start.row = r.start.row),
                            (a.start.column = r.start.column),
                            (a.end.row = r.end.row),
                            (a.end.column = r.end.column);
                        }
                      i.mergeOverlappingRanges();
                      var o = [];
                      for (s = n.length; s--; ) {
                        var a = n[s];
                        o.unshift(t.getTextRange(a));
                      }
                      for (e < 0 ? o.unshift(o.pop()) : o.push(o.shift()), s = n.length; s--; )
                        (r = (a = n[s]).clone()),
                          t.replace(a, o[s]),
                          (a.start.row = r.start.row),
                          (a.start.column = r.start.column);
                      i.fromOrientedRange(i.ranges[0]);
                    }),
                    (this.selectMore = function (e, t, i) {
                      var n = this.session,
                        s = n.multiSelect.toOrientedRange();
                      if (
                        !s.isEmpty() ||
                        (((s = n.getWordRange(s.start.row, s.start.column)).cursor = -1 == e ? s.start : s.end),
                        this.multiSelect.addRange(s),
                        !i)
                      ) {
                        var r = n.getTextRange(s),
                          o = (function (e, t, i) {
                            return (
                              (c.$options.wrap = !0),
                              (c.$options.needle = t),
                              (c.$options.backwards = -1 == i),
                              c.find(e)
                            );
                          })(n, r, e);
                        o &&
                          ((o.cursor = -1 == e ? o.start : o.end),
                          this.session.unfold(o),
                          this.multiSelect.addRange(o),
                          this.renderer.scrollCursorIntoView(null, 0.5)),
                          t && this.multiSelect.substractPoint(s.cursor);
                      }
                    }),
                    (this.alignCursors = function () {
                      var e = this.session,
                        t = e.multiSelect,
                        i = t.ranges,
                        n = -1,
                        r = i.filter(function (e) {
                          if (e.cursor.row == n) return !0;
                          n = e.cursor.row;
                        });
                      if (i.length && r.length != i.length - 1) {
                        r.forEach(function (e) {
                          t.substractPoint(e.cursor);
                        });
                        var o = 0,
                          a = 1 / 0,
                          h = i.map(function (t) {
                            var i = t.cursor,
                              n = e.getLine(i.row).substr(i.column).search(/\S/g);
                            return -1 == n && (n = 0), i.column > o && (o = i.column), n < a && (a = n), n;
                          });
                        i.forEach(function (t, i) {
                          var n = t.cursor,
                            r = o - n.column,
                            c = h[i] - a;
                          r > c
                            ? e.insert(n, l.stringRepeat(' ', r - c))
                            : e.remove(new s(n.row, n.column, n.row, n.column - r + c)),
                            (t.start.column = t.end.column = o),
                            (t.start.row = t.end.row = n.row),
                            (t.cursor = t.end);
                        }),
                          t.fromOrientedRange(i[0]),
                          this.renderer.updateCursor(),
                          this.renderer.updateBackMarkers();
                      } else {
                        var c = this.selection.getRange(),
                          u = c.start.row,
                          d = c.end.row,
                          f = u == d;
                        if (f) {
                          var g,
                            p = this.session.getLength();
                          do {
                            g = this.session.getLine(d);
                          } while (/[=:]/.test(g) && ++d < p);
                          do {
                            g = this.session.getLine(u);
                          } while (/[=:]/.test(g) && --u > 0);
                          u < 0 && (u = 0), d >= p && (d = p - 1);
                        }
                        var m = this.session.removeFullLines(u, d);
                        (m = this.$reAlignText(m, f)),
                          this.session.insert({ row: u, column: 0 }, m.join('\n') + '\n'),
                          f || ((c.start.column = 0), (c.end.column = m[m.length - 1].length)),
                          this.selection.setRange(c);
                      }
                    }),
                    (this.$reAlignText = function (e, t) {
                      var i,
                        n,
                        s,
                        r = !0,
                        o = !0;
                      return e
                        .map(function (e) {
                          var t = e.match(/(\s*)(.*?)(\s*)([=:].*)/);
                          return t
                            ? null == i
                              ? ((i = t[1].length), (n = t[2].length), (s = t[3].length), t)
                              : (i + n + s != t[1].length + t[2].length + t[3].length && (o = !1),
                                i != t[1].length && (r = !1),
                                i > t[1].length && (i = t[1].length),
                                n < t[2].length && (n = t[2].length),
                                s > t[3].length && (s = t[3].length),
                                t)
                            : [e];
                        })
                        .map(
                          t
                            ? h
                            : r
                            ? o
                              ? function (e) {
                                  return e[2]
                                    ? a(i + n - e[2].length) + e[2] + a(s) + e[4].replace(/^([=:])\s+/, '$1 ')
                                    : e[0];
                                }
                              : h
                            : function (e) {
                                return e[2] ? a(i) + e[2] + a(s) + e[4].replace(/^([=:])\s+/, '$1 ') : e[0];
                              }
                        );
                      function a(e) {
                        return l.stringRepeat(' ', e);
                      }
                      function h(e) {
                        return e[2] ? a(i) + e[2] + a(n - e[2].length + s) + e[4].replace(/^([=:])\s+/, '$1 ') : e[0];
                      }
                    });
                }).call(d.prototype),
                  (t.onSessionChange = function (e) {
                    var t = e.session;
                    t &&
                      !t.multiSelect &&
                      ((t.$selectionMarkers = []), t.selection.$initRangeList(), (t.multiSelect = t.selection)),
                      (this.multiSelect = t && t.multiSelect);
                    var i = e.oldSession;
                    i &&
                      (i.multiSelect.off('addRange', this.$onAddRange),
                      i.multiSelect.off('removeRange', this.$onRemoveRange),
                      i.multiSelect.off('multiSelect', this.$onMultiSelect),
                      i.multiSelect.off('singleSelect', this.$onSingleSelect),
                      i.multiSelect.lead.off('change', this.$checkMultiselectChange),
                      i.multiSelect.anchor.off('change', this.$checkMultiselectChange)),
                      t &&
                        (t.multiSelect.on('addRange', this.$onAddRange),
                        t.multiSelect.on('removeRange', this.$onRemoveRange),
                        t.multiSelect.on('multiSelect', this.$onMultiSelect),
                        t.multiSelect.on('singleSelect', this.$onSingleSelect),
                        t.multiSelect.lead.on('change', this.$checkMultiselectChange),
                        t.multiSelect.anchor.on('change', this.$checkMultiselectChange)),
                      t &&
                        this.inMultiSelectMode != t.selection.inMultiSelectMode &&
                        (t.selection.inMultiSelectMode ? this.$onMultiSelect() : this.$onSingleSelect());
                  }),
                  (t.MultiSelect = f),
                  e('./config').defineOptions(d.prototype, 'editor', {
                    enableMultiselect: {
                      set: function (e) {
                        f(this),
                          e
                            ? (this.on('changeSession', this.$multiselectOnSessionChange), this.on('mousedown', o))
                            : (this.off('changeSession', this.$multiselectOnSessionChange), this.off('mousedown', o));
                      },
                      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, i) {
              'use strict';
              var n = e('../../range').Range,
                s = (t.FoldMode = function () {});
              (function () {
                (this.foldingStartMarker = null),
                  (this.foldingStopMarker = null),
                  (this.getFoldWidget = function (e, t, i) {
                    var n = e.getLine(i);
                    return this.foldingStartMarker.test(n)
                      ? 'start'
                      : 'markbeginend' == t && this.foldingStopMarker && this.foldingStopMarker.test(n)
                      ? 'end'
                      : '';
                  }),
                  (this.getFoldWidgetRange = function (e, t, i) {
                    return null;
                  }),
                  (this.indentationBlock = function (e, t, i) {
                    var s = /\S/,
                      r = e.getLine(t),
                      o = r.search(s);
                    if (-1 != o) {
                      for (var a = i || r.length, l = e.getLength(), h = t, c = t; ++t < l; ) {
                        var u = e.getLine(t).search(s);
                        if (-1 != u) {
                          if (u <= o) {
                            var d = e.getTokenAt(t, 0);
                            if (!d || 'string' !== d.type) break;
                          }
                          c = t;
                        }
                      }
                      if (c > h) {
                        var f = e.getLine(c).length;
                        return new n(h, a, c, f);
                      }
                    }
                  }),
                  (this.openingBracketBlock = function (e, t, i, s, r) {
                    var o = { row: i, column: s + 1 },
                      a = e.$findClosingBracket(t, o, r);
                    if (a) {
                      var l = e.foldWidgets[a.row];
                      return (
                        null == l && (l = e.getFoldWidget(a.row)),
                        'start' == l && a.row > o.row && (a.row--, (a.column = e.getLine(a.row).length)),
                        n.fromPoints(o, a)
                      );
                    }
                  }),
                  (this.closingBracketBlock = function (e, t, i, s, r) {
                    var o = { row: i, column: s },
                      a = e.$findOpeningBracket(t, o);
                    if (a) return a.column++, o.column--, n.fromPoints(a, o);
                  });
              }).call(s.prototype);
            }),
            ace.define('ace/theme/textmate', ['require', 'exports', 'module', 'ace/lib/dom'], function (e, t, i) {
              '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;}'),
                (t.$id = 'ace/theme/textmate'),
                e('../lib/dom').importCssString(t.cssText, t.cssClass, !1);
            }),
            ace.define('ace/line_widgets', ['require', 'exports', 'module', 'ace/lib/dom'], function (e, t, i) {
              'use strict';
              var n = e('./lib/dom');
              function s(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);
              }
              (function () {
                (this.getRowLength = function (e) {
                  var t;
                  return (
                    (t = (this.lineWidgets && this.lineWidgets[e] && this.lineWidgets[e].rowCount) || 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 (e) {
                    this.attach(e.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 (e) {
                    var t = this.editor;
                    if (t) {
                      (this.editor = null),
                        (t.widgetManager = null),
                        t.renderer.off('beforeRender', this.measureWidgets),
                        t.renderer.off('afterRender', this.renderWidgets);
                      var i = this.session.lineWidgets;
                      i &&
                        i.forEach(function (e) {
                          e && e.el && e.el.parentNode && ((e._inDocument = !1), e.el.parentNode.removeChild(e.el));
                        });
                    }
                  }),
                  (this.updateOnFold = function (e, t) {
                    var i = t.lineWidgets;
                    if (i && e.action) {
                      for (var n = e.data, s = n.start.row, r = n.end.row, o = 'add' == e.action, a = s + 1; a < r; a++)
                        i[a] && (i[a].hidden = o);
                      i[r] &&
                        (o
                          ? i[s]
                            ? (i[r].hidden = o)
                            : (i[s] = i[r])
                          : (i[s] == i[r] && (i[s] = void 0), (i[r].hidden = o)));
                    }
                  }),
                  (this.updateOnChange = function (e) {
                    var t = this.session.lineWidgets;
                    if (t) {
                      var i = e.start.row,
                        n = e.end.row - i;
                      if (0 === n);
                      else if ('remove' == e.action) {
                        var s = t.splice(i + 1, n);
                        !t[i] && s[s.length - 1] && (t[i] = s.pop()),
                          s.forEach(function (e) {
                            e && this.removeLineWidget(e);
                          }, this),
                          this.$updateRows();
                      } else {
                        var r = new Array(n);
                        t[i] && null != t[i].column && e.start.column > t[i].column && i++,
                          r.unshift(i, 0),
                          t.splice.apply(t, r),
                          this.$updateRows();
                      }
                    }
                  }),
                  (this.$updateRows = function () {
                    var e = this.session.lineWidgets;
                    if (e) {
                      var t = !0;
                      e.forEach(function (e, i) {
                        if (e) for (t = !1, e.row = i; e.$oldWidget; ) (e.$oldWidget.row = i), (e = e.$oldWidget);
                      }),
                        t && (this.session.lineWidgets = null);
                    }
                  }),
                  (this.$registerLineWidget = function (e) {
                    this.session.lineWidgets || (this.session.lineWidgets = new Array(this.session.getLength()));
                    var t = this.session.lineWidgets[e.row];
                    return (
                      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
                    );
                  }),
                  (this.addLineWidget = function (e) {
                    if ((this.$registerLineWidget(e), (e.session = this.session), !this.editor)) return e;
                    var t = this.editor.renderer;
                    e.html && !e.el && ((e.el = n.createElement('div')), (e.el.innerHTML = e.html)),
                      e.el &&
                        (n.addCssClass(e.el, 'ace_lineWidgetContainer'),
                        (e.el.style.position = 'absolute'),
                        (e.el.style.zIndex = 5),
                        t.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 / t.layerConfig.lineHeight);
                    var i = this.session.getFoldAt(e.row, 0);
                    if (((e.$fold = i), i)) {
                      var s = this.session.lineWidgets;
                      e.row != i.end.row || s[i.start.row] ? (e.hidden = !0) : (s[i.start.row] = e);
                    }
                    return (
                      this.session._emit('changeFold', { data: { start: { row: e.row } } }),
                      this.$updateRows(),
                      this.renderWidgets(null, t),
                      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 (e) {}
                    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, i = t && t[e], n = []; i; ) n.push(i), (i = i.$oldWidget);
                    return n;
                  }),
                  (this.onWidgetChanged = function (e) {
                    this.session._changedWidgets.push(e), this.editor && this.editor.renderer.updateFull();
                  }),
                  (this.measureWidgets = function (e, t) {
                    var i = this.session._changedWidgets,
                      n = t.layerConfig;
                    if (i && i.length) {
                      for (var s = 1 / 0, r = 0; r < i.length; r++) {
                        var o = i[r];
                        if (o && o.el && o.session == this.session) {
                          if (!o._inDocument) {
                            if (this.session.lineWidgets[o.row] != o) continue;
                            (o._inDocument = !0), t.container.appendChild(o.el);
                          }
                          (o.h = o.el.offsetHeight),
                            o.fixedWidth ||
                              ((o.w = o.el.offsetWidth), (o.screenWidth = Math.ceil(o.w / n.characterWidth)));
                          var a = o.h / n.lineHeight;
                          o.coverLine && (a -= this.session.getRowLineCount(o.row)) < 0 && (a = 0),
                            o.rowCount != a && ((o.rowCount = a), o.row < s && (s = o.row));
                        }
                      }
                      s != 1 / 0 &&
                        (this.session._emit('changeFold', { data: { start: { row: s } } }),
                        (this.session.lineWidgetWidth = null)),
                        (this.session._changedWidgets = []);
                    }
                  }),
                  (this.renderWidgets = function (e, t) {
                    var i = t.layerConfig,
                      n = this.session.lineWidgets;
                    if (n) {
                      for (
                        var s = Math.min(this.firstRow, i.firstRow), r = Math.max(this.lastRow, i.lastRow, n.length);
                        s > 0 && !n[s];

                      )
                        s--;
                      (this.firstRow = i.firstRow), (this.lastRow = i.lastRow), (t.$cursorLayer.config = i);
                      for (var o = s; o <= r; o++) {
                        var a = n[o];
                        if (a && a.el)
                          if (a.hidden) a.el.style.top = -100 - (a.pixelHeight || 0) + 'px';
                          else {
                            a._inDocument || ((a._inDocument = !0), t.container.appendChild(a.el));
                            var l = t.$cursorLayer.getPixelPosition({ row: o, column: 0 }, !0).top;
                            a.coverLine || (l += i.lineHeight * this.session.getRowLineCount(a.row)),
                              (a.el.style.top = l - i.offset + 'px');
                            var h = a.coverGutter ? 0 : t.gutterWidth;
                            a.fixedWidth || (h -= t.scrollLeft),
                              (a.el.style.left = h + 'px'),
                              a.fullWidth && a.screenWidth && (a.el.style.minWidth = i.width + 2 * i.padding + 'px'),
                              a.fixedWidth
                                ? (a.el.style.right = t.scrollBar.getWidth() + 'px')
                                : (a.el.style.right = '');
                          }
                      }
                    }
                  });
              }).call(s.prototype),
                (t.LineWidgets = s);
            }),
            ace.define(
              'ace/ext/error_marker',
              ['require', 'exports', 'module', 'ace/line_widgets', 'ace/lib/dom', 'ace/range'],
              function (e, t, i) {
                'use strict';
                var n = e('../line_widgets').LineWidgets,
                  s = e('../lib/dom'),
                  r = e('../range').Range;
                (t.showErrorMarker = function (e, t) {
                  var i = e.session;
                  i.widgetManager || ((i.widgetManager = new n(i)), i.widgetManager.attach(e));
                  var o = e.getCursorPosition(),
                    a = o.row,
                    l = i.widgetManager.getWidgetsAtRow(a).filter(function (e) {
                      return 'errorMarker' == e.type;
                    })[0];
                  l ? l.destroy() : (a -= t);
                  var h,
                    c = (function (e, t, i) {
                      var n = e.getAnnotations().sort(r.comparePoints);
                      if (n.length) {
                        var s = (function (e, t, i) {
                          for (var n = 0, s = e.length - 1; n <= s; ) {
                            var r = (n + s) >> 1,
                              o = i(t, e[r]);
                            if (o > 0) n = r + 1;
                            else {
                              if (!(o < 0)) return r;
                              s = r - 1;
                            }
                          }
                          return -(n + 1);
                        })(n, { row: t, column: -1 }, r.comparePoints);
                        s < 0 && (s = -s - 1),
                          s >= n.length ? (s = i > 0 ? 0 : n.length - 1) : 0 === s && i < 0 && (s = n.length - 1);
                        var o = n[s];
                        if (o && i) {
                          if (o.row === t) {
                            do {
                              o = n[(s += i)];
                            } while (o && o.row === t);
                            if (!o) return n.slice();
                          }
                          var a = [];
                          t = o.row;
                          do {
                            a[i < 0 ? 'unshift' : 'push'](o), (o = n[(s += i)]);
                          } while (o && o.row == t);
                          return a.length && a;
                        }
                      }
                    })(i, a, t);
                  if (c) {
                    var u = c[0];
                    (o.column = (u.pos && 'number' != typeof u.column ? u.pos.sc : u.column) || 0),
                      (o.row = u.row),
                      (h = e.renderer.$gutterLayer.$annotations[o.row]);
                  } else {
                    if (l) return;
                    h = { text: ['Looks good!'], className: 'ace_ok' };
                  }
                  e.session.unfold(o.row), e.selection.moveToPosition(o);
                  var d = {
                      row: o.row,
                      fixedWidth: !0,
                      coverGutter: !0,
                      el: s.createElement('div'),
                      type: 'errorMarker',
                    },
                    f = d.el.appendChild(s.createElement('div')),
                    g = d.el.appendChild(s.createElement('div'));
                  g.className = 'error_widget_arrow ' + h.className;
                  var p = e.renderer.$cursorLayer.getPixelPosition(o).left;
                  (g.style.left = p + e.renderer.gutterWidth - 5 + 'px'),
                    (d.el.className = 'error_widget_wrapper'),
                    (f.className = 'error_widget ' + h.className),
                    (f.innerHTML = h.text.join('<br>')),
                    f.appendChild(s.createElement('div'));
                  var m = function (e, t, i) {
                    if (0 === t && ('esc' === i || 'return' === i)) return d.destroy(), { command: 'null' };
                  };
                  (d.destroy = function () {
                    e.$mouseHandler.isMousePressed ||
                      (e.keyBinding.removeKeyboardHandler(m),
                      i.widgetManager.removeLineWidget(d),
                      e.off('changeSelection', d.destroy),
                      e.off('changeSession', d.destroy),
                      e.off('mouseup', d.destroy),
                      e.off('change', d.destroy));
                  }),
                    e.keyBinding.addKeyboardHandler(m),
                    e.on('changeSelection', d.destroy),
                    e.on('changeSession', d.destroy),
                    e.on('mouseup', d.destroy),
                    e.on('change', d.destroy),
                    e.session.widgetManager.addLineWidget(d),
                    (d.el.onmousedown = e.focus.bind(e)),
                    e.renderer.scrollCursorIntoView(null, 0.5, { bottom: d.el.offsetHeight });
                }),
                  s.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;    }',
                    'error_marker.css',
                    !1
                  );
              }
            ),
            ace.define(
              'ace/ace',
              [
                'require',
                'exports',
                'module',
                'ace/lib/fixoldbrowsers',
                'ace/lib/dom',
                'ace/lib/event',
                'ace/range',
                '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, n) {
                'use strict';
                e('./lib/fixoldbrowsers');
                var s = e('./lib/dom'),
                  r = e('./lib/event'),
                  o = e('./range').Range,
                  a = e('./editor').Editor,
                  l = e('./edit_session').EditSession,
                  h = e('./undomanager').UndoManager,
                  c = 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.require = e),
                  (t.define = i.amdD),
                  (t.edit = function (e, i) {
                    if ('string' == typeof e) {
                      var n = e;
                      if (!(e = document.getElementById(n))) throw new Error("ace.edit can't find div #" + n);
                    }
                    if (e && e.env && e.env.editor instanceof a) return e.env.editor;
                    var o = '';
                    if (e && /input|textarea/i.test(e.tagName)) {
                      var l = e;
                      (o = l.value), (e = s.createElement('pre')), l.parentNode.replaceChild(e, l);
                    } else e && ((o = e.textContent), (e.innerHTML = ''));
                    var h = t.createEditSession(o),
                      u = new a(new c(e), h, i),
                      d = { document: h, editor: u, onResize: u.resize.bind(u, null) };
                    return (
                      l && (d.textarea = l),
                      r.addListener(window, 'resize', d.onResize),
                      u.on('destroy', function () {
                        r.removeListener(window, 'resize', d.onResize), (d.editor.container.env = null);
                      }),
                      (u.container.env = u.env = d),
                      u
                    );
                  }),
                  (t.createEditSession = function (e, t) {
                    var i = new l(e, t);
                    return i.setUndoManager(new h()), i;
                  }),
                  (t.Range = o),
                  (t.Editor = a),
                  (t.EditSession = l),
                  (t.UndoManager = h),
                  (t.VirtualRenderer = c),
                  (t.version = t.config.version);
              }
            ),
            ace.require(['ace/ace'], function (t) {
              for (var i in (t && (t.config.init(!0), (t.define = ace.define)), window.ace || (window.ace = t), t))
                t.hasOwnProperty(i) && (window.ace[i] = t[i]);
              (window.ace.default = window.ace), e && (e.exports = window.ace);
            });
        },
        83: (e, t, i) => {
          (e = i.nmd(e)),
            ace.define(
              'ace/split',
              [
                'require',
                'exports',
                'module',
                'ace/lib/oop',
                'ace/lib/lang',
                'ace/lib/event_emitter',
                'ace/editor',
                'ace/virtual_renderer',
                'ace/edit_session',
              ],
              function (e, t, i) {
                'use strict';
                var n = e('./lib/oop'),
                  s = (e('./lib/lang'), e('./lib/event_emitter').EventEmitter),
                  r = e('./editor').Editor,
                  o = e('./virtual_renderer').VirtualRenderer,
                  a = e('./edit_session').EditSession,
                  l = function (e, t, i) {
                    (this.BELOW = 1),
                      (this.BESIDE = 0),
                      (this.$container = e),
                      (this.$theme = t),
                      (this.$splits = 0),
                      (this.$editorCSS = ''),
                      (this.$editors = []),
                      (this.$orientation = this.BESIDE),
                      this.setSplits(i || 1),
                      (this.$cEditor = this.$editors[0]),
                      this.on(
                        'focus',
                        function (e) {
                          this.$cEditor = e;
                        }.bind(this)
                      );
                  };
                (function () {
                  n.implement(this, s),
                    (this.$createEditor = function () {
                      var e = document.createElement('div');
                      (e.className = this.$editorCSS),
                        (e.style.cssText = 'position: absolute; top:0px; bottom:0px'),
                        this.$container.appendChild(e);
                      var t = new r(new o(e, this.$theme));
                      return (
                        t.on(
                          'focus',
                          function () {
                            this._emit('focus', t);
                          }.bind(this)
                        ),
                        this.$editors.push(t),
                        t.setFontSize(this.$fontSize),
                        t
                      );
                    }),
                    (this.setSplits = function (e) {
                      var t;
                      if (e < 1) throw 'The number of splits have to be > 0!';
                      if (e != this.$splits) {
                        if (e > this.$splits) {
                          for (; this.$splits < this.$editors.length && this.$splits < e; )
                            (t = this.$editors[this.$splits]),
                              this.$container.appendChild(t.container),
                              t.setFontSize(this.$fontSize),
                              this.$splits++;
                          for (; this.$splits < e; ) this.$createEditor(), this.$splits++;
                        } else
                          for (; this.$splits > e; )
                            (t = this.$editors[this.$splits - 1]),
                              this.$container.removeChild(t.container),
                              this.$splits--;
                        this.resize();
                      }
                    }),
                    (this.getSplits = function () {
                      return this.$splits;
                    }),
                    (this.getEditor = function (e) {
                      return this.$editors[e];
                    }),
                    (this.getCurrentEditor = function () {
                      return this.$cEditor;
                    }),
                    (this.focus = function () {
                      this.$cEditor.focus();
                    }),
                    (this.blur = function () {
                      this.$cEditor.blur();
                    }),
                    (this.setTheme = function (e) {
                      this.$editors.forEach(function (t) {
                        t.setTheme(e);
                      });
                    }),
                    (this.setKeyboardHandler = function (e) {
                      this.$editors.forEach(function (t) {
                        t.setKeyboardHandler(e);
                      });
                    }),
                    (this.forEach = function (e, t) {
                      this.$editors.forEach(e, t);
                    }),
                    (this.$fontSize = ''),
                    (this.setFontSize = function (e) {
                      (this.$fontSize = e),
                        this.forEach(function (t) {
                          t.setFontSize(e);
                        });
                    }),
                    (this.$cloneSession = function (e) {
                      var t = new a(e.getDocument(), e.getMode()),
                        i = e.getUndoManager();
                      return (
                        t.setUndoManager(i),
                        t.setTabSize(e.getTabSize()),
                        t.setUseSoftTabs(e.getUseSoftTabs()),
                        t.setOverwrite(e.getOverwrite()),
                        t.setBreakpoints(e.getBreakpoints()),
                        t.setUseWrapMode(e.getUseWrapMode()),
                        t.setUseWorker(e.getUseWorker()),
                        t.setWrapLimitRange(e.$wrapLimitRange.min, e.$wrapLimitRange.max),
                        (t.$foldData = e.$cloneFoldData()),
                        t
                      );
                    }),
                    (this.setSession = function (e, t) {
                      var i;
                      i = null == t ? this.$cEditor : this.$editors[t];
                      var n = this.$editors.some(function (t) {
                        return t.session === e;
                      });
                      return n && (e = this.$cloneSession(e)), i.setSession(e), e;
                    }),
                    (this.getOrientation = function () {
                      return this.$orientation;
                    }),
                    (this.setOrientation = function (e) {
                      this.$orientation != e && ((this.$orientation = e), this.resize());
                    }),
                    (this.resize = function () {
                      var e,
                        t = this.$container.clientWidth,
                        i = this.$container.clientHeight;
                      if (this.$orientation == this.BESIDE)
                        for (var n = t / this.$splits, s = 0; s < this.$splits; s++)
                          ((e = this.$editors[s]).container.style.width = n + 'px'),
                            (e.container.style.top = '0px'),
                            (e.container.style.left = s * n + 'px'),
                            (e.container.style.height = i + 'px'),
                            e.resize();
                      else {
                        var r = i / this.$splits;
                        for (s = 0; s < this.$splits; s++)
                          ((e = this.$editors[s]).container.style.width = t + 'px'),
                            (e.container.style.top = s * r + 'px'),
                            (e.container.style.left = '0px'),
                            (e.container.style.height = r + 'px'),
                            e.resize();
                      }
                    });
                }).call(l.prototype),
                  (t.Split = l);
              }
            ),
            ace.define('ace/ext/split', ['require', 'exports', 'module', 'ace/split'], function (e, t, i) {
              'use strict';
              i.exports = e('../split');
            }),
            ace.require(['ace/ext/split'], function (t) {
              e && (e.exports = t);
            });
        },
        515: function (e, t, i) {
          'use strict';
          var n,
            s =
              (this && this.__extends) ||
              ((n = function (e, t) {
                return (
                  (n =
                    Object.setPrototypeOf ||
                    ({ __proto__: [] } instanceof Array &&
                      function (e, t) {
                        e.__proto__ = t;
                      }) ||
                    function (e, t) {
                      for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
                    }),
                  n(e, t)
                );
              }),
              function (e, t) {
                if ('function' != typeof t && null !== t)
                  throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null');
                function i() {
                  this.constructor = e;
                }
                n(e, t), (e.prototype = null === t ? Object.create(t) : ((i.prototype = t.prototype), new i()));
              }),
            r =
              (this && this.__assign) ||
              function () {
                return (
                  (r =
                    Object.assign ||
                    function (e) {
                      for (var t, i = 1, n = arguments.length; i < n; i++)
                        for (var s in (t = arguments[i])) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
                      return e;
                    }),
                  r.apply(this, arguments)
                );
              };
          Object.defineProperty(t, '__esModule', { value: !0 });
          var o = i(239),
            a = i(697),
            l = i(294),
            h = i(307),
            c = i(132),
            u = (0, c.getAceInstance)(),
            d = (function (e) {
              function t(t) {
                var i = e.call(this, t) || this;
                return (
                  c.editorEvents.forEach(function (e) {
                    i[e] = i[e].bind(i);
                  }),
                  (i.debounce = c.debounce),
                  i
                );
              }
              return (
                s(t, e),
                (t.prototype.isInShadow = function (e) {
                  for (var t = e && e.parentNode; t; ) {
                    if ('[object ShadowRoot]' === t.toString()) return !0;
                    t = t.parentNode;
                  }
                  return !1;
                }),
                (t.prototype.componentDidMount = function () {
                  var e = this,
                    t = this.props,
                    i = t.className,
                    n = t.onBeforeLoad,
                    s = t.onValidate,
                    r = t.mode,
                    o = t.focus,
                    a = t.theme,
                    l = t.fontSize,
                    h = t.value,
                    d = t.defaultValue,
                    f = t.showGutter,
                    g = t.wrapEnabled,
                    p = t.showPrintMargin,
                    m = t.scrollMargin,
                    v = void 0 === m ? [0, 0, 0, 0] : m,
                    w = t.keyboardHandler,
                    b = t.onLoad,
                    y = t.commands,
                    $ = t.annotations,
                    S = t.markers,
                    C = t.placeholder;
                  (this.editor = u.edit(this.refEditor)), n && n(u);
                  for (var x = Object.keys(this.props.editorProps), k = 0; k < x.length; k++)
                    this.editor[x[k]] = this.props.editorProps[x[k]];
                  this.props.debounceChangePeriod &&
                    (this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod)),
                    this.editor.renderer.setScrollMargin(v[0], v[1], v[2], v[3]),
                    this.isInShadow(this.refEditor) && this.editor.renderer.attachToShadowRoot(),
                    this.editor.getSession().setMode('string' == typeof r ? 'ace/mode/'.concat(r) : r),
                    a && '' !== a && this.editor.setTheme('ace/theme/'.concat(a)),
                    this.editor.setFontSize('number' == typeof l ? ''.concat(l, 'px') : l),
                    this.editor.getSession().setValue(d || h || ''),
                    this.props.navigateToFileEnd && this.editor.navigateFileEnd(),
                    this.editor.renderer.setShowGutter(f),
                    this.editor.getSession().setUseWrapMode(g),
                    this.editor.setShowPrintMargin(p),
                    this.editor.on('focus', this.onFocus),
                    this.editor.on('blur', this.onBlur),
                    this.editor.on('copy', this.onCopy),
                    this.editor.on('paste', this.onPaste),
                    this.editor.on('change', this.onChange),
                    this.editor.on('input', this.onInput),
                    C && this.updatePlaceholder(),
                    this.editor.getSession().selection.on('changeSelection', this.onSelectionChange),
                    this.editor.getSession().selection.on('changeCursor', this.onCursorChange),
                    s &&
                      this.editor.getSession().on('changeAnnotation', function () {
                        var t = e.editor.getSession().getAnnotations();
                        e.props.onValidate(t);
                      }),
                    this.editor.session.on('changeScrollTop', this.onScroll),
                    this.editor.getSession().setAnnotations($ || []),
                    S && S.length > 0 && this.handleMarkers(S);
                  var A = this.editor.$options;
                  c.editorOptions.forEach(function (t) {
                    A.hasOwnProperty(t)
                      ? e.editor.setOption(t, e.props[t])
                      : e.props[t] &&
                        console.warn(
                          'ReactAce: editor option '.concat(
                            t,
                            ' was activated but not found. Did you need to import a related tool or did you possibly mispell the option?'
                          )
                        );
                  }),
                    this.handleOptions(this.props),
                    Array.isArray(y) &&
                      y.forEach(function (t) {
                        'string' == typeof t.exec
                          ? e.editor.commands.bindKey(t.bindKey, t.exec)
                          : e.editor.commands.addCommand(t);
                      }),
                    w && this.editor.setKeyboardHandler('ace/keyboard/' + w),
                    i && (this.refEditor.className += ' ' + i),
                    b && b(this.editor),
                    this.editor.resize(),
                    o && this.editor.focus();
                }),
                (t.prototype.componentDidUpdate = function (e) {
                  for (var t = e, i = this.props, n = 0; n < c.editorOptions.length; n++) {
                    var s = c.editorOptions[n];
                    i[s] !== t[s] && this.editor.setOption(s, i[s]);
                  }
                  if (i.className !== t.className) {
                    var r = this.refEditor.className.trim().split(' ');
                    t.className
                      .trim()
                      .split(' ')
                      .forEach(function (e) {
                        var t = r.indexOf(e);
                        r.splice(t, 1);
                      }),
                      (this.refEditor.className = ' ' + i.className + ' ' + r.join(' '));
                  }
                  var o = this.editor && null != i.value && this.editor.getValue() !== i.value;
                  if (o) {
                    this.silent = !0;
                    var a = this.editor.session.selection.toJSON();
                    this.editor.setValue(i.value, i.cursorStart),
                      this.editor.session.selection.fromJSON(a),
                      (this.silent = !1);
                  }
                  i.placeholder !== t.placeholder && this.updatePlaceholder(),
                    i.mode !== t.mode &&
                      this.editor.getSession().setMode('string' == typeof i.mode ? 'ace/mode/'.concat(i.mode) : i.mode),
                    i.theme !== t.theme && this.editor.setTheme('ace/theme/' + i.theme),
                    i.keyboardHandler !== t.keyboardHandler &&
                      (i.keyboardHandler
                        ? this.editor.setKeyboardHandler('ace/keyboard/' + i.keyboardHandler)
                        : this.editor.setKeyboardHandler(null)),
                    i.fontSize !== t.fontSize &&
                      this.editor.setFontSize('number' == typeof i.fontSize ? ''.concat(i.fontSize, 'px') : i.fontSize),
                    i.wrapEnabled !== t.wrapEnabled && this.editor.getSession().setUseWrapMode(i.wrapEnabled),
                    i.showPrintMargin !== t.showPrintMargin && this.editor.setShowPrintMargin(i.showPrintMargin),
                    i.showGutter !== t.showGutter && this.editor.renderer.setShowGutter(i.showGutter),
                    h(i.setOptions, t.setOptions) || this.handleOptions(i),
                    (!o && h(i.annotations, t.annotations)) ||
                      this.editor.getSession().setAnnotations(i.annotations || []),
                    !h(i.markers, t.markers) && Array.isArray(i.markers) && this.handleMarkers(i.markers),
                    h(i.scrollMargin, t.scrollMargin) || this.handleScrollMargins(i.scrollMargin),
                    (e.height === this.props.height && e.width === this.props.width) || this.editor.resize(),
                    this.props.focus && !e.focus && this.editor.focus();
                }),
                (t.prototype.handleScrollMargins = function (e) {
                  void 0 === e && (e = [0, 0, 0, 0]), this.editor.renderer.setScrollMargin(e[0], e[1], e[2], e[3]);
                }),
                (t.prototype.componentWillUnmount = function () {
                  this.editor && (this.editor.destroy(), (this.editor = null));
                }),
                (t.prototype.onChange = function (e) {
                  if (this.props.onChange && !this.silent) {
                    var t = this.editor.getValue();
                    this.props.onChange(t, e);
                  }
                }),
                (t.prototype.onSelectionChange = function (e) {
                  if (this.props.onSelectionChange) {
                    var t = this.editor.getSelection();
                    this.props.onSelectionChange(t, e);
                  }
                }),
                (t.prototype.onCursorChange = function (e) {
                  if (this.props.onCursorChange) {
                    var t = this.editor.getSelection();
                    this.props.onCursorChange(t, e);
                  }
                }),
                (t.prototype.onInput = function (e) {
                  this.props.onInput && this.props.onInput(e), this.props.placeholder && this.updatePlaceholder();
                }),
                (t.prototype.onFocus = function (e) {
                  this.props.onFocus && this.props.onFocus(e, this.editor);
                }),
                (t.prototype.onBlur = function (e) {
                  this.props.onBlur && this.props.onBlur(e, this.editor);
                }),
                (t.prototype.onCopy = function (e) {
                  var t = e.text;
                  this.props.onCopy && this.props.onCopy(t);
                }),
                (t.prototype.onPaste = function (e) {
                  var t = e.text;
                  this.props.onPaste && this.props.onPaste(t);
                }),
                (t.prototype.onScroll = function () {
                  this.props.onScroll && this.props.onScroll(this.editor);
                }),
                (t.prototype.handleOptions = function (e) {
                  for (var t = Object.keys(e.setOptions), i = 0; i < t.length; i++)
                    this.editor.setOption(t[i], e.setOptions[t[i]]);
                }),
                (t.prototype.handleMarkers = function (e) {
                  var t = this,
                    i = this.editor.getSession().getMarkers(!0);
                  for (var n in i) i.hasOwnProperty(n) && this.editor.getSession().removeMarker(i[n].id);
                  for (var n in (i = this.editor.getSession().getMarkers(!1)))
                    i.hasOwnProperty(n) &&
                      'ace_active-line' !== i[n].clazz &&
                      'ace_selected-word' !== i[n].clazz &&
                      this.editor.getSession().removeMarker(i[n].id);
                  e.forEach(function (e) {
                    var i = e.startRow,
                      n = e.startCol,
                      s = e.endRow,
                      r = e.endCol,
                      a = e.className,
                      l = e.type,
                      h = e.inFront,
                      c = void 0 !== h && h,
                      u = new o.Range(i, n, s, r);
                    t.editor.getSession().addMarker(u, a, l, c);
                  });
                }),
                (t.prototype.updatePlaceholder = function () {
                  var e = this.editor,
                    t = this.props.placeholder,
                    i = !e.session.getValue().length,
                    n = e.renderer.placeholderNode;
                  !i && n
                    ? (e.renderer.scroller.removeChild(e.renderer.placeholderNode), (e.renderer.placeholderNode = null))
                    : i && !n
                    ? (((n = e.renderer.placeholderNode = document.createElement('div')).textContent = t || ''),
                      (n.className = 'ace_comment ace_placeholder'),
                      (n.style.padding = '0 9px'),
                      (n.style.position = 'absolute'),
                      (n.style.zIndex = '3'),
                      e.renderer.scroller.appendChild(n))
                    : i && n && (n.textContent = t);
                }),
                (t.prototype.updateRef = function (e) {
                  this.refEditor = e;
                }),
                (t.prototype.render = function () {
                  var e = this.props,
                    t = e.name,
                    i = e.width,
                    n = e.height,
                    s = e.style,
                    o = r({ width: i, height: n }, s);
                  return l.createElement('div', { ref: this.updateRef, id: t, style: o });
                }),
                (t.propTypes = {
                  mode: a.oneOfType([a.string, a.object]),
                  focus: a.bool,
                  theme: a.string,
                  name: a.string,
                  className: a.string,
                  height: a.string,
                  width: a.string,
                  fontSize: a.oneOfType([a.number, a.string]),
                  showGutter: a.bool,
                  onChange: a.func,
                  onCopy: a.func,
                  onPaste: a.func,
                  onFocus: a.func,
                  onInput: a.func,
                  onBlur: a.func,
                  onScroll: a.func,
                  value: a.string,
                  defaultValue: a.string,
                  onLoad: a.func,
                  onSelectionChange: a.func,
                  onCursorChange: a.func,
                  onBeforeLoad: a.func,
                  onValidate: a.func,
                  minLines: a.number,
                  maxLines: a.number,
                  readOnly: a.bool,
                  highlightActiveLine: a.bool,
                  tabSize: a.number,
                  showPrintMargin: a.bool,
                  cursorStart: a.number,
                  debounceChangePeriod: a.number,
                  editorProps: a.object,
                  setOptions: a.object,
                  style: a.object,
                  scrollMargin: a.array,
                  annotations: a.array,
                  markers: a.array,
                  keyboardHandler: a.string,
                  wrapEnabled: a.bool,
                  enableSnippets: a.bool,
                  enableBasicAutocompletion: a.oneOfType([a.bool, a.array]),
                  enableLiveAutocompletion: a.oneOfType([a.bool, a.array]),
                  navigateToFileEnd: a.bool,
                  commands: a.array,
                  placeholder: a.string,
                }),
                (t.defaultProps = {
                  name: 'ace-editor',
                  focus: !1,
                  mode: '',
                  theme: '',
                  height: '500px',
                  width: '500px',
                  fontSize: 12,
                  enableSnippets: !1,
                  showGutter: !0,
                  onChange: null,
                  onPaste: null,
                  onLoad: null,
                  onScroll: null,
                  minLines: null,
                  maxLines: null,
                  readOnly: !1,
                  highlightActiveLine: !0,
                  showPrintMargin: !0,
                  tabSize: 4,
                  cursorStart: 1,
                  editorProps: {},
                  style: {},
                  scrollMargin: [0, 0, 0, 0],
                  setOptions: {},
                  wrapEnabled: !1,
                  enableBasicAutocompletion: !1,
                  enableLiveAutocompletion: !1,
                  placeholder: null,
                  navigateToFileEnd: !0,
                }),
                t
              );
            })(l.Component);
          t.default = d;
        },
        542: function (e, t, i) {
          'use strict';
          var n,
            s =
              (this && this.__extends) ||
              ((n = function (e, t) {
                return (
                  (n =
                    Object.setPrototypeOf ||
                    ({ __proto__: [] } instanceof Array &&
                      function (e, t) {
                        e.__proto__ = t;
                      }) ||
                    function (e, t) {
                      for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
                    }),
                  n(e, t)
                );
              }),
              function (e, t) {
                if ('function' != typeof t && null !== t)
                  throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null');
                function i() {
                  this.constructor = e;
                }
                n(e, t), (e.prototype = null === t ? Object.create(t) : ((i.prototype = t.prototype), new i()));
              });
          Object.defineProperty(t, '__esModule', { value: !0 });
          var r = i(697),
            o = i(294),
            a = i(369),
            l = i(27),
            h = (function (e) {
              function t(t) {
                var i = e.call(this, t) || this;
                return (
                  (i.state = { value: i.props.value }), (i.onChange = i.onChange.bind(i)), (i.diff = i.diff.bind(i)), i
                );
              }
              return (
                s(t, e),
                (t.prototype.componentDidUpdate = function () {
                  var e = this.props.value;
                  e !== this.state.value && this.setState({ value: e });
                }),
                (t.prototype.onChange = function (e) {
                  this.setState({ value: e }), this.props.onChange && this.props.onChange(e);
                }),
                (t.prototype.diff = function () {
                  var e = new l(),
                    t = this.state.value[0],
                    i = this.state.value[1];
                  if (0 === t.length && 0 === i.length) return [];
                  var n = e.diff_main(t, i);
                  e.diff_cleanupSemantic(n);
                  var s = this.generateDiffedLines(n);
                  return this.setCodeMarkers(s);
                }),
                (t.prototype.generateDiffedLines = function (e) {
                  var t = { left: [], right: [] },
                    i = { left: 1, right: 1 };
                  return (
                    e.forEach(function (e) {
                      var n = e[0],
                        s = e[1],
                        r = s.split('\n').length - 1;
                      if (0 !== s.length) {
                        var o = s[0],
                          a = s[s.length - 1],
                          l = 0;
                        switch (n) {
                          case 0:
                            (i.left += r), (i.right += r);
                            break;
                          case -1:
                            '\n' === o && (i.left++, r--),
                              0 === (l = r) && t.right.push({ startLine: i.right, endLine: i.right }),
                              '\n' === a && (l -= 1),
                              t.left.push({ startLine: i.left, endLine: i.left + l }),
                              (i.left += r);
                            break;
                          case 1:
                            '\n' === o && (i.right++, r--),
                              0 === (l = r) && t.left.push({ startLine: i.left, endLine: i.left }),
                              '\n' === a && (l -= 1),
                              t.right.push({ startLine: i.right, endLine: i.right + l }),
                              (i.right += r);
                            break;
                          default:
                            throw new Error('Diff type was not defined.');
                        }
                      }
                    }),
                    t
                  );
                }),
                (t.prototype.setCodeMarkers = function (e) {
                  void 0 === e && (e = { left: [], right: [] });
                  for (var t = [], i = { left: [], right: [] }, n = 0; n < e.left.length; n++) {
                    var s = {
                      startRow: e.left[n].startLine - 1,
                      endRow: e.left[n].endLine,
                      type: 'text',
                      className: 'codeMarker',
                    };
                    i.left.push(s);
                  }
                  for (n = 0; n < e.right.length; n++)
                    (s = {
                      startRow: e.right[n].startLine - 1,
                      endRow: e.right[n].endLine,
                      type: 'text',
                      className: 'codeMarker',
                    }),
                      i.right.push(s);
                  return (t[0] = i.left), (t[1] = i.right), t;
                }),
                (t.prototype.render = function () {
                  var e = this.diff();
                  return o.createElement(a.default, {
                    name: this.props.name,
                    className: this.props.className,
                    focus: this.props.focus,
                    orientation: this.props.orientation,
                    splits: this.props.splits,
                    mode: this.props.mode,
                    theme: this.props.theme,
                    height: this.props.height,
                    width: this.props.width,
                    fontSize: this.props.fontSize,
                    showGutter: this.props.showGutter,
                    onChange: this.onChange,
                    onPaste: this.props.onPaste,
                    onLoad: this.props.onLoad,
                    onScroll: this.props.onScroll,
                    minLines: this.props.minLines,
                    maxLines: this.props.maxLines,
                    readOnly: this.props.readOnly,
                    highlightActiveLine: this.props.highlightActiveLine,
                    showPrintMargin: this.props.showPrintMargin,
                    tabSize: this.props.tabSize,
                    cursorStart: this.props.cursorStart,
                    editorProps: this.props.editorProps,
                    style: this.props.style,
                    scrollMargin: this.props.scrollMargin,
                    setOptions: this.props.setOptions,
                    wrapEnabled: this.props.wrapEnabled,
                    enableBasicAutocompletion: this.props.enableBasicAutocompletion,
                    enableLiveAutocompletion: this.props.enableLiveAutocompletion,
                    value: this.state.value,
                    markers: e,
                  });
                }),
                (t.propTypes = {
                  cursorStart: r.number,
                  editorProps: r.object,
                  enableBasicAutocompletion: r.bool,
                  enableLiveAutocompletion: r.bool,
                  focus: r.bool,
                  fontSize: r.number,
                  height: r.string,
                  highlightActiveLine: r.bool,
                  maxLines: r.number,
                  minLines: r.number,
                  mode: r.string,
                  name: r.string,
                  className: r.string,
                  onLoad: r.func,
                  onPaste: r.func,
                  onScroll: r.func,
                  onChange: r.func,
                  orientation: r.string,
                  readOnly: r.bool,
                  scrollMargin: r.array,
                  setOptions: r.object,
                  showGutter: r.bool,
                  showPrintMargin: r.bool,
                  splits: r.number,
                  style: r.object,
                  tabSize: r.number,
                  theme: r.string,
                  value: r.array,
                  width: r.string,
                  wrapEnabled: r.bool,
                }),
                (t.defaultProps = {
                  cursorStart: 1,
                  editorProps: {},
                  enableBasicAutocompletion: !1,
                  enableLiveAutocompletion: !1,
                  focus: !1,
                  fontSize: 12,
                  height: '500px',
                  highlightActiveLine: !0,
                  maxLines: null,
                  minLines: null,
                  mode: '',
                  name: 'ace-editor',
                  onLoad: null,
                  onScroll: null,
                  onPaste: null,
                  onChange: null,
                  orientation: 'beside',
                  readOnly: !1,
                  scrollMargin: [0, 0, 0, 0],
                  setOptions: {},
                  showGutter: !0,
                  showPrintMargin: !0,
                  splits: 2,
                  style: {},
                  tabSize: 4,
                  theme: 'github',
                  value: ['', ''],
                  width: '500px',
                  wrapEnabled: !0,
                }),
                t
              );
            })(o.Component);
          t.default = h;
        },
        132: (e, t, i) => {
          'use strict';
          Object.defineProperty(t, '__esModule', { value: !0 }),
            (t.getAceInstance = t.debounce = t.editorEvents = t.editorOptions = void 0),
            (t.editorOptions = [
              'minLines',
              'maxLines',
              'readOnly',
              'highlightActiveLine',
              'tabSize',
              'enableBasicAutocompletion',
              'enableLiveAutocompletion',
              'enableSnippets',
            ]),
            (t.editorEvents = [
              'onChange',
              'onFocus',
              'onInput',
              'onBlur',
              'onCopy',
              'onPaste',
              'onSelectionChange',
              'onCursorChange',
              'onScroll',
              'handleOptions',
              'updateRef',
            ]),
            (t.getAceInstance = function () {
              var e;
              return (
                'undefined' == typeof window
                  ? ((i.g.window = {}), (e = i(239)), delete i.g.window)
                  : window.ace
                  ? ((e = window.ace).acequire = window.ace.require || window.ace.acequire)
                  : (e = i(239)),
                e
              );
            }),
            (t.debounce = function (e, t) {
              var i = null;
              return function () {
                var n = this,
                  s = arguments;
                clearTimeout(i),
                  (i = setTimeout(function () {
                    e.apply(n, s);
                  }, t));
              };
            });
        },
        369: function (e, t, i) {
          'use strict';
          var n,
            s =
              (this && this.__extends) ||
              ((n = function (e, t) {
                return (
                  (n =
                    Object.setPrototypeOf ||
                    ({ __proto__: [] } instanceof Array &&
                      function (e, t) {
                        e.__proto__ = t;
                      }) ||
                    function (e, t) {
                      for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
                    }),
                  n(e, t)
                );
              }),
              function (e, t) {
                if ('function' != typeof t && null !== t)
                  throw new TypeError('Class extends value ' + String(t) + ' is not a constructor or null');
                function i() {
                  this.constructor = e;
                }
                n(e, t), (e.prototype = null === t ? Object.create(t) : ((i.prototype = t.prototype), new i()));
              }),
            r =
              (this && this.__assign) ||
              function () {
                return (
                  (r =
                    Object.assign ||
                    function (e) {
                      for (var t, i = 1, n = arguments.length; i < n; i++)
                        for (var s in (t = arguments[i])) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
                      return e;
                    }),
                  r.apply(this, arguments)
                );
              };
          Object.defineProperty(t, '__esModule', { value: !0 });
          var o = i(132),
            a = (0, o.getAceInstance)(),
            l = i(239),
            h = i(83),
            c = i(697),
            u = i(294),
            d = i(307),
            f = i(208),
            g = (function (e) {
              function t(t) {
                var i = e.call(this, t) || this;
                return (
                  o.editorEvents.forEach(function (e) {
                    i[e] = i[e].bind(i);
                  }),
                  (i.debounce = o.debounce),
                  i
                );
              }
              return (
                s(t, e),
                (t.prototype.isInShadow = function (e) {
                  for (var t = e && e.parentNode; t; ) {
                    if ('[object ShadowRoot]' === t.toString()) return !0;
                    t = t.parentNode;
                  }
                  return !1;
                }),
                (t.prototype.componentDidMount = function () {
                  var e = this,
                    t = this.props,
                    i = t.className,
                    n = t.onBeforeLoad,
                    s = t.mode,
                    r = t.focus,
                    l = t.theme,
                    c = t.fontSize,
                    u = t.value,
                    d = t.defaultValue,
                    g = t.cursorStart,
                    p = t.showGutter,
                    m = t.wrapEnabled,
                    v = t.showPrintMargin,
                    w = t.scrollMargin,
                    b = void 0 === w ? [0, 0, 0, 0] : w,
                    y = t.keyboardHandler,
                    $ = t.onLoad,
                    S = t.commands,
                    C = t.annotations,
                    x = t.markers,
                    k = t.splits;
                  (this.editor = a.edit(this.refEditor)),
                    this.isInShadow(this.refEditor) && this.editor.renderer.attachToShadowRoot(),
                    this.editor.setTheme('ace/theme/'.concat(l)),
                    n && n(a);
                  var A = Object.keys(this.props.editorProps),
                    _ = new h.Split(this.editor.container, 'ace/theme/'.concat(l), k);
                  (this.editor.env.split = _),
                    (this.splitEditor = _.getEditor(0)),
                    (this.split = _),
                    this.editor.setShowPrintMargin(!1),
                    this.editor.renderer.setShowGutter(!1);
                  var L = this.splitEditor.$options;
                  this.props.debounceChangePeriod &&
                    (this.onChange = this.debounce(this.onChange, this.props.debounceChangePeriod)),
                    _.forEach(function (t, i) {
                      for (var n = 0; n < A.length; n++) t[A[n]] = e.props.editorProps[A[n]];
                      var r = f(d, i),
                        h = f(u, i, '');
                      t.session.setUndoManager(new a.UndoManager()),
                        t.setTheme('ace/theme/'.concat(l)),
                        t.renderer.setScrollMargin(b[0], b[1], b[2], b[3]),
                        t.getSession().setMode('ace/mode/'.concat(s)),
                        t.setFontSize(c),
                        t.renderer.setShowGutter(p),
                        t.getSession().setUseWrapMode(m),
                        t.setShowPrintMargin(v),
                        t.on('focus', e.onFocus),
                        t.on('blur', e.onBlur),
                        t.on('input', e.onInput),
                        t.on('copy', e.onCopy),
                        t.on('paste', e.onPaste),
                        t.on('change', e.onChange),
                        t.getSession().selection.on('changeSelection', e.onSelectionChange),
                        t.getSession().selection.on('changeCursor', e.onCursorChange),
                        t.session.on('changeScrollTop', e.onScroll),
                        t.setValue(void 0 === r ? h : r, g);
                      var w = f(C, i, []),
                        $ = f(x, i, []);
                      for (
                        t.getSession().setAnnotations(w), $ && $.length > 0 && e.handleMarkers($, t), n = 0;
                        n < o.editorOptions.length;
                        n++
                      ) {
                        var k = o.editorOptions[n];
                        L.hasOwnProperty(k)
                          ? t.setOption(k, e.props[k])
                          : e.props[k] &&
                            console.warn(
                              'ReaceAce: editor option '.concat(
                                k,
                                ' was activated but not found. Did you need to import a related tool or did you possibly mispell the option?'
                              )
                            );
                      }
                      e.handleOptions(e.props, t),
                        Array.isArray(S) &&
                          S.forEach(function (e) {
                            'string' == typeof e.exec
                              ? t.commands.bindKey(e.bindKey, e.exec)
                              : t.commands.addCommand(e);
                          }),
                        y && t.setKeyboardHandler('ace/keyboard/' + y);
                    }),
                    i && (this.refEditor.className += ' ' + i),
                    r && this.splitEditor.focus();
                  var R = this.editor.env.split;
                  R.setOrientation('below' === this.props.orientation ? R.BELOW : R.BESIDE), R.resize(!0), $ && $(R);
                }),
                (t.prototype.componentDidUpdate = function (e) {
                  var t = this,
                    i = e,
                    n = this.props,
                    s = this.editor.env.split;
                  if (
                    (n.splits !== i.splits && s.setSplits(n.splits),
                    n.orientation !== i.orientation && s.setOrientation('below' === n.orientation ? s.BELOW : s.BESIDE),
                    s.forEach(function (e, s) {
                      n.mode !== i.mode && e.getSession().setMode('ace/mode/' + n.mode),
                        n.keyboardHandler !== i.keyboardHandler &&
                          (n.keyboardHandler
                            ? e.setKeyboardHandler('ace/keyboard/' + n.keyboardHandler)
                            : e.setKeyboardHandler(null)),
                        n.fontSize !== i.fontSize && e.setFontSize(n.fontSize),
                        n.wrapEnabled !== i.wrapEnabled && e.getSession().setUseWrapMode(n.wrapEnabled),
                        n.showPrintMargin !== i.showPrintMargin && e.setShowPrintMargin(n.showPrintMargin),
                        n.showGutter !== i.showGutter && e.renderer.setShowGutter(n.showGutter);
                      for (var r = 0; r < o.editorOptions.length; r++) {
                        var a = o.editorOptions[r];
                        n[a] !== i[a] && e.setOption(a, n[a]);
                      }
                      d(n.setOptions, i.setOptions) || t.handleOptions(n, e);
                      var l = f(n.value, s, '');
                      if (e.getValue() !== l) {
                        t.silent = !0;
                        var h = e.session.selection.toJSON();
                        e.setValue(l, n.cursorStart), e.session.selection.fromJSON(h), (t.silent = !1);
                      }
                      var c = f(n.annotations, s, []),
                        u = f(i.annotations, s, []);
                      d(c, u) || e.getSession().setAnnotations(c);
                      var g = f(n.markers, s, []),
                        p = f(i.markers, s, []);
                      !d(g, p) && Array.isArray(g) && t.handleMarkers(g, e);
                    }),
                    n.className !== i.className)
                  ) {
                    var r = this.refEditor.className.trim().split(' ');
                    i.className
                      .trim()
                      .split(' ')
                      .forEach(function (e) {
                        var t = r.indexOf(e);
                        r.splice(t, 1);
                      }),
                      (this.refEditor.className = ' ' + n.className + ' ' + r.join(' '));
                  }
                  n.theme !== i.theme && s.setTheme('ace/theme/' + n.theme),
                    n.focus && !i.focus && this.splitEditor.focus(),
                    (n.height === this.props.height && n.width === this.props.width) || this.editor.resize();
                }),
                (t.prototype.componentWillUnmount = function () {
                  this.editor.destroy(), (this.editor = null);
                }),
                (t.prototype.onChange = function (e) {
                  if (this.props.onChange && !this.silent) {
                    var t = [];
                    this.editor.env.split.forEach(function (e) {
                      t.push(e.getValue());
                    }),
                      this.props.onChange(t, e);
                  }
                }),
                (t.prototype.onSelectionChange = function (e) {
                  if (this.props.onSelectionChange) {
                    var t = [];
                    this.editor.env.split.forEach(function (e) {
                      t.push(e.getSelection());
                    }),
                      this.props.onSelectionChange(t, e);
                  }
                }),
                (t.prototype.onCursorChange = function (e) {
                  if (this.props.onCursorChange) {
                    var t = [];
                    this.editor.env.split.forEach(function (e) {
                      t.push(e.getSelection());
                    }),
                      this.props.onCursorChange(t, e);
                  }
                }),
                (t.prototype.onFocus = function (e) {
                  this.props.onFocus && this.props.onFocus(e);
                }),
                (t.prototype.onInput = function (e) {
                  this.props.onInput && this.props.onInput(e);
                }),
                (t.prototype.onBlur = function (e) {
                  this.props.onBlur && this.props.onBlur(e);
                }),
                (t.prototype.onCopy = function (e) {
                  this.props.onCopy && this.props.onCopy(e);
                }),
                (t.prototype.onPaste = function (e) {
                  this.props.onPaste && this.props.onPaste(e);
                }),
                (t.prototype.onScroll = function () {
                  this.props.onScroll && this.props.onScroll(this.editor);
                }),
                (t.prototype.handleOptions = function (e, t) {
                  for (var i = Object.keys(e.setOptions), n = 0; n < i.length; n++)
                    t.setOption(i[n], e.setOptions[i[n]]);
                }),
                (t.prototype.handleMarkers = function (e, t) {
                  var i = t.getSession().getMarkers(!0);
                  for (var n in i) i.hasOwnProperty(n) && t.getSession().removeMarker(i[n].id);
                  for (var n in (i = t.getSession().getMarkers(!1)))
                    i.hasOwnProperty(n) && t.getSession().removeMarker(i[n].id);
                  e.forEach(function (e) {
                    var i = e.startRow,
                      n = e.startCol,
                      s = e.endRow,
                      r = e.endCol,
                      o = e.className,
                      a = e.type,
                      h = e.inFront,
                      c = void 0 !== h && h,
                      u = new l.Range(i, n, s, r);
                    t.getSession().addMarker(u, o, a, c);
                  });
                }),
                (t.prototype.updateRef = function (e) {
                  this.refEditor = e;
                }),
                (t.prototype.render = function () {
                  var e = this.props,
                    t = e.name,
                    i = e.width,
                    n = e.height,
                    s = e.style,
                    o = r({ width: i, height: n }, s);
                  return u.createElement('div', { ref: this.updateRef, id: t, style: o });
                }),
                (t.propTypes = {
                  className: c.string,
                  debounceChangePeriod: c.number,
                  defaultValue: c.arrayOf(c.string),
                  focus: c.bool,
                  fontSize: c.oneOfType([c.number, c.string]),
                  height: c.string,
                  mode: c.string,
                  name: c.string,
                  onBlur: c.func,
                  onChange: c.func,
                  onCopy: c.func,
                  onFocus: c.func,
                  onInput: c.func,
                  onLoad: c.func,
                  onPaste: c.func,
                  onScroll: c.func,
                  orientation: c.string,
                  showGutter: c.bool,
                  splits: c.number,
                  theme: c.string,
                  value: c.arrayOf(c.string),
                  width: c.string,
                  onSelectionChange: c.func,
                  onCursorChange: c.func,
                  onBeforeLoad: c.func,
                  minLines: c.number,
                  maxLines: c.number,
                  readOnly: c.bool,
                  highlightActiveLine: c.bool,
                  tabSize: c.number,
                  showPrintMargin: c.bool,
                  cursorStart: c.number,
                  editorProps: c.object,
                  setOptions: c.object,
                  style: c.object,
                  scrollMargin: c.array,
                  annotations: c.array,
                  markers: c.array,
                  keyboardHandler: c.string,
                  wrapEnabled: c.bool,
                  enableBasicAutocompletion: c.oneOfType([c.bool, c.array]),
                  enableLiveAutocompletion: c.oneOfType([c.bool, c.array]),
                  commands: c.array,
                }),
                (t.defaultProps = {
                  name: 'ace-editor',
                  focus: !1,
                  orientation: 'beside',
                  splits: 2,
                  mode: '',
                  theme: '',
                  height: '500px',
                  width: '500px',
                  value: [],
                  fontSize: 12,
                  showGutter: !0,
                  onChange: null,
                  onPaste: null,
                  onLoad: null,
                  onScroll: null,
                  minLines: null,
                  maxLines: null,
                  readOnly: !1,
                  highlightActiveLine: !0,
                  showPrintMargin: !0,
                  tabSize: 4,
                  cursorStart: 1,
                  editorProps: {},
                  style: {},
                  scrollMargin: [0, 0, 0, 0],
                  setOptions: {},
                  wrapEnabled: !1,
                  enableBasicAutocompletion: !1,
                  enableLiveAutocompletion: !1,
                }),
                t
              );
            })(u.Component);
          t.default = g;
        },
        27: (e) => {
          var t = function () {
              (this.Diff_Timeout = 1),
                (this.Diff_EditCost = 4),
                (this.Match_Threshold = 0.5),
                (this.Match_Distance = 1e3),
                (this.Patch_DeleteThreshold = 0.5),
                (this.Patch_Margin = 4),
                (this.Match_MaxBits = 32);
            },
            i = -1;
          (t.Diff = function (e, t) {
            return [e, t];
          }),
            (t.prototype.diff_main = function (e, i, n, s) {
              void 0 === s &&
                (s = this.Diff_Timeout <= 0 ? Number.MAX_VALUE : new Date().getTime() + 1e3 * this.Diff_Timeout);
              var r = s;
              if (null == e || null == i) throw new Error('Null input. (diff_main)');
              if (e == i) return e ? [new t.Diff(0, e)] : [];
              void 0 === n && (n = !0);
              var o = n,
                a = this.diff_commonPrefix(e, i),
                l = e.substring(0, a);
              (e = e.substring(a)), (i = i.substring(a)), (a = this.diff_commonSuffix(e, i));
              var h = e.substring(e.length - a);
              (e = e.substring(0, e.length - a)), (i = i.substring(0, i.length - a));
              var c = this.diff_compute_(e, i, o, r);
              return l && c.unshift(new t.Diff(0, l)), h && c.push(new t.Diff(0, h)), this.diff_cleanupMerge(c), c;
            }),
            (t.prototype.diff_compute_ = function (e, n, s, r) {
              var o;
              if (!e) return [new t.Diff(1, n)];
              if (!n) return [new t.Diff(i, e)];
              var a = e.length > n.length ? e : n,
                l = e.length > n.length ? n : e,
                h = a.indexOf(l);
              if (-1 != h)
                return (
                  (o = [new t.Diff(1, a.substring(0, h)), new t.Diff(0, l), new t.Diff(1, a.substring(h + l.length))]),
                  e.length > n.length && (o[0][0] = o[2][0] = i),
                  o
                );
              if (1 == l.length) return [new t.Diff(i, e), new t.Diff(1, n)];
              var c = this.diff_halfMatch_(e, n);
              if (c) {
                var u = c[0],
                  d = c[1],
                  f = c[2],
                  g = c[3],
                  p = c[4],
                  m = this.diff_main(u, f, s, r),
                  v = this.diff_main(d, g, s, r);
                return m.concat([new t.Diff(0, p)], v);
              }
              return s && e.length > 100 && n.length > 100 ? this.diff_lineMode_(e, n, r) : this.diff_bisect_(e, n, r);
            }),
            (t.prototype.diff_lineMode_ = function (e, n, s) {
              var r = this.diff_linesToChars_(e, n);
              (e = r.chars1), (n = r.chars2);
              var o = r.lineArray,
                a = this.diff_main(e, n, !1, s);
              this.diff_charsToLines_(a, o), this.diff_cleanupSemantic(a), a.push(new t.Diff(0, ''));
              for (var l = 0, h = 0, c = 0, u = '', d = ''; l < a.length; ) {
                switch (a[l][0]) {
                  case 1:
                    c++, (d += a[l][1]);
                    break;
                  case i:
                    h++, (u += a[l][1]);
                    break;
                  case 0:
                    if (h >= 1 && c >= 1) {
                      a.splice(l - h - c, h + c), (l = l - h - c);
                      for (var f = this.diff_main(u, d, !1, s), g = f.length - 1; g >= 0; g--) a.splice(l, 0, f[g]);
                      l += f.length;
                    }
                    (c = 0), (h = 0), (u = ''), (d = '');
                }
                l++;
              }
              return a.pop(), a;
            }),
            (t.prototype.diff_bisect_ = function (e, n, s) {
              for (
                var r = e.length,
                  o = n.length,
                  a = Math.ceil((r + o) / 2),
                  l = a,
                  h = 2 * a,
                  c = new Array(h),
                  u = new Array(h),
                  d = 0;
                d < h;
                d++
              )
                (c[d] = -1), (u[d] = -1);
              (c[l + 1] = 0), (u[l + 1] = 0);
              for (
                var f = r - o, g = f % 2 != 0, p = 0, m = 0, v = 0, w = 0, b = 0;
                b < a && !(new Date().getTime() > s);
                b++
              ) {
                for (var y = -b + p; y <= b - m; y += 2) {
                  for (
                    var $ = l + y, S = (_ = y == -b || (y != b && c[$ - 1] < c[$ + 1]) ? c[$ + 1] : c[$ - 1] + 1) - y;
                    _ < r && S < o && e.charAt(_) == n.charAt(S);

                  )
                    _++, S++;
                  if (((c[$] = _), _ > r)) m += 2;
                  else if (S > o) p += 2;
                  else if (g && (k = l + f - y) >= 0 && k < h && -1 != u[k] && _ >= (x = r - u[k]))
                    return this.diff_bisectSplit_(e, n, _, S, s);
                }
                for (var C = -b + v; C <= b - w; C += 2) {
                  for (
                    var x,
                      k = l + C,
                      A = (x = C == -b || (C != b && u[k - 1] < u[k + 1]) ? u[k + 1] : u[k - 1] + 1) - C;
                    x < r && A < o && e.charAt(r - x - 1) == n.charAt(o - A - 1);

                  )
                    x++, A++;
                  if (((u[k] = x), x > r)) w += 2;
                  else if (A > o) v += 2;
                  else if (!g) {
                    var _;
                    if (($ = l + f - C) >= 0 && $ < h && -1 != c[$])
                      if (((S = l + (_ = c[$]) - $), _ >= (x = r - x))) return this.diff_bisectSplit_(e, n, _, S, s);
                  }
                }
              }
              return [new t.Diff(i, e), new t.Diff(1, n)];
            }),
            (t.prototype.diff_bisectSplit_ = function (e, t, i, n, s) {
              var r = e.substring(0, i),
                o = t.substring(0, n),
                a = e.substring(i),
                l = t.substring(n),
                h = this.diff_main(r, o, !1, s),
                c = this.diff_main(a, l, !1, s);
              return h.concat(c);
            }),
            (t.prototype.diff_linesToChars_ = function (e, t) {
              var i = [],
                n = {};
              function s(e) {
                for (var t = '', s = 0, o = -1, a = i.length; o < e.length - 1; ) {
                  -1 == (o = e.indexOf('\n', s)) && (o = e.length - 1);
                  var l = e.substring(s, o + 1);
                  (n.hasOwnProperty ? n.hasOwnProperty(l) : void 0 !== n[l])
                    ? (t += String.fromCharCode(n[l]))
                    : (a == r && ((l = e.substring(s)), (o = e.length)),
                      (t += String.fromCharCode(a)),
                      (n[l] = a),
                      (i[a++] = l)),
                    (s = o + 1);
                }
                return t;
              }
              i[0] = '';
              var r = 4e4,
                o = s(e);
              return (r = 65535), { chars1: o, chars2: s(t), lineArray: i };
            }),
            (t.prototype.diff_charsToLines_ = function (e, t) {
              for (var i = 0; i < e.length; i++) {
                for (var n = e[i][1], s = [], r = 0; r < n.length; r++) s[r] = t[n.charCodeAt(r)];
                e[i][1] = s.join('');
              }
            }),
            (t.prototype.diff_commonPrefix = function (e, t) {
              if (!e || !t || e.charAt(0) != t.charAt(0)) return 0;
              for (var i = 0, n = Math.min(e.length, t.length), s = n, r = 0; i < s; )
                e.substring(r, s) == t.substring(r, s) ? (r = i = s) : (n = s), (s = Math.floor((n - i) / 2 + i));
              return s;
            }),
            (t.prototype.diff_commonSuffix = function (e, t) {
              if (!e || !t || e.charAt(e.length - 1) != t.charAt(t.length - 1)) return 0;
              for (var i = 0, n = Math.min(e.length, t.length), s = n, r = 0; i < s; )
                e.substring(e.length - s, e.length - r) == t.substring(t.length - s, t.length - r)
                  ? (r = i = s)
                  : (n = s),
                  (s = Math.floor((n - i) / 2 + i));
              return s;
            }),
            (t.prototype.diff_commonOverlap_ = function (e, t) {
              var i = e.length,
                n = t.length;
              if (0 == i || 0 == n) return 0;
              i > n ? (e = e.substring(i - n)) : i < n && (t = t.substring(0, i));
              var s = Math.min(i, n);
              if (e == t) return s;
              for (var r = 0, o = 1; ; ) {
                var a = e.substring(s - o),
                  l = t.indexOf(a);
                if (-1 == l) return r;
                (o += l), (0 != l && e.substring(s - o) != t.substring(0, o)) || ((r = o), o++);
              }
            }),
            (t.prototype.diff_halfMatch_ = function (e, t) {
              if (this.Diff_Timeout <= 0) return null;
              var i = e.length > t.length ? e : t,
                n = e.length > t.length ? t : e;
              if (i.length < 4 || 2 * n.length < i.length) return null;
              var s = this;
              function r(e, t, i) {
                for (
                  var n, r, o, a, l = e.substring(i, i + Math.floor(e.length / 4)), h = -1, c = '';
                  -1 != (h = t.indexOf(l, h + 1));

                ) {
                  var u = s.diff_commonPrefix(e.substring(i), t.substring(h)),
                    d = s.diff_commonSuffix(e.substring(0, i), t.substring(0, h));
                  c.length < d + u &&
                    ((c = t.substring(h - d, h) + t.substring(h, h + u)),
                    (n = e.substring(0, i - d)),
                    (r = e.substring(i + u)),
                    (o = t.substring(0, h - d)),
                    (a = t.substring(h + u)));
                }
                return 2 * c.length >= e.length ? [n, r, o, a, c] : null;
              }
              var o,
                a,
                l,
                h,
                c,
                u = r(i, n, Math.ceil(i.length / 4)),
                d = r(i, n, Math.ceil(i.length / 2));
              return u || d
                ? ((o = d ? (u && u[4].length > d[4].length ? u : d) : u),
                  e.length > t.length
                    ? ((a = o[0]), (l = o[1]), (h = o[2]), (c = o[3]))
                    : ((h = o[0]), (c = o[1]), (a = o[2]), (l = o[3])),
                  [a, l, h, c, o[4]])
                : null;
            }),
            (t.prototype.diff_cleanupSemantic = function (e) {
              for (var n = !1, s = [], r = 0, o = null, a = 0, l = 0, h = 0, c = 0, u = 0; a < e.length; )
                0 == e[a][0]
                  ? ((s[r++] = a), (l = c), (h = u), (c = 0), (u = 0), (o = e[a][1]))
                  : (1 == e[a][0] ? (c += e[a][1].length) : (u += e[a][1].length),
                    o &&
                      o.length <= Math.max(l, h) &&
                      o.length <= Math.max(c, u) &&
                      (e.splice(s[r - 1], 0, new t.Diff(i, o)),
                      (e[s[r - 1] + 1][0] = 1),
                      r--,
                      (a = --r > 0 ? s[r - 1] : -1),
                      (l = 0),
                      (h = 0),
                      (c = 0),
                      (u = 0),
                      (o = null),
                      (n = !0))),
                  a++;
              for (n && this.diff_cleanupMerge(e), this.diff_cleanupSemanticLossless(e), a = 1; a < e.length; ) {
                if (e[a - 1][0] == i && 1 == e[a][0]) {
                  var d = e[a - 1][1],
                    f = e[a][1],
                    g = this.diff_commonOverlap_(d, f),
                    p = this.diff_commonOverlap_(f, d);
                  g >= p
                    ? (g >= d.length / 2 || g >= f.length / 2) &&
                      (e.splice(a, 0, new t.Diff(0, f.substring(0, g))),
                      (e[a - 1][1] = d.substring(0, d.length - g)),
                      (e[a + 1][1] = f.substring(g)),
                      a++)
                    : (p >= d.length / 2 || p >= f.length / 2) &&
                      (e.splice(a, 0, new t.Diff(0, d.substring(0, p))),
                      (e[a - 1][0] = 1),
                      (e[a - 1][1] = f.substring(0, f.length - p)),
                      (e[a + 1][0] = i),
                      (e[a + 1][1] = d.substring(p)),
                      a++),
                    a++;
                }
                a++;
              }
            }),
            (t.prototype.diff_cleanupSemanticLossless = function (e) {
              function i(e, i) {
                if (!e || !i) return 6;
                var n = e.charAt(e.length - 1),
                  s = i.charAt(0),
                  r = n.match(t.nonAlphaNumericRegex_),
                  o = s.match(t.nonAlphaNumericRegex_),
                  a = r && n.match(t.whitespaceRegex_),
                  l = o && s.match(t.whitespaceRegex_),
                  h = a && n.match(t.linebreakRegex_),
                  c = l && s.match(t.linebreakRegex_),
                  u = h && e.match(t.blanklineEndRegex_),
                  d = c && i.match(t.blanklineStartRegex_);
                return u || d ? 5 : h || c ? 4 : r && !a && l ? 3 : a || l ? 2 : r || o ? 1 : 0;
              }
              for (var n = 1; n < e.length - 1; ) {
                if (0 == e[n - 1][0] && 0 == e[n + 1][0]) {
                  var s = e[n - 1][1],
                    r = e[n][1],
                    o = e[n + 1][1],
                    a = this.diff_commonSuffix(s, r);
                  if (a) {
                    var l = r.substring(r.length - a);
                    (s = s.substring(0, s.length - a)), (r = l + r.substring(0, r.length - a)), (o = l + o);
                  }
                  for (var h = s, c = r, u = o, d = i(s, r) + i(r, o); r.charAt(0) === o.charAt(0); ) {
                    (s += r.charAt(0)), (r = r.substring(1) + o.charAt(0)), (o = o.substring(1));
                    var f = i(s, r) + i(r, o);
                    f >= d && ((d = f), (h = s), (c = r), (u = o));
                  }
                  e[n - 1][1] != h &&
                    (h ? (e[n - 1][1] = h) : (e.splice(n - 1, 1), n--),
                    (e[n][1] = c),
                    u ? (e[n + 1][1] = u) : (e.splice(n + 1, 1), n--));
                }
                n++;
              }
            }),
            (t.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/),
            (t.whitespaceRegex_ = /\s/),
            (t.linebreakRegex_ = /[\r\n]/),
            (t.blanklineEndRegex_ = /\n\r?\n$/),
            (t.blanklineStartRegex_ = /^\r?\n\r?\n/),
            (t.prototype.diff_cleanupEfficiency = function (e) {
              for (var n = !1, s = [], r = 0, o = null, a = 0, l = !1, h = !1, c = !1, u = !1; a < e.length; )
                0 == e[a][0]
                  ? (e[a][1].length < this.Diff_EditCost && (c || u)
                      ? ((s[r++] = a), (l = c), (h = u), (o = e[a][1]))
                      : ((r = 0), (o = null)),
                    (c = u = !1))
                  : (e[a][0] == i ? (u = !0) : (c = !0),
                    o &&
                      ((l && h && c && u) || (o.length < this.Diff_EditCost / 2 && l + h + c + u == 3)) &&
                      (e.splice(s[r - 1], 0, new t.Diff(i, o)),
                      (e[s[r - 1] + 1][0] = 1),
                      r--,
                      (o = null),
                      l && h ? ((c = u = !0), (r = 0)) : ((a = --r > 0 ? s[r - 1] : -1), (c = u = !1)),
                      (n = !0))),
                  a++;
              n && this.diff_cleanupMerge(e);
            }),
            (t.prototype.diff_cleanupMerge = function (e) {
              e.push(new t.Diff(0, ''));
              for (var n, s = 0, r = 0, o = 0, a = '', l = ''; s < e.length; )
                switch (e[s][0]) {
                  case 1:
                    o++, (l += e[s][1]), s++;
                    break;
                  case i:
                    r++, (a += e[s][1]), s++;
                    break;
                  case 0:
                    r + o > 1
                      ? (0 !== r &&
                          0 !== o &&
                          (0 !== (n = this.diff_commonPrefix(l, a)) &&
                            (s - r - o > 0 && 0 == e[s - r - o - 1][0]
                              ? (e[s - r - o - 1][1] += l.substring(0, n))
                              : (e.splice(0, 0, new t.Diff(0, l.substring(0, n))), s++),
                            (l = l.substring(n)),
                            (a = a.substring(n))),
                          0 !== (n = this.diff_commonSuffix(l, a)) &&
                            ((e[s][1] = l.substring(l.length - n) + e[s][1]),
                            (l = l.substring(0, l.length - n)),
                            (a = a.substring(0, a.length - n)))),
                        (s -= r + o),
                        e.splice(s, r + o),
                        a.length && (e.splice(s, 0, new t.Diff(i, a)), s++),
                        l.length && (e.splice(s, 0, new t.Diff(1, l)), s++),
                        s++)
                      : 0 !== s && 0 == e[s - 1][0]
                      ? ((e[s - 1][1] += e[s][1]), e.splice(s, 1))
                      : s++,
                      (o = 0),
                      (r = 0),
                      (a = ''),
                      (l = '');
                }
              '' === e[e.length - 1][1] && e.pop();
              var h = !1;
              for (s = 1; s < e.length - 1; )
                0 == e[s - 1][0] &&
                  0 == e[s + 1][0] &&
                  (e[s][1].substring(e[s][1].length - e[s - 1][1].length) == e[s - 1][1]
                    ? ((e[s][1] = e[s - 1][1] + e[s][1].substring(0, e[s][1].length - e[s - 1][1].length)),
                      (e[s + 1][1] = e[s - 1][1] + e[s + 1][1]),
                      e.splice(s - 1, 1),
                      (h = !0))
                    : e[s][1].substring(0, e[s + 1][1].length) == e[s + 1][1] &&
                      ((e[s - 1][1] += e[s + 1][1]),
                      (e[s][1] = e[s][1].substring(e[s + 1][1].length) + e[s + 1][1]),
                      e.splice(s + 1, 1),
                      (h = !0))),
                  s++;
              h && this.diff_cleanupMerge(e);
            }),
            (t.prototype.diff_xIndex = function (e, t) {
              var n,
                s = 0,
                r = 0,
                o = 0,
                a = 0;
              for (
                n = 0;
                n < e.length &&
                (1 !== e[n][0] && (s += e[n][1].length), e[n][0] !== i && (r += e[n][1].length), !(s > t));
                n++
              )
                (o = s), (a = r);
              return e.length != n && e[n][0] === i ? a : a + (t - o);
            }),
            (t.prototype.diff_prettyHtml = function (e) {
              for (var t = [], n = /&/g, s = /</g, r = />/g, o = /\n/g, a = 0; a < e.length; a++) {
                var l = e[a][0],
                  h = e[a][1].replace(n, '&amp;').replace(s, '&lt;').replace(r, '&gt;').replace(o, '&para;<br>');
                switch (l) {
                  case 1:
                    t[a] = '<ins style="background:#e6ffe6;">' + h + '</ins>';
                    break;
                  case i:
                    t[a] = '<del style="background:#ffe6e6;">' + h + '</del>';
                    break;
                  case 0:
                    t[a] = '<span>' + h + '</span>';
                }
              }
              return t.join('');
            }),
            (t.prototype.diff_text1 = function (e) {
              for (var t = [], i = 0; i < e.length; i++) 1 !== e[i][0] && (t[i] = e[i][1]);
              return t.join('');
            }),
            (t.prototype.diff_text2 = function (e) {
              for (var t = [], n = 0; n < e.length; n++) e[n][0] !== i && (t[n] = e[n][1]);
              return t.join('');
            }),
            (t.prototype.diff_levenshtein = function (e) {
              for (var t = 0, n = 0, s = 0, r = 0; r < e.length; r++) {
                var o = e[r][0],
                  a = e[r][1];
                switch (o) {
                  case 1:
                    n += a.length;
                    break;
                  case i:
                    s += a.length;
                    break;
                  case 0:
                    (t += Math.max(n, s)), (n = 0), (s = 0);
                }
              }
              return t + Math.max(n, s);
            }),
            (t.prototype.diff_toDelta = function (e) {
              for (var t = [], n = 0; n < e.length; n++)
                switch (e[n][0]) {
                  case 1:
                    t[n] = '+' + encodeURI(e[n][1]);
                    break;
                  case i:
                    t[n] = '-' + e[n][1].length;
                    break;
                  case 0:
                    t[n] = '=' + e[n][1].length;
                }
              return t.join('\t').replace(/%20/g, ' ');
            }),
            (t.prototype.diff_fromDelta = function (e, n) {
              for (var s = [], r = 0, o = 0, a = n.split(/\t/g), l = 0; l < a.length; l++) {
                var h = a[l].substring(1);
                switch (a[l].charAt(0)) {
                  case '+':
                    try {
                      s[r++] = new t.Diff(1, decodeURI(h));
                    } catch (e) {
                      throw new Error('Illegal escape in diff_fromDelta: ' + h);
                    }
                    break;
                  case '-':
                  case '=':
                    var c = parseInt(h, 10);
                    if (isNaN(c) || c < 0) throw new Error('Invalid number in diff_fromDelta: ' + h);
                    var u = e.substring(o, (o += c));
                    '=' == a[l].charAt(0) ? (s[r++] = new t.Diff(0, u)) : (s[r++] = new t.Diff(i, u));
                    break;
                  default:
                    if (a[l]) throw new Error('Invalid diff operation in diff_fromDelta: ' + a[l]);
                }
              }
              if (o != e.length)
                throw new Error('Delta length (' + o + ') does not equal source text length (' + e.length + ').');
              return s;
            }),
            (t.prototype.match_main = function (e, t, i) {
              if (null == e || null == t || null == i) throw new Error('Null input. (match_main)');
              return (
                (i = Math.max(0, Math.min(i, e.length))),
                e == t ? 0 : e.length ? (e.substring(i, i + t.length) == t ? i : this.match_bitap_(e, t, i)) : -1
              );
            }),
            (t.prototype.match_bitap_ = function (e, t, i) {
              if (t.length > this.Match_MaxBits) throw new Error('Pattern too long for this browser.');
              var n = this.match_alphabet_(t),
                s = this;
              function r(e, n) {
                var r = e / t.length,
                  o = Math.abs(i - n);
                return s.Match_Distance ? r + o / s.Match_Distance : o ? 1 : r;
              }
              var o = this.Match_Threshold,
                a = e.indexOf(t, i);
              -1 != a &&
                ((o = Math.min(r(0, a), o)), -1 != (a = e.lastIndexOf(t, i + t.length)) && (o = Math.min(r(0, a), o)));
              var l,
                h,
                c = 1 << (t.length - 1);
              a = -1;
              for (var u, d = t.length + e.length, f = 0; f < t.length; f++) {
                for (l = 0, h = d; l < h; ) r(f, i + h) <= o ? (l = h) : (d = h), (h = Math.floor((d - l) / 2 + l));
                d = h;
                var g = Math.max(1, i - h + 1),
                  p = Math.min(i + h, e.length) + t.length,
                  m = Array(p + 2);
                m[p + 1] = (1 << f) - 1;
                for (var v = p; v >= g; v--) {
                  var w = n[e.charAt(v - 1)];
                  if (
                    ((m[v] =
                      0 === f
                        ? ((m[v + 1] << 1) | 1) & w
                        : (((m[v + 1] << 1) | 1) & w) | ((u[v + 1] | u[v]) << 1) | 1 | u[v + 1]),
                    m[v] & c)
                  ) {
                    var b = r(f, v - 1);
                    if (b <= o) {
                      if (((o = b), !((a = v - 1) > i))) break;
                      g = Math.max(1, 2 * i - a);
                    }
                  }
                }
                if (r(f + 1, i) > o) break;
                u = m;
              }
              return a;
            }),
            (t.prototype.match_alphabet_ = function (e) {
              for (var t = {}, i = 0; i < e.length; i++) t[e.charAt(i)] = 0;
              for (i = 0; i < e.length; i++) t[e.charAt(i)] |= 1 << (e.length - i - 1);
              return t;
            }),
            (t.prototype.patch_addContext_ = function (e, i) {
              if (0 != i.length) {
                if (null === e.start2) throw Error('patch not initialized');
                for (
                  var n = i.substring(e.start2, e.start2 + e.length1), s = 0;
                  i.indexOf(n) != i.lastIndexOf(n) &&
                  n.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin;

                )
                  (s += this.Patch_Margin), (n = i.substring(e.start2 - s, e.start2 + e.length1 + s));
                s += this.Patch_Margin;
                var r = i.substring(e.start2 - s, e.start2);
                r && e.diffs.unshift(new t.Diff(0, r));
                var o = i.substring(e.start2 + e.length1, e.start2 + e.length1 + s);
                o && e.diffs.push(new t.Diff(0, o)),
                  (e.start1 -= r.length),
                  (e.start2 -= r.length),
                  (e.length1 += r.length + o.length),
                  (e.length2 += r.length + o.length);
              }
            }),
            (t.prototype.patch_make = function (e, n, s) {
              var r, o;
              if ('string' == typeof e && 'string' == typeof n && void 0 === s)
                (r = e),
                  (o = this.diff_main(r, n, !0)).length > 2 &&
                    (this.diff_cleanupSemantic(o), this.diff_cleanupEfficiency(o));
              else if (e && 'object' == typeof e && void 0 === n && void 0 === s) (o = e), (r = this.diff_text1(o));
              else if ('string' == typeof e && n && 'object' == typeof n && void 0 === s) (r = e), (o = n);
              else {
                if ('string' != typeof e || 'string' != typeof n || !s || 'object' != typeof s)
                  throw new Error('Unknown call format to patch_make.');
                (r = e), (o = s);
              }
              if (0 === o.length) return [];
              for (var a = [], l = new t.patch_obj(), h = 0, c = 0, u = 0, d = r, f = r, g = 0; g < o.length; g++) {
                var p = o[g][0],
                  m = o[g][1];
                switch ((h || 0 === p || ((l.start1 = c), (l.start2 = u)), p)) {
                  case 1:
                    (l.diffs[h++] = o[g]), (l.length2 += m.length), (f = f.substring(0, u) + m + f.substring(u));
                    break;
                  case i:
                    (l.length1 += m.length), (l.diffs[h++] = o[g]), (f = f.substring(0, u) + f.substring(u + m.length));
                    break;
                  case 0:
                    m.length <= 2 * this.Patch_Margin && h && o.length != g + 1
                      ? ((l.diffs[h++] = o[g]), (l.length1 += m.length), (l.length2 += m.length))
                      : m.length >= 2 * this.Patch_Margin &&
                        h &&
                        (this.patch_addContext_(l, d), a.push(l), (l = new t.patch_obj()), (h = 0), (d = f), (c = u));
                }
                1 !== p && (c += m.length), p !== i && (u += m.length);
              }
              return h && (this.patch_addContext_(l, d), a.push(l)), a;
            }),
            (t.prototype.patch_deepCopy = function (e) {
              for (var i = [], n = 0; n < e.length; n++) {
                var s = e[n],
                  r = new t.patch_obj();
                r.diffs = [];
                for (var o = 0; o < s.diffs.length; o++) r.diffs[o] = new t.Diff(s.diffs[o][0], s.diffs[o][1]);
                (r.start1 = s.start1),
                  (r.start2 = s.start2),
                  (r.length1 = s.length1),
                  (r.length2 = s.length2),
                  (i[n] = r);
              }
              return i;
            }),
            (t.prototype.patch_apply = function (e, t) {
              if (0 == e.length) return [t, []];
              e = this.patch_deepCopy(e);
              var n = this.patch_addPadding(e);
              (t = n + t + n), this.patch_splitMax(e);
              for (var s = 0, r = [], o = 0; o < e.length; o++) {
                var a,
                  l,
                  h = e[o].start2 + s,
                  c = this.diff_text1(e[o].diffs),
                  u = -1;
                if (
                  (c.length > this.Match_MaxBits
                    ? -1 != (a = this.match_main(t, c.substring(0, this.Match_MaxBits), h)) &&
                      (-1 ==
                        (u = this.match_main(
                          t,
                          c.substring(c.length - this.Match_MaxBits),
                          h + c.length - this.Match_MaxBits
                        )) ||
                        a >= u) &&
                      (a = -1)
                    : (a = this.match_main(t, c, h)),
                  -1 == a)
                )
                  (r[o] = !1), (s -= e[o].length2 - e[o].length1);
                else if (
                  ((r[o] = !0),
                  (s = a - h),
                  c == (l = -1 == u ? t.substring(a, a + c.length) : t.substring(a, u + this.Match_MaxBits)))
                )
                  t = t.substring(0, a) + this.diff_text2(e[o].diffs) + t.substring(a + c.length);
                else {
                  var d = this.diff_main(c, l, !1);
                  if (c.length > this.Match_MaxBits && this.diff_levenshtein(d) / c.length > this.Patch_DeleteThreshold)
                    r[o] = !1;
                  else {
                    this.diff_cleanupSemanticLossless(d);
                    for (var f, g = 0, p = 0; p < e[o].diffs.length; p++) {
                      var m = e[o].diffs[p];
                      0 !== m[0] && (f = this.diff_xIndex(d, g)),
                        1 === m[0]
                          ? (t = t.substring(0, a + f) + m[1] + t.substring(a + f))
                          : m[0] === i &&
                            (t = t.substring(0, a + f) + t.substring(a + this.diff_xIndex(d, g + m[1].length))),
                        m[0] !== i && (g += m[1].length);
                    }
                  }
                }
              }
              return [(t = t.substring(n.length, t.length - n.length)), r];
            }),
            (t.prototype.patch_addPadding = function (e) {
              for (var i = this.Patch_Margin, n = '', s = 1; s <= i; s++) n += String.fromCharCode(s);
              for (s = 0; s < e.length; s++) (e[s].start1 += i), (e[s].start2 += i);
              var r = e[0],
                o = r.diffs;
              if (0 == o.length || 0 != o[0][0])
                o.unshift(new t.Diff(0, n)), (r.start1 -= i), (r.start2 -= i), (r.length1 += i), (r.length2 += i);
              else if (i > o[0][1].length) {
                var a = i - o[0][1].length;
                (o[0][1] = n.substring(o[0][1].length) + o[0][1]),
                  (r.start1 -= a),
                  (r.start2 -= a),
                  (r.length1 += a),
                  (r.length2 += a);
              }
              return (
                0 == (o = (r = e[e.length - 1]).diffs).length || 0 != o[o.length - 1][0]
                  ? (o.push(new t.Diff(0, n)), (r.length1 += i), (r.length2 += i))
                  : i > o[o.length - 1][1].length &&
                    ((a = i - o[o.length - 1][1].length),
                    (o[o.length - 1][1] += n.substring(0, a)),
                    (r.length1 += a),
                    (r.length2 += a)),
                n
              );
            }),
            (t.prototype.patch_splitMax = function (e) {
              for (var n = this.Match_MaxBits, s = 0; s < e.length; s++)
                if (!(e[s].length1 <= n)) {
                  var r = e[s];
                  e.splice(s--, 1);
                  for (var o = r.start1, a = r.start2, l = ''; 0 !== r.diffs.length; ) {
                    var h = new t.patch_obj(),
                      c = !0;
                    for (
                      h.start1 = o - l.length,
                        h.start2 = a - l.length,
                        '' !== l && ((h.length1 = h.length2 = l.length), h.diffs.push(new t.Diff(0, l)));
                      0 !== r.diffs.length && h.length1 < n - this.Patch_Margin;

                    ) {
                      var u = r.diffs[0][0],
                        d = r.diffs[0][1];
                      1 === u
                        ? ((h.length2 += d.length), (a += d.length), h.diffs.push(r.diffs.shift()), (c = !1))
                        : u === i && 1 == h.diffs.length && 0 == h.diffs[0][0] && d.length > 2 * n
                        ? ((h.length1 += d.length),
                          (o += d.length),
                          (c = !1),
                          h.diffs.push(new t.Diff(u, d)),
                          r.diffs.shift())
                        : ((d = d.substring(0, n - h.length1 - this.Patch_Margin)),
                          (h.length1 += d.length),
                          (o += d.length),
                          0 === u ? ((h.length2 += d.length), (a += d.length)) : (c = !1),
                          h.diffs.push(new t.Diff(u, d)),
                          d == r.diffs[0][1] ? r.diffs.shift() : (r.diffs[0][1] = r.diffs[0][1].substring(d.length)));
                    }
                    l = (l = this.diff_text2(h.diffs)).substring(l.length - this.Patch_Margin);
                    var f = this.diff_text1(r.diffs).substring(0, this.Patch_Margin);
                    '' !== f &&
                      ((h.length1 += f.length),
                      (h.length2 += f.length),
                      0 !== h.diffs.length && 0 === h.diffs[h.diffs.length - 1][0]
                        ? (h.diffs[h.diffs.length - 1][1] += f)
                        : h.diffs.push(new t.Diff(0, f))),
                      c || e.splice(++s, 0, h);
                  }
                }
            }),
            (t.prototype.patch_toText = function (e) {
              for (var t = [], i = 0; i < e.length; i++) t[i] = e[i];
              return t.join('');
            }),
            (t.prototype.patch_fromText = function (e) {
              var n = [];
              if (!e) return n;
              for (var s = e.split('\n'), r = 0, o = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; r < s.length; ) {
                var a = s[r].match(o);
                if (!a) throw new Error('Invalid patch string: ' + s[r]);
                var l = new t.patch_obj();
                for (
                  n.push(l),
                    l.start1 = parseInt(a[1], 10),
                    '' === a[2]
                      ? (l.start1--, (l.length1 = 1))
                      : '0' == a[2]
                      ? (l.length1 = 0)
                      : (l.start1--, (l.length1 = parseInt(a[2], 10))),
                    l.start2 = parseInt(a[3], 10),
                    '' === a[4]
                      ? (l.start2--, (l.length2 = 1))
                      : '0' == a[4]
                      ? (l.length2 = 0)
                      : (l.start2--, (l.length2 = parseInt(a[4], 10))),
                    r++;
                  r < s.length;

                ) {
                  var h = s[r].charAt(0);
                  try {
                    var c = decodeURI(s[r].substring(1));
                  } catch (e) {
                    throw new Error('Illegal escape in patch_fromText: ' + c);
                  }
                  if ('-' == h) l.diffs.push(new t.Diff(i, c));
                  else if ('+' == h) l.diffs.push(new t.Diff(1, c));
                  else if (' ' == h) l.diffs.push(new t.Diff(0, c));
                  else {
                    if ('@' == h) break;
                    if ('' !== h) throw new Error('Invalid patch mode "' + h + '" in: ' + c);
                  }
                  r++;
                }
              }
              return n;
            }),
            ((t.patch_obj = function () {
              (this.diffs = []), (this.start1 = null), (this.start2 = null), (this.length1 = 0), (this.length2 = 0);
            }).prototype.toString = function () {
              for (
                var e,
                  t = [
                    '@@ -' +
                      (0 === this.length1
                        ? this.start1 + ',0'
                        : 1 == this.length1
                        ? this.start1 + 1
                        : this.start1 + 1 + ',' + this.length1) +
                      ' +' +
                      (0 === this.length2
                        ? this.start2 + ',0'
                        : 1 == this.length2
                        ? this.start2 + 1
                        : this.start2 + 1 + ',' + this.length2) +
                      ' @@\n',
                  ],
                  n = 0;
                n < this.diffs.length;
                n++
              ) {
                switch (this.diffs[n][0]) {
                  case 1:
                    e = '+';
                    break;
                  case i:
                    e = '-';
                    break;
                  case 0:
                    e = ' ';
                }
                t[n + 1] = e + encodeURI(this.diffs[n][1]) + '\n';
              }
              return t.join('').replace(/%20/g, ' ');
            }),
            (e.exports = t),
            (e.exports.diff_match_patch = t),
            (e.exports.DIFF_DELETE = i),
            (e.exports.DIFF_INSERT = 1),
            (e.exports.DIFF_EQUAL = 0);
        },
        208: (e, t, i) => {
          var n,
            s = '__lodash_hash_undefined__',
            r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
            o = /^\w*$/,
            a = /^\./,
            l = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
            h = /\\(\\)?/g,
            c = /^\[object .+?Constructor\]$/,
            u = 'object' == typeof i.g && i.g && i.g.Object === Object && i.g,
            d = 'object' == typeof self && self && self.Object === Object && self,
            f = u || d || Function('return this')(),
            g = Array.prototype,
            p = Function.prototype,
            m = Object.prototype,
            v = f['__core-js_shared__'],
            w = (n = /[^.]+$/.exec((v && v.keys && v.keys.IE_PROTO) || '')) ? 'Symbol(src)_1.' + n : '',
            b = p.toString,
            y = m.hasOwnProperty,
            $ = m.toString,
            S = RegExp(
              '^' +
                b
                  .call(y)
                  .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
                  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') +
                '$'
            ),
            C = f.Symbol,
            x = g.splice,
            k = F(f, 'Map'),
            A = F(Object, 'create'),
            _ = C ? C.prototype : void 0,
            L = _ ? _.toString : void 0;
          function R(e) {
            var t = -1,
              i = e ? e.length : 0;
            for (this.clear(); ++t < i; ) {
              var n = e[t];
              this.set(n[0], n[1]);
            }
          }
          function M(e) {
            var t = -1,
              i = e ? e.length : 0;
            for (this.clear(); ++t < i; ) {
              var n = e[t];
              this.set(n[0], n[1]);
            }
          }
          function E(e) {
            var t = -1,
              i = e ? e.length : 0;
            for (this.clear(); ++t < i; ) {
              var n = e[t];
              this.set(n[0], n[1]);
            }
          }
          function T(e, t) {
            for (var i, n, s = e.length; s--; ) if ((i = e[s][0]) === (n = t) || (i != i && n != n)) return s;
            return -1;
          }
          function O(e, t) {
            var i,
              n,
              s = e.__data__;
            return (
              'string' == (n = typeof (i = t)) || 'number' == n || 'symbol' == n || 'boolean' == n
                ? '__proto__' !== i
                : null === i
            )
              ? s['string' == typeof t ? 'string' : 'hash']
              : s.map;
          }
          function F(e, t) {
            var i = (function (e, t) {
              return null == e ? void 0 : e[t];
            })(e, t);
            return (function (e) {
              if (!B(e) || (w && w in e)) return !1;
              var t =
                (function (e) {
                  var t = B(e) ? $.call(e) : '';
                  return '[object Function]' == t || '[object GeneratorFunction]' == t;
                })(e) ||
                (function (e) {
                  var t = !1;
                  if (null != e && 'function' != typeof e.toString)
                    try {
                      t = !!(e + '');
                    } catch (e) {}
                  return t;
                })(e)
                  ? S
                  : c;
              return t.test(
                (function (e) {
                  if (null != e) {
                    try {
                      return b.call(e);
                    } catch (e) {}
                    try {
                      return e + '';
                    } catch (e) {}
                  }
                  return '';
                })(e)
              );
            })(i)
              ? i
              : void 0;
          }
          (R.prototype.clear = function () {
            this.__data__ = A ? A(null) : {};
          }),
            (R.prototype.delete = function (e) {
              return this.has(e) && delete this.__data__[e];
            }),
            (R.prototype.get = function (e) {
              var t = this.__data__;
              if (A) {
                var i = t[e];
                return i === s ? void 0 : i;
              }
              return y.call(t, e) ? t[e] : void 0;
            }),
            (R.prototype.has = function (e) {
              var t = this.__data__;
              return A ? void 0 !== t[e] : y.call(t, e);
            }),
            (R.prototype.set = function (e, t) {
              return (this.__data__[e] = A && void 0 === t ? s : t), this;
            }),
            (M.prototype.clear = function () {
              this.__data__ = [];
            }),
            (M.prototype.delete = function (e) {
              var t = this.__data__,
                i = T(t, e);
              return !(i < 0 || (i == t.length - 1 ? t.pop() : x.call(t, i, 1), 0));
            }),
            (M.prototype.get = function (e) {
              var t = this.__data__,
                i = T(t, e);
              return i < 0 ? void 0 : t[i][1];
            }),
            (M.prototype.has = function (e) {
              return T(this.__data__, e) > -1;
            }),
            (M.prototype.set = function (e, t) {
              var i = this.__data__,
                n = T(i, e);
              return n < 0 ? i.push([e, t]) : (i[n][1] = t), this;
            }),
            (E.prototype.clear = function () {
              this.__data__ = { hash: new R(), map: new (k || M)(), string: new R() };
            }),
            (E.prototype.delete = function (e) {
              return O(this, e).delete(e);
            }),
            (E.prototype.get = function (e) {
              return O(this, e).get(e);
            }),
            (E.prototype.has = function (e) {
              return O(this, e).has(e);
            }),
            (E.prototype.set = function (e, t) {
              return O(this, e).set(e, t), this;
            });
          var I = D(function (e) {
            var t;
            e =
              null == (t = e)
                ? ''
                : (function (e) {
                    if ('string' == typeof e) return e;
                    if (H(e)) return L ? L.call(e) : '';
                    var t = e + '';
                    return '0' == t && 1 / e == -1 / 0 ? '-0' : t;
                  })(t);
            var i = [];
            return (
              a.test(e) && i.push(''),
              e.replace(l, function (e, t, n, s) {
                i.push(n ? s.replace(h, '$1') : t || e);
              }),
              i
            );
          });
          function P(e) {
            if ('string' == typeof e || H(e)) return e;
            var t = e + '';
            return '0' == t && 1 / e == -1 / 0 ? '-0' : t;
          }
          function D(e, t) {
            if ('function' != typeof e || (t && 'function' != typeof t)) throw new TypeError('Expected a function');
            var i = function () {
              var n = arguments,
                s = t ? t.apply(this, n) : n[0],
                r = i.cache;
              if (r.has(s)) return r.get(s);
              var o = e.apply(this, n);
              return (i.cache = r.set(s, o)), o;
            };
            return (i.cache = new (D.Cache || E)()), i;
          }
          D.Cache = E;
          var W = Array.isArray;
          function B(e) {
            var t = typeof e;
            return !!e && ('object' == t || 'function' == t);
          }
          function H(e) {
            return (
              'symbol' == typeof e ||
              ((function (e) {
                return !!e && 'object' == typeof e;
              })(e) &&
                '[object Symbol]' == $.call(e))
            );
          }
          e.exports = function (e, t, i) {
            var n =
              null == e
                ? void 0
                : (function (e, t) {
                    var i;
                    t = (function (e, t) {
                      if (W(e)) return !1;
                      var i = typeof e;
                      return (
                        !('number' != i && 'symbol' != i && 'boolean' != i && null != e && !H(e)) ||
                        o.test(e) ||
                        !r.test(e) ||
                        (null != t && e in Object(t))
                      );
                    })(t, e)
                      ? [t]
                      : W((i = t))
                      ? i
                      : I(i);
                    for (var n = 0, s = t.length; null != e && n < s; ) e = e[P(t[n++])];
                    return n && n == s ? e : void 0;
                  })(e, t);
            return void 0 === n ? i : n;
          };
        },
        307: (e, t, i) => {
          e = i.nmd(e);
          var n = '__lodash_hash_undefined__',
            s = 9007199254740991,
            r = '[object Arguments]',
            o = '[object Array]',
            a = '[object Boolean]',
            l = '[object Date]',
            h = '[object Error]',
            c = '[object Function]',
            u = '[object Map]',
            d = '[object Number]',
            f = '[object Object]',
            g = '[object Promise]',
            p = '[object RegExp]',
            m = '[object Set]',
            v = '[object String]',
            w = '[object WeakMap]',
            b = '[object ArrayBuffer]',
            y = '[object DataView]',
            $ = /^\[object .+?Constructor\]$/,
            S = /^(?:0|[1-9]\d*)$/,
            C = {};
          (C['[object Float32Array]'] =
            C['[object Float64Array]'] =
            C['[object Int8Array]'] =
            C['[object Int16Array]'] =
            C['[object Int32Array]'] =
            C['[object Uint8Array]'] =
            C['[object Uint8ClampedArray]'] =
            C['[object Uint16Array]'] =
            C['[object Uint32Array]'] =
              !0),
            (C[r] =
              C[o] =
              C[b] =
              C[a] =
              C[y] =
              C[l] =
              C[h] =
              C[c] =
              C[u] =
              C[d] =
              C[f] =
              C[p] =
              C[m] =
              C[v] =
              C[w] =
                !1);
          var x = 'object' == typeof i.g && i.g && i.g.Object === Object && i.g,
            k = 'object' == typeof self && self && self.Object === Object && self,
            A = x || k || Function('return this')(),
            _ = t && !t.nodeType && t,
            L = _ && e && !e.nodeType && e,
            R = L && L.exports === _,
            M = R && x.process,
            E = (function () {
              try {
                return M && M.binding && M.binding('util');
              } catch (e) {}
            })(),
            T = E && E.isTypedArray;
          function O(e, t) {
            for (var i = -1, n = null == e ? 0 : e.length; ++i < n; ) if (t(e[i], i, e)) return !0;
            return !1;
          }
          function F(e) {
            var t = -1,
              i = Array(e.size);
            return (
              e.forEach(function (e, n) {
                i[++t] = [n, e];
              }),
              i
            );
          }
          function I(e) {
            var t = -1,
              i = Array(e.size);
            return (
              e.forEach(function (e) {
                i[++t] = e;
              }),
              i
            );
          }
          var P,
            D,
            W,
            B = Array.prototype,
            H = Function.prototype,
            N = Object.prototype,
            z = A['__core-js_shared__'],
            V = H.toString,
            U = N.hasOwnProperty,
            K = (P = /[^.]+$/.exec((z && z.keys && z.keys.IE_PROTO) || '')) ? 'Symbol(src)_1.' + P : '',
            G = N.toString,
            j = RegExp(
              '^' +
                V.call(U)
                  .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
                  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') +
                '$'
            ),
            q = R ? A.Buffer : void 0,
            Y = A.Symbol,
            X = A.Uint8Array,
            Q = N.propertyIsEnumerable,
            J = B.splice,
            Z = Y ? Y.toStringTag : void 0,
            ee = Object.getOwnPropertySymbols,
            te = q ? q.isBuffer : void 0,
            ie =
              ((D = Object.keys),
              (W = Object),
              function (e) {
                return D(W(e));
              }),
            ne = Le(A, 'DataView'),
            se = Le(A, 'Map'),
            re = Le(A, 'Promise'),
            oe = Le(A, 'Set'),
            ae = Le(A, 'WeakMap'),
            le = Le(Object, 'create'),
            he = Te(ne),
            ce = Te(se),
            ue = Te(re),
            de = Te(oe),
            fe = Te(ae),
            ge = Y ? Y.prototype : void 0,
            pe = ge ? ge.valueOf : void 0;
          function me(e) {
            var t = -1,
              i = null == e ? 0 : e.length;
            for (this.clear(); ++t < i; ) {
              var n = e[t];
              this.set(n[0], n[1]);
            }
          }
          function ve(e) {
            var t = -1,
              i = null == e ? 0 : e.length;
            for (this.clear(); ++t < i; ) {
              var n = e[t];
              this.set(n[0], n[1]);
            }
          }
          function we(e) {
            var t = -1,
              i = null == e ? 0 : e.length;
            for (this.clear(); ++t < i; ) {
              var n = e[t];
              this.set(n[0], n[1]);
            }
          }
          function be(e) {
            var t = -1,
              i = null == e ? 0 : e.length;
            for (this.__data__ = new we(); ++t < i; ) this.add(e[t]);
          }
          function ye(e) {
            var t = (this.__data__ = new ve(e));
            this.size = t.size;
          }
          function $e(e, t) {
            for (var i = e.length; i--; ) if (Oe(e[i][0], t)) return i;
            return -1;
          }
          function Se(e) {
            return null == e
              ? void 0 === e
                ? '[object Undefined]'
                : '[object Null]'
              : Z && Z in Object(e)
              ? (function (e) {
                  var t = U.call(e, Z),
                    i = e[Z];
                  try {
                    e[Z] = void 0;
                    var n = !0;
                  } catch (e) {}
                  var s = G.call(e);
                  return n && (t ? (e[Z] = i) : delete e[Z]), s;
                })(e)
              : (function (e) {
                  return G.call(e);
                })(e);
          }
          function Ce(e) {
            return He(e) && Se(e) == r;
          }
          function xe(e, t, i, n, s) {
            return (
              e === t ||
              (null == e || null == t || (!He(e) && !He(t))
                ? e != e && t != t
                : (function (e, t, i, n, s, c) {
                    var g = Ie(e),
                      w = Ie(t),
                      $ = g ? o : Me(e),
                      S = w ? o : Me(t),
                      C = ($ = $ == r ? f : $) == f,
                      x = (S = S == r ? f : S) == f,
                      k = $ == S;
                    if (k && Pe(e)) {
                      if (!Pe(t)) return !1;
                      (g = !0), (C = !1);
                    }
                    if (k && !C)
                      return (
                        c || (c = new ye()),
                        g || Ne(e)
                          ? ke(e, t, i, n, s, c)
                          : (function (e, t, i, n, s, r, o) {
                              switch (i) {
                                case y:
                                  if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
                                  (e = e.buffer), (t = t.buffer);
                                case b:
                                  return !(e.byteLength != t.byteLength || !r(new X(e), new X(t)));
                                case a:
                                case l:
                                case d:
                                  return Oe(+e, +t);
                                case h:
                                  return e.name == t.name && e.message == t.message;
                                case p:
                                case v:
                                  return e == t + '';
                                case u:
                                  var c = F;
                                case m:
                                  var f = 1 & n;
                                  if ((c || (c = I), e.size != t.size && !f)) return !1;
                                  var g = o.get(e);
                                  if (g) return g == t;
                                  (n |= 2), o.set(e, t);
                                  var w = ke(c(e), c(t), n, s, r, o);
                                  return o.delete(e), w;
                                case '[object Symbol]':
                                  if (pe) return pe.call(e) == pe.call(t);
                              }
                              return !1;
                            })(e, t, $, i, n, s, c)
                      );
                    if (!(1 & i)) {
                      var A = C && U.call(e, '__wrapped__'),
                        _ = x && U.call(t, '__wrapped__');
                      if (A || _) {
                        var L = A ? e.value() : e,
                          R = _ ? t.value() : t;
                        return c || (c = new ye()), s(L, R, i, n, c);
                      }
                    }
                    return (
                      !!k &&
                      (c || (c = new ye()),
                      (function (e, t, i, n, s, r) {
                        var o = 1 & i,
                          a = Ae(e),
                          l = a.length;
                        if (l != Ae(t).length && !o) return !1;
                        for (var h = l; h--; ) {
                          var c = a[h];
                          if (!(o ? c in t : U.call(t, c))) return !1;
                        }
                        var u = r.get(e);
                        if (u && r.get(t)) return u == t;
                        var d = !0;
                        r.set(e, t), r.set(t, e);
                        for (var f = o; ++h < l; ) {
                          var g = e[(c = a[h])],
                            p = t[c];
                          if (n) var m = o ? n(p, g, c, t, e, r) : n(g, p, c, e, t, r);
                          if (!(void 0 === m ? g === p || s(g, p, i, n, r) : m)) {
                            d = !1;
                            break;
                          }
                          f || (f = 'constructor' == c);
                        }
                        if (d && !f) {
                          var v = e.constructor,
                            w = t.constructor;
                          v == w ||
                            !('constructor' in e) ||
                            !('constructor' in t) ||
                            ('function' == typeof v && v instanceof v && 'function' == typeof w && w instanceof w) ||
                            (d = !1);
                        }
                        return r.delete(e), r.delete(t), d;
                      })(e, t, i, n, s, c))
                    );
                  })(e, t, i, n, xe, s))
            );
          }
          function ke(e, t, i, n, s, r) {
            var o = 1 & i,
              a = e.length,
              l = t.length;
            if (a != l && !(o && l > a)) return !1;
            var h = r.get(e);
            if (h && r.get(t)) return h == t;
            var c = -1,
              u = !0,
              d = 2 & i ? new be() : void 0;
            for (r.set(e, t), r.set(t, e); ++c < a; ) {
              var f = e[c],
                g = t[c];
              if (n) var p = o ? n(g, f, c, t, e, r) : n(f, g, c, e, t, r);
              if (void 0 !== p) {
                if (p) continue;
                u = !1;
                break;
              }
              if (d) {
                if (
                  !O(t, function (e, t) {
                    if (((o = t), !d.has(o) && (f === e || s(f, e, i, n, r)))) return d.push(t);
                    var o;
                  })
                ) {
                  u = !1;
                  break;
                }
              } else if (f !== g && !s(f, g, i, n, r)) {
                u = !1;
                break;
              }
            }
            return r.delete(e), r.delete(t), u;
          }
          function Ae(e) {
            return (function (e, t, i) {
              var n = t(e);
              return Ie(e)
                ? n
                : (function (e, t) {
                    for (var i = -1, n = t.length, s = e.length; ++i < n; ) e[s + i] = t[i];
                    return e;
                  })(n, i(e));
            })(e, ze, Re);
          }
          function _e(e, t) {
            var i,
              n,
              s = e.__data__;
            return (
              'string' == (n = typeof (i = t)) || 'number' == n || 'symbol' == n || 'boolean' == n
                ? '__proto__' !== i
                : null === i
            )
              ? s['string' == typeof t ? 'string' : 'hash']
              : s.map;
          }
          function Le(e, t) {
            var i = (function (e, t) {
              return null == e ? void 0 : e[t];
            })(e, t);
            return (function (e) {
              return (
                !(
                  !Be(e) ||
                  (function (e) {
                    return !!K && K in e;
                  })(e)
                ) && (De(e) ? j : $).test(Te(e))
              );
            })(i)
              ? i
              : void 0;
          }
          (me.prototype.clear = function () {
            (this.__data__ = le ? le(null) : {}), (this.size = 0);
          }),
            (me.prototype.delete = function (e) {
              var t = this.has(e) && delete this.__data__[e];
              return (this.size -= t ? 1 : 0), t;
            }),
            (me.prototype.get = function (e) {
              var t = this.__data__;
              if (le) {
                var i = t[e];
                return i === n ? void 0 : i;
              }
              return U.call(t, e) ? t[e] : void 0;
            }),
            (me.prototype.has = function (e) {
              var t = this.__data__;
              return le ? void 0 !== t[e] : U.call(t, e);
            }),
            (me.prototype.set = function (e, t) {
              var i = this.__data__;
              return (this.size += this.has(e) ? 0 : 1), (i[e] = le && void 0 === t ? n : t), this;
            }),
            (ve.prototype.clear = function () {
              (this.__data__ = []), (this.size = 0);
            }),
            (ve.prototype.delete = function (e) {
              var t = this.__data__,
                i = $e(t, e);
              return !(i < 0 || (i == t.length - 1 ? t.pop() : J.call(t, i, 1), --this.size, 0));
            }),
            (ve.prototype.get = function (e) {
              var t = this.__data__,
                i = $e(t, e);
              return i < 0 ? void 0 : t[i][1];
            }),
            (ve.prototype.has = function (e) {
              return $e(this.__data__, e) > -1;
            }),
            (ve.prototype.set = function (e, t) {
              var i = this.__data__,
                n = $e(i, e);
              return n < 0 ? (++this.size, i.push([e, t])) : (i[n][1] = t), this;
            }),
            (we.prototype.clear = function () {
              (this.size = 0), (this.__data__ = { hash: new me(), map: new (se || ve)(), string: new me() });
            }),
            (we.prototype.delete = function (e) {
              var t = _e(this, e).delete(e);
              return (this.size -= t ? 1 : 0), t;
            }),
            (we.prototype.get = function (e) {
              return _e(this, e).get(e);
            }),
            (we.prototype.has = function (e) {
              return _e(this, e).has(e);
            }),
            (we.prototype.set = function (e, t) {
              var i = _e(this, e),
                n = i.size;
              return i.set(e, t), (this.size += i.size == n ? 0 : 1), this;
            }),
            (be.prototype.add = be.prototype.push =
              function (e) {
                return this.__data__.set(e, n), this;
              }),
            (be.prototype.has = function (e) {
              return this.__data__.has(e);
            }),
            (ye.prototype.clear = function () {
              (this.__data__ = new ve()), (this.size = 0);
            }),
            (ye.prototype.delete = function (e) {
              var t = this.__data__,
                i = t.delete(e);
              return (this.size = t.size), i;
            }),
            (ye.prototype.get = function (e) {
              return this.__data__.get(e);
            }),
            (ye.prototype.has = function (e) {
              return this.__data__.has(e);
            }),
            (ye.prototype.set = function (e, t) {
              var i = this.__data__;
              if (i instanceof ve) {
                var n = i.__data__;
                if (!se || n.length < 199) return n.push([e, t]), (this.size = ++i.size), this;
                i = this.__data__ = new we(n);
              }
              return i.set(e, t), (this.size = i.size), this;
            });
          var Re = ee
              ? function (e) {
                  return null == e
                    ? []
                    : ((e = Object(e)),
                      (function (t, i) {
                        for (var n = -1, s = null == t ? 0 : t.length, r = 0, o = []; ++n < s; ) {
                          var a = t[n];
                          (l = a), Q.call(e, l) && (o[r++] = a);
                        }
                        var l;
                        return o;
                      })(ee(e)));
                }
              : function () {
                  return [];
                },
            Me = Se;
          function Ee(e, t) {
            return !!(t = null == t ? s : t) && ('number' == typeof e || S.test(e)) && e > -1 && e % 1 == 0 && e < t;
          }
          function Te(e) {
            if (null != e) {
              try {
                return V.call(e);
              } catch (e) {}
              try {
                return e + '';
              } catch (e) {}
            }
            return '';
          }
          function Oe(e, t) {
            return e === t || (e != e && t != t);
          }
          ((ne && Me(new ne(new ArrayBuffer(1))) != y) ||
            (se && Me(new se()) != u) ||
            (re && Me(re.resolve()) != g) ||
            (oe && Me(new oe()) != m) ||
            (ae && Me(new ae()) != w)) &&
            (Me = function (e) {
              var t = Se(e),
                i = t == f ? e.constructor : void 0,
                n = i ? Te(i) : '';
              if (n)
                switch (n) {
                  case he:
                    return y;
                  case ce:
                    return u;
                  case ue:
                    return g;
                  case de:
                    return m;
                  case fe:
                    return w;
                }
              return t;
            });
          var Fe = Ce(
              (function () {
                return arguments;
              })()
            )
              ? Ce
              : function (e) {
                  return He(e) && U.call(e, 'callee') && !Q.call(e, 'callee');
                },
            Ie = Array.isArray,
            Pe =
              te ||
              function () {
                return !1;
              };
          function De(e) {
            if (!Be(e)) return !1;
            var t = Se(e);
            return (
              t == c || '[object GeneratorFunction]' == t || '[object AsyncFunction]' == t || '[object Proxy]' == t
            );
          }
          function We(e) {
            return 'number' == typeof e && e > -1 && e % 1 == 0 && e <= s;
          }
          function Be(e) {
            var t = typeof e;
            return null != e && ('object' == t || 'function' == t);
          }
          function He(e) {
            return null != e && 'object' == typeof e;
          }
          var Ne = T
            ? (function (e) {
                return function (t) {
                  return e(t);
                };
              })(T)
            : function (e) {
                return He(e) && We(e.length) && !!C[Se(e)];
              };
          function ze(e) {
            return null != (t = e) && We(t.length) && !De(t)
              ? (function (e, t) {
                  var i = Ie(e),
                    n = !i && Fe(e),
                    s = !i && !n && Pe(e),
                    r = !i && !n && !s && Ne(e),
                    o = i || n || s || r,
                    a = o
                      ? (function (e, t) {
                          for (var i = -1, n = Array(e); ++i < e; ) n[i] = t(i);
                          return n;
                        })(e.length, String)
                      : [],
                    l = a.length;
                  for (var h in e)
                    (!t && !U.call(e, h)) ||
                      (o &&
                        ('length' == h ||
                          (s && ('offset' == h || 'parent' == h)) ||
                          (r && ('buffer' == h || 'byteLength' == h || 'byteOffset' == h)) ||
                          Ee(h, l))) ||
                      a.push(h);
                  return a;
                })(e)
              : (function (e) {
                  if (((i = (t = e) && t.constructor), t !== (('function' == typeof i && i.prototype) || N)))
                    return ie(e);
                  var t,
                    i,
                    n = [];
                  for (var s in Object(e)) U.call(e, s) && 'constructor' != s && n.push(s);
                  return n;
                })(e);
            var t;
          }
          e.exports = function (e, t) {
            return xe(e, t);
          };
        },
        418: (e) => {
          'use strict';
          var t = Object.getOwnPropertySymbols,
            i = Object.prototype.hasOwnProperty,
            n = Object.prototype.propertyIsEnumerable;
          function s(e) {
            if (null == e) throw new TypeError('Object.assign cannot be called with null or undefined');
            return Object(e);
          }
          e.exports = (function () {
            try {
              if (!Object.assign) return !1;
              var e = new String('abc');
              if (((e[5] = 'de'), '5' === Object.getOwnPropertyNames(e)[0])) return !1;
              for (var t = {}, i = 0; i < 10; i++) t['_' + String.fromCharCode(i)] = i;
              if (
                '0123456789' !==
                Object.getOwnPropertyNames(t)
                  .map(function (e) {
                    return t[e];
                  })
                  .join('')
              )
                return !1;
              var n = {};
              return (
                'abcdefghijklmnopqrst'.split('').forEach(function (e) {
                  n[e] = e;
                }),
                'abcdefghijklmnopqrst' === Object.keys(Object.assign({}, n)).join('')
              );
            } catch (e) {
              return !1;
            }
          })()
            ? Object.assign
            : function (e, r) {
                for (var o, a, l = s(e), h = 1; h < arguments.length; h++) {
                  for (var c in (o = Object(arguments[h]))) i.call(o, c) && (l[c] = o[c]);
                  if (t) {
                    a = t(o);
                    for (var u = 0; u < a.length; u++) n.call(o, a[u]) && (l[a[u]] = o[a[u]]);
                  }
                }
                return l;
              };
        },
        703: (e, t, i) => {
          'use strict';
          var n = i(414);
          function s() {}
          function r() {}
          (r.resetWarningCache = s),
            (e.exports = function () {
              function e(e, t, i, s, r, o) {
                if (o !== n) {
                  var a = new Error(
                    'Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types'
                  );
                  throw ((a.name = 'Invariant Violation'), a);
                }
              }
              function t() {
                return e;
              }
              e.isRequired = e;
              var i = {
                array: e,
                bigint: e,
                bool: e,
                func: e,
                number: e,
                object: e,
                string: e,
                symbol: e,
                any: e,
                arrayOf: t,
                element: e,
                elementType: e,
                instanceOf: t,
                node: e,
                objectOf: t,
                oneOf: t,
                oneOfType: t,
                shape: t,
                exact: t,
                checkPropTypes: r,
                resetWarningCache: s,
              };
              return (i.PropTypes = i), i;
            });
        },
        697: (e, t, i) => {
          e.exports = i(703)();
        },
        414: (e) => {
          'use strict';
          e.exports = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
        },
        408: (e, t, i) => {
          'use strict';
          var n = i(418),
            s = 'function' == typeof Symbol && Symbol.for,
            r = s ? Symbol.for('react.element') : 60103,
            o = s ? Symbol.for('react.portal') : 60106,
            a = s ? Symbol.for('react.fragment') : 60107,
            l = s ? Symbol.for('react.strict_mode') : 60108,
            h = s ? Symbol.for('react.profiler') : 60114,
            c = s ? Symbol.for('react.provider') : 60109,
            u = s ? Symbol.for('react.context') : 60110,
            d = s ? Symbol.for('react.forward_ref') : 60112,
            f = s ? Symbol.for('react.suspense') : 60113,
            g = s ? Symbol.for('react.memo') : 60115,
            p = s ? Symbol.for('react.lazy') : 60116,
            m = 'function' == typeof Symbol && Symbol.iterator;
          function v(e) {
            for (var t = 'https://reactjs.org/docs/error-decoder.html?invariant=' + e, i = 1; i < arguments.length; i++)
              t += '&args[]=' + encodeURIComponent(arguments[i]);
            return (
              'Minified React error #' +
              e +
              '; visit ' +
              t +
              ' for the full message or use the non-minified dev environment for full errors and additional helpful warnings.'
            );
          }
          var w = {
              isMounted: function () {
                return !1;
              },
              enqueueForceUpdate: function () {},
              enqueueReplaceState: function () {},
              enqueueSetState: function () {},
            },
            b = {};
          function y(e, t, i) {
            (this.props = e), (this.context = t), (this.refs = b), (this.updater = i || w);
          }
          function $() {}
          function S(e, t, i) {
            (this.props = e), (this.context = t), (this.refs = b), (this.updater = i || w);
          }
          (y.prototype.isReactComponent = {}),
            (y.prototype.setState = function (e, t) {
              if ('object' != typeof e && 'function' != typeof e && null != e) throw Error(v(85));
              this.updater.enqueueSetState(this, e, t, 'setState');
            }),
            (y.prototype.forceUpdate = function (e) {
              this.updater.enqueueForceUpdate(this, e, 'forceUpdate');
            }),
            ($.prototype = y.prototype);
          var C = (S.prototype = new $());
          (C.constructor = S), n(C, y.prototype), (C.isPureReactComponent = !0);
          var x = { current: null },
            k = Object.prototype.hasOwnProperty,
            A = { key: !0, ref: !0, __self: !0, __source: !0 };
          function _(e, t, i) {
            var n,
              s = {},
              o = null,
              a = null;
            if (null != t)
              for (n in (void 0 !== t.ref && (a = t.ref), void 0 !== t.key && (o = '' + t.key), t))
                k.call(t, n) && !A.hasOwnProperty(n) && (s[n] = t[n]);
            var l = arguments.length - 2;
            if (1 === l) s.children = i;
            else if (1 < l) {
              for (var h = Array(l), c = 0; c < l; c++) h[c] = arguments[c + 2];
              s.children = h;
            }
            if (e && e.defaultProps) for (n in (l = e.defaultProps)) void 0 === s[n] && (s[n] = l[n]);
            return { $$typeof: r, type: e, key: o, ref: a, props: s, _owner: x.current };
          }
          function L(e) {
            return 'object' == typeof e && null !== e && e.$$typeof === r;
          }
          var R = /\/+/g,
            M = [];
          function E(e, t, i, n) {
            if (M.length) {
              var s = M.pop();
              return (s.result = e), (s.keyPrefix = t), (s.func = i), (s.context = n), (s.count = 0), s;
            }
            return { result: e, keyPrefix: t, func: i, context: n, count: 0 };
          }
          function T(e) {
            (e.result = null),
              (e.keyPrefix = null),
              (e.func = null),
              (e.context = null),
              (e.count = 0),
              10 > M.length && M.push(e);
          }
          function O(e, t, i, n) {
            var s = typeof e;
            ('undefined' !== s && 'boolean' !== s) || (e = null);
            var a = !1;
            if (null === e) a = !0;
            else
              switch (s) {
                case 'string':
                case 'number':
                  a = !0;
                  break;
                case 'object':
                  switch (e.$$typeof) {
                    case r:
                    case o:
                      a = !0;
                  }
              }
            if (a) return i(n, e, '' === t ? '.' + I(e, 0) : t), 1;
            if (((a = 0), (t = '' === t ? '.' : t + ':'), Array.isArray(e)))
              for (var l = 0; l < e.length; l++) {
                var h = t + I((s = e[l]), l);
                a += O(s, h, i, n);
              }
            else if (
              'function' ==
              typeof (h =
                null === e || 'object' != typeof e
                  ? null
                  : 'function' == typeof (h = (m && e[m]) || e['@@iterator'])
                  ? h
                  : null)
            )
              for (e = h.call(e), l = 0; !(s = e.next()).done; ) a += O((s = s.value), (h = t + I(s, l++)), i, n);
            else if ('object' === s)
              throw (
                ((i = '' + e),
                Error(v(31, '[object Object]' === i ? 'object with keys {' + Object.keys(e).join(', ') + '}' : i, '')))
              );
            return a;
          }
          function F(e, t, i) {
            return null == e ? 0 : O(e, '', t, i);
          }
          function I(e, t) {
            return 'object' == typeof e && null !== e && null != e.key
              ? (function (e) {
                  var t = { '=': '=0', ':': '=2' };
                  return (
                    '$' +
                    ('' + e).replace(/[=:]/g, function (e) {
                      return t[e];
                    })
                  );
                })(e.key)
              : t.toString(36);
          }
          function P(e, t) {
            e.func.call(e.context, t, e.count++);
          }
          function D(e, t, i) {
            var n = e.result,
              s = e.keyPrefix;
            (e = e.func.call(e.context, t, e.count++)),
              Array.isArray(e)
                ? W(e, n, i, function (e) {
                    return e;
                  })
                : null != e &&
                  (L(e) &&
                    (e = (function (e, t) {
                      return { $$typeof: r, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner };
                    })(e, s + (!e.key || (t && t.key === e.key) ? '' : ('' + e.key).replace(R, '$&/') + '/') + i)),
                  n.push(e));
          }
          function W(e, t, i, n, s) {
            var r = '';
            null != i && (r = ('' + i).replace(R, '$&/') + '/'), F(e, D, (t = E(t, r, n, s))), T(t);
          }
          var B = { current: null };
          function H() {
            var e = B.current;
            if (null === e) throw Error(v(321));
            return e;
          }
          var N = {
            ReactCurrentDispatcher: B,
            ReactCurrentBatchConfig: { suspense: null },
            ReactCurrentOwner: x,
            IsSomeRendererActing: { current: !1 },
            assign: n,
          };
          (t.Children = {
            map: function (e, t, i) {
              if (null == e) return e;
              var n = [];
              return W(e, n, null, t, i), n;
            },
            forEach: function (e, t, i) {
              if (null == e) return e;
              F(e, P, (t = E(null, null, t, i))), T(t);
            },
            count: function (e) {
              return F(
                e,
                function () {
                  return null;
                },
                null
              );
            },
            toArray: function (e) {
              var t = [];
              return (
                W(e, t, null, function (e) {
                  return e;
                }),
                t
              );
            },
            only: function (e) {
              if (!L(e)) throw Error(v(143));
              return e;
            },
          }),
            (t.Component = y),
            (t.Fragment = a),
            (t.Profiler = h),
            (t.PureComponent = S),
            (t.StrictMode = l),
            (t.Suspense = f),
            (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = N),
            (t.cloneElement = function (e, t, i) {
              if (null == e) throw Error(v(267, e));
              var s = n({}, e.props),
                o = e.key,
                a = e.ref,
                l = e._owner;
              if (null != t) {
                if (
                  (void 0 !== t.ref && ((a = t.ref), (l = x.current)),
                  void 0 !== t.key && (o = '' + t.key),
                  e.type && e.type.defaultProps)
                )
                  var h = e.type.defaultProps;
                for (c in t)
                  k.call(t, c) && !A.hasOwnProperty(c) && (s[c] = void 0 === t[c] && void 0 !== h ? h[c] : t[c]);
              }
              var c = arguments.length - 2;
              if (1 === c) s.children = i;
              else if (1 < c) {
                h = Array(c);
                for (var u = 0; u < c; u++) h[u] = arguments[u + 2];
                s.children = h;
              }
              return { $$typeof: r, type: e.type, key: o, ref: a, props: s, _owner: l };
            }),
            (t.createContext = function (e, t) {
              return (
                void 0 === t && (t = null),
                ((e = {
                  $$typeof: u,
                  _calculateChangedBits: t,
                  _currentValue: e,
                  _currentValue2: e,
                  _threadCount: 0,
                  Provider: null,
                  Consumer: null,
                }).Provider = { $$typeof: c, _context: e }),
                (e.Consumer = e)
              );
            }),
            (t.createElement = _),
            (t.createFactory = function (e) {
              var t = _.bind(null, e);
              return (t.type = e), t;
            }),
            (t.createRef = function () {
              return { current: null };
            }),
            (t.forwardRef = function (e) {
              return { $$typeof: d, render: e };
            }),
            (t.isValidElement = L),
            (t.lazy = function (e) {
              return { $$typeof: p, _ctor: e, _status: -1, _result: null };
            }),
            (t.memo = function (e, t) {
              return { $$typeof: g, type: e, compare: void 0 === t ? null : t };
            }),
            (t.useCallback = function (e, t) {
              return H().useCallback(e, t);
            }),
            (t.useContext = function (e, t) {
              return H().useContext(e, t);
            }),
            (t.useDebugValue = function () {}),
            (t.useEffect = function (e, t) {
              return H().useEffect(e, t);
            }),
            (t.useImperativeHandle = function (e, t, i) {
              return H().useImperativeHandle(e, t, i);
            }),
            (t.useLayoutEffect = function (e, t) {
              return H().useLayoutEffect(e, t);
            }),
            (t.useMemo = function (e, t) {
              return H().useMemo(e, t);
            }),
            (t.useReducer = function (e, t, i) {
              return H().useReducer(e, t, i);
            }),
            (t.useRef = function (e) {
              return H().useRef(e);
            }),
            (t.useState = function (e) {
              return H().useState(e);
            }),
            (t.version = '16.14.0');
        },
        294: (e, t, i) => {
          'use strict';
          e.exports = i(408);
        },
      },
      t = {};
    function i(n) {
      var s = t[n];
      if (void 0 !== s) return s.exports;
      var r = (t[n] = { id: n, loaded: !1, exports: {} });
      return e[n].call(r.exports, r, r.exports, i), (r.loaded = !0), r.exports;
    }
    (i.amdD = function () {
      throw new Error('define cannot be used indirect');
    }),
      (i.g = (function () {
        if ('object' == typeof globalThis) return globalThis;
        try {
          return this || new Function('return this')();
        } catch (e) {
          if ('object' == typeof window) return window;
        }
      })()),
      (i.nmd = (e) => ((e.paths = []), e.children || (e.children = []), e));
    var n = {};
    return (
      (() => {
        'use strict';
        var e = n;
        Object.defineProperty(e, '__esModule', { value: !0 }), (e.diff = e.split = void 0);
        var t = i(515),
          s = i(542);
        e.diff = s.default;
        var r = i(369);
        (e.split = r.default), (e.default = t.default);
      })(),
      n
    );
  })()
);
