@blockscout/ui-toolkit
Version:
A comprehensive collection of reusable Chakra UI components and theme system for Blockscout's projects
1,378 lines • 443 kB
JavaScript
import { jsx as h, jsxs as V, Fragment as Be } from "react/jsx-runtime";
import { Accordion as ot, Icon as fe, defineRecipe as Fe, Circle as an, Skeleton as ln, Stack as La, Button as Xl, ButtonGroup as Pa, AbsoluteCenter as mr, Spinner as Jr, Span as Vl, useRecipe as Gl, Alert as ut, Avatar as Rt, Group as sn, useBreakpointValue as Zl, Tooltip as dt, Portal as at, useDisclosure as ql, chakra as lt, Badge as Yl, Checkbox as xt, CheckboxGroup as Kl, Link as Tn, LinkOverlay as wn, LinkBox as Ql, Flex as Ve, Dialog as Ce, Drawer as Oe, Field as Ne, Heading as Jl, Image as es, InputElement as Sn, Input as ts, Menu as pe, PinInput as Dt, Popover as we, Progress as Lr, ProgressCircle as At, defineSlotRecipe as he, defineConfig as rs, createSystem as ns, defaultConfig as os, ChakraProvider as is, RadioGroup as It, useRatingGroup as as, RatingGroup as ft, useSelectContext as Na, Select as ve, createListCollection as ls, Box as Le, Slider as Re, HStack as ss, For as cs, Switch as tt, Table as vt, Tabs as br, Tag as rt, Textarea as us, createToaster as ds, Toaster as fs, Toast as Tt, useToken as Ue, Text as it, Center as Da, Grid as hs, VisuallyHidden as ps } from "@chakra-ui/react";
import * as B from "react";
import I, { useState as cn, useEffect as za, useCallback as kn, useRef as gs } from "react";
import ms from "react-dom";
import { debounce as vr, throttle as Ba, pickBy as bs, clamp as ht, uniq as vs, maxBy as _s, range as en } from "es-toolkit";
import { useClickAway as ys, useDebounce as Es, useCopyToClipboard as Ua } from "@uidotdev/usehooks";
import Fa from "next/link";
import { useTheme as Cs, ThemeProvider as xs } from "next-themes";
import { useRouter as Ma } from "next/router";
import * as Y from "d3";
import ze from "dayjs";
import Ts from "dom-to-image";
import { useFormContext as Ze, useWatch as ws, useController as et } from "react-hook-form";
var zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function ja(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var ue = {}, Bt = {}, Ut = {}, Ft = {}, Pr, In;
function Ss() {
if (In) return Pr;
In = 1;
var e = "Expected a function", t = NaN, r = "[object Symbol]", n = /^\s+|\s+$/g, o = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, c = /^0o[0-7]+$/i, s = parseInt, u = typeof zt == "object" && zt && zt.Object === Object && zt, p = typeof self == "object" && self && self.Object === Object && self, g = u || p || Function("return this")(), b = Object.prototype, S = b.toString, v = Math.max, C = Math.min, L = function() {
return g.Date.now();
};
function x(j, H, i) {
var l, d, m, f, _, y, w = 0, k = !1, T = !1, A = !0;
if (typeof j != "function")
throw new TypeError(e);
H = O(H) || 0, E(i) && (k = !!i.leading, T = "maxWait" in i, m = T ? v(O(i.maxWait) || 0, H) : m, A = "trailing" in i ? !!i.trailing : A);
function z(Q) {
var X = l, J = d;
return l = d = void 0, w = Q, f = j.apply(J, X), f;
}
function P(Q) {
return w = Q, _ = setTimeout(W, H), k ? z(Q) : f;
}
function U(Q) {
var X = Q - y, J = Q - w, te = H - X;
return T ? C(te, m - J) : te;
}
function F(Q) {
var X = Q - y, J = Q - w;
return y === void 0 || X >= H || X < 0 || T && J >= m;
}
function W() {
var Q = L();
if (F(Q))
return q(Q);
_ = setTimeout(W, U(Q));
}
function q(Q) {
return _ = void 0, A && l ? z(Q) : (l = d = void 0, f);
}
function G() {
_ !== void 0 && clearTimeout(_), w = 0, l = y = d = _ = void 0;
}
function Z() {
return _ === void 0 ? f : q(L());
}
function K() {
var Q = L(), X = F(Q);
if (l = arguments, d = this, y = Q, X) {
if (_ === void 0)
return P(y);
if (T)
return _ = setTimeout(W, H), z(y);
}
return _ === void 0 && (_ = setTimeout(W, H)), f;
}
return K.cancel = G, K.flush = Z, K;
}
function R(j, H, i) {
var l = !0, d = !0;
if (typeof j != "function")
throw new TypeError(e);
return E(i) && (l = "leading" in i ? !!i.leading : l, d = "trailing" in i ? !!i.trailing : d), x(j, H, {
leading: l,
maxWait: H,
trailing: d
});
}
function E(j) {
var H = typeof j;
return !!j && (H == "object" || H == "function");
}
function D(j) {
return !!j && typeof j == "object";
}
function M(j) {
return typeof j == "symbol" || D(j) && S.call(j) == r;
}
function O(j) {
if (typeof j == "number")
return j;
if (M(j))
return t;
if (E(j)) {
var H = typeof j.valueOf == "function" ? j.valueOf() : j;
j = E(H) ? H + "" : H;
}
if (typeof j != "string")
return j === 0 ? j : +j;
j = j.replace(n, "");
var i = a.test(j);
return i || c.test(j) ? s(j.slice(2), i ? 2 : 8) : o.test(j) ? t : +j;
}
return Pr = R, Pr;
}
var wt = {}, An;
function un() {
if (An) return wt;
An = 1, Object.defineProperty(wt, "__esModule", {
value: !0
}), wt.addPassiveEventListener = function(r, n, o) {
var a = o.name;
a || (a = n, console.warn("Listener must be a named function.")), e.has(n) || e.set(n, /* @__PURE__ */ new Set());
var c = e.get(n);
if (!c.has(a)) {
var s = function() {
var u = !1;
try {
var p = Object.defineProperty({}, "passive", {
get: function() {
u = !0;
}
});
window.addEventListener("test", null, p);
} catch {
}
return u;
}();
r.addEventListener(n, o, s ? { passive: !0 } : !1), c.add(a);
}
}, wt.removePassiveEventListener = function(r, n, o) {
r.removeEventListener(n, o), e.get(n).delete(o.name || n);
};
var e = /* @__PURE__ */ new Map();
return wt;
}
var Rn;
function dn() {
if (Rn) return Ft;
Rn = 1, Object.defineProperty(Ft, "__esModule", {
value: !0
});
var e = Ss(), t = n(e), r = un();
function n(c) {
return c && c.__esModule ? c : { default: c };
}
var o = function(s) {
var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 66;
return (0, t.default)(s, u);
}, a = {
spyCallbacks: [],
spySetState: [],
scrollSpyContainers: [],
mount: function(s, u) {
if (s) {
var p = o(function(g) {
a.scrollHandler(s);
}, u);
return a.scrollSpyContainers.push(s), (0, r.addPassiveEventListener)(s, "scroll", p), function() {
(0, r.removePassiveEventListener)(s, "scroll", p), a.scrollSpyContainers.splice(a.scrollSpyContainers.indexOf(s), 1);
};
}
return function() {
};
},
isMounted: function(s) {
return a.scrollSpyContainers.indexOf(s) !== -1;
},
currentPositionX: function(s) {
if (s === document) {
var u = window.scrollY !== void 0, p = (document.compatMode || "") === "CSS1Compat";
return u ? window.scrollX : p ? document.documentElement.scrollLeft : document.body.scrollLeft;
} else
return s.scrollLeft;
},
currentPositionY: function(s) {
if (s === document) {
var u = window.scrollX !== void 0, p = (document.compatMode || "") === "CSS1Compat";
return u ? window.scrollY : p ? document.documentElement.scrollTop : document.body.scrollTop;
} else
return s.scrollTop;
},
scrollHandler: function(s) {
var u = a.scrollSpyContainers[a.scrollSpyContainers.indexOf(s)].spyCallbacks || [];
u.forEach(function(p) {
return p(a.currentPositionX(s), a.currentPositionY(s));
});
},
addStateHandler: function(s) {
a.spySetState.push(s);
},
addSpyHandler: function(s, u) {
var p = a.scrollSpyContainers[a.scrollSpyContainers.indexOf(u)];
p.spyCallbacks || (p.spyCallbacks = []), p.spyCallbacks.push(s);
},
updateStates: function() {
a.spySetState.forEach(function(s) {
return s();
});
},
unmount: function(s, u) {
a.scrollSpyContainers.forEach(function(p) {
return p.spyCallbacks && p.spyCallbacks.length && p.spyCallbacks.indexOf(u) > -1 && p.spyCallbacks.splice(p.spyCallbacks.indexOf(u), 1);
}), a.spySetState && a.spySetState.length && a.spySetState.indexOf(s) > -1 && a.spySetState.splice(a.spySetState.indexOf(s), 1), document.removeEventListener("scroll", a.scrollHandler);
},
update: function() {
return a.scrollSpyContainers.forEach(function(s) {
return a.scrollHandler(s);
});
}
};
return Ft.default = a, Ft;
}
var Mt = {}, jt = {}, On;
function _r() {
if (On) return jt;
On = 1, Object.defineProperty(jt, "__esModule", {
value: !0
});
var e = function(s, u) {
var p = s.indexOf("#") === 0 ? s.substring(1) : s, g = p ? "#" + p : "", b = window && window.location, S = g ? b.pathname + b.search + g : b.pathname + b.search;
u ? history.pushState(history.state, "", S) : history.replaceState(history.state, "", S);
}, t = function() {
return window.location.hash.replace(/^#/, "");
}, r = function(s) {
return function(u) {
return s.contains ? s != u && s.contains(u) : !!(s.compareDocumentPosition(u) & 16);
};
}, n = function(s) {
return getComputedStyle(s).position !== "static";
}, o = function(s, u) {
for (var p = s.offsetTop, g = s.offsetParent; g && !u(g); )
p += g.offsetTop, g = g.offsetParent;
return { offsetTop: p, offsetParent: g };
}, a = function(s, u, p) {
if (p)
return s === document ? u.getBoundingClientRect().left + (window.scrollX || window.pageXOffset) : getComputedStyle(s).position !== "static" ? u.offsetLeft : u.offsetLeft - s.offsetLeft;
if (s === document)
return u.getBoundingClientRect().top + (window.scrollY || window.pageYOffset);
if (n(s)) {
if (u.offsetParent !== s) {
var g = function(x) {
return x === s || x === document;
}, b = o(u, g), S = b.offsetTop, v = b.offsetParent;
if (v !== s)
throw new Error("Seems containerElement is not an ancestor of the Element");
return S;
}
return u.offsetTop;
}
if (u.offsetParent === s.offsetParent)
return u.offsetTop - s.offsetTop;
var C = function(x) {
return x === document;
};
return o(u, C).offsetTop - o(s, C).offsetTop;
};
return jt.default = {
updateHash: e,
getHash: t,
filterElementInContainer: r,
scrollOffset: a
}, jt;
}
var Ht = {}, Wt = {}, Ln;
function ks() {
return Ln || (Ln = 1, Object.defineProperty(Wt, "__esModule", {
value: !0
}), Wt.default = {
/*
* https://github.com/oblador/angular-scroll (duScrollDefaultEasing)
*/
defaultEasing: function(t) {
return t < 0.5 ? Math.pow(t * 2, 2) / 2 : 1 - Math.pow((1 - t) * 2, 2) / 2;
},
/*
* https://gist.github.com/gre/1650294
*/
// no easing, no acceleration
linear: function(t) {
return t;
},
// accelerating from zero velocity
easeInQuad: function(t) {
return t * t;
},
// decelerating to zero velocity
easeOutQuad: function(t) {
return t * (2 - t);
},
// acceleration until halfway, then deceleration
easeInOutQuad: function(t) {
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
},
// accelerating from zero velocity
easeInCubic: function(t) {
return t * t * t;
},
// decelerating to zero velocity π
easeOutCubic: function(t) {
return --t * t * t + 1;
},
// acceleration until halfway, then deceleration
easeInOutCubic: function(t) {
return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
},
// accelerating from zero velocity
easeInQuart: function(t) {
return t * t * t * t;
},
// decelerating to zero velocity
easeOutQuart: function(t) {
return 1 - --t * t * t * t;
},
// acceleration until halfway, then deceleration
easeInOutQuart: function(t) {
return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
},
// accelerating from zero velocity
easeInQuint: function(t) {
return t * t * t * t * t;
},
// decelerating to zero velocity
easeOutQuint: function(t) {
return 1 + --t * t * t * t * t;
},
// acceleration until halfway, then deceleration
easeInOutQuint: function(t) {
return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;
}
}), Wt;
}
var $t = {}, Pn;
function Is() {
if (Pn) return $t;
Pn = 1, Object.defineProperty($t, "__esModule", {
value: !0
});
var e = un(), t = ["mousedown", "wheel", "touchmove", "keydown"];
return $t.default = {
subscribe: function(n) {
return typeof document < "u" && t.forEach(function(o) {
return (0, e.addPassiveEventListener)(document, o, n);
});
}
}, $t;
}
var Xt = {}, Nn;
function fn() {
if (Nn) return Xt;
Nn = 1, Object.defineProperty(Xt, "__esModule", {
value: !0
});
var e = {
registered: {},
scrollEvent: {
register: function(r, n) {
e.registered[r] = n;
},
remove: function(r) {
e.registered[r] = null;
}
}
};
return Xt.default = e, Xt;
}
var Dn;
function Ha() {
if (Dn) return Ht;
Dn = 1, Object.defineProperty(Ht, "__esModule", {
value: !0
});
var e = Object.assign || function(d) {
for (var m = 1; m < arguments.length; m++) {
var f = arguments[m];
for (var _ in f)
Object.prototype.hasOwnProperty.call(f, _) && (d[_] = f[_]);
}
return d;
}, t = _r();
u(t);
var r = ks(), n = u(r), o = Is(), a = u(o), c = fn(), s = u(c);
function u(d) {
return d && d.__esModule ? d : { default: d };
}
var p = function(m) {
return n.default[m.smooth] || n.default.defaultEasing;
}, g = function(m) {
return typeof m == "function" ? m : function() {
return m;
};
}, b = function() {
if (typeof window < "u")
return window.requestAnimationFrame || window.webkitRequestAnimationFrame;
}, S = function() {
return b() || function(d, m, f) {
window.setTimeout(d, f || 1e3 / 60, (/* @__PURE__ */ new Date()).getTime());
};
}(), v = function() {
return {
currentPosition: 0,
startPosition: 0,
targetPosition: 0,
progress: 0,
duration: 0,
cancel: !1,
target: null,
containerElement: null,
to: null,
start: null,
delta: null,
percent: null,
delayTimeout: null
};
}, C = function(m) {
var f = m.data.containerElement;
if (f && f !== document && f !== document.body)
return f.scrollLeft;
var _ = window.pageXOffset !== void 0, y = (document.compatMode || "") === "CSS1Compat";
return _ ? window.pageXOffset : y ? document.documentElement.scrollLeft : document.body.scrollLeft;
}, L = function(m) {
var f = m.data.containerElement;
if (f && f !== document && f !== document.body)
return f.scrollTop;
var _ = window.pageXOffset !== void 0, y = (document.compatMode || "") === "CSS1Compat";
return _ ? window.pageYOffset : y ? document.documentElement.scrollTop : document.body.scrollTop;
}, x = function(m) {
var f = m.data.containerElement;
if (f && f !== document && f !== document.body)
return f.scrollWidth - f.offsetWidth;
var _ = document.body, y = document.documentElement;
return Math.max(_.scrollWidth, _.offsetWidth, y.clientWidth, y.scrollWidth, y.offsetWidth);
}, R = function(m) {
var f = m.data.containerElement;
if (f && f !== document && f !== document.body)
return f.scrollHeight - f.offsetHeight;
var _ = document.body, y = document.documentElement;
return Math.max(_.scrollHeight, _.offsetHeight, y.clientHeight, y.scrollHeight, y.offsetHeight);
}, E = function d(m, f, _) {
var y = f.data;
if (!f.ignoreCancelEvents && y.cancel) {
s.default.registered.end && s.default.registered.end(y.to, y.target, y.currentPositionY);
return;
}
if (y.delta = Math.round(y.targetPosition - y.startPosition), y.start === null && (y.start = _), y.progress = _ - y.start, y.percent = y.progress >= y.duration ? 1 : m(y.progress / y.duration), y.currentPosition = y.startPosition + Math.ceil(y.delta * y.percent), y.containerElement && y.containerElement !== document && y.containerElement !== document.body ? f.horizontal ? y.containerElement.scrollLeft = y.currentPosition : y.containerElement.scrollTop = y.currentPosition : f.horizontal ? window.scrollTo(y.currentPosition, 0) : window.scrollTo(0, y.currentPosition), y.percent < 1) {
var w = d.bind(null, m, f);
S.call(window, w);
return;
}
s.default.registered.end && s.default.registered.end(y.to, y.target, y.currentPosition);
}, D = function(m) {
m.data.containerElement = m ? m.containerId ? document.getElementById(m.containerId) : m.container && m.container.nodeType ? m.container : document : null;
}, M = function(m, f, _, y) {
f.data = f.data || v(), window.clearTimeout(f.data.delayTimeout);
var w = function() {
f.data.cancel = !0;
};
if (a.default.subscribe(w), D(f), f.data.start = null, f.data.cancel = !1, f.data.startPosition = f.horizontal ? C(f) : L(f), f.data.targetPosition = f.absolute ? m : m + f.data.startPosition, f.data.startPosition === f.data.targetPosition) {
s.default.registered.end && s.default.registered.end(f.data.to, f.data.target, f.data.currentPosition);
return;
}
f.data.delta = Math.round(f.data.targetPosition - f.data.startPosition), f.data.duration = g(f.duration)(f.data.delta), f.data.duration = isNaN(parseFloat(f.data.duration)) ? 1e3 : parseFloat(f.data.duration), f.data.to = _, f.data.target = y;
var k = p(f), T = E.bind(null, k, f);
if (f && f.delay > 0) {
f.data.delayTimeout = window.setTimeout(function() {
s.default.registered.begin && s.default.registered.begin(f.data.to, f.data.target), S.call(window, T);
}, f.delay);
return;
}
s.default.registered.begin && s.default.registered.begin(f.data.to, f.data.target), S.call(window, T);
}, O = function(m) {
return m = e({}, m), m.data = m.data || v(), m.absolute = !0, m;
}, j = function(m) {
M(0, O(m));
}, H = function(m, f) {
M(m, O(f));
}, i = function(m) {
m = O(m), D(m), M(m.horizontal ? x(m) : R(m), m);
}, l = function(m, f) {
f = O(f), D(f);
var _ = f.horizontal ? C(f) : L(f);
M(m + _, f);
};
return Ht.default = {
animateTopScroll: M,
getAnimationType: p,
scrollToTop: j,
scrollToBottom: i,
scrollTo: H,
scrollMore: l
}, Ht;
}
var zn;
function yr() {
if (zn) return Mt;
zn = 1, Object.defineProperty(Mt, "__esModule", {
value: !0
});
var e = Object.assign || function(g) {
for (var b = 1; b < arguments.length; b++) {
var S = arguments[b];
for (var v in S)
Object.prototype.hasOwnProperty.call(S, v) && (g[v] = S[v]);
}
return g;
}, t = _r(), r = s(t), n = Ha(), o = s(n), a = fn(), c = s(a);
function s(g) {
return g && g.__esModule ? g : { default: g };
}
var u = {}, p = void 0;
return Mt.default = {
unmount: function() {
u = {};
},
register: function(b, S) {
u[b] = S;
},
unregister: function(b) {
delete u[b];
},
get: function(b) {
return u[b] || document.getElementById(b) || document.getElementsByName(b)[0] || document.getElementsByClassName(b)[0];
},
setActiveLink: function(b) {
return p = b;
},
getActiveLink: function() {
return p;
},
scrollTo: function(b, S) {
var v = this.get(b);
if (!v) {
console.warn("target Element not found");
return;
}
S = e({}, S, { absolute: !1 });
var C = S.containerId, L = S.container, x = void 0;
C ? x = document.getElementById(C) : L && L.nodeType ? x = L : x = document, S.absolute = !0;
var R = S.horizontal, E = r.default.scrollOffset(x, v, R) + (S.offset || 0);
if (!S.smooth) {
c.default.registered.begin && c.default.registered.begin(b, v), x === document ? S.horizontal ? window.scrollTo(E, 0) : window.scrollTo(0, E) : x.scrollTop = E, c.default.registered.end && c.default.registered.end(b, v);
return;
}
o.default.animateTopScroll(E, S, b, v);
}
}, Mt;
}
var Vt = { exports: {} }, Gt = { exports: {} }, se = {};
/** @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 Bn;
function As() {
if (Bn) return se;
Bn = 1;
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, u = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, g = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, C = e ? Symbol.for("react.lazy") : 60116, L = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, R = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
function D(O) {
if (typeof O == "object" && O !== null) {
var j = O.$$typeof;
switch (j) {
case t:
switch (O = O.type, O) {
case u:
case p:
case n:
case a:
case o:
case b:
return O;
default:
switch (O = O && O.$$typeof, O) {
case s:
case g:
case C:
case v:
case c:
return O;
default:
return j;
}
}
case r:
return j;
}
}
}
function M(O) {
return D(O) === p;
}
return se.AsyncMode = u, se.ConcurrentMode = p, se.ContextConsumer = s, se.ContextProvider = c, se.Element = t, se.ForwardRef = g, se.Fragment = n, se.Lazy = C, se.Memo = v, se.Portal = r, se.Profiler = a, se.StrictMode = o, se.Suspense = b, se.isAsyncMode = function(O) {
return M(O) || D(O) === u;
}, se.isConcurrentMode = M, se.isContextConsumer = function(O) {
return D(O) === s;
}, se.isContextProvider = function(O) {
return D(O) === c;
}, se.isElement = function(O) {
return typeof O == "object" && O !== null && O.$$typeof === t;
}, se.isForwardRef = function(O) {
return D(O) === g;
}, se.isFragment = function(O) {
return D(O) === n;
}, se.isLazy = function(O) {
return D(O) === C;
}, se.isMemo = function(O) {
return D(O) === v;
}, se.isPortal = function(O) {
return D(O) === r;
}, se.isProfiler = function(O) {
return D(O) === a;
}, se.isStrictMode = function(O) {
return D(O) === o;
}, se.isSuspense = function(O) {
return D(O) === b;
}, se.isValidElementType = function(O) {
return typeof O == "string" || typeof O == "function" || O === n || O === p || O === a || O === o || O === b || O === S || typeof O == "object" && O !== null && (O.$$typeof === C || O.$$typeof === v || O.$$typeof === c || O.$$typeof === s || O.$$typeof === g || O.$$typeof === x || O.$$typeof === R || O.$$typeof === E || O.$$typeof === L);
}, se.typeOf = D, se;
}
var ce = {};
/** @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 Un;
function Rs() {
return Un || (Un = 1, process.env.NODE_ENV !== "production" && function() {
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, u = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, g = e ? Symbol.for("react.forward_ref") : 60112, b = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, C = e ? Symbol.for("react.lazy") : 60116, L = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, R = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
function D($) {
return typeof $ == "string" || typeof $ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
$ === n || $ === p || $ === a || $ === o || $ === b || $ === S || typeof $ == "object" && $ !== null && ($.$$typeof === C || $.$$typeof === v || $.$$typeof === c || $.$$typeof === s || $.$$typeof === g || $.$$typeof === x || $.$$typeof === R || $.$$typeof === E || $.$$typeof === L);
}
function M($) {
if (typeof $ == "object" && $ !== null) {
var ee = $.$$typeof;
switch (ee) {
case t:
var ne = $.type;
switch (ne) {
case u:
case p:
case n:
case a:
case o:
case b:
return ne;
default:
var oe = ne && ne.$$typeof;
switch (oe) {
case s:
case g:
case C:
case v:
case c:
return oe;
default:
return ee;
}
}
case r:
return ee;
}
}
}
var O = u, j = p, H = s, i = c, l = t, d = g, m = n, f = C, _ = v, y = r, w = a, k = o, T = b, A = !1;
function z($) {
return A || (A = !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.")), P($) || M($) === u;
}
function P($) {
return M($) === p;
}
function U($) {
return M($) === s;
}
function F($) {
return M($) === c;
}
function W($) {
return typeof $ == "object" && $ !== null && $.$$typeof === t;
}
function q($) {
return M($) === g;
}
function G($) {
return M($) === n;
}
function Z($) {
return M($) === C;
}
function K($) {
return M($) === v;
}
function Q($) {
return M($) === r;
}
function X($) {
return M($) === a;
}
function J($) {
return M($) === o;
}
function te($) {
return M($) === b;
}
ce.AsyncMode = O, ce.ConcurrentMode = j, ce.ContextConsumer = H, ce.ContextProvider = i, ce.Element = l, ce.ForwardRef = d, ce.Fragment = m, ce.Lazy = f, ce.Memo = _, ce.Portal = y, ce.Profiler = w, ce.StrictMode = k, ce.Suspense = T, ce.isAsyncMode = z, ce.isConcurrentMode = P, ce.isContextConsumer = U, ce.isContextProvider = F, ce.isElement = W, ce.isForwardRef = q, ce.isFragment = G, ce.isLazy = Z, ce.isMemo = K, ce.isPortal = Q, ce.isProfiler = X, ce.isStrictMode = J, ce.isSuspense = te, ce.isValidElementType = D, ce.typeOf = M;
}()), ce;
}
var Fn;
function Wa() {
return Fn || (Fn = 1, process.env.NODE_ENV === "production" ? Gt.exports = As() : Gt.exports = Rs()), Gt.exports;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var Nr, Mn;
function Os() {
if (Mn) return Nr;
Mn = 1;
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
function n(a) {
if (a == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(a);
}
function o() {
try {
if (!Object.assign)
return !1;
var a = new String("abc");
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
return !1;
for (var c = {}, s = 0; s < 10; s++)
c["_" + String.fromCharCode(s)] = s;
var u = Object.getOwnPropertyNames(c).map(function(g) {
return c[g];
});
if (u.join("") !== "0123456789")
return !1;
var p = {};
return "abcdefghijklmnopqrst".split("").forEach(function(g) {
p[g] = g;
}), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return Nr = o() ? Object.assign : function(a, c) {
for (var s, u = n(a), p, g = 1; g < arguments.length; g++) {
s = Object(arguments[g]);
for (var b in s)
t.call(s, b) && (u[b] = s[b]);
if (e) {
p = e(s);
for (var S = 0; S < p.length; S++)
r.call(s, p[S]) && (u[p[S]] = s[p[S]]);
}
}
return u;
}, Nr;
}
var Dr, jn;
function hn() {
if (jn) return Dr;
jn = 1;
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return Dr = e, Dr;
}
var zr, Hn;
function $a() {
return Hn || (Hn = 1, zr = Function.call.bind(Object.prototype.hasOwnProperty)), zr;
}
var Br, Wn;
function Ls() {
if (Wn) return Br;
Wn = 1;
var e = function() {
};
if (process.env.NODE_ENV !== "production") {
var t = /* @__PURE__ */ hn(), r = {}, n = /* @__PURE__ */ $a();
e = function(a) {
var c = "Warning: " + a;
typeof console < "u" && console.error(c);
try {
throw new Error(c);
} catch {
}
};
}
function o(a, c, s, u, p) {
if (process.env.NODE_ENV !== "production") {
for (var g in a)
if (n(a, g)) {
var b;
try {
if (typeof a[g] != "function") {
var S = Error(
(u || "React class") + ": " + s + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw S.name = "Invariant Violation", S;
}
b = a[g](c, g, u, s, null, t);
} catch (C) {
b = C;
}
if (b && !(b instanceof Error) && e(
(u || "React class") + ": type specification of " + s + " `" + g + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof b + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), b instanceof Error && !(b.message in r)) {
r[b.message] = !0;
var v = p ? p() : "";
e(
"Failed " + s + " type: " + b.message + (v ?? "")
);
}
}
}
}
return o.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (r = {});
}, Br = o, Br;
}
var Ur, $n;
function Ps() {
if ($n) return Ur;
$n = 1;
var e = Wa(), t = Os(), r = /* @__PURE__ */ hn(), n = /* @__PURE__ */ $a(), o = /* @__PURE__ */ Ls(), a = function() {
};
process.env.NODE_ENV !== "production" && (a = function(s) {
var u = "Warning: " + s;
typeof console < "u" && console.error(u);
try {
throw new Error(u);
} catch {
}
});
function c() {
return null;
}
return Ur = function(s, u) {
var p = typeof Symbol == "function" && Symbol.iterator, g = "@@iterator";
function b(P) {
var U = P && (p && P[p] || P[g]);
if (typeof U == "function")
return U;
}
var S = "<<anonymous>>", v = {
array: R("array"),
bigint: R("bigint"),
bool: R("boolean"),
func: R("function"),
number: R("number"),
object: R("object"),
string: R("string"),
symbol: R("symbol"),
any: E(),
arrayOf: D,
element: M(),
elementType: O(),
instanceOf: j,
node: d(),
objectOf: i,
oneOf: H,
oneOfType: l,
shape: f,
exact: _
};
function C(P, U) {
return P === U ? P !== 0 || 1 / P === 1 / U : P !== P && U !== U;
}
function L(P, U) {
this.message = P, this.data = U && typeof U == "object" ? U : {}, this.stack = "";
}
L.prototype = Error.prototype;
function x(P) {
if (process.env.NODE_ENV !== "production")
var U = {}, F = 0;
function W(G, Z, K, Q, X, J, te) {
if (Q = Q || S, J = J || K, te !== r) {
if (u) {
var $ = 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 $.name = "Invariant Violation", $;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var ee = Q + ":" + K;
!U[ee] && // Avoid spamming the console because they are often not actionable except for lib authors
F < 3 && (a(
"You are manually calling a React.PropTypes validation function for the `" + J + "` prop on `" + Q + "`. 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."
), U[ee] = !0, F++);
}
}
return Z[K] == null ? G ? Z[K] === null ? new L("The " + X + " `" + J + "` is marked as required " + ("in `" + Q + "`, but its value is `null`.")) : new L("The " + X + " `" + J + "` is marked as required in " + ("`" + Q + "`, but its value is `undefined`.")) : null : P(Z, K, Q, X, J);
}
var q = W.bind(null, !1);
return q.isRequired = W.bind(null, !0), q;
}
function R(P) {
function U(F, W, q, G, Z, K) {
var Q = F[W], X = k(Q);
if (X !== P) {
var J = T(Q);
return new L(
"Invalid " + G + " `" + Z + "` of type " + ("`" + J + "` supplied to `" + q + "`, expected ") + ("`" + P + "`."),
{ expectedType: P }
);
}
return null;
}
return x(U);
}
function E() {
return x(c);
}
function D(P) {
function U(F, W, q, G, Z) {
if (typeof P != "function")
return new L("Property `" + Z + "` of component `" + q + "` has invalid PropType notation inside arrayOf.");
var K = F[W];
if (!Array.isArray(K)) {
var Q = k(K);
return new L("Invalid " + G + " `" + Z + "` of type " + ("`" + Q + "` supplied to `" + q + "`, expected an array."));
}
for (var X = 0; X < K.length; X++) {
var J = P(K, X, q, G, Z + "[" + X + "]", r);
if (J instanceof Error)
return J;
}
return null;
}
return x(U);
}
function M() {
function P(U, F, W, q, G) {
var Z = U[F];
if (!s(Z)) {
var K = k(Z);
return new L("Invalid " + q + " `" + G + "` of type " + ("`" + K + "` supplied to `" + W + "`, expected a single ReactElement."));
}
return null;
}
return x(P);
}
function O() {
function P(U, F, W, q, G) {
var Z = U[F];
if (!e.isValidElementType(Z)) {
var K = k(Z);
return new L("Invalid " + q + " `" + G + "` of type " + ("`" + K + "` supplied to `" + W + "`, expected a single ReactElement type."));
}
return null;
}
return x(P);
}
function j(P) {
function U(F, W, q, G, Z) {
if (!(F[W] instanceof P)) {
var K = P.name || S, Q = z(F[W]);
return new L("Invalid " + G + " `" + Z + "` of type " + ("`" + Q + "` supplied to `" + q + "`, expected ") + ("instance of `" + K + "`."));
}
return null;
}
return x(U);
}
function H(P) {
if (!Array.isArray(P))
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.")), c;
function U(F, W, q, G, Z) {
for (var K = F[W], Q = 0; Q < P.length; Q++)
if (C(K, P[Q]))
return null;
var X = JSON.stringify(P, function(te, $) {
var ee = T($);
return ee === "symbol" ? String($) : $;
});
return new L("Invalid " + G + " `" + Z + "` of value `" + String(K) + "` " + ("supplied to `" + q + "`, expected one of " + X + "."));
}
return x(U);
}
function i(P) {
function U(F, W, q, G, Z) {
if (typeof P != "function")
return new L("Property `" + Z + "` of component `" + q + "` has invalid PropType notation inside objectOf.");
var K = F[W], Q = k(K);
if (Q !== "object")
return new L("Invalid " + G + " `" + Z + "` of type " + ("`" + Q + "` supplied to `" + q + "`, expected an object."));
for (var X in K)
if (n(K, X)) {
var J = P(K, X, q, G, Z + "." + X, r);
if (J instanceof Error)
return J;
}
return null;
}
return x(U);
}
function l(P) {
if (!Array.isArray(P))
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), c;
for (var U = 0; U < P.length; U++) {
var F = P[U];
if (typeof F != "function")
return a(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + A(F) + " at index " + U + "."
), c;
}
function W(q, G, Z, K, Q) {
for (var X = [], J = 0; J < P.length; J++) {
var te = P[J], $ = te(q, G, Z, K, Q, r);
if ($ == null)
return null;
$.data && n($.data, "expectedType") && X.push($.data.expectedType);
}
var ee = X.length > 0 ? ", expected one of type [" + X.join(", ") + "]" : "";
return new L("Invalid " + K + " `" + Q + "` supplied to " + ("`" + Z + "`" + ee + "."));
}
return x(W);
}
function d() {
function P(U, F, W, q, G) {
return y(U[F]) ? null : new L("Invalid " + q + " `" + G + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
}
return x(P);
}
function m(P, U, F, W, q) {
return new L(
(P || "React class") + ": " + U + " type `" + F + "." + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + q + "`."
);
}
function f(P) {
function U(F, W, q, G, Z) {
var K = F[W], Q = k(K);
if (Q !== "object")
return new L("Invalid " + G + " `" + Z + "` of type `" + Q + "` " + ("supplied to `" + q + "`, expected `object`."));
for (var X in P) {
var J = P[X];
if (typeof J != "function")
return m(q, G, Z, X, T(J));
var te = J(K, X, q, G, Z + "." + X, r);
if (te)
return te;
}
return null;
}
return x(U);
}
function _(P) {
function U(F, W, q, G, Z) {
var K = F[W], Q = k(K);
if (Q !== "object")
return new L("Invalid " + G + " `" + Z + "` of type `" + Q + "` " + ("supplied to `" + q + "`, expected `object`."));
var X = t({}, F[W], P);
for (var J in X) {
var te = P[J];
if (n(P, J) && typeof te != "function")
return m(q, G, Z, J, T(te));
if (!te)
return new L(
"Invalid " + G + " `" + Z + "` key `" + J + "` supplied to `" + q + "`.\nBad object: " + JSON.stringify(F[W], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(P), null, " ")
);
var $ = te(K, J, q, G, Z + "." + J, r);
if ($)
return $;
}
return null;
}
return x(U);
}
function y(P) {
switch (typeof P) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !P;
case "object":
if (Array.isArray(P))
return P.every(y);
if (P === null || s(P))
return !0;
var U = b(P);
if (U) {
var F = U.call(P), W;
if (U !== P.entries) {
for (; !(W = F.next()).done; )
if (!y(W.value))
return !1;
} else
for (; !(W = F.next()).done; ) {
var q = W.value;
if (q && !y(q[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function w(P, U) {
return P === "symbol" ? !0 : U ? U["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && U instanceof Symbol : !1;
}
function k(P) {
var U = typeof P;
return Array.isArray(P) ? "array" : P instanceof RegExp ? "object" : w(U, P) ? "symbol" : U;
}
function T(P) {
if (typeof P > "u" || P === null)
return "" + P;
var U = k(P);
if (U === "object") {
if (P instanceof Date)
return "date";
if (P instanceof RegExp)
return "regexp";
}
return U;
}
function A(P) {
var U = T(P);
switch (U) {
case "array":
case "object":
return "an " + U;
case "boolean":
case "date":
case "regexp":
return "a " + U;
default:
return U;
}
}
function z(P) {
return !P.constructor || !P.constructor.name ? S : P.constructor.name;
}
return v.checkPropTypes = o, v.resetWarningCache = o.resetWarningCache, v.PropTypes = v, v;
}, Ur;
}
var Fr, Xn;
function Ns() {
if (Xn) return Fr;
Xn = 1;
var e = /* @__PURE__ */ hn();
function t() {
}
function r() {
}
return r.resetWarningCache = t, Fr = function() {
function n(c, s, u, p, g, b) {
if (b !== e) {
var S = 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 S.name = "Invariant Violation", S;
}
}
n.isRequired = n;
function o() {
return n;
}
var a = {
array: n,
bigint: n,
bool: n,
func: n,
number: n,
object: n,
string: n,
symbol: n,
any: n,
arrayOf: o,
element: n,
elementType: n,
instanceOf: o,
node: n,
objectOf: o,
oneOf: o,
oneOfType: o,
shape: o,
exact: o,
checkPropTypes: r,
resetWarningCache: t
};
return a.PropTypes = a, a;
}, Fr;
}
var Vn;
function Er() {
if (Vn) return Vt.exports;
if (Vn = 1, process.env.NODE_ENV !== "production") {
var e = Wa(), t = !0;
Vt.exports = /* @__PURE__ */ Ps()(e.isElement, t);
} else
Vt.exports = /* @__PURE__ */ Ns()();
return Vt.exports;
}
var Zt = {}, Gn;
function Xa() {
if (Gn) return Zt;
Gn = 1, Object.defineProperty(Zt, "__esModule", {
value: !0
}), un();
var e = _r(), t = r(e);
function r(o) {
return o && o.__esModule ? o : { default: o };
}
var n = {
mountFlag: !1,
initialized: !1,
scroller: null,
containers: {},
mount: function(a) {
this.scroller = a, this.handleHashChange = this.handleHashChange.bind(this), window.addEventListener("hashchange", this.handleHashChange), this.initStateFromHash(), this.mountFlag = !0;
},
mapContainer: function(a, c) {
this.containers[a] = c;
},
isMounted: function() {
return this.mountFlag;
},
isInitialized: function() {
return this.initialized;
},
initStateFromHash: function() {
var a = this, c = this.getHash();
c ? window.setTimeout(function() {
a.scrollTo(c, !0), a.initialized = !0;
}, 10) : this.initialized = !0;
},
scrollTo: function(a, c) {
var s = this.scroller, u = s.get(a);
if (u && (c || a !== s.getActiveLink())) {
var p = this.containers[a] || document;
s.scrollTo(a, { container: p });
}
},
getHash: function() {
return t.default.getHash();
},
changeHash: function(a, c) {
this.isInitialized() && t.default.getHash() !== a && t.default.updateHash(a, c);
},
handleHashChange: function() {
this.scrollTo(this.getHash());
},
unmount: function() {
this.scroller = null, this.containers = null, window.removeEventListener("hashchange", this.handleHashChange);
}
};
return Zt.default = n, Zt;
}
var Zn;
function pn() {
if (Zn) return Ut;
Zn = 1, Object.defineProperty(Ut, "__esModule", {
value: !0
});
var e = Object.assign || function(R) {
for (var E = 1; E < arguments.length; E++) {
var D = arguments[E];
for (var M in D)
Object.prototype.hasOwnProperty.call(D, M) && (R[M] = D[M]);
}
return R;
}, t = /* @__PURE__ */ function() {
function R(E, D) {
for (var M = 0; M < D.length; M++) {
var O = D[M];
O.enumerable = O.enumerable || !1, O.configurable = !0, "value" in O && (O.writable = !0), Object.defineProperty(E, O.key, O);
}
}
return function(E, D, M) {
return D && R(E.prototype, D), M && R(E, M), E;
};
}(), r = I, n = S(r), o = dn(), a = S(o), c = yr(), s = S(c), u = /* @__PURE__ */ Er(), p = S(u), g = Xa(), b = S(g);
function S(R) {
return R && R.__esModule ? R : { default: R };
}
function v(R, E) {
if (!(R instanceof E))
throw new TypeError("Cannot call a class as a function");
}
function C(R, E) {
if (!R)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return E && (typeof E == "object" || typeof E == "function") ? E : R;
}
function L(R, E) {
if (typeof E != "function" && E !== null)
throw new TypeError("Super expression must either be null or a function, not " + typeof E);
R.prototype = Object.create(E && E.prototype, { constructor: { value: R, enumerable: !1, writable: !0, configurable: !0 } }), E && (Object.setPrototypeOf ? Object.setPrototypeOf(R, E) : R.__proto__ = E);
}
var x = {
to: p.default.string.isRequired,
containerId: p.default.string,
container: p.default.object,
activeClass: p.default.string,
activeStyle: p.default.object,
spy: p.default.bool,
horizontal: p.default.bool,
smooth: p.default.oneOfType([p.default.bool, p.default.string]),
offset: p.default.number,
delay: p.default.number,
isDynamic: p.default.bool,
onClick: p.default.func,
duration: p.default.oneOfType([p.default.number, p.default.func]),
absolute: p.default.bool,
onSetActive: p.default.func,
onSetInactive: p.default.func,
ignoreCancelEvents: p.default.bool,
hashSpy: p.default.bool,
saveHashHistory: p.default.bool,
spyThrottle: p.default.number
};
return Ut.default = function(R, E) {
var D = E || s.default, M = function(j) {
L(H, j);
function H(i) {
v(this, H);
var l = C(this, (H.__proto__ || Object.getPrototypeOf(H)).call(this, i));
return O.call(l), l.state = {
active: !1
}, l.beforeUnmountCallbacks = [], l;
}
return t(H, [{
key: "getScrollSpyContainer",
value: function() {
var l = this.props.containerId, d = this.props.container;
return l && !d ? document.getElementById(l) : d && d.nodeType ? d : document;
}
}, {
key: "componentDidMount",
value: function() {
if (this.props.spy || this.props.hashSpy) {
var l = this.getScrollSpyContainer();
if (!a.default.isMounted(l)) {
var d = a.default.mount(l, this.props.spyThrottle);
this.beforeUnmountCallbacks.push(d);
}
this.props.hashSpy && (b.default.isMounted() || b.default.mount(D), b.default.mapContainer(this.props.to, l)), a.default.addSpyHandler(this.spyHandler, l), this.setState({
container: l
});
}
}
}, {
key: "componentWillUnmount",
value: function() {
a.default.unmount(this.stateHandler, this.spyHandler), this.beforeUnmountCallbacks.forEach(function(l) {
return l();
});
}
}, {
key: "render",
value: function() {
var l = "";
this.state && this.state.active ? l = ((this.props.className || "") + " " + (this.props.activeClass || "active")).trim() : l = this.props.className;
var d = {};
this.state && this.state.active ? d = e({}, this.props.style, this.props.activeStyle) : d = e({}, this.props.style);
var m = e({}, this.props);
for (var f in x)
m.hasOwnProperty(f) && delete m[f];
return m