UNPKG

@aveonline/ui-react

Version:

Home base for Aveonline design system - ecosystem react

1,412 lines (1,409 loc) 2.22 MB
import * as M from "react"; import c, { useState as me, useEffect as Se, useCallback as Et, forwardRef as Ue, useLayoutEffect as Lo, useRef as pe, Fragment as an, isValidElement as En, cloneElement as tn, createElement as $e, createContext as Dt, useContext as Ot, useMemo as Ge, useReducer as mi, createRef as w5, Component as Q8, Children as Mn, PureComponent as wr, memo as G8 } from "react"; import * as fB from "react-dom"; import X2, { createPortal as Z8, flushSync as D3 } from "react-dom"; var jl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function Ht(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function hB(e) { if (e.__esModule) return e; var t = e.default; if (typeof t == "function") { var n = function r() { return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments); }; n.prototype = t.prototype; } else n = {}; return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) { var a = Object.getOwnPropertyDescriptor(e, r); Object.defineProperty(n, r, a.get ? a : { enumerable: !0, get: function() { return e[r]; } }); }), n; } var I5 = { exports: {} }, ml = {}; /** * @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 U6; function pB() { if (U6) return ml; U6 = 1; var e = c, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 }; function o(l, s, u) { var d, f = {}, h = null, p = null; u !== void 0 && (h = "" + u), s.key !== void 0 && (h = "" + s.key), s.ref !== void 0 && (p = s.ref); for (d in s) r.call(s, d) && !i.hasOwnProperty(d) && (f[d] = s[d]); if (l && l.defaultProps) for (d in s = l.defaultProps, s) f[d] === void 0 && (f[d] = s[d]); return { $$typeof: t, type: l, key: h, ref: p, props: f, _owner: a.current }; } return ml.Fragment = n, ml.jsx = o, ml.jsxs = o, ml; } var vl = {}; /** * @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 J6; function mB() { return J6 || (J6 = 1, process.env.NODE_ENV !== "production" && function() { var e = c, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), l = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), A = Symbol.iterator, m = "@@iterator"; function v($) { if ($ === null || typeof $ != "object") return null; var oe = A && $[A] || $[m]; return typeof oe == "function" ? oe : null; } var C = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function b($) { { for (var oe = arguments.length, he = new Array(oe > 1 ? oe - 1 : 0), Ee = 1; Ee < oe; Ee++) he[Ee - 1] = arguments[Ee]; x("error", $, he); } } function x($, oe, he) { { var Ee = C.ReactDebugCurrentFrame, ot = Ee.getStackAddendum(); ot !== "" && (oe += "%s", he = he.concat([ot])); var ft = he.map(function(Ne) { return String(Ne); }); ft.unshift("Warning: " + oe), Function.prototype.apply.call(console[$], console, ft); } } var y = !1, E = !1, w = !1, I = !1, S = !1, B; B = Symbol.for("react.module.reference"); function O($) { return !!(typeof $ == "string" || typeof $ == "function" || $ === r || $ === i || S || $ === a || $ === u || $ === d || I || $ === p || y || E || w || typeof $ == "object" && $ !== null && ($.$$typeof === h || $.$$typeof === f || $.$$typeof === o || $.$$typeof === l || $.$$typeof === s || // 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. $.$$typeof === B || $.getModuleId !== void 0)); } function P($, oe, he) { var Ee = $.displayName; if (Ee) return Ee; var ot = oe.displayName || oe.name || ""; return ot !== "" ? he + "(" + ot + ")" : he; } function R($) { return $.displayName || "Context"; } function H($) { if ($ == null) return null; if (typeof $.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof $ == "function") return $.displayName || $.name || null; if (typeof $ == "string") return $; switch ($) { case r: return "Fragment"; case n: return "Portal"; case i: return "Profiler"; case a: return "StrictMode"; case u: return "Suspense"; case d: return "SuspenseList"; } if (typeof $ == "object") switch ($.$$typeof) { case l: var oe = $; return R(oe) + ".Consumer"; case o: var he = $; return R(he._context) + ".Provider"; case s: return P($, $.render, "ForwardRef"); case f: var Ee = $.displayName || null; return Ee !== null ? Ee : H($.type) || "Memo"; case h: { var ot = $, ft = ot._payload, Ne = ot._init; try { return H(Ne(ft)); } catch { return null; } } } return null; } var D = Object.assign, j = 0, L, U, Q, Y, V, K, k; function z() { } z.__reactDisabledLog = !0; function G() { { if (j === 0) { L = console.log, U = console.info, Q = console.warn, Y = console.error, V = console.group, K = console.groupCollapsed, k = console.groupEnd; var $ = { configurable: !0, enumerable: !0, value: z, writable: !0 }; Object.defineProperties(console, { info: $, log: $, warn: $, error: $, group: $, groupCollapsed: $, groupEnd: $ }); } j++; } } function T() { { if (j--, j === 0) { var $ = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: D({}, $, { value: L }), info: D({}, $, { value: U }), warn: D({}, $, { value: Q }), error: D({}, $, { value: Y }), group: D({}, $, { value: V }), groupCollapsed: D({}, $, { value: K }), groupEnd: D({}, $, { value: k }) }); } j < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var X = C.ReactCurrentDispatcher, _; function ae($, oe, he) { { if (_ === void 0) try { throw Error(); } catch (ot) { var Ee = ot.stack.trim().match(/\n( *(at )?)/); _ = Ee && Ee[1] || ""; } return ` ` + _ + $; } } var ee = !1, te; { var le = typeof WeakMap == "function" ? WeakMap : Map; te = new le(); } function N($, oe) { if (!$ || ee) return ""; { var he = te.get($); if (he !== void 0) return he; } var Ee; ee = !0; var ot = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var ft; ft = X.current, X.current = null, G(); try { if (oe) { var Ne = function() { throw Error(); }; if (Object.defineProperty(Ne.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(Ne, []); } catch (Ut) { Ee = Ut; } Reflect.construct($, [], Ne); } else { try { Ne.call(); } catch (Ut) { Ee = Ut; } $.call(Ne.prototype); } } else { try { throw Error(); } catch (Ut) { Ee = Ut; } $(); } } catch (Ut) { if (Ut && Ee && typeof Ut.stack == "string") { for (var Qe = Ut.stack.split(` `), ht = Ee.stack.split(` `), pt = Qe.length - 1, St = ht.length - 1; pt >= 1 && St >= 0 && Qe[pt] !== ht[St]; ) St--; for (; pt >= 1 && St >= 0; pt--, St--) if (Qe[pt] !== ht[St]) { if (pt !== 1 || St !== 1) do if (pt--, St--, St < 0 || Qe[pt] !== ht[St]) { var cn = ` ` + Qe[pt].replace(" at new ", " at "); return $.displayName && cn.includes("<anonymous>") && (cn = cn.replace("<anonymous>", $.displayName)), typeof $ == "function" && te.set($, cn), cn; } while (pt >= 1 && St >= 0); break; } } } finally { ee = !1, X.current = ft, T(), Error.prepareStackTrace = ot; } var Vt = $ ? $.displayName || $.name : "", ur = Vt ? ae(Vt) : ""; return typeof $ == "function" && te.set($, ur), ur; } function ue($, oe, he) { return N($, !1); } function ie($) { var oe = $.prototype; return !!(oe && oe.isReactComponent); } function ce($, oe, he) { if ($ == null) return ""; if (typeof $ == "function") return N($, ie($)); if (typeof $ == "string") return ae($); switch ($) { case u: return ae("Suspense"); case d: return ae("SuspenseList"); } if (typeof $ == "object") switch ($.$$typeof) { case s: return ue($.render); case f: return ce($.type, oe, he); case h: { var Ee = $, ot = Ee._payload, ft = Ee._init; try { return ce(ft(ot), oe, he); } catch { } } } return ""; } var Ae = Object.prototype.hasOwnProperty, F = {}, J = C.ReactDebugCurrentFrame; function q($) { if ($) { var oe = $._owner, he = ce($.type, $._source, oe ? oe.type : null); J.setExtraStackFrame(he); } else J.setExtraStackFrame(null); } function re($, oe, he, Ee, ot) { { var ft = Function.call.bind(Ae); for (var Ne in $) if (ft($, Ne)) { var Qe = void 0; try { if (typeof $[Ne] != "function") { var ht = Error((Ee || "React class") + ": " + he + " type `" + Ne + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof $[Ne] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw ht.name = "Invariant Violation", ht; } Qe = $[Ne](oe, Ne, Ee, he, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (pt) { Qe = pt; } Qe && !(Qe instanceof Error) && (q(ot), b("%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).", Ee || "React class", he, Ne, typeof Qe), q(null)), Qe instanceof Error && !(Qe.message in F) && (F[Qe.message] = !0, q(ot), b("Failed %s type: %s", he, Qe.message), q(null)); } } } var fe = Array.isArray; function ge($) { return fe($); } function Ze($) { { var oe = typeof Symbol == "function" && Symbol.toStringTag, he = oe && $[Symbol.toStringTag] || $.constructor.name || "Object"; return he; } } function Le($) { try { return Oe($), !1; } catch { return !0; } } function Oe($) { return "" + $; } function De($) { if (Le($)) return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ze($)), Oe($); } var be = C.ReactCurrentOwner, et = { key: !0, ref: !0, __self: !0, __source: !0 }, Je, ct, Pt; Pt = {}; function on($) { if (Ae.call($, "ref")) { var oe = Object.getOwnPropertyDescriptor($, "ref").get; if (oe && oe.isReactWarning) return !1; } return $.ref !== void 0; } function ln($) { if (Ae.call($, "key")) { var oe = Object.getOwnPropertyDescriptor($, "key").get; if (oe && oe.isReactWarning) return !1; } return $.key !== void 0; } function Me($, oe) { if (typeof $.ref == "string" && be.current && oe && be.current.stateNode !== oe) { var he = H(be.current.type); Pt[he] || (b('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', H(be.current.type), $.ref), Pt[he] = !0); } } function je($, oe) { { var he = function() { Je || (Je = !0, b("%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)", oe)); }; he.isReactWarning = !0, Object.defineProperty($, "key", { get: he, configurable: !0 }); } } function He($, oe) { { var he = function() { ct || (ct = !0, b("%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)", oe)); }; he.isReactWarning = !0, Object.defineProperty($, "ref", { get: he, configurable: !0 }); } } var ke = function($, oe, he, Ee, ot, ft, Ne) { var Qe = { // This tag allows us to uniquely identify this as a React Element $$typeof: t, // Built-in properties that belong on the element type: $, key: oe, ref: he, props: Ne, // Record the component responsible for creating this element. _owner: ft }; return Qe._store = {}, Object.defineProperty(Qe._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(Qe, "_self", { configurable: !1, enumerable: !1, writable: !1, value: Ee }), Object.defineProperty(Qe, "_source", { configurable: !1, enumerable: !1, writable: !1, value: ot }), Object.freeze && (Object.freeze(Qe.props), Object.freeze(Qe)), Qe; }; function ye($, oe, he, Ee, ot) { { var ft, Ne = {}, Qe = null, ht = null; he !== void 0 && (De(he), Qe = "" + he), ln(oe) && (De(oe.key), Qe = "" + oe.key), on(oe) && (ht = oe.ref, Me(oe, ot)); for (ft in oe) Ae.call(oe, ft) && !et.hasOwnProperty(ft) && (Ne[ft] = oe[ft]); if ($ && $.defaultProps) { var pt = $.defaultProps; for (ft in pt) Ne[ft] === void 0 && (Ne[ft] = pt[ft]); } if (Qe || ht) { var St = typeof $ == "function" ? $.displayName || $.name || "Unknown" : $; Qe && je(Ne, St), ht && He(Ne, St); } return ke($, Qe, ht, ot, Ee, be.current, Ne); } } var We = C.ReactCurrentOwner, Ke = C.ReactDebugCurrentFrame; function Pe($) { if ($) { var oe = $._owner, he = ce($.type, $._source, oe ? oe.type : null); Ke.setExtraStackFrame(he); } else Ke.setExtraStackFrame(null); } var xe; xe = !1; function Ve($) { return typeof $ == "object" && $ !== null && $.$$typeof === t; } function Xe() { { if (We.current) { var $ = H(We.current.type); if ($) return ` Check the render method of \`` + $ + "`."; } return ""; } } function wt($) { { if ($ !== void 0) { var oe = $.fileName.replace(/^.*[\\\/]/, ""), he = $.lineNumber; return ` Check your code at ` + oe + ":" + he + "."; } return ""; } } var nt = {}; function it($) { { var oe = Xe(); if (!oe) { var he = typeof $ == "string" ? $ : $.displayName || $.name; he && (oe = ` Check the top-level render call using <` + he + ">."); } return oe; } } function Mt($, oe) { { if (!$._store || $._store.validated || $.key != null) return; $._store.validated = !0; var he = it(oe); if (nt[he]) return; nt[he] = !0; var Ee = ""; $ && $._owner && $._owner !== We.current && (Ee = " It was passed a child from " + H($._owner.type) + "."), Pe($), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', he, Ee), Pe(null); } } function Te($, oe) { { if (typeof $ != "object") return; if (ge($)) for (var he = 0; he < $.length; he++) { var Ee = $[he]; Ve(Ee) && Mt(Ee, oe); } else if (Ve($)) $._store && ($._store.validated = !0); else if ($) { var ot = v($); if (typeof ot == "function" && ot !== $.entries) for (var ft = ot.call($), Ne; !(Ne = ft.next()).done; ) Ve(Ne.value) && Mt(Ne.value, oe); } } } function Bt($) { { var oe = $.type; if (oe == null || typeof oe == "string") return; var he; if (typeof oe == "function") he = oe.propTypes; else if (typeof oe == "object" && (oe.$$typeof === s || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. oe.$$typeof === f)) he = oe.propTypes; else return; if (he) { var Ee = H(oe); re(he, $.props, "prop", Ee, $); } else if (oe.PropTypes !== void 0 && !xe) { xe = !0; var ot = H(oe); b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ot || "Unknown"); } typeof oe.getDefaultProps == "function" && !oe.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function dt($) { { for (var oe = Object.keys($.props), he = 0; he < oe.length; he++) { var Ee = oe[he]; if (Ee !== "children" && Ee !== "key") { Pe($), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Ee), Pe(null); break; } } $.ref !== null && (Pe($), b("Invalid attribute `ref` supplied to `React.Fragment`."), Pe(null)); } } function zt($, oe, he, Ee, ot, ft) { { var Ne = O($); if (!Ne) { var Qe = ""; ($ === void 0 || typeof $ == "object" && $ !== null && Object.keys($).length === 0) && (Qe += " 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 ht = wt(ot); ht ? Qe += ht : Qe += Xe(); var pt; $ === null ? pt = "null" : ge($) ? pt = "array" : $ !== void 0 && $.$$typeof === t ? (pt = "<" + (H($.type) || "Unknown") + " />", Qe = " Did you accidentally export a JSX literal instead of a component?") : pt = typeof $, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", pt, Qe); } var St = ye($, oe, he, ot, ft); if (St == null) return St; if (Ne) { var cn = oe.children; if (cn !== void 0) if (Ee) if (ge(cn)) { for (var Vt = 0; Vt < cn.length; Vt++) Te(cn[Vt], $); Object.freeze && Object.freeze(cn); } else b("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 Te(cn, $); } return $ === r ? dt(St) : Bt(St), St; } } function Gn($, oe, he) { return zt($, oe, he, !0); } function Un($, oe, he) { return zt($, oe, he, !1); } var sn = Un, At = Gn; vl.Fragment = r, vl.jsx = sn, vl.jsxs = At; }()), vl; } process.env.NODE_ENV === "production" ? I5.exports = pB() : I5.exports = mB(); var g = I5.exports, ov = { exports: {} }; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ (function(e) { (function() { var t = {}.hasOwnProperty; function n() { for (var r = [], a = 0; a < arguments.length; a++) { var i = arguments[a]; if (i) { var o = typeof i; if (o === "string" || o === "number") r.push(i); else if (Array.isArray(i)) { if (i.length) { var l = n.apply(null, i); l && r.push(l); } } else if (o === "object") { if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) { r.push(i.toString()); continue; } for (var s in i) t.call(i, s) && i[s] && r.push(s); } } } return r.join(" "); } e.exports ? (n.default = n, e.exports = n) : window.classNames = n; })(); })(ov); var vB = ov.exports; const ne = /* @__PURE__ */ Ht(vB); function gB({ rounded: e, hasFill: t, variant: n, isLoading: r, size: a, fullWidth: i, align: o, onlyOneIcon: l, className: s, isSingleLine: u }) { const d = () => n === "disabled" ? "bg-action-primary-disabled text-letter-disabled disabled:text-letter-disabled disabled:bg-action-primary-disabled" : n === "primary" ? r ? "bg-action-primary-disabled" : "bg-action-primary-default hover:bg-action-primary-hovered active:bg-action-primary-active text-letter-on disabled:bg-action-primary-disabled" : n === "brand" ? r ? "bg-action-primary-disabled" : "bg-action-primary-brand text-letter-on disabled:bg-action-primary-disabled px-md py-sm text-md" : n === "primary-active" ? r ? "bg-action-primary-disabled" : "bg-action-primary-active hover:bg-action-primary-hovered active:bg-action-primary-active text-letter-on disabled:bg-action-primary-disabled" : n === "basic" ? r ? "bg-action-secondary-disabled" : "bg-action-opacity-default text-letter-default hover:bg-action-opacity-hovered active:bg-action-opacity-active disabled:bg-action-opacity-disabled" : n === "destructive" ? r ? "bg-action-critical-disabled" : "bg-action-critical-default text-letter-on hover:bg-action-critical-hovered active:bg-action-critical-active disabled:bg-action-critical-disabled" : n === "plain" ? "text-action-primary-default hover:bg-surface-action-hovered active:bg-surface-action-active active:text-action-primary-pressed disabled:bg-white" : n === "plain-monochrome" ? "text-letter-default hover:bg-action-opacity-hovered active:bg-action-opacity-active active:text-letter-default disabled:bg-white" : n === "plain-destructive" ? "text-letter-critical hover:bg-surface-critical-hovered active:bg-surface-critical-active active:text-letter-critical disabled:bg-white" : n === "plain-brand" ? "text-action-primary-brand hover:bg-action-primary-brand hover:text-letter-on active:bg-surface-critical-active active:text-letter-critical disabled:bg-white" : n === "primary-border" ? r ? "bg-action-primary-disabled" : "border border-action-primary-default text-action-primary-default hover:bg-action-primary-hovered hover:text-letter-on active:bg-action-primary-active text-action-primary-default disabled:bg-action-primary-disabled" : n === "destructive-border" ? r ? "bg-action-critical-disabled" : "border border-action-critical-default text-action-critical-default hover:bg-action-critical-hovered hover:text-letter-on active:bg-action-critical-active disabled:bg-action-critical-disabled" : n === "brand-border" ? r ? "bg-action-primary-disabled" : "border border-action-primary-brand hover:bg-action-primary-brand hover:text-letter-on active:bg-action-primary-brand text-action-primary-brand disabled:bg-action-primary-disabled" : n === "basic-border" ? r ? "bg-action-secondary-disabled" : "border border-action-opacity-default hover:bg-action-opacity-hovered hover:text-letter-on active:bg-action-opacity-active disabled:bg-action-opacity-disabled" : "", f = () => [ "primary", "basic", "destructive", "disabled", "primary-border", "destructive-border" ].includes(n ?? "primary"), h = ne("p-sm", { "h-[56px] w-[56px]": a === "md" && f(), "h-[36px] w-[36px]": a === "sm" && f(), "h-[40px] w-[40px]": a === "md" && !f(), "h-[30px] w-[30px]": a === "sm" && !f() }), p = ne("leading-xs", t ? "px-sm" : "p-[2.7px]", { "h-[36px] py-xs": a === "sm" && f() && t, "h-[56px] py-md": a === "md" && f() && t, "h-[30px] py-[5px]": a === "sm" && !f() && t, "h-[40px] py-[10px]": a === "md" && !f() && t }), A = () => l ? "" : i ? "w-full" : "w-auto", m = () => ({ all: "rounded-sm", left: "rounded-l-sm", right: "rounded-r-sm" })[e ?? "all"]; return { getClass: () => { const C = "text-xs font-sans font-medium disabled:text-letter-disabled flex items-center gap-x-2 focus:outline-none transition-colors"; return ne( m(), C, r ? "relative" : "", l ? h : p, A(), d(), { "justify-center": o === "center", "justify-start": o === "start", "justify-end": o === "end" }, s, { "whitespace-nowrap": u } ); } }; } function _6({ size: e = "sm", isActive: t = !1, imageUrl: n = "", className: r = "" }) { const a = ne({ "hover:border hover:border-icon-subdued": !t, "border border-focused-default": t }); return e === "xs" ? n ? /* @__PURE__ */ g.jsx("picture", { children: /* @__PURE__ */ g.jsx( "img", { className: ne( "rounded-full w-[24px] h-[24px] object-cover", a ), src: n, alt: "image user" } ) }) : /* @__PURE__ */ g.jsxs( "svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "", className: ne("rounded-full w-[24px]", a), children: [ /* @__PURE__ */ g.jsx("rect", { width: "24", height: "24", rx: "12", fill: "#E8E8E8" }), /* @__PURE__ */ g.jsx("circle", { cx: "12", cy: "12", r: "12", fill: "#E8E8E8" }), /* @__PURE__ */ g.jsx( "path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.0001 11.8571C13.8585 11.8571 15.3651 10.3221 15.3651 8.42857C15.3651 6.53502 13.8585 5 12.0001 5C10.1416 5 8.63503 6.53502 8.63503 8.42857C8.63503 10.3221 10.1416 11.8571 12.0001 11.8571ZM12.0001 21C14.8276 21 17.354 19.6604 19 17.5715C17.354 15.4825 14.8275 14.1429 11.9999 14.1429C9.17242 14.1429 6.64602 15.4824 5 17.5713C6.64601 19.6604 9.17247 21 12.0001 21Z", fill: "#61666B" } ) ] } ) : e === "sm" ? n ? /* @__PURE__ */ g.jsx("picture", { children: /* @__PURE__ */ g.jsx( "img", { className: ne( "rounded-full w-[32px] h-[32px] object-cover", a ), src: n, alt: "image user" } ) }) : /* @__PURE__ */ g.jsxs( "svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: ne("rounded-full w-[32px]", a), children: [ /* @__PURE__ */ g.jsx("rect", { width: "32", height: "32", rx: "16", fill: "#E8E8E8" }), /* @__PURE__ */ g.jsx( "path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16 16.1238C18.651 16.1238 20.8 13.9747 20.8 11.3238C20.8 8.67279 18.651 6.52376 16 6.52376C13.349 6.52376 11.2 8.67279 11.2 11.3238C11.2 13.9747 13.349 16.1238 16 16.1238ZM16 28.9238C20.0332 28.9238 23.637 27.0484 25.9849 24.1239C23.637 21.1992 20.0332 19.3238 15.9998 19.3238C11.9665 19.3238 8.36282 21.1991 6.01489 24.1236C8.36282 27.0483 11.9666 28.9238 16 28.9238Z", fill: "#61666B" } ) ] } ) : e === "md" ? n ? /* @__PURE__ */ g.jsx("picture", { children: /* @__PURE__ */ g.jsx( "img", { className: ne( "rounded-full w-[41.5px] h-[41.5px] object-cover", a ), src: n, alt: "image user" } ) }) : /* @__PURE__ */ g.jsxs( "svg", { width: "40", height: "40", viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: ne("rounded-full w-[41.5px]", a), children: [ /* @__PURE__ */ g.jsx("rect", { width: "40", height: "40", rx: "20", fill: "#E8E8E8" }), /* @__PURE__ */ g.jsx( "path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20 20.1547C23.3137 20.1547 26 17.4684 26 14.1547C26 10.841 23.3137 8.15469 20 8.15469C16.6863 8.15469 14 10.841 14 14.1547C14 17.4684 16.6863 20.1547 20 20.1547ZM20 36.1547C25.0416 36.1547 29.5462 33.8105 32.4811 30.1548C29.5462 26.4991 25.0415 24.1547 19.9998 24.1547C14.9582 24.1547 10.4535 26.4989 7.51862 30.1545C10.4535 33.8103 14.9583 36.1547 20 36.1547Z", fill: "#61666B" } ) ] } ) : e === "lg" ? n ? /* @__PURE__ */ g.jsx("picture", { children: /* @__PURE__ */ g.jsx( "img", { className: ne( "rounded-full w-[61.5px] h-[61.5px] object-cover", a ), src: n, alt: "image user" } ) }) : /* @__PURE__ */ g.jsxs( "svg", { width: "60", height: "60", viewBox: "0 0 60 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: ne("rounded-full w-[61.5px]", a), children: [ /* @__PURE__ */ g.jsx("rect", { width: "60", height: "60", rx: "30", fill: "#E8E8E8" }), /* @__PURE__ */ g.jsx( "path", { fillRule: "evenodd", clipRule: "evenodd", d: "M30 30.232C34.9706 30.232 39 26.2026 39 21.232C39 16.2615 34.9706 12.232 30 12.232C25.0294 12.232 21 16.2615 21 21.232C21 26.2026 25.0294 30.232 30 30.232ZM30 54.232C37.5623 54.232 44.3193 50.7157 48.7217 45.2323C44.3193 39.7486 37.5622 36.232 29.9996 36.232C22.4373 36.232 15.6803 39.7484 11.2779 45.2318C15.6803 50.7155 22.4374 54.232 30 54.232Z", fill: "#61666B" } ) ] } ) : e === "custom" && n && r ? /* @__PURE__ */ g.jsx("picture", { children: /* @__PURE__ */ g.jsx( "img", { className: ne( "rounded-full object-cover", r, a ), src: n, alt: "image user" } ) }) : /* @__PURE__ */ g.jsx(g.Fragment, {}); } function lv(e) { const { size: t, weight: n, lineHeight: r, className: a, color: i } = e; return { getWeight: () => ne({ "font-bold": n === "bold", "font-regular": n === "regular", "font-medium": n === "medium" }), getFontSize: () => ne({ "text-xxs": t === "xxs", "text-xs": t === "xs", "text-sm": t === "sm", "text-md": t === "md", "text-lg": t === "lg", "text-xl": t === "xl", "text-xxl": t === "xxl" }), getLineHeight: () => ne({ "leading-xxs": r === "xxs", "leading-xs": r === "xs", "leading-sm": r === "sm", "leading-md": r === "md", "leading-lg": r === "lg", "leading-xl": r === "xl", "leading-xxl": r === "xxl" }), getColorText: () => ne({ "text-letter-on": i === "on", "text-letter-critical": i === "critical", "text-letter-default": i === "default", "text-letter-disabled": i === "disabled", "text-letter-subdued": i === "subdued", "text-letter-success": i === "success", "text-letter-warning": i === "warning", "text-letter-brand": i === "brand", "text-action-primary-default": i === "primary" }), getClassName: () => ne(a) }; } function oi(e) { const t = (a) => typeof window < "u" ? window.matchMedia(a).matches : !1, [n, r] = me(t(e)); return Se(() => { const a = window.matchMedia(e); a.matches !== n && r(a.matches); const i = () => r(a.matches); return window.addEventListener("resize", i), () => window.removeEventListener("resize", i); }, [n, e]), n; } function AB({ variant: e, ...t }) { const n = "font-sans", r = lv({ ...t }), { getColorText: a, getFontSize: i, ...o } = r, { getLineHeight: l, getWeight: s, getClassName: u } = o; return { getClass: ne(n, (() => e === "xxl" ? ne( s() || "font-bold", l() || "leading-xxl", i() || "text-xxl" ) : e === "xl" ? ne( s() || "font-bold", l() || "leading-xl", i() || "text-xl" ) : e === "lg" ? ne( s() || "font-bold", l() || "leading-lg", i() || "text-lg" ) : e === "md" ? ne( s() || "font-bold", l() || "leading-md", i() || "text-md" ) : e === "sm" ? ne("font-regular", "leading-sm", "text-sm") : e === "heading" ? ne( s() || "font-bold", l() || "leading-sm", i() || "text-sm" ) : e === "subheading" ? ne( s() || "font-bold", l() || "leading-xxs", i() || "text-xs" ) : "")(), a(), u()) }; } const CB = (e, t) => typeof e == "string" && t ? t == null ? void 0 : t(e) : e, j3 = ({ _t: e, useT: t = !0 }) => ({ _t: Et( (r) => CB(r, t !== !1 ? e : void 0), [e, t] ) }); function xt(e, t, n) { return typeof e == "string" && t && n ? n(e) : e; } function n1({ variant: e = "heading", children: t, lineHeight: n, weight: r, color: a = "default", size: i, className: o, as: l = "h2", ...s }) { const { getClass: u } = AB({ size: i, weight: r, variant: e, color: a, lineHeight: n, className: o }), { _t: d } = j3({ ...s }); return /* @__PURE__ */ g.jsx(l, { className: u, children: d(t) }); } function yB({ variant: e, ...t }) { const n = "font-sans", r = lv({ ...t }), { getColorText: a, getFontSize: i, getLineHeight: o, getWeight: l, getClassName: s } = r; return { getClass: ne(n, (() => e === "button" ? ne( l() || "font-medium", o() || "leading-xs", i() || "text-xs" ) : e === "body" ? ne( l() || "font-regular", o() || "leading-xs", i() || "text-xs" ) : e === "highlight" ? ne( l() || "font-bold", o() || "leading-xs", i() || "text-xs" ) : e === "caption" ? ne( l() || "font-regular", o() || "leading-xxs", i() || "text-xxs" ) : "")(), a(), s()) }; } function sv(e) { const { variant: t = "body", lineHeight: n, weight: r, color: a = "default", size: i, className: o, onClick: l, htmlFor: s } = e, { getClass: u } = yB({ size: i, weight: r, variant: t, color: a, lineHeight: n, className: o }); return { attributes: { ...l && { onClick: l }, ...s && { htmlFor: s } }, getClass: u }; } function Ie(e) { const { attributes: t, getClass: n } = sv(e), { children: r, as: a = "p" } = e, { _t: i } = j3({ ...e }); return /* @__PURE__ */ g.jsx(a, { className: n, ...t, children: i(r) }); } const _a = Ue((e, t) => { const { attributes: n, getClass: r } = sv(e), { children: a, as: i = "p" } = e; return /* @__PURE__ */ g.jsx(i, { className: r, ...n, ref: t, children: a }); }); function N6e({ kind: e = "default", variant: t, className: n, children: r, as: a = "span", onClick: i, _t: o, useT: l = !0 }) { const s = t || e, u = ne( n, "font-sans cursor-pointer font-book text-xs leading-xs", s === "underline" && "text-action-primary-default underline decoration-action-primary-default decoration-solid underline-offset-4 active:decoration-solid hover:decoration-transparent hover:text-action-primary-hovered active:text-action-primary-active active:decoration-action-primary-active", s === "default" && "text-action-primary-default active:decoration-solid hover:text-action-primary-hovered active:text-action-primary-active", s === "monochrome" && "text-letter-default underline decoration-letter-default decoration-solid underline-offset-4 active:decoration-solid hover:decoration-transparent hover:text-letter-default active:text-letter-default", s === "brandunderline" && "text-letter-brand underline decoration-action-brand-active decoration-solid underline-offset-4 active:decoration-solid hover:decoration-transparent hover:text-letter-brand active:text-letter-brand active:decoration-action-primary-active" ), d = xt(r, l, o); return /* @__PURE__ */ g.jsx(a, { onClick: i, className: u, children: d }); } function cv({ variant: e, children: t, state: n, addonStart: r, addonEnd: a, _t: i, useT: o = !0 }) { const l = xt(t, o, i); return /* @__PURE__ */ g.jsxs("span", { className: "flex gap-2 items-center", children: [ n && /* @__PURE__ */ g.jsx( "div", { className: ne("w-2 h-2 rounded-2xl", { "bg-focused-default": n === "active", "bg-surface-neutral-default": n === "disabled" }) } ), /* @__PURE__ */ g.jsxs( "span", { className: ne( "inline-flex items-center gap-1 rounded-md py-[2px] px-2", { "bg-surface-neutral-default": e === "neutral", "bg-surface-action-default": e === "info", "bg-surface-success-default": e === "success", "bg-surface-warning-default": e === "warning", "bg-surface-critical-default": e === "critical" } ), children: [ r && /* @__PURE__ */ g.jsx("span", { className: "flex-shrink-0", children: r }), /* @__PURE__ */ g.jsx(Ie, { as: "span", variant: "caption", children: l }), a && /* @__PURE__ */ g.jsx("span", { className: "flex-shrink-0", children: a }) ] } ) ] }); } const H3 = typeof window > "u" || typeof document > "u"; let yn = H3 ? Se : Lo; function zr(e) { let t = pe(e); return yn(() => { t.current = e; }, [e]), t; } function $2(e) { typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => { throw t; })); } function V1() { let e = [], t = [], n = { enqueue(r) { t.push(r); }, addEventListener(r, a, i, o) { return r.addEventListener(a, i, o), n.add(() => r.removeEventListener(a, i, o)); }, requestAnimationFrame(...r) { let a = requestAnimationFrame(...r); return n.add(() => cancelAnimationFrame(a)); }, nextFrame(...r) { return n.requestAnimationFrame(() => n.requestAnimationFrame(...r)); }, setTimeout(...r) { let a = setTimeout(...r); return n.add(() => clearTimeout(a)); }, microTask(...r) { let a = { current: !0 }; return $2(() => { a.current && r[0](); }), n.add(() => { a.current = !1; }); }, add(r) { return e.push(r), () => { let a = e.indexOf(r); if (a >= 0) { let [i] = e.splice(a, 1); i(); } }; }, dispose() { for (let r of e.splice(0)) r(); }, async workQueue() { for (let r of t.splice(0)) await r(); } }; return n; } function L3() { let [e] = me(V1); return Se(() => () => e.dispose(), [e]), e; } let at = function(e) { let t = zr(e); return c.useCallback((...n) => t.current(...n), [t]); }, Wu = { serverHandoffComplete: !1 }; function ko() { let [e, t] = me(Wu.serverHandoffComplete); return Se(() => { e !== !0 && t(!0); }, [e]), Se(() => { Wu.serverHandoffComplete === !1 && (Wu.serverHandoffComplete = !0); }, []), e; } var K6; let bB = 0; function q6() { return ++bB; } let Qn = (K6 = c.useId) != null ? K6 : function() { let e = ko(), [t, n] = c.useState(e ? q6 : null); return yn(() => { t === null && n(q6()); }, [t]), t != null ? "" + t : void 0; }; function nn(e, t, ...n) { if (e in t) { let a = t[e]; return typeof a == "function" ? a(...n) : a; } let r = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((a) => `"${a}"`).join(", ")}.`); throw Error.captureStackTrace && Error.captureStackTrace(r, nn), r; } function Ia(e) { return H3 ? null : e instanceof Node ? e.ownerDocument : e != null && e.hasOwnProperty("current") && e.current instanceof Node ? e.current.ownerDocument : document; } let M5 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","); var xn = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(xn || {}), oa = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(oa || {}), EB = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(EB || {}); function uv(e = document.body) { return e == null ? [] : Array.from(e.querySelectorAll(M5)); } var W8 = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(W8 || {}); function X8(e, t = 0) { var n; return e === ((n = Ia(e)) == null ? void 0 : n.body) ? !1 : nn(t, { 0() { return e.matches(M5); }, 1() { let r = e; for (; r !== null; ) { if (r.matches(M5)) return !0; r = r.parentElement; } return !1; } }); } function dv(e) { let t = Ia(e); V1().nextFrame(() => { t && !X8(t.activeElement, 0) && ni(e); }); } function ni(e) { e == null || e.focus({ preventScroll: !0 }); } let xB = ["textarea", "input"].join(","); function wB(e) { var t, n; return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, xB)) != null ? n : !1; } function n2(e, t = (n) => n) { return e.slice().sort((n, r) => { let a = t(n), i = t(r); if (a === null || i === null) return 0; let o = a.compareDocumentPosition(i); return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0; }); } function IB(e, t) { return Hr(uv(), t, !0, e); } function Hr(e, t, n = !0, r = null) { let a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e.ownerDocument, i = Array.isArray(e) ? n ? n2(e) : e : uv(e); r = r ?? a.activeElement; let o = (() => { if (t & 5) return 1; if (t & 10) return -1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); })(), l = (() => { if (t & 1) return 0; if (t & 2) return Math.max(0, i.indexOf(r)) - 1; if (t & 4) return Math.max(0, i.indexOf(r)) + 1; if (t & 8) return i.length - 1; throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); })(), s = t & 32 ? { preventScroll: !0 } : {}, u = 0, d = i.length, f; do { if (u >= d || u + d <= 0) return 0; let h = l + u; if (t & 16) h = (h + d) % d; else { if (h < 0) return 3; if (h >= d) return 1; } f = i[h], f == null || f.focus(s), u += o; } while (f !== a.activeElement); return t & 6 && wB(f) && f.select(), f.hasAttribute("tabindex") || f.setAttribute("tabindex", "0"), 2; } function Xu(e, t, n) { let r = zr(t); Se(() => { function a(i) { r.current(i); } return document.addEventListener(e, a, n), () => document.removeEventListener(e, a, n); }, [e, n]); } function fv(e, t, n = !0) { let r = pe(!1); Se(() => { requestAnimationFrame(() => { r.current = n; }); }, [n]); function a(o, l) { if (!r.current || o.defaultPrevented) return; let s = function d(f) { return typeof f == "function" ? d(f()) : Array.isArray(f) || f instanceof Set ? f : [f]; }(e), u = l(o); if (u !== null && u.getRootNode().contains(u)) { for (let d of s) { if (d === null) continue; let f = d instanceof HTMLElement ? d : d.current; if (f != null && f.contains(u)) return; } return !X8(u, W8.Loose) && u.tabIndex !== -1 && o.preventDefault(), t(o, u); } } let i = pe(null); Xu("mousedown", (o) => { var l, s; r.current && (i.current = ((s = (l = o.composedPath) == null ? void 0 : l.call(o)) == null ? void 0 : s[0]) || o.target); }, !0), Xu("click", (o) => { !i.current || (a(o, () => i.current), i.current = null); }, !0), Xu("blur", (o) => a(o, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0); } function e9(e) { var t; if (e.type) return e.type; let n = (t = e.as) != null ? t : "button"; if (typeof n == "string" && n.toLowerCase() === "button") return "button"; } function k3(e, t) { let [n, r] = me(() => e9(e)); return yn(() => { r(e9(e)); }, [e.type, e.as]), yn(() => { n || !t.current || t.current instanceof HTMLButtonElement && !t.current.hasAttribute("type") && r("button"); }, [n, t]), n; } let hv = Symbol(); function pv(e, t = !0) { return Object.assign(e, { [hv]: t }); } function _t(...e) { let t = pe(e); Se(() => { t.current = e; }, [e]); let n = at((r) => { for (let a of t.current) a != null && (typeof a == "function" ? a(r) : a.current = r); }); return e.every((r) => r == null || (r == null ? void 0 : r[hv])) ? void 0 : n; } function mv({ container: e, accept: t, walk: n, enabled: r = !0 }) { let a = pe(t), i = pe(n); Se(() => { a.current = t, i.current = n; }, [t, n]), yn(() => { if (!e || !r) return; let o = Ia(e); if (!o) return; let l = a.current, s = i.current, u = Object.assign((f) => l(f), { acceptNode: l }), d = o.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, u, !1); for (; d.nextNode(); ) s(d.currentNode); }, [e, r, a, i]); } function MB(e) { throw new Error("Unexpected object: " + e); } var _r = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(_r || {}); function SB(e, t) { let n = t.resolveItems(); if (n.length <= 0) return null; let r = t.resolveActiveIndex(), a = r ?? -1, i = (() => { switch (e.focus) { case 0: return n.findIndex((o) => !t.resolveDisabled(o)); case 1: { let o = n.slice().reverse().findIndex((l, s, u) => a !== -1 && u.length - s - 1 >= a ? !1 : !t.resolveDisabled(l)); return o === -1 ? o : n.length - 1 - o; } case 2: return n.findIndex((o, l) => l <= a ? !1 : !t.resolveDisabled(o)); case 3: { let o = n.slice().reverse().findIndex((l) => !t.resolveDisabled(l)); return o === -1 ? o : n.length - 1 - o; } case 4: return n.findIndex((o) => t.resolveId(o) === e.id); case 5: return null; default: MB(e); } })(); return i === -1 ? r : i; } var p1 = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(p1 || {}), j1 = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(j1 || {}); function Zt({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: a, visible: i = !0, name: o }) { let l = vv(t, e); if (i) return