UNPKG

iobroker.vis-2

Version:

Next generation graphical user interface for ioBroker.

3,114 lines 102 kB
import { n as nested, u as useTheme$1, __tla as __tla_0 } from "./ThemeProvider-LAR_JlEp.js";
import { b as __mf_21, c as __mf_29, d as __mf_10, e as __mf_31, h as __mf_24, s as __mf_11, g as __mf_14, n as __mf_9, __tla as __tla_1 } from "./iobroker_vis__loadShare__react__loadShare__.js-QKtVi7r1.js";
import { b as _inheritsLoose, c as _assertThisInitialized, a as _extends, _ as _objectWithoutPropertiesLoose } from "./assertThisInitialized-DtkDSj7h.js";
import { j as jsxRuntimeExports, __tla as __tla_2 } from "./jsx-runtime-DXKJPqi2.js";
import { __tla as __tla_3 } from "./iobroker_vis__loadShare__prop_mf_2_types__loadShare__.js-OoAqYupB.js";
import { a as capitalize, d as deepmerge, c as clsx, __tla as __tla_4 } from "./clsx-DKpeWZFz.js";
import { __tla as __tla_5 } from "./ThemeProvider-LAR_JlEp.js";
import { T } from "./ThemeProvider-LAR_JlEp.js";
let ServerStyleSheets, StylesContext, StylesProvider, createGenerateClassName, createStyles, getThemeProps, jssPreset, makeStyles, mergeClasses, propsToClassKey, defaultSheetsManager, styled, useTheme, useThemeVariants, withStyles, withTheme, withThemeCreator;
let __tla = Promise.all([
  (() => {
    try {
      return __tla_0;
    } catch {
    }
  })(),
  (() => {
    try {
      return __tla_1;
    } catch {
    }
  })(),
  (() => {
    try {
      return __tla_2;
    } catch {
    }
  })(),
  (() => {
    try {
      return __tla_3;
    } catch {
    }
  })(),
  (() => {
    try {
      return __tla_4;
    } catch {
    }
  })(),
  (() => {
    try {
      return __tla_5;
    } catch {
    }
  })()
]).then(async () => {
  function getDefaultExportFromCjs(x2) {
    return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
  }
  const stateClasses = [
    "checked",
    "disabled",
    "error",
    "focused",
    "focusVisible",
    "required",
    "expanded",
    "selected"
  ];
  createGenerateClassName = function(options = {}) {
    const { disableGlobal = false, productionPrefix = "jss", seed = "" } = options;
    const seedPrefix = seed === "" ? "" : `${seed}-`;
    let ruleCounter = 0;
    const getNextCounterId = () => {
      ruleCounter += 1;
      return ruleCounter;
    };
    return (rule, styleSheet) => {
      const name = styleSheet.options.name;
      if (name && name.startsWith("Mui") && !styleSheet.options.link && !disableGlobal) {
        if (stateClasses.includes(rule.key)) {
          return `Mui-${rule.key}`;
        }
        const prefix2 = `${seedPrefix}${name}-${rule.key}`;
        if (!styleSheet.options.theme[nested] || seed !== "") {
          return prefix2;
        }
        return `${prefix2}-${getNextCounterId()}`;
      }
      {
        return `${seedPrefix}${productionPrefix}${getNextCounterId()}`;
      }
    };
  };
  createStyles = function(styles) {
    return styles;
  };
  getThemeProps = function(params) {
    const { theme, name, props } = params;
    if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
      return props;
    }
    const output = {
      ...props
    };
    const defaultProps = theme.components[name].defaultProps;
    let propName;
    for (propName in defaultProps) {
      if (output[propName] === void 0) {
        output[propName] = defaultProps[propName];
      }
    }
    return output;
  };
  var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
    return typeof obj;
  } : function(obj) {
    return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  };
  var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === "object" && document.nodeType === 9;
  function _typeof(o) {
    "@babel/helpers - typeof";
    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
      return typeof o2;
    } : function(o2) {
      return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
    }, _typeof(o);
  }
  function toPrimitive(t2, r2) {
    if ("object" != _typeof(t2) || !t2) return t2;
    var e2 = t2[Symbol.toPrimitive];
    if (void 0 !== e2) {
      var i = e2.call(t2, r2);
      if ("object" != _typeof(i)) return i;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return String(t2);
  }
  function toPropertyKey(t2) {
    var i = toPrimitive(t2, "string");
    return "symbol" == _typeof(i) ? i : i + "";
  }
  function _defineProperties(e2, r2) {
    for (var t2 = 0; t2 < r2.length; t2++) {
      var o = r2[t2];
      o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e2, toPropertyKey(o.key), o);
    }
  }
  function _createClass(e2, r2, t2) {
    return r2 && _defineProperties(e2.prototype, r2), Object.defineProperty(e2, "prototype", {
      writable: false
    }), e2;
  }
  var plainObjectConstrurctor = {}.constructor;
  function cloneStyle(style2) {
    if (style2 == null || typeof style2 !== "object") return style2;
    if (Array.isArray(style2)) return style2.map(cloneStyle);
    if (style2.constructor !== plainObjectConstrurctor) return style2;
    var newStyle = {};
    for (var name in style2) {
      newStyle[name] = cloneStyle(style2[name]);
    }
    return newStyle;
  }
  function createRule(name, decl, options) {
    if (name === void 0) {
      name = "unnamed";
    }
    var jss = options.jss;
    var declCopy = cloneStyle(decl);
    var rule = jss.plugins.onCreateRule(name, declCopy, options);
    if (rule) return rule;
    if (name[0] === "@") ;
    return null;
  }
  var join = function join2(value, by) {
    var result = "";
    for (var i = 0; i < value.length; i++) {
      if (value[i] === "!important") break;
      if (result) result += by;
      result += value[i];
    }
    return result;
  };
  var toCssValue = function toCssValue2(value) {
    if (!Array.isArray(value)) return value;
    var cssValue = "";
    if (Array.isArray(value[0])) {
      for (var i = 0; i < value.length; i++) {
        if (value[i] === "!important") break;
        if (cssValue) cssValue += ", ";
        cssValue += join(value[i], " ");
      }
    } else cssValue = join(value, ", ");
    if (value[value.length - 1] === "!important") {
      cssValue += " !important";
    }
    return cssValue;
  };
  function getWhitespaceSymbols(options) {
    if (options && options.format === false) {
      return {
        linebreak: "",
        space: ""
      };
    }
    return {
      linebreak: "\n",
      space: " "
    };
  }
  function indentStr(str, indent) {
    var result = "";
    for (var index2 = 0; index2 < indent; index2++) {
      result += "  ";
    }
    return result + str;
  }
  function toCss(selector, style2, options) {
    if (options === void 0) {
      options = {};
    }
    var result = "";
    if (!style2) return result;
    var _options = options, _options$indent = _options.indent, indent = _options$indent === void 0 ? 0 : _options$indent;
    var fallbacks = style2.fallbacks;
    if (options.format === false) {
      indent = -Infinity;
    }
    var _getWhitespaceSymbols = getWhitespaceSymbols(options), linebreak = _getWhitespaceSymbols.linebreak, space = _getWhitespaceSymbols.space;
    if (selector) indent++;
    if (fallbacks) {
      if (Array.isArray(fallbacks)) {
        for (var index2 = 0; index2 < fallbacks.length; index2++) {
          var fallback = fallbacks[index2];
          for (var prop in fallback) {
            var value = fallback[prop];
            if (value != null) {
              if (result) result += linebreak;
              result += indentStr(prop + ":" + space + toCssValue(value) + ";", indent);
            }
          }
        }
      } else {
        for (var _prop in fallbacks) {
          var _value = fallbacks[_prop];
          if (_value != null) {
            if (result) result += linebreak;
            result += indentStr(_prop + ":" + space + toCssValue(_value) + ";", indent);
          }
        }
      }
    }
    for (var _prop2 in style2) {
      var _value2 = style2[_prop2];
      if (_value2 != null && _prop2 !== "fallbacks") {
        if (result) result += linebreak;
        result += indentStr(_prop2 + ":" + space + toCssValue(_value2) + ";", indent);
      }
    }
    if (!result && !options.allowEmpty) return result;
    if (!selector) return result;
    indent--;
    if (result) result = "" + linebreak + result + linebreak;
    return indentStr("" + selector + space + "{" + result, indent) + indentStr("}", indent);
  }
  var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
  var nativeEscape = typeof CSS !== "undefined" && CSS.escape;
  var escape = (function(str) {
    return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, "\\$1");
  });
  var BaseStyleRule = (function() {
    function BaseStyleRule2(key2, style2, options) {
      this.type = "style";
      this.isProcessed = false;
      var sheet = options.sheet, Renderer = options.Renderer;
      this.key = key2;
      this.options = options;
      this.style = style2;
      if (sheet) this.renderer = sheet.renderer;
      else if (Renderer) this.renderer = new Renderer();
    }
    var _proto = BaseStyleRule2.prototype;
    _proto.prop = function prop(name, value, options) {
      if (value === void 0) return this.style[name];
      var force = options ? options.force : false;
      if (!force && this.style[name] === value) return this;
      var newValue = value;
      if (!options || options.process !== false) {
        newValue = this.options.jss.plugins.onChangeValue(value, name, this);
      }
      var isEmpty2 = newValue == null || newValue === false;
      var isDefined = name in this.style;
      if (isEmpty2 && !isDefined && !force) return this;
      var remove = isEmpty2 && isDefined;
      if (remove) delete this.style[name];
      else this.style[name] = newValue;
      if (this.renderable && this.renderer) {
        if (remove) this.renderer.removeProperty(this.renderable, name);
        else this.renderer.setProperty(this.renderable, name, newValue);
        return this;
      }
      var sheet = this.options.sheet;
      if (sheet && sheet.attached) ;
      return this;
    };
    return BaseStyleRule2;
  })();
  var StyleRule = (function(_BaseStyleRule) {
    _inheritsLoose(StyleRule2, _BaseStyleRule);
    function StyleRule2(key2, style2, options) {
      var _this;
      _this = _BaseStyleRule.call(this, key2, style2, options) || this;
      var selector = options.selector, scoped = options.scoped, sheet = options.sheet, generateId = options.generateId;
      if (selector) {
        _this.selectorText = selector;
      } else if (scoped !== false) {
        _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);
        _this.selectorText = "." + escape(_this.id);
      }
      return _this;
    }
    var _proto2 = StyleRule2.prototype;
    _proto2.applyTo = function applyTo(renderable) {
      var renderer = this.renderer;
      if (renderer) {
        var json = this.toJSON();
        for (var prop in json) {
          renderer.setProperty(renderable, prop, json[prop]);
        }
      }
      return this;
    };
    _proto2.toJSON = function toJSON() {
      var json = {};
      for (var prop in this.style) {
        var value = this.style[prop];
        if (typeof value !== "object") json[prop] = value;
        else if (Array.isArray(value)) json[prop] = toCssValue(value);
      }
      return json;
    };
    _proto2.toString = function toString(options) {
      var sheet = this.options.sheet;
      var link = sheet ? sheet.options.link : false;
      var opts = link ? _extends({}, options, {
        allowEmpty: true
      }) : options;
      return toCss(this.selectorText, this.style, opts);
    };
    _createClass(StyleRule2, [
      {
        key: "selector",
        set: function set(selector) {
          if (selector === this.selectorText) return;
          this.selectorText = selector;
          var renderer = this.renderer, renderable = this.renderable;
          if (!renderable || !renderer) return;
          var hasChanged = renderer.setSelector(renderable, selector);
          if (!hasChanged) {
            renderer.replaceRule(renderable, this);
          }
        },
        get: function get() {
          return this.selectorText;
        }
      }
    ]);
    return StyleRule2;
  })(BaseStyleRule);
  var pluginStyleRule = {
    onCreateRule: function onCreateRule(key2, style2, options) {
      if (key2[0] === "@" || options.parent && options.parent.type === "keyframes") {
        return null;
      }
      return new StyleRule(key2, style2, options);
    }
  };
  var defaultToStringOptions = {
    indent: 1,
    children: true
  };
  var atRegExp = /@([\w-]+)/;
  var ConditionalRule = (function() {
    function ConditionalRule2(key2, styles, options) {
      this.type = "conditional";
      this.isProcessed = false;
      this.key = key2;
      var atMatch = key2.match(atRegExp);
      this.at = atMatch ? atMatch[1] : "unknown";
      this.query = options.name || "@" + this.at;
      this.options = options;
      this.rules = new RuleList(_extends({}, options, {
        parent: this
      }));
      for (var name in styles) {
        this.rules.add(name, styles[name]);
      }
      this.rules.process();
    }
    var _proto = ConditionalRule2.prototype;
    _proto.getRule = function getRule(name) {
      return this.rules.get(name);
    };
    _proto.indexOf = function indexOf(rule) {
      return this.rules.indexOf(rule);
    };
    _proto.addRule = function addRule(name, style2, options) {
      var rule = this.rules.add(name, style2, options);
      if (!rule) return null;
      this.options.jss.plugins.onProcessRule(rule);
      return rule;
    };
    _proto.replaceRule = function replaceRule(name, style2, options) {
      var newRule = this.rules.replace(name, style2, options);
      if (newRule) this.options.jss.plugins.onProcessRule(newRule);
      return newRule;
    };
    _proto.toString = function toString(options) {
      if (options === void 0) {
        options = defaultToStringOptions;
      }
      var _getWhitespaceSymbols = getWhitespaceSymbols(options), linebreak = _getWhitespaceSymbols.linebreak;
      if (options.indent == null) options.indent = defaultToStringOptions.indent;
      if (options.children == null) options.children = defaultToStringOptions.children;
      if (options.children === false) {
        return this.query + " {}";
      }
      var children = this.rules.toString(options);
      return children ? this.query + " {" + linebreak + children + linebreak + "}" : "";
    };
    return ConditionalRule2;
  })();
  var keyRegExp = /@container|@media|@supports\s+/;
  var pluginConditionalRule = {
    onCreateRule: function onCreateRule2(key2, styles, options) {
      return keyRegExp.test(key2) ? new ConditionalRule(key2, styles, options) : null;
    }
  };
  var defaultToStringOptions$1 = {
    indent: 1,
    children: true
  };
  var nameRegExp = /@keyframes\s+([\w-]+)/;
  var KeyframesRule = (function() {
    function KeyframesRule2(key2, frames, options) {
      this.type = "keyframes";
      this.at = "@keyframes";
      this.isProcessed = false;
      var nameMatch = key2.match(nameRegExp);
      if (nameMatch && nameMatch[1]) {
        this.name = nameMatch[1];
      } else {
        this.name = "noname";
      }
      this.key = this.type + "-" + this.name;
      this.options = options;
      var scoped = options.scoped, sheet = options.sheet, generateId = options.generateId;
      this.id = scoped === false ? this.name : escape(generateId(this, sheet));
      this.rules = new RuleList(_extends({}, options, {
        parent: this
      }));
      for (var name in frames) {
        this.rules.add(name, frames[name], _extends({}, options, {
          parent: this
        }));
      }
      this.rules.process();
    }
    var _proto = KeyframesRule2.prototype;
    _proto.toString = function toString(options) {
      if (options === void 0) {
        options = defaultToStringOptions$1;
      }
      var _getWhitespaceSymbols = getWhitespaceSymbols(options), linebreak = _getWhitespaceSymbols.linebreak;
      if (options.indent == null) options.indent = defaultToStringOptions$1.indent;
      if (options.children == null) options.children = defaultToStringOptions$1.children;
      if (options.children === false) {
        return this.at + " " + this.id + " {}";
      }
      var children = this.rules.toString(options);
      if (children) children = "" + linebreak + children + linebreak;
      return this.at + " " + this.id + " {" + children + "}";
    };
    return KeyframesRule2;
  })();
  var keyRegExp$1 = /@keyframes\s+/;
  var refRegExp$1 = /\$([\w-]+)/g;
  var findReferencedKeyframe = function findReferencedKeyframe2(val, keyframes) {
    if (typeof val === "string") {
      return val.replace(refRegExp$1, function(match, name) {
        if (name in keyframes) {
          return keyframes[name];
        }
        return match;
      });
    }
    return val;
  };
  var replaceRef = function replaceRef2(style2, prop, keyframes) {
    var value = style2[prop];
    var refKeyframe = findReferencedKeyframe(value, keyframes);
    if (refKeyframe !== value) {
      style2[prop] = refKeyframe;
    }
  };
  var pluginKeyframesRule = {
    onCreateRule: function onCreateRule3(key2, frames, options) {
      return typeof key2 === "string" && keyRegExp$1.test(key2) ? new KeyframesRule(key2, frames, options) : null;
    },
    onProcessStyle: function onProcessStyle(style2, rule, sheet) {
      if (rule.type !== "style" || !sheet) return style2;
      if ("animation-name" in style2) replaceRef(style2, "animation-name", sheet.keyframes);
      if ("animation" in style2) replaceRef(style2, "animation", sheet.keyframes);
      return style2;
    },
    onChangeValue: function onChangeValue(val, prop, rule) {
      var sheet = rule.options.sheet;
      if (!sheet) {
        return val;
      }
      switch (prop) {
        case "animation":
          return findReferencedKeyframe(val, sheet.keyframes);
        case "animation-name":
          return findReferencedKeyframe(val, sheet.keyframes);
        default:
          return val;
      }
    }
  };
  var KeyframeRule = (function(_BaseStyleRule) {
    _inheritsLoose(KeyframeRule2, _BaseStyleRule);
    function KeyframeRule2() {
      return _BaseStyleRule.apply(this, arguments) || this;
    }
    var _proto = KeyframeRule2.prototype;
    _proto.toString = function toString(options) {
      var sheet = this.options.sheet;
      var link = sheet ? sheet.options.link : false;
      var opts = link ? _extends({}, options, {
        allowEmpty: true
      }) : options;
      return toCss(this.key, this.style, opts);
    };
    return KeyframeRule2;
  })(BaseStyleRule);
  var pluginKeyframeRule = {
    onCreateRule: function onCreateRule4(key2, style2, options) {
      if (options.parent && options.parent.type === "keyframes") {
        return new KeyframeRule(key2, style2, options);
      }
      return null;
    }
  };
  var FontFaceRule = (function() {
    function FontFaceRule2(key2, style2, options) {
      this.type = "font-face";
      this.at = "@font-face";
      this.isProcessed = false;
      this.key = key2;
      this.style = style2;
      this.options = options;
    }
    var _proto = FontFaceRule2.prototype;
    _proto.toString = function toString(options) {
      var _getWhitespaceSymbols = getWhitespaceSymbols(options), linebreak = _getWhitespaceSymbols.linebreak;
      if (Array.isArray(this.style)) {
        var str = "";
        for (var index2 = 0; index2 < this.style.length; index2++) {
          str += toCss(this.at, this.style[index2]);
          if (this.style[index2 + 1]) str += linebreak;
        }
        return str;
      }
      return toCss(this.at, this.style, options);
    };
    return FontFaceRule2;
  })();
  var keyRegExp$2 = /@font-face/;
  var pluginFontFaceRule = {
    onCreateRule: function onCreateRule5(key2, style2, options) {
      return keyRegExp$2.test(key2) ? new FontFaceRule(key2, style2, options) : null;
    }
  };
  var ViewportRule = (function() {
    function ViewportRule2(key2, style2, options) {
      this.type = "viewport";
      this.at = "@viewport";
      this.isProcessed = false;
      this.key = key2;
      this.style = style2;
      this.options = options;
    }
    var _proto = ViewportRule2.prototype;
    _proto.toString = function toString(options) {
      return toCss(this.key, this.style, options);
    };
    return ViewportRule2;
  })();
  var pluginViewportRule = {
    onCreateRule: function onCreateRule6(key2, style2, options) {
      return key2 === "@viewport" || key2 === "@-ms-viewport" ? new ViewportRule(key2, style2, options) : null;
    }
  };
  var SimpleRule = (function() {
    function SimpleRule2(key2, value, options) {
      this.type = "simple";
      this.isProcessed = false;
      this.key = key2;
      this.value = value;
      this.options = options;
    }
    var _proto = SimpleRule2.prototype;
    _proto.toString = function toString(options) {
      if (Array.isArray(this.value)) {
        var str = "";
        for (var index2 = 0; index2 < this.value.length; index2++) {
          str += this.key + " " + this.value[index2] + ";";
          if (this.value[index2 + 1]) str += "\n";
        }
        return str;
      }
      return this.key + " " + this.value + ";";
    };
    return SimpleRule2;
  })();
  var keysMap = {
    "@charset": true,
    "@import": true,
    "@namespace": true
  };
  var pluginSimpleRule = {
    onCreateRule: function onCreateRule7(key2, value, options) {
      return key2 in keysMap ? new SimpleRule(key2, value, options) : null;
    }
  };
  var plugins$1 = [
    pluginStyleRule,
    pluginConditionalRule,
    pluginKeyframesRule,
    pluginKeyframeRule,
    pluginFontFaceRule,
    pluginViewportRule,
    pluginSimpleRule
  ];
  var defaultUpdateOptions = {
    process: true
  };
  var forceUpdateOptions = {
    force: true,
    process: true
  };
  var RuleList = (function() {
    function RuleList2(options) {
      this.map = {};
      this.raw = {};
      this.index = [];
      this.counter = 0;
      this.options = options;
      this.classes = options.classes;
      this.keyframes = options.keyframes;
    }
    var _proto = RuleList2.prototype;
    _proto.add = function add(name, decl, ruleOptions) {
      var _this$options = this.options, parent = _this$options.parent, sheet = _this$options.sheet, jss = _this$options.jss, Renderer = _this$options.Renderer, generateId = _this$options.generateId, scoped = _this$options.scoped;
      var options = _extends({
        classes: this.classes,
        parent,
        sheet,
        jss,
        Renderer,
        generateId,
        scoped,
        name,
        keyframes: this.keyframes,
        selector: void 0
      }, ruleOptions);
      var key2 = name;
      if (name in this.raw) {
        key2 = name + "-d" + this.counter++;
      }
      this.raw[key2] = decl;
      if (key2 in this.classes) {
        options.selector = "." + escape(this.classes[key2]);
      }
      var rule = createRule(key2, decl, options);
      if (!rule) return null;
      this.register(rule);
      var index2 = options.index === void 0 ? this.index.length : options.index;
      this.index.splice(index2, 0, rule);
      return rule;
    };
    _proto.replace = function replace(name, decl, ruleOptions) {
      var oldRule = this.get(name);
      var oldIndex = this.index.indexOf(oldRule);
      if (oldRule) {
        this.remove(oldRule);
      }
      var options = ruleOptions;
      if (oldIndex !== -1) options = _extends({}, ruleOptions, {
        index: oldIndex
      });
      return this.add(name, decl, options);
    };
    _proto.get = function get(nameOrSelector) {
      return this.map[nameOrSelector];
    };
    _proto.remove = function remove(rule) {
      this.unregister(rule);
      delete this.raw[rule.key];
      this.index.splice(this.index.indexOf(rule), 1);
    };
    _proto.indexOf = function indexOf(rule) {
      return this.index.indexOf(rule);
    };
    _proto.process = function process2() {
      var plugins2 = this.options.jss.plugins;
      this.index.slice(0).forEach(plugins2.onProcessRule, plugins2);
    };
    _proto.register = function register(rule) {
      this.map[rule.key] = rule;
      if (rule instanceof StyleRule) {
        this.map[rule.selector] = rule;
        if (rule.id) this.classes[rule.key] = rule.id;
      } else if (rule instanceof KeyframesRule && this.keyframes) {
        this.keyframes[rule.name] = rule.id;
      }
    };
    _proto.unregister = function unregister(rule) {
      delete this.map[rule.key];
      if (rule instanceof StyleRule) {
        delete this.map[rule.selector];
        delete this.classes[rule.key];
      } else if (rule instanceof KeyframesRule) {
        delete this.keyframes[rule.name];
      }
    };
    _proto.update = function update2() {
      var name;
      var data;
      var options;
      if (typeof (arguments.length <= 0 ? void 0 : arguments[0]) === "string") {
        name = arguments.length <= 0 ? void 0 : arguments[0];
        data = arguments.length <= 1 ? void 0 : arguments[1];
        options = arguments.length <= 2 ? void 0 : arguments[2];
      } else {
        data = arguments.length <= 0 ? void 0 : arguments[0];
        options = arguments.length <= 1 ? void 0 : arguments[1];
        name = null;
      }
      if (name) {
        this.updateOne(this.get(name), data, options);
      } else {
        for (var index2 = 0; index2 < this.index.length; index2++) {
          this.updateOne(this.index[index2], data, options);
        }
      }
    };
    _proto.updateOne = function updateOne(rule, data, options) {
      if (options === void 0) {
        options = defaultUpdateOptions;
      }
      var _this$options2 = this.options, plugins2 = _this$options2.jss.plugins, sheet = _this$options2.sheet;
      if (rule.rules instanceof RuleList2) {
        rule.rules.update(data, options);
        return;
      }
      var style2 = rule.style;
      plugins2.onUpdate(data, rule, sheet, options);
      if (options.process && style2 && style2 !== rule.style) {
        plugins2.onProcessStyle(rule.style, rule, sheet);
        for (var prop in rule.style) {
          var nextValue = rule.style[prop];
          var prevValue = style2[prop];
          if (nextValue !== prevValue) {
            rule.prop(prop, nextValue, forceUpdateOptions);
          }
        }
        for (var _prop in style2) {
          var _nextValue = rule.style[_prop];
          var _prevValue = style2[_prop];
          if (_nextValue == null && _nextValue !== _prevValue) {
            rule.prop(_prop, null, forceUpdateOptions);
          }
        }
      }
    };
    _proto.toString = function toString(options) {
      var str = "";
      var sheet = this.options.sheet;
      var link = sheet ? sheet.options.link : false;
      var _getWhitespaceSymbols = getWhitespaceSymbols(options), linebreak = _getWhitespaceSymbols.linebreak;
      for (var index2 = 0; index2 < this.index.length; index2++) {
        var rule = this.index[index2];
        var css2 = rule.toString(options);
        if (!css2 && !link) continue;
        if (str) str += linebreak;
        str += css2;
      }
      return str;
    };
    return RuleList2;
  })();
  var StyleSheet = (function() {
    function StyleSheet2(styles, options) {
      this.attached = false;
      this.deployed = false;
      this.classes = {};
      this.keyframes = {};
      this.options = _extends({}, options, {
        sheet: this,
        parent: this,
        classes: this.classes,
        keyframes: this.keyframes
      });
      if (options.Renderer) {
        this.renderer = new options.Renderer(this);
      }
      this.rules = new RuleList(this.options);
      for (var name in styles) {
        this.rules.add(name, styles[name]);
      }
      this.rules.process();
    }
    var _proto = StyleSheet2.prototype;
    _proto.attach = function attach2() {
      if (this.attached) return this;
      if (this.renderer) this.renderer.attach();
      this.attached = true;
      if (!this.deployed) this.deploy();
      return this;
    };
    _proto.detach = function detach2() {
      if (!this.attached) return this;
      if (this.renderer) this.renderer.detach();
      this.attached = false;
      return this;
    };
    _proto.addRule = function addRule(name, decl, options) {
      var queue = this.queue;
      if (this.attached && !queue) this.queue = [];
      var rule = this.rules.add(name, decl, options);
      if (!rule) return null;
      this.options.jss.plugins.onProcessRule(rule);
      if (this.attached) {
        if (!this.deployed) return rule;
        if (queue) queue.push(rule);
        else {
          this.insertRule(rule);
          if (this.queue) {
            this.queue.forEach(this.insertRule, this);
            this.queue = void 0;
          }
        }
        return rule;
      }
      this.deployed = false;
      return rule;
    };
    _proto.replaceRule = function replaceRule(nameOrSelector, decl, options) {
      var oldRule = this.rules.get(nameOrSelector);
      if (!oldRule) return this.addRule(nameOrSelector, decl, options);
      var newRule = this.rules.replace(nameOrSelector, decl, options);
      if (newRule) {
        this.options.jss.plugins.onProcessRule(newRule);
      }
      if (this.attached) {
        if (!this.deployed) return newRule;
        if (this.renderer) {
          if (!newRule) {
            this.renderer.deleteRule(oldRule);
          } else if (oldRule.renderable) {
            this.renderer.replaceRule(oldRule.renderable, newRule);
          }
        }
        return newRule;
      }
      this.deployed = false;
      return newRule;
    };
    _proto.insertRule = function insertRule2(rule) {
      if (this.renderer) {
        this.renderer.insertRule(rule);
      }
    };
    _proto.addRules = function addRules(styles, options) {
      var added = [];
      for (var name in styles) {
        var rule = this.addRule(name, styles[name], options);
        if (rule) added.push(rule);
      }
      return added;
    };
    _proto.getRule = function getRule(nameOrSelector) {
      return this.rules.get(nameOrSelector);
    };
    _proto.deleteRule = function deleteRule(name) {
      var rule = typeof name === "object" ? name : this.rules.get(name);
      if (!rule || this.attached && !rule.renderable) {
        return false;
      }
      this.rules.remove(rule);
      if (this.attached && rule.renderable && this.renderer) {
        return this.renderer.deleteRule(rule.renderable);
      }
      return true;
    };
    _proto.indexOf = function indexOf(rule) {
      return this.rules.indexOf(rule);
    };
    _proto.deploy = function deploy() {
      if (this.renderer) this.renderer.deploy();
      this.deployed = true;
      return this;
    };
    _proto.update = function update2() {
      var _this$rules;
      (_this$rules = this.rules).update.apply(_this$rules, arguments);
      return this;
    };
    _proto.updateOne = function updateOne(rule, data, options) {
      this.rules.updateOne(rule, data, options);
      return this;
    };
    _proto.toString = function toString(options) {
      return this.rules.toString(options);
    };
    return StyleSheet2;
  })();
  var PluginsRegistry = (function() {
    function PluginsRegistry2() {
      this.plugins = {
        internal: [],
        external: []
      };
      this.registry = {};
    }
    var _proto = PluginsRegistry2.prototype;
    _proto.onCreateRule = function onCreateRule8(name, decl, options) {
      for (var i = 0; i < this.registry.onCreateRule.length; i++) {
        var rule = this.registry.onCreateRule[i](name, decl, options);
        if (rule) return rule;
      }
      return null;
    };
    _proto.onProcessRule = function onProcessRule(rule) {
      if (rule.isProcessed) return;
      var sheet = rule.options.sheet;
      for (var i = 0; i < this.registry.onProcessRule.length; i++) {
        this.registry.onProcessRule[i](rule, sheet);
      }
      if (rule.style) this.onProcessStyle(rule.style, rule, sheet);
      rule.isProcessed = true;
    };
    _proto.onProcessStyle = function onProcessStyle2(style2, rule, sheet) {
      for (var i = 0; i < this.registry.onProcessStyle.length; i++) {
        rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);
      }
    };
    _proto.onProcessSheet = function onProcessSheet(sheet) {
      for (var i = 0; i < this.registry.onProcessSheet.length; i++) {
        this.registry.onProcessSheet[i](sheet);
      }
    };
    _proto.onUpdate = function onUpdate(data, rule, sheet, options) {
      for (var i = 0; i < this.registry.onUpdate.length; i++) {
        this.registry.onUpdate[i](data, rule, sheet, options);
      }
    };
    _proto.onChangeValue = function onChangeValue2(value, prop, rule) {
      var processedValue = value;
      for (var i = 0; i < this.registry.onChangeValue.length; i++) {
        processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);
      }
      return processedValue;
    };
    _proto.use = function use(newPlugin, options) {
      if (options === void 0) {
        options = {
          queue: "external"
        };
      }
      var plugins2 = this.plugins[options.queue];
      if (plugins2.indexOf(newPlugin) !== -1) {
        return;
      }
      plugins2.push(newPlugin);
      this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function(registry, plugin) {
        for (var name in plugin) {
          if (name in registry) {
            registry[name].push(plugin[name]);
          }
        }
        return registry;
      }, {
        onCreateRule: [],
        onProcessRule: [],
        onProcessStyle: [],
        onProcessSheet: [],
        onChangeValue: [],
        onUpdate: []
      });
    };
    return PluginsRegistry2;
  })();
  var SheetsRegistry = (function() {
    function SheetsRegistry2() {
      this.registry = [];
    }
    var _proto = SheetsRegistry2.prototype;
    _proto.add = function add(sheet) {
      var registry = this.registry;
      var index2 = sheet.options.index;
      if (registry.indexOf(sheet) !== -1) return;
      if (registry.length === 0 || index2 >= this.index) {
        registry.push(sheet);
        return;
      }
      for (var i = 0; i < registry.length; i++) {
        if (registry[i].options.index > index2) {
          registry.splice(i, 0, sheet);
          return;
        }
      }
    };
    _proto.reset = function reset() {
      this.registry = [];
    };
    _proto.remove = function remove(sheet) {
      var index2 = this.registry.indexOf(sheet);
      this.registry.splice(index2, 1);
    };
    _proto.toString = function toString(_temp) {
      var _ref = _temp === void 0 ? {} : _temp, attached = _ref.attached, options = _objectWithoutPropertiesLoose(_ref, [
        "attached"
      ]);
      var _getWhitespaceSymbols = getWhitespaceSymbols(options), linebreak = _getWhitespaceSymbols.linebreak;
      var css2 = "";
      for (var i = 0; i < this.registry.length; i++) {
        var sheet = this.registry[i];
        if (attached != null && sheet.attached !== attached) {
          continue;
        }
        if (css2) css2 += linebreak;
        css2 += sheet.toString(options);
      }
      return css2;
    };
    _createClass(SheetsRegistry2, [
      {
        key: "index",
        get: function get() {
          return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;
        }
      }
    ]);
    return SheetsRegistry2;
  })();
  var sheets = new SheetsRegistry();
  var globalThis$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" && window.Math === Math ? window : typeof self !== "undefined" && self.Math === Math ? self : Function("return this")();
  var ns = "2f1acc6c3a606b082e5eef5e54414ffb";
  if (globalThis$1[ns] == null) globalThis$1[ns] = 0;
  var moduleId = globalThis$1[ns]++;
  var createGenerateId = function createGenerateId2(options) {
    if (options === void 0) {
      options = {};
    }
    var ruleCounter = 0;
    var generateId = function generateId2(rule, sheet) {
      ruleCounter += 1;
      var jssId = "";
      var prefix2 = "";
      if (sheet) {
        if (sheet.options.classNamePrefix) {
          prefix2 = sheet.options.classNamePrefix;
        }
        if (sheet.options.jss.id != null) {
          jssId = String(sheet.options.jss.id);
        }
      }
      if (options.minify) {
        return "" + (prefix2 || "c") + moduleId + jssId + ruleCounter;
      }
      return prefix2 + rule.key + "-" + moduleId + (jssId ? "-" + jssId : "") + "-" + ruleCounter;
    };
    return generateId;
  };
  var memoize = function memoize2(fn) {
    var value;
    return function() {
      if (!value) value = fn();
      return value;
    };
  };
  var getPropertyValue = function getPropertyValue2(cssRule, prop) {
    try {
      if (cssRule.attributeStyleMap) {
        return cssRule.attributeStyleMap.get(prop);
      }
      return cssRule.style.getPropertyValue(prop);
    } catch (err) {
      return "";
    }
  };
  var setProperty = function setProperty2(cssRule, prop, value) {
    try {
      var cssValue = value;
      if (Array.isArray(value)) {
        cssValue = toCssValue(value);
      }
      if (cssRule.attributeStyleMap) {
        cssRule.attributeStyleMap.set(prop, cssValue);
      } else {
        var indexOfImportantFlag = cssValue ? cssValue.indexOf("!important") : -1;
        var cssValueWithoutImportantFlag = indexOfImportantFlag > -1 ? cssValue.substr(0, indexOfImportantFlag - 1) : cssValue;
        cssRule.style.setProperty(prop, cssValueWithoutImportantFlag, indexOfImportantFlag > -1 ? "important" : "");
      }
    } catch (err) {
      return false;
    }
    return true;
  };
  var removeProperty = function removeProperty2(cssRule, prop) {
    try {
      if (cssRule.attributeStyleMap) {
        cssRule.attributeStyleMap.delete(prop);
      } else {
        cssRule.style.removeProperty(prop);
      }
    } catch (err) {
    }
  };
  var setSelector = function setSelector2(cssRule, selectorText) {
    cssRule.selectorText = selectorText;
    return cssRule.selectorText === selectorText;
  };
  var getHead = memoize(function() {
    return document.querySelector("head");
  });
  function findHigherSheet(registry, options) {
    for (var i = 0; i < registry.length; i++) {
      var sheet = registry[i];
      if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {
        return sheet;
      }
    }
    return null;
  }
  function findHighestSheet(registry, options) {
    for (var i = registry.length - 1; i >= 0; i--) {
      var sheet = registry[i];
      if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {
        return sheet;
      }
    }
    return null;
  }
  function findCommentNode(text) {
    var head = getHead();
    for (var i = 0; i < head.childNodes.length; i++) {
      var node = head.childNodes[i];
      if (node.nodeType === 8 && node.nodeValue.trim() === text) {
        return node;
      }
    }
    return null;
  }
  function findPrevNode(options) {
    var registry = sheets.registry;
    if (registry.length > 0) {
      var sheet = findHigherSheet(registry, options);
      if (sheet && sheet.renderer) {
        return {
          parent: sheet.renderer.element.parentNode,
          node: sheet.renderer.element
        };
      }
      sheet = findHighestSheet(registry, options);
      if (sheet && sheet.renderer) {
        return {
          parent: sheet.renderer.element.parentNode,
          node: sheet.renderer.element.nextSibling
        };
      }
    }
    var insertionPoint = options.insertionPoint;
    if (insertionPoint && typeof insertionPoint === "string") {
      var comment = findCommentNode(insertionPoint);
      if (comment) {
        return {
          parent: comment.parentNode,
          node: comment.nextSibling
        };
      }
    }
    return false;
  }
  function insertStyle(style2, options) {
    var insertionPoint = options.insertionPoint;
    var nextNode = findPrevNode(options);
    if (nextNode !== false && nextNode.parent) {
      nextNode.parent.insertBefore(style2, nextNode.node);
      return;
    }
    if (insertionPoint && typeof insertionPoint.nodeType === "number") {
      var insertionPointElement = insertionPoint;
      var parentNode = insertionPointElement.parentNode;
      if (parentNode) parentNode.insertBefore(style2, insertionPointElement.nextSibling);
      return;
    }
    getHead().appendChild(style2);
  }
  var getNonce = memoize(function() {
    var node = document.querySelector('meta[property="csp-nonce"]');
    return node ? node.getAttribute("content") : null;
  });
  var _insertRule = function insertRule(container, rule, index2) {
    try {
      if ("insertRule" in container) {
        container.insertRule(rule, index2);
      } else if ("appendRule" in container) {
        container.appendRule(rule);
      }
    } catch (err) {
      return false;
    }
    return container.cssRules[index2];
  };
  var getValidRuleInsertionIndex = function getValidRuleInsertionIndex2(container, index2) {
    var maxIndex = container.cssRules.length;
    if (index2 === void 0 || index2 > maxIndex) {
      return maxIndex;
    }
    return index2;
  };
  var createStyle = function createStyle2() {
    var el2 = document.createElement("style");
    el2.textContent = "\n";
    return el2;
  };
  var DomRenderer = (function() {
    function DomRenderer2(sheet) {
      this.getPropertyValue = getPropertyValue;
      this.setProperty = setProperty;
      this.removeProperty = removeProperty;
      this.setSelector = setSelector;
      this.hasInsertedRules = false;
      this.cssRules = [];
      if (sheet) sheets.add(sheet);
      this.sheet = sheet;
      var _ref = this.sheet ? this.sheet.options : {}, media = _ref.media, meta = _ref.meta, element = _ref.element;
      this.element = element || createStyle();
      this.element.setAttribute("data-jss", "");
      if (media) this.element.setAttribute("media", media);
      if (meta) this.element.setAttribute("data-meta", meta);
      var nonce = getNonce();
      if (nonce) this.element.setAttribute("nonce", nonce);
    }
    var _proto = DomRenderer2.prototype;
    _proto.attach = function attach2() {
      if (this.element.parentNode || !this.sheet) return;
      insertStyle(this.element, this.sheet.options);
      var deployed = Boolean(this.sheet && this.sheet.deployed);
      if (this.hasInsertedRules && deployed) {
        this.hasInsertedRules = false;
        this.deploy();
      }
    };
    _proto.detach = function detach2() {
      if (!this.sheet) return;
      var parentNode = this.element.parentNode;
      if (parentNode) parentNode.removeChild(this.element);
      if (this.sheet.options.link) {
        this.cssRules = [];
        this.element.textContent = "\n";
      }
    };
    _proto.deploy = function deploy() {
      var sheet = this.sheet;
      if (!sheet) return;
      if (sheet.options.link) {
        this.insertRules(sheet.rules);
        return;
      }
      this.element.textContent = "\n" + sheet.toString() + "\n";
    };
    _proto.insertRules = function insertRules(rules, nativeParent) {
      for (var i = 0; i < rules.index.length; i++) {
        this.insertRule(rules.index[i], i, nativeParent);
      }
    };
    _proto.insertRule = function insertRule2(rule, index2, nativeParent) {
      if (nativeParent === void 0) {
        nativeParent = this.element.sheet;
      }
      if (rule.rules) {
        var parent = rule;
        var latestNativeParent = nativeParent;
        if (rule.type === "conditional" || rule.type === "keyframes") {
          var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index2);
          latestNativeParent = _insertRule(nativeParent, parent.toString({
            children: false
          }), _insertionIndex);
          if (latestNativeParent === false) {
            return false;
          }
          this.refCssRule(rule, _insertionIndex, latestNativeParent);
        }
        this.insertRules(parent.rules, latestNativeParent);
        return latestNativeParent;
      }
      var ruleStr = rule.toString();
      if (!ruleStr) return false;
      var insertionIndex = getValidRuleInsertionIndex(nativeParent, index2);
      var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex);
      if (nativeRule === false) {
        return false;
      }
      this.hasInsertedRules = true;
      this.refCssRule(rule, insertionIndex, nativeRule);
      return nativeRule;
    };
    _proto.refCssRule = function refCssRule(rule, index2, cssRule) {
      rule.renderable = cssRule;
      if (rule.options.parent instanceof StyleSheet) {
        this.cssRules.splice(index2, 0, cssRule);
      }
    };
    _proto.deleteRule = function deleteRule(cssRule) {
      var sheet = this.element.sheet;
      var index2 = this.indexOf(cssRule);
      if (index2 === -1) return false;
      sheet.deleteRule(index2);
      this.cssRules.splice(index2, 1);
      return true;
    };
    _proto.indexOf = function indexOf(cssRule) {
      return this.cssRules.indexOf(cssRule);
    };
    _proto.replaceRule = function replaceRule(cssRule, rule) {
      var index2 = this.indexOf(cssRule);
      if (index2 === -1) return false;
      this.element.sheet.deleteRule(index2);
      this.cssRules.splice(index2, 1);
      return this.insertRule(rule, index2);
    };
    _proto.getRules = function getRules() {
      return this.element.sheet.cssRules;
    };
    return DomRenderer2;
  })();
  var instanceCounter = 0;
  var Jss = (function() {
    function Jss2(options) {
      this.id = instanceCounter++;
      this.version = "10.10.0";
      this.plugins = new PluginsRegistry();
      this.options = {
        id: {
          minify: false
        },
        createGenerateId,
        Renderer: isBrowser ? DomRenderer : null,
        plugins: []
      };
      this.generateId = createGenerateId({
        minify: false
      });
      for (var i = 0; i < plugins$1.length; i++) {
        this.plugins.use(plugins$1[i], {
          queue: "internal"
        });
      }
      this.setup(options);
    }
    var _proto = Jss2.prototype;
    _proto.setup = function setup(options) {
      if (options === void 0) {
        options = {};
      }
      if (options.createGenerateId) {
        this.options.createGenerateId = options.createGenerateId;
      }
      if (options.id) {
        this.options.id = _extends({}, this.options.id, options.id);
      }
      if (options.createGenerateId || options.id) {
        this.generateId = this.options.createGenerateId(this.options.id);
      }
      if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;
      if ("Renderer" in options) {
        this.options.Renderer = options.Renderer;
      }
      if (options.plugins) this.use.apply(this, options.plugins);
      return this;
    };
    _proto.createStyleSheet = function createStyleSheet(styles, options) {
      if (options === void 0) {
        options = {};
      }
      var _options = options, index2 = _options.index;
      if (typeof index2 !== "number") {
        index2 = sheets.index === 0 ? 0 : sheets.index + 1;
      }
      var sheet = new StyleSheet(styles, _extends({}, options, {
        jss: this,
        generateId: options.generateId || this.generateId,
        insertionPoint: this.options.insertionPoint,
        Renderer: this.options.Renderer,
        index: index2
      }));
      this.plugins.onProcessSheet(sheet);
      return sheet;
    };
    _proto.removeStyleSheet = function removeStyleSheet(sheet) {
      sheet.detach();
      sheets.remove(sheet);
      return this;
    };
    _proto.createRule = function createRule$1(name, style2, options) {
      if (style2 === void 0) {
        style2 = {};
      }
      if (options === void 0) {
        options = {};
      }
      if (typeof name === "object") {
        return this.createRule(void 0, name, style2);
      }
      var ruleOptions = _extends({}, options, {
        name,
        jss: this,
        Renderer: this.options.Renderer
      });
      if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;
      if (!ruleOptions.classes) ruleOptions.classes = {};
      if (!ruleOptions.keyframes) ruleOptions.keyframes = {};
      var rule = createRule(name, style2, ruleOptions);
      if (rule) this.plugins.onProcessRule(rule);
      return rule;
    };
    _proto.use = function use() {
      var _this = this;
      for (var _len = arguments.length, plugins2 = new Array(_len), _key = 0; _key < _len; _key++) {
        plugins2[_key] = arguments[_key];
      }
      plugins2.forEach(function(plugin) {
        _this.plugins.use(plugin);
      });
      return this;
    };
    return Jss2;
  })();
  var createJss = function createJss2(options) {
    return new Jss(options);
  };
  var hasCSSTOMSupport = typeof CSS === "object" && CSS != null && "number" in CSS;
  function getDynamicStyles(styles) {
    var to = null;
    for (var key2 in styles) {
      var value = styles[key2];
      var type = typeof value;
      if (type === "function") {
        if (!to) to = {};
        to[key2] = value;
      } else if (type === "object" && value !== null && !Array.isArray(value)) {
        var extracted = getDynamicStyles(value);
        if (extracted) {
          if (!to) to = {};
          to[key2] = extracted;
        }
      }
    }
    return to;
  }
  createJss();
  var now = Date.now();
  var fnValuesNs = "fnValues" + now;
  var fnRuleNs = "fnStyle" + ++now;
  var functionPlugin = function functionPlugin2() {
    return {
      onCreateRule: function onCreateRule(name, decl, options) {
        if (typeof decl !== "function") return null;
        var rule = createRule(name, {}, options);
        rule[fnRuleNs] = decl;
        return rule;
      },
      onProcessStyle: function onProcessStyle(style2, rule) {
        if (fnValuesNs in rule || fnRuleNs in rule) return style2;
        var fnValues = {};
        for (var prop in style2) {
          var value = style2[prop];
          if (typeof value !== "function") continue;
          delete style2[prop];
          fnValues[prop] = value;
        }
        rule[fnValuesNs] = fnValues;
        return style2;
      },
      onUpdate: function onUpdate(data, rule, sheet, options) {
        var styleRule = rule;
        var fnRule = styleRule[fnRuleNs];
        if (fnRule) {
          styleRule.style = fnRule(data) || {};
        }
        var fnValues = styleRule[fnValuesNs];
        if (fnValues) {
          for (var _prop in fnValues) {
            styleRule.prop(_prop, fnValues[_prop](data), options);
          }
        }
      }
    };
  };
  var at = "@global";
  var atPrefix = "@global ";
  var GlobalContainerRule = (function() {
    function GlobalContainerRule2(key2, styles, options) {
      this.type = "global";
      this.at = at;
      this.isProcessed = false;
      this.key = key2;
      this.options = options;
      this.rules = new RuleList(_extends({}, options, {
        parent: this
      }));
      for (var selector in styles) {
        this.rules.add(selector, styles[selector]);
      }
      this.rules.process();
    }
    var _proto = GlobalContainerRule2.prototype;
    _proto.getRule = function getRule(name) {
      return this.rules.get(name);
    };
    _proto.addRule = function addRule(name, style2, options) {
      var rule = this.rules.add(name, style2, options);
      if (rule) this.options.jss.plugins.onProcessRule(rule);
      return rule;
    };
    _proto.replaceRule = function replaceRule(name, style2, options) {
      var newRule = this.rules.replace(name, style2, options);
      if (newRule) this.options.jss.plugins.onProcessRule(newRule);
      return newRule;
    };
    _proto.indexOf = function indexOf(rule) {
      return this.rules.indexOf(rule);
    };
    _proto.toString = function toString(options) {
      return this.rules.toString(options);
    };
    return GlobalContainerRule2;
  })();
  var GlobalPrefixedRule = (function() {
    function GlobalPrefixedRule2(key2, style2, options) {
      this.type = "global";
      this.at = at;
      this.isProcessed = false;
      this.key = key2;
      this.options = options;
      var selector = key2.substr(atPrefix.length);
      this.rule = options.jss.createRule(selector, style2, _extends({}, options, {
        parent: this
      }));
    }
    var _proto2 = GlobalPrefixedRule2.prototype;
    _proto2.toString = function toString(options) {
      return this.rule ? this.rule.toString(options) : "";
    };
    return GlobalPrefixedRule2;
  })();
  var separatorRegExp$1 = /\s*,\s*/g;
  function addScope(selector, scope) {
    var parts = selector.split(separatorRegExp$1);
    var scoped = "";
    for (var i = 0; i < parts.length; i++) {
      scoped += scope + " " + parts[i].trim();
      if (parts[i + 1]) scoped += ", ";
    }
    return scoped;
  }
  function handleNestedGlobalContainerRule(rule, sheet) {
    var options = rule.options, style2 = rule.style;
    var rules = style2 ? style2[at] : null;
    if (!rules) return;
    for (var name in rules) {
      sheet.addRule(name, rules[name], _extends({}, options, {
        selector: addScope(name, rule.selector)
      }));
    }
    delete style2[at];
  }
  function handlePrefixedGlobalRule(rule, sheet) {
    var options = rule.options, style2 = rule.style;
    for (var prop in style2) {
      if (prop[0] !== "@" || prop.substr(0, at.length) !== at) continue;
      var selector = addScope(prop.substr(at.length), rule.selector);
      sheet.addRule(selector, style2[prop], _extends({}, options, {
        selector
      }));
      delete style2[prop];
    }
  }
  function jssGlobal() {
    function onCreateRule(name, styles, options) {
      if (!name) return null;
      if (name === at) {
        return new GlobalContainerRule(name, styles, options);
      }
      if (name[0] === "@" && name.substr(0, atPrefix.length) === atPrefix) {
        return new GlobalPrefixedRule(name, styles, options);
      }
      var parent = options.parent;
      if (parent) {
        if (parent.type === "global" || parent.options.parent && parent.options.parent.type === "global") {
          options.scoped = false;
        }
      }
      if (!options.selector && options.scoped === false) {
        options.selector = name;
      }
      return null;
    }
    function onProcessRule(rule, sheet) {
      if (rule.type !== "style" || !sheet) return;
      handleNestedGlobalContainerRule(rule, sheet);
      handlePrefixedGlobalRule(rule, sheet);
    }
    return {
      onCreateRule,
      onProcessRule
    };
  }
  var separatorRegExp = /\s*,\s*/g;
  var parentRegExp = /&/g;
  var refRegExp = /\$([\w-]+)/g;
  function jssNested() {
    function getReplaceRef(container, sheet) {
      return function(match, key2) {
        var rule = container.getRule(key2) || sheet && sheet.getRule(key2);
        if (rule) {
          return rule.selector;
        }
        return key2;
      };
    }
    function replaceParentRefs(nestedProp, parentProp) {
      var parentSelectors = parentProp.split(separatorRegExp);
      var nestedSelectors = nestedProp.split(separatorRegExp);
      var result = "";
      for (var i = 0; i < parentSelectors.length; i++) {
        var parent = parentSelectors[i];
        for (var j = 0; j < nestedSelectors.length; j++) {
          var nested2 = nestedSelectors[j];
          if (result) result += ", ";
          result += nested2.indexOf("&") !== -1 ? nested2.replace(parentRegExp, parent) : parent + " " + nested2;
        }
      }
      return result;
    }
    function getOptions(rule, container, prevOptions) {
      if (prevOptions) return _extends({}, prevOptions, {
        index: prevOptions.index + 1
      });
      var nestingLevel = rule.options.nestingLevel;
      nestingLevel = nestingLevel === void 0 ? 1 : nestingLevel + 1;
      var options = _extends({}, rule.options, {
        nestingLevel,
        index: container.indexOf(rule) + 1
      });
      delete options.name;
      return options;
    }
    function onProcessStyle(style2, rule, sheet) {
      if (rule.type !== "style") return style2;
      var styleRule = rule;
      var container = styleRule.options.parent;
      var options;
      var replaceRef2;
      for (var prop in style2) {
        var isNested = prop.indexOf("&") !== -1;
        var isNestedConditional = prop[0] === "@";
        if (!isNested && !isNestedConditional) continue;
        options = getOptions(styleRule, container, options);
        if (isNested) {
          var selector = replaceParentRefs(prop, styleRule.selector);
          if (!replaceRef2) replaceRef2 = getReplaceRef(container, sheet);
          selector = selector.replace(refRegExp, replaceRef2);
          var name = styleRule.key + "-" + prop;
          if ("replaceRule" in container) {
            container.replaceRule(name, style2[prop], _extends({}, options, {
              selector
            }));
          } else {
            container.addRule(name, style2[prop], _extends({}, options, {
              selector
            }));
          }
        } else if (isNestedConditional) {
          container.addRule(prop, {}, options).addRule(styleRule.key, style2[prop], {
            selector: styleRule.selector
          });
        }
        delete style2[prop];
      }
      return style2;
    }
    return {
      onProcessStyle
    };
  }
  var uppercasePattern = /[A-Z]/g;
  var msPattern = /^ms-/;
  var cache$2 = {};
  function toHyphenLower(match) {
    return "-" + match.toLowerCase();
  }
  function hyphenateStyleName(name) {
    if (cache$2.hasOwnProperty(name)) {
      return cache$2[name];
    }
    var hName = name.replace(uppercasePattern, toHyphenLower);
    return cache$2[name] = msPattern.test(hName) ? "-" + hName : hName;
  }
  function convertCase(style2) {
    var converted = {};
    for (var prop in style2) {
      var key2 = prop.indexOf("--") === 0 ? prop : hyphenateStyleName(prop);
      converted[key2] = style2[prop];
    }
    if (style2.fallbacks) {
      if (Array.isArray(style2.fallbacks)) converted.fallbacks = style2.fallbacks.map(convertCase);
      else converted.fallbacks = convertCase(style2.fallbacks);
    }
    return converted;
  }
  function camelCase() {
    function onProcessStyle(style2) {
      if (Array.isArray(style2)) {
        for (var index = 0; index < style2.length; index++) {
          style2[index] = convertCase(style2[index]);
        }
        return style2;
      }
      return convertCase(style2);
    }
    function onChangeValue(value, prop, rule) {
      if (prop.indexOf("--") === 0) {
        return value;
      }
      var hyphenatedProp = hyphenateStyleName(prop);
      if (prop === hyphenatedProp) return value;
      rule.prop(hyphenatedProp, value);
      return null;
    }
    return {
      onProcessStyle,
      onChangeValue
    };
  }
  var px = hasCSSTOMSupport && CSS ? CSS.px : "px";
  var ms = hasCSSTOMSupport && CSS ? CSS.ms : "ms";
  var percent = hasCSSTOMSupport && CSS ? CSS.percent : "%";
  var defaultUnits = {
    "animation-delay": ms,
    "animation-duration": ms,
    "background-position": px,
    "background-position-x": px,
    "background-position-y": px,
    "background-size": px,
    border: px,
    "border-bottom": px,
    "border-bottom-left-radius": px,
    "border-bottom-right-radius": px,
    "border-bottom-width": px,
    "border-left": px,
    "border-left-width": px,
    "border-radius": px,
    "border-right": px,
    "border-right-width": px,
    "border-top": px,
    "border-top-left-radius": px,
    "border-top-right-radius": px,
    "border-top-width": px,
    "border-width": px,
    "border-block": px,
    "border-block-end": px,
    "border-block-end-width": px,
    "border-block-start": px,
    "border-block-start-width": px,
    "border-block-width": px,
    "border-inline": px,
    "border-inline-end": px,
    "border-inline-end-width": px,
    "border-inline-start": px,
    "border-inline-start-width": px,
    "border-inline-width": px,
    "border-start-start-radius": px,
    "border-start-end-radius": px,
    "border-end-start-radius": px,
    "border-end-end-radius": px,
    margin: px,
    "margin-bottom": px,
    "margin-left": px,
    "margin-right": px,
    "margin-top": px,
    "margin-block": px,
    "margin-block-end": px,
    "margin-block-start": px,
    "margin-inline": px,
    "margin-inline-end": px,
    "margin-inline-start": px,
    padding: px,
    "padding-bottom": px,
    "padding-left": px,
    "padding-right": px,
    "padding-top": px,
    "padding-block": px,
    "padding-block-end": px,
    "padding-block-start": px,
    "padding-inline": px,
    "padding-inline-end": px,
    "padding-inline-start": px,
    "mask-position-x": px,
    "mask-position-y": px,
    "mask-size": px,
    height: px,
    width: px,
    "min-height": px,
    "max-height": px,
    "min-width": px,
    "max-width": px,
    bottom: px,
    left: px,
    top: px,
    right: px,
    inset: px,
    "inset-block": px,
    "inset-block-end": px,
    "inset-block-start": px,
    "inset-inline": px,
    "inset-inline-end": px,
    "inset-inline-start": px,
    "box-shadow": px,
    "text-shadow": px,
    "column-gap": px,
    "column-rule": px,
    "column-rule-width": px,
    "column-width": px,
    "font-size": px,
    "font-size-delta": px,
    "letter-spacing": px,
    "text-decoration-thickness": px,
    "text-indent": px,
    "text-stroke": px,
    "text-stroke-width": px,
    "word-spacing": px,
    motion: px,
    "motion-offset": px,
    outline: px,
    "outline-offset": px,
    "outline-width": px,
    perspective: px,
    "perspective-origin-x": percent,
    "perspective-origin-y": percent,
    "transform-origin": percent,
    "transform-origin-x": percent,
    "transform-origin-y": percent,
    "transform-origin-z": percent,
    "transition-delay": ms,
    "transition-duration": ms,
    "vertical-align": px,
    "flex-basis": px,
    "shape-margin": px,
    size: px,
    gap: px,
    grid: px,
    "grid-gap": px,
    "row-gap": px,
    "grid-row-gap": px,
    "grid-column-gap": px,
    "grid-template-rows": px,
    "grid-template-columns": px,
    "grid-auto-rows": px,
    "grid-auto-columns": px,
    "box-shadow-x": px,
    "box-shadow-y": px,
    "box-shadow-blur": px,
    "box-shadow-spread": px,
    "font-line-height": px,
    "text-shadow-x": px,
    "text-shadow-y": px,
    "text-shadow-blur": px
  };
  function addCamelCasedVersion(obj) {
    var regExp2 = /(-[a-z])/g;
    var replace = function replace2(str) {
      return str[1].toUpperCase();
    };
    var newObj = {};
    for (var key2 in obj) {
      newObj[key2] = obj[key2];
      newObj[key2.replace(regExp2, replace)] = obj[key2];
    }
    return newObj;
  }
  var units = addCamelCasedVersion(defaultUnits);
  function iterate(prop, value, options) {
    if (value == null) return value;
    if (Array.isArray(value)) {
      for (var i = 0; i < value.length; i++) {
        value[i] = iterate(prop, value[i], options);
      }
    } else if (typeof value === "object") {
      if (prop === "fallbacks") {
        for (var innerProp in value) {
          value[innerProp] = iterate(innerProp, value[innerProp], options);
        }
      } else {
        for (var _innerProp in value) {
          value[_innerProp] = iterate(prop + "-" + _innerProp, value[_innerProp], options);
        }
      }
    } else if (typeof value === "number" && isNaN(value) === false) {
      var unit = options[prop] || units[prop];
      if (unit && !(value === 0 && unit === px)) {
        return typeof unit === "function" ? unit(value).toString() : "" + value + unit;
      }
      return value.toString();
    }
    return value;
  }
  function defaultUnit(options) {
    if (options === void 0) {
      options = {};
    }
    var camelCasedOptions = addCamelCasedVersion(options);
    function onProcessStyle(style2, rule) {
      if (rule.type !== "style") return style2;
      for (var prop in style2) {
        style2[prop] = iterate(prop, style2[prop], camelCasedOptions);
      }
      return style2;
    }
    function onChangeValue(value, prop) {
      return iterate(prop, value, camelCasedOptions);
    }
    return {
      onProcessStyle,
      onChangeValue
    };
  }
  function _arrayLikeToArray(r2, a) {
    (null == a || a > r2.length) && (a = r2.length);
    for (var e2 = 0, n2 = Array(a); e2 < a; e2++) n2[e2] = r2[e2];
    return n2;
  }
  function _arrayWithoutHoles(r2) {
    if (Array.isArray(r2)) return _arrayLikeToArray(r2);
  }
  function _iterableToArray(r2) {
    if ("undefined" != typeof Symbol && null != r2[Symbol.iterator] || null != r2["@@iterator"]) return Array.from(r2);
  }
  function _unsupportedIterableToArray(r2, a) {
    if (r2) {
      if ("string" == typeof r2) return _arrayLikeToArray(r2, a);
      var t2 = {}.toString.call(r2).slice(8, -1);
      return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a) : void 0;
    }
  }
  function _nonIterableSpread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }
  function _toConsumableArray(r2) {
    return _arrayWithoutHoles(r2) || _iterableToArray(r2) || _unsupportedIterableToArray(r2) || _nonIterableSpread();
  }
  var js = "";
  var css = "";
  var vendor = "";
  var browser = "";
  var isTouch = isBrowser && "ontouchstart" in document.documentElement;
  if (isBrowser) {
    var jsCssMap = {
      Moz: "-moz-",
      ms: "-ms-",
      O: "-o-",
      Webkit: "-webkit-"
    };
    var _document$createEleme = document.createElement("p"), style = _document$createEleme.style;
    var testProp = "Transform";
    for (var key in jsCssMap) {
      if (key + testProp in style) {
        js = key;
        css = jsCssMap[key];
        break;
      }
    }
    if (js === "Webkit" && "msHyphens" in style) {
      js = "ms";
      css = jsCssMap.ms;
      browser = "edge";
    }
    if (js === "Webkit" && "-apple-trailing-word" in style) {
      vendor = "apple";
    }
  }
  var prefix = {
    js,
    css,
    vendor,
    browser,
    isTouch
  };
  function supportedKeyframes(key2) {
    if (key2[1] === "-") return key2;
    if (prefix.js === "ms") return key2;
    return "@" + prefix.css + "keyframes" + key2.substr(10);
  }
  var appearence = {
    noPrefill: [
      "appearance"
    ],
    supportedProperty: function supportedProperty(prop) {
      if (prop !== "appearance") return false;
      if (prefix.js === "ms") return "-webkit-" + prop;
      return prefix.css + prop;
    }
  };
  var colorAdjust = {
    noPrefill: [
      "color-adjust"
    ],
    supportedProperty: function supportedProperty2(prop) {
      if (prop !== "color-adjust") return false;
      if (prefix.js === "Webkit") return prefix.css + "print-" + prop;
      return prop;
    }
  };
  var regExp = /[-\s]+(.)?/g;
  function toUpper(match, c2) {
    return c2 ? c2.toUpperCase() : "";
  }
  function camelize(str) {
    return str.replace(regExp, toUpper);
  }
  function pascalize(str) {
    return camelize("-" + str);
  }
  var mask = {
    noPrefill: [
      "mask"
    ],
    supportedProperty: function supportedProperty3(prop, style2) {
      if (!/^mask/.test(prop)) return false;
      if (prefix.js === "Webkit") {
        var longhand = "mask-image";
        if (camelize(longhand) in style2) {
          return prop;
        }
        if (prefix.js + pascalize(longhand) in style2) {
          return prefix.css + prop;
        }
      }
      return prop;
    }
  };
  var textOrientation = {
    noPrefill: [
      "text-orientation"
    ],
    supportedProperty: function supportedProperty4(prop) {
      if (prop !== "text-orientation") return false;
      if (prefix.vendor === "apple" && !prefix.isTouch) {
        return prefix.css + prop;
      }
      return prop;
    }
  };
  var transform = {
    noPrefill: [
      "transform"
    ],
    supportedProperty: function supportedProperty5(prop, style2, options) {
      if (prop !== "transform") return false;
      if (options.transform) {
        return prop;
      }
      return prefix.css + prop;
    }
  };
  var transition = {
    noPrefill: [
      "transition"
    ],
    supportedProperty: function supportedProperty6(prop, style2, options) {
      if (prop !== "transition") return false;
      if (options.transition) {
        return prop;
      }
      return prefix.css + prop;
    }
  };
  var writingMode = {
    noPrefill: [
      "writing-mode"
    ],
    supportedProperty: function supportedProperty7(prop) {
      if (prop !== "writing-mode") return false;
      if (prefix.js === "Webkit" || prefix.js === "ms" && prefix.browser !== "edge") {
        return prefix.css + prop;
      }
      return prop;
    }
  };
  var userSelect = {
    noPrefill: [
      "user-select"
    ],
    supportedProperty: function supportedProperty8(prop) {
      if (prop !== "user-select") return false;
      if (prefix.js === "Moz" || prefix.js === "ms" || prefix.vendor === "apple") {
        return prefix.css + prop;
      }
      return prop;
    }
  };
  var breakPropsOld = {
    supportedProperty: function supportedProperty9(prop, style2) {
      if (!/^break-/.test(prop)) return false;
      if (prefix.js === "Webkit") {
        var jsProp = "WebkitColumn" + pascalize(prop);
        return jsProp in style2 ? prefix.css + "column-" + prop : false;
      }
      if (prefix.js === "Moz") {
        var _jsProp = "page" + pascalize(prop);
        return _jsProp in style2 ? "page-" + prop : false;
      }
      return false;
    }
  };
  var inlineLogicalOld = {
    supportedProperty: function supportedProperty10(prop, style2) {
      if (!/^(border|margin|padding)-inline/.test(prop)) return false;
      if (prefix.js === "Moz") return prop;
      var newProp = prop.replace("-inline", "");
      return prefix.js + pascalize(newProp) in style2 ? prefix.css + newProp : false;
    }
  };
  var unprefixed = {
    supportedProperty: function supportedProperty11(prop, style2) {
      return camelize(prop) in style2 ? prop : false;
    }
  };
  var prefixed = {
    supportedProperty: function supportedProperty12(prop, style2) {
      var pascalized = pascalize(prop);
      if (prop[0] === "-") return prop;
      if (prop[0] === "-" && prop[1] === "-") return prop;
      if (prefix.js + pascalized in style2) return prefix.css + prop;
      if (prefix.js !== "Webkit" && "Webkit" + pascalized in style2) return "-webkit-" + prop;
      return false;
    }
  };
  var scrollSnap = {
    supportedProperty: function supportedProperty13(prop) {
      if (prop.substring(0, 11) !== "scroll-snap") return false;
      if (prefix.js === "ms") {
        return "" + prefix.css + prop;
      }
      return prop;
    }
  };
  var overscrollBehavior = {
    supportedProperty: function supportedProperty14(prop) {
      if (prop !== "overscroll-behavior") return false;
      if (prefix.js === "ms") {
        return prefix.css + "scroll-chaining";
      }
      return prop;
    }
  };
  var propMap = {
    "flex-grow": "flex-positive",
    "flex-shrink": "flex-negative",
    "flex-basis": "flex-preferred-size",
    "justify-content": "flex-pack",
    order: "flex-order",
    "align-items": "flex-align",
    "align-content": "flex-line-pack"
  };
  var flex2012 = {
    supportedProperty: function supportedProperty15(prop, style2) {
      var newProp = propMap[prop];
      if (!newProp) return false;
      return prefix.js + pascalize(newProp) in style2 ? prefix.css + newProp : false;
    }
  };
  var propMap$1 = {
    flex: "box-flex",
    "flex-grow": "box-flex",
    "flex-direction": [
      "box-orient",
      "box-direction"
    ],
    order: "box-ordinal-group",
    "align-items": "box-align",
    "flex-flow": [
      "box-orient",
      "box-direction"
    ],
    "justify-content": "box-pack"
  };
  var propKeys = Object.keys(propMap$1);
  var prefixCss = function prefixCss2(p2) {
    return prefix.css + p2;
  };
  var flex2009 = {
    supportedProperty: function supportedProperty16(prop, style2, _ref) {
      var multiple = _ref.multiple;
      if (propKeys.indexOf(prop) > -1) {
        var newProp = propMap$1[prop];
        if (!Array.isArray(newProp)) {
          return prefix.js + pascalize(newProp) in style2 ? prefix.css + newProp : false;
        }
        if (!multiple) return false;
        for (var i = 0; i < newProp.length; i++) {
          if (!(prefix.js + pascalize(newProp[0]) in style2)) {
            return false;
          }
        }
        return newProp.map(prefixCss);
      }
      return false;
    }
  };
  var plugins = [
    appearence,
    colorAdjust,
    mask,
    textOrientation,
    transform,
    transition,
    writingMode,
    userSelect,
    breakPropsOld,
    inlineLogicalOld,
    unprefixed,
    prefixed,
    scrollSnap,
    overscrollBehavior,
    flex2012,
    flex2009
  ];
  var propertyDetectors = plugins.filter(function(p2) {
    return p2.supportedProperty;
  }).map(function(p2) {
    return p2.supportedProperty;
  });
  var noPrefill = plugins.filter(function(p2) {
    return p2.noPrefill;
  }).reduce(function(a, p2) {
    a.push.apply(a, _toConsumableArray(p2.noPrefill));
    return a;
  }, []);
  var el;
  var cache = {};
  if (isBrowser) {
    el = document.createElement("p");
    var computed = window.getComputedStyle(document.documentElement, "");
    for (var key$1 in computed) {
      if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];
    }
    noPrefill.forEach(function(x2) {
      return delete cache[x2];
    });
  }
  function supportedProperty17(prop, options) {
    if (options === void 0) {
      options = {};
    }
    if (!el) return prop;
    if (cache[prop] != null) {
      return cache[prop];
    }
    if (prop === "transition" || prop === "transform") {
      options[prop] = prop in el.style;
    }
    for (var i = 0; i < propertyDetectors.length; i++) {
      cache[prop] = propertyDetectors[i](prop, el.style, options);
      if (cache[prop]) break;
    }
    try {
      el.style[prop] = "";
    } catch (err) {
      return false;
    }
    return cache[prop];
  }
  var cache$1 = {};
  var transitionProperties = {
    transition: 1,
    "transition-property": 1,
    "-webkit-transition": 1,
    "-webkit-transition-property": 1
  };
  var transPropsRegExp = /(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;
  var el$1;
  function prefixTransitionCallback(match, p1, p2) {
    if (p1 === "var") return "var";
    if (p1 === "all") return "all";
    if (p2 === "all") return ", all";
    var prefixedValue = p1 ? supportedProperty17(p1) : ", " + supportedProperty17(p2);
    if (!prefixedValue) return p1 || p2;
    return prefixedValue;
  }
  if (isBrowser) el$1 = document.createElement("p");
  function supportedValue(property, value) {
    var prefixedValue = value;
    if (!el$1 || property === "content") return value;
    if (typeof prefixedValue !== "string" || !isNaN(parseInt(prefixedValue, 10))) {
      return prefixedValue;
    }
    var cacheKey = property + prefixedValue;
    if (cache$1[cacheKey] != null) {
      return cache$1[cacheKey];
    }
    try {
      el$1.style[property] = prefixedValue;
    } catch (err) {
      cache$1[cacheKey] = false;
      return false;
    }
    if (transitionProperties[property]) {
      prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);
    } else if (el$1.style[property] === "") {
      prefixedValue = prefix.css + prefixedValue;
      if (prefixedValue === "-ms-flex") el$1.style[property] = "-ms-flexbox";
      el$1.style[property] = prefixedValue;
      if (el$1.style[property] === "") {
        cache$1[cacheKey] = false;
        return false;
      }
    }
    el$1.style[property] = "";
    cache$1[cacheKey] = prefixedValue;
    return cache$1[cacheKey];
  }
  function jssVendorPrefixer() {
    function onProcessRule(rule) {
      if (rule.type === "keyframes") {
        var atRule = rule;
        atRule.at = supportedKeyframes(atRule.at);
      }
    }
    function prefixStyle(style2) {
      for (var prop in style2) {
        var value = style2[prop];
        if (prop === "fallbacks" && Array.isArray(value)) {
          style2[prop] = value.map(prefixStyle);
          continue;
        }
        var changeProp = false;
        var supportedProp = supportedProperty17(prop);
        if (supportedProp && supportedProp !== prop) changeProp = true;
        var changeValue = false;
        var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));
        if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;
        if (changeProp || changeValue) {
          if (changeProp) delete style2[prop];
          style2[supportedProp || prop] = supportedValue$1 || value;
        }
      }
      return style2;
    }
    function onProcessStyle(style2, rule) {
      if (rule.type !== "style") return style2;
      return prefixStyle(style2);
    }
    function onChangeValue(value, prop) {
      return supportedValue(prop, toCssValue(value)) || value;
    }
    return {
      onProcessRule,
      onProcessStyle,
      onChangeValue
    };
  }
  function jssPropsSort() {
    var sort = function sort2(prop0, prop1) {
      if (prop0.length === prop1.length) {
        return prop0 > prop1 ? 1 : -1;
      }
      return prop0.length - prop1.length;
    };
    return {
      onProcessStyle: function onProcessStyle(style2, rule) {
        if (rule.type !== "style") return style2;
        var newStyle = {};
        var props = Object.keys(style2).sort(sort);
        for (var i = 0; i < props.length; i++) {
          newStyle[props[i]] = style2[props[i]];
        }
        return newStyle;
      }
    };
  }
  jssPreset = function() {
    return {
      plugins: [
        functionPlugin(),
        jssGlobal(),
        jssNested(),
        camelCase(),
        defaultUnit(),
        typeof window === "undefined" ? null : jssVendorPrefixer(),
        jssPropsSort()
      ]
    };
  };
  mergeClasses = function(options = {}) {
    const { baseClasses, newClasses, Component } = options;
    if (!newClasses) {
      return baseClasses;
    }
    const nextClasses = {
      ...baseClasses
    };
    Object.keys(newClasses).forEach((key2) => {
      if (newClasses[key2]) {
        nextClasses[key2] = `${baseClasses[key2]} ${newClasses[key2]}`;
      }
    });
    return nextClasses;
  };
  const multiKeyStore = {
    set: (cache2, key1, key2, value) => {
      let subCache = cache2.get(key1);
      if (!subCache) {
        subCache = /* @__PURE__ */ new Map();
        cache2.set(key1, subCache);
      }
      subCache.set(key2, value);
    },
    get: (cache2, key1, key2) => {
      const subCache = cache2.get(key1);
      return subCache ? subCache.get(key2) : void 0;
    },
    delete: (cache2, key1, key2) => {
      const subCache = cache2.get(key1);
      subCache.delete(key2);
    }
  };
  useTheme = function() {
    const privateTheme = useTheme$1();
    return (privateTheme == null ? void 0 : privateTheme.$$material) ?? privateTheme;
  };
  const defaultJSS = createJss(jssPreset());
  const defaultGenerateClassName = createGenerateClassName();
  defaultSheetsManager = /* @__PURE__ */ new Map();
  const defaultOptions = {
    disableGeneration: false,
    generateClassName: defaultGenerateClassName,
    jss: defaultJSS,
    sheetsCache: null,
    sheetsManager: defaultSheetsManager,
    sheetsRegistry: null
  };
  StylesContext = __mf_10(defaultOptions);
  let injectFirstNode;
  StylesProvider = function(props) {
    const { children, injectFirst = false, disableGeneration = false, ...localOptions } = props;
    const outerOptions = __mf_21(StylesContext);
    const { generateClassName, jss, serverGenerateClassName, sheetsCache, sheetsManager, sheetsRegistry } = {
      ...outerOptions,
      ...localOptions
    };
    const value = __mf_29(() => {
      const context = {
        disableGeneration,
        generateClassName,
        jss,
        serverGenerateClassName,
        sheetsCache,
        sheetsManager,
        sheetsRegistry
      };
      if (!context.jss.options.insertionPoint && injectFirst && typeof window !== "undefined") {
        if (!injectFirstNode) {
          const head = document.head;
          injectFirstNode = document.createComment("mui-inject-first");
          head.insertBefore(injectFirstNode, head.firstChild);
        }
        context.jss = createJss({
          plugins: jssPreset().plugins,
          insertionPoint: injectFirstNode
        });
      }
      return context;
    }, [
      injectFirst,
      disableGeneration,
      generateClassName,
      jss,
      serverGenerateClassName,
      sheetsCache,
      sheetsManager,
      sheetsRegistry
    ]);
    return jsxRuntimeExports.jsx(StylesContext.Provider, {
      value,
      children
    });
  };
  let indexCounter = -1e9;
  function increment() {
    indexCounter += 1;
    return indexCounter;
  }
  function isEmpty(string) {
    return string.length === 0;
  }
  propsToClassKey = function(props) {
    const { variant, ...other } = props;
    let classKey = variant || "";
    Object.keys(other).sort().forEach((key2) => {
      if (key2 === "color") {
        classKey += isEmpty(classKey) ? props[key2] : capitalize(props[key2]);
      } else {
        classKey += `${isEmpty(classKey) ? key2 : capitalize(key2)}${capitalize(props[key2].toString())}`;
      }
    });
    return classKey;
  };
  const noopTheme = {};
  function getStylesCreator(stylesOrCreator) {
    const themingEnabled = typeof stylesOrCreator === "function";
    return {
      create: (theme, name) => {
        let styles;
        try {
          styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;
        } catch (err) {
          throw err;
        }
        if (!name || !theme.components || !theme.components[name] || !theme.components[name].styleOverrides && !theme.components[name].variants) {
          return styles;
        }
        const overrides = theme.components[name].styleOverrides || {};
        const variants = theme.components[name].variants || [];
        const stylesWithOverrides = {
          ...styles
        };
        Object.keys(overrides).forEach((key2) => {
          stylesWithOverrides[key2] = deepmerge(stylesWithOverrides[key2] || {}, overrides[key2]);
        });
        variants.forEach((definition) => {
          const classKey = propsToClassKey(definition.props);
          stylesWithOverrides[classKey] = deepmerge(stylesWithOverrides[classKey] || {}, definition.style);
        });
        return stylesWithOverrides;
      },
      options: {}
    };
  }
  function getClasses({ state, stylesOptions }, classes, Component) {
    if (stylesOptions.disableGeneration) {
      return classes || {};
    }
    if (!state.cacheClasses) {
      state.cacheClasses = {
        value: null,
        lastProp: null,
        lastJSS: {}
      };
    }
    let generate = false;
    if (state.classes !== state.cacheClasses.lastJSS) {
      state.cacheClasses.lastJSS = state.classes;
      generate = true;
    }
    if (classes !== state.cacheClasses.lastProp) {
      state.cacheClasses.lastProp = classes;
      generate = true;
    }
    if (generate) {
      state.cacheClasses.value = mergeClasses({
        baseClasses: state.cacheClasses.lastJSS,
        newClasses: classes,
        Component
      });
    }
    return state.cacheClasses.value;
  }
  function attach({ state, theme, stylesOptions, stylesCreator, name }, props) {
    if (stylesOptions.disableGeneration) {
      return;
    }
    let sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);
    if (!sheetManager) {
      sheetManager = {
        refs: 0,
        staticSheet: null,
        dynamicStyles: null
      };
      multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);
    }
    const options = {
      ...stylesCreator.options,
      ...stylesOptions,
      theme,
      flip: typeof stylesOptions.flip === "boolean" ? stylesOptions.flip : theme.direction === "rtl"
    };
    options.generateId = options.serverGenerateClassName || options.generateClassName;
    const sheetsRegistry = stylesOptions.sheetsRegistry;
    if (sheetManager.refs === 0) {
      let staticSheet;
      if (stylesOptions.sheetsCache) {
        staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);
      }
      const styles = stylesCreator.create(theme, name);
      if (!staticSheet) {
        staticSheet = stylesOptions.jss.createStyleSheet(styles, {
          link: false,
          ...options
        });
        staticSheet.attach();
        if (stylesOptions.sheetsCache) {
          multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);
        }
      }
      if (sheetsRegistry) {
        sheetsRegistry.add(staticSheet);
      }
      sheetManager.staticSheet = staticSheet;
      sheetManager.dynamicStyles = getDynamicStyles(styles);
    }
    if (sheetManager.dynamicStyles) {
      const dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, {
        link: true,
        ...options
      });
      dynamicSheet.update(props);
      dynamicSheet.attach();
      state.dynamicSheet = dynamicSheet;
      state.classes = mergeClasses({
        baseClasses: sheetManager.staticSheet.classes,
        newClasses: dynamicSheet.classes
      });
      if (sheetsRegistry) {
        sheetsRegistry.add(dynamicSheet);
      }
    } else {
      state.classes = sheetManager.staticSheet.classes;
    }
    sheetManager.refs += 1;
  }
  function update({ state }, props) {
    if (state.dynamicSheet) {
      state.dynamicSheet.update(props);
    }
  }
  function detach({ state, theme, stylesOptions, stylesCreator }) {
    if (stylesOptions.disableGeneration) {
      return;
    }
    const sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);
    sheetManager.refs -= 1;
    const sheetsRegistry = stylesOptions.sheetsRegistry;
    if (sheetManager.refs === 0) {
      multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);
      stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);
      if (sheetsRegistry) {
        sheetsRegistry.remove(sheetManager.staticSheet);
      }
    }
    if (state.dynamicSheet) {
      stylesOptions.jss.removeStyleSheet(state.dynamicSheet);
      if (sheetsRegistry) {
        sheetsRegistry.remove(state.dynamicSheet);
      }
    }
  }
  function useSynchronousEffect(func, values) {
    const key2 = __mf_31([]);
    let output;
    const currentKey = __mf_29(() => ({}), values);
    if (key2.current !== currentKey) {
      key2.current = currentKey;
      output = func();
    }
    __mf_24(() => () => {
      if (output) {
        output();
      }
    }, [
      currentKey
    ]);
  }
  makeStyles = function(stylesOrCreator, options = {}) {
    const { name, classNamePrefix: classNamePrefixOption, Component, defaultTheme = noopTheme, ...stylesOptions2 } = options;
    const stylesCreator = getStylesCreator(stylesOrCreator);
    const classNamePrefix = name || classNamePrefixOption || "makeStyles";
    stylesCreator.options = {
      index: increment(),
      name,
      meta: classNamePrefix,
      classNamePrefix
    };
    const useStyles = (props = {}) => {
      const theme = useTheme() || defaultTheme;
      const stylesOptions = {
        ...__mf_21(StylesContext),
        ...stylesOptions2
      };
      const instance = __mf_31();
      const shouldUpdate = __mf_31();
      useSynchronousEffect(() => {
        const current = {
          name,
          state: {},
          stylesCreator,
          stylesOptions,
          theme
        };
        attach(current, props);
        shouldUpdate.current = false;
        instance.current = current;
        return () => {
          detach(current);
        };
      }, [
        theme,
        stylesCreator
      ]);
      __mf_24(() => {
        if (shouldUpdate.current) {
          update(instance.current, props);
        }
        shouldUpdate.current = true;
      });
      const classes = getClasses(instance.current, props.classes, Component);
      return classes;
    };
    return useStyles;
  };
  ServerStyleSheets = class {
    constructor(options = {}) {
      this.options = options;
    }
    collect(children) {
      const sheetsManager = /* @__PURE__ */ new Map();
      this.sheetsRegistry = new SheetsRegistry();
      const generateClassName = createGenerateClassName();
      return jsxRuntimeExports.jsx(StylesProvider, {
        sheetsManager,
        serverGenerateClassName: generateClassName,
        sheetsRegistry: this.sheetsRegistry,
        ...this.options,
        children
      });
    }
    toString() {
      return this.sheetsRegistry ? this.sheetsRegistry.toString() : "";
    }
    getStyleElement(props) {
      return __mf_11("style", {
        id: "jss-server-side",
        key: "jss-server-side",
        dangerouslySetInnerHTML: {
          __html: this.toString()
        },
        ...props
      });
    }
  };
  var reactIs$1 = {
    exports: {}
  };
  var reactIs_production_min = {};
  var b = "function" === typeof Symbol && Symbol.for, c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
  function z(a) {
    if ("object" === typeof a && null !== a) {
      var u = a.$$typeof;
      switch (u) {
        case c:
          switch (a = a.type, a) {
            case l:
            case m:
            case e:
            case g:
            case f:
            case p:
              return a;
            default:
              switch (a = a && a.$$typeof, a) {
                case k:
                case n:
                case t:
                case r:
                case h:
                  return a;
                default:
                  return u;
              }
          }
        case d:
          return u;
      }
    }
  }
  function A(a) {
    return z(a) === m;
  }
  reactIs_production_min.AsyncMode = l;
  reactIs_production_min.ConcurrentMode = m;
  reactIs_production_min.ContextConsumer = k;
  reactIs_production_min.ContextProvider = h;
  reactIs_production_min.Element = c;
  reactIs_production_min.ForwardRef = n;
  reactIs_production_min.Fragment = e;
  reactIs_production_min.Lazy = t;
  reactIs_production_min.Memo = r;
  reactIs_production_min.Portal = d;
  reactIs_production_min.Profiler = g;
  reactIs_production_min.StrictMode = f;
  reactIs_production_min.Suspense = p;
  reactIs_production_min.isAsyncMode = function(a) {
    return A(a) || z(a) === l;
  };
  reactIs_production_min.isConcurrentMode = A;
  reactIs_production_min.isContextConsumer = function(a) {
    return z(a) === k;
  };
  reactIs_production_min.isContextProvider = function(a) {
    return z(a) === h;
  };
  reactIs_production_min.isElement = function(a) {
    return "object" === typeof a && null !== a && a.$$typeof === c;
  };
  reactIs_production_min.isForwardRef = function(a) {
    return z(a) === n;
  };
  reactIs_production_min.isFragment = function(a) {
    return z(a) === e;
  };
  reactIs_production_min.isLazy = function(a) {
    return z(a) === t;
  };
  reactIs_production_min.isMemo = function(a) {
    return z(a) === r;
  };
  reactIs_production_min.isPortal = function(a) {
    return z(a) === d;
  };
  reactIs_production_min.isProfiler = function(a) {
    return z(a) === g;
  };
  reactIs_production_min.isStrictMode = function(a) {
    return z(a) === f;
  };
  reactIs_production_min.isSuspense = function(a) {
    return z(a) === p;
  };
  reactIs_production_min.isValidElementType = function(a) {
    return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
  };
  reactIs_production_min.typeOf = z;
  {
    reactIs$1.exports = reactIs_production_min;
  }
  var reactIsExports = reactIs$1.exports;
  var reactIs = reactIsExports;
  var REACT_STATICS = {
    childContextTypes: true,
    contextType: true,
    contextTypes: true,
    defaultProps: true,
    displayName: true,
    getDefaultProps: true,
    getDerivedStateFromError: true,
    getDerivedStateFromProps: true,
    mixins: true,
    propTypes: true,
    type: true
  };
  var KNOWN_STATICS = {
    name: true,
    length: true,
    prototype: true,
    caller: true,
    callee: true,
    arguments: true,
    arity: true
  };
  var FORWARD_REF_STATICS = {
    "$$typeof": true,
    render: true,
    defaultProps: true,
    displayName: true,
    propTypes: true
  };
  var MEMO_STATICS = {
    "$$typeof": true,
    compare: true,
    defaultProps: true,
    displayName: true,
    propTypes: true,
    type: true
  };
  var TYPE_STATICS = {};
  TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
  TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
  function getStatics(component) {
    if (reactIs.isMemo(component)) {
      return MEMO_STATICS;
    }
    return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
  }
  var defineProperty = Object.defineProperty;
  var getOwnPropertyNames = Object.getOwnPropertyNames;
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var getPrototypeOf = Object.getPrototypeOf;
  var objectPrototype = Object.prototype;
  function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
    if (typeof sourceComponent !== "string") {
      if (objectPrototype) {
        var inheritedComponent = getPrototypeOf(sourceComponent);
        if (inheritedComponent && inheritedComponent !== objectPrototype) {
          hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
        }
      }
      var keys = getOwnPropertyNames(sourceComponent);
      if (getOwnPropertySymbols) {
        keys = keys.concat(getOwnPropertySymbols(sourceComponent));
      }
      var targetStatics = getStatics(targetComponent);
      var sourceStatics = getStatics(sourceComponent);
      for (var i = 0; i < keys.length; ++i) {
        var key2 = keys[i];
        if (!KNOWN_STATICS[key2] && !(blacklist && blacklist[key2]) && !(sourceStatics && sourceStatics[key2]) && !(targetStatics && targetStatics[key2])) {
          var descriptor = getOwnPropertyDescriptor(sourceComponent, key2);
          try {
            defineProperty(targetComponent, key2, descriptor);
          } catch (e2) {
          }
        }
      }
    }
    return targetComponent;
  }
  var hoistNonReactStatics_cjs = hoistNonReactStatics;
  const hoistNonReactStatics$1 = getDefaultExportFromCjs(hoistNonReactStatics_cjs);
  function omit(input, fields) {
    const output = {};
    Object.keys(input).forEach((prop) => {
      if (!fields.includes(prop)) {
        output[prop] = input[prop];
      }
    });
    return output;
  }
  styled = function(Component) {
    const componentCreator = (style2, options = {}) => {
      const { name, ...stylesOptions } = options;
      let classNamePrefix = name;
      const stylesOrCreator = typeof style2 === "function" ? (theme) => ({
        root: (props) => style2({
          theme,
          ...props
        })
      }) : {
        root: style2
      };
      const useStyles = makeStyles(stylesOrCreator, {
        Component,
        name: name || Component.displayName,
        classNamePrefix,
        ...stylesOptions
      });
      let filterProps;
      if (style2.filterProps) {
        filterProps = style2.filterProps;
        delete style2.filterProps;
      }
      if (style2.propTypes) {
        style2.propTypes;
        delete style2.propTypes;
      }
      const StyledComponent = __mf_14(function StyledComponent2(props, ref) {
        const { children, className: classNameProp, clone, component: ComponentProp, ...other } = props;
        const classes = useStyles(props);
        const className = clsx(classes.root, classNameProp);
        let spread = other;
        if (filterProps) {
          spread = omit(spread, filterProps);
        }
        if (clone) {
          return __mf_9(children, {
            className: clsx(children.props.className, className),
            ...spread
          });
        }
        if (typeof children === "function") {
          return children({
            className,
            ...spread
          });
        }
        const FinalComponent = ComponentProp || Component;
        return jsxRuntimeExports.jsx(FinalComponent, {
          ref,
          className,
          ...spread,
          children
        });
      });
      hoistNonReactStatics$1(StyledComponent, Component);
      return StyledComponent;
    };
    return componentCreator;
  };
  useThemeVariants = (props, name) => {
    const { classes = {} } = props;
    const theme = useTheme();
    let variantsClasses = "";
    if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
      const themeVariants = theme.components[name].variants;
      themeVariants.forEach((themeVariant) => {
        let isMatch = true;
        Object.keys(themeVariant.props).forEach((key2) => {
          if (props[key2] !== themeVariant.props[key2]) {
            isMatch = false;
          }
        });
        if (isMatch) {
          variantsClasses = `${variantsClasses}${classes[propsToClassKey(themeVariant.props)]} `;
        }
      });
    }
    return variantsClasses;
  };
  withStyles = (stylesOrCreator, options = {}) => (Component) => {
    const { defaultTheme, withTheme: withTheme2 = false, name, ...stylesOptions } = options;
    let classNamePrefix = name;
    const useStyles = makeStyles(stylesOrCreator, {
      defaultTheme,
      Component,
      name: name || Component.displayName,
      classNamePrefix,
      ...stylesOptions
    });
    const WithStyles = __mf_14(function WithStyles2(props, ref) {
      const { classes: classesProp, ...other } = props;
      const classes = useStyles({
        ...Component.defaultProps,
        ...props
      });
      let theme;
      let more = other;
      if (typeof name === "string" || withTheme2) {
        theme = useTheme() || defaultTheme;
        if (name) {
          more = getThemeProps({
            theme,
            name,
            props: other
          });
        }
        if (withTheme2 && !more.theme) {
          more.theme = theme;
        }
      }
      return jsxRuntimeExports.jsx(Component, {
        ref,
        classes,
        ...more
      });
    });
    hoistNonReactStatics$1(WithStyles, Component);
    return WithStyles;
  };
  withThemeCreator = function(options = {}) {
    const { defaultTheme } = options;
    const withTheme2 = (Component) => {
      const WithTheme = __mf_14(function WithTheme2(props, ref) {
        const theme = useTheme() || defaultTheme;
        return jsxRuntimeExports.jsx(Component, {
          theme,
          ref,
          ...props
        });
      });
      hoistNonReactStatics$1(WithTheme, Component);
      return WithTheme;
    };
    return withTheme2;
  };
  withTheme = withThemeCreator();
});
export {
  ServerStyleSheets,
  StylesContext,
  StylesProvider,
  T as ThemeProvider,
  __tla,
  createGenerateClassName,
  createStyles,
  getThemeProps,
  jssPreset,
  makeStyles,
  mergeClasses,
  propsToClassKey,
  defaultSheetsManager as sheetsManager,
  styled,
  useTheme,
  useThemeVariants,
  withStyles,
  withTheme,
  withThemeCreator
};