@cgi-learning-hub/ui
Version:
@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features
673 lines (672 loc) • 23.8 kB
JavaScript
var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function ge(o) {
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
}
var V = { exports: {} }, N = { exports: {} }, T = {};
/** @license React v16.13.1
* react-is.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 ue;
function Pe() {
if (ue) return T;
ue = 1;
var o = typeof Symbol == "function" && Symbol.for, w = o ? Symbol.for("react.element") : 60103, O = o ? Symbol.for("react.portal") : 60106, d = o ? Symbol.for("react.fragment") : 60107, P = o ? Symbol.for("react.strict_mode") : 60108, a = o ? Symbol.for("react.profiler") : 60114, S = o ? Symbol.for("react.provider") : 60109, l = o ? Symbol.for("react.context") : 60110, _ = o ? Symbol.for("react.async_mode") : 60111, g = o ? Symbol.for("react.concurrent_mode") : 60111, b = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, C = o ? Symbol.for("react.suspense_list") : 60120, x = o ? Symbol.for("react.memo") : 60115, M = o ? Symbol.for("react.lazy") : 60116, R = o ? Symbol.for("react.block") : 60121, I = o ? Symbol.for("react.fundamental") : 60117, q = o ? Symbol.for("react.responder") : 60118, F = o ? Symbol.for("react.scope") : 60119;
function j(t) {
if (typeof t == "object" && t !== null) {
var k = t.$$typeof;
switch (k) {
case w:
switch (t = t.type, t) {
case _:
case g:
case d:
case a:
case P:
case E:
return t;
default:
switch (t = t && t.$$typeof, t) {
case l:
case b:
case M:
case x:
case S:
return t;
default:
return k;
}
}
case O:
return k;
}
}
}
function A(t) {
return j(t) === g;
}
return T.AsyncMode = _, T.ConcurrentMode = g, T.ContextConsumer = l, T.ContextProvider = S, T.Element = w, T.ForwardRef = b, T.Fragment = d, T.Lazy = M, T.Memo = x, T.Portal = O, T.Profiler = a, T.StrictMode = P, T.Suspense = E, T.isAsyncMode = function(t) {
return A(t) || j(t) === _;
}, T.isConcurrentMode = A, T.isContextConsumer = function(t) {
return j(t) === l;
}, T.isContextProvider = function(t) {
return j(t) === S;
}, T.isElement = function(t) {
return typeof t == "object" && t !== null && t.$$typeof === w;
}, T.isForwardRef = function(t) {
return j(t) === b;
}, T.isFragment = function(t) {
return j(t) === d;
}, T.isLazy = function(t) {
return j(t) === M;
}, T.isMemo = function(t) {
return j(t) === x;
}, T.isPortal = function(t) {
return j(t) === O;
}, T.isProfiler = function(t) {
return j(t) === a;
}, T.isStrictMode = function(t) {
return j(t) === P;
}, T.isSuspense = function(t) {
return j(t) === E;
}, T.isValidElementType = function(t) {
return typeof t == "string" || typeof t == "function" || t === d || t === g || t === a || t === P || t === E || t === C || typeof t == "object" && t !== null && (t.$$typeof === M || t.$$typeof === x || t.$$typeof === S || t.$$typeof === l || t.$$typeof === b || t.$$typeof === I || t.$$typeof === q || t.$$typeof === F || t.$$typeof === R);
}, T.typeOf = j, T;
}
var h = {};
/** @license React v16.13.1
* react-is.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 ce;
function Se() {
return ce || (ce = 1, process.env.NODE_ENV !== "production" && (function() {
var o = typeof Symbol == "function" && Symbol.for, w = o ? Symbol.for("react.element") : 60103, O = o ? Symbol.for("react.portal") : 60106, d = o ? Symbol.for("react.fragment") : 60107, P = o ? Symbol.for("react.strict_mode") : 60108, a = o ? Symbol.for("react.profiler") : 60114, S = o ? Symbol.for("react.provider") : 60109, l = o ? Symbol.for("react.context") : 60110, _ = o ? Symbol.for("react.async_mode") : 60111, g = o ? Symbol.for("react.concurrent_mode") : 60111, b = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, C = o ? Symbol.for("react.suspense_list") : 60120, x = o ? Symbol.for("react.memo") : 60115, M = o ? Symbol.for("react.lazy") : 60116, R = o ? Symbol.for("react.block") : 60121, I = o ? Symbol.for("react.fundamental") : 60117, q = o ? Symbol.for("react.responder") : 60118, F = o ? Symbol.for("react.scope") : 60119;
function j(r) {
return typeof r == "string" || typeof r == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
r === d || r === g || r === a || r === P || r === E || r === C || typeof r == "object" && r !== null && (r.$$typeof === M || r.$$typeof === x || r.$$typeof === S || r.$$typeof === l || r.$$typeof === b || r.$$typeof === I || r.$$typeof === q || r.$$typeof === F || r.$$typeof === R);
}
function A(r) {
if (typeof r == "object" && r !== null) {
var D = r.$$typeof;
switch (D) {
case w:
var B = r.type;
switch (B) {
case _:
case g:
case d:
case a:
case P:
case E:
return B;
default:
var se = B && B.$$typeof;
switch (se) {
case l:
case b:
case M:
case x:
case S:
return se;
default:
return D;
}
}
case O:
return D;
}
}
}
var t = _, k = g, H = l, J = S, G = w, X = b, U = d, K = M, Z = x, L = O, Q = a, Y = P, W = E, z = !1;
function ee(r) {
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), e(r) || A(r) === _;
}
function e(r) {
return A(r) === g;
}
function n(r) {
return A(r) === l;
}
function c(r) {
return A(r) === S;
}
function s(r) {
return typeof r == "object" && r !== null && r.$$typeof === w;
}
function i(r) {
return A(r) === b;
}
function p(r) {
return A(r) === d;
}
function f(r) {
return A(r) === M;
}
function u(r) {
return A(r) === x;
}
function y(r) {
return A(r) === O;
}
function m(r) {
return A(r) === a;
}
function v(r) {
return A(r) === P;
}
function $(r) {
return A(r) === E;
}
h.AsyncMode = t, h.ConcurrentMode = k, h.ContextConsumer = H, h.ContextProvider = J, h.Element = G, h.ForwardRef = X, h.Fragment = U, h.Lazy = K, h.Memo = Z, h.Portal = L, h.Profiler = Q, h.StrictMode = Y, h.Suspense = W, h.isAsyncMode = ee, h.isConcurrentMode = e, h.isContextConsumer = n, h.isContextProvider = c, h.isElement = s, h.isForwardRef = i, h.isFragment = p, h.isLazy = f, h.isMemo = u, h.isPortal = y, h.isProfiler = m, h.isStrictMode = v, h.isSuspense = $, h.isValidElementType = j, h.typeOf = A;
})()), h;
}
var le;
function me() {
return le || (le = 1, process.env.NODE_ENV === "production" ? N.exports = Pe() : N.exports = Se()), N.exports;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var re, de;
function Oe() {
if (de) return re;
de = 1;
var o = Object.getOwnPropertySymbols, w = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
function d(a) {
if (a == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(a);
}
function P() {
try {
if (!Object.assign)
return !1;
var a = new String("abc");
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
return !1;
for (var S = {}, l = 0; l < 10; l++)
S["_" + String.fromCharCode(l)] = l;
var _ = Object.getOwnPropertyNames(S).map(function(b) {
return S[b];
});
if (_.join("") !== "0123456789")
return !1;
var g = {};
return "abcdefghijklmnopqrst".split("").forEach(function(b) {
g[b] = b;
}), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return re = P() ? Object.assign : function(a, S) {
for (var l, _ = d(a), g, b = 1; b < arguments.length; b++) {
l = Object(arguments[b]);
for (var E in l)
w.call(l, E) && (_[E] = l[E]);
if (o) {
g = o(l);
for (var C = 0; C < g.length; C++)
O.call(l, g[C]) && (_[g[C]] = l[g[C]]);
}
}
return _;
}, re;
}
var te, pe;
function fe() {
if (pe) return te;
pe = 1;
var o = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return te = o, te;
}
var ne, ye;
function Ee() {
return ye || (ye = 1, ne = Function.call.bind(Object.prototype.hasOwnProperty)), ne;
}
var oe, ve;
function _e() {
if (ve) return oe;
ve = 1;
var o = function() {
};
if (process.env.NODE_ENV !== "production") {
var w = /* @__PURE__ */ fe(), O = {}, d = /* @__PURE__ */ Ee();
o = function(a) {
var S = "Warning: " + a;
typeof console < "u" && console.error(S);
try {
throw new Error(S);
} catch {
}
};
}
function P(a, S, l, _, g) {
if (process.env.NODE_ENV !== "production") {
for (var b in a)
if (d(a, b)) {
var E;
try {
if (typeof a[b] != "function") {
var C = Error(
(_ || "React class") + ": " + l + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw C.name = "Invariant Violation", C;
}
E = a[b](S, b, _, l, null, w);
} catch (M) {
E = M;
}
if (E && !(E instanceof Error) && o(
(_ || "React class") + ": type specification of " + l + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof E + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), E instanceof Error && !(E.message in O)) {
O[E.message] = !0;
var x = g ? g() : "";
o(
"Failed " + l + " type: " + E.message + (x ?? "")
);
}
}
}
}
return P.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (O = {});
}, oe = P, oe;
}
var ie, be;
function Re() {
if (be) return ie;
be = 1;
var o = me(), w = Oe(), O = /* @__PURE__ */ fe(), d = /* @__PURE__ */ Ee(), P = /* @__PURE__ */ _e(), a = function() {
};
process.env.NODE_ENV !== "production" && (a = function(l) {
var _ = "Warning: " + l;
typeof console < "u" && console.error(_);
try {
throw new Error(_);
} catch {
}
});
function S() {
return null;
}
return ie = function(l, _) {
var g = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator";
function E(e) {
var n = e && (g && e[g] || e[b]);
if (typeof n == "function")
return n;
}
var C = "<<anonymous>>", x = {
array: q("array"),
bigint: q("bigint"),
bool: q("boolean"),
func: q("function"),
number: q("number"),
object: q("object"),
string: q("string"),
symbol: q("symbol"),
any: F(),
arrayOf: j,
element: A(),
elementType: t(),
instanceOf: k,
node: X(),
objectOf: J,
oneOf: H,
oneOfType: G,
shape: K,
exact: Z
};
function M(e, n) {
return e === n ? e !== 0 || 1 / e === 1 / n : e !== e && n !== n;
}
function R(e, n) {
this.message = e, this.data = n && typeof n == "object" ? n : {}, this.stack = "";
}
R.prototype = Error.prototype;
function I(e) {
if (process.env.NODE_ENV !== "production")
var n = {}, c = 0;
function s(p, f, u, y, m, v, $) {
if (y = y || C, v = v || u, $ !== O) {
if (_) {
var r = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
);
throw r.name = "Invariant Violation", r;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var D = y + ":" + u;
!n[D] && // Avoid spamming the console because they are often not actionable except for lib authors
c < 3 && (a(
"You are manually calling a React.PropTypes validation function for the `" + v + "` prop on `" + y + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
), n[D] = !0, c++);
}
}
return f[u] == null ? p ? f[u] === null ? new R("The " + m + " `" + v + "` is marked as required " + ("in `" + y + "`, but its value is `null`.")) : new R("The " + m + " `" + v + "` is marked as required in " + ("`" + y + "`, but its value is `undefined`.")) : null : e(f, u, y, m, v);
}
var i = s.bind(null, !1);
return i.isRequired = s.bind(null, !0), i;
}
function q(e) {
function n(c, s, i, p, f, u) {
var y = c[s], m = Y(y);
if (m !== e) {
var v = W(y);
return new R(
"Invalid " + p + " `" + f + "` of type " + ("`" + v + "` supplied to `" + i + "`, expected ") + ("`" + e + "`."),
{ expectedType: e }
);
}
return null;
}
return I(n);
}
function F() {
return I(S);
}
function j(e) {
function n(c, s, i, p, f) {
if (typeof e != "function")
return new R("Property `" + f + "` of component `" + i + "` has invalid PropType notation inside arrayOf.");
var u = c[s];
if (!Array.isArray(u)) {
var y = Y(u);
return new R("Invalid " + p + " `" + f + "` of type " + ("`" + y + "` supplied to `" + i + "`, expected an array."));
}
for (var m = 0; m < u.length; m++) {
var v = e(u, m, i, p, f + "[" + m + "]", O);
if (v instanceof Error)
return v;
}
return null;
}
return I(n);
}
function A() {
function e(n, c, s, i, p) {
var f = n[c];
if (!l(f)) {
var u = Y(f);
return new R("Invalid " + i + " `" + p + "` of type " + ("`" + u + "` supplied to `" + s + "`, expected a single ReactElement."));
}
return null;
}
return I(e);
}
function t() {
function e(n, c, s, i, p) {
var f = n[c];
if (!o.isValidElementType(f)) {
var u = Y(f);
return new R("Invalid " + i + " `" + p + "` of type " + ("`" + u + "` supplied to `" + s + "`, expected a single ReactElement type."));
}
return null;
}
return I(e);
}
function k(e) {
function n(c, s, i, p, f) {
if (!(c[s] instanceof e)) {
var u = e.name || C, y = ee(c[s]);
return new R("Invalid " + p + " `" + f + "` of type " + ("`" + y + "` supplied to `" + i + "`, expected ") + ("instance of `" + u + "`."));
}
return null;
}
return I(n);
}
function H(e) {
if (!Array.isArray(e))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
) : a("Invalid argument supplied to oneOf, expected an array.")), S;
function n(c, s, i, p, f) {
for (var u = c[s], y = 0; y < e.length; y++)
if (M(u, e[y]))
return null;
var m = JSON.stringify(e, function($, r) {
var D = W(r);
return D === "symbol" ? String(r) : r;
});
return new R("Invalid " + p + " `" + f + "` of value `" + String(u) + "` " + ("supplied to `" + i + "`, expected one of " + m + "."));
}
return I(n);
}
function J(e) {
function n(c, s, i, p, f) {
if (typeof e != "function")
return new R("Property `" + f + "` of component `" + i + "` has invalid PropType notation inside objectOf.");
var u = c[s], y = Y(u);
if (y !== "object")
return new R("Invalid " + p + " `" + f + "` of type " + ("`" + y + "` supplied to `" + i + "`, expected an object."));
for (var m in u)
if (d(u, m)) {
var v = e(u, m, i, p, f + "." + m, O);
if (v instanceof Error)
return v;
}
return null;
}
return I(n);
}
function G(e) {
if (!Array.isArray(e))
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), S;
for (var n = 0; n < e.length; n++) {
var c = e[n];
if (typeof c != "function")
return a(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + z(c) + " at index " + n + "."
), S;
}
function s(i, p, f, u, y) {
for (var m = [], v = 0; v < e.length; v++) {
var $ = e[v], r = $(i, p, f, u, y, O);
if (r == null)
return null;
r.data && d(r.data, "expectedType") && m.push(r.data.expectedType);
}
var D = m.length > 0 ? ", expected one of type [" + m.join(", ") + "]" : "";
return new R("Invalid " + u + " `" + y + "` supplied to " + ("`" + f + "`" + D + "."));
}
return I(s);
}
function X() {
function e(n, c, s, i, p) {
return L(n[c]) ? null : new R("Invalid " + i + " `" + p + "` supplied to " + ("`" + s + "`, expected a ReactNode."));
}
return I(e);
}
function U(e, n, c, s, i) {
return new R(
(e || "React class") + ": " + n + " type `" + c + "." + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`."
);
}
function K(e) {
function n(c, s, i, p, f) {
var u = c[s], y = Y(u);
if (y !== "object")
return new R("Invalid " + p + " `" + f + "` of type `" + y + "` " + ("supplied to `" + i + "`, expected `object`."));
for (var m in e) {
var v = e[m];
if (typeof v != "function")
return U(i, p, f, m, W(v));
var $ = v(u, m, i, p, f + "." + m, O);
if ($)
return $;
}
return null;
}
return I(n);
}
function Z(e) {
function n(c, s, i, p, f) {
var u = c[s], y = Y(u);
if (y !== "object")
return new R("Invalid " + p + " `" + f + "` of type `" + y + "` " + ("supplied to `" + i + "`, expected `object`."));
var m = w({}, c[s], e);
for (var v in m) {
var $ = e[v];
if (d(e, v) && typeof $ != "function")
return U(i, p, f, v, W($));
if (!$)
return new R(
"Invalid " + p + " `" + f + "` key `" + v + "` supplied to `" + i + "`.\nBad object: " + JSON.stringify(c[s], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(e), null, " ")
);
var r = $(u, v, i, p, f + "." + v, O);
if (r)
return r;
}
return null;
}
return I(n);
}
function L(e) {
switch (typeof e) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !e;
case "object":
if (Array.isArray(e))
return e.every(L);
if (e === null || l(e))
return !0;
var n = E(e);
if (n) {
var c = n.call(e), s;
if (n !== e.entries) {
for (; !(s = c.next()).done; )
if (!L(s.value))
return !1;
} else
for (; !(s = c.next()).done; ) {
var i = s.value;
if (i && !L(i[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function Q(e, n) {
return e === "symbol" ? !0 : n ? n["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && n instanceof Symbol : !1;
}
function Y(e) {
var n = typeof e;
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : Q(n, e) ? "symbol" : n;
}
function W(e) {
if (typeof e > "u" || e === null)
return "" + e;
var n = Y(e);
if (n === "object") {
if (e instanceof Date)
return "date";
if (e instanceof RegExp)
return "regexp";
}
return n;
}
function z(e) {
var n = W(e);
switch (n) {
case "array":
case "object":
return "an " + n;
case "boolean":
case "date":
case "regexp":
return "a " + n;
default:
return n;
}
}
function ee(e) {
return !e.constructor || !e.constructor.name ? C : e.constructor.name;
}
return x.checkPropTypes = P, x.resetWarningCache = P.resetWarningCache, x.PropTypes = x, x;
}, ie;
}
var ae, Te;
function Ce() {
if (Te) return ae;
Te = 1;
var o = /* @__PURE__ */ fe();
function w() {
}
function O() {
}
return O.resetWarningCache = w, ae = function() {
function d(S, l, _, g, b, E) {
if (E !== o) {
var C = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
);
throw C.name = "Invariant Violation", C;
}
}
d.isRequired = d;
function P() {
return d;
}
var a = {
array: d,
bigint: d,
bool: d,
func: d,
number: d,
object: d,
string: d,
symbol: d,
any: d,
arrayOf: P,
element: d,
elementType: d,
instanceOf: P,
node: d,
objectOf: P,
oneOf: P,
oneOfType: P,
shape: P,
exact: P,
checkPropTypes: O,
resetWarningCache: w
};
return a.PropTypes = a, a;
}, ae;
}
var he;
function we() {
if (he) return V.exports;
if (he = 1, process.env.NODE_ENV !== "production") {
var o = me(), w = !0;
V.exports = /* @__PURE__ */ Re()(o.isElement, w);
} else
V.exports = /* @__PURE__ */ Ce()();
return V.exports;
}
var xe = /* @__PURE__ */ we();
const je = /* @__PURE__ */ ge(xe);
export {
je as P,
Ae as c,
ge as g
};