UNPKG

@cubone/react-file-manager

Version:

React File Manager is an open-source, user-friendly component designed to easily manage files and folders within applications. With smooth drag-and-drop functionality, responsive design, and efficient navigation, it simplifies file handling in any React p

891 lines 252 kB
import { jsx as c, jsxs as L, Fragment as fe } from "react/jsx-runtime"; import * as Ae from "react"; import $e, { useState as R, useRef as se, useEffect as Q, createContext as Pe, useContext as ke, useLayoutEffect as Wn, useCallback as dn, useMemo as Ge } from "react"; var un = { color: void 0, size: void 0, className: void 0, style: void 0, attr: void 0 }, wt = $e.createContext && /* @__PURE__ */ $e.createContext(un), Yn = ["attr", "size", "title"]; function Kn(n, e) { if (n == null) return {}; var t = qn(n, e), o, i; if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(n); for (i = 0; i < s.length; i++) o = s[i], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(n, o) && (t[o] = n[o]); } return t; } function qn(n, e) { if (n == null) return {}; var t = {}; for (var o in n) if (Object.prototype.hasOwnProperty.call(n, o)) { if (e.indexOf(o) >= 0) continue; t[o] = n[o]; } return t; } function De() { return De = Object.assign ? Object.assign.bind() : function(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]); } return n; }, De.apply(this, arguments); } function bt(n, e) { var t = Object.keys(n); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(n); e && (o = o.filter(function(i) { return Object.getOwnPropertyDescriptor(n, i).enumerable; })), t.push.apply(t, o); } return t; } function je(n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? bt(Object(t), !0).forEach(function(o) { _n(n, o, t[o]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : bt(Object(t)).forEach(function(o) { Object.defineProperty(n, o, Object.getOwnPropertyDescriptor(t, o)); }); } return n; } function _n(n, e, t) { return e = Gn(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n; } function Gn(n) { var e = Jn(n, "string"); return typeof e == "symbol" ? e : e + ""; } function Jn(n, e) { if (typeof n != "object" || !n) return n; var t = n[Symbol.toPrimitive]; if (t !== void 0) { var o = t.call(n, e); if (typeof o != "object") return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return (e === "string" ? String : Number)(n); } function pn(n) { return n && n.map((e, t) => /* @__PURE__ */ $e.createElement(e.tag, je({ key: t }, e.attr), pn(e.child))); } function H(n) { return (e) => /* @__PURE__ */ $e.createElement(Zn, De({ attr: je({}, n.attr) }, e), pn(n.child)); } function Zn(n) { var e = (t) => { var { attr: o, size: i, title: s } = n, a = Kn(n, Yn), l = i || t.size || "1em", r; return t.className && (r = t.className), n.className && (r = (r ? r + " " : "") + n.className), /* @__PURE__ */ $e.createElement("svg", De({ stroke: "currentColor", fill: "currentColor", strokeWidth: "0" }, t.attr, o, a, { className: r, style: je(je({ color: n.color || t.color }, t.style), n.style), height: l, width: l, xmlns: "http://www.w3.org/2000/svg" }), s && /* @__PURE__ */ $e.createElement("title", null, s), n.children); }; return wt !== void 0 ? /* @__PURE__ */ $e.createElement(wt.Consumer, null, (t) => e(t)) : e(un); } function Xn(n) { return H({ attr: { version: "1.1", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8c-0.020-1.045-0.247-2.086-0.665-3.038-0.417-0.953-1.023-1.817-1.766-2.53s-1.624-1.278-2.578-1.651c-0.953-0.374-1.978-0.552-2.991-0.531-1.013 0.020-2.021 0.24-2.943 0.646-0.923 0.405-1.758 0.992-2.449 1.712s-1.237 1.574-1.597 2.497c-0.361 0.923-0.533 1.914-0.512 2.895 0.020 0.981 0.234 1.955 0.627 2.847 0.392 0.892 0.961 1.7 1.658 2.368s1.523 1.195 2.416 1.543c0.892 0.348 1.851 0.514 2.799 0.493 0.949-0.020 1.89-0.227 2.751-0.608 0.862-0.379 1.642-0.929 2.287-1.604s1.154-1.472 1.488-2.335c0.204-0.523 0.342-1.069 0.415-1.622 0.019 0.001 0.039 0.002 0.059 0.002 0.552 0 1-0.448 1-1 0-0.028-0.001-0.056-0.004-0.083h0.004zM14.411 10.655c-0.367 0.831-0.898 1.584-1.55 2.206s-1.422 1.112-2.254 1.434c-0.832 0.323-1.723 0.476-2.608 0.454-0.884-0.020-1.759-0.215-2.56-0.57-0.801-0.354-1.526-0.867-2.125-1.495s-1.071-1.371-1.38-2.173c-0.31-0.801-0.457-1.66-0.435-2.512s0.208-1.694 0.551-2.464c0.342-0.77 0.836-1.468 1.441-2.044s1.321-1.029 2.092-1.326c0.771-0.298 1.596-0.438 2.416-0.416s1.629 0.202 2.368 0.532c0.74 0.329 1.41 0.805 1.963 1.387s0.988 1.27 1.272 2.011c0.285 0.74 0.418 1.532 0.397 2.32h0.004c-0.002 0.027-0.004 0.055-0.004 0.083 0 0.516 0.39 0.94 0.892 0.994-0.097 0.544-0.258 1.075-0.481 1.578z" }, child: [] }] })(n); } const ft = ({ loading: n = !1, className: e }) => n ? /* @__PURE__ */ c("div", { className: `loader-container ${e}`, children: /* @__PURE__ */ c(Xn, { className: "spinner" }) }) : null; function fn(n) { return H({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z" }, child: [] }] })(n); } function hn(n) { return H({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m.5 3 .04.87a2 2 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2m5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19q-.362.002-.683.12L1.5 2.98a1 1 0 0 1 1-.98z" }, child: [] }, { tag: "path", attr: { d: "M13.5 9a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V12h-1.5a.5.5 0 0 1 0-1H13V9.5a.5.5 0 0 1 .5-.5" }, child: [] }] })(n); } function mn(n) { return H({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5zm8 0A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5zm-8 8A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5zm8 0A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5z" }, child: [] }] })(n); } function xt(n) { return H({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z" }, child: [] }] })(n); } function gn(n) { return H({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M3.5 3.5c-.614-.884-.074-1.962.858-2.5L8 7.226 11.642 1c.932.538 1.472 1.616.858 2.5L8.81 8.61l1.556 2.661a2.5 2.5 0 1 1-.794.637L8 9.73l-1.572 2.177a2.5 2.5 0 1 1-.794-.637L7.19 8.61zm2.5 10a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m7 0a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0" }, child: [] }] })(n); } function vn(n) { return H({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "23 4 23 10 17 10" }, child: [] }, { tag: "polyline", attr: { points: "1 20 1 14 7 14" }, child: [] }, { tag: "path", attr: { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" }, child: [] }] })(n); } function Qn(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" }, child: [] }] })(n); } function eo(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }, child: [] }] })(n); } function to(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z" }, child: [] }] })(n); } function no(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }, child: [] }] })(n); } function oo(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }, child: [] }] })(n); } function $n(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z" }, child: [] }] })(n); } function ht(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z" }, child: [] }] })(n); } function yn(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z" }, child: [] }] })(n); } function io(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M10.02 6 8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z" }, child: [] }] })(n); } function wn(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z" }, child: [] }, { tag: "path", attr: { d: "M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z" }, child: [] }] })(n); } function so(n) { return H({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 2H8c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zM8 16V4h12l.002 12H8z" }, child: [] }, { tag: "path", attr: { d: "M4 8H2v12c0 1.103.897 2 2 2h12v-2H4V8zm8.933 3.519-1.726-1.726-1.414 1.414 3.274 3.274 5.702-6.84-1.538-1.282z" }, child: [] }] })(n); } function bn(n) { return H({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }, child: [] }] })(n); } function ao(n) { return H({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" }, child: [] }] })(n); } function ro(n) { return H({ attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M128 0C92.7 0 64 28.7 64 64l0 224-44.8 0C8.6 288 0 296.6 0 307.2C0 349.6 34.4 384 76.8 384L320 384l0-96-192 0 0-224 320 0 0 32 64 0 0-32c0-35.3-28.7-64-64-64L128 0zM512 128l-112 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-208-96 0c-17.7 0-32-14.3-32-32l0-96zm32 0l0 96 96 0-96-96z" }, child: [] }] })(n); } function He(n) { return H({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z" }, child: [] }] })(n); } function Ct(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464l256 0c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM192 272l0 128c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L129.4 376 112 376c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16l17.4 0 35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8zm85.8-4c11.6 20 18.2 43.3 18.2 68s-6.6 48-18.2 68c-6.6 11.5-21.3 15.4-32.8 8.8s-15.4-21.3-8.8-32.8c7.5-12.9 11.8-27.9 11.8-44s-4.3-31.1-11.8-44c-6.6-11.5-2.7-26.2 8.8-32.8s26.2-2.7 32.8 8.8z" }, child: [] }] })(n); } function re(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm97 289c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L79 303c-9.4 9.4-9.4 24.6 0 33.9l48 48c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31 31-31zM257 255c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l48-48c9.4-9.4 9.4-24.6 0-33.9l-48-48z" }, child: [] }] })(n); } function St(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z" }, child: [] }] })(n); } function et(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm96 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm69.2 46.9c-3-4.3-7.9-6.9-13.2-6.9s-10.2 2.6-13.2 6.9l-41.3 59.7-11.9-19.1c-2.9-4.7-8.1-7.5-13.6-7.5s-10.6 2.8-13.6 7.5l-40 64c-3.1 4.9-3.2 11.1-.4 16.2s8.2 8.2 14 8.2l48 0 32 0 40 0 72 0c6 0 11.4-3.3 14.2-8.6s2.4-11.6-1-16.5l-72-104z" }, child: [] }] })(n); } function lo(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z" }, child: [] }] })(n); } function co(n) { return H({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z" }, child: [] }] })(n); } function Ft(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z" }, child: [] }] })(n); } function Nt(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM80 288c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32l0 16 44.9-29.9c2-1.3 4.4-2.1 6.8-2.1c6.8 0 12.3 5.5 12.3 12.3l0 103.4c0 6.8-5.5 12.3-12.3 12.3c-2.4 0-4.8-.7-6.8-2.1L240 368l0 16c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-96z" }, child: [] }] })(n); } function Et(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z" }, child: [] }] })(n); } function uo(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l48 0c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l48 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm48 112c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm-6.3 71.8L82.1 335.9c-1.4 5.4-2.1 10.9-2.1 16.4c0 35.2 28.8 63.7 64 63.7s64-28.5 64-63.7c0-5.5-.7-11.1-2.1-16.4l-23.5-88.2c-3.7-14-16.4-23.8-30.9-23.8l-14.8 0c-14.5 0-27.2 9.7-30.9 23.8zM128 336l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z" }, child: [] }] })(n); } function Ve(n) { return H({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z" }, child: [] }] })(n); } function Pt(n) { return H({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z" }, child: [] }] })(n); } function ut(n) { return H({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z" }, child: [] }] })(n); } const Me = (n = () => { }) => { const [e, t] = R(!1), o = se(null), i = (s) => { var a; (a = o.current) != null && a.contains(s.target) ? t(!1) : (t(!0), n(s, o)); }; return Q(() => (document.addEventListener("click", i, !0), document.addEventListener("mousedown", i, !0), () => { document.removeEventListener("click", i, !0), document.removeEventListener("mousedown", i, !0); }), []), { ref: o, isClicked: e, setIsClicked: t }; }, xn = Pe(), po = ({ children: n, layout: e }) => { const [t, o] = R(() => i(e)); function i(s) { return ["list", "grid"].includes(s) ? s : "grid"; } return /* @__PURE__ */ c(xn.Provider, { value: { activeLayout: t, setActiveLayout: o }, children: n }); }, ye = () => ke(xn), V = (n) => typeof n == "string", ze = () => { let n, e; const t = new Promise((o, i) => { n = o, e = i; }); return t.resolve = n, t.reject = e, t; }, kt = (n) => n == null ? "" : "" + n, fo = (n, e, t) => { n.forEach((o) => { e[o] && (t[o] = e[o]); }); }, ho = /###/g, Tt = (n) => n && n.indexOf("###") > -1 ? n.replace(ho, ".") : n, zt = (n) => !n || V(n), Le = (n, e, t) => { const o = V(e) ? e.split(".") : e; let i = 0; for (; i < o.length - 1; ) { if (zt(n)) return {}; const s = Tt(o[i]); !n[s] && t && (n[s] = new t()), Object.prototype.hasOwnProperty.call(n, s) ? n = n[s] : n = {}, ++i; } return zt(n) ? {} : { obj: n, k: Tt(o[i]) }; }, Lt = (n, e, t) => { const { obj: o, k: i } = Le(n, e, Object); if (o !== void 0 || e.length === 1) { o[i] = t; return; } let s = e[e.length - 1], a = e.slice(0, e.length - 1), l = Le(n, a, Object); for (; l.obj === void 0 && a.length; ) s = `${a[a.length - 1]}.${s}`, a = a.slice(0, a.length - 1), l = Le(n, a, Object), l != null && l.obj && typeof l.obj[`${l.k}.${s}`] < "u" && (l.obj = void 0); l.obj[`${l.k}.${s}`] = t; }, mo = (n, e, t, o) => { const { obj: i, k: s } = Le(n, e, Object); i[s] = i[s] || [], i[s].push(t); }, Be = (n, e) => { const { obj: t, k: o } = Le(n, e); if (t && Object.prototype.hasOwnProperty.call(t, o)) return t[o]; }, go = (n, e, t) => { const o = Be(n, t); return o !== void 0 ? o : Be(e, t); }, Cn = (n, e, t) => { for (const o in e) o !== "__proto__" && o !== "constructor" && (o in n ? V(n[o]) || n[o] instanceof String || V(e[o]) || e[o] instanceof String ? t && (n[o] = e[o]) : Cn(n[o], e[o], t) : n[o] = e[o]); return n; }, Se = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); var vo = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;" }; const $o = (n) => V(n) ? n.replace(/[&<>"'\/]/g, (e) => vo[e]) : n; class yo { constructor(e) { this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = []; } getRegExp(e) { const t = this.regExpMap.get(e); if (t !== void 0) return t; const o = new RegExp(e); return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, o), this.regExpQueue.push(e), o; } } const wo = [" ", ",", "?", "!", ";"], bo = new yo(20), xo = (n, e, t) => { e = e || "", t = t || ""; const o = wo.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0); if (o.length === 0) return !0; const i = bo.getRegExp(`(${o.map((a) => a === "?" ? "\\?" : a).join("|")})`); let s = !i.test(n); if (!s) { const a = n.indexOf(t); a > 0 && !i.test(n.substring(0, a)) && (s = !0); } return s; }, pt = function(n, e) { let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "."; if (!n) return; if (n[e]) return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0; const o = e.split(t); let i = n; for (let s = 0; s < o.length; ) { if (!i || typeof i != "object") return; let a, l = ""; for (let r = s; r < o.length; ++r) if (r !== s && (l += t), l += o[r], a = i[l], a !== void 0) { if (["string", "number", "boolean"].indexOf(typeof a) > -1 && r < o.length - 1) continue; s += r - s + 1; break; } i = a; } return i; }, We = (n) => n == null ? void 0 : n.replace("_", "-"), Co = { type: "logger", log(n) { this.output("log", n); }, warn(n) { this.output("warn", n); }, error(n) { this.output("error", n); }, output(n, e) { var t, o; (o = (t = console == null ? void 0 : console[n]) == null ? void 0 : t.apply) == null || o.call(t, console, e); } }; class Ye { constructor(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.init(e, t); } init(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.prefix = t.prefix || "i18next:", this.logger = e || Co, this.options = t, this.debug = t.debug; } log() { for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) t[o] = arguments[o]; return this.forward(t, "log", "", !0); } warn() { for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) t[o] = arguments[o]; return this.forward(t, "warn", "", !0); } error() { for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) t[o] = arguments[o]; return this.forward(t, "error", ""); } deprecate() { for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) t[o] = arguments[o]; return this.forward(t, "warn", "WARNING DEPRECATED: ", !0); } forward(e, t, o, i) { return i && !this.debug ? null : (V(e[0]) && (e[0] = `${o}${this.prefix} ${e[0]}`), this.logger[t](e)); } create(e) { return new Ye(this.logger, { prefix: `${this.prefix}:${e}:`, ...this.options }); } clone(e) { return e = e || this.options, e.prefix = e.prefix || this.prefix, new Ye(this.logger, e); } } var me = new Ye(); class Je { constructor() { this.observers = {}; } on(e, t) { return e.split(" ").forEach((o) => { this.observers[o] || (this.observers[o] = /* @__PURE__ */ new Map()); const i = this.observers[o].get(t) || 0; this.observers[o].set(t, i + 1); }), this; } off(e, t) { if (this.observers[e]) { if (!t) { delete this.observers[e]; return; } this.observers[e].delete(t); } } emit(e) { for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) o[i - 1] = arguments[i]; this.observers[e] && Array.from(this.observers[e].entries()).forEach((a) => { let [l, r] = a; for (let d = 0; d < r; d++) l(...o); }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((a) => { let [l, r] = a; for (let d = 0; d < r; d++) l.apply(l, [e, ...o]); }); } } class At extends Je { constructor(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { ns: ["translation"], defaultNS: "translation" }; super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0); } addNamespaces(e) { this.options.ns.indexOf(e) < 0 && this.options.ns.push(e); } removeNamespaces(e) { const t = this.options.ns.indexOf(e); t > -1 && this.options.ns.splice(t, 1); } getResource(e, t, o) { var d, u; let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; const s = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, a = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure; let l; e.indexOf(".") > -1 ? l = e.split(".") : (l = [e, t], o && (Array.isArray(o) ? l.push(...o) : V(o) && s ? l.push(...o.split(s)) : l.push(o))); const r = Be(this.data, l); return !r && !t && !o && e.indexOf(".") > -1 && (e = l[0], t = l[1], o = l.slice(2).join(".")), r || !a || !V(o) ? r : pt((u = (d = this.data) == null ? void 0 : d[e]) == null ? void 0 : u[t], o, s); } addResource(e, t, o, i) { let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }; const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator; let l = [e, t]; o && (l = l.concat(a ? o.split(a) : o)), e.indexOf(".") > -1 && (l = e.split("."), i = t, t = l[1]), this.addNamespaces(t), Lt(this.data, l, i), s.silent || this.emit("added", e, t, o, i); } addResources(e, t, o) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : { silent: !1 }; for (const s in o) (V(o[s]) || Array.isArray(o[s])) && this.addResource(e, t, s, o[s], { silent: !0 }); i.silent || this.emit("added", e, t, o); } addResourceBundle(e, t, o, i, s) { let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1, skipCopy: !1 }, l = [e, t]; e.indexOf(".") > -1 && (l = e.split("."), i = o, o = t, t = l[1]), this.addNamespaces(t); let r = Be(this.data, l) || {}; a.skipCopy || (o = JSON.parse(JSON.stringify(o))), i ? Cn(r, o, s) : r = { ...r, ...o }, Lt(this.data, l, r), a.silent || this.emit("added", e, t, o); } removeResourceBundle(e, t) { this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t); } hasResourceBundle(e, t) { return this.getResource(e, t) !== void 0; } getResourceBundle(e, t) { return t || (t = this.options.defaultNS), this.getResource(e, t); } getDataByLanguage(e) { return this.data[e]; } hasLanguageSomeTranslations(e) { const t = this.getDataByLanguage(e); return !!(t && Object.keys(t) || []).find((i) => t[i] && Object.keys(t[i]).length > 0); } toJSON() { return this.data; } } var Sn = { processors: {}, addPostProcessor(n) { this.processors[n.name] = n; }, handle(n, e, t, o, i) { return n.forEach((s) => { var a; e = ((a = this.processors[s]) == null ? void 0 : a.process(e, t, o, i)) ?? e; }), e; } }; const Rt = {}, Mt = (n) => !V(n) && typeof n != "boolean" && typeof n != "number"; class Ke extends Je { constructor(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; super(), fo(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = me.create("translator"); } changeLanguage(e) { e && (this.language = e); } exists(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }; if (e == null) return !1; const o = this.resolve(e, t); return (o == null ? void 0 : o.res) !== void 0; } extractFromKey(e, t) { let o = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator; o === void 0 && (o = ":"); const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator; let s = t.ns || this.options.defaultNS || []; const a = o && e.indexOf(o) > -1, l = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !xo(e, o, i); if (a && !l) { const r = e.match(this.interpolator.nestingRegexp); if (r && r.length > 0) return { key: e, namespaces: V(s) ? [s] : s }; const d = e.split(o); (o !== i || o === i && this.options.ns.indexOf(d[0]) > -1) && (s = d.shift()), e = d.join(i); } return { key: e, namespaces: V(s) ? [s] : s }; } translate(e, t, o) { if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof options == "object" && (t = { ...t }), t || (t = {}), e == null) return ""; Array.isArray(e) || (e = [String(e)]); const i = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, { key: a, namespaces: l } = this.extractFromKey(e[e.length - 1], t), r = l[l.length - 1], d = t.lng || this.language, u = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode; if ((d == null ? void 0 : d.toLowerCase()) === "cimode") { if (u) { const b = t.nsSeparator || this.options.nsSeparator; return i ? { res: `${r}${b}${a}`, usedKey: a, exactUsedKey: a, usedLng: d, usedNS: r, usedParams: this.getUsedParamsDetails(t) } : `${r}${b}${a}`; } return i ? { res: a, usedKey: a, exactUsedKey: a, usedLng: d, usedNS: r, usedParams: this.getUsedParamsDetails(t) } : a; } const p = this.resolve(e, t); let f = p == null ? void 0 : p.res; const h = (p == null ? void 0 : p.usedKey) || a, m = (p == null ? void 0 : p.exactUsedKey) || a, v = ["[object Number]", "[object Function]", "[object RegExp]"], S = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, N = !this.i18nFormat || this.i18nFormat.handleAsObject, M = t.count !== void 0 && !V(t.count), F = Ke.hasDefaultValue(t), T = M ? this.pluralResolver.getSuffix(d, t.count, t) : "", g = t.ordinal && M ? this.pluralResolver.getSuffix(d, t.count, { ordinal: !1 }) : "", z = M && !t.ordinal && t.count === 0, x = z && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${T}`] || t[`defaultValue${g}`] || t.defaultValue; let w = f; N && !f && F && (w = x); const $ = Mt(w), C = Object.prototype.toString.apply(w); if (N && w && $ && v.indexOf(C) < 0 && !(V(S) && Array.isArray(w))) { if (!t.returnObjects && !this.options.returnObjects) { this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"); const b = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, w, { ...t, ns: l }) : `key '${a} (${this.language})' returned an object instead of string.`; return i ? (p.res = b, p.usedParams = this.getUsedParamsDetails(t), p) : b; } if (s) { const b = Array.isArray(w), P = b ? [] : {}, A = b ? m : h; for (const O in w) if (Object.prototype.hasOwnProperty.call(w, O)) { const q = `${A}${s}${O}`; F && !f ? P[O] = this.translate(q, { ...t, defaultValue: Mt(x) ? x[O] : void 0, joinArrays: !1, ns: l }) : P[O] = this.translate(q, { ...t, joinArrays: !1, ns: l }), P[O] === q && (P[O] = w[O]); } f = P; } } else if (N && V(S) && Array.isArray(f)) f = f.join(S), f && (f = this.extendTranslation(f, e, t, o)); else { let b = !1, P = !1; !this.isValidLookup(f) && F && (b = !0, f = x), this.isValidLookup(f) || (P = !0, f = a); const O = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && P ? void 0 : f, q = F && x !== f && this.options.updateMissing; if (P || b || q) { if (this.logger.log(q ? "updateKey" : "missingKey", d, r, a, q ? x : f), s) { const K = this.resolve(a, { ...t, keySeparator: !1 }); K && K.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format."); } let J = []; const oe = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language); if (this.options.saveMissingTo === "fallback" && oe && oe[0]) for (let K = 0; K < oe.length; K++) J.push(oe[K]); else this.options.saveMissingTo === "all" ? J = this.languageUtils.toResolveHierarchy(t.lng || this.language) : J.push(t.lng || this.language); const ae = (K, y, E) => { var D; const B = F && E !== f ? E : O; this.options.missingKeyHandler ? this.options.missingKeyHandler(K, r, y, B, q, t) : (D = this.backendConnector) != null && D.saveMissing && this.backendConnector.saveMissing(K, r, y, B, q, t), this.emit("missingKey", K, r, y, f); }; this.options.saveMissing && (this.options.saveMissingPlurals && M ? J.forEach((K) => { const y = this.pluralResolver.getSuffixes(K, t); z && t[`defaultValue${this.options.pluralSeparator}zero`] && y.indexOf(`${this.options.pluralSeparator}zero`) < 0 && y.push(`${this.options.pluralSeparator}zero`), y.forEach((E) => { ae([K], a + E, t[`defaultValue${E}`] || x); }); }) : ae(J, a, x)); } f = this.extendTranslation(f, e, t, p, o), P && f === a && this.options.appendNamespaceToMissingKey && (f = `${r}:${a}`), (P || b) && this.options.parseMissingKeyHandler && (f = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${r}:${a}` : a, b ? f : void 0)); } return i ? (p.res = f, p.usedParams = this.getUsedParamsDetails(t), p) : f; } extendTranslation(e, t, o, i, s) { var d, u; var a = this; if ((d = this.i18nFormat) != null && d.parse) e = this.i18nFormat.parse(e, { ...this.options.interpolation.defaultVariables, ...o }, o.lng || this.language || i.usedLng, i.usedNS, i.usedKey, { resolved: i }); else if (!o.skipInterpolation) { o.interpolation && this.interpolator.init({ ...o, interpolation: { ...this.options.interpolation, ...o.interpolation } }); const p = V(e) && (((u = o == null ? void 0 : o.interpolation) == null ? void 0 : u.skipOnVariables) !== void 0 ? o.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables); let f; if (p) { const m = e.match(this.interpolator.nestingRegexp); f = m && m.length; } let h = o.replace && !V(o.replace) ? o.replace : o; if (this.options.interpolation.defaultVariables && (h = { ...this.options.interpolation.defaultVariables, ...h }), e = this.interpolator.interpolate(e, h, o.lng || this.language || i.usedLng, o), p) { const m = e.match(this.interpolator.nestingRegexp), v = m && m.length; f < v && (o.nest = !1); } !o.lng && i && i.res && (o.lng = this.language || i.usedLng), o.nest !== !1 && (e = this.interpolator.nest(e, function() { for (var m = arguments.length, v = new Array(m), S = 0; S < m; S++) v[S] = arguments[S]; return (s == null ? void 0 : s[0]) === v[0] && !o.context ? (a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${t[0]}`), null) : a.translate(...v, t); }, o)), o.interpolation && this.interpolator.reset(); } const l = o.postProcess || this.options.postProcess, r = V(l) ? [l] : l; return e != null && (r != null && r.length) && o.applyPostProcessor !== !1 && (e = Sn.handle(r, e, t, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...i, usedParams: this.getUsedParamsDetails(o) }, ...o } : o, this)), e; } resolve(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o, i, s, a, l; return V(e) && (e = [e]), e.forEach((r) => { if (this.isValidLookup(o)) return; const d = this.extractFromKey(r, t), u = d.key; i = u; let p = d.namespaces; this.options.fallbackNS && (p = p.concat(this.options.fallbackNS)); const f = t.count !== void 0 && !V(t.count), h = f && !t.ordinal && t.count === 0, m = t.context !== void 0 && (V(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng); p.forEach((S) => { var N, M; this.isValidLookup(o) || (l = S, !Rt[`${v[0]}-${S}`] && ((N = this.utils) != null && N.hasLoadedNamespace) && !((M = this.utils) != null && M.hasLoadedNamespace(l)) && (Rt[`${v[0]}-${S}`] = !0, this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((F) => { var z; if (this.isValidLookup(o)) return; a = F; const T = [u]; if ((z = this.i18nFormat) != null && z.addLookupKeys) this.i18nFormat.addLookupKeys(T, u, F, S, t); else { let x; f && (x = this.pluralResolver.getSuffix(F, t.count, t)); const w = `${this.options.pluralSeparator}zero`, $ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`; if (f && (T.push(u + x), t.ordinal && x.indexOf($) === 0 && T.push(u + x.replace($, this.options.pluralSeparator)), h && T.push(u + w)), m) { const C = `${u}${this.options.contextSeparator}${t.context}`; T.push(C), f && (T.push(C + x), t.ordinal && x.indexOf($) === 0 && T.push(C + x.replace($, this.options.pluralSeparator)), h && T.push(C + w)); } } let g; for (; g = T.pop(); ) this.isValidLookup(o) || (s = g, o = this.getResource(F, S, g, t)); })); }); }), { res: o, usedKey: i, exactUsedKey: s, usedLng: a, usedNS: l }; } isValidLookup(e) { return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === ""); } getResource(e, t, o) { var s; let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; return (s = this.i18nFormat) != null && s.getResource ? this.i18nFormat.getResource(e, t, o, i) : this.resourceStore.getResource(e, t, o, i); } getUsedParamsDetails() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], o = e.replace && !V(e.replace); let i = o ? e.replace : e; if (o && typeof e.count < "u" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = { ...this.options.interpolation.defaultVariables, ...i }), !o) { i = { ...i }; for (const s of t) delete i[s]; } return i; } static hasDefaultValue(e) { const t = "defaultValue"; for (const o in e) if (Object.prototype.hasOwnProperty.call(e, o) && t === o.substring(0, t.length) && e[o] !== void 0) return !0; return !1; } } class Ot { constructor(e) { this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = me.create("languageUtils"); } getScriptPartFromCode(e) { if (e = We(e), !e || e.indexOf("-") < 0) return null; const t = e.split("-"); return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-")); } getLanguagePartFromCode(e) { if (e = We(e), !e || e.indexOf("-") < 0) return e; const t = e.split("-"); return this.formatLanguageCode(t[0]); } formatLanguageCode(e) { if (V(e) && e.indexOf("-") > -1) { let t; try { t = Intl.getCanonicalLocales(e)[0]; } catch { } return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e); } return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e; } isSupportedCode(e) { return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1; } getBestMatchFromCodes(e) { if (!e) return null; let t; return e.forEach((o) => { if (t) return; const i = this.formatLanguageCode(o); (!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i); }), !t && this.options.supportedLngs && e.forEach((o) => { if (t) return; const i = this.getScriptPartFromCode(o); if (this.isSupportedCode(i)) return t = i; const s = this.getLanguagePartFromCode(o); if (this.isSupportedCode(s)) return t = s; t = this.options.supportedLngs.find((a) => { if (a === s) return a; if (!(a.indexOf("-") < 0 && s.indexOf("-") < 0) && (a.indexOf("-") > 0 && s.indexOf("-") < 0 && a.substring(0, a.indexOf("-")) === s || a.indexOf(s) === 0 && s.length > 1)) return a; }); }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t; } getFallbackCodes(e, t) { if (!e) return []; if (typeof e == "function" && (e = e(t)), V(e) && (e = [e]), Array.isArray(e)) return e; if (!t) return e.default || []; let o = e[t]; return o || (o = e[this.getScriptPartFromCode(t)]), o || (o = e[this.formatLanguageCode(t)]), o || (o = e[this.getLanguagePartFromCode(t)]), o || (o = e.default), o || []; } toResolveHierarchy(e, t) { const o = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], s = (a) => { a && (this.isSupportedCode(a) ? i.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`)); }; return V(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(e))) : V(e) && s(this.formatLanguageCode(e)), o.forEach((a) => { i.indexOf(a) < 0 && s(this.formatLanguageCode(a)); }), i; } } const It = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }, Ut = { select: (n) => n === 1 ? "one" : "other", resolvedOptions: () => ({ pluralCategories: ["one", "other"] }) }; class So { constructor(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.languageUtils = e, this.options = t, this.logger = me.create("pluralResolver"), this.pluralRulesCache = {}; } addRule(e, t) { this.rules[e] = t; } clearCache() { this.pluralRulesCache = {}; } getRule(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const o = We(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({ cleanedCode: o, type: i }); if (s in this.pluralRulesCache) return this.pluralRulesCache[s]; let a; try { a = new Intl.PluralRules(o, { type: i }); } catch { if (!Intl) return this.logger.error("No Intl support, please use an Intl polyfill!"), Ut; if (!e.match(/-|_/)) return Ut; const r = this.languageUtils.getLanguagePartFromCode(e); a = this.getRule(r, t); } return this.pluralRulesCache[s] = a, a; } needsPlural(e) { let t = argu