import { c as e, g as o } from "./alasql-f59e855e.js";
var n, t, l, r = { exports: {} };
t = e, l = function() {
  var e2 = function() {
  }, o2 = "undefined", n2 = typeof window !== o2 && typeof window.navigator !== o2 && /Trident\/|MSIE /.test(window.navigator.userAgent), t2 = ["trace", "debug", "info", "warn", "error"], l2 = {}, r2 = null;
  function i2(e3, o3) {
    var n3 = e3[o3];
    if ("function" == typeof n3.bind)
      return n3.bind(e3);
    try {
      return Function.prototype.bind.call(n3, e3);
    } catch (o4) {
      return function() {
        return Function.prototype.apply.apply(n3, [e3, arguments]);
      };
    }
  }
  function c() {
    console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments]));
  }
  function a() {
    for (var n3 = this.getLevel(), l3 = 0; l3 < t2.length; l3++) {
      var r3 = t2[l3];
      this[r3] = l3 < n3 ? e2 : this.methodFactory(r3, n3, this.name);
    }
    if (this.log = this.debug, typeof console === o2 && n3 < this.levels.SILENT)
      return "No console available for logging";
  }
  function s(e3) {
    return function() {
      typeof console !== o2 && (a.call(this), this[e3].apply(this, arguments));
    };
  }
  function u(t3, l3, r3) {
    return function(t4) {
      return "debug" === t4 && (t4 = "log"), typeof console !== o2 && ("trace" === t4 && n2 ? c : void 0 !== console[t4] ? i2(console, t4) : void 0 !== console.log ? i2(console, "log") : e2);
    }(t3) || s.apply(this, arguments);
  }
  function f(e3, n3) {
    var i3, c2, s2, f2 = this, p2 = "loglevel";
    function d() {
      var e4;
      if (typeof window !== o2 && p2) {
        try {
          e4 = window.localStorage[p2];
        } catch (e5) {
        }
        if (typeof e4 === o2)
          try {
            var n4 = window.document.cookie, t3 = encodeURIComponent(p2), l3 = n4.indexOf(t3 + "=");
            -1 !== l3 && (e4 = /^([^;]+)/.exec(n4.slice(l3 + t3.length + 1))[1]);
          } catch (e5) {
          }
        return void 0 === f2.levels[e4] && (e4 = void 0), e4;
      }
    }
    function v(e4) {
      var o3 = e4;
      if ("string" == typeof o3 && void 0 !== f2.levels[o3.toUpperCase()] && (o3 = f2.levels[o3.toUpperCase()]), "number" == typeof o3 && o3 >= 0 && o3 <= f2.levels.SILENT)
        return o3;
      throw new TypeError("log.setLevel() called with invalid level: " + e4);
    }
    "string" == typeof e3 ? p2 += ":" + e3 : "symbol" == typeof e3 && (p2 = void 0), f2.name = e3, f2.levels = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4, SILENT: 5 }, f2.methodFactory = n3 || u, f2.getLevel = function() {
      return null != s2 ? s2 : null != c2 ? c2 : i3;
    }, f2.setLevel = function(e4, n4) {
      return s2 = v(e4), false !== n4 && function(e5) {
        var n5 = (t2[e5] || "silent").toUpperCase();
        if (typeof window !== o2 && p2) {
          try {
            return void (window.localStorage[p2] = n5);
          } catch (e6) {
          }
          try {
            window.document.cookie = encodeURIComponent(p2) + "=" + n5 + ";";
          } catch (e6) {
          }
        }
      }(s2), a.call(f2);
    }, f2.setDefaultLevel = function(e4) {
      c2 = v(e4), d() || f2.setLevel(e4, false);
    }, f2.resetLevel = function() {
      s2 = null, function() {
        if (typeof window !== o2 && p2) {
          try {
            window.localStorage.removeItem(p2);
          } catch (e4) {
          }
          try {
            window.document.cookie = encodeURIComponent(p2) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
          } catch (e4) {
          }
        }
      }(), a.call(f2);
    }, f2.enableAll = function(e4) {
      f2.setLevel(f2.levels.TRACE, e4);
    }, f2.disableAll = function(e4) {
      f2.setLevel(f2.levels.SILENT, e4);
    }, f2.rebuild = function() {
      if (r2 !== f2 && (i3 = v(r2.getLevel())), a.call(f2), r2 === f2)
        for (var e4 in l2)
          l2[e4].rebuild();
    }, i3 = v(r2 ? r2.getLevel() : "WARN");
    var g = d();
    null != g && (s2 = v(g)), a.call(f2);
  }
  (r2 = new f()).getLogger = function(e3) {
    if ("symbol" != typeof e3 && "string" != typeof e3 || "" === e3)
      throw new TypeError("You must supply a name when creating a logger.");
    var o3 = l2[e3];
    return o3 || (o3 = l2[e3] = new f(e3, r2.methodFactory)), o3;
  };
  var p = typeof window !== o2 ? window.log : void 0;
  return r2.noConflict = function() {
    return typeof window !== o2 && window.log === r2 && (window.log = p), r2;
  }, r2.getLoggers = function() {
    return l2;
  }, r2.default = r2, r2;
}, (n = r).exports ? n.exports = l() : t.log = l();
const i = o(r.exports);
export {
  i as l
};
