function c() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function d() {
  return i() && typeof window < "u" && window !== null;
}
async function f(n, t) {
  const o = await fetch(n, t), e = o.headers.get("content-type"), [r] = (e ?? "").split(/ ?; ?/);
  if (o.status > 299)
    throw new Error("Not found");
  if (!["image/svg+xml", "text/plain"].some((s) => r.includes(s)))
    throw new Error(`Content type isn't valid: ${r}`);
  return o.text();
}
function a(n = 1) {
  return new Promise((t) => {
    setTimeout(t, n * 1e3);
  });
}
function i() {
  if (!document)
    return !1;
  const n = document.createElement("div");
  n.innerHTML = "<svg />";
  const t = n.firstChild;
  return !!t && t.namespaceURI === "http://www.w3.org/2000/svg";
}
function u(n) {
  return n[Math.floor(Math.random() * n.length)];
}
function l(n) {
  const t = "abcdefghijklmnopqrstuvwxyz", e = `${t}${t.toUpperCase()}1234567890`;
  let r = "";
  for (let s = 0; s < n; s++)
    r += u(e);
  return r;
}
function w(n, ...t) {
  const o = {};
  for (const e in n)
    ({}).hasOwnProperty.call(n, e) && (t.includes(e) || (o[e] = n[e]));
  return o;
}
export {
  c as canUseDOM,
  d as isSupportedEnvironment,
  w as omit,
  l as randomString,
  f as request,
  a as sleep,
  i as supportsInlineSVG
};
