import require$$0, { useEffect } from "react";
const pxToRem = (...e) => e.map((r) => `${r / 16}rem`).join(" "), pxToEm = (...e) => e.map((r) => `${r / 16}em`).join(" ");
var jsxRuntimeExports = {}, jsxRuntime = {
  get exports() {
    return jsxRuntimeExports;
  },
  set exports(e) {
    jsxRuntimeExports = e;
  }
}, reactJsxRuntime_production_min = {};
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReactJsxRuntime_production_min;
function requireReactJsxRuntime_production_min() {
  if (hasRequiredReactJsxRuntime_production_min)
    return reactJsxRuntime_production_min;
  hasRequiredReactJsxRuntime_production_min = 1;
  var e = require$$0, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
  function c(l, d, v) {
    var m, b = {}, _ = null, F = null;
    v !== void 0 && (_ = "" + v), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (F = d.ref);
    for (m in d)
      s.call(d, m) && !i.hasOwnProperty(m) && (b[m] = d[m]);
    if (l && l.defaultProps)
      for (m in d = l.defaultProps, d)
        b[m] === void 0 && (b[m] = d[m]);
    return { $$typeof: r, type: l, key: _, ref: F, props: b, _owner: n.current };
  }
  return reactJsxRuntime_production_min.Fragment = a, reactJsxRuntime_production_min.jsx = c, reactJsxRuntime_production_min.jsxs = c, reactJsxRuntime_production_min;
}
var reactJsxRuntime_development = {};
/**
 * @license React
 * react-jsx-runtime.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReactJsxRuntime_development;
function requireReactJsxRuntime_development() {
  return hasRequiredReactJsxRuntime_development || (hasRequiredReactJsxRuntime_development = 1, process.env.NODE_ENV !== "production" && function() {
    var e = require$$0, r = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), T = Symbol.iterator, $ = "@@iterator";
    function B(t) {
      if (t === null || typeof t != "object")
        return null;
      var o = T && t[T] || t[$];
      return typeof o == "function" ? o : null;
    }
    var O = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    function g(t) {
      {
        for (var o = arguments.length, u = new Array(o > 1 ? o - 1 : 0), f = 1; f < o; f++)
          u[f - 1] = arguments[f];
        x("error", t, u);
      }
    }
    function x(t, o, u) {
      {
        var f = O.ReactDebugCurrentFrame, y = f.getStackAddendum();
        y !== "" && (o += "%s", u = u.concat([y]));
        var S = u.map(function(h) {
          return String(h);
        });
        S.unshift("Warning: " + o), Function.prototype.apply.call(console[t], console, S);
      }
    }
    var j = !1, U = !1, Y = !1, H = !1, J = !1, W;
    W = Symbol.for("react.module.reference");
    function ae(t) {
      return !!(typeof t == "string" || typeof t == "function" || t === s || t === i || J || t === n || t === v || t === m || H || t === F || j || U || Y || typeof t == "object" && t !== null && (t.$$typeof === _ || t.$$typeof === b || t.$$typeof === c || t.$$typeof === l || t.$$typeof === d || // This needs to include all possible module reference object
      // types supported by any Flight configuration anywhere since
      // we don't know which Flight build this will end up being used
      // with.
      t.$$typeof === W || t.getModuleId !== void 0));
    }
    function P(t, o, u) {
      var f = t.displayName;
      if (f)
        return f;
      var y = o.displayName || o.name || "";
      return y !== "" ? u + "(" + y + ")" : u;
    }
    function L(t) {
      return t.displayName || "Context";
    }
    function C(t) {
      if (t == null)
        return null;
      if (typeof t.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
        return t.displayName || t.name || null;
      if (typeof t == "string")
        return t;
      switch (t) {
        case s:
          return "Fragment";
        case a:
          return "Portal";
        case i:
          return "Profiler";
        case n:
          return "StrictMode";
        case v:
          return "Suspense";
        case m:
          return "SuspenseList";
      }
      if (typeof t == "object")
        switch (t.$$typeof) {
          case l:
            var o = t;
            return L(o) + ".Consumer";
          case c:
            var u = t;
            return L(u._context) + ".Provider";
          case d:
            return P(t, t.render, "ForwardRef");
          case b:
            var f = t.displayName || null;
            return f !== null ? f : C(t.type) || "Memo";
          case _: {
            var y = t, S = y._payload, h = y._init;
            try {
              return C(h(S));
            } catch {
              return null;
            }
          }
        }
      return null;
    }
    var R = Object.assign, I = 0, V, M, D, z, X, fe, me;
    function pe() {
    }
    pe.__reactDisabledLog = !0;
    function Ce() {
      {
        if (I === 0) {
          V = console.log, M = console.info, D = console.warn, z = console.error, X = console.group, fe = console.groupCollapsed, me = console.groupEnd;
          var t = {
            configurable: !0,
            enumerable: !0,
            value: pe,
            writable: !0
          };
          Object.defineProperties(console, {
            info: t,
            log: t,
            warn: t,
            error: t,
            group: t,
            groupCollapsed: t,
            groupEnd: t
          });
        }
        I++;
      }
    }
    function Ee() {
      {
        if (I--, I === 0) {
          var t = {
            configurable: !0,
            enumerable: !0,
            writable: !0
          };
          Object.defineProperties(console, {
            log: R({}, t, {
              value: V
            }),
            info: R({}, t, {
              value: M
            }),
            warn: R({}, t, {
              value: D
            }),
            error: R({}, t, {
              value: z
            }),
            group: R({}, t, {
              value: X
            }),
            groupCollapsed: R({}, t, {
              value: fe
            }),
            groupEnd: R({}, t, {
              value: me
            })
          });
        }
        I < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
      }
    }
    var se = O.ReactCurrentDispatcher, ne;
    function Z(t, o, u) {
      {
        if (ne === void 0)
          try {
            throw Error();
          } catch (y) {
            var f = y.stack.trim().match(/\n( *(at )?)/);
            ne = f && f[1] || "";
          }
        return `
` + ne + t;
      }
    }
    var ie = !1, Q;
    {
      var Te = typeof WeakMap == "function" ? WeakMap : Map;
      Q = new Te();
    }
    function he(t, o) {
      if (!t || ie)
        return "";
      {
        var u = Q.get(t);
        if (u !== void 0)
          return u;
      }
      var f;
      ie = !0;
      var y = Error.prepareStackTrace;
      Error.prepareStackTrace = void 0;
      var S;
      S = se.current, se.current = null, Ce();
      try {
        if (o) {
          var h = function() {
            throw Error();
          };
          if (Object.defineProperty(h.prototype, "props", {
            set: function() {
              throw Error();
            }
          }), typeof Reflect == "object" && Reflect.construct) {
            try {
              Reflect.construct(h, []);
            } catch (A) {
              f = A;
            }
            Reflect.construct(t, [], h);
          } else {
            try {
              h.call();
            } catch (A) {
              f = A;
            }
            t.call(h.prototype);
          }
        } else {
          try {
            throw Error();
          } catch (A) {
            f = A;
          }
          t();
        }
      } catch (A) {
        if (A && f && typeof A.stack == "string") {
          for (var p = A.stack.split(`
`), N = f.stack.split(`
`), k = p.length - 1, w = N.length - 1; k >= 1 && w >= 0 && p[k] !== N[w]; )
            w--;
          for (; k >= 1 && w >= 0; k--, w--)
            if (p[k] !== N[w]) {
              if (k !== 1 || w !== 1)
                do
                  if (k--, w--, w < 0 || p[k] !== N[w]) {
                    var E = `
` + p[k].replace(" at new ", " at ");
                    return t.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", t.displayName)), typeof t == "function" && Q.set(t, E), E;
                  }
                while (k >= 1 && w >= 0);
              break;
            }
        }
      } finally {
        ie = !1, se.current = S, Ee(), Error.prepareStackTrace = y;
      }
      var G = t ? t.displayName || t.name : "", Ne = G ? Z(G) : "";
      return typeof t == "function" && Q.set(t, Ne), Ne;
    }
    function Oe(t, o, u) {
      return he(t, !1);
    }
    function Re(t) {
      var o = t.prototype;
      return !!(o && o.isReactComponent);
    }
    function ee(t, o, u) {
      if (t == null)
        return "";
      if (typeof t == "function")
        return he(t, Re(t));
      if (typeof t == "string")
        return Z(t);
      switch (t) {
        case v:
          return Z("Suspense");
        case m:
          return Z("SuspenseList");
      }
      if (typeof t == "object")
        switch (t.$$typeof) {
          case d:
            return Oe(t.render);
          case b:
            return ee(t.type);
          case _: {
            var f = t, y = f._payload, S = f._init;
            try {
              return ee(S(y));
            } catch {
            }
          }
        }
      return "";
    }
    var te = Object.prototype.hasOwnProperty, ge = {}, ve = O.ReactDebugCurrentFrame;
    function re(t) {
      if (t) {
        var o = ee(t.type);
        ve.setExtraStackFrame(o);
      } else
        ve.setExtraStackFrame(null);
    }
    function Pe(t, o, u, f, y) {
      {
        var S = Function.call.bind(te);
        for (var h in t)
          if (S(t, h)) {
            var p = void 0;
            try {
              if (typeof t[h] != "function") {
                var N = Error((f || "React class") + ": " + u + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
                throw N.name = "Invariant Violation", N;
              }
              p = t[h](o, h, f, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
            } catch (k) {
              p = k;
            }
            p && !(p instanceof Error) && (re(y), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", f || "React class", u, h, typeof p), re(null)), p instanceof Error && !(p.message in ge) && (ge[p.message] = !0, re(y), g("Failed %s type: %s", u, p.message), re(null));
          }
      }
    }
    var De = Array.isArray;
    function oe(t) {
      return De(t);
    }
    function Ae(t) {
      {
        var o = typeof Symbol == "function" && Symbol.toStringTag, u = o && t[Symbol.toStringTag] || t.constructor.name || "Object";
        return u;
      }
    }
    function Le(t) {
      try {
        return !1;
      } catch {
        return !0;
      }
    }
    function Ie(t) {
      return "" + t;
    }
    function ye(t) {
      if (Le())
        return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ae(t)), Ie(t);
    }
    var K = O.ReactCurrentOwner, Me = {
      key: !0,
      ref: !0,
      __self: !0,
      __source: !0
    }, be, xe, le;
    le = {};
    function $e(t) {
      if (te.call(t, "ref")) {
        var o = Object.getOwnPropertyDescriptor(t, "ref").get;
        if (o && o.isReactWarning)
          return !1;
      }
      return t.ref !== void 0;
    }
    function Be(t) {
      if (te.call(t, "key")) {
        var o = Object.getOwnPropertyDescriptor(t, "key").get;
        if (o && o.isReactWarning)
          return !1;
      }
      return t.key !== void 0;
    }
    function Ue(t, o) {
      if (typeof t.ref == "string" && K.current && o && K.current.stateNode !== o) {
        var u = C(K.current.type);
        le[u] || (g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', C(K.current.type), t.ref), le[u] = !0);
      }
    }
    function We(t, o) {
      {
        var u = function() {
          be || (be = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
        };
        u.isReactWarning = !0, Object.defineProperty(t, "key", {
          get: u,
          configurable: !0
        });
      }
    }
    function Ve(t, o) {
      {
        var u = function() {
          xe || (xe = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
        };
        u.isReactWarning = !0, Object.defineProperty(t, "ref", {
          get: u,
          configurable: !0
        });
      }
    }
    var ze = function(t, o, u, f, y, S, h) {
      var p = {
        // This tag allows us to uniquely identify this as a React Element
        $$typeof: r,
        // Built-in properties that belong on the element
        type: t,
        key: o,
        ref: u,
        props: h,
        // Record the component responsible for creating this element.
        _owner: S
      };
      return p._store = {}, Object.defineProperty(p._store, "validated", {
        configurable: !1,
        enumerable: !1,
        writable: !0,
        value: !1
      }), Object.defineProperty(p, "_self", {
        configurable: !1,
        enumerable: !1,
        writable: !1,
        value: f
      }), Object.defineProperty(p, "_source", {
        configurable: !1,
        enumerable: !1,
        writable: !1,
        value: y
      }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
    };
    function qe(t, o, u, f, y) {
      {
        var S, h = {}, p = null, N = null;
        u !== void 0 && (ye(u), p = "" + u), Be(o) && (ye(o.key), p = "" + o.key), $e(o) && (N = o.ref, Ue(o, y));
        for (S in o)
          te.call(o, S) && !Me.hasOwnProperty(S) && (h[S] = o[S]);
        if (t && t.defaultProps) {
          var k = t.defaultProps;
          for (S in k)
            h[S] === void 0 && (h[S] = k[S]);
        }
        if (p || N) {
          var w = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
          p && We(h, w), N && Ve(h, w);
        }
        return ze(t, p, N, y, f, K.current, h);
      }
    }
    var ue = O.ReactCurrentOwner, Se = O.ReactDebugCurrentFrame;
    function q(t) {
      if (t) {
        var o = ee(t.type);
        Se.setExtraStackFrame(o);
      } else
        Se.setExtraStackFrame(null);
    }
    var ce;
    ce = !1;
    function de(t) {
      return typeof t == "object" && t !== null && t.$$typeof === r;
    }
    function je() {
      {
        if (ue.current) {
          var t = C(ue.current.type);
          if (t)
            return `

Check the render method of \`` + t + "`.";
        }
        return "";
      }
    }
    function Ge(t) {
      {
        if (t !== void 0) {
          var o = t.fileName.replace(/^.*[\\\/]/, ""), u = t.lineNumber;
          return `

Check your code at ` + o + ":" + u + ".";
        }
        return "";
      }
    }
    var _e = {};
    function Ye(t) {
      {
        var o = je();
        if (!o) {
          var u = typeof t == "string" ? t : t.displayName || t.name;
          u && (o = `

Check the top-level render call using <` + u + ">.");
        }
        return o;
      }
    }
    function ke(t, o) {
      {
        if (!t._store || t._store.validated || t.key != null)
          return;
        t._store.validated = !0;
        var u = Ye(o);
        if (_e[u])
          return;
        _e[u] = !0;
        var f = "";
        t && t._owner && t._owner !== ue.current && (f = " It was passed a child from " + C(t._owner.type) + "."), q(t), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, f), q(null);
      }
    }
    function we(t, o) {
      {
        if (typeof t != "object")
          return;
        if (oe(t))
          for (var u = 0; u < t.length; u++) {
            var f = t[u];
            de(f) && ke(f, o);
          }
        else if (de(t))
          t._store && (t._store.validated = !0);
        else if (t) {
          var y = B(t);
          if (typeof y == "function" && y !== t.entries)
            for (var S = y.call(t), h; !(h = S.next()).done; )
              de(h.value) && ke(h.value, o);
        }
      }
    }
    function Je(t) {
      {
        var o = t.type;
        if (o == null || typeof o == "string")
          return;
        var u;
        if (typeof o == "function")
          u = o.propTypes;
        else if (typeof o == "object" && (o.$$typeof === d || // Note: Memo only checks outer props here.
        // Inner props are checked in the reconciler.
        o.$$typeof === b))
          u = o.propTypes;
        else
          return;
        if (u) {
          var f = C(o);
          Pe(u, t.props, "prop", f, t);
        } else if (o.PropTypes !== void 0 && !ce) {
          ce = !0;
          var y = C(o);
          g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown");
        }
        typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
      }
    }
    function Ke(t) {
      {
        for (var o = Object.keys(t.props), u = 0; u < o.length; u++) {
          var f = o[u];
          if (f !== "children" && f !== "key") {
            q(t), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), q(null);
            break;
          }
        }
        t.ref !== null && (q(t), g("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
      }
    }
    function Fe(t, o, u, f, y, S) {
      {
        var h = ae(t);
        if (!h) {
          var p = "";
          (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (p += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
          var N = Ge(y);
          N ? p += N : p += je();
          var k;
          t === null ? k = "null" : oe(t) ? k = "array" : t !== void 0 && t.$$typeof === r ? (k = "<" + (C(t.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : k = typeof t, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, p);
        }
        var w = qe(t, o, u, y, S);
        if (w == null)
          return w;
        if (h) {
          var E = o.children;
          if (E !== void 0)
            if (f)
              if (oe(E)) {
                for (var G = 0; G < E.length; G++)
                  we(E[G], t);
                Object.freeze && Object.freeze(E);
              } else
                g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
            else
              we(E, t);
        }
        return t === s ? Ke(w) : Je(w), w;
      }
    }
    function He(t, o, u) {
      return Fe(t, o, u, !0);
    }
    function Xe(t, o, u) {
      return Fe(t, o, u, !1);
    }
    var Ze = Xe, Qe = He;
    reactJsxRuntime_development.Fragment = s, reactJsxRuntime_development.jsx = Ze, reactJsxRuntime_development.jsxs = Qe;
  }()), reactJsxRuntime_development;
}
(function(e) {
  process.env.NODE_ENV === "production" ? e.exports = requireReactJsxRuntime_production_min() : e.exports = requireReactJsxRuntime_development();
})(jsxRuntime);
const Fragment = jsxRuntimeExports.Fragment, jsx = jsxRuntimeExports.jsx, jsxs = jsxRuntimeExports.jsxs, theme_css_ts_vanilla = "", button_css_ts_vanilla = "";
function _defineProperty$1(e, r, a) {
  return r in e ? Object.defineProperty(e, r, {
    value: a,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = a, e;
}
function ownKeys$1(e, r) {
  var a = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var s = Object.getOwnPropertySymbols(e);
    r && (s = s.filter(function(n) {
      return Object.getOwnPropertyDescriptor(e, n).enumerable;
    })), a.push.apply(a, s);
  }
  return a;
}
function _objectSpread2$1(e) {
  for (var r = 1; r < arguments.length; r++) {
    var a = arguments[r] != null ? arguments[r] : {};
    r % 2 ? ownKeys$1(Object(a), !0).forEach(function(s) {
      _defineProperty$1(e, s, a[s]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : ownKeys$1(Object(a)).forEach(function(s) {
      Object.defineProperty(e, s, Object.getOwnPropertyDescriptor(a, s));
    });
  }
  return e;
}
var shouldApplyCompound = (e, r, a) => {
  for (var s of Object.keys(e)) {
    var n;
    if (e[s] !== ((n = r[s]) !== null && n !== void 0 ? n : a[s]))
      return !1;
  }
  return !0;
}, createRuntimeFn = (e) => (r) => {
  var a = e.defaultClassName, s = _objectSpread2$1(_objectSpread2$1({}, e.defaultVariants), r);
  for (var n in s) {
    var i, c = (i = s[n]) !== null && i !== void 0 ? i : e.defaultVariants[n];
    if (c != null) {
      var l = c;
      typeof l == "boolean" && (l = l === !0 ? "true" : "false");
      var d = (
        // @ts-expect-error
        e.variantClassNames[n][l]
      );
      d && (a += " " + d);
    }
  }
  for (var [v, m] of e.compoundVariants)
    shouldApplyCompound(v, s, e.defaultVariants) && (a += " " + m);
  return a;
}, buttonStyle = createRuntimeFn({ defaultClassName: "hm2git0", variantClassNames: { size: { medium: "hm2git1", small: "hm2git2", large: "hm2git3" }, variant: { regular: "hm2git4", semibold: "hm2git5", outline: "hm2git6", error: "hm2git7" } }, defaultVariants: { size: "medium", variant: "regular" }, compoundVariants: [] });
const Button = ({
  header: e,
  size: r,
  variant: a,
  fullWidth: s,
  className: n,
  ...i
}) => /* @__PURE__ */ jsx("div", { className: n, children: /* @__PURE__ */ jsx(
  "button",
  {
    className: buttonStyle({ size: r, variant: a }),
    style: { width: s ? "100%" : "auto" },
    ...i,
    children: e
  }
) });
var classnamesExports = {}, classnames = {
  get exports() {
    return classnamesExports;
  },
  set exports(e) {
    classnamesExports = e;
  }
};
/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
(function(e) {
  (function() {
    var r = {}.hasOwnProperty;
    function a() {
      for (var s = [], n = 0; n < arguments.length; n++) {
        var i = arguments[n];
        if (i) {
          var c = typeof i;
          if (c === "string" || c === "number")
            s.push(i);
          else if (Array.isArray(i)) {
            if (i.length) {
              var l = a.apply(null, i);
              l && s.push(l);
            }
          } else if (c === "object")
            if (i.toString === Object.prototype.toString)
              for (var d in i)
                r.call(i, d) && i[d] && s.push(d);
            else
              s.push(i.toString());
        }
      }
      return s.join(" ");
    }
    e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
  })();
})(classnames);
const cn = classnamesExports, buttonLink_css_ts_vanilla = "";
var buttonLinkContainerStyle = createRuntimeFn({ defaultClassName: "_1kxba131", variantClassNames: { position: { inline: "_1kxba132", left: "_1kxba133", center: "_1kxba134", right: "_1kxba135" } }, defaultVariants: { position: "inline" }, compoundVariants: [] }), buttonLinkIconStyle = "_1kxba136", buttonLinkStyle = createRuntimeFn({ defaultClassName: "_1kxba130", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
const buttonSocial_css_ts_vanilla = "";
var buttonSocialIconEndStyle = createRuntimeFn({ defaultClassName: "i8n2ika", variantClassNames: { size: { small: "i8n2ikb", medium: "i8n2ikc", large: "i8n2ikd" } }, defaultVariants: {}, compoundVariants: [] }), buttonSocialIconStartStyle = createRuntimeFn({ defaultClassName: "i8n2ik6", variantClassNames: { size: { small: "i8n2ik7", medium: "i8n2ik8", large: "i8n2ik9" } }, defaultVariants: {}, compoundVariants: [] }), buttonSocialStyle = createRuntimeFn({ defaultClassName: "i8n2ik0", variantClassNames: { size: { small: "i8n2ik1", medium: "i8n2ik2", large: "i8n2ik3" }, variant: { regular: "i8n2ik4", semibold: "i8n2ik5" } }, defaultVariants: { size: "medium" }, compoundVariants: [] });
const card_css_ts_vanilla = "";
var cardStyle = createRuntimeFn({ defaultClassName: "_1xqjo9i0", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] }), cardTitleImage = "_1xqjo9i2", cardTitleStyle = "_1xqjo9i1";
const checkbox_css_ts_vanilla = "";
var checkboxInputStyle = "_13ulsr11", checkboxStyle = "_13ulsr10";
const codebox_css_ts_vanilla = "";
var codeboxContentStyle = "gasiv42", codeboxHeaderStyle = "gasiv41", codeboxStyle = "gasiv40";
const colors_css_ts_vanilla = "";
function _defineProperty(e, r, a) {
  return r in e ? Object.defineProperty(e, r, {
    value: a,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = a, e;
}
function ownKeys(e, r) {
  var a = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var s = Object.getOwnPropertySymbols(e);
    r && (s = s.filter(function(n) {
      return Object.getOwnPropertyDescriptor(e, n).enumerable;
    })), a.push.apply(a, s);
  }
  return a;
}
function _objectSpread2(e) {
  for (var r = 1; r < arguments.length; r++) {
    var a = arguments[r] != null ? arguments[r] : {};
    r % 2 ? ownKeys(Object(a), !0).forEach(function(s) {
      _defineProperty(e, s, a[s]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : ownKeys(Object(a)).forEach(function(s) {
      Object.defineProperty(e, s, Object.getOwnPropertyDescriptor(a, s));
    });
  }
  return e;
}
var createSprinkles$1 = (e) => function() {
  for (var r = arguments.length, a = new Array(r), s = 0; s < r; s++)
    a[s] = arguments[s];
  var n = Object.assign({}, ...a.map((d) => d.styles)), i = Object.keys(n), c = i.filter((d) => "mappings" in n[d]), l = (d) => {
    var v = [], m = {}, b = _objectSpread2({}, d), _ = !1;
    for (var F of c) {
      var T = d[F];
      if (T != null) {
        var $ = n[F];
        _ = !0;
        for (var B of $.mappings)
          m[B] = T, b[B] == null && delete b[B];
      }
    }
    var O = _ ? _objectSpread2(_objectSpread2({}, m), b) : d;
    for (var g in O) {
      var x = O[g], j = n[g];
      try {
        if (j.mappings)
          continue;
        if (typeof x == "string" || typeof x == "number") {
          if (process.env.NODE_ENV !== "production" && !j.values[x].defaultClass)
            throw new Error();
          v.push(j.values[x].defaultClass);
        } else if (Array.isArray(x))
          for (var U = 0; U < x.length; U++) {
            var Y = x[U];
            if (Y != null) {
              var H = j.responsiveArray[U];
              if (process.env.NODE_ENV !== "production" && !j.values[Y].conditions[H])
                throw new Error();
              v.push(j.values[Y].conditions[H]);
            }
          }
        else
          for (var J in x) {
            var W = x[J];
            if (W != null) {
              if (process.env.NODE_ENV !== "production" && !j.values[W].conditions[J])
                throw new Error();
              v.push(j.values[W].conditions[J]);
            }
          }
      } catch (ae) {
        throw process.env.NODE_ENV !== "production" && function() {
          class P extends Error {
            constructor(z) {
              super(z), this.name = "SprinklesError";
            }
          }
          var L = (D) => typeof D == "string" ? '"'.concat(D, '"') : D, C = (D, z, X) => {
            throw new P('"'.concat(D, '" has no value ').concat(L(z), ". Possible values are ").concat(Object.keys(X).map(L).join(", ")));
          };
          if (!j)
            throw new P('"'.concat(g, '" is not a valid sprinkle'));
          if ((typeof x == "string" || typeof x == "number") && (x in j.values || C(g, x, j.values), !j.values[x].defaultClass))
            throw new P('"'.concat(g, '" has no default condition. You must specify which conditions to target explicitly. Possible options are ').concat(Object.keys(j.values[x].conditions).map(L).join(", ")));
          if (typeof x == "object") {
            if (!("conditions" in j.values[Object.keys(j.values)[0]]))
              throw new P('"'.concat(g, '" is not a conditional property'));
            if (Array.isArray(x)) {
              if (!("responsiveArray" in j))
                throw new P('"'.concat(g, '" does not support responsive arrays'));
              var R = j.responsiveArray.length;
              if (R < x.length)
                throw new P('"'.concat(g, '" only supports up to ').concat(R, " breakpoints. You passed ").concat(x.length));
              for (var I of x)
                j.values[I] || C(g, I, j.values);
            } else
              for (var V in x) {
                var M = x[V];
                if (M != null && (j.values[M] || C(g, M, j.values), !j.values[M].conditions[V]))
                  throw new P('"'.concat(g, '" has no condition named ').concat(L(V), ". Possible values are ").concat(Object.keys(j.values[M].conditions).map(L).join(", ")));
              }
          }
        }(), ae;
      }
    }
    return e(v.join(" "));
  };
  return Object.assign(l, {
    properties: new Set(i)
  });
}, composeStyles = (e) => e, createSprinkles = function() {
  return createSprinkles$1(composeStyles)(...arguments);
}, colorProperties = { conditions: void 0, styles: { color: { values: { accentDisabled: { defaultClass: "_8awkg00" }, accentDefault: { defaultClass: "_8awkg01" }, accentMuted: { defaultClass: "_8awkg02" }, accentSubtle: { defaultClass: "_8awkg03" }, accentEmphasis: { defaultClass: "_8awkg04" }, foregroundDefault: { defaultClass: "_8awkg05" }, foregroundMuted: { defaultClass: "_8awkg06" }, foregroundSubtle: { defaultClass: "_8awkg07" }, foregroundDisabled: { defaultClass: "_8awkg08" }, foregroundOnDisabled: { defaultClass: "_8awkg09" }, foregroundOnDark: { defaultClass: "_8awkg0a" }, foregroundOnAccent: { defaultClass: "_8awkg0b" }, backgroundSurface: { defaultClass: "_8awkg0c" }, backgroundCanvas: { defaultClass: "_8awkg0d" }, backgroundSubtle: { defaultClass: "_8awkg0e" }, errorDefault: { defaultClass: "_8awkg0f" }, errorSubtle: { defaultClass: "_8awkg0g" }, errorMuted: { defaultClass: "_8awkg0h" }, errorEmphasis: { defaultClass: "_8awkg0i" }, successEmphasis: { defaultClass: "_8awkg0j" }, borderDefault: { defaultClass: "_8awkg0k" }, textDefault: { defaultClass: "_8awkg0l" }, textDisabled: { defaultClass: "_8awkg0m" }, inputBackground: { defaultClass: "_8awkg0n" }, inputDisabled: { defaultClass: "_8awkg0o" }, inputPlaceholder: { defaultClass: "_8awkg0p" }, inputText: { defaultClass: "_8awkg0q" } } } } }, colorSprinkle = createSprinkles({ conditions: void 0, styles: { color: { values: { accentDisabled: { defaultClass: "_8awkg00" }, accentDefault: { defaultClass: "_8awkg01" }, accentMuted: { defaultClass: "_8awkg02" }, accentSubtle: { defaultClass: "_8awkg03" }, accentEmphasis: { defaultClass: "_8awkg04" }, foregroundDefault: { defaultClass: "_8awkg05" }, foregroundMuted: { defaultClass: "_8awkg06" }, foregroundSubtle: { defaultClass: "_8awkg07" }, foregroundDisabled: { defaultClass: "_8awkg08" }, foregroundOnDisabled: { defaultClass: "_8awkg09" }, foregroundOnDark: { defaultClass: "_8awkg0a" }, foregroundOnAccent: { defaultClass: "_8awkg0b" }, backgroundSurface: { defaultClass: "_8awkg0c" }, backgroundCanvas: { defaultClass: "_8awkg0d" }, backgroundSubtle: { defaultClass: "_8awkg0e" }, errorDefault: { defaultClass: "_8awkg0f" }, errorSubtle: { defaultClass: "_8awkg0g" }, errorMuted: { defaultClass: "_8awkg0h" }, errorEmphasis: { defaultClass: "_8awkg0i" }, successEmphasis: { defaultClass: "_8awkg0j" }, borderDefault: { defaultClass: "_8awkg0k" }, textDefault: { defaultClass: "_8awkg0l" }, textDisabled: { defaultClass: "_8awkg0m" }, inputBackground: { defaultClass: "_8awkg0n" }, inputDisabled: { defaultClass: "_8awkg0o" }, inputPlaceholder: { defaultClass: "_8awkg0p" }, inputText: { defaultClass: "_8awkg0q" } } } } });
const defaultBreakpoints = {
  // using em here as it is more consistent across browsers
  xs: pxToEm(390),
  sm: pxToEm(640),
  md: pxToEm(768),
  lg: pxToEm(1024),
  xl: pxToEm(1280),
  xl2: pxToEm(1536)
}, defaultFont = {
  fontFamily: "Inter",
  fontFamilyMono: "JetBrainsMono",
  fontStyle: "normal"
}, defaultLightTheme = {
  fontFamily: "Inter",
  fontFamilyMono: "JetBrainsMono",
  fontStyle: "normal",
  accent: {
    def: "#3D53F5",
    muted: "#6475F7",
    emphasis: "#3142C4",
    disabled: "#E0E0E0",
    subtle: "#eceefe"
  },
  foreground: {
    def: "#171717",
    muted: "#616161",
    subtle: "#9E9E9E",
    disabled: "#BDBDBD",
    onDark: "#FFFFFF",
    onAccent: "#FFFFFF",
    onDisabled: "#e0e0e0"
  },
  background: {
    surface: "#FFFFFF",
    canvas: "#FCFCFC",
    subtle: "#EEEEEE"
  },
  error: {
    def: "#9c0f2e",
    subtle: "#fce8ec",
    muted: "#e95c7b",
    emphasis: "#DF1642"
  },
  success: {
    emphasis: "#18A957"
  },
  border: {
    def: "#EEEEEE"
  },
  text: {
    def: "#FFFFFF",
    disabled: "#757575"
  },
  input: {
    background: "#FFFFFF",
    disabled: "#E0E0E0",
    placeholder: "#9E9E9E",
    text: "#424242"
  }
}, defaultDarkTheme = {
  fontFamily: "Inter",
  fontFamilyMono: "JetBrainsMono",
  fontStyle: "normal",
  accent: {
    def: "#6475f7",
    disabled: "#757575",
    muted: "#3142c4",
    emphasis: "#3d53f5",
    subtle: "#0c1131"
  },
  foreground: {
    def: "#FFFFFF",
    muted: "#ddd9f7",
    subtle: "#9a8ce8",
    onDark: "#FFFFFF",
    onAccent: "#FFFFFF",
    onDisabled: "#e0e0e0",
    disabled: "#bdbdbd"
  },
  background: {
    surface: "#110d2b",
    canvas: "#090616",
    subtle: "#221C56"
  },
  border: {
    def: "#221956"
  },
  error: {
    def: "#e95c7b",
    subtle: "#2d040d",
    muted: "#9c0f2e",
    emphasis: "#df1642"
  },
  success: {
    emphasis: "#18a957"
  },
  input: {
    background: "#FFFFFF",
    text: "#424242",
    placeholder: "#9e9e9e",
    disabled: "#eeeeee"
  },
  text: {
    def: "#FFFFFF",
    disabled: "#757575"
  }
}, divider_css_ts_vanilla = "";
var dividerStyle = createRuntimeFn({ defaultClassName: "_15i54991", variantClassNames: { sizes: { fullWidth: "_15i54992" } }, defaultVariants: {}, compoundVariants: [] }), dividerTextStyle = "_15i54990";
const form_css_ts_vanilla = "";
var formStyle = "_1pmqm1m0";
const grid_css_ts_vanilla = "";
var gridStyle = createRuntimeFn({ defaultClassName: "v30igv0", variantClassNames: { direction: { row: "v30igv1", column: "v30igv2" }, gap: { 4: "v30igv3", 8: "v30igv4", 16: "v30igv5", 24: "v30igv6", 32: "v30igv7", 64: "v30igv8" } }, defaultVariants: {}, compoundVariants: [] });
const inputField_css_ts_vanilla = "";
var inputFieldStyle = "db4loq1", inputFieldTitleStyle = "db4loq0";
const menuLink_css_ts_vanilla = "";
var menuLinkIconLeftStyle = "_1p4e0o41", menuLinkStyle = "_1p4e0o40", menuLinkTextStyle = "_1p4e0o42";
const message_css_ts_vanilla = "";
var messageStyle = createRuntimeFn({ defaultClassName: "_5sut1r0", variantClassNames: { textPosition: { start: "_5sut1r1", center: "_5sut1r2", end: "_5sut1r3" }, severity: { error: "_5sut1r4", success: "_5sut1r5", info: "_5sut1r6", disabled: "_5sut1r7", default: "_5sut1r8" } }, defaultVariants: { textPosition: "center", severity: "default" }, compoundVariants: [] });
const nav_css_ts_vanilla = "";
var navMainSectionStyle = "_946e774", navMenuLinkSelectedStyle = "_946e773", navMenuSectionStyle = "_946e772", navSectionBottom = "_946e775", navSectionTitleStyle = "_946e771", navStyle = "_946e770", oryTheme = { fontFamily: "var(--ory-theme-font-family)", fontFamilyMono: "var(--ory-theme-font-family-mono)", fontStyle: "var(--ory-theme-font-style)", accent: { def: "var(--ory-theme-accent-def)", muted: "var(--ory-theme-accent-muted)", emphasis: "var(--ory-theme-accent-emphasis)", disabled: "var(--ory-theme-accent-disabled)", subtle: "var(--ory-theme-accent-subtle)" }, foreground: { def: "var(--ory-theme-foreground-def)", muted: "var(--ory-theme-foreground-muted)", subtle: "var(--ory-theme-foreground-subtle)", disabled: "var(--ory-theme-foreground-disabled)", onDark: "var(--ory-theme-foreground-on-dark)", onAccent: "var(--ory-theme-foreground-on-accent)", onDisabled: "var(--ory-theme-foreground-on-disabled)" }, background: { surface: "var(--ory-theme-background-surface)", canvas: "var(--ory-theme-background-canvas)", subtle: "var(--ory-theme-background-subtle)" }, error: { def: "var(--ory-theme-error-def)", subtle: "var(--ory-theme-error-subtle)", muted: "var(--ory-theme-error-muted)", emphasis: "var(--ory-theme-error-emphasis)" }, success: { emphasis: "var(--ory-theme-success-emphasis)" }, border: { def: "var(--ory-theme-border-def)" }, text: { def: "var(--ory-theme-text-def)", disabled: "var(--ory-theme-text-disabled)" }, input: { background: "var(--ory-theme-input-background)", disabled: "var(--ory-theme-input-disabled)", placeholder: "var(--ory-theme-input-placeholder)", text: "var(--ory-theme-input-text)" } };
const typography_css_ts_vanilla = "";
var inputTypographyStyle = createRuntimeFn({ defaultClassName: "_1nljf820", variantClassNames: { size: { 16: "_1nljf821", 18: "_1nljf822" }, type: { regular: "_1nljf823", semiBold: "_1nljf824" } }, defaultVariants: { size: 16, type: "regular" }, compoundVariants: [] }), typographyStyle = createRuntimeFn({ defaultClassName: "_1nljf825", variantClassNames: { size: { tiny: "_1nljf826", xsmall: "_1nljf827", small: "_1nljf828", caption: "_1nljf829", body: "_1nljf82a", lead: "_1nljf82b", headline21: "_1nljf82c", headline26: "_1nljf82d", headline31: "_1nljf82e", headline37: "_1nljf82f", headline48: "_1nljf82g", display: "_1nljf82h", hero: "_1nljf82i", uber: "_1nljf82j", colossus: "_1nljf82k", monoCaption: "_1nljf82l" }, type: { regular: "_1nljf82m", bold: "_1nljf82n" } }, defaultVariants: { type: "regular" }, compoundVariants: [] });
const ButtonLink = ({
  href: e,
  className: r,
  icon: a,
  children: s,
  position: n,
  ...i
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      r,
      typographyStyle({ size: "caption", type: "regular" }),
      buttonLinkContainerStyle({ position: n })
    ),
    children: /* @__PURE__ */ jsxs("a", { className: buttonLinkStyle(), href: e, ...i, children: [
      a && /* @__PURE__ */ jsx("i", { className: cn(`fa fa-${a}`, buttonLinkIconStyle) }),
      s
    ] })
  }
), ButtonSocial = ({
  header: e,
  brand: r,
  size: a,
  variant: s,
  fullWidth: n,
  className: i,
  ...c
}) => {
  const l = r !== "generic" ? `fa-brands fa-${r}` : "fa-solid fa-layer-group";
  return /* @__PURE__ */ jsx("div", { className: i, children: /* @__PURE__ */ jsxs(
    "button",
    {
      className: buttonSocialStyle({ size: a, variant: s }),
      style: { width: n ? "100%" : "auto" },
      ...c,
      children: [
        /* @__PURE__ */ jsx("i", { className: cn(l, buttonSocialIconStartStyle({ size: a })) }),
        e,
        /* @__PURE__ */ jsx(
          "i",
          {
            className: cn(l, buttonSocialIconEndStyle({ size: a })),
            style: { visibility: "hidden", opacity: 0 }
          }
        )
      ]
    }
  ) });
}, Card = ({
  heading: e,
  image: r,
  className: a,
  children: s,
  ...n
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      cardStyle(),
      typographyStyle({ type: "regular", size: "small" }),
      a
    ),
    ...n,
    children: /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
      r && /* @__PURE__ */ jsx("div", { className: cardTitleImage, children: typeof r == "string" ? /* @__PURE__ */ jsx(
        "img",
        {
          style: {
            width: "auto"
          },
          src: r,
          alt: r,
          width: "100%",
          height: "100%"
        }
      ) : r }),
      /* @__PURE__ */ jsx("div", { className: cardTitleStyle, children: typeof e == "string" ? /* @__PURE__ */ jsx("h3", { className: typographyStyle({ type: "regular", size: "small" }), children: e }) : e }),
      /* @__PURE__ */ jsx("div", { children: s })
    ] })
  }
), cardGradient_css_ts_vanilla = "";
var cardContainer = "ut7kc70", cardGradientActionStyle = createRuntimeFn({ defaultClassName: "ut7kc74", variantClassNames: { disabled: { true: "ut7kc75", false: "ut7kc76" } }, defaultVariants: { disabled: !1 }, compoundVariants: [] }), cardGradientOverlayStyle = createRuntimeFn({ defaultClassName: "ut7kc71", variantClassNames: { disabled: { true: "ut7kc72", false: "ut7kc73" } }, defaultVariants: { disabled: !1 }, compoundVariants: [] });
const CardGradient = ({
  heading: e,
  content: r,
  action: a,
  target: s,
  disabled: n,
  className: i,
  ...c
}) => /* @__PURE__ */ jsxs(
  "a",
  {
    className: cn(cardContainer, cardGradientOverlayStyle({ disabled: n })),
    target: s,
    "aria-disabled": n,
    ...!n && { href: a },
    ...c,
    children: [
      /* @__PURE__ */ jsx(
        "div",
        {
          className: cn(
            colorSprinkle({
              color: n ? "foregroundOnDisabled" : "foregroundOnDark"
            }),
            i
          ),
          children: /* @__PURE__ */ jsxs("div", { className: cn(gridStyle({ gap: 16 })), children: [
            typeof e == "string" ? /* @__PURE__ */ jsx(
              "div",
              {
                className: typographyStyle({ size: "headline21", type: "bold" }),
                children: e
              }
            ) : e,
            typeof r == "string" ? /* @__PURE__ */ jsx("div", { className: typographyStyle({ size: "small", type: "regular" }), children: r }) : r
          ] })
        }
      ),
      /* @__PURE__ */ jsx(
        "i",
        {
          className: cn("fa fa-arrow-right", cardGradientActionStyle({ disabled: n }))
        }
      )
    ]
  }
), Message = ({
  severity: e,
  textPosition: r,
  className: a,
  children: s,
  ...n
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      messageStyle({ severity: e, textPosition: r }),
      typographyStyle({ size: "caption", type: "regular" }),
      a
    ),
    ...n,
    children: s
  }
), Checkbox = ({
  className: e,
  label: r,
  helperMessage: a,
  messageTestId: s,
  dataTestid: n,
  ...i
}) => {
  const c = i.id ?? Math.random().toString(36).substring(2);
  return /* @__PURE__ */ jsxs(
    "div",
    {
      "data-testid": n,
      className: gridStyle({ gap: 4, direction: "column" }),
      children: [
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: cn(
              e,
              typographyStyle({ type: "regular", size: "caption" }),
              checkboxStyle
            ),
            children: [
              /* @__PURE__ */ jsx(
                "input",
                {
                  className: checkboxInputStyle,
                  id: c,
                  type: "checkbox",
                  value: 1,
                  ...i
                }
              ),
              r && /* @__PURE__ */ jsx("label", { htmlFor: c, children: /* @__PURE__ */ jsx("span", { children: r }) })
            ]
          }
        ),
        typeof a == "string" ? /* @__PURE__ */ jsx(
          Message,
          {
            "data-testid": s,
            severity: i.severity,
            textPosition: "start",
            children: a
          }
        ) : a
      ]
    }
  );
}, CodeBox = ({
  children: e,
  className: r,
  ...a
}) => {
  const s = Math.random().toString(36).substring(2);
  return /* @__PURE__ */ jsxs(
    "div",
    {
      className: cn(r, gridStyle({ gap: 16 }), codeboxStyle),
      ...a,
      children: [
        /* @__PURE__ */ jsx("input", { id: s, type: "checkbox" }),
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: cn(typographyStyle({ size: "small" }), codeboxHeaderStyle),
            children: [
              /* @__PURE__ */ jsx("div", { children: "Toggle content" }),
              /* @__PURE__ */ jsxs("label", { htmlFor: s, children: [
                /* @__PURE__ */ jsx(
                  "i",
                  {
                    className: cn(
                      "fa fa-caret-down",
                      colorSprinkle({ color: "accentDefault" })
                    )
                  }
                ),
                /* @__PURE__ */ jsx(
                  "i",
                  {
                    className: cn(
                      "fa fa-caret-up",
                      colorSprinkle({ color: "accentDefault" })
                    )
                  }
                )
              ] })
            ]
          }
        ),
        /* @__PURE__ */ jsx(
          "pre",
          {
            className: cn(
              colorSprinkle({ color: "accentEmphasis" }),
              codeboxContentStyle
            ),
            children: e
          }
        )
      ]
    }
  );
}, Divider = ({
  className: e,
  fullWidth: r,
  text: a,
  ...s
}) => a ? /* @__PURE__ */ jsx("div", { className: cn(dividerTextStyle, e), ...s, children: a }) : /* @__PURE__ */ jsx(
  "hr",
  {
    className: cn(
      dividerStyle(r ? { sizes: "fullWidth" } : {}),
      e
    ),
    ...s
  }
), InputField = ({
  header: e,
  helperMessage: r,
  messageTestId: a,
  fullWidth: s,
  className: n,
  dataTestid: i,
  ...c
}) => /* @__PURE__ */ jsxs(
  "div",
  {
    "data-testid": i,
    className: cn(n, gridStyle({ gap: 4 })),
    children: [
      e && /* @__PURE__ */ jsxs("div", { className: typographyStyle({ size: "small", type: "regular" }), children: [
        e,
        " ",
        c.required && /* @__PURE__ */ jsx("span", { className: inputFieldTitleStyle, children: "*" })
      ] }),
      /* @__PURE__ */ jsx(
        "input",
        {
          className: cn(
            inputFieldStyle,
            typographyStyle({ size: "small", type: "regular" })
          ),
          style: { width: s ? "100%" : "auto" },
          placeholder: " ",
          ...c
        }
      ),
      typeof r == "string" ? /* @__PURE__ */ jsx(Message, { "data-testid": a, severity: c.severity, children: r }) : r
    ]
  }
), MenuLink = ({
  href: e,
  children: r,
  target: a,
  disabled: s,
  iconLeft: n,
  iconRight: i,
  className: c,
  ...l
}) => /* @__PURE__ */ jsxs("div", { className: cn(c, menuLinkStyle), ...l, children: [
  /* @__PURE__ */ jsxs(
    "a",
    {
      className: cn(
        typographyStyle({ size: "small", type: "regular" }),
        colorSprinkle({
          color: s ? "foregroundDisabled" : "foregroundMuted"
        }),
        menuLinkTextStyle
      ),
      "aria-disabled": s,
      ...!s && { href: e },
      ...a && { target: a },
      children: [
        n && /* @__PURE__ */ jsx("i", { className: cn("fa", `fa-${n}`, menuLinkIconLeftStyle) }),
        r
      ]
    }
  ),
  i && /* @__PURE__ */ jsx(
    "i",
    {
      className: cn(
        "fa",
        `fa-${i}`,
        colorSprinkle({
          color: s ? "foregroundDisabled" : "foregroundMuted"
        })
      )
    }
  )
] }), Nav = ({
  navTitle: e,
  navSections: r,
  className: a,
  ...s
}) => /* @__PURE__ */ jsxs("nav", { role: "navigation", className: cn(navStyle, a), ...s, children: [
  /* @__PURE__ */ jsx("input", { id: "collapse-nav", type: "checkbox" }),
  /* @__PURE__ */ jsxs(
    "div",
    {
      className: cn(
        navSectionTitleStyle,
        typographyStyle({ size: "caption" }),
        colorSprinkle({ color: "accentDefault" })
      ),
      children: [
        e,
        /* @__PURE__ */ jsxs("label", { htmlFor: "collapse-nav", children: [
          /* @__PURE__ */ jsx("i", { className: cn("fa", "fa-bars") }),
          /* @__PURE__ */ jsx("i", { className: cn("fa", "fa-xmark") })
        ] })
      ]
    }
  ),
  /* @__PURE__ */ jsx(
    "ul",
    {
      className: cn(
        navMainSectionStyle,
        navMenuSectionStyle,
        gridStyle({ gap: 24 })
      ),
      children: r.map((n, i) => /* @__PURE__ */ jsxs(
        "li",
        {
          ...n.floatBottom && { className: navSectionBottom },
          children: [
            n.title && /* @__PURE__ */ jsxs(
              "div",
              {
                className: cn(
                  typographyStyle({ size: "xsmall", type: "bold" }),
                  colorSprinkle({ color: "foregroundDefault" }),
                  navSectionTitleStyle
                ),
                children: [
                  n.title,
                  /* @__PURE__ */ jsx("i", { className: `fa fa-${n.titleIcon}` })
                ]
              }
            ),
            /* @__PURE__ */ jsx("ul", { className: navMenuSectionStyle, children: n.links.map(({ testId: c, ...l }, d) => /* @__PURE__ */ jsx(
              "li",
              {
                ...l.selected && { className: navMenuLinkSelectedStyle },
                children: /* @__PURE__ */ jsx(MenuLink, { "data-testid": c, ...l, children: l.name })
              },
              d
            )) })
          ]
        },
        i
      ))
    }
  )
] }), MessageSection = ({
  text: e,
  url: r,
  buttonText: a,
  dataTestId: s
}) => /* @__PURE__ */ jsxs(Message, { className: colorSprinkle({ color: "foregroundMuted" }), children: [
  e,
  " ",
  /* @__PURE__ */ jsx(ButtonLink, { "data-testid": s, href: r, children: a })
] }), nodeMessage = ({ text: e, id: r, type: a, key: s, ...n }) => /* @__PURE__ */ jsx(
  Message,
  {
    "data-testid": `ui/message/${r}`,
    severity: a,
    ...n,
    children: e
  },
  s
), NodeMessages = ({
  nodes: e,
  uiMessages: r,
  ...a
}) => {
  const { gap: s, direction: n, ...i } = a, c = e?.reduce(
    (v, { messages: m }) => (v.push(
      ...m.map(({ text: b, id: _, type: F }, T) => nodeMessage({
        text: b,
        id: _,
        type: F,
        key: `node-group-message-${_}-${T}`,
        ...i
      })).filter(Boolean)
    ), v),
    []
  ), l = r?.map(
    ({ text: v, id: m, type: b }, _) => nodeMessage({ text: v, id: m, type: b, key: `ui-messsage-${m}-${_}` })
  ), d = [...c || [], ...l || []];
  return d.length > 0 ? /* @__PURE__ */ jsx(
    "div",
    {
      className: gridStyle({
        gap: s || 16,
        direction: n
      }),
      children: d
    }
  ) : null;
}, getNodeLabel = (e) => {
  const r = e.attributes;
  return isUiNodeAnchorAttributes(r) ? r.title.text : isUiNodeImageAttributes(r) ? e.meta.label?.text || "" : isUiNodeInputAttributes(r) && r.label?.text ? r.label.text : e.meta.label?.text || "";
};
function isUiNodeAnchorAttributes(e) {
  return e.node_type === "a";
}
function isUiNodeImageAttributes(e) {
  return e.node_type === "img";
}
function isUiNodeInputAttributes(e) {
  return e.node_type === "input";
}
function isUiNodeTextAttributes(e) {
  return e.node_type === "text";
}
const getNodeInputType = (e) => e?.type ?? "", filterNodesByGroups = ({
  nodes: e,
  groups: r,
  withoutDefaultGroup: a,
  attributes: s,
  withoutDefaultAttributes: n,
  excludeAttributes: i
}) => {
  const c = (l) => typeof l == "string" ? l.split(",") : l;
  return e.filter(({ group: l, attributes: d }) => {
    if (!r && !s && !i)
      return !0;
    const v = c(r) || [];
    a || v.push("default");
    const m = c(s) || [];
    n || (l.includes("default") && m.push("hidden"), (l.includes("webauthn") || l.includes("totp")) && m.push("input", "script"));
    const b = c(i) || [], _ = r ? v.includes(l) : !0, F = s ? m.includes(getNodeInputType(d)) : !0, T = i ? !b.includes(getNodeInputType(d)) : !0;
    return _ && F && T;
  });
}, Image = ({ header: e, className: r, ...a }) => /* @__PURE__ */ jsxs("div", { className: cn(r, gridStyle({ gap: 4 })), children: [
  e && /* @__PURE__ */ jsx("div", { className: typographyStyle({ size: "small", type: "regular" }), children: e }),
  /* @__PURE__ */ jsx("img", { ...a })
] }), Typography = ({
  children: e,
  size: r,
  type: a,
  color: s,
  className: n,
  ...i
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      typographyStyle({ size: r, type: a }),
      colorSprinkle({ color: s }),
      n
    ),
    ...i,
    children: e
  }
), Node = ({
  node,
  className,
  buttonOverrideProps,
  buttonSocialOverrideProps
}) => {
  if (isUiNodeImageAttributes(node.attributes))
    return /* @__PURE__ */ jsx(
      Image,
      {
        src: node.attributes.src,
        alt: node.meta.label?.text,
        "data-testid": `node/image/${node.attributes.id}`,
        header: node.meta.label?.text,
        width: node.attributes.width,
        height: node.attributes.height
      }
    );
  if (isUiNodeTextAttributes(node.attributes)) {
    const e = node.attributes.id;
    return node.attributes.text.id === 1050015 ? /* @__PURE__ */ jsxs(
      "div",
      {
        className: gridStyle({ gap: 4, direction: "row" }),
        style: {
          display: "inline-flex",
          flexWrap: "wrap",
          gap: pxToRem(48),
          maxWidth: "fit-content",
          alignItems: "center"
        },
        "data-testid": `node/text/${e}`,
        children: [
          /* @__PURE__ */ jsx(
            Typography,
            {
              variant: "body1",
              "data-testid": `node/text/${node.attributes.id}/label`,
              style: { flexBasis: "100%" },
              children: node.meta.label?.text
            }
          ),
          node.attributes.text.context.secrets.map(
            ({ text: r, id: a }, s) => a === 1050014 ? /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("del", { "data-testid": "node/text/lookup_secret_codes/text", children: /* @__PURE__ */ jsx("code", { children: "Used" }) }) }, s) : /* @__PURE__ */ jsx(
              "pre",
              {
                "data-testid": "node/text/lookup_secret_codes/text",
                children: /* @__PURE__ */ jsx("code", { children: r })
              },
              s
            )
          )
        ]
      }
    ) : /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 4 }), "data-testid": `node/text/${e}`, children: [
      /* @__PURE__ */ jsx(
        Typography,
        {
          variant: "body1",
          "data-testid": `node/text/${node.attributes.id}/label`,
          children: node.meta.label?.text
        }
      ),
      /* @__PURE__ */ jsx("pre", { "data-testid": `node/text/${e}/text`, children: /* @__PURE__ */ jsx("code", { children: node.attributes.text.text }) })
    ] });
  } else if (isUiNodeInputAttributes(node.attributes)) {
    const attrs = node.attributes, nodeType = attrs.type, isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc", submit = {
      type: attrs.type,
      name: attrs.name,
      ...attrs.value && { value: attrs.value }
    };
    switch (nodeType) {
      case "button":
      case "submit":
        if (isSocial && (submit.formNoValidate = !0, submit.onClick = (e) => {
          e.currentTarget.type = "submit", e.currentTarget.dispatchEvent(
            new Event("submit", { cancelable: !0, bubbles: !0 })
          );
        }), attrs.onclick) {
          const oc = attrs.onclick;
          submit.onClick = () => {
            eval(oc);
          };
        }
        return (node.meta.label?.id === 1070007 || // TODO: remove this once everyone has migrated to the fix (https://github.com/ory/kratos/pull/3067)
        node.meta.label?.id === 1070008) && (submit.formNoValidate = !0), isSocial ? /* @__PURE__ */ jsx(
          ButtonSocial,
          {
            className,
            header: getNodeLabel(node),
            brand: attrs.value.toLowerCase(),
            variant: "semibold",
            size: "medium",
            fullWidth: !0,
            disabled: attrs.disabled,
            ...buttonSocialOverrideProps && buttonSocialOverrideProps,
            ...submit
          }
        ) : /* @__PURE__ */ jsx(
          Button,
          {
            className,
            header: getNodeLabel(node),
            variant: "semibold",
            size: "medium",
            fullWidth: !0,
            disabled: attrs.disabled,
            ...buttonOverrideProps && buttonOverrideProps,
            ...submit
          }
        );
      case "datetime-local":
      case "checkbox":
        return /* @__PURE__ */ jsx(
          Checkbox,
          {
            className,
            helperMessage: /* @__PURE__ */ jsx(NodeMessages, { nodes: [node], gap: 4, textPosition: "start" }),
            label: getNodeLabel(node),
            name: attrs.name,
            required: attrs.required,
            defaultValue: attrs.value,
            disabled: attrs.disabled,
            defaultChecked: Boolean(attrs.value),
            dataTestid: `node/input/${attrs.name}`
          }
        );
      default:
        return /* @__PURE__ */ jsx(
          InputField,
          {
            helperMessage: /* @__PURE__ */ jsx(NodeMessages, { nodes: [node], gap: 4, textPosition: "start" }),
            dataTestid: `node/input/${attrs.name}`,
            className,
            name: attrs.name,
            header: getNodeLabel(node),
            type: attrs.type,
            autoComplete: attrs.autocomplete || attrs.name === "identifier" ? "username" : "",
            defaultValue: attrs.value,
            required: attrs.required,
            disabled: attrs.disabled,
            fullWidth: !0
          }
        );
    }
  } else if (isUiNodeAnchorAttributes(node.attributes))
    return /* @__PURE__ */ jsx(
      ButtonLink,
      {
        href: node.attributes.href,
        title: node.attributes.title.text,
        "data-testid": `node/anchor/${node.attributes.id}`,
        className,
        position: "center",
        children: node.attributes.title.text
      }
    );
  return null;
}, FilterFlowNodes = ({
  filter: e,
  includeCSRF: r,
  ...a
}) => {
  const s = (i) => isUiNodeInputAttributes(i.attributes) ? i.attributes.name : "", n = filterNodesByGroups(e).filter(
    (i) => !(s(i) === "csrf_token" && !r)
  ).map(
    (i, c) => ["hidden"].includes(getNodeInputType(i.attributes)) ? {
      node: /* @__PURE__ */ jsx(Node, { node: i, ...a }, c),
      hidden: !0
    } : {
      node: /* @__PURE__ */ jsx(Node, { node: i, ...a }, c),
      hidden: !1
    }
  );
  return n.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
    n.filter((i) => i.hidden).map((i) => i.node),
    /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: n.filter((i) => !i.hidden).map((i) => i.node) })
  ] }) : null;
}, useScriptNodes = ({ nodes: e }) => {
  useEffect(() => {
    const r = filterNodesByGroups({
      nodes: e,
      groups: "webauthn",
      attributes: "text/javascript",
      withoutDefaultGroup: !0,
      withoutDefaultAttributes: !0
    }).map((a) => {
      const s = a.attributes, n = document.createElement("script");
      return n.setAttribute("data-testid", `node/script/${n.id}`), n.src = s.src, n.type = s.type, n.async = s.async, n.referrerPolicy = s.referrerpolicy, n.crossOrigin = s.crossorigin, n.integrity = s.integrity, document.body.appendChild(n), n;
    });
    return () => {
      r.forEach((a) => {
        document.body.removeChild(a);
      });
    };
  }, [e]);
}, UserAuthForm = ({
  flow: e,
  children: r,
  submitOnEnter: a,
  onSubmit: s,
  formFilterOverride: n,
  className: i,
  ...c
}) => /* @__PURE__ */ jsx(
  "form",
  {
    className: cn(i, formStyle),
    action: e.ui.action,
    method: e.ui.method,
    onKeyDown: (l) => {
      l.key === "Enter" && !a && (l.stopPropagation(), l.preventDefault());
    },
    ...s && {
      onSubmit: (l) => {
        l.preventDefault();
        const d = l.currentTarget, v = new FormData(d);
        let m = Object.fromEntries(v);
        if ("submitter" in l.nativeEvent) {
          const b = l.nativeEvent.submitter;
          m = {
            ...m,
            [b.name]: b.value
          };
        }
        s({ body: m, event: l });
      }
    },
    ...c,
    children: /* @__PURE__ */ jsxs(Fragment, { children: [
      /* @__PURE__ */ jsx(
        FilterFlowNodes,
        {
          filter: n || {
            nodes: e.ui.nodes,
            groups: "default",
            // we only want to map hidden default fields here
            attributes: "hidden"
          },
          includeCSRF: !0
        }
      ),
      r
    ] })
  }
), hasOidc = (e) => e.some(({ group: r }) => r === "oidc"), hasPassword = (e) => e.some(({ group: r }) => r === "password"), hasWebauthn = (e) => e.some(({ group: r }) => r === "webauthn"), hasLookupSecret = (e) => e.some(({ group: r }) => r === "lookup_secret"), hasTotp = (e) => e.some(({ group: r }) => r === "totp"), hasHiddenIdentifier = (e) => e.some(
  ({ attributes: r }) => "name" in r && r.name === "identifier" && r.type === "hidden"
), LinkSection = ({ nodes: e }) => /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["link", "code"],
        excludeAttributes: "submit"
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["link", "code"],
        attributes: "submit"
      }
    }
  )
] }), LoginSection = ({
  nodes: e,
  forgotPasswordURL: r
}) => hasPassword(e) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 16 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e,
          groups: ["default", "password"],
          excludeAttributes: ["submit", "hidden"]
        }
      }
    ),
    r && /* @__PURE__ */ jsx(
      ButtonLink,
      {
        "data-testid": "forgot-password-link",
        href: r,
        children: "Forgot Password?"
      }
    )
  ] }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["password"],
        attributes: "submit"
      }
    }
  )
] }) : null, LookupSecretSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "lookup_secret",
    withoutDefaultGroup: !0
  };
  return hasLookupSecret(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, OIDCSection = (e) => hasOidc(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  filterNodesByGroups({
    nodes: e.ui.nodes,
    groups: "oidc",
    withoutDefaultGroup: !0
  }).some((r) => r.messages.length > 0) && /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e.ui.nodes,
        groups: ["oidc"],
        excludeAttributes: "submit"
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e.ui.nodes,
        groups: "oidc",
        attributes: "submit"
      }
    }
  )
] }) : null, OIDCSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "oidc",
    withoutDefaultGroup: !0
  };
  return hasOidc(e.ui.nodes) ? /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 32 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: r,
      buttonOverrideProps: { fullWidth: !1 }
    }
  ) }) : null;
}, PasswordSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "password",
    withoutDefaultGroup: !0
  };
  return hasPassword(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, PasswordlessSection = (e) => hasWebauthn(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e.ui.nodes,
        // we will also map default fields here but not oidc and password fields
        groups: ["webauthn"],
        withoutDefaultAttributes: !0,
        excludeAttributes: ["hidden", "button", "submit"]
        // the form will take care of hidden fields
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e.ui.nodes,
        groups: ["webauthn"],
        withoutDefaultAttributes: !0,
        attributes: ["button", "submit"]
      }
    }
  )
] }) : null, ProfileSettingsSection = ({
  flow: e
}) => {
  const r = { nodes: e.ui.nodes, groups: "profile" };
  return /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] });
}, RegistrationSection = ({
  nodes: e
}) => hasPassword(e) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
  /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["password"],
        excludeAttributes: "submit"
      }
    }
  ) }),
  /* @__PURE__ */ jsx(
    FilterFlowNodes,
    {
      filter: {
        nodes: e,
        groups: ["password"],
        attributes: "submit"
      }
    }
  )
] }) : null, TOTPSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "totp",
    withoutDefaultGroup: !0
  };
  return hasTotp(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, WebAuthnSettingsSection = ({
  flow: e
}) => {
  const r = {
    nodes: e.ui.nodes,
    groups: "webauthn",
    withoutDefaultGroup: !0
  };
  return hasWebauthn(e.ui.nodes) ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, excludeAttributes: "submit,button" }
      }
    ),
    /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: { ...r, attributes: "submit,button" },
        buttonOverrideProps: { fullWidth: !1 }
      }
    )
  ] }) : null;
}, identifier_css_ts_vanilla = "";
var identifierNameStyle = "kdu3q91", identifierStyle = "kdu3q90";
const LoggedInfo = ({ flow: e }) => {
  const r = e.ui.nodes.find(
    (a) => "name" in a.attributes && a.attributes.name === "identifier"
  )?.attributes;
  return !r || !("value" in r) ? null : /* @__PURE__ */ jsxs("div", { className: identifierStyle, children: [
    "You're logged in as:",
    /* @__PURE__ */ jsx("div", { className: identifierNameStyle, children: r.value })
  ] });
}, UserAuthCard = ({
  flow: e,
  title: r,
  subtitle: a,
  flowType: s,
  additionalProps: n,
  cardImage: i,
  onSubmit: c,
  includeScripts: l,
  className: d
}) => {
  l && useScriptNodes({ nodes: e.ui.nodes });
  let v = null, m = null, b = null, _ = null;
  const F = (g) => g.refresh || g.requested_aal === "aal2", T = () => !!b && (!F(e) || s === "registration"), $ = () => F(e) && s === "login" && (hasTotp(e.ui.nodes) || hasWebauthn(e.ui.nodes) || hasLookupSecret(e.ui.nodes)), B = hasHiddenIdentifier(e.ui.nodes), O = () => $() && [
    hasWebauthn(e.ui.nodes) && /* @__PURE__ */ jsx(UserAuthForm, { flow: e, "data-testid": "webauthn-flow", children: /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e.ui.nodes,
          groups: "webauthn",
          withoutDefaultGroup: !0
        }
      }
    ) }),
    hasPassword(e.ui.nodes) && /* @__PURE__ */ jsx(UserAuthForm, { flow: e, "data-testid": "password-flow", children: /* @__PURE__ */ jsx(
      FilterFlowNodes,
      {
        filter: {
          nodes: e.ui.nodes,
          groups: "password",
          withoutDefaultGroup: !0
        }
      }
    ) }),
    hasTotp(e.ui.nodes) && /* @__PURE__ */ jsx(
      UserAuthForm,
      {
        flow: e,
        "data-testid": "totp-flow",
        onSubmit: c,
        submitOnEnter: !0,
        children: /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
          /* @__PURE__ */ jsx(
            FilterFlowNodes,
            {
              filter: {
                nodes: e.ui.nodes,
                groups: "totp",
                withoutDefaultGroup: !0,
                excludeAttributes: "submit"
              }
            }
          ),
          /* @__PURE__ */ jsx(
            FilterFlowNodes,
            {
              filter: {
                nodes: e.ui.nodes,
                groups: "totp",
                withoutDefaultGroup: !0,
                attributes: "submit"
              }
            }
          )
        ] })
      }
    ),
    hasLookupSecret(e.ui.nodes) && /* @__PURE__ */ jsx(
      UserAuthForm,
      {
        flow: e,
        "data-testid": "lookup-secret-flow",
        onSubmit: c,
        submitOnEnter: !0,
        children: /* @__PURE__ */ jsx(
          FilterFlowNodes,
          {
            filter: {
              nodes: e.ui.nodes,
              groups: "lookup_secret",
              withoutDefaultGroup: !0
            }
          }
        )
      }
    )
  ].filter(Boolean).map((g, x) => /* @__PURE__ */ jsx("div", { children: x > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx(Divider, {}),
    " ",
    g
  ] }) : g }, x));
  switch (s) {
    case "login":
      b = PasswordlessSection(e), m = OIDCSection(e), v = LoginSection({
        nodes: e.ui.nodes,
        ...n
      }), _ = F(e) ? {
        text: /* @__PURE__ */ jsx(Fragment, { children: "Something's not working?" }),
        buttonText: "Logout",
        url: n.logoutURL,
        dataTestId: "logout-link"
      } : {
        buttonText: "Sign up",
        url: n.signupURL,
        text: /* @__PURE__ */ jsx(Fragment, { children: "Don't have an account?" }),
        dataTestId: "signup-link"
      };
      break;
    case "registration":
      b = PasswordlessSection(e), m = OIDCSection(e), v = RegistrationSection({
        nodes: e.ui.nodes
      }), _ = {
        text: "Already have an account?",
        url: n.loginURL,
        buttonText: "Sign in",
        dataTestId: "cta-link"
      };
      break;
    case "recovery":
      v = LinkSection({
        nodes: e.ui.nodes
      }), _ = {
        text: "Remember your credentials?",
        url: n.loginURL,
        buttonText: "Sign in",
        dataTestId: "cta-link"
      };
      break;
    case "verification":
      v = LinkSection({
        nodes: e.ui.nodes
      }), _ = {
        text: "Don't have an account?",
        url: n.signupURL,
        buttonText: "Sign up",
        dataTestId: "cta-link"
      };
      break;
    default:
      v = null;
  }
  return /* @__PURE__ */ jsx(
    Card,
    {
      className: d,
      heading: /* @__PURE__ */ jsx("h2", { className: typographyStyle({ type: "regular", size: "small" }), children: r }),
      image: i,
      children: /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
        a && /* @__PURE__ */ jsx(Message, { severity: "default", children: a }),
        /* @__PURE__ */ jsx(NodeMessages, { uiMessages: e.ui.messages }),
        m && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(Divider, {}),
          /* @__PURE__ */ jsx(UserAuthForm, { flow: e, children: m })
        ] }),
        v && !$() && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(Divider, {}),
          /* @__PURE__ */ jsxs(
            UserAuthForm,
            {
              flow: e,
              submitOnEnter: !0,
              onSubmit: c,
              "data-testid": `${s}-flow`,
              children: [
                v,
                B && /* @__PURE__ */ jsx(LoggedInfo, { flow: e })
              ]
            }
          )
        ] }),
        $() && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(
            NodeMessages,
            {
              nodes: filterNodesByGroups({
                nodes: e.ui.nodes,
                groups: ["password", "webauthn", "totp", "lookup_secret"]
              })
            }
          ),
          O()
        ] }),
        T() && /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(Divider, {}),
          /* @__PURE__ */ jsx(
            UserAuthForm,
            {
              flow: e,
              submitOnEnter: !0,
              onSubmit: c,
              "data-testid": "passwordless-flow",
              formFilterOverride: {
                nodes: e.ui.nodes,
                attributes: "hidden"
              },
              children: b
            }
          )
        ] }),
        _ && MessageSection(_)
      ] })
    }
  );
}, UserErrorCard = ({
  title: e,
  error: r,
  backUrl: a,
  cardImage: s,
  contactSupportEmail: n,
  className: i
}) => {
  const c = r.error, l = c.code, d = l >= 500 ? JSON.stringify(r, null, 2) : c.reason;
  return /* @__PURE__ */ jsx(
    Card,
    {
      className: i,
      heading: /* @__PURE__ */ jsx("h2", { className: typographyStyle({ type: "regular", size: "small" }), children: e }),
      image: s,
      children: /* @__PURE__ */ jsxs(
        "div",
        {
          className: gridStyle({ gap: 32, direction: "column" }),
          "data-testid": "ui/error/message",
          children: [
            /* @__PURE__ */ jsxs(Message, { severity: "error", children: [
              "An error occurred with the following message: ",
              l < 500 && d
            ] }),
            l >= 500 && /* @__PURE__ */ jsx(CodeBox, { "data-testid": "code-box", children: d }),
            n && /* @__PURE__ */ jsxs(Message, { className: colorSprinkle({ color: "foregroundMuted" }), children: [
              "If the problem persists, please contact ",
              /* @__PURE__ */ jsx(ButtonLink, { href: `mailto:${n}`, children: n })
            ] }),
            /* @__PURE__ */ jsx(Message, { children: /* @__PURE__ */ jsx(ButtonLink, { href: a, children: "Go Back" }) })
          ]
        }
      )
    }
  );
}, UserSettingsCard = ({
  flow: e,
  flowType: r,
  title: a,
  includeScripts: s,
  onSubmit: n,
  className: i
}) => {
  s && useScriptNodes({ nodes: e.ui.nodes });
  let c = !1, l = null, d = "";
  switch (r) {
    case "profile":
      c = !0, d = a || "Profile Settings", l = /* @__PURE__ */ jsx(ProfileSettingsSection, { flow: e });
      break;
    case "password":
      hasPassword(e.ui.nodes) && (c = !0, d = a || "Change Password", l = /* @__PURE__ */ jsx(PasswordSettingsSection, { flow: e }));
      break;
    case "webauthn":
      hasWebauthn(e.ui.nodes) && (c = !0, d = a || "Manage Hardware Tokens", l = /* @__PURE__ */ jsx(WebAuthnSettingsSection, { flow: e }));
      break;
    case "lookupSecret":
      hasLookupSecret(e.ui.nodes) && (c = !0, d = a || "Manage 2FA Backup Recovery Codes", l = /* @__PURE__ */ jsx(LookupSecretSettingsSection, { flow: e }));
      break;
    case "oidc":
      hasOidc(e.ui.nodes) && (c = !0, d = a || "Social Sign In", l = /* @__PURE__ */ jsx(OIDCSettingsSection, { flow: e }));
      break;
    case "totp":
      hasTotp(e.ui.nodes) && (c = !0, d = a || "Manage 2FA TOTP Authenticator App", l = /* @__PURE__ */ jsx(TOTPSettingsSection, { flow: e }));
      break;
    default:
      l = null;
  }
  return c ? /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 32 }), children: [
    d && /* @__PURE__ */ jsx(
      "h3",
      {
        className: cn(
          typographyStyle({ size: "headline26", type: "regular" }),
          colorSprinkle({ color: "foregroundDefault" })
        ),
        children: d
      }
    ),
    /* @__PURE__ */ jsx(UserAuthForm, { flow: e, onSubmit: n, className: i, children: l })
  ] }) : null;
}, UserConsentCard = ({
  csrfToken: e,
  consent: r,
  cardImage: a,
  client_name: s = "Unnamed Client",
  requested_scope: n = [],
  client: i,
  action: c,
  className: l
}) => /* @__PURE__ */ jsx(
  Card,
  {
    className: l,
    heading: /* @__PURE__ */ jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Typography, { type: "bold", children: s }) }),
    image: a,
    children: /* @__PURE__ */ jsxs("form", { action: c, method: "post", children: [
      /* @__PURE__ */ jsx("input", { type: "hidden", name: "_csrf", value: e }),
      /* @__PURE__ */ jsx(
        "input",
        {
          type: "hidden",
          name: "consent_challenge",
          value: r?.challenge
        }
      ),
      /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 16 }), children: [
        /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 4 }), style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx(Typography, { children: "The application requests access to the following permissions:" }) }),
        /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 4 }), children: n.map((d) => /* @__PURE__ */ jsx(
          Checkbox,
          {
            label: d,
            value: d,
            name: "grant_scope"
          },
          d
        )) }),
        /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 4 }), children: /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Only grant permissions if you trust this site or app. You do not need to accept all permissions." }) }),
        /* @__PURE__ */ jsxs("div", { className: gridStyle({ direction: "row" }), children: [
          i?.policy_uri && /* @__PURE__ */ jsx("a", { href: i.policy_uri, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Privacy Policy" }) }),
          i?.tos_uri && /* @__PURE__ */ jsx("a", { href: i.tos_uri, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Terms of Service" }) })
        ] }),
        /* @__PURE__ */ jsx(Divider, {}),
        /* @__PURE__ */ jsxs("div", { className: gridStyle({ gap: 8 }), children: [
          /* @__PURE__ */ jsx(
            Checkbox,
            {
              label: "remember my decision",
              id: "remember",
              name: "remember"
            }
          ),
          /* @__PURE__ */ jsx(Typography, { size: "xsmall", children: "Remember this decision for next time. The application will not be able to ask for additional permissions without your consent." })
        ] }),
        /* @__PURE__ */ jsxs(
          "div",
          {
            className: gridStyle({ direction: "row" }),
            style: { justifyContent: "space-between", alignItems: "center" },
            children: [
              /* @__PURE__ */ jsx(
                Button,
                {
                  type: "submit",
                  id: "reject",
                  name: "consent_action",
                  value: "reject",
                  variant: "error",
                  header: "Deny"
                }
              ),
              /* @__PURE__ */ jsx(
                Button,
                {
                  type: "submit",
                  id: "accept",
                  name: "consent_action",
                  value: "accept",
                  variant: "semibold",
                  header: "Allow"
                }
              )
            ]
          }
        )
      ] })
    ] })
  }
), UserLogoutCard = ({
  csrfToken: e,
  challenge: r,
  action: a,
  className: s,
  cardImage: n
}) => /* @__PURE__ */ jsx(
  Card,
  {
    className: s,
    heading: /* @__PURE__ */ jsx("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx(Typography, { children: "Do you wish to log out?" }) }),
    image: n,
    children: /* @__PURE__ */ jsxs("form", { action: a, method: "post", children: [
      /* @__PURE__ */ jsx("input", { type: "hidden", name: "_csrf", value: e }),
      /* @__PURE__ */ jsx("input", { type: "hidden", name: "challenge", value: r }),
      /* @__PURE__ */ jsx("div", { className: gridStyle({ gap: 16 }), children: /* @__PURE__ */ jsxs(
        "div",
        {
          className: gridStyle({ direction: "row" }),
          style: { justifyContent: "space-between", alignItems: "center" },
          children: [
            /* @__PURE__ */ jsx(
              Button,
              {
                type: "submit",
                id: "reject",
                value: "No",
                name: "submit",
                variant: "error",
                header: "No"
              }
            ),
            /* @__PURE__ */ jsx(
              Button,
              {
                type: "submit",
                id: "accept",
                value: "Yes",
                name: "submit",
                variant: "semibold",
                header: "Yes"
              }
            )
          ]
        }
      ) })
    ] })
  }
);
function getVarName(e) {
  var r = e.match(/^var\((.*)\)$/);
  return r ? r[1] : e;
}
function get(e, r) {
  var a = e;
  for (var s of r) {
    if (!(s in a))
      throw new Error("Path ".concat(r.join(" -> "), " does not exist in object"));
    a = a[s];
  }
  return a;
}
function walkObject(e, r) {
  var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], s = e.constructor();
  for (var n in e) {
    var i = e[n], c = [...a, n];
    typeof i == "string" || typeof i == "number" || i == null ? s[n] = r(i, c) : typeof i == "object" && !Array.isArray(i) ? s[n] = walkObject(i, r, c) : console.warn('Skipping invalid key "'.concat(c.join("."), '". Should be a string, number, null or object. Received: "').concat(Array.isArray(i) ? "Array" : typeof i, '"'));
  }
  return s;
}
function assignInlineVars(e, r) {
  var a = {};
  if (typeof r == "object") {
    var s = e;
    walkObject(r, (c, l) => {
      var d = get(s, l);
      a[getVarName(d)] = String(c);
    });
  } else {
    var n = e;
    for (var i in n)
      a[getVarName(i)] = n[i];
  }
  return Object.defineProperty(a, "toString", {
    value: function() {
      return Object.keys(this).map((l) => "".concat(l, ":").concat(this[l])).join(";");
    },
    writable: !1
  }), a;
}
const themeProvider_css_ts_vanilla = "";
var themeProviderFontRenderingStyle = "m6lo4u1", themeProviderStyle = "m6lo4u0";
const ThemeProvider = ({
  children: e,
  theme: r,
  themeOverrides: a,
  enableFontSmoothing: s
}) => /* @__PURE__ */ jsx(
  "div",
  {
    className: cn(
      themeProviderStyle,
      s && themeProviderFontRenderingStyle
    ),
    style: assignInlineVars(oryTheme, {
      ...r === "dark" ? defaultDarkTheme : defaultLightTheme,
      ...a
    }),
    children: e
  }
);
export {
  Button,
  ButtonLink,
  ButtonSocial,
  Card,
  CardGradient,
  Checkbox,
  CodeBox,
  Divider,
  FilterFlowNodes,
  InputField,
  LinkSection,
  LoginSection,
  LookupSecretSettingsSection,
  MenuLink,
  Message,
  MessageSection,
  Nav,
  Node,
  NodeMessages,
  OIDCSection,
  OIDCSettingsSection,
  PasswordSettingsSection,
  PasswordlessSection,
  ProfileSettingsSection,
  RegistrationSection,
  TOTPSettingsSection,
  ThemeProvider,
  Typography,
  UserAuthCard,
  UserAuthForm,
  UserConsentCard,
  UserErrorCard,
  UserLogoutCard,
  UserSettingsCard,
  WebAuthnSettingsSection,
  buttonLinkContainerStyle,
  buttonLinkIconStyle,
  buttonLinkStyle,
  buttonSocialIconEndStyle,
  buttonSocialIconStartStyle,
  buttonSocialStyle,
  buttonStyle,
  cardStyle,
  cardTitleImage,
  cardTitleStyle,
  checkboxInputStyle,
  checkboxStyle,
  codeboxContentStyle,
  codeboxHeaderStyle,
  codeboxStyle,
  colorProperties,
  colorSprinkle,
  defaultBreakpoints,
  defaultDarkTheme,
  defaultFont,
  defaultLightTheme,
  dividerStyle,
  dividerTextStyle,
  formStyle,
  gridStyle,
  hasHiddenIdentifier,
  hasLookupSecret,
  hasOidc,
  hasPassword,
  hasTotp,
  hasWebauthn,
  inputFieldStyle,
  inputFieldTitleStyle,
  inputTypographyStyle,
  menuLinkIconLeftStyle,
  menuLinkStyle,
  menuLinkTextStyle,
  messageStyle,
  navMainSectionStyle,
  navMenuLinkSelectedStyle,
  navMenuSectionStyle,
  navSectionBottom,
  navSectionTitleStyle,
  navStyle,
  oryTheme,
  pxToEm,
  pxToRem,
  typographyStyle,
  useScriptNodes
};
