import { isValidElementType as Le, typeOf as Me, isElement as Ge } from "react-is";
import ee, { useDebugValue as ye, useContext as de, createElement as Ye, useRef as qe } from "react";
import He from "./index-stylis.browser.esm.js";
import $e from "./index-unitless.browser.esm.js";
import ve from "./index-emotion-is-prop-valid.esm.js";
import Ue from "./index-hoist-non-react-statics.cjs.js";
function A() {
  return (A = Object.assign || function(e) {
    for (var r = 1; r < arguments.length; r++) {
      var t = arguments[r];
      for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
    }
    return e;
  }).apply(this, arguments);
}
var Se = function(e, r) {
  for (var t = [e[0]], n = 0, o = r.length; n < o; n += 1) t.push(r[n], e[n + 1]);
  return t;
}, ae = function(e) {
  return e !== null && typeof e == "object" && (e.toString ? e.toString() : Object.prototype.toString.call(e)) === "[object Object]" && !Me(e);
}, X = Object.freeze([]), I = Object.freeze({});
function G(e) {
  return typeof e == "function";
}
function we(e) {
  return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
}
function pe(e) {
  return e && typeof e.styledComponentId == "string";
}
var z = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", he = typeof window < "u" && "HTMLElement" in window, We = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production")), Ze = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.

`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.

- Are you trying to reuse it across renders?
- Are you accidentally calling collectStyles twice?

`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.

`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!

- Does this error occur on the client and is your target falsy?
- Does this error occur on the server and is the sheet falsy?

`, 5: `The clone method cannot be used on the client!

- Are you running in a client-like environment on the server?
- Are you trying to run SSR on the client?

`, 6: `Trying to insert a new style tag, but the given Node is unmounted!

- Are you using a custom target that isn't mounted?
- Does your document not have a valid head element?
- Have you accidentally removed a style tag manually?

`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.

`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021

`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.

`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.

`, 14: `ThemeProvider: "theme" prop is required.

`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
as for instance in your render method then you may be running into this limitation.

