import { commonjsGlobal as h } from "./accelbyte-widgets656.mjs";
import { __module as b, exports as A } from "./accelbyte-widgets628.mjs";
(function(y, j) {
  (function(f, r) {
    r();
  })(h, function() {
    function f(e, t) {
      return typeof t > "u" ? t = { autoBom: !1 } : typeof t != "object" && (console.warn("Deprecated: Expected third argument to be a object"), t = { autoBom: !t }), t.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
    }
    function r(e, t, i) {
      var o = new XMLHttpRequest();
      o.open("GET", e), o.responseType = "blob", o.onload = function() {
        l(o.response, t, i);
      }, o.onerror = function() {
        console.error("could not download file");
      }, o.send();
    }
    function p(e) {
      var t = new XMLHttpRequest();
      t.open("HEAD", e, !1);
      try {
        t.send();
      } catch {
      }
      return 200 <= t.status && 299 >= t.status;
    }
    function c(e) {
      try {
        e.dispatchEvent(new MouseEvent("click"));
      } catch {
        var t = document.createEvent("MouseEvents");
        t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
      }
    }
    var a = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof window == "object" && window.global === window ? window : void 0, w = a.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), l = a.saveAs || (typeof window != "object" || window !== a ? function() {
    } : "download" in HTMLAnchorElement.prototype && !w ? function(e, t, i) {
      var o = a.URL || a.webkitURL, n = document.createElement("a");
      t = t || e.name || "download", n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin === location.origin ? c(n) : p(n.href) ? r(e, t, i) : c(n, n.target = "_blank")) : (n.href = o.createObjectURL(e), setTimeout(function() {
        o.revokeObjectURL(n.href);
      }, 4e4), setTimeout(function() {
        c(n);
      }, 0));
    } : "msSaveOrOpenBlob" in navigator ? function(e, t, i) {
      if (t = t || e.name || "download", typeof e != "string")
        navigator.msSaveOrOpenBlob(f(e, i), t);
      else if (p(e))
        r(e, t, i);
      else {
        var o = document.createElement("a");
        o.href = e, o.target = "_blank", setTimeout(function() {
          c(o);
        });
      }
    } : function(e, t, i, o) {
      if (o = o || open("", "_blank"), o && (o.document.title = o.document.body.innerText = "downloading..."), typeof e == "string")
        return r(e, t, i);
      var n = e.type === "application/octet-stream", E = /constructor/i.test(a.HTMLElement) || a.safari, v = /CriOS\/[\d]+/.test(navigator.userAgent);
      if ((v || n && E || w) && typeof FileReader < "u") {
        var u = new FileReader();
        u.onloadend = function() {
          var s = u.result;
          s = v ? s : s.replace(/^data:[^;]*;/, "data:attachment/file;"), o ? o.location.href = s : location = s, o = null;
        }, u.readAsDataURL(e);
      } else {
        var m = a.URL || a.webkitURL, d = m.createObjectURL(e);
        o ? o.location = d : location.href = d, o = null, setTimeout(function() {
          m.revokeObjectURL(d);
        }, 4e4);
      }
    });
    a.saveAs = l.saveAs = l, y.exports = l;
  });
})(b);
export {
  A as default
};
