import { d as q } from "./vendor.js";
var l = { exports: {} }, w;
function E() {
  if (w) return l.exports;
  w = 1;
  var c = {}, z = new RegExp([
    "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)",
    "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)",
    "(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)",
    "(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?",
    "(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))",
    "(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",
    `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`
  ].join(""), "i"), d = [
    "style",
    "variant",
    "weight",
    "size",
    "lineHeight",
    "family"
  ], j = /([\.0-9]+)(.*)/, h = function(e, t, s) {
    var u = e.match(j);
    if (u) {
      e = parseFloat(u[1]);
      var f = u[2].toLowerCase().trim(), r = Math.round(e);
      switch (r === e && (e = r), f) {
        case "em":
          return t === null ? void 0 : e * t;
        case "px":
          return e;
        case "pt":
          return e / (72 / s);
        case "pc":
          return e / (6 / s);
        case "mm":
          return e * (s / 25.4);
        case "cm":
          return e * (s / 2.54);
        case "in":
          return e * s;
        case "%":
          return t === null ? void 0 : t * (e / 100);
      }
    }
  }, g = {
    size: h,
    lineHeight: h
  }, x = {
    serif: 1,
    "sans-serif": 1,
    cursive: 1,
    fantasy: 1,
    monospace: 1
  }, C = l.exports = function(e, t, s) {
    var u = e + "-" + (t || "null") + "@" + s;
    if (s = s || 96, typeof c[u] < "u")
      return c[u];
    if (t && (t = C(t, null, s)), e === "inherit")
      return t;
    var f = z.exec(e);
    if (!f) {
      c[u] = null;
      return;
    }
    f.shift();
    for (var r = {}, m = 0; m < f.length; m++) {
      var o = d[m], n = f[m];
      if (g[o] && n) {
        var H = t && t[o] || null, y = g[o](n, H, s);
        typeof y > "u" && o === "lineHeight" && n ? n = r.size * parseFloat(n) : n = y;
      }
      if (!(!n || n === "normal")) {
        if (n === "inherit") {
          if (!t)
            return;
          n = t[o];
        }
        n.trim && (n = n.trim()), r[o] = n;
      }
    }
    Object.keys(r).length || (r = null), c[u] = r;
    var a = [];
    r.style && a.push(r.style), r.variant && a.push(r.variant), r.weight && r.weight !== "400" && r.weight !== "normal" && a.push(r.weight), a.push(r.size + "px"), r.lineHeight && (a[a.length - 1] += "/" + r.lineHeight + "px");
    var b = r.family.split(",");
    return r.family = b.map(function(i) {
      return i = i.trim(), x[i.toLowerCase()] && (i = i.toLowerCase()), i;
    }), a.push(r.family), Object.defineProperty(r, "toString", {
      value: function() {
        return a.map(function(i) {
          return Array.isArray(i) ? i.map(function(p) {
            return p.indexOf(" ") > -1 ? '"' + p.replace(/["']/g, "") + '"' : p;
          }).join(", ") : i;
        }).join(" ");
      }
    }), r;
  };
  return l.exports.generics = x, l.exports;
}
var F = E();
const O = /* @__PURE__ */ q(F);
export {
  O as p
};
