mongodb-chatbot-ui
Version:
UI React components for the MongoDB Assistant
71 lines (70 loc) • 2.09 kB
JavaScript
function f(r, e, t) {
return (e = function(i) {
var a = function(n, l) {
if (typeof n != "object" || !n)
return n;
var o = n[Symbol.toPrimitive];
if (o !== void 0) {
var u = o.call(n, l);
if (typeof u != "object")
return u;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(n);
}(i, "string");
return typeof a == "symbol" ? a : a + "";
}(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
}
function b() {
return b = Object.assign ? Object.assign.bind() : function(r) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var i in t)
({}).hasOwnProperty.call(t, i) && (r[i] = t[i]);
}
return r;
}, b.apply(null, arguments);
}
function s(r, e) {
if (r == null)
return {};
var t, i, a = function(l, o) {
if (l == null)
return {};
var u = {};
for (var c in l)
if ({}.hasOwnProperty.call(l, c)) {
if (o.indexOf(c) !== -1)
continue;
u[c] = l[c];
}
return u;
}(r, e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(r);
for (i = 0; i < n.length; i++)
t = n[i], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(r, t) && (a[t] = r[t]);
}
return a;
}
function v(r, e) {
return e || (e = r.slice(0)), Object.freeze(Object.defineProperties(r, { raw: { value: Object.freeze(e) } }));
}
var p = { small: 14, default: 16, large: 20, xlarge: 24 };
function y(r, e, t) {
var i, a = t["aria-label"], n = t["aria-labelledby"], l = t.title, o = t.titleId;
switch (r) {
case "img":
return a || n || l ? f(f({}, "aria-labelledby", l ? n ? "".concat(o, " ").concat(n) : o : n), "aria-label", a) : { "aria-label": (i = e, "".concat(i.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) };
case "presentation":
return { "aria-hidden": !0, alt: "" };
}
}
export {
v as a,
f as e,
y as i,
p as n,
b as r,
s as t
};