`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
Has styled-components' style tag been unmounted or altered by another script?
` } : {};
function Je() {
  for (var e = arguments.length <= 0 ? void 0 : arguments[0], r = [], t = 1, n = arguments.length; t < n; t += 1) r.push(t < 0 || arguments.length <= t ? void 0 : arguments[t]);
  return r.forEach((function(o) {
    e = e.replace(/%[a-z]/, o);
  })), e;
}
function F(e) {
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) t[n - 1] = arguments[n];
  throw process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://git.io/JUIaE#" + e + " for more information." + (t.length > 0 ? " Args: " + t.join(", ") : "")) : new Error(Je.apply(void 0, [Ze[e]].concat(t)).trim());
}
var Ke = (function() {
  function e(t) {
    this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
  }
  var r = e.prototype;
  return r.indexOfGroup = function(t) {
    for (var n = 0, o = 0; o < t; o++) n += this.groupSizes[o];
    return n;
  }, r.insertRules = function(t, n) {
    if (t >= this.groupSizes.length) {
      for (var o = this.groupSizes, i = o.length, s = i; t >= s; ) (s <<= 1) < 0 && F(16, "" + t);
      this.groupSizes = new Uint32Array(s), this.groupSizes.set(o), this.length = s;
      for (var a = i; a < s; a++) this.groupSizes[a] = 0;
    }
    for (var c = this.indexOfGroup(t + 1), l = 0, g = n.length; l < g; l++) this.tag.insertRule(c, n[l]) && (this.groupSizes[t]++, c++);
  }, r.clearGroup = function(t) {
    if (t < this.length) {
      var n = this.groupSizes[t], o = this.indexOfGroup(t), i = o + n;
      this.groupSizes[t] = 0;
      for (var s = o; s < i; s++) this.tag.deleteRule(o);
    }
  }, r.getGroup = function(t) {
    var n = "";
    if (t >= this.length || this.groupSizes[t] === 0) return n;
    for (var o = this.groupSizes[t], i = this.indexOfGroup(t), s = i + o, a = i; a < s; a++) n += this.tag.getRule(a) + `/*!sc*/
`;
    return n;
  }, e;
})(), K = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), M = 1, W = function(e) {
  if (K.has(e)) return K.get(e);
  for (; Q.has(M); ) M++;
  var r = M++;
  return process.env.NODE_ENV !== "production" && ((0 | r) < 0 || r > 1 << 30) && F(16, "" + r), K.set(e, r), Q.set(r, e), r;
}, Xe = function(e) {
  return Q.get(e);
}, Qe = function(e, r) {
  r >= M && (M = r + 1), K.set(e, r), Q.set(r, e);
}, et = "style[" + z + '][data-styled-version="5.3.10"]', tt = new RegExp("^" + z + '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'), nt = function(e, r, t) {
  for (var n, o = t.split(","), i = 0, s = o.length; i < s; i++) (n = o[i]) && e.registerName(r, n);
}, rt = function(e, r) {
  for (var t = (r.textContent || "").split(`/*!sc*/
`), n = [], o = 0, i = t.length; o < i; o++) {
    var s = t[o].trim();
    if (s) {
      var a = s.match(tt);
      if (a) {
        var c = 0 | parseInt(a[1], 10), l = a[2];
        c !== 0 && (Qe(l, c), nt(e, l, a[3]), e.getTag().insertRules(c, n)), n.length = 0;
      } else n.push(s);
    }
  }
}, ot = function() {
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
}, Ie = function(e) {
  var r = document.head, t = e || r, n = document.createElement("style"), o = (function(a) {
    for (var c = a.childNodes, l = c.length; l >= 0; l--) {
      var g = c[l];
      if (g && g.nodeType === 1 && g.hasAttribute(z)) return g;
    }
  })(t), i = o !== void 0 ? o.nextSibling : null;
  n.setAttribute(z, "active"), n.setAttribute("data-styled-version", "5.3.10");
  var s = ot();
  return s && n.setAttribute("nonce", s), t.insertBefore(n, i), n;
}, st = (function() {
  function e(t) {
    var n = this.element = Ie(t);
    n.appendChild(document.createTextNode("")), this.sheet = (function(o) {
      if (o.sheet) return o.sheet;
      for (var i = document.styleSheets, s = 0, a = i.length; s < a; s++) {
        var c = i[s];
        if (c.ownerNode === o) return c;
      }
      F(17);
    })(n), this.length = 0;
  }
  var r = e.prototype;
  return r.insertRule = function(t, n) {
    try {
      return this.sheet.insertRule(n, t), this.length++, !0;
    } catch {
      return !1;
    }
  }, r.deleteRule = function(t) {
    this.sheet.deleteRule(t), this.length--;
  }, r.getRule = function(t) {
    var n = this.sheet.cssRules[t];
    return n !== void 0 && typeof n.cssText == "string" ? n.cssText : "";
  }, e;
})(), it = (function() {
  function e(t) {
    var n = this.element = Ie(t);
    this.nodes = n.childNodes, this.length = 0;
  }
  var r = e.prototype;
  return r.insertRule = function(t, n) {
    if (t <= this.length && t >= 0) {
      var o = document.createTextNode(n), i = this.nodes[t];
      return this.element.insertBefore(o, i || null), this.length++, !0;
    }
    return !1;
  }, r.deleteRule = function(t) {
    this.element.removeChild(this.nodes[t]), this.length--;
  }, r.getRule = function(t) {
    return t < this.length ? this.nodes[t].textContent : "";
  }, e;
})(), at = (function() {
  function e(t) {
    this.rules = [], this.length = 0;
  }
  var r = e.prototype;
  return r.insertRule = function(t, n) {
    return t <= this.length && (this.rules.splice(t, 0, n), this.length++, !0);
  }, r.deleteRule = function(t) {
    this.rules.splice(t, 1), this.length--;
  }, r.getRule = function(t) {
    return t < this.length ? this.rules[t] : "";
  }, e;
})(), Ee = he, ut = { isServer: !he, useCSSOMInjection: !We }, Re = (function() {
  function e(t, n, o) {
    t === void 0 && (t = I), n === void 0 && (n = {}), this.options = A({}, ut, {}, t), this.gs = n, this.names = new Map(o), this.server = !!t.isServer, !this.server && he && Ee && (Ee = !1, (function(i) {
      for (var s = document.querySelectorAll(et), a = 0, c = s.length; a < c; a++) {
        var l = s[a];
        l && l.getAttribute(z) !== "active" && (rt(i, l), l.parentNode && l.parentNode.removeChild(l));
      }
    })(this));
  }
  e.registerId = function(t) {
    return W(t);
  };
  var r = e.prototype;
  return r.reconstructWithOptions = function(t, n) {
    return n === void 0 && (n = !0), new e(A({}, this.options, {}, t), this.gs, n && this.names || void 0);
  }, r.allocateGSInstance = function(t) {
    return this.gs[t] = (this.gs[t] || 0) + 1;
  }, r.getTag = function() {
    return this.tag || (this.tag = (o = (n = this.options).isServer, i = n.useCSSOMInjection, s = n.target, t = o ? new at(s) : i ? new st(s) : new it(s), new Ke(t)));
    var t, n, o, i, s;
  }, r.hasNameForId = function(t, n) {
    return this.names.has(t) && this.names.get(t).has(n);
  }, r.registerName = function(t, n) {
    if (W(t), this.names.has(t)) this.names.get(t).add(n);
    else {
      var o = /* @__PURE__ */ new Set();
      o.add(n), this.names.set(t, o);
    }
  }, r.insertRules = function(t, n, o) {
    this.registerName(t, n), this.getTag().insertRules(W(t), o);
  }, r.clearNames = function(t) {
    this.names.has(t) && this.names.get(t).clear();
  }, r.clearRules = function(t) {
    this.getTag().clearGroup(W(t)), this.clearNames(t);
  }, r.clearTag = function() {
    this.tag = void 0;
  }, r.toString = function() {
    return (function(t) {
      for (var n = t.getTag(), o = n.length, i = "", s = 0; s < o; s++) {
        var a = Xe(s);
        if (a !== void 0) {
          var c = t.names.get(a), l = n.getGroup(s);
          if (c && l && c.size) {
            var g = z + ".g" + s + '[id="' + a + '"]', f = "";
            c !== void 0 && c.forEach((function(w) {
              w.length > 0 && (f += w + ",");
            })), i += "" + l + g + '{content:"' + f + `"}/*!sc*/
`;
          }
        }
      }
      return i;
    })(this);
  }, e;
})(), ct = /(a)(d)/gi, _e = function(e) {
  return String.fromCharCode(e + (e > 25 ? 39 : 97));
};
function ue(e) {
  var r, t = "";
  for (r = Math.abs(e); r > 52; r = r / 52 | 0) t = _e(r % 52) + t;
  return (_e(r % 52) + t).replace(ct, "$1-$2");
}
var D = function(e, r) {
  for (var t = r.length; t; ) e = 33 * e ^ r.charCodeAt(--t);
  return e;
}, De = function(e) {
  return D(5381, e);
};
function lt(e) {
  for (var r = 0; r < e.length; r += 1) {
    var t = e[r];
    if (G(t) && !pe(t)) return !1;
  }
  return !0;
}
var dt = De("5.3.10"), pt = (function() {
  function e(r, t, n) {
    this.rules = r, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && lt(r), this.componentId = t, this.baseHash = D(dt, t), this.baseStyle = n, Re.registerId(t);
  }
  return e.prototype.generateAndInjectStyles = function(r, t, n) {
    var o = this.componentId, i = [];
    if (this.baseStyle && i.push(this.baseStyle.generateAndInjectStyles(r, t, n)), this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(o, this.staticRulesId)) i.push(this.staticRulesId);
    else {
      var s = B(this.rules, r, t, n).join(""), a = ue(D(this.baseHash, s) >>> 0);
      if (!t.hasNameForId(o, a)) {
        var c = n(s, "." + a, void 0, o);
        t.insertRules(o, a, c);
      }
      i.push(a), this.staticRulesId = a;
    }
    else {
      for (var l = this.rules.length, g = D(this.baseHash, n.hash), f = "", w = 0; w < l; w++) {
        var E = this.rules[w];
        if (typeof E == "string") f += E, process.env.NODE_ENV !== "production" && (g = D(g, E + w));
        else if (E) {
          var p = B(E, r, t, n), h = Array.isArray(p) ? p.join("") : p;
          g = D(g, h + w), f += h;
        }
      }
      if (f) {
        var u = ue(g >>> 0);
        if (!t.hasNameForId(o, u)) {
          var y = n(f, "." + u, void 0, o);
          t.insertRules(o, u, y);
        }
        i.push(u);
      }
    }
    return i.join(" ");
  }, e;
})(), ht = /^\s*\/\/.*$/gm, ft = [":", "[", ".", "#"];
function mt(e) {
  var r, t, n, o, i = I, s = i.options, a = s === void 0 ? I : s, c = i.plugins, l = c === void 0 ? X : c, g = new He(a), f = [], w = /* @__PURE__ */ (function(h) {
    function u(y) {
      if (y) try {
        h(y + "}");
      } catch {
      }
    }
    return function(y, d, S, m, v, N, L, b, C, O) {
      switch (y) {
        case 1:
          if (C === 0 && d.charCodeAt(0) === 64) return h(d + ";"), "";
          break;
        case 2:
          if (b === 0) return d + "/*|*/";
          break;
        case 3:
          switch (b) {
            case 102:
            case 112:
              return h(S[0] + d), "";
            default:
              return d + (O === 0 ? "/*|*/" : "");
          }
        case -2:
          d.split("/*|*/}").forEach(u);
      }
    };
  })((function(h) {
    f.push(h);
  })), E = function(h, u, y) {
    return u === 0 && ft.indexOf(y[t.length]) !== -1 || y.match(o) ? h : "." + r;
  };
  function p(h, u, y, d) {
    d === void 0 && (d = "&");
    var S = h.replace(ht, ""), m = u && y ? y + " " + u + " { " + S + " }" : S;
    return r = d, t = u, n = new RegExp("\\" + t + "\\b", "g"), o = new RegExp("(\\" + t + "\\b){2,}"), g(y || !u ? "" : u, m);
  }
  return g.use([].concat(l, [function(h, u, y) {
    h === 2 && y.length && y[0].lastIndexOf(t) > 0 && (y[0] = y[0].replace(n, E));
  }, w, function(h) {
    if (h === -2) {
      var u = f;
      return f = [], u;
    }
  }])), p.hash = l.length ? l.reduce((function(h, u) {
    return u.name || F(15), D(h, u.name);
  }), 5381).toString() : "", p;
}
var Oe = ee.createContext();
Oe.Consumer;
var je = ee.createContext(), gt = (je.Consumer, new Re()), ce = mt();
function yt() {
  return de(Oe) || gt;
}
function vt() {
  return de(je) || ce;
}
var St = (function() {
  function e(r, t) {
    var n = this;
    this.inject = function(o, i) {
      i === void 0 && (i = ce);
      var s = n.name + i.hash;
      o.hasNameForId(n.id, s) || o.insertRules(n.id, s, i(n.rules, s, "@keyframes"));
    }, this.toString = function() {
      return F(12, String(n.name));
    }, this.name = r, this.id = "sc-keyframes-" + r, this.rules = t;
  }
  return e.prototype.getName = function(r) {
    return r === void 0 && (r = ce), this.name + r.hash;
  }, e;
})(), wt = /([A-Z])/, Et = /([A-Z])/g, _t = /^ms-/, bt = function(e) {
  return "-" + e.toLowerCase();
};
function be(e) {
  return wt.test(e) ? e.replace(Et, bt).replace(_t, "-ms-") : e;
}
var Ae = function(e) {
  return e == null || e === !1 || e === "";
};
function B(e, r, t, n) {
  if (Array.isArray(e)) {
    for (var o, i = [], s = 0, a = e.length; s < a; s += 1) (o = B(e[s], r, t, n)) !== "" && (Array.isArray(o) ? i.push.apply(i, o) : i.push(o));
    return i;
  }
  if (Ae(e)) return "";
  if (pe(e)) return "." + e.styledComponentId;
  if (G(e)) {
    if (typeof (l = e) != "function" || l.prototype && l.prototype.isReactComponent || !r) return e;
    var c = e(r);
    return process.env.NODE_ENV !== "production" && Ge(c), B(c, r, t, n);
  }
  var l;
  return e instanceof St ? t ? (e.inject(t, n), e.getName(n)) : e : ae(e) ? (function g(f, w) {
    var E, p, h = [];
    for (var u in f) f.hasOwnProperty(u) && !Ae(f[u]) && (Array.isArray(f[u]) && f[u].isCss || G(f[u]) ? h.push(be(u) + ":", f[u], ";") : ae(f[u]) ? h.push.apply(h, g(f[u], u)) : h.push(be(u) + ": " + (E = u, (p = f[u]) == null || typeof p == "boolean" || p === "" ? "" : typeof p != "number" || p === 0 || E in $e || E.startsWith("--") ? String(p).trim() : p + "px") + ";"));
    return w ? [w + " {"].concat(h, ["}"]) : h;
  })(e) : e.toString();
}
var Ne = function(e) {
  return Array.isArray(e) && (e.isCss = !0), e;
};
function At(e) {
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) t[n - 1] = arguments[n];
  return G(e) || ae(e) ? Ne(B(Se(X, [e].concat(t)))) : t.length === 0 && e.length === 1 && typeof e[0] == "string" ? e : Ne(B(Se(e, t)));
}
var Ce = /invalid hook call/i, Z = /* @__PURE__ */ new Set(), Nt = function(e, r) {
  if (process.env.NODE_ENV !== "production") {
    var t = "The component " + e + (r ? ' with the id of "' + r + '"' : "") + ` has been created dynamically.
You may see this warning because you've called styled inside another component.
To resolve this only create new StyledComponents outside of any render method and function component.`, n = console.error;
    try {
      var o = !0;
      console.error = function(i) {
        if (Ce.test(i)) o = !1, Z.delete(t);
        else {
          for (var s = arguments.length, a = new Array(s > 1 ? s - 1 : 0), c = 1; c < s; c++) a[c - 1] = arguments[c];
          n.apply(void 0, [i].concat(a));
        }
      }, qe(), o && !Z.has(t) && Z.add(t);
    } catch (i) {
      Ce.test(i.message) && Z.delete(t);
    } finally {
      console.error = n;
    }
  }
}, Ct = function(e, r, t) {
  return t === void 0 && (t = I), e.theme !== t.theme && e.theme || r || t.theme;
}, Pt = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, It = /(^-|-$)/g;
function se(e) {
  return e.replace(Pt, "-").replace(It, "");
}
var Rt = function(e) {
  return ue(De(e) >>> 0);
};
function J(e) {
  return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
}
var le = function(e) {
  return typeof e == "function" || typeof e == "object" && e !== null && !Array.isArray(e);
}, Dt = function(e) {
  return e !== "__proto__" && e !== "constructor" && e !== "prototype";
};
function Ot(e, r, t) {
  var n = e[t];
  le(r) && le(n) ? Te(n, r) : e[t] = r;
}
function Te(e) {
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) t[n - 1] = arguments[n];
  for (var o = 0, i = t; o < i.length; o++) {
    var s = i[o];
    if (le(s)) for (var a in s) Dt(a) && Ot(e, s[a], a);
  }
  return e;
}
var ke = ee.createContext();
ke.Consumer;
var ie = {};
function xe(e, r, t) {
  var n = pe(e), o = !J(e), i = r.attrs, s = i === void 0 ? X : i, a = r.componentId, c = a === void 0 ? (function(d, S) {
    var m = typeof d != "string" ? "sc" : se(d);
    ie[m] = (ie[m] || 0) + 1;
    var v = m + "-" + Rt("5.3.10" + m + ie[m]);
    return S ? S + "-" + v : v;
  })(r.displayName, r.parentComponentId) : a, l = r.displayName, g = l === void 0 ? (function(d) {
    return J(d) ? "styled." + d : "Styled(" + we(d) + ")";
  })(e) : l, f = r.displayName && r.componentId ? se(r.displayName) + "-" + r.componentId : r.componentId || c, w = n && e.attrs ? Array.prototype.concat(e.attrs, s).filter(Boolean) : s, E = r.shouldForwardProp;
  n && e.shouldForwardProp && (E = r.shouldForwardProp ? function(d, S, m) {
    return e.shouldForwardProp(d, S, m) && r.shouldForwardProp(d, S, m);
  } : e.shouldForwardProp);
  var p, h = new pt(t, f, n ? e.componentStyle : void 0), u = h.isStatic && s.length === 0, y = function(d, S) {
    return (function(m, v, N, L) {
      var b = m.attrs, C = m.componentStyle, O = m.defaultProps, Y = m.foldedComponentIds, fe = m.shouldForwardProp, te = m.styledComponentId, Ve = m.target;
      process.env.NODE_ENV !== "production" && ye(te);
      var me = (function(T, q, oe) {
        T === void 0 && (T = I);
        var k = A({}, q, { theme: T }), x = {};
        return oe.forEach((function(H) {
          var _, $, U, V = H;
          for (_ in G(V) && (V = V(k)), V) k[_] = x[_] = _ === "className" ? ($ = x[_], U = V[_], $ && U ? $ + " " + U : $ || U) : V[_];
        })), [k, x];
      })(Ct(v, de(ke), O) || I, v, b), ze = me[0], R = me[1], ge = (function(T, q, oe, k) {
        var x = yt(), H = vt(), _ = q ? T.generateAndInjectStyles(I, x, H) : T.generateAndInjectStyles(oe, x, H);
        return process.env.NODE_ENV !== "production" && ye(_), process.env.NODE_ENV !== "production" && !q && k && k(_), _;
      })(C, L, ze, process.env.NODE_ENV !== "production" ? m.warnTooManyClasses : void 0), Be = N, ne = R.$as || v.$as || R.as || v.as || Ve, Fe = J(ne), re = R !== v ? A({}, v, {}, R) : v, j = {};
      for (var P in re) P[0] !== "$" && P !== "as" && (P === "forwardedAs" ? j.as = re[P] : (fe ? fe(P, ve, ne) : !Fe || ve(P)) && (j[P] = re[P]));
      return v.style && R.style !== v.style && (j.style = A({}, v.style, {}, R.style)), j.className = Array.prototype.concat(Y, te, ge !== te ? ge : null, v.className, R.className).filter(Boolean).join(" "), j.ref = Be, Ye(ne, j);
    })(p, d, S, u);
  };
  return y.displayName = g, (p = ee.forwardRef(y)).attrs = w, p.componentStyle = h, p.displayName = g, p.shouldForwardProp = E, p.foldedComponentIds = n ? Array.prototype.concat(e.foldedComponentIds, e.styledComponentId) : X, p.styledComponentId = f, p.target = n ? e.target : e, p.withComponent = function(d) {
    var S = r.componentId, m = (function(N, L) {
      if (N == null) return {};
      var b, C, O = {}, Y = Object.keys(N);
      for (C = 0; C < Y.length; C++) b = Y[C], L.indexOf(b) >= 0 || (O[b] = N[b]);
      return O;
    })(r, ["componentId"]), v = S && S + "-" + (J(d) ? d : se(we(d)));
    return xe(d, A({}, m, { attrs: w, componentId: v }), t);
  }, Object.defineProperty(p, "defaultProps", { get: function() {
    return this._foldedDefaultProps;
  }, set: function(d) {
    this._foldedDefaultProps = n ? Te({}, e.defaultProps, d) : d;
  } }), process.env.NODE_ENV !== "production" && (Nt(g, f), p.warnTooManyClasses = /* @__PURE__ */ (function(d, S) {
    var m = {}, v = !1;
    return function(N) {
      if (!v && (m[N] = !0, Object.keys(m).length >= 200)) {
        var L = S ? ' with the id of "' + S + '"' : "";
        v = !0, m = {};
      }
    };
  })(g, f)), Object.defineProperty(p, "toString", { value: function() {
    return "." + p.styledComponentId;
  } }), o && Ue(p, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0, withComponent: !0 }), p;
}
var Pe = function(e) {
  return (function r(t, n, o) {
    if (o === void 0 && (o = I), !Le(n)) return F(1, String(n));
    var i = function() {
      return t(n, o, At.apply(void 0, arguments));
    };
    return i.withConfig = function(s) {
      return r(t, n, A({}, o, {}, s));
    }, i.attrs = function(s) {
      return r(t, n, A({}, o, { attrs: Array.prototype.concat(o.attrs, s).filter(Boolean) }));
    }, i;
  })(xe, e);
};
["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "textPath", "tspan"].forEach((function(e) {
  Pe[e] = Pe(e);
}));
process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window["__styled-components-init__"] = window["__styled-components-init__"] || 0, window["__styled-components-init__"], window["__styled-components-init__"] += 1);
export {
  Oe as StyleSheetContext,
  ke as ThemeContext,
  At as css,
  Pe as default,
  pe as isStyledComponent
};
