diff --git a/dist/button.js b/dist/button.js index 4aa3bcf..9d07ed0 100644 --- a/dist/button.js +++ b/dist/button.js @@ -1,4 +1,4 @@ -import { ak as s, aj as u, al as e } from "./common/main-D3Yt2diy.js"; +import { aj as s, ai as u, ak as e } from "./common/main-DqCTTBs4.js"; export { s as auth, u as default, diff --git a/dist/common/main-D3Yt2diy.js b/dist/common/main-DqCTTBs4.js similarity index 73% rename from dist/common/main-D3Yt2diy.js rename to dist/common/main-DqCTTBs4.js index f25f814..ec6a131 100644 --- a/dist/common/main-D3Yt2diy.js +++ b/dist/common/main-DqCTTBs4.js @@ -1,10 +1,10 @@ var bn = Object.defineProperty; -var hi = (t) => { +var gi = (t) => { throw TypeError(t); }; var Cn = (t, e, i) => e in t ? bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i; -var N = (t, e, i) => Cn(t, typeof e != "symbol" ? e + "" : e, i), gi = (t, e, i) => e.has(t) || hi("Cannot " + i); -var c = (t, e, i) => (gi(t, e, "read from private field"), i ? i.call(t) : e.get(t)), x = (t, e, i) => e.has(t) ? hi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), B = (t, e, i, n) => (gi(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i); +var N = (t, e, i) => Cn(t, typeof e != "symbol" ? e + "" : e, i), hi = (t, e, i) => e.has(t) || gi("Cannot " + i); +var c = (t, e, i) => (hi(t, e, "read from private field"), i ? i.call(t) : e.get(t)), x = (t, e, i) => e.has(t) ? gi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), B = (t, e, i, n) => (hi(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i); var mi = (t, e, i, n) => ({ set _(r) { B(t, e, r, i); @@ -13,44 +13,45 @@ var mi = (t, e, i, n) => ({ return c(t, e, n); } }); -import { jsx as g, jsxs as A } from "react/jsx-runtime"; -import E, { useEffect as V, useState as L, useCallback as Y, useRef as H, useContext as pe, useMemo as _, useId as Mt, isValidElement as kn, useLayoutEffect as Sn } from "react"; -import ge from "pathe"; +import { jsx as h, jsxs as j } from "react/jsx-runtime"; +import E, { useEffect as M, useState as L, useCallback as Y, useRef as J, useContext as pe, useMemo as H, useId as Mt, isValidElement as kn, useLayoutEffect as Sn } from "react"; +import he from "pathe"; import b from "prop-types"; import O from "classnames"; import * as fi from "react-is"; import { useNotification as En } from "rc-notification"; import m from "lodash"; import re, { Field as Xt, FieldContext as Oi } from "rc-field-form"; -import { M as At, _ as $n, N as Ze, a as Me, s as Dt, b as vn, S as xn } from "./vender-DTKG7Nf1.js"; +import { M as jt, _ as $n, N as Ze, b as Me, s as Dt, c as vn, S as xn } from "./vender-DJd-PP9T.js"; import Ri from "immutability-helper"; -import { Space as Nn, Form as wt, Input as Pn, Button as Ct, Pagination as Tn, Tree as On, Breadcrumb as Rn, Empty as zt, Table as yi, Popover as Fn, Popconfirm as jn, Tooltip as An } from "antd"; +import { Space as Nn, Form as wt, Input as Pn, Button as Ct, Pagination as Tn, Tree as On, Breadcrumb as Rn, Empty as zt, Table as yi, Popover as Fn, Popconfirm as An, Tooltip as jn } from "antd"; import Ln from "rc-util/lib/hooks/useMergedState"; -import { useMergedState as In } from "rc-util"; -import { generatePath as Vn, useInRouterContext as Fi, useParams as Mn, useLocation as Dn, createBrowserRouter as zn, Navigate as Wn } from "react-router-dom"; -import Bn from "rc-drawer"; -import Un from "rc-dialog"; -var Ke, tt, _e, Ee, De, ze; -class ji { +import { useUpdateEffect as In } from "react-use"; +import { useMergedState as Vn } from "rc-util"; +import { generatePath as Mn, useInRouterContext as Fi, useParams as Dn, useLocation as zn, createBrowserRouter as Wn, Navigate as Bn } from "react-router-dom"; +import Un from "rc-drawer"; +import qn from "rc-dialog"; +var Ke, tt, He, Ee, De, ze; +class Ai { constructor(e, i) { x(this, Ke, /* @__PURE__ */ new Map()); x(this, tt, !0); - x(this, _e, []); + x(this, He, []); x(this, Ee); x(this, De, () => c(this, Ee)); x(this, ze, () => Promise.resolve()); N(this, "get", (...e) => new Promise((i, n) => { const r = JSON.stringify(e); if (c(this, Ke).has(r)) return i(c(this, ze).call(this, c(this, Ee), ...e)); - if (c(this, Ee) === void 0) c(this, _e).push([e, i, n]), c(this, tt) && (B(this, tt, !1), Promise.resolve(typeof c(this, De) == "function" ? c(this, De).call(this) : c(this, De)).then((o) => B(this, Ee, o || null)).finally(() => { - c(this, _e).forEach(([o, a, s]) => { + if (c(this, Ee) === void 0) c(this, He).push([e, i, n]), c(this, tt) && (B(this, tt, !1), Promise.resolve(typeof c(this, De) == "function" ? c(this, De).call(this) : c(this, De)).then((o) => B(this, Ee, o || null)).finally(() => { + c(this, He).forEach(([o, a, s]) => { try { const l = c(this, ze).call(this, c(this, Ee), ...o); c(this, Ke).set(JSON.stringify(o), l), a(l); } catch (l) { s(l); } - }), c(this, _e).length = 0; + }), c(this, He).length = 0; })); else { const o = c(this, ze).call(this, c(this, Ee), ...e); @@ -60,41 +61,41 @@ class ji { B(this, ze, i), B(this, De, e); } } -Ke = new WeakMap(), tt = new WeakMap(), _e = new WeakMap(), Ee = new WeakMap(), De = new WeakMap(), ze = new WeakMap(); -const po = () => g("div", { children: "Empty" }), pt = E.createContext({ ele: {}, mount: () => { +Ke = new WeakMap(), tt = new WeakMap(), He = new WeakMap(), Ee = new WeakMap(), De = new WeakMap(), ze = new WeakMap(); +const ho = () => h("div", { children: "Empty" }), pt = E.createContext({ ele: {}, mount: () => { }, unmount: () => { } }), ee = ({ rootClassName: t, className: e, children: i, actions: n, title: r, subTitle: o, extras: a, style: s = {} }) => { const { mount: l, unmount: d } = E.useContext(pt); - return ee.Action({ children: n }), ee.Title({ children: r }), ee.SubTitle({ children: o }), ee.Extra({ children: a }), V(() => (l("rootClassName", t), () => d(t)), [t]), g("div", { className: O("ff-container", e), style: s, children: i }); + return ee.Action({ children: n }), ee.Title({ children: r }), ee.SubTitle({ children: o }), ee.Extra({ children: a }), M(() => (l("rootClassName", t), () => d(t)), [t]), h("div", { className: O("ff-container", e), style: s, children: i }); }, yt = (t) => ({ children: e, className: i }) => { const { mount: n, unmount: r } = E.useContext(pt); - return V(() => (e && n(t, E.createElement("div", { key: `ff-${t}`, className: O(`ff-popup-${t}`, i) }, e)), () => r(t)), [i, e]), null; + return M(() => (e && n(t, E.createElement("div", { key: `ff-${t}`, className: O(`ff-popup-${t}`, i) }, e)), () => r(t)), [i, e]), null; }; ee.Action = yt("actions"), ee.Title = yt("title"), ee.SubTitle = yt("sub-title"), ee.Extra = yt("extras"), ee.propTypes = { className: b.string, style: b.object, title: b.any, subTitle: b.any, actions: b.any, extras: b.any }; -const ho = () => g(ee, { className: "ff-loading", children: A("div", { className: "loader", children: [A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] }), A("div", { className: "square", children: [g("span", {}), g("span", {}), g("span", {})] })] }) }), go = () => g("div", { children: "NotFound" }), Ai = ({ children: t }) => { +const mo = () => h(ee, { className: "ff-loading", children: j("div", { className: "loader", children: [j("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), j("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), j("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] }), j("div", { className: "square", children: [h("span", {}), h("span", {}), h("span", {})] })] }) }), fo = () => h("div", { children: "NotFound" }), ji = ({ children: t }) => { const [e, i] = L({}), n = Y((o, a) => i((s) => ({ ...s, [o]: a })), []), r = Y((o) => i((a) => ({ ...a, [o]: void 0 })), []); - return typeof (t == null ? void 0 : t.type) == "string" ? t : g(pt.Provider, { value: { ele: e, mount: n, unmount: r }, children: E.cloneElement(t, { className: e.rootClassName, title: e.title, subTitle: e["sub-title"], actions: e.actions, extras: e.extras }) }); + return typeof (t == null ? void 0 : t.type) == "string" ? t : h(pt.Provider, { value: { ele: e, mount: n, unmount: r }, children: E.cloneElement(t, { className: e.rootClassName, title: e.title, subTitle: e["sub-title"], actions: e.actions, extras: e.extras }) }); }; -Ai.propTypes = { children: b.element.isRequired }; -const wi = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Qt = ({ type: t, props: e }) => g("i", { ...e, children: g("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (wi[t] || wi.info).map((i, n) => g("path", { d: i }, n)) }) }), Li = ({ className: t, content: e, icon: i, $close: n }) => A(E.Fragment, { children: [i && g("div", { className: O("ff-notification-icon", t), children: g(Qt, { type: i }) }), e] }), qn = ({}) => g(ee, { children: "Confirm" }); -var Pe, He; +ji.propTypes = { children: b.element.isRequired }; +const wi = { close: ["M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"], check: ["M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1 0.4-12.8-6.3-12.8z"], info: ["M512 224m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z", "M544 392h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V400c0-4.4-3.6-8-8-8z"] }, Qt = ({ type: t, props: e }) => h("i", { ...e, children: h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor", children: (wi[t] || wi.info).map((i, n) => h("path", { d: i }, n)) }) }), Li = ({ className: t, content: e, icon: i, $close: n }) => j(E.Fragment, { children: [i && h("div", { className: O("ff-notification-icon", t), children: h(Qt, { type: i }) }), e] }), Kn = ({}) => h(ee, { children: "Confirm" }); +var Pe, Je; const me = class me { constructor() { - x(this, He, /* @__PURE__ */ new Map()); - N(this, "init", (e) => B(this, He, new Map(e))); - N(this, "check", (e) => !c(this, He).has(e) || c(this, He).get(e)); + x(this, Je, /* @__PURE__ */ new Map()); + N(this, "init", (e) => B(this, Je, new Map(e))); + N(this, "check", (e) => !c(this, Je).has(e) || c(this, Je).get(e)); if (c(me, Pe)) return c(me, Pe); } }; -Pe = new WeakMap(), He = new WeakMap(), x(me, Pe, null), N(me, "getInstance", () => (c(me, Pe) || B(me, Pe, new me()), c(me, Pe))); +Pe = new WeakMap(), Je = new WeakMap(), x(me, Pe, null), N(me, "getInstance", () => (c(me, Pe) || B(me, Pe, new me()), c(me, Pe))); let Wt = me; -const Ii = Wt.getInstance(), Kn = (t, e, i = "children") => { +const Ii = Wt.getInstance(), Hn = (t, e, i = "children") => { if (m.isEmpty(t)) return {}; const n = m.find(t, ["value", e]); if (!m.isEmpty(n)) return n; const r = t.length; for (let o = 0; o < r; o++) { - const { [i]: a } = t[o], s = Kn(a, e, i); + const { [i]: a } = t[o], s = Hn(a, e, i); if (!m.isEmpty(s)) return s; } return {}; @@ -124,7 +125,7 @@ const Ue = Bt.getInstance(), bi = { null2json: (t) => Object.create(), null2arra i = Array.isArray(t) ? "array" : typeof t, m.isObject(t) && (i = "json"); const n = `${i}2${e}`; return Reflect.has(bi, n) ? bi[n](t) : t; -}, _n = (t) => t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "json" : typeof t == "boolean" ? "bool" : typeof t == "string" ? "string" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "float" : typeof t, ht = (t = {}, e = {}, i = {}, n = "") => Mi(t, (r, o) => o === "type" && r === "code") ? Di(t, e, i, n) : zi(t, e, n), Mi = (t, e = () => !1) => m.some(t, (i) => !!m.some(i, e) || (m.isEmpty(i) || !m.isPlainObject(i) && !m.isArray(i) ? void 0 : Mi(i, e))), Di = async (t = {}, e = {}, i = {}, n = "") => { +}, Jn = (t) => t === null ? "null" : Array.isArray(t) ? "array" : typeof t == "object" ? "json" : typeof t == "boolean" ? "bool" : typeof t == "string" ? "string" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "float" : typeof t, gt = (t = {}, e = {}, i = {}, n = "") => Mi(t, (r, o) => o === "type" && r === "code") ? Di(t, e, i, n) : zi(t, e, n), Mi = (t, e = () => !1) => m.some(t, (i) => !!m.some(i, e) || (m.isEmpty(i) || !m.isPlainObject(i) && !m.isArray(i) ? void 0 : Mi(i, e))), Di = async (t = {}, e = {}, i = {}, n = "") => { let r = /* @__PURE__ */ Object.create(null); for (let o in t) { let a; @@ -174,31 +175,31 @@ const Ue = Bt.getInstance(), bi = { null2json: (t) => Object.create(), null2arra m.set(n, r, o); } return n; -}, {}), Lt = (t, e) => t && typeof t == "object" ? Array.isArray(t) ? t.map((i) => Lt(i, e)) : Object.keys(t).reduce((i, n) => (e[n] ? i[e[n]] = Lt(t[n], e) : i[n] = Lt(t[n], e), i), {}) : t, mo = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => { +}, {}), Lt = (t, e) => t && typeof t == "object" ? Array.isArray(t) ? t.map((i) => Lt(i, e)) : Object.keys(t).reduce((i, n) => (e[n] ? i[e[n]] = Lt(t[n], e) : i[n] = Lt(t[n], e), i), {}) : t, yo = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => { const e = 16 * Math.random() | 0; return (t === "x" ? e : 3 & e | 8).toString(16); -}), fo = (t) => { +}), wo = (t) => { var e, i; return t ? (i = (e = t.match(/^@pkg(?:[^\/]*\/){3}(?[^\/]+)/)) == null ? void 0 : e.groups) == null ? void 0 : i.name : ""; -}, yo = (t) => { +}, bo = (t) => { var e, i; return t ? (i = (e = t.match(/^@pkg(?:[^\/]*\/){2}(?[^\/]+)/)) == null ? void 0 : e.groups) == null ? void 0 : i.category : ""; -}, wo = (t) => { +}, Co = (t) => { var e, i; return t ? (i = (e = t.match(/^@pkg(?:[^\/]*\/){1}(?[^\/]+)/)) == null ? void 0 : e.groups) == null ? void 0 : i.owner : ""; -}, Hn = (t, e = 32, i = "auto") => { +}, _n = (t, e = 32, i = "auto") => { const n = Ut(t), r = i === "auto" ? "x64" : i; - if (e === 32) return At.x86.hash32(n).toString(); - if (e === 128) return r === "x64" ? At.x64.hash128(n) : At.x86.hash128(n); + if (e === 32) return jt.x86.hash32(n).toString(); + if (e === 128) return r === "x64" ? jt.x64.hash128(n) : jt.x86.hash128(n); throw new Error("bits 只能是 32 或 128"); -}, Ut = (t) => t == null ? "null" : typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" ? String(t) : typeof t == "function" ? t.toString() : Array.isArray(t) ? "[" + t.map(Ut).join(",") + "]" : typeof t == "object" ? "{" + Object.keys(t).sort().map((e) => `${e}:${Ut(t[e])}`).join(",") + "}" : String(t), Jn = () => { +}, Ut = (t) => t == null ? "null" : typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" ? String(t) : typeof t == "function" ? t.toString() : Array.isArray(t) ? "[" + t.map(Ut).join(",") + "]" : typeof t == "object" ? "{" + Object.keys(t).sort().map((e) => `${e}:${Ut(t[e])}`).join(",") + "}" : String(t), Gn = () => { let t = 1; const e = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new Map(); return (...n) => n.length === 0 ? "" : n.map((r) => { return String((o = r) === null || typeof o != "object" && typeof o != "function" ? (i.has(o) || i.set(o, t++), i.get(o)) : (e.has(o) || e.set(o, t++), e.get(o))); var o; }).join("::"); -}, Gn = (t) => { +}, Yn = (t) => { if (!t || typeof t != "string" || t.startsWith("/") || t.startsWith("./") || t.startsWith("../")) return !1; try { let e = t.startsWith("//") ? `http:${t}` : t; @@ -206,8 +207,8 @@ const Ue = Bt.getInstance(), bi = { null2json: (t) => Object.create(), null2arra } catch { return !1; } -}, bo = (t, e = "") => { - if (!t || typeof t != "string" || Gn(t)) return t; +}, ko = (t, e = "") => { + if (!t || typeof t != "string" || Yn(t)) return t; let i = e; return !i && typeof window < "u" && window.location && (i = `${window.location.protocol}//${window.location.host}`), t.startsWith("/") ? i ? `${i}${t}` : t : i ? `${i}/${t}` : t; }; @@ -252,7 +253,7 @@ Et = new WeakMap(), nt = new WeakMap(), rt = new WeakMap(), $t = new WeakMap(), return ((r = n.default) == null ? void 0 : r.call(n, i)) || ((o) => o); }); throw new TypeError("middleware must be a string or a function"); -}, Jn())); +}, Gn())); let kt = vt; const ae = E.createContext({ listCode: "", classNames: {}, getBase62params: (t, e) => { }, getSelectedRows: () => [], onReload: () => { @@ -273,40 +274,40 @@ const ae = E.createContext({ listCode: "", classNames: {}, getBase62params: (t, } }), Ci = ({ className: t, record: e, column: i, ...n }) => { if (i != null && i.editableByJs && (i != null && i.uuid)) { const { formSetting: r = { primaryKey: "id" }, widgetSetting: o = {}, widgetContainerSetting: a = {} } = (i == null ? void 0 : i.editableByJsSetting) || {}; - return g(P.Popover, { widget: Yn, widgetData: { record: e, column: i }, widgetSetting: { widgetSetting: o, formSetting: r }, widgetContainerProps: { title: i != null && i.title ? `${i.title} - 编辑` : "编辑", ...a, width: (a == null ? void 0 : a.width) || 260, arrow: !0 }, children: g("td", { className: O("ff-data-list-cell-editable", t), ...n }) }); + return h(P.Popover, { widget: Xn, widgetData: { record: e, column: i }, widgetSetting: { widgetSetting: o, formSetting: r }, widgetContainerProps: { title: i != null && i.title ? `${i.title} - 编辑` : "编辑", ...a, width: (a == null ? void 0 : a.width) || 260, arrow: !0 }, children: h("td", { className: O("ff-data-list-cell-editable", t), ...n }) }); } - return g("td", { className: t, ...n }); -}, Yn = ({ record: t, column: e, $close: i, $setting: n }) => { - const r = H(_n(m.get(t, e == null ? void 0 : e.dataIndex))), { listCode: o, onClickCallback: a } = pe(ae), [s] = re.useForm(), { formSetting: l, widgetSetting: d } = n, u = (l == null ? void 0 : l.primaryKey) || "id", p = () => { + return h("td", { className: t, ...n }); +}, Xn = ({ record: t, column: e, $close: i, $setting: n }) => { + const r = J(Jn(m.get(t, e == null ? void 0 : e.dataIndex))), { listCode: o, onClickCallback: a } = pe(ae), [s] = re.useForm(), { formSetting: l, widgetSetting: d } = n, u = (l == null ? void 0 : l.primaryKey) || "id", p = () => { s.setFieldsValue({ value: m.get(t, e == null ? void 0 : e.dataIndex), __PROPS__: t }); }; - return mt(() => p(), [t, e == null ? void 0 : e.dataIndex, o]), g(ee, { actions: A(E.Fragment, { children: [g(P, { size: "small", onClick: p, children: "重置" }), A(Nn.Compact, { block: !0, children: [g(P, { size: "small", widget: i, children: "取消" }), g(P, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: f }) => { - const h = m.get(t, u.substring(u.indexOf(".") + 1)); - if (!h) throw "获取更新主键失败!"; - I.put(`/api/${o}-storeBy-${e == null ? void 0 : e.uuid}/${h}`, { value: f }).msg(() => a(2, t)).then(i); - }).catch(console.warn), children: "保存" })] })] }), children: A(re, { form: s, children: [g(ti, { label: "", type: r.current, code: "value", widget: e == null ? void 0 : e.editableByJs, extras: d }), g(Xt, { noStyle: !0, name: ["__PROPS__"], children: () => { + return mt(() => p(), [t, e == null ? void 0 : e.dataIndex, o]), h(ee, { actions: j(E.Fragment, { children: [h(P, { size: "small", onClick: p, children: "重置" }), j(Nn.Compact, { block: !0, children: [h(P, { size: "small", widget: i, children: "取消" }), h(P, { type: "primary", size: "small", widget: () => s.validateFields().then(({ value: f }) => { + const g = m.get(t, u.substring(u.indexOf(".") + 1)); + if (!g) throw "获取更新主键失败!"; + I.put(`/api/${o}-storeBy-${e == null ? void 0 : e.uuid}/${g}`, { value: f }).msg(() => a(2, t)).then(i); + }).catch(console.warn), children: "保存" })] })] }), children: j(re, { form: s, children: [h(ti, { label: "", type: r.current, code: "value", widget: e == null ? void 0 : e.editableByJs, extras: d }), h(Xt, { noStyle: !0, name: ["__PROPS__"], children: () => { } })] }) }); -}, Xn = (t) => function(e) { +}, Qn = (t) => function(e) { return t(e, getRecord()); -}, Qn = (t, e = {}) => _(() => { +}, Zn = (t, e = {}) => H(() => { var i; return (i = t == null ? void 0 : t.filter(Boolean)) == null ? void 0 : i.map(({ widgetByJs: n, widgetByJsSetting: r, ...o }, a) => { const s = (d) => ({ record: d, column: o }); let l = []; - return n && l.push([n, r]), l.length > 0 ? (o != null && o.render && l.push([Xn, o.render]), { ...o, onCell: s, render: (d, u) => new kt(l).toRender(d, u, "-") }) : { ...o, onCell: s }; + return n && l.push([n, r]), l.length > 0 ? (o != null && o.render && l.push([Qn, o.render]), { ...o, onCell: s, render: (d, u) => new kt(l).toRender(d, u, "-") }) : { ...o, onCell: s }; }); -}, [t, e]), Zn = (t = {}) => _(() => { +}, [t, e]), er = (t = {}) => H(() => { var e; return t.body ?? (t.body = { cell: Ci }), (e = t.body).cell ?? (e.cell = Ci), t; -}, [t]), Co = (t) => { +}, [t]), So = (t) => { const [e, i] = L({}); - return V(() => { + return M(() => { let n = !1; return t && I.get(`/api/_/${t}`).then((r) => m.pick(r, ["uuid", "name", "code", "resource", "marginX", "marginY", "cols", "rowHeight", "primaryKey", "columns", "itemOperations", "batchOperations", "isConditionFormLayout", "layout", "tabs", "pageSize", "layoutConfig", "selectionType"])).then((r) => !n && i(r)), () => n = !0; }, [t]), e; -}, ko = (t, e = {}) => { +}, Eo = (t, e = {}) => { const [i, n] = L({ dataSource: [] }); - return gt(() => { + return ht(() => { let r = !1; return t && I.get(`/api/${t}/${I.encode({ page: 1, ...e })}`).then((o) => !r && n(o)), () => r = !0; }, [t, e]), i; @@ -315,27 +316,27 @@ const ae = E.createContext({ listCode: "", classNames: {}, getBase62params: (t, return Y((o) => t == null ? void 0 : t.filter((a) => !a.uuid || !e.has(a.uuid) || e.get(a.uuid).some((s) => s == r(o))), [t, e, r]); }, qt = (t = [], e = /* @__PURE__ */ new Map(), i = [], n = "id", r) => { const o = Y(r ? (a) => m.get(a, n, m.get(a, [r, n])) : (a) => m.get(a, n), [n, r]); - return _(() => { + return H(() => { if (m.isEmpty(t) || !t.some(({ uuid: s }) => Ii.check(s))) return !1; if (m.isEmpty(e) || m.isEmpty(i)) return !0; const a = i.map((s) => o(s)); return t.some(({ uuid: s }) => !s || !e.has(s) || e.get(s).some((l) => a.some((d) => d == l))); }, [t, i, e, o]); -}, er = (t, e, i = "id", n = null) => { - const r = Tt(), o = H(!1), a = H(t.dataSource), s = H(t.itemOperationsAccess); - return V(() => (a.current = t.dataSource, s.current = t.itemOperationsAccess, () => o.current = !1), [t.dataSource, t.itemOperationsAccess]), o.current && (t.dataSource = a.current, t.itemOperationsAccess = s.current), [t, (l = 0, d = null) => { +}, tr = (t, e, i = "id", n = null) => { + const r = Tt(), o = J(!1), a = J(t.dataSource), s = J(t.itemOperationsAccess); + return M(() => (a.current = t.dataSource, s.current = t.itemOperationsAccess, () => o.current = !1), [t.dataSource, t.itemOperationsAccess]), o.current && (t.dataSource = a.current, t.itemOperationsAccess = s.current), [t, (l = 0, d = null) => { var u, p; if (o.current = !1, l === 1) return (u = t.onReload) == null ? void 0 : u.call(t); if (l === 2) { - const f = m.get(d, "__PARENT_ID__", ""), h = m.get(d, i, m.get(d, [n, i], "")), y = m.findIndex(a.current, ["__PARENT_ID__", f]), w = m.findIndex(y > -1 ? m.get(a.current, [y, "children"]) : a.current, [i, h]); + const f = m.get(d, "__PARENT_ID__", ""), g = m.get(d, i, m.get(d, [n, i], "")), y = m.findIndex(a.current, ["__PARENT_ID__", f]), w = m.findIndex(y > -1 ? m.get(a.current, [y, "children"]) : a.current, [i, g]); if (w === -1) return (p = t.onReload) == null ? void 0 : p.call(t); - Promise.all([I.get(`/api/${e}/detail/${h}`), I.post(`/api/${e}/list-operations-access`, { ids: h })]).then(([C, S]) => { + Promise.all([I.get(`/api/${e}/detail/${g}`), I.post(`/api/${e}/list-operations-access`, { ids: g })]).then(([C, S]) => { const v = m.get(a.current, y > -1 ? [y, "children", w, "children"] : [w, "children"]); a.current = Ri(a.current, y > -1 ? { [y]: { children: { $splice: [[w, 1, { ...C, children: v }]] } } } : { $splice: [[w, 1, { ...C, children: v }]] }); const k = new Map(S); s.current.forEach(($, T) => { - var j; - (j = k.get(T)) != null && j.some((F) => F == h) || s.current.set(T, $.filter((F) => F !== h)); + var A; + (A = k.get(T)) != null && A.some((F) => F == g) || s.current.set(T, $.filter((F) => F !== g)); }), k.forEach(($, T) => { s.current.has(T) ? s.current.set(T, m.uniq([...s.current.get(T) || [], ...$])) : s.current.set(T, $); }); @@ -344,83 +345,83 @@ const ae = E.createContext({ listCode: "", classNames: {}, getBase62params: (t, }); } }]; -}, tr = (t, e) => { - const i = Tt(), n = H(e), r = H(/* @__PURE__ */ new Map()), o = H([]), a = m.throttle((l) => { - o.current = [], I.list(t, m.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: d, condition: u, total: p, tab: f, sider: h, page: y, pageSize: w, operationsAccess: C, dataSource: S }) => { - n.current = { tab: f, condition: u, sider: h, keyword: d, total: p, pageSize: w, page: S != null && S.length ? y : 1 }, o.current = S, r.current = new Map(C), i(); +}, ir = (t, e) => { + const i = Tt(), n = J(e), r = J(/* @__PURE__ */ new Map()), o = J([]), a = m.throttle((l) => { + o.current = [], I.list(t, m.pick({ ...n.current, ...l }, ["tab", "page", "pageSize", "condition", "sider", "keyword"])).then(({ keyword: d, condition: u, total: p, tab: f, sider: g, page: y, pageSize: w, operationsAccess: C, dataSource: S }) => { + n.current = { tab: f, condition: u, sider: g, keyword: d, total: p, pageSize: w, page: S != null && S.length ? y : 1 }, o.current = S, r.current = new Map(C), i(); }); }, 380, { leading: !1, trailing: !0 }); mt(() => { o.current = [], t && a(e); }, [t, e]); - const s = _(() => m.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); + const s = H(() => m.pick(n.current, ["total", "tab", "page", "pageSize", "condition", "sider", "keyword"]), [n.current]); return Object.assign(s, { onTabChange: (l) => a({ tab: l, page: 1 }), onPageChange: (l, d) => a({ page: l, pageSize: d }), onPageSizeChange: (l) => a({ pageSize: l, page: 1 }), onConditionChange: (l, d) => a({ keyword: d, condition: Ri(n.current.condition || {}, { $merge: l || {} }), page: 1 }), onSiderChange: (l) => a({ sider: l, page: 1 }), onKeywordChange: (l) => a({ keyword: l, page: 1 }), itemOperationsAccess: r.current, dataSource: o.current, onReload: a, payload: e == null ? void 0 : e.payload }); -}, ir = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, isPaginate: r, isItemOperations: o, isBatchOperations: a, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: u, primaryKey: p, title: f, itemGridLayout: h, $setting: y, tabs: w, isConditionFormLayout: C, isTreeSider: S, treeSiderConfig: v }) => { - const { classNames: k, onClickCallback: $ } = pe(ae), T = m.pick(y, ["column", "colWidth", "beforeRender", "afterRender", "style"]), j = Wi(l, d, p, u), F = Y((M, D, R) => g(nr, { className: O("ff-data-list-framework-item", k == null ? void 0 : k.item), operations: o ? j(D) : [], data: u ? { [u]: D } : D, children: M, onClickCallback: $ }), [u, p, o, $, l, d]); - return A("div", { className: O("ff-data-list-framework", e), children: [g(i.sider, { isTreeSider: S, ...v }), A("div", { className: O("ff-data-list-container", k == null ? void 0 : k.container), children: [g(i.filter, { isConditionFormLayout: C }), g(i.toolbar, { title: f, tabs: w }), g(yr, { ...T, ...h, empty: g(i.empty, { className: k == null ? void 0 : k.empty }), primaryKey: p, itemRender: F, dataSource: n }), g(i.footer, { isPaginate: r, isOperations: a, operations: s })] })] }); -}, nr = ({ className: t, operations: e, children: i, data: n, onClickCallback: r }) => A("div", { className: O("data-list-grid-layout-item", t), children: [g("div", { className: "data-list-grid-layout-item-container", children: i }), !!(e != null && e.length) && g("div", { className: "data-list-grid-layout-item-actions", children: e.map((o) => g("span", { className: "data-list-grid-layout-item-action", children: g(P.Link, { uuid: o.uuid, type: o.type, name: o.name, widget: o.widget, widgetType: o.widgetType, widgetProps: o.widgetProps, widgetSetting: o.widgetSetting, widgetContainerProps: o.widgetContainerSetting, data: n, confirm: o.confirm, onAfterClick: (a) => a !== !1 && (r == null ? void 0 : r(o.isRefresh, n)) }, o.uuid || Mt()) }, (o == null ? void 0 : o.uuid) || Mt())) })] }), rr = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, columns: r, isItemOperations: o, isBatchOperations: a, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: u, primaryKey: p, title: f, tabs: h, isPaginate: y, rowSelection: w, isTreeSider: C, treeSiderConfig: S, isConditionFormLayout: v, ...k }) => { - const { classNames: $, onClickCallback: T } = pe(ae), j = Wi(l, d, p, u), F = qt(l, d, n, p, u); - return A("div", { className: O("ff-data-table-framework", e), children: [g(i.sider, { isTreeSider: C, ...S }), A("div", { className: O("ff-data-table-container", $ == null ? void 0 : $.container), children: [g(i.filter, { isConditionFormLayout: v }), g(i.toolbar, { title: f, tabs: h }), g(ur, { ...k, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: n, rowSelection: w, operationRender: F ? (M) => { +}, nr = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, isPaginate: r, isItemOperations: o, isBatchOperations: a, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: u, primaryKey: p, title: f, itemGridLayout: g, $setting: y, tabs: w, isConditionFormLayout: C, isTreeSider: S, treeSiderConfig: v }) => { + const { classNames: k, onClickCallback: $ } = pe(ae), T = m.pick(y, ["column", "colWidth", "beforeRender", "afterRender", "style"]), A = Wi(l, d, p, u), F = Y((V, D, R) => h(rr, { className: O("ff-data-list-framework-item", k == null ? void 0 : k.item), operations: o ? A(D) : [], data: u ? { [u]: D } : D, children: V, onClickCallback: $ }), [u, p, o, $, l, d]); + return j("div", { className: O("ff-data-list-framework", e), children: [h(i.sider, { isTreeSider: S, ...v }), j("div", { className: O("ff-data-list-container", k == null ? void 0 : k.container), children: [h(i.filter, { isConditionFormLayout: C }), h(i.toolbar, { title: f, tabs: w }), h(wr, { ...T, ...g, empty: h(i.empty, { className: k == null ? void 0 : k.empty }), primaryKey: p, itemRender: F, dataSource: n }), h(i.footer, { isPaginate: r, isOperations: a, operations: s })] })] }); +}, rr = ({ className: t, operations: e, children: i, data: n, onClickCallback: r }) => j("div", { className: O("data-list-grid-layout-item", t), children: [h("div", { className: "data-list-grid-layout-item-container", children: i }), !!(e != null && e.length) && h("div", { className: "data-list-grid-layout-item-actions", children: e.map((o) => h("span", { className: "data-list-grid-layout-item-action", children: h(P.Link, { uuid: o.uuid, type: o.type, name: o.name, widget: o.widget, widgetType: o.widgetType, widgetProps: o.widgetProps, widgetSetting: o.widgetSetting, widgetContainerProps: o.widgetContainerSetting, data: n, confirm: o.confirm, onAfterClick: (a) => a !== !1 && (r == null ? void 0 : r(o.isRefresh, n)) }, o.uuid || Mt()) }, (o == null ? void 0 : o.uuid) || Mt())) })] }), or = ({ listCode: t, className: e, layouts: i = {}, dataSource: n, columns: r, isItemOperations: o, isBatchOperations: a, batchOperations: s, itemOperations: l, itemOperationsAccess: d, resource: u, primaryKey: p, title: f, tabs: g, isPaginate: y, rowSelection: w, isTreeSider: C, treeSiderConfig: S, isConditionFormLayout: v, ...k }) => { + const { classNames: $, onClickCallback: T } = pe(ae), A = Wi(l, d, p, u), F = qt(l, d, n, p, u); + return j("div", { className: O("ff-data-table-framework", e), children: [h(i.sider, { isTreeSider: C, ...S }), j("div", { className: O("ff-data-table-container", $ == null ? void 0 : $.container), children: [h(i.filter, { isConditionFormLayout: v }), h(i.toolbar, { title: f, tabs: g }), h(pr, { ...k, primaryKey: p, className: "ff-data-table-content", columns: r, dataSource: n, rowSelection: w, operationRender: F ? (V) => { var D; - return g("div", { className: "ff-data-table-actions", children: (D = j(M)) == null ? void 0 : D.map((R, W) => g(P.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: M, confirm: R.confirm, onAfterClick: (U) => U !== !1 && (T == null ? void 0 : T(R.isRefresh, M)) }, R.uuid || W)) }); - } : null }), g(i.footer, { isPaginate: y, isOperations: a, operations: s })] })] }); + return h("div", { className: "ff-data-table-actions", children: (D = A(V)) == null ? void 0 : D.map((R, W) => h(P.Link, { size: "small", uuid: R.uuid, type: R.type, name: R.name, widget: R.widget, widgetType: R.widgetType, widgetProps: R.widgetProps, widgetData: R.widgetData, widgetSetting: R.widgetSetting, widgetContainerProps: R.widgetContainerSetting, data: V, confirm: R.confirm, onAfterClick: (U) => U !== !1 && (T == null ? void 0 : T(R.isRefresh, V)) }, R.uuid || W)) }); + } : null }), h(i.footer, { isPaginate: y, isOperations: a, operations: s })] })] }); }, Zt = (t = [], e, i = null) => { var n; - return (n = m.sortBy(t, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: o, y: a, w: s, h: l, field: { boxStyle: d, ...u } = {} }, p) => g("div", { className: "grid-layout-item", style: Bi(o, a, s, l, d), children: g(e, { ...u, basicForm: i }) }, r ?? p)); + return (n = m.sortBy(t, ["y", "x"])) == null ? void 0 : n.map(({ i: r, x: o, y: a, w: s, h: l, field: { boxStyle: d, ...u } = {} }, p) => h("div", { className: "grid-layout-item", style: Bi(o, a, s, l, d), children: h(e, { ...u, basicForm: i }) }, r ?? p)); }, Bi = (t, e, i, n, r = {}, o = 0) => { const a = { "--grid-layout-h": `${n}`, "--grid-layout-w": `${i}`, "--grid-layout-x": `${t}`, "--grid-layout-y": `${e}`, "--grid-layout-row-height-offset": "0px" }; return r != null && r.autoHeight ? a.height = "fit-content" : a["--grid-layout-row"] = `${n}`, r != null && r.alignItems && (a["--grid-layout-box-align-items"] = r.alignItems), r != null && r.justifyContent && (a["--grid-layout-box-justify-content"] = r.justifyContent), a["--grid-layout-box-margin"] = ki(r == null ? void 0 : r.marginTop, r == null ? void 0 : r.marginRight, r == null ? void 0 : r.marginBottom, r == null ? void 0 : r.marginLeft), a["--grid-layout-box-padding"] = ki(r == null ? void 0 : r.paddingTop, r == null ? void 0 : r.paddingRight, r == null ? void 0 : r.paddingBottom, r == null ? void 0 : r.paddingLeft), o && (a.height = `${o}px`), a; -}, ki = (t, e, i, n) => `${t || 0}px ${e || 0}px ${i || 0}px ${n || 0}px`, So = (t = "Text", e = "@pkg/ff/grid-layouts") => t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, Ui = (t) => Object.keys(t).reduce((e, i) => (/^on[A-Z]/.test(i) && (e[i] = t[i]), e), {}), qi = ({ className: t, isConditionFormLayout: e }) => { - var f, h; +}, ki = (t, e, i, n) => `${t || 0}px ${e || 0}px ${i || 0}px ${n || 0}px`, $o = (t = "Text", e = "@pkg/ff/grid-layouts") => t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, Ui = (t) => Object.keys(t).reduce((e, i) => (/^on[A-Z]/.test(i) && (e[i] = t[i]), e), {}), qi = ({ className: t, isConditionFormLayout: e }) => { + var f, g; const [i, n] = L({}), { listCode: r, onKeywordChange: o, onConditionChange: a, getBase62params: s, classNames: l } = E.useContext(ae), { keyword: d, condition: u } = (s == null ? void 0 : s()) || {}, [p] = wt.useForm(); - return V(() => { + return M(() => { r && e && I.get(`/api/_/${r}/list-condition-form-layout`).then(({ resource: y, marginX: w, marginY: C, rowHeight: S, cols: v, fields: k }) => { n({ resource: y, itemMargin: [w, C], rowHeight: S, cols: v, fields: k }); }).catch(() => n({})); - }, [r, e]), V(() => { + }, [r, e]), M(() => { p.setFieldsValue({ keyword: d, ...u }); - }, [JSON.stringify([d, u])]), g("div", { className: O("ff-data-list-filter", l.filter, t), children: g(wt, { form: p, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (y) => a({ [i.resource]: y[i.resource] }, y.keyword) : () => { + }, [JSON.stringify([d, u])]), h("div", { className: O("ff-data-list-filter", l.filter, t), children: h(wt, { form: p, layout: "vertical", autoComplete: "off", onFinish: ((f = i.fields) == null ? void 0 : f.length) > 1 ? (y) => a({ [i.resource]: y[i.resource] }, y.keyword) : () => { }, onValuesChange: (y) => { m.isEmpty(m.omit(y, ["keyword"])) || p.submit(); - }, children: ((h = i.fields) == null ? void 0 : h.length) > 1 ? g(ii, { ...i, children: g(or, { onReset: () => { + }, children: ((g = i.fields) == null ? void 0 : g.length) > 1 ? h(ii, { ...i, children: h(ar, { onReset: () => { const { keyword: y, condition: w } = s("init") || {}; p.setFieldsValue({ keyword: y, ...w }); - } }) }) : g("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: g("div", { className: "grid-layout-item", style: Bi(20, 0, 5, 2), children: g(wt.Item, { name: ["keyword"], children: g(Pn.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (y) => o(y) }) }) }) }) }) }); -}, or = ({ cols: t, fields: e, onReset: i }) => { - const [n, r] = L(!1), o = _(() => e == null ? void 0 : e.toReversed().some((a) => a.y > 1 || a.x + a.w >= t - 5), [t, e]); - return A(wt.Item, { label: " ", style: { "--item-span": 5 }, className: O("ff-data-list-filter-actions", { expanded: n }), children: [g(Ct, { onClick: i, children: "重置" }), g(Ct, { type: "primary", htmlType: "submit", children: "查询" }), o && g(P.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((a) => !a), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); + } }) }) : h("div", { className: "ff-data-list-filter-default-form ff-grid-layout-form", children: h("div", { className: "grid-layout-item", style: Bi(20, 0, 5, 2), children: h(wt.Item, { name: ["keyword"], children: h(Pn.Search, { allowClear: !0, enterButton: "搜索", placeholder: "多关键字 | 分割", onSearch: (y) => o(y) }) }) }) }) }) }); +}, ar = ({ cols: t, fields: e, onReset: i }) => { + const [n, r] = L(!1), o = H(() => e == null ? void 0 : e.toReversed().some((a) => a.y > 1 || a.x + a.w >= t - 5), [t, e]); + return j(wt.Item, { label: " ", style: { "--item-span": 5 }, className: O("ff-data-list-filter-actions", { expanded: n }), children: [h(Ct, { onClick: i, children: "重置" }), h(Ct, { type: "primary", htmlType: "submit", children: "查询" }), o && h(P.Link, { className: "ff-data-list-filter-expanded-button", widget: () => r((a) => !a), type: "primary", name: n ? "关闭" : "展开", icon: n ? "icon-up" : "icon-down", iconPosition: "end" })] }); }; qi.reservedFields = [{ x: 0, y: 0, h: 3, w: 5, field: { isVirtual: !0, widgetPrefix: "@pkg/ff/grid-layout-forms", widget: "Input", code: "keyword", label: "关键字", placeholder: "多关键字 | 分割", extras: { prefix: "icon-search" } } }]; -const ar = ({ className: t, operations: e, isOperations: i, isPaginate: n }) => { +const sr = ({ className: t, operations: e, isOperations: i, isPaginate: n }) => { const { onPageChange: r, onPageSizeChange: o, onClickCallback: a, getBase62params: s } = E.useContext(ae), { total: l, page: d, pageSize: u } = (s == null ? void 0 : s()) || {}; - return i && !m.isEmpty(e) || n ? A("div", { className: O("ff-data-list-footer", t), children: [g("div", { className: "ff-data-list-actions", children: e == null ? void 0 : e.map((p, f) => g(P, { uuid: p.uuid, type: p.type, name: p.name, widget: p.widget, widgetType: p.widgetType, widgetProps: p.widgetProps, widgetData: p.widgetData, widgetSetting: p.widgetSetting, widgetContainerProps: p.widgetContainerSetting, onAfterClick: (h) => h !== !1 && (a == null ? void 0 : a(p.isRefresh, null)) }, p.uuid || f)) }), n && g(Tn, { size: "small", total: l, pageSize: u, showSizeChanger: !1, showTotal: (p) => `第 ${d} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: o })] }) : null; -}, sr = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: g("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], lr = ({ className: t, width: e = 280, isTreeSider: i }) => { + return i && !m.isEmpty(e) || n ? j("div", { className: O("ff-data-list-footer", t), children: [h("div", { className: "ff-data-list-actions", children: e == null ? void 0 : e.map((p, f) => h(P, { uuid: p.uuid, type: p.type, name: p.name, widget: p.widget, widgetType: p.widgetType, widgetProps: p.widgetProps, widgetData: p.widgetData, widgetSetting: p.widgetSetting, widgetContainerProps: p.widgetContainerSetting, onAfterClick: (g) => g !== !1 && (a == null ? void 0 : a(p.isRefresh, null)) }, p.uuid || f)) }), n && h(Tn, { size: "small", total: l, pageSize: u, showSizeChanger: !1, showTotal: (p) => `第 ${d} 页 / 总共 ${p} 条`, onChange: r, onShowSizeChange: o })] }) : null; +}, lr = [{ title: "parent 1", key: "0-0", children: [{ title: "parent 1-0", key: "0-0-0", disabled: !0, children: [{ title: "leaf", key: "0-0-0-0", disableCheckbox: !0 }, { title: "leaf", key: "0-0-0-1" }] }, { title: "parent 1-1", key: "0-0-1", children: [{ title: h("span", { style: { color: "#1677ff" }, children: "sss" }), key: "0-0-1-0" }] }] }], cr = ({ className: t, width: e = 280, isTreeSider: i }) => { const { classNames: n } = pe(ae); - return i ? g(On.DirectoryTree, { className: O("ff-data-list-sider", n.sider, t), style: { "--sider-width": e }, showLine: !0, showIcon: !1, treeData: sr }) : null; -}, cr = ({ className: t, title: e, tabs: i }) => { - const { getBase62params: n, onTabChange: r, onReload: o, classNames: a } = pe(ae), { tab: s } = (n == null ? void 0 : n()) || {}, [l, d] = In((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); - return A("div", { className: O("ff-data-list-toolbar", a.toolbar, t), children: [g("div", { className: "ff-data-list-title", children: e }), g(Rn, { className: "ff-data-list-tabs", itemRender: ({ label: u, code: p, value: f }) => g("span", { onClick: () => d(f ?? p), className: O("ff-data-list-tab", { active: (f ?? p) == l }), children: u }), items: i }), A("div", { className: "ff-data-list-actions", children: [g(P.Link, { icon: "icon-reload", widget: () => o() }), g(P.Link, { icon: "icon-setting" })] })] }); -}, dr = ({ className: t, ...e }) => g(zt, { className: O(t, "ff-data-list-empty"), image: zt.PRESENTED_IMAGE_SIMPLE, ...e }), Ki = ({ isItemGridLayout: t, theme: e, themeProps: i, onClickCallback: n, onReload: r, listCode: o, total: a = 0, page: s = 0, onPageChange: l, pageSize: d = 30, onPageSizeChange: u, tab: p, onTabChange: f, keyword: h, onKeywordChange: y, condition: w, onConditionChange: C, sider: S, onSiderChange: v, layouts: k, classNames: $ = {}, payload: T = {}, dataSource: j = [], rowSelection: F, getSelectedRows: M, primaryKey: D, ...R }) => { - const [W, U] = L(), q = M ?? (() => j), he = Y((z, se) => { - const J = { tab: p, page: s, pageSize: d, keyword: h, sider: S, condition: w, total: a, payload: T }; - return z && z != "init" ? m.get(J, z, se) : J; - }, [JSON.stringify(w), JSON.stringify(T), p, s, d, h, S, a]), oe = _(() => { - let z = { sider: lr, filter: qi, footer: ar, toolbar: cr, empty: dr }; + return i ? h(On.DirectoryTree, { className: O("ff-data-list-sider", n.sider, t), style: { "--sider-width": e }, showLine: !0, showIcon: !1, treeData: lr }) : null; +}, dr = ({ className: t, title: e, tabs: i }) => { + const { getBase62params: n, onTabChange: r, onReload: o, classNames: a } = pe(ae), { tab: s } = (n == null ? void 0 : n()) || {}, [l, d] = Vn((i == null ? void 0 : i[0].value) ?? (i == null ? void 0 : i[0].code), { value: s, onChange: r }); + return j("div", { className: O("ff-data-list-toolbar", a.toolbar, t), children: [h("div", { className: "ff-data-list-title", children: e }), h(Rn, { className: "ff-data-list-tabs", itemRender: ({ label: u, code: p, value: f }) => h("span", { onClick: () => d(f ?? p), className: O("ff-data-list-tab", { active: (f ?? p) == l }), children: u }), items: i }), j("div", { className: "ff-data-list-actions", children: [h(P.Link, { icon: "icon-reload", widget: () => o() }), h(P.Link, { icon: "icon-setting" })] })] }); +}, ur = ({ className: t, ...e }) => h(zt, { className: O(t, "ff-data-list-empty"), image: zt.PRESENTED_IMAGE_SIMPLE, ...e }), Ki = ({ isItemGridLayout: t, theme: e, themeProps: i, onClickCallback: n, onReload: r, listCode: o, total: a = 0, page: s = 0, onPageChange: l, pageSize: d = 30, onPageSizeChange: u, tab: p, onTabChange: f, keyword: g, onKeywordChange: y, condition: w, onConditionChange: C, sider: S, onSiderChange: v, layouts: k, classNames: $ = {}, payload: T = {}, dataSource: A = [], rowSelection: F, getSelectedRows: V, primaryKey: D, ...R }) => { + const [W, U] = L(), q = V ?? (() => A), ge = Y((z, se) => { + const _ = { tab: p, page: s, pageSize: d, keyword: g, sider: S, condition: w, total: a, payload: T }; + return z && z != "init" ? m.get(_, z, se) : _; + }, [JSON.stringify(w), JSON.stringify(T), p, s, d, g, S, a]), oe = H(() => { + let z = { sider: cr, filter: qi, footer: sr, toolbar: dr, empty: ur }; k === !1 ? z = { sider: null, filter: null, footer: null, toolbar: null, empty: null } : m.isPlainObject(k) && (z = Object.assign({}, z, k)); for (const se in z) if (z[se]) { if (kn(z[se])) { - const J = z[se]; - z[se] = (Rt) => E.cloneElement(J, Rt); + const _ = z[se]; + z[se] = (Rt) => E.cloneElement(_, Rt); } - } else z[se] = () => g(E.Fragment, {}); + } else z[se] = () => h(E.Fragment, {}); return z; }, [k]); - return V(() => { + return M(() => { e ? ue.getWidgetComponent(e).then((z) => { if (!z) throw `${e} not found`; return z; - }).catch((z) => ({ default: () => `${z}` })).then((z) => U(E.createElement(z.default, { ...R, layouts: oe, $setting: i }))) : U(g(t ? ir : rr, { ...R, layouts: oe, $setting: i })); - }, [e, i]), g(ae.Provider, { value: { classNames: $, listCode: o, onClickCallback: n, onReload: r, getBase62params: he, onPageChange: l, onPageSizeChange: u, onTabChange: f, onSiderChange: v, onKeywordChange: y, onConditionChange: C, setPage: l, setPageSize: u, setTab: f, setSider: v, setKeyword: y, setCondition: C, getSelectedRows: q }, children: W && E.cloneElement(W, { dataSource: j, primaryKey: D, rowSelection: F, ...R }) }); + }).catch((z) => ({ default: () => `${z}` })).then((z) => U(E.createElement(z.default, { ...R, layouts: oe, $setting: i }))) : U(h(t ? nr : or, { ...R, layouts: oe, $setting: i })); + }, [e, i]), h(ae.Provider, { value: { classNames: $, listCode: o, onClickCallback: n, onReload: r, getBase62params: ge, onPageChange: l, onPageSizeChange: u, onTabChange: f, onSiderChange: v, onKeywordChange: y, onConditionChange: C, setPage: l, setPageSize: u, setTab: f, setSider: v, setKeyword: y, setCondition: C, getSelectedRows: q }, children: W && E.cloneElement(W, { dataSource: A, primaryKey: D, rowSelection: F, ...R }) }); }; Ki.propTypes = { classNames: b.exact({ sider: b.string, filter: b.string, footer: b.string, toolbar: b.string, container: b.string, content: b.string, item: b.string, empty: b.string }), layouts: b.oneOfType([b.exact({ sider: b.oneOfType([b.elementType, b.element]), filter: b.oneOfType([b.elementType, b.element]), footer: b.oneOfType([b.elementType, b.element]), toolbar: b.oneOfType([b.elementType, b.element]), empty: b.oneOfType([b.elementType, b.element]) }), b.bool]) }; var Oe, $e, We, xt; @@ -447,29 +448,29 @@ const ye = class ye { }; Oe = new WeakMap(), $e = new WeakMap(), We = new WeakMap(), xt = new WeakMap(), x(ye, Oe, null), N(ye, "getInstance", () => (c(ye, Oe) || B(ye, Oe, new ye()), c(ye, Oe))); let Kt = ye; -const _i = Kt.getInstance(), ei = E.forwardRef(({ listCode: t, base62params: e, className: i, theme: n, themeProps: r, layouts: o, classNames: a, onSelectionChange: s, defaultSelectedRowKeys: l, selectedRowKeys: d, onDataSourceChange: u }, p) => { - const [{ resource: f, primaryKey: h, batchOperations: y = [], itemOperations: w = [], columns: C = [], themeConfig: S, theme: v, isConditionFormLayout: k = !1, isTreeSider: $, treeSiderConfig: T, isItemGridLayout: j, itemGridLayout: { themeConfig: F, ...M } = {}, title: D, isPaginate: R, tabs: W, selectionType: U }, q] = L({ isItemGridLayout: !1, itemGridLayout: {} }), he = tr(t, e), [{ dataSource: oe, itemOperationsAccess: z, condition: se, tab: J, keyword: Rt, page: ai, total: si, pageSize: li, sider: rn, onConditionChange: on, onTabChange: an, onKeywordChange: sn, onPageChange: ln, onPageSizeChange: cn, onSiderChange: dn, onReload: Ft, payload: un }, ci] = er(he, t, h, f), pn = $n(u); - V(() => { +const Hi = Kt.getInstance(), ei = E.forwardRef(({ listCode: t, base62params: e, className: i, theme: n, themeProps: r, layouts: o, classNames: a, onSelectionChange: s, defaultSelectedRowKeys: l, selectedRowKeys: d, onDataSourceChange: u }, p) => { + const [{ resource: f, primaryKey: g, batchOperations: y = [], itemOperations: w = [], columns: C = [], themeConfig: S, theme: v, isConditionFormLayout: k = !1, isTreeSider: $, treeSiderConfig: T, isItemGridLayout: A, itemGridLayout: { themeConfig: F, ...V } = {}, title: D, isPaginate: R, tabs: W, selectionType: U }, q] = L({ isItemGridLayout: !1, itemGridLayout: {} }), ge = ir(t, e), [{ dataSource: oe, itemOperationsAccess: z, condition: se, tab: _, keyword: Rt, page: ai, total: si, pageSize: li, sider: rn, onConditionChange: on, onTabChange: an, onKeywordChange: sn, onPageChange: ln, onPageSizeChange: cn, onSiderChange: dn, onReload: Ft, payload: un }, ci] = tr(ge, t, g, f), pn = $n(u); + In(() => { pn(oe, { page: ai, pageSize: li, total: si }); }, [oe]); - const [hn, gn] = Ln([], { defaultValue: l ?? [], value: d }), [di, mn] = L([]), ui = Y(() => U ? di : oe, [U, di, oe]), fn = qt(w, z, oe, h), yn = qt(y); - V(() => { + const [gn, hn] = Ln([], { defaultValue: l ?? [], value: d }), [di, mn] = L([]), ui = Y(() => U ? di : oe, [U, di, oe]), fn = qt(w, z, oe, g), yn = qt(y); + M(() => { let X = null; - return t && I.get(`/api/_/${t}`).resp(({ data: Ve, res: jt }) => { - Ve != null && Ve.isDynamicRefresh && (X = _i.subscribe(() => Ft(), jt)), q(Ve); + return t && I.get(`/api/_/${t}`).resp(({ data: Ve, res: At }) => { + Ve != null && Ve.isDynamicRefresh && (X = Hi.subscribe(() => Ft(), At)), q(Ve); }).catch(() => q({})), () => X == null ? void 0 : X(); }, [t]), E.useImperativeHandle(p, () => ({ onReload: Ft, onClickCallback: ci, getSelectedRows: ui })); - const wn = { listCode: t, title: D, classNames: a, layouts: o, resource: f, primaryKey: h, theme: n || v, themeProps: r || S, isTreeSider: $, treeSiderConfig: T, isPaginate: R, rowSelection: U ? { type: U, columnWidth: 80, selectedRowKeys: hn, onChange: (X, Ve) => { - mn((jt) => { - const pi = new Map(jt.map((le) => [le == null ? void 0 : le[h], le])); - return Ve.forEach((le) => pi.set(le == null ? void 0 : le[h], le)), X.map((le) => pi.get(le)).filter(Boolean); - }), gn(X), s == null || s(X, Ve); - } } : void 0, getSelectedRows: ui, tabs: W, isItemOperations: fn, itemOperations: w == null ? void 0 : w.map((X) => m.isEmpty(X == null ? void 0 : X.confirm) ? X : { ...X, confirm: Object.assign({}, X.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: yn, batchOperations: y, isItemGridLayout: j, columns: C, itemGridLayout: { ...M, themeProps: F }, isConditionFormLayout: k, itemOperationsAccess: z, dataSource: oe, onConditionChange: on, onTabChange: an, onKeywordChange: sn, onPageChange: ln, onPageSizeChange: cn, onSiderChange: dn, condition: se, tab: J, keyword: Rt, page: ai, total: si, pageSize: li, sider: rn, payload: un }; - return g(Ki, { ...wn, className: O("ff-data-list-helper", i), onReload: Ft, onClickCallback: ci }); -}), Hi = (t, e, i = !0) => i !== !0 && i-- <= 0 ? [] : m.isArray(t) && !m.isEmpty(t) ? t.reduce((n, r) => (Reflect.has(r, e) && Reflect.has(r, "children") && n.push(r[e]), Reflect.has(r, "children") && !m.isEmpty(r.children) ? n.concat(Hi(r.children, e, i)) : n), []) : [], ur = ({ className: t, primaryKey: e, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: o = 180, components: a = {}, rowSelection: s, ...l }) => { - const { classNames: d } = pe(ae), u = H(null), p = H(null), [f, h] = L([]), [y, w] = L({ width: 0, height: 0 }); - V(() => { - h(Hi(n, e)); + const wn = { listCode: t, title: D, classNames: a, layouts: o, resource: f, primaryKey: g, theme: n || v, themeProps: r || S, isTreeSider: $, treeSiderConfig: T, isPaginate: R, rowSelection: U ? { type: U, columnWidth: 80, selectedRowKeys: gn, onChange: (X, Ve) => { + mn((At) => { + const pi = new Map(At.map((le) => [le == null ? void 0 : le[g], le])); + return Ve.forEach((le) => pi.set(le == null ? void 0 : le[g], le)), X.map((le) => pi.get(le)).filter(Boolean); + }), hn(X), s == null || s(X, Ve); + } } : void 0, getSelectedRows: ui, tabs: W, isItemOperations: fn, itemOperations: w == null ? void 0 : w.map((X) => m.isEmpty(X == null ? void 0 : X.confirm) ? X : { ...X, confirm: Object.assign({}, X.confirm, { getPopupContainer: () => document.body }) }), isBatchOperations: yn, batchOperations: y, isItemGridLayout: A, columns: C, itemGridLayout: { ...V, themeProps: F }, isConditionFormLayout: k, itemOperationsAccess: z, dataSource: oe, onConditionChange: on, onTabChange: an, onKeywordChange: sn, onPageChange: ln, onPageSizeChange: cn, onSiderChange: dn, condition: se, tab: _, keyword: Rt, page: ai, total: si, pageSize: li, sider: rn, payload: un }; + return h(Ki, { ...wn, className: O("ff-data-list-helper", i), onReload: Ft, onClickCallback: ci }); +}), Ji = (t, e, i = !0) => i !== !0 && i-- <= 0 ? [] : m.isArray(t) && !m.isEmpty(t) ? t.reduce((n, r) => (Reflect.has(r, e) && Reflect.has(r, "children") && n.push(r[e]), Reflect.has(r, "children") && !m.isEmpty(r.children) ? n.concat(Ji(r.children, e, i)) : n), []) : [], pr = ({ className: t, primaryKey: e, columns: i = [], dataSource: n = [], operationRender: r, operationWidth: o = 180, components: a = {}, rowSelection: s, ...l }) => { + const { classNames: d } = pe(ae), u = J(null), p = J(null), [f, g] = L([]), [y, w] = L({ width: 0, height: 0 }); + M(() => { + g(Ji(n, e)); }, [n, e]), Sn(() => { const k = new ResizeObserver(() => { var $; @@ -479,101 +480,101 @@ const _i = Kt.getInstance(), ei = E.forwardRef(({ listCode: t, base62params: e, p.current && k.unobserve(p.current); }; }, []); - const C = _(() => { + const C = H(() => { if (!(y != null && y.width) || !(i != null && i.length)) return i; - const k = (s ? s.columnWidth ?? 32 : 0) + (r ? o : 0), $ = i.reduce((F, M) => F + (M.isWidthFixed && M.width ? M.width : 0), 0), T = i.filter((F) => !F.isWidthFixed).reduce((F, M) => F + (M.width ?? 100), 0); + const k = (s ? s.columnWidth ?? 32 : 0) + (r ? o : 0), $ = i.reduce((F, V) => F + (V.isWidthFixed && V.width ? V.width : 0), 0), T = i.filter((F) => !F.isWidthFixed).reduce((F, V) => F + (V.width ?? 100), 0); if ($ + T + k >= y.width) return i; - const j = y.width - $ - k; - return i.map((F) => F.isWidthFixed ? F : { ...F, width: Math.floor(j * (F.width ?? 100) / T) }); - }, [i, y.width, s, r, o]), S = Qn(C), v = Zn(a); - return g("div", { ref: p, className: O("ff-data-list-table", d.content, t), children: y.height ? g(yi, { bordered: !0, ...l, components: v, ref: u, rowKey: (k) => (k == null ? void 0 : k[e]) ?? Math.random(), rowSelection: s, columns: (() => { + const A = y.width - $ - k; + return i.map((F) => F.isWidthFixed ? F : { ...F, width: Math.floor(A * (F.width ?? 100) / T) }); + }, [i, y.width, s, r, o]), S = Zn(C), v = er(a); + return h("div", { ref: p, className: O("ff-data-list-table", d.content, t), children: y.height ? h(yi, { bordered: !0, ...l, components: v, ref: u, rowKey: (k) => (k == null ? void 0 : k[e]) ?? Math.random(), rowSelection: s, columns: (() => { var $, T; const k = [...S ?? []]; - return s && k.splice((T = ($ = k[0]) == null ? void 0 : $.key) != null && T.startsWith("__") ? 1 : 0, 0, yi.SELECTION_COLUMN), r && k.push({ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(o / y.width * 100).toFixed(2)}%`, render: (j, F, M) => r(F, M) }), k; - })(), dataSource: n, size: "middle", scroll: { x: "max-content", y: y.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: h, expandedRowKeys: f } }) : null }); -}, pr = "RC_FORM_INTERNAL_HOOKS", hr = (t) => { + return s && k.splice((T = ($ = k[0]) == null ? void 0 : $.key) != null && T.startsWith("__") ? 1 : 0, 0, yi.SELECTION_COLUMN), r && k.push({ title: "操作", align: "center", fixed: "right", width: `${Math.ceil(o / y.width * 100).toFixed(2)}%`, render: (A, F, V) => r(F, V) }), k; + })(), dataSource: n, size: "middle", scroll: { x: "max-content", y: y.height - 50 }, pagination: !1, expandable: { defaultExpandAllRows: !0, expandRowByClick: !0, onExpandedRowsChange: g, expandedRowKeys: f } }) : null }); +}, gr = "RC_FORM_INTERNAL_HOOKS", hr = (t) => { const [e, i] = E.useState({ items: [] }); - return V(() => { - t && I.get(`/api/_/${t}`).then(({ uuid: n, code: r, name: o, resource: a, primaryKey: s, marginX: l, marginY: d, cols: u, rowHeight: p, fields: f, theme: h, themeSetting: y, groups: w }) => ({ uuid: n, code: r, name: o, resource: a, primaryKey: s, marginX: l, marginY: d, cols: u, rowHeight: p, theme: h, themeProps: y, groups: w, items: f })).then(i); + return M(() => { + t && I.get(`/api/_/${t}`).then(({ uuid: n, code: r, name: o, resource: a, primaryKey: s, marginX: l, marginY: d, cols: u, rowHeight: p, fields: f, theme: g, themeSetting: y, groups: w }) => ({ uuid: n, code: r, name: o, resource: a, primaryKey: s, marginX: l, marginY: d, cols: u, rowHeight: p, theme: g, themeProps: y, groups: w, items: f })).then(i); }, [t]), e; -}, gr = (t, { initialValue: e, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: o = "string" }, a = null) => { - const s = H(!1), l = pe(Oi), [d, u] = L(), [p, f] = L(i != "javascript" && t ? l.getFieldValue(t) : void 0), { registerWatch: h } = l.getInternalHooks(pr) || {}; - return V(() => h == null ? void 0 : h((y, w, C) => { +}, mr = (t, { initialValue: e, initialValueLanguage: i, convertJs: n, convertJsSetting: r, type: o = "string" }, a = null) => { + const s = J(!1), l = pe(Oi), [d, u] = L(), [p, f] = L(i != "javascript" && t ? l.getFieldValue(t) : void 0), { registerWatch: g } = l.getInternalHooks(gr) || {}; + return M(() => g == null ? void 0 : g((y, w, C) => { if (!s.current) return; const S = m.get(w, t); m.isEqual(S, p) || f(de(S, o)); - }), [p]), V(() => { + }), [p]), M(() => { i == "javascript" && e ? Ie.exec(e, {}, { getFieldValueForBasicForm: (y) => a ? a.getFieldValue(y) : l.getFieldValue(y), getFieldValue: (y) => l.getFieldValue(y) }).then((y) => f(de(y, o))).catch((y) => notification.error({ message: `布局数据错误: ${JSON.stringify(y)}` })).finally(() => s.current = !0) : (e && f(de(e ?? l.getFieldValue(t), o)), s.current = !0); - }, [e, i]), gt(() => { + }, [e, i]), ht(() => { s.current && n && new kt([n, r]).toValue(p, l.getFieldsValue(!0)).then(u).catch((y) => { u(y), console.error("布局数据转换错误: ", y, n); }); }, [p, n, r]), [d ?? p, p]; -}, Eo = (t, e, i = null) => _(() => Zt(t, e, i), [t]), Ji = (t, e, i = {}, n = {}, r = {}, o = null) => { - const a = pe(Oi), s = Tt(), l = H(!0), d = H([]), [u, p] = L(e), [f, h] = L(), y = re.useWatch((w) => JSON.stringify(m.pick(w, d.current)), a) || "{}"; +}, vo = (t, e, i = null) => H(() => Zt(t, e, i), [t]), _i = (t, e, i = {}, n = {}, r = {}, o = null) => { + const a = pe(Oi), s = Tt(), l = J(!0), d = J([]), [u, p] = L(e), [f, g] = L(), y = re.useWatch((w) => JSON.stringify(m.pick(w, d.current)), a) || "{}"; return mt(() => { t && Ie.exec(t, i, { ...n, getFieldValueForBasicForm: (w) => r ? r.getFieldValue(w) : null, getFieldValue: m.wrap(a.getFieldValue, (w, C) => (d.current.some((S) => m.isEqual(S, C)) || (d.current.push(C), s()), w == null ? void 0 : w(C))), isFieldTouched: a.isFieldTouched, isFieldsTouched: a.isFieldsTouched }).then((w) => { - l.current && (p(w), h(null)); + l.current && (p(w), g(null)); }).catch((w) => { - l.current && (p(e), h(w)); + l.current && (p(e), g(w)); }); - }, [t, y, a, i, n]), V(() => () => l.current = !1, []), t ? [o ? de(u, o) : u, f] : [o ? de(e, o) : e, null]; -}, mr = ({ widget: t, widgetPrefix: e = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => { + }, [t, y, a, i, n]), M(() => () => l.current = !1, []), t ? [o ? de(u, o) : u, f] : [o ? de(e, o) : e, null]; +}, fr = ({ widget: t, widgetPrefix: e = "@pkg/ff/grid-layouts", basicForm: i, ...n }) => { const r = t != null && t.startsWith("@") || t != null && t.startsWith("blob:") ? t : `${e}/${t}`, [o, a] = L(); - return V(() => { - r && ue.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: fr(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => a(E.createElement(s.default, n))); + return M(() => { + r && ue.getWidgetComponent(r).then(({ defaultProps: s = {}, default: l }) => ({ default: yr(l, s, i) })).catch((s) => ({ default: () => `${s}` })).then((s) => a(E.createElement(s.default, n))); }, [r]), o; -}, fr = (t, e = {}, i = null) => (n) => { - const { code: r, label: o, extras: a, isVirtual: s, initialValue: l, initialValueLanguage: d, convertJs: u, convertJsSetting: p, value: f, ...h } = m.merge({}, e, n), [y, w] = gr(s ? null : r, { initialValue: l, initialValueLanguage: d, convertJs: u, convertJsSetting: p, type: (h == null ? void 0 : h.type) || "string" }, i), C = _(() => { +}, yr = (t, e = {}, i = null) => (n) => { + const { code: r, label: o, extras: a, isVirtual: s, initialValue: l, initialValueLanguage: d, convertJs: u, convertJsSetting: p, value: f, ...g } = m.merge({}, e, n), [y, w] = mr(s ? null : r, { initialValue: l, initialValueLanguage: d, convertJs: u, convertJsSetting: p, type: (g == null ? void 0 : g.type) || "string" }, i), C = H(() => { const k = Object.keys((e == null ? void 0 : e.extras) || {}); return m.over([m.partialRight(m.pick, k), m.partialRight(m.omit, k)]); - }, [e == null ? void 0 : e.extras]), [S, v] = C(h); - return g(t, { ...v, value: y, rawValue: w, $setting: Object.assign({}, a, S) }); + }, [e == null ? void 0 : e.extras]), [S, v] = C(g); + return h(t, { ...v, value: y, rawValue: w, $setting: Object.assign({}, a, S) }); }, Gi = ({ theme: t, basicForm: e, items: i = [{ key: "default", label: "默认" }], fields: n = [], itemRender: r, chunks: o = [], children: a, $setting: s = {}, ...l }) => { const [d, u] = L(); - V(() => { + M(() => { t ? ue.getWidgetComponent(t).then((f) => { if (!(f != null && f.default)) throw "not found"; return f; }).catch((f) => ({ default: () => `${t} ${f}` })).then((f) => u(E.createElement(f.default, {}))) : u(null); }, [t]); - const p = _(() => i == null ? void 0 : i.map((f) => ({ ...f, children: r(f, n == null ? void 0 : n.filter((h) => !(h != null && h.group) && f.key == "default" || h.group == f.key), f.key == "default" ? a : null) })).concat(o), [i, a, o]); + const p = H(() => i == null ? void 0 : i.map((f) => ({ ...f, children: r(f, n == null ? void 0 : n.filter((g) => !(g != null && g.group) && f.key == "default" || g.group == f.key), f.key == "default" ? a : null) })).concat(o), [i, a, o]); return d && E.cloneElement(d, { items: p, basicForm: e, $setting: { ...s, ...l } }); -}, Yi = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: o = 12, rowHeight: a = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: d = {}, formFields: u = [], fields: p = [], data: f, theme: h, themeProps: y = {}, groups: w = [{ key: "default", label: "默认" }], children: C, ...S }) => { - const [v] = re.useForm(e), k = _(() => [{ name: "__PROPS__", value: d }].concat(u), [d, u]); - gt(() => (v.setFieldsValue(f), () => v.resetFields()), [f]); - const $ = (T, j, F) => { - const M = Zt(j, mr, i), D = Ui(S); - return A("div", { ...D, className: O("ff-grid-layout", r), style: { ...n, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": o, "--grid-layout-row-height": `${a}px` }, children: [M, F && E.cloneElement(F, { cols: o, rowHeight: a, itemMargin: l, containerPadding: s, fields: j, basicForm: i })] }); +}, Yi = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: o = 12, rowHeight: a = 21, containerPadding: s = [0, 0], itemMargin: l = [4, 0], formProps: d = {}, formFields: u = [], fields: p = [], data: f, theme: g, themeProps: y = {}, groups: w = [{ key: "default", label: "默认" }], children: C, ...S }) => { + const [v] = re.useForm(e), k = H(() => [{ name: "__PROPS__", value: d }].concat(u), [d, u]); + ht(() => (v.setFieldsValue(f), () => v.resetFields()), [f]); + const $ = (T, A, F) => { + const V = Zt(A, fr, i), D = Ui(S); + return j("div", { ...D, className: O("ff-grid-layout", r), style: { ...n, "--grid-layout-item-margin-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-item-margin-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-container-padding-y": `${(s == null ? void 0 : s[0]) || 0}px`, "--grid-layout-container-padding-x": `${(s == null ? void 0 : s[1]) || 0}px`, "--grid-layout-cols": o, "--grid-layout-row-height": `${a}px` }, children: [V, F && E.cloneElement(F, { cols: o, rowHeight: a, itemMargin: l, containerPadding: s, fields: A, basicForm: i })] }); }; - return g(re, { ...S, fields: k, form: v, component: !1, children: h ? g(Gi, { ...y, items: w, theme: h, itemRender: $, fields: p, children: C, basicForm: i }) : $(0, p, C) }); -}, $o = /* @__PURE__ */ ((t) => function({ code: e, data: i, ...n }) { - const { uuid: r, resource: o, items: a, hides: s, rowHeight: l, marginX: d, marginY: u, cols: p, theme: f, themeProps: h, groups: y } = hr(e) || {}, w = _(() => [{ name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: r }], [e, r, o]); - return o && g(t, { name: e, theme: f, themeProps: h, groups: y, ...n, fields: a, formFields: w, rowHeight: l, cols: p, itemMargin: [d, u], data: o ? { [o]: i } : i }); -})(Yi), yr = ({ column: t = 0, colWidth: e = 0, cols: i, rowHeight: n, itemMargin: r, fields: o, primaryKey: a, dataSource: s, beforeRender: l = null, afterRender: d = null, itemClassName: u, itemRender: p = (v, k, $) => v, empty: f = g(zt, { description: null }), className: h, style: y = {}, theme: w, themeProps: C = {}, groups: S = [{ key: "default", label: "默认" }] }) => { - const { classNames: v } = pe(ae), k = _(() => g(Yi, { groups: S, theme: w, themeProps: C, cols: i, rowHeight: n, itemMargin: r, fields: o, className: u }), [o, i, n, r, S, w, C]), $ = m.isEmpty(s); - return A("div", { className: O("ff-data-list-content", v.content, h), style: Object.assign({}, y, t && { "--col-num": t }, e && { "--col-width": e }), children: [l == null ? void 0 : l(s), $ ? f : s.map((T, j) => { - const F = p(E.cloneElement(k, { data: T }), T, j); - return E.cloneElement(F, { key: `${(T == null ? void 0 : T[a]) ?? j}-${Hn(T)}` }); + return h(re, { ...S, fields: k, form: v, component: !1, children: g ? h(Gi, { ...y, items: w, theme: g, itemRender: $, fields: p, children: C, basicForm: i }) : $(0, p, C) }); +}, xo = /* @__PURE__ */ ((t) => function({ code: e, data: i, ...n }) { + const { uuid: r, resource: o, items: a, hides: s, rowHeight: l, marginX: d, marginY: u, cols: p, theme: f, themeProps: g, groups: y } = hr(e) || {}, w = H(() => [{ name: "__RESOURCE__", value: o }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: r }], [e, r, o]); + return o && h(t, { name: e, theme: f, themeProps: g, groups: y, ...n, fields: a, formFields: w, rowHeight: l, cols: p, itemMargin: [d, u], data: o ? { [o]: i } : i }); +})(Yi), wr = ({ column: t = 0, colWidth: e = 0, cols: i, rowHeight: n, itemMargin: r, fields: o, primaryKey: a, dataSource: s, beforeRender: l = null, afterRender: d = null, itemClassName: u, itemRender: p = (v, k, $) => v, empty: f = h(zt, { description: null }), className: g, style: y = {}, theme: w, themeProps: C = {}, groups: S = [{ key: "default", label: "默认" }] }) => { + const { classNames: v } = pe(ae), k = H(() => h(Yi, { groups: S, theme: w, themeProps: C, cols: i, rowHeight: n, itemMargin: r, fields: o, className: u }), [o, i, n, r, S, w, C]), $ = m.isEmpty(s); + return j("div", { className: O("ff-data-list-content", v.content, g), style: Object.assign({}, y, t && { "--col-num": t }, e && { "--col-width": e }), children: [l == null ? void 0 : l(s), $ ? f : s.map((T, A) => { + const F = p(E.cloneElement(k, { data: T }), T, A); + return E.cloneElement(F, { key: `${(T == null ? void 0 : T[a]) ?? A}-${_n(T)}` }); }), d == null ? void 0 : d(s)] }); -}, wr = ({ component: t, $props: e }) => { - const { base62params: i } = ht(e, {}); - return g(ee, { children: g(ei, { listCode: t, base62params: I.decode(i) }) }); -}, vo = () => g(Xi, {}), Xi = () => "Empty", br = ({ component: t, $setting: e, $props: i }) => { +}, br = ({ component: t, $props: e }) => { + const { base62params: i } = gt(e, {}); + return h(ee, { children: h(ei, { listCode: t, base62params: I.decode(i) }) }); +}, No = () => h(Xi, {}), Xi = () => "Empty", Cr = ({ component: t, $setting: e, $props: i }) => { const [n, r] = L(); - V(() => { - if (!t) return r(g(Xi, { description: null })); + M(() => { + if (!t) return r(h(Xi, { description: null })); ue.getWidgetComponent(t).catch((a) => ({ default: () => `${a}` })).then((a) => E.createElement(a.default, { $setting: e })).then(r); }, [t]); - const o = ht(i, {}); + const o = gt(i, {}); return n ? E.cloneElement(n, o) : null; -}, xo = () => "NotFoundPage"; -var Re, ce, Fe, je, ot, at; +}, Po = () => "NotFoundPage"; +var Re, ce, Fe, Ae, ot, at; const we = class we { constructor() { x(this, ce, /* @__PURE__ */ new Map()); x(this, Fe, {}); - x(this, je, null); + x(this, Ae, null); N(this, "init", (e, i) => { B(this, ce, e), B(this, Fe, i); }); @@ -581,10 +582,10 @@ const we = class we { N(this, "redirect", (e, i, n = {}) => { const { uri: r, type: o, widgetProps: a } = this.get(e) || {}, { router: s, query: l, ...d } = i || {}, u = Object.assign({}, d, s), p = Object.assign({}, d, l); o == "list" && (u.base62params = I.encode(u != null && u.base62params ? u.base62params : u)); - let f = Vn(r || e, u); - const h = new URLSearchParams(); - for (const y in a || {}) (a == null ? void 0 : a.type) == "query" && Object.has(p, y) && h.append(y, JSON.stringify(p[y])); - return h.size > 0 && (f = `${f}?${h.toString()}`), n != null && n.isOpenWindow ? window.open(f) : c(this, je).navigate(f, { replace: !!(n != null && n.isReplaceRouteHistory) }); + let f = Mn(r || e, u); + const g = new URLSearchParams(); + for (const y in a || {}) (a == null ? void 0 : a.type) == "query" && Object.has(p, y) && g.append(y, JSON.stringify(p[y])); + return g.size > 0 && (f = `${f}?${g.toString()}`), n != null && n.isOpenWindow ? window.open(f) : c(this, Ae).navigate(f, { replace: !!(n != null && n.isReplaceRouteHistory) }); }); N(this, "getMenus", (e) => { var i; @@ -618,7 +619,7 @@ const we = class we { }); N(this, "getCurrentRoute", (e = 0) => { var n; - const i = (n = c(this, je).state.matches[c(this, je).state.matches.length - 1 - e]) == null ? void 0 : n.route; + const i = (n = c(this, Ae).state.matches[c(this, Ae).state.matches.length - 1 - e]) == null ? void 0 : n.route; if (!i) return null; for (let [r, o] of c(this, ce)) if (o.uri === i.path) return o; return null; @@ -626,9 +627,9 @@ const we = class we { N(this, "getPageParams", (e) => { var r, o, a; let i = "", n = {}; - if (Fi()) n = Mn(), i = (r = Dn()) == null ? void 0 : r.search; + if (Fi()) n = Dn(), i = (r = zn()) == null ? void 0 : r.search; else { - const { location: s = {}, matches: l = [] } = ((o = c(this, je)) == null ? void 0 : o.state) || {}; + const { location: s = {}, matches: l = [] } = ((o = c(this, Ae)) == null ? void 0 : o.state) || {}; n = ((a = l[l.length - 1]) == null ? void 0 : a.params) || {}, i = s.search; } return i && new URLSearchParams(i).forEach((s, l) => { @@ -637,16 +638,16 @@ const we = class we { }); N(this, "createBrowserRouter", (e = {}) => { if (c(this, ce).size == 0) return null; - const i = Ue.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ue.get(ue.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, o = (s, l) => () => Promise.all([ue.getWidgetComponent(s), ht(l)]).then(([d, u]) => [d.default || function() { + const i = Ue.get("Common.WEBSITE_DEFAULT_THEME", "@pkg/ff/frameworks/DefaultTheme"), n = Ue.get(ue.checkUserToken() ? "Common.WEBSITE_LOGIN_REDIRECT" : "Common.WEBSITE_DEFAULT", "/index"), r = { [i]: 0 }, o = (s, l) => () => Promise.all([ue.getWidgetComponent(s), gt(l)]).then(([d, u]) => [d.default || function() { return `${s}`; - }, u]).then(([d, u]) => ({ Component: () => E.createElement(Ai, {}, E.createElement(d, { $setting: u })) })), a = Array.from(c(this, ce).values()).reduce((s, { uuid: l, uri: d, name: u, type: p, component: f, widgetSetting: h, widgetProps: y, isLogin: w, isLayout: C, extra: S }) => { + }, u]).then(([d, u]) => ({ Component: () => E.createElement(ji, {}, E.createElement(d, { $setting: u })) })), a = Array.from(c(this, ce).values()).reduce((s, { uuid: l, uri: d, name: u, type: p, component: f, widgetSetting: g, widgetProps: y, isLogin: w, isLayout: C, extra: S }) => { let v = {}, k = 0; switch (p) { case "list": - v.element = E.createElement(wr, { component: f, $props: y }); + v.element = E.createElement(br, { component: f, $props: y }); break; case "fsdpf-component": - v.element = E.createElement(br, { key: f, component: f, $setting: h, $props: y }); + v.element = E.createElement(Cr, { key: f, component: f, $setting: g, $props: y }); } const $ = (S == null ? void 0 : S.theme) ?? (S == null ? void 0 : S.layout); if ($) { @@ -656,30 +657,30 @@ const we = class we { } return C && k > -1 ? (s[k].children.push({ path: d, ...v }), s) : [...s, { path: d, ...v }]; }, [{ path: "/", lazy: o(i, {}), children: [] }]); - return a.push({ index: !0, element: E.createElement(Cr, { to: n, replace: !0 }) }), B(this, je, zn(a, e)); + return a.push({ index: !0, element: E.createElement(kr, { to: n, replace: !0 }) }), B(this, Ae, Wn(a, e)); }); if (c(we, Re)) return c(we, Re); } }; -Re = new WeakMap(), ce = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), x(we, Re, null), N(we, "getInstance", () => (c(we, Re) || B(we, Re, new we()), c(we, Re))); -let _t = we; -const Cr = ({ to: t, replace: e }) => Fi() ? E.createElement(Wn, { to: t, replace: e }) : (window.document.location = t, "redirect"), Ne = _t.getInstance(), qe = new Worker(new URL("/ff-worker/index.js", self.location)), Si = { getConfigure: (t) => Ue.get(t), route: { redirect: (...t) => Ne.redirect(...t), getPageParams: (...t) => Ne.getPageParams(...t), getCurrentRoute: () => Ne.getCurrentRoute() }, popup: { notification: (...t) => ne.notification(...t), success: (...t) => ne.success(...t), error: (...t) => ne.error(...t), form: (...t) => ne.form(...t), modal: (...t) => ne.modal(...t), confirm: (...t) => ne.confirm(...t) } }; -var Nt, Je, Ae; +Re = new WeakMap(), ce = new WeakMap(), Fe = new WeakMap(), Ae = new WeakMap(), ot = new WeakMap(), at = new WeakMap(), x(we, Re, null), N(we, "getInstance", () => (c(we, Re) || B(we, Re, new we()), c(we, Re))); +let Ht = we; +const kr = ({ to: t, replace: e }) => Fi() ? E.createElement(Bn, { to: t, replace: e }) : (window.document.location = t, "redirect"), Ne = Ht.getInstance(), qe = new Worker(new URL("/ff-worker/index.js", self.location)), Si = { getConfigure: (t) => Ue.get(t), route: { redirect: (...t) => Ne.redirect(...t), getPageParams: (...t) => Ne.getPageParams(...t), getCurrentRoute: () => Ne.getCurrentRoute() }, popup: { notification: (...t) => ne.notification(...t), success: (...t) => ne.success(...t), error: (...t) => ne.error(...t), form: (...t) => ne.form(...t), modal: (...t) => ne.modal(...t), confirm: (...t) => ne.confirm(...t) } }; +var Nt, _e, je; const K = class K { constructor() { N(this, "exec", (e, i = {}, n = {}, r = "") => new Promise((o, a) => { if (!/^(?!\s*(\/\/|\/\*|\*)).*?\S+/m.test(e)) return o(); const s = mi(K, Nt)._++; - c(K, Je).set(s, n), K.mQueue.set(s, [o, a]), qe.postMessage({ id: s, session: r, category: "eval", method: e, args: i }); + c(K, _e).set(s, n), K.mQueue.set(s, [o, a]), qe.postMessage({ id: s, session: r, category: "eval", method: e, args: i }); })); N(this, "clear", (e) => qe.postMessage({ session: e, category: "clear" })); - if (c(K, Ae)) return c(K, Ae); - Promise.resolve().then(() => _r).then((e) => { + if (c(K, je)) return c(K, je); + Promise.resolve().then(() => Jr).then((e) => { Si.http = e.http; }), qe.addEventListener("message", ({ data: { id: e, task_id: i, method: n, args: r, category: o, data: a, error: s, session: l } }) => { - if (o === "eval" && K.mQueue.has(e)) s !== null ? K.mQueue.get(e)[1](s) : K.mQueue.get(e)[0](a), c(K, Je).delete(e), K.mQueue.delete(e); + if (o === "eval" && K.mQueue.has(e)) s !== null ? K.mQueue.get(e)[1](s) : K.mQueue.get(e)[0](a), c(K, _e).delete(e), K.mQueue.delete(e); else if (o === "util") try { - const d = m.get(Si, n.split("/")) || m.get(c(K, Je).get(i), n.split("/")); + const d = m.get(Si, n.split("/")) || m.get(c(K, _e).get(i), n.split("/")); if (!m.isFunction(d)) throw `${n} not found`; Promise.resolve(Reflect.apply(d, void 0, r)).then((u) => { qe.postMessage({ id: e, task_id: i, category: o, method: n, args: r, session: l, data: u, error: null }); @@ -692,60 +693,55 @@ const K = class K { }, !1); } }; -Nt = new WeakMap(), Je = new WeakMap(), Ae = new WeakMap(), N(K, "mQueue", /* @__PURE__ */ new Map()), x(K, Nt, 0), x(K, Je, /* @__PURE__ */ new Map()), x(K, Ae, null), N(K, "getInstance", () => (c(K, Ae) || B(K, Ae, new K()), c(K, Ae))); -let Ht = K; -const Ie = Ht.getInstance(), Tt = () => { - const t = H(!0), [, e] = E.useReducer((i) => i + 1, 0); - return V(() => () => t.current = !1, []), () => t.current && e(); -}, No = (t) => { - const e = H(); - return V(() => { - e.current = t; - }, [t]), e.current; -}, Po = (t) => { - const [e, i] = L(t), n = H(null), r = Y((o, a) => { +Nt = new WeakMap(), _e = new WeakMap(), je = new WeakMap(), N(K, "mQueue", /* @__PURE__ */ new Map()), x(K, Nt, 0), x(K, _e, /* @__PURE__ */ new Map()), x(K, je, null), N(K, "getInstance", () => (c(K, je) || B(K, je, new K()), c(K, je))); +let Jt = K; +const Ie = Jt.getInstance(), Tt = () => { + const t = J(!0), [, e] = E.useReducer((i) => i + 1, 0); + return M(() => () => t.current = !1, []), () => t.current && e(); +}, To = (t) => { + const [e, i] = L(t), n = J(null), r = Y((o, a) => { n.current = a, i(o); }, []); - return V(() => { + return M(() => { n.current && (n.current(e), n.current = null); }, [e]), [e, r]; -}, gt = (t = (n) => { +}, ht = (t = (n) => { }, e, i = m.isEqual) => { const n = E.useRef(); i(e, n.current) || (n.current = m.cloneDeep(e)), E.useEffect(t, [n.current]); -}, mt = gt, Qi = (t, e = "string") => { +}, mt = ht, Qi = (t, e = "string") => { var i; if (!Array.isArray(t)) return t; for (let n = 0; n < t.length; n++) t[n].value = de((i = t[n]) == null ? void 0 : i.value, e), t[n] && Reflect.has(t[n], "children") && (t[n].children = Qi(t[n].children, e)); return t; -}, To = (t, e = "json", i = "string", n, r = null) => { - const [o] = re.useForm(n), [a, s] = L([{ label: "无", value: "", disabled: !0 }]), l = H([]), d = re.useWatch((u) => l.current.length === 0 ? null : m.pick(u, l.current), o) || null; - return V(() => { +}, Oo = (t, e = "json", i = "string", n, r = null) => { + const [o] = re.useForm(n), [a, s] = L([{ label: "无", value: "", disabled: !0 }]), l = J([]), d = re.useWatch((u) => l.current.length === 0 ? null : m.pick(u, l.current), o) || null; + return M(() => { Array.isArray(t) ? s(t) : e === "javascript" && t ? Ie.exec(t, {}, { getFieldValue: (u) => (l.current.includes(u) || l.current.push(u), o.getFieldValue(u)), getFieldValueForBasicForm: (u) => (l.current.includes(u) || l.current.push(u), r ? r.getFieldValue(u) : o.getFieldValue(u)) }).then((u) => { s(de(u, "array")); }).catch((u) => console.error("useOptions", u)) : t && s(de(t, "array")); }, [t, e, d]), Qi(a, i); -}, Oo = (t) => { +}, Ro = (t) => { const [e, i] = L(), n = { type: "GET" }; if (typeof t == "string" ? n.url = t : m.isPlainObject(t) && Object.assign(n, t), !(n != null && n.url)) throw "url is required"; const r = (o) => I.request(n, !1).resp((a) => (console.log("useSubscribeRequest", o), i(a), a)); - return gt(() => { + return ht(() => { let o = null; return r().then((a) => { - o = _i.subscribe(m.throttle(r, 180, { leading: !1, trailing: !0 }), a.res); + o = Hi.subscribe(m.throttle(r, 180, { leading: !1, trailing: !0 }), a.res); }), () => o == null ? void 0 : o(); }, n), e; -}, kr = (t) => { +}, Sr = (t) => { const [e, i] = E.useState({ items: [], hides: [] }); return E.useEffect(() => { - t && I.get(`/api/_/${t}`).then(({ pk: n, uuid: r, code: o, resource: a, align: s, cols: l, rowHeight: d, marginX: u, marginY: p, listenChangeFields: f, listenChangeFieldsFunc: h, fields: y, theme: w, themeSetting: C, groups: S }) => ({ pk: n, uuid: r, code: o, resource: a, align: s, cols: l, rowHeight: d, marginX: u, marginY: p, theme: w, themeProps: C, groups: S, listenChangeFields: f, listenChangeFieldsFunc: h, ...y.reduce((v, k) => { + t && I.get(`/api/_/${t}`).then(({ pk: n, uuid: r, code: o, resource: a, align: s, cols: l, rowHeight: d, marginX: u, marginY: p, listenChangeFields: f, listenChangeFieldsFunc: g, fields: y, theme: w, themeSetting: C, groups: S }) => ({ pk: n, uuid: r, code: o, resource: a, align: s, cols: l, rowHeight: d, marginX: u, marginY: p, theme: w, themeProps: C, groups: S, listenChangeFields: f, listenChangeFieldsFunc: g, ...y.reduce((v, k) => { var $; return ($ = k == null ? void 0 : k.field) != null && $.hidden ? v.hides.push(k == null ? void 0 : k.field) : v.items.push(k), v; }, { items: [], hides: [] }) })).then(i); }, [t]), e; -}, Sr = ({ max: t = 0, min: e = 0, type: i = "", message: n, pattern: r, required: o = !1, validator: a } = {}, s, l) => { +}, Er = ({ max: t = 0, min: e = 0, type: i = "", message: n, pattern: r, required: o = !1, validator: a } = {}, s, l) => { const [d, u] = L([]); - return V(() => { + return M(() => { const p = []; if (o) { let f = l; @@ -770,47 +766,47 @@ const Ie = Ht.getInstance(), Tt = () => { p.push({ type: "string", pattern: r, message: n }); break; case "validator": - a && p.push(({ getFieldValue: f }) => ({ validator: async (h, y) => { + a && p.push(({ getFieldValue: f }) => ({ validator: async (g, y) => { const w = await Ie.exec(a, { value: y, fieldName: s }, { getFieldValue: f }); return m.isString(w) && w ? Promise.reject(w) : m.isBoolean(w) && !w ? Promise.reject(n) : Promise.resolve(); } })); } u(p); }, [t, e, i, n, r, o, a]), d; -}, Er = (t, e, i) => { +}, $r = (t, e, i) => { const [n, r] = L(null); - return V(() => { + return M(() => { const { initDataUri: o = `/api/${t}`, initDataMethod: a = "GET" } = i || {}; e && I.request({ method: a, url: m.trimEnd(`${o}/${e}`, "/") }).then((s) => { r(s); }); }, [t, e, i]), n; -}, $r = (t, e, i) => Y((n, r = { serialize: (o) => o, onSuccess: () => { +}, vr = (t, e, i) => Y((n, r = { serialize: (o) => o, onSuccess: () => { }, onFail: (o) => (o == null ? void 0 : o.errorFields) && ne.error("请先完善表单信息", { duration: 2e3 }) }) => { const o = n.getFieldValue("__RESOURCE__"), { submitDataUri: a = `/api/${t}`, submitDataMethod: s = "POST" } = i || {}; return n.validateFields().then((l) => o ? m.pick(l, [o]) : l).then(r.serialize).then((l) => I.request({ method: s, url: m.trimEnd(`${a}/${e || ""}`, "/"), data: l }).msg(r.onSuccess)).catch(r.onFail); -}, [t, e, i]), vr = (t, e, i, n) => { - const r = Er(e, i, n); - V(() => { +}, [t, e, i]), xr = (t, e, i, n) => { + const r = $r(e, i, n); + M(() => { r ? t.setFieldsValue(r) : t.resetFields(); }, [t, r]); - const o = $r(e, i, n); + const o = vr(e, i, n); return m.partial(o, t); -}, xr = (t, e, i = [], n = {}) => { - const r = H({}), o = H(), a = m.debounce(Tt(), 180), s = ["disabled", "required"], l = (f, h) => { - s.includes(f) && (r.current[f] = h), a(); - }, d = _(() => ({ setDisabled: (f) => l("disabled", f), setRequired: (f) => l("required", f), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [e]), [u, p] = Ji(e, -1, {}, d, n); +}, Nr = (t, e, i = [], n = {}) => { + const r = J({}), o = J(), a = m.debounce(Tt(), 180), s = ["disabled", "required"], l = (f, g) => { + s.includes(f) && (r.current[f] = g), a(); + }, d = H(() => ({ setDisabled: (f) => l("disabled", f), setRequired: (f) => l("required", f), getDisabled: () => r.current.disabled, getRequired: () => r.current.required }), [e]), [u, p] = _i(e, -1, {}, d, n); if (!p && o.current != u && (u >= 0 || !m.isEmpty(i == null ? void 0 : i[u]))) { o.current = u; - const { widget: f, widgetPrefix: h, props: y } = i == null ? void 0 : i[u]; - t = Vi(f, h), r.current = m.merge(y, m.pick(r.current, s)); + const { widget: f, widgetPrefix: g, props: y } = i == null ? void 0 : i[u]; + t = Vi(f, g), r.current = m.merge(y, m.pick(r.current, s)); } return [t, r.current]; -}, Ei = (t) => t === void 0 || t === !1 ? "" : (Array.isArray(t) ? t : [t]).join("_"), Ro = ({ value: t, onChange: e }, i = null) => { - const n = H(), [r] = re.useForm(i), o = H({}); +}, Ei = (t) => t === void 0 || t === !1 ? "" : (Array.isArray(t) ? t : [t]).join("_"), Fo = ({ value: t, onChange: e }, i = null) => { + const n = J(), [r] = re.useForm(i), o = J({}); return mt(() => { m.isEqual(n.current, t) || r.setFieldsValue(t); - }, [t]), V(() => () => r.resetFields(), []), [_(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (a) => (s) => { + }, [t]), M(() => () => r.resetFields(), []), [H(() => r.__INTERNAL__ ? r : { ...r, __INTERNAL__: { itemRef: (a) => (s) => { const l = Ei(a); s ? o.current[l] = s : delete o.current[l]; } }, scrollToField: (a, s = {}) => { @@ -824,56 +820,56 @@ const Ie = Ht.getInstance(), Tt = () => { n.current = s, e == null || e(s); }]; }, ti = ({ widget: t = "Input", widgetPrefix: e = "@pkg/ff/grid-layout-forms", widgetDecorator: i, subWidgets: n = [], basicForm: r, ...o }) => { - const a = Vi(t, e), [s, l] = xr(a, i, n, r), [d, u] = L(); - return V(() => { - s && ue.getWidgetComponent(s).then(({ defaultProps: p = {}, default: f }) => ({ default: Nr(f, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => u(E.createElement(p.default, o))); + const a = Vi(t, e), [s, l] = Nr(a, i, n, r), [d, u] = L(); + return M(() => { + s && ue.getWidgetComponent(s).then(({ defaultProps: p = {}, default: f }) => ({ default: Pr(f, p, r) })).catch((p) => ({ default: () => `${p}` })).then((p) => u(E.createElement(p.default, o))); }, [s]), d && E.cloneElement(d, { ...o, ...l }); -}, Nr = (t, e = {}, i = null) => (n) => { - const { type: r, code: o, label: a, noStyle: s, style: l, placeholder: d, required: u = !1, extras: p, validators: f, help: h, isVirtual: y, $isReserved: w, initialValue: C, initialValueLanguage: S, ...v } = m.omit(m.merge({}, e, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), k = Sr(Object.assign({}, f, u ? { required: !0 } : {}), o, r), $ = _(() => { +}, Pr = (t, e = {}, i = null) => (n) => { + const { type: r, code: o, label: a, noStyle: s, style: l, placeholder: d, required: u = !1, extras: p, validators: f, help: g, isVirtual: y, $isReserved: w, initialValue: C, initialValueLanguage: S, ...v } = m.omit(m.merge({}, e, n), ["convertJs", "convertJsSetting", "widget", "widgetPerfix", "widgetDecorator", "subWidgets", "boxStyle"]), k = Er(Object.assign({}, f, u ? { required: !0 } : {}), o, r), $ = H(() => { const D = Object.keys((e == null ? void 0 : e.extras) || {}); return m.over([m.partialRight(m.pick, D), m.partialRight(m.omit, D)]); - }, [e == null ? void 0 : e.extras]), [T, j] = $(v), F = { label: a, noStyle: s, style: l, colon: !1, layout: "vertical" }, M = Y((D) => D == null ? void 0 : de(D, r), [r]); - return g(Xt, { name: o, rules: k, initialValue: M(C), normalize: M, children: (D, R, W) => { + }, [e == null ? void 0 : e.extras]), [T, A] = $(v), F = { label: a, noStyle: s, style: l, colon: !1, layout: "vertical" }, V = Y((D) => D == null ? void 0 : de(D, r), [r]); + return h(Xt, { name: o, rules: k, initialValue: V(C), normalize: V, children: (D, R, W) => { var U; - return g(t, { type: r, rcform: W, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: h || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: ((U = k == null ? void 0 : k[0]) == null ? void 0 : U.required) || !1, ...F }, fieldProps: { placeholder: d, ...j, ...D }, $setting: Object.assign({}, p, T) }); + return h(t, { type: r, rcform: W, basicForm: i, itemProps: { validateStatus: R.errors.length > 0 ? "error" : "success", tooltip: g || null, help: R.errors.length > 0 ? R.errors.join("、") : null, required: ((U = k == null ? void 0 : k[0]) == null ? void 0 : U.required) || !1, ...F }, fieldProps: { placeholder: d, ...A, ...D }, $setting: Object.assign({}, p, T) }); } }); -}, ii = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: o = 24, rowHeight: a = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: d = [], hides: u = [], primaryKey: p = 0, formProps: f = {}, formFields: h = [], listenChangeFields: y, listenChangeFieldsFunc: w, onValuesChange: C, theme: S, themeProps: v = {}, groups: k = [{ key: "default", label: "默认" }], children: $, ...T }) => { - const [j] = re.useForm(e), F = Y((R, W) => { - C == null || C(R, W), w && Array.isArray(y) && Ie.exec(w, { changedValues: R, allValues: W }, { getFieldValue: j.getFieldValue, setFieldValue: j.setFieldValue, setFieldsValue: j.setFieldsValue, isFieldTouched: j.isFieldTouched, isFieldsTouched: j.isFieldsTouched }).catch((U) => console.error("onFormValuesChange", t, U)); - }, [t, j, C, y, w]), M = _(() => [{ name: "__PROPS__", value: f }, { name: "__PRIMARY_KEY__", value: p }].concat(h), [p, f, h]), D = (R, W, U) => { - const q = Zt(W, ti, i), he = Ui(T); - return A("div", { ...he, className: O("ff-grid-layout-form", r), style: { ...n, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": o, "--grid-layout-row-height": `${a}px` }, children: [q, U && E.cloneElement(U, { cols: o, rowHeight: a, itemMargin: s, containerPadding: l, fields: W, basicForm: i })] }); +}, ii = ({ name: t, form: e = null, basicForm: i = null, style: n = {}, className: r, cols: o = 24, rowHeight: a = 16, itemMargin: s = [8, 16], containerPadding: l = [0, 0], fields: d = [], hides: u = [], primaryKey: p = 0, formProps: f = {}, formFields: g = [], listenChangeFields: y, listenChangeFieldsFunc: w, onValuesChange: C, theme: S, themeProps: v = {}, groups: k = [{ key: "default", label: "默认" }], children: $, ...T }) => { + const [A] = re.useForm(e), F = Y((R, W) => { + C == null || C(R, W), w && Array.isArray(y) && Ie.exec(w, { changedValues: R, allValues: W }, { getFieldValue: A.getFieldValue, setFieldValue: A.setFieldValue, setFieldsValue: A.setFieldsValue, isFieldTouched: A.isFieldTouched, isFieldsTouched: A.isFieldsTouched }).catch((U) => console.error("onFormValuesChange", t, U)); + }, [t, A, C, y, w]), V = H(() => [{ name: "__PROPS__", value: f }, { name: "__PRIMARY_KEY__", value: p }].concat(g), [p, f, g]), D = (R, W, U) => { + const q = Zt(W, ti, i), ge = Ui(T); + return j("div", { ...ge, className: O("ff-grid-layout-form", r), style: { ...n, "--grid-layout-item-margin-x": `${(s == null ? void 0 : s[0]) ?? 8}px`, "--grid-layout-item-margin-y": `${(s == null ? void 0 : s[1]) ?? 16}px`, "--grid-layout-container-padding-y": `${(l == null ? void 0 : l[0]) || 0}px`, "--grid-layout-container-padding-x": `${(l == null ? void 0 : l[1]) || 0}px`, "--grid-layout-cols": o, "--grid-layout-row-height": `${a}px` }, children: [q, U && E.cloneElement(U, { cols: o, rowHeight: a, itemMargin: s, containerPadding: l, fields: W, basicForm: i })] }); }; - return A(re, { ...T, form: j, fields: M, onValuesChange: F, children: [S ? g(Gi, { ...v, items: k, theme: S, itemRender: D, fields: d, children: $, basicForm: i }) : D(0, d, $), u == null ? void 0 : u.map((R) => { + return j(re, { ...T, form: A, fields: V, onValuesChange: F, children: [S ? h(Gi, { ...v, items: k, theme: S, itemRender: D, fields: d, children: $, basicForm: i }) : D(0, d, $), u == null ? void 0 : u.map((R) => { var W; - return g(Xt, { name: R.code, children: g(Pr, { form: j, basicForm: i, name: R.code, type: R.type, initialValue: R.initialValue, initialValueLanguage: (W = R.extras) == null ? void 0 : W.initialValueLanguage }) }, JSON.stringify(R.code)); + return h(Xt, { name: R.code, children: h(Tr, { form: A, basicForm: i, name: R.code, type: R.type, initialValue: R.initialValue, initialValueLanguage: (W = R.extras) == null ? void 0 : W.initialValueLanguage }) }, JSON.stringify(R.code)); })] }); -}, Pr = ({ type: t, initialValue: e, initialValueLanguage: i, onChange: n, basicForm: r }) => { - const [o, a] = Ji(i == "javascript" && e, i == "javascript" ? void 0 : e, {}, {}, r); - return V(() => { +}, Tr = ({ type: t, initialValue: e, initialValueLanguage: i, onChange: n, basicForm: r }) => { + const [o, a] = _i(i == "javascript" && e, i == "javascript" ? void 0 : e, {}, {}, r); + return M(() => { i == "javascript" ? n(de(o, t)) : e && n(de(e, t)); }, [t, e, o]), null; }; ii.propTypes = { fields: b.array, hides: b.array }; -const Tr = /* @__PURE__ */ ((t) => ({ code: e, isPreview: i = !1, ...n }) => { - const { align: r, autoComplete: o, resource: a, items: s, hides: l, rowHeight: d, marginX: u, marginY: p, cols: f, listenChangeFields: h, listenChangeFieldsFunc: y, pk: w, uuid: C, theme: S, themeProps: v, groups: k } = kr(e), $ = _(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: a }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: C }], [w, e, C, a]); - return g(t, { name: e, autoComplete: o, theme: S, themeProps: v, groups: k, ...n, formFields: $, listenChangeFields: h, listenChangeFieldsFunc: y, fields: s, hides: l, cols: f, rowHeight: d, itemMargin: [u, p] }); +const Or = /* @__PURE__ */ ((t) => ({ code: e, isPreview: i = !1, ...n }) => { + const { align: r, autoComplete: o, resource: a, items: s, hides: l, rowHeight: d, marginX: u, marginY: p, cols: f, listenChangeFields: g, listenChangeFieldsFunc: y, pk: w, uuid: C, theme: S, themeProps: v, groups: k } = Sr(e), $ = H(() => [{ name: "__PK__", value: w }, { name: "__RESOURCE__", value: a }, { name: "__LAYOUT_KEY__", value: e }, { name: "__LAYOUT_UUID__", value: C }], [w, e, C, a]); + return h(t, { name: e, autoComplete: o, theme: S, themeProps: v, groups: k, ...n, formFields: $, listenChangeFields: g, listenChangeFieldsFunc: y, fields: s, hides: l, cols: f, rowHeight: d, itemMargin: [u, p] }); })(ii), Zi = ({ $setting: t, $close: e, extras: i, code: n, primaryKey: r, ...o }) => { - const [a] = re.useForm(), s = vr(a, n, r, t); - return g(ee, { actions: A(E.Fragment, { children: [g(P, { name: (t == null ? void 0 : t.okText) || "保存", type: "primary", widget: () => s({ onSuccess: e }) }), g(P, { name: (t == null ? void 0 : t.cancelText) || "取消", widget: () => e(!1) })] }), extras: i, children: g(Tr, { form: a, code: n, primaryKey: r, ...o }) }); -}, $i = /* @__PURE__ */ new Set(), Jt = (t = [], e = 0) => { + const [a] = re.useForm(), s = xr(a, n, r, t); + return h(ee, { actions: j(E.Fragment, { children: [h(P, { name: (t == null ? void 0 : t.okText) || "保存", type: "primary", widget: () => s({ onSuccess: e }) }), h(P, { name: (t == null ? void 0 : t.cancelText) || "取消", widget: () => e(!1) })] }), extras: i, children: h(Or, { form: a, code: n, primaryKey: r, ...o }) }); +}, $i = /* @__PURE__ */ new Set(), _t = (t = [], e = 0) => { const i = t[e]; if (i.length && !$i.has(i)) { const n = document.createElement("script"); n.setAttribute("src", i), n.setAttribute("data-namespace", i), t.length > e + 1 && (n.onload = () => { - Jt(t, e + 1); + _t(t, e + 1); }, n.onerror = () => { - Jt(t, e + 1); + _t(t, e + 1); }), $i.add(i), document.body.appendChild(n); } -}, St = ({ className: t, type: e, style: i = {}, ...n }) => g("span", { role: "img", className: O("ff-iconfont", t), style: i, ...n, children: g("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: g("use", { xlinkHref: `#${e}` }) }) }); -St.propTypes = { className: b.string, type: b.string.isRequired, style: b.object }, St.init = Jt; -const Or = (t, e, i, n) => Ne.redirect(i, e, n), Rr = (t, e = {}, i, n = {}) => { +}, St = ({ className: t, type: e, style: i = {}, ...n }) => h("span", { role: "img", className: O("ff-iconfont", t), style: i, ...n, children: h("svg", { style: { width: "1em", height: "1em", fill: "currentColor", overflow: "hidden" }, viewBox: "0 0 1024 1024", children: h("use", { xlinkHref: `#${e}` }) }) }); +St.propTypes = { className: b.string, type: b.string.isRequired, style: b.object }, St.init = _t; +const Rr = (t, e, i, n) => Ne.redirect(i, e, n), Fr = (t, e = {}, i, n = {}) => { var o; const r = (o = n.router) == null ? void 0 : o.reduce((a, [s, l, d]) => { const u = m.get(e, ["router", s]); @@ -886,91 +882,91 @@ const Or = (t, e, i, n) => Ne.redirect(i, e, n), Rr = (t, e = {}, i, n = {}) => return m.isFunction(i) ? i.call(null, e, s) : m.isString(i) && i ? Ie.exec(i, e, s) : null; }, xi = (t, e, i, n, r) => m.isString(i) && i ? ue.getWidgetComponent(i).then(({ default: o }) => ne.modal(o, { ...e, $setting: n }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r)).catch((o) => { ne.error(i, { content: o.toString() }); -}) : ne.modal(i, { ...e, $setting: n }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), Fr = (t, e, i, n, r) => ne.modal(Zi, { ...e, $setting: n, code: i }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), jr = (t, e, i, n, r) => ne.modal(ei, { base62params: e, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), Ar = ({ widget: t, widgetType: e, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: o }, { onAfterClick: a, onBeforeClick: s } = {}) => { - const l = pe(ae), [d, u] = L({ leading: !0, trailing: !1 }), p = _(() => { +}) : ne.modal(i, { ...e, $setting: n }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), Ar = (t, e, i, n, r) => ne.modal(Zi, { ...e, $setting: n, code: i }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), jr = (t, e, i, n, r) => ne.modal(ei, { base62params: e, $setting: n, listCode: i }, r != null && r.title ? { ...r, title: m.template(r.title)(t) } : r), Lr = ({ widget: t, widgetType: e, widgetData: i, widgetProps: n, widgetSetting: r, widgetContainerProps: o }, { onAfterClick: a, onBeforeClick: s } = {}) => { + const l = pe(ae), [d, u] = L({ leading: !0, trailing: !1 }), p = H(() => { switch (e) { case "redirect": - return m.partialRight(Or, t, r); + return m.partialRight(Rr, t, r); case "func": return m.partialRight(vi, (r == null ? void 0 : r.code) ?? t, { status: d, setStatus: u, listFn: l }); case "component": case "fsdpf-component": return m.partialRight(xi, t, r, o); case "grid-layout-form": - return m.partialRight(Fr, t, r, o); + return m.partialRight(Ar, t, r, o); case "data-list": return m.partialRight(jr, t, r, o); case "destroy": - return m.partialRight(Rr, t, r, o); + return m.partialRight(Fr, t, r, o); default: if (ri(t) || E.isValidElement(t)) return m.partialRight(xi, t, r, o); if (m.isFunction(t)) return m.partialRight(vi, (r == null ? void 0 : r.code) || t, { status: d, setStatus: u }); } return (...f) => console.error("useButton unknown widgetType", e, ...f); }, [t, e, l.getBase62params, l.getSelectedRows]); - return [m.debounce((f) => (s == null || s(f), Promise.resolve(ht(n, f, { list: l })).then((h) => p(f, { ...i, ...h })).then((h) => a == null ? void 0 : a(h)).catch(console.error)), 300, { leading: !0, trailing: !1 }), d]; -}, en = ({ type: t, name: e, className: i, icon: n, iconPosition: r, size: o }, a = "default") => _(() => { + return [m.debounce((f) => (s == null || s(f), Promise.resolve(gt(n, f, { list: l })).then((g) => p(f, { ...i, ...g })).then((g) => a == null ? void 0 : a(g)).catch(console.error)), 300, { leading: !0, trailing: !1 }), d]; +}, en = ({ type: t, name: e, className: i, icon: n, iconPosition: r, size: o }, a = "default") => H(() => { const s = { type: "primary", className: O("ff-button", i), iconPosition: r, size: o }; - return t === "danger" ? s.danger = !0 : t === "default" && (s.type = t), a === "link" || a === "dashed" ? (s.type = a, t === "default" && (s.className = O(s.className, "ff-default"))) : a !== "circle" && a !== "round" || (s.shape = a), n && (s.icon = g(St, { type: n })), e && (s.children = e), s; + return t === "danger" ? s.danger = !0 : t === "default" && (s.type = t), a === "link" || a === "dashed" ? (s.type = a, t === "default" && (s.className = O(s.className, "ff-default"))) : a !== "circle" && a !== "round" || (s.shape = a), n && (s.icon = h(St, { type: n })), e && (s.children = e), s; }, [a, t, i, n, r]), Ot = ({ data: t, widget: e, widgetType: i = "fsdpf-component", widgetData: n, widgetProps: r, widgetSetting: o, widgetContainerProps: a, onAfterClick: s, onBeforeClick: l, children: d, extras: u }) => { - const p = pe(ae), [f, h] = L(!1), [y, w] = L("hover"), [C, S] = L({}), [v, k] = L(), { placement: $, align: T, zIndex: j, arrow: F = { pointAtCenter: !0 }, getPopupContainer: M, isPopupMountBodyContainer: D = !0, ...R } = a || {}; - V(() => { + const p = pe(ae), [f, g] = L(!1), [y, w] = L("hover"), [C, S] = L({}), [v, k] = L(), { placement: $, align: T, zIndex: A, arrow: F = { pointAtCenter: !0 }, getPopupContainer: V, isPopupMountBodyContainer: D = !0, ...R } = a || {}; + M(() => { i == "grid-layout-form" ? k(E.createElement(Zi, { ...n, $setting: o, code: e })) : i == "data-list" ? k(E.createElement(ei, { base62params: t, $setting: o, listCode: e })) : m.isString(e) ? ue.getWidgetComponent(e).then(({ default: q }) => { k(E.createElement(q, { ...n, $setting: o })); }).catch((q) => k(q.toString())) : ri(e) ? k(E.createElement(e, { ...n, $setting: o })) : E.isValidElement(e) && k(E.cloneElement(e, { ...n, $setting: o })); - }, [e, i, n]), V(() => { - Promise.resolve(ht(r, t, { list: p })).then(S); + }, [e, i, n]), M(() => { + Promise.resolve(gt(r, t, { list: p })).then(S); }, [r, t, p.getBase62params, p.getSelectedRows]); - const W = (q, he = !1) => (h(q), !q && w("hover"), q ? l == null ? void 0 : l(C) : s == null ? void 0 : s(he)), U = (q) => { - h(!0), w("click"); + const W = (q, ge = !1) => (g(q), !q && w("hover"), q ? l == null ? void 0 : l(C) : s == null ? void 0 : s(ge)), U = (q) => { + g(!0), w("click"); }; - return g(Fn, { zIndex: j, placement: $, onPopupClick: U, onClick: U, open: f, align: T, arrow: F, trigger: y, getPopupContainer: M || D ? void 0 : (q) => q, content: g(Lr, { ...R, extras: u, children: v && E.cloneElement(v, { ...C, $close: (q) => W(!1, q) }) }), children: d, onOpenChange: W }); -}, Lr = ({ title: t, className: e, classNames: i, children: n, extras: r, width: o, height: a, ...s }) => { - const [l, d] = L({}), u = Y((y, w) => d((C) => ({ ...C, [y]: w })), []), p = Y((y) => d((w) => ({ ...w, [y]: void 0 })), []), f = t ? E.createElement("div", { className: "ff-popup-title" }, t) : l == null ? void 0 : l.title, h = r ?? E.createElement("div", { className: "ff-popup-reserved-extras" }, r); - return g(pt.Provider, { value: { ele: l, mount: u, unmount: p }, children: A("div", { className: O("ff-popup ff-popover", e, l.rootClassName), style: { width: o ?? 260, height: a }, ...s, children: [A("div", { className: O("ff-popup-header", "ff-popover-header", i == null ? void 0 : i.header), children: [f, l == null ? void 0 : l["sub-title"]] }), g("div", { className: O("ff-popup-body", "ff-popover-body", i == null ? void 0 : i.body), children: n }), A("div", { className: O("ff-popup-footer", "ff-popover-footer", i == null ? void 0 : i.footer), children: [h, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) }); + return h(Fn, { zIndex: A, placement: $, onPopupClick: U, onClick: U, open: f, align: T, arrow: F, trigger: y, getPopupContainer: V || D ? void 0 : (q) => q, content: h(Ir, { ...R, extras: u, children: v && E.cloneElement(v, { ...C, $close: (q) => W(!1, q) }) }), children: d, onOpenChange: W }); +}, Ir = ({ title: t, className: e, classNames: i, children: n, extras: r, width: o, height: a, ...s }) => { + const [l, d] = L({}), u = Y((y, w) => d((C) => ({ ...C, [y]: w })), []), p = Y((y) => d((w) => ({ ...w, [y]: void 0 })), []), f = t ? E.createElement("div", { className: "ff-popup-title" }, t) : l == null ? void 0 : l.title, g = r ?? E.createElement("div", { className: "ff-popup-reserved-extras" }, r); + return h(pt.Provider, { value: { ele: l, mount: u, unmount: p }, children: j("div", { className: O("ff-popup ff-popover", e, l.rootClassName), style: { width: o ?? 260, height: a }, ...s, children: [j("div", { className: O("ff-popup-header", "ff-popover-header", i == null ? void 0 : i.header), children: [f, l == null ? void 0 : l["sub-title"]] }), h("div", { className: O("ff-popup-body", "ff-popover-body", i == null ? void 0 : i.body), children: n }), j("div", { className: O("ff-popup-footer", "ff-popover-footer", i == null ? void 0 : i.footer), children: [g, l == null ? void 0 : l.extras, l == null ? void 0 : l.actions] })] }) }); }; Ot.propTypes = { widgetType: b.oneOf(["fsdpf-component", "grid-layout-form", "data-list"]) }; -const ft = (t) => function({ className: e, variant: i, children: n, name: r, icon: o, type: a = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: d, onBeforeClick: u, data: p, loading: f, disabled: h, tooltip: y, confirm: w, widget: C = () => { -}, widgetType: S, widgetData: v, widgetProps: k, widgetSetting: $, widgetContainerProps: T, ...j }) { - const { mode: F, ...M } = T || {}, D = en({ className: e, name: r, type: a, icon: o, iconPosition: s }, i ?? t), R = g(Ct, { ...D, ...j, children: n || r }); - if (F === "popover" && !["destroy", "redirect", "func"].includes(S)) return g(Ot, { data: p, widget: C, widgetType: S, widgetData: v, widgetProps: k, widgetSetting: $, widgetContainerProps: M, onAfterClick: d, onBeforeClick: u, children: R }); - const W = m.isEmpty(y) || !y.enabled ? {} : y, U = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [q, he] = L(!1), [oe, { disabled: z, loading: se }] = Ar({ widget: C, widgetType: S, widgetData: v, widgetProps: k, widgetSetting: $, widgetContainerProps: M }, { onAfterClick: d, onBeforeClick: u }); - return g(jn, { okText: "确定", cancelText: "取消", getPopupContainer: (J) => J, ...U, disabled: z || h, open: q, onOpenChange: (J) => { - if (!J) return he(J); - U.enabled ? he(J) : oe(p); - }, onConfirm: (J) => { - oe(p, J); - }, onClick: (J) => { - J.stopPropagation(); - }, children: g(An, { getPopupContainer: (J) => J, ...W, title: q ? null : W == null ? void 0 : W.title, trigger: ["hover", "click"], children: E.cloneElement(R, { loading: se || f, disabled: z || h }) }) }); +const ft = (t) => function({ className: e, variant: i, children: n, name: r, icon: o, type: a = "default", iconPosition: s = "start", noAuthType: l, onAfterClick: d, onBeforeClick: u, data: p, loading: f, disabled: g, tooltip: y, confirm: w, widget: C = () => { +}, widgetType: S, widgetData: v, widgetProps: k, widgetSetting: $, widgetContainerProps: T, ...A }) { + const { mode: F, ...V } = T || {}, D = en({ className: e, name: r, type: a, icon: o, iconPosition: s }, i ?? t), R = h(Ct, { ...D, ...A, children: n || r }); + if (F === "popover" && !["destroy", "redirect", "func"].includes(S)) return h(Ot, { data: p, widget: C, widgetType: S, widgetData: v, widgetProps: k, widgetSetting: $, widgetContainerProps: V, onAfterClick: d, onBeforeClick: u, children: R }); + const W = m.isEmpty(y) || !y.enabled ? {} : y, U = m.isEmpty(w) ? { enabled: !1 } : Object.assign({ enabled: !0 }, w), [q, ge] = L(!1), [oe, { disabled: z, loading: se }] = Lr({ widget: C, widgetType: S, widgetData: v, widgetProps: k, widgetSetting: $, widgetContainerProps: V }, { onAfterClick: d, onBeforeClick: u }); + return h(An, { okText: "确定", cancelText: "取消", getPopupContainer: (_) => _, ...U, disabled: z || g, open: q, onOpenChange: (_) => { + if (!_) return ge(_); + U.enabled ? ge(_) : oe(p); + }, onConfirm: (_) => { + oe(p, _); + }, onClick: (_) => { + _.stopPropagation(); + }, children: h(jn, { getPopupContainer: (_) => _, ...W, title: q ? null : W == null ? void 0 : W.title, trigger: ["hover", "click"], children: E.cloneElement(R, { loading: se || f, disabled: z || g }) }) }); }, P = ft("default"); P.propTypes = { type: b.oneOf(["primary", "default", "danger", ""]), size: b.oneOf(["large", "middle", "small"]), name: b.string, icon: b.string, iconPosition: b.oneOf(["start", "end"]), data: b.any, widget: b.any, widgetType: b.oneOf(["destroy", "redirect", "func", "component", "fsdpf-component", "grid-layout-form", "grid-layout", "data-list"]), widgetData: b.object, widgetProps: b.object, widgetSetting: b.object, widgetContainerProps: b.object, tooltip: b.exact({ title: b.string.isRequired, placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func }), confirm: b.exact({ title: b.string.isRequired, cancelText: b.string, okText: b.string, okType: b.oneOf(["primary", "default", "danger", ""]), placement: b.oneOf(["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]), enabled: b.oneOfType([b.bool, b.number]), getPopupContainer: b.func, arrow: b.oneOfType([b.bool, b.exact({ pointAtCenter: b.bool })]) }) }; -const Ir = ft("link"), Vr = ft("circle"), Mr = ft("round"), Dr = ft("dashed"), Ni = ({ options: t = [], triggerWeights: e = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (h, y, w) => { -}, onBeforeClick: n = (h, y, w) => { -}, labelVariant: r = "link", labelSize: o, labelRender: a, btnVariant: s, btnSize: l, btnRender: d = (h, y) => g(P, { ...h, data: y }, h.uuid || Mt()), widgetContainerProps: u = {}, children: p, data: f }) => { +const Vr = ft("link"), Mr = ft("circle"), Dr = ft("round"), zr = ft("dashed"), Ni = ({ options: t = [], triggerWeights: e = ["grid-layout-form", "grid-layout", "fsdpf-component", "print"], onAfterClick: i = (g, y, w) => { +}, onBeforeClick: n = (g, y, w) => { +}, labelVariant: r = "link", labelSize: o, labelRender: a, btnVariant: s, btnSize: l, btnRender: d = (g, y) => h(P, { ...g, data: y }, g.uuid || Mt()), widgetContainerProps: u = {}, children: p, data: f }) => { if (m.isEmpty(t)) return p; - const [h, y] = _(() => (t || []).reduce((C, S) => { + const [g, y] = H(() => (t || []).reduce((C, S) => { const v = e.indexOf(S.widgetType); return v === -1 ? C[1].push(S) : C[0] ? v < e.indexOf(C[0].widgetType) ? (C[1].push(C[0]), C[0] = S) : C[1].push(S) : C[0] = S, C; }, [null, []]), [t, e]); - a ? p = a(h, f) || p : p || (p = g(Ct, { ...en(Object.assign(h != null && h.name || h != null && h.icon ? {} : { icon: "icon-location" }, h, { size: o }), r) })); + a ? p = a(g, f) || p : p || (p = h(Ct, { ...en(Object.assign(g != null && g.name || g != null && g.icon ? {} : { icon: "icon-location" }, g, { size: o }), r) })); const w = y.map((C) => d(Object.assign({ uuid: C.uuid, type: C.type, name: C.name, widget: C.widget, widgetType: C.widgetType, widgetProps: C.widgetProps, widgetData: C.widgetData, widgetSetting: C.widgetSetting, widgetContainerProps: C.widgetContainerSetting, confirm: C.confirm, onAfterClick: m.partialRight(i, C, f), onBeforeClick: m.partialRight(n, C, f) }, { size: l, variant: s }), f)); - return g(Ot, { widget: h == null ? void 0 : h.widget, widgetType: h == null ? void 0 : h.widgetType, widgetProps: h == null ? void 0 : h.widgetProps, widgetSetting: h == null ? void 0 : h.widgetSetting, widgetContainerProps: Object.assign({}, u, h == null ? void 0 : h.widgetContainerProps), data: f, widgetData: h == null ? void 0 : h.widgetData, extras: w, onAfterClick: m.partialRight(i, h, f), onBeforeClick: m.partialRight(n, h, f), children: p }); + return h(Ot, { widget: g == null ? void 0 : g.widget, widgetType: g == null ? void 0 : g.widgetType, widgetProps: g == null ? void 0 : g.widgetProps, widgetSetting: g == null ? void 0 : g.widgetSetting, widgetContainerProps: Object.assign({}, u, g == null ? void 0 : g.widgetContainerProps), data: f, widgetData: g == null ? void 0 : g.widgetData, extras: w, onAfterClick: m.partialRight(i, g, f), onBeforeClick: m.partialRight(n, g, f), children: p }); }; -Ni.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = Ir, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = Vr, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = Mr, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = Dr, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Ot, P.GroupPopover = Ni; -const zr = ({ fields: t, formProps: e, $close: i }) => { - const [n] = re.useForm(), r = _(() => [{ name: "__PROPS__", value: e }], [e]); - return g(ee, { actions: A(E.Fragment, { children: [g(P, { name: "取消", widget: () => i(!1) }), g(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: g(re, { fields: r, form: n, className: "ff-modal-form", children: t == null ? void 0 : t.map(({ code: o, ...a }) => g(ti, { code: o, ...a }, o)) }) }); -}, Wr = ({ className: t, classNames: e, $close: i, children: n, title: r, subTitle: o, actions: a, extras: s, ...l }) => A(Bn, { ...l, prefixCls: "ff-drawer", className: O("ff-popup", t), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (d) => ({ motionAppear: !0, motionName: `panel-motion-${d}` }), children: [A("div", { className: O("ff-popup-header", "ff-drawer-header", e == null ? void 0 : e.header), children: [g("button", { "aria-label": "Close", className: O("ff-popup-close", "ff-drawer-close", e == null ? void 0 : e.close), onClick: l.onClose, children: g(Qt, { type: "close" }) }), r, o] }), g("div", { className: O("ff-popup-body", "ff-drawer-body", e == null ? void 0 : e.body), children: n }), A("div", { className: O("ff-popup-footer", "ff-drawer-footer", e == null ? void 0 : e.footer), children: [s, a] })] }), Br = ({ className: t, classNames: e, $close: i, $event: n, children: r, title: o, subTitle: a, actions: s, extras: l, placement: d, ...u }) => { +Ni.propTypes = { triggerWeights: b.array, options: b.arrayOf(b.shape({ ...P.propTypes, widgetType: P.propTypes.widgetType.isRequired })), btnSize: P.propTypes.size, btnRender: b.func, btnVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelVariant: b.oneOf(["", "default", "link", "circle", "round", "dashed"]), labelRender: b.func, labelSize: P.propTypes.size, onAfterClick: b.func, onBeforeClick: b.func, widgetContainerProps: P.propTypes.widgetContainerProps, data: P.propTypes.data }, P.Link = Vr, P.Link.defaultProps = P.defaultProps, P.Link.propTypes = P.propTypes, P.Circle = Mr, P.Circle.defaultProps = P.defaultProps, P.Circle.propTypes = P.propTypes, P.Round = Dr, P.Round.defaultProps = P.defaultProps, P.Round.propTypes = P.propTypes, P.Dashed = zr, P.Dashed.defaultProps = P.defaultProps, P.Dashed.propTypes = P.propTypes, P.Popover = Ot, P.GroupPopover = Ni; +const Wr = ({ fields: t, formProps: e, $close: i }) => { + const [n] = re.useForm(), r = H(() => [{ name: "__PROPS__", value: e }], [e]); + return h(ee, { actions: j(E.Fragment, { children: [h(P, { name: "取消", widget: () => i(!1) }), h(P, { name: "确定", type: "primary", widget: () => n.validateFields(!0).then(i) })] }), children: h(re, { fields: r, form: n, className: "ff-modal-form", children: t == null ? void 0 : t.map(({ code: o, ...a }) => h(ti, { code: o, ...a }, o)) }) }); +}, Br = ({ className: t, classNames: e, $close: i, children: n, title: r, subTitle: o, actions: a, extras: s, ...l }) => j(Un, { ...l, prefixCls: "ff-drawer", className: O("ff-popup", t), maskMotion: { motionAppear: !0, motionName: "mask-motion" }, motion: (d) => ({ motionAppear: !0, motionName: `panel-motion-${d}` }), children: [j("div", { className: O("ff-popup-header", "ff-drawer-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: O("ff-popup-close", "ff-drawer-close", e == null ? void 0 : e.close), onClick: l.onClose, children: h(Qt, { type: "close" }) }), r, o] }), h("div", { className: O("ff-popup-body", "ff-drawer-body", e == null ? void 0 : e.body), children: n }), j("div", { className: O("ff-popup-footer", "ff-drawer-footer", e == null ? void 0 : e.footer), children: [s, a] })] }), Ur = ({ className: t, classNames: e, $close: i, $event: n, children: r, title: o, subTitle: a, actions: s, extras: l, placement: d, ...u }) => { const p = (n == null ? void 0 : n.pageX) === void 0 ? { animation: null, maskAnimation: null, mousePosition: { x: null, y: null } } : { animation: "zoom", maskAnimation: "fade", mousePosition: { x: n == null ? void 0 : n.pageX, y: n == null ? void 0 : n.pageY } }; - return g(Un, { ...u, ...p, prefixCls: "ff-modal", modalRender: () => A("div", { className: O("ff-modal-content ff-popup", t), children: [A("div", { className: O("ff-popup-header", "ff-modal-header", e == null ? void 0 : e.header), children: [g("button", { "aria-label": "Close", className: O("ff-popup-close", "ff-modal-close", e == null ? void 0 : e.close), onClick: u.onClose, children: g(Qt, { type: "close" }) }), o, a] }), g("div", { className: O("ff-popup-body", "ff-modal-body", e == null ? void 0 : e.body), children: r }), A("div", { className: O("ff-popup-footer", "ff-modal-footer", e == null ? void 0 : e.footer), children: [l, s] })] }) }); + return h(qn, { ...u, ...p, prefixCls: "ff-modal", modalRender: () => j("div", { className: O("ff-modal-content ff-popup", t), children: [j("div", { className: O("ff-popup-header", "ff-modal-header", e == null ? void 0 : e.header), children: [h("button", { "aria-label": "Close", className: O("ff-popup-close", "ff-modal-close", e == null ? void 0 : e.close), onClick: u.onClose, children: h(Qt, { type: "close" }) }), o, a] }), h("div", { className: O("ff-popup-body", "ff-modal-body", e == null ? void 0 : e.body), children: r }), j("div", { className: O("ff-popup-footer", "ff-modal-footer", e == null ? void 0 : e.footer), children: [l, s] })] }) }); }, tn = ({ placement: t, $close: e, $event: i, children: n, title: r, ...o }) => { const [a, s] = L({}), [l, d] = L(!0), u = Y((y, w) => s((C) => ({ ...C, [y]: w })), []), p = Y((y) => s((w) => ({ ...w, [y]: void 0 })), []); let f = { ...o, className: a.rootClassName, title: a.title || r && E.createElement("div", { className: O("ff-popup-title") }, r), subTitle: a["sub-title"], actions: a.actions, extras: a.extras, children: n, $close: e, $event: i, onClose: () => d(!1) }; - const h = () => { + const g = () => { e(!1); }; - return g(pt.Provider, { value: { ele: a, mount: u, unmount: p }, children: t && t !== "center" ? g(Wr, { ...f, placement: t, open: l, afterOpenChange: (y) => !y && h() }) : g(Br, { ...f, visible: l, afterClose: h }) }); + return h(pt.Provider, { value: { ele: a, mount: u, unmount: p }, children: t && t !== "center" ? h(Br, { ...f, placement: t, open: l, afterOpenChange: (y) => !y && g() }) : h(Ur, { ...f, visible: l, afterClose: g }) }); }; tn.propTypes = { placement: b.oneOf(["center", "left", "top", "right", "bottom"]) }; const ie = () => { @@ -978,22 +974,22 @@ const ie = () => { const { offsetHeight: a } = o; return { height: a }; }, onLeaveActive: () => ({ height: 0, opacity: 0, margin: 0 }) }, prefixCls: "ff-notification" }), [, i] = E.useReducer((o) => o + 1, 0); - V(() => { + M(() => { ie.$onClick = n, ie.$queue.forEach(([o, a, s], l, d) => { r([a, s], ...o), delete d[l]; }); }, []); const n = (o, a = {}, s = {}) => new Promise((l, d) => r([l, d], o, a, s)), r = ([o, a], s, l = {}, d = {}) => { - const u = ie.$index++, p = (f) => ((h, y) => (ie.$popups.delete(h), i(), y == null ? void 0 : y()))(u, () => o(f)); + const u = ie.$index++, p = (f) => ((g, y) => (ie.$popups.delete(g), i(), y == null ? void 0 : y()))(u, () => o(f)); if (s === Li) return t.open({ ...d, key: u, content: E.createElement(s, { ...l, $close: () => t.close(u) }) }); ie.$popups.set(u, E.createElement(tn, { maskClosable: !1, $event: l == null ? void 0 : l.$event, ...d, key: u, $close: p }, E.isValidElement(s) ? E.cloneElement(s, { ...l, $close: p }) : s != null && s.name || fi.isForwardRef(s) || (s == null ? void 0 : s.$$typeof) === fi.ForwardRef ? E.createElement(s, { ...l, $close: p }) : s)), i(); }; - return A(E.Fragment, { children: [Array.from(ie.$popups).map(([o, a]) => a), e] }); + return j(E.Fragment, { children: [Array.from(ie.$popups).map(([o, a]) => a), e] }); }; ie.$popups = /* @__PURE__ */ new Map(), ie.$index = 0, ie.$queue = [], ie.$onClick = (...t) => new Promise((e, i) => { ie.$queue.push([t, e, i]); }); -const Pi = (t, e, i = {}) => ie.$onClick(t, e, i), It = (t, { showProgress: e, duration: i, ...n } = { duration: 1.5 }) => ie.$onClick(Li, { content: t, ...n }, { showProgress: e, duration: i }), ne = { modal: Pi, confirm: (t, e = {}) => ie.$onClick(qn, { content: t, ...e }, { placement: "center" }), form: (t, e = {}, i = {}) => Pi(zr, { formProps: i, fields: t }, { placement: "center", ...e }).then((n) => { +const Pi = (t, e, i = {}) => ie.$onClick(t, e, i), It = (t, { showProgress: e, duration: i, ...n } = { duration: 1.5 }) => ie.$onClick(Li, { content: t, ...n }, { showProgress: e, duration: i }), ne = { modal: Pi, confirm: (t, e = {}) => ie.$onClick(Kn, { content: t, ...e }, { placement: "center" }), form: (t, e = {}, i = {}) => Pi(Wr, { formProps: i, fields: t }, { placement: "center", ...e }).then((n) => { if (n === !1) throw !1; return n; }), notification: It, success: (t, e = { duration: 1.5 }) => It(t, { ...e, className: "ff-notification-success", icon: "check" }), error: (t, e = { duration: 1.5 }) => It(t, { ...e, className: "ff-notification-error", icon: "close" }) }; @@ -1053,7 +1049,7 @@ var Le, Xe; const be = class be { constructor() { x(this, Xe, /* @__PURE__ */ new Map()); - N(this, "setVendor", (e, i) => c(this, Xe).set(e, new ji(i, async (n, r) => { + N(this, "setVendor", (e, i) => c(this, Xe).set(e, new Ai(i, async (n, r) => { var a, s; if (!(n != null && n.default)) throw "@pkg not found"; let o = () => r; @@ -1119,16 +1115,16 @@ const be = class be { }; Le = new WeakMap(), Xe = new WeakMap(), x(be, Le, null), N(be, "getInstance", () => (c(be, Le) || B(be, Le, new be()), c(be, Le))); let Yt = be; -const ue = Yt.getInstance(), Ur = E.createContext({ user: {}, initUser: () => { -}, initUserComplete: !1 }), qr = E.createContext({ set: () => { +const ue = Yt.getInstance(), qr = E.createContext({ user: {}, initUser: () => { +}, initUserComplete: !1 }), Kr = E.createContext({ set: () => { }, get: () => { }, assign: () => { }, currentRoute: () => { -} }), ri = (t) => !!(t != null && t.name) && (t.prototype instanceof E.Component || /^[A-Z]/.test(t.name)), Kr = (t, e) => { +} }), ri = (t) => !!(t != null && t.name) && (t.prototype instanceof E.Component || /^[A-Z]/.test(t.name)), Hr = (t, e) => { if (!t || typeof window > "u") return; let i = document.querySelector(`style[ff-style-token="${e}"]`); return i ? (i.innerHTML = t, t) : (i = document.createElement("style"), i.setAttribute("ff-style-token", e), i.setAttribute("type", "text/css"), i.innerHTML = t, document.head.appendChild(i), t); -}, _r = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: Ur, AppGlobalParamsContext: qr, cache: ji, configure: Ue, default: ue, func: Ie, http: I, insertStyle: Kr, isReactComponent: ri, route: Ne }, Symbol.toStringTag, { value: "Module" })); +}, Jr = Object.freeze(Object.defineProperty({ __proto__: null, AppContext: qr, AppGlobalParamsContext: Kr, cache: Ai, configure: Ue, default: ue, func: Ie, http: I, insertStyle: Hr, isReactComponent: ri, route: Ne }, Symbol.toStringTag, { value: "Module" })); var ve, Qe, xe, Ce, ke, te, Z, G, Se, st, lt, ct, dt, Pt, ut; const oi = class oi { constructor(e, i = "/") { @@ -1150,11 +1146,11 @@ const oi = class oi { this.root.lastModified = i; }); x(this, ke, (e) => { - let i = ge.normalize(e); + let i = he.normalize(e); return i.startsWith("/") || (i = "/" + i), i.length > 1 && i.endsWith("/") && (i = i.slice(0, -1)), i; }); x(this, te, (e) => { - const i = ge.join(c(this, ve), e); + const i = he.join(c(this, ve), e); return c(this, ke).call(this, i); }); x(this, Z, (e) => { @@ -1177,10 +1173,10 @@ const oi = class oi { return r; }); x(this, Se, (e) => { - const i = c(this, ke).call(this, e), n = ge.basename(i), r = ge.dirname(i); + const i = c(this, ke).call(this, e), n = he.basename(i), r = he.dirname(i); return { parent: c(this, G).call(this, r), name: n }; }); - x(this, st, (e, i, n) => n === !1 ? e : n === "root" ? e.map((r) => ge.join(i, r)) : n === !0 || n === "working" ? e.map((r) => ge.relative(c(this, ve), ge.join(i, r))) : e); + x(this, st, (e, i, n) => n === !1 ? e : n === "root" ? e.map((r) => he.join(i, r)) : n === !0 || n === "working" ? e.map((r) => he.relative(c(this, ve), he.join(i, r))) : e); x(this, lt, async (e, i, n, r = "") => { const o = [], a = c(this, G).call(this, e); if (!a || a.type !== "dir") return o; @@ -1207,7 +1203,7 @@ const oi = class oi { const u = await c(this, Pt).call(this, e, d); o.push(...u); } else { - const u = ge.join(e, d), p = c(this, ke).call(this, u); + const u = he.join(e, d), p = c(this, ke).call(this, u); c(this, G).call(this, p) && o.push(d); } return o; @@ -1216,16 +1212,16 @@ const oi = class oi { for (const d of l) { const u = d.name, p = e === "/" ? `/${u}` : `${e}/${u}`, f = r ? `${r}/${u}` : u; try { - if (d.type === "file") for (const h of a) { + if (d.type === "file") for (const g of a) { let y = !1; - if (y = c(this, dt).call(this, h) ? c(this, ut).call(this, u, h) : u === h, y) { + if (y = c(this, dt).call(this, g) ? c(this, ut).call(this, u, g) : u === g, y) { o.push(f); break; } } else if (d.type === "dir") { - const h = await c(this, ct).call(this, p, i, n, f); - o.push(...h); + const g = await c(this, ct).call(this, p, i, n, f); + o.push(...g); } } catch { continue; @@ -1288,7 +1284,7 @@ const oi = class oi { const o = n.split("/").filter((s) => s); let a = "/"; for (const s of o) - if (a = ge.join(a, s), !c(this, G).call(this, a)) { + if (a = he.join(a, s), !c(this, G).call(this, a)) { const { parent: l, name: d } = c(this, Se).call(this, a); if (l && l.type === "dir") { const u = { name: d, type: "dir", children: [], lastModified: Date.now() }; @@ -1378,9 +1374,9 @@ const oi = class oi { }; ve = new WeakMap(), Qe = new WeakMap(), xe = new WeakMap(), Ce = new WeakMap(), ke = new WeakMap(), te = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Se = new WeakMap(), st = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), Pt = new WeakMap(), ut = new WeakMap(); let Ti = oi; -const Hr = async (t, e = "/", i = "") => { +const _r = async (t, e = "/", i = "") => { try { - const n = await t.stat(e), r = e === "/" ? "/" : ge.basename(e), o = { title: r, key: i ? `${i}${e}` : e, isLeaf: n.isFile() }; + const n = await t.stat(e), r = e === "/" ? "/" : he.basename(e), o = { title: r, key: i ? `${i}${e}` : e, isLeaf: n.isFile() }; if (n.isDirectory()) { const a = await t.dir(e); if (a.length > 0) { @@ -1398,7 +1394,7 @@ const Hr = async (t, e = "/", i = "") => { for (const d of [...s, ...l]) { const u = e === "/" ? `/${d}` : `${e}/${d}`; try { - const p = await Hr(t, u, i); + const p = await _r(t, u, i); o.children.push(p); } catch (p) { console.warn(`Failed to process ${u}:`, p.message); @@ -1412,100 +1408,99 @@ const Hr = async (t, e = "/", i = "") => { } }; export { - xo as $, - Ji as A, + Po as $, + _i as A, Ki as B, qi as C, kt as D, - cr as E, - lr as F, - $o as G, - pr as H, - ar as I, + dr as E, + cr as F, + xo as G, + gr as H, + sr as I, ei as J, ae as K, - ur as L, - yr as M, - ir as N, - rr as O, - Qn as P, - Zn as Q, - _i as R, - Co as S, - ko as T, + pr as L, + wr as M, + nr as N, + or as O, + Zn as P, + er as Q, + Hi as R, + So as S, + Eo as T, Wi as U, qt as V, - er as W, - tr as X, - wr as Y, - br as Z, - vo as _, + tr as W, + ir as X, + br as Y, + Cr as Z, + No as _, Vi as a, Tt as a0, - No as a1, - Po as a2, - gt as a3, - mt as a4, - To as a5, - Oo as a6, - Tr as a7, - ii as a8, - ti as a9, - Ie as aA, - Ne as aB, - Ur as aC, - qr as aD, - Ti as aE, - Hr as aF, - Zi as aa, - kr as ab, - Sr as ac, - Er as ad, - $r as ae, - vr as af, - xr as ag, - Ro as ah, - St as ai, - P as aj, - Ii as ak, - Ar as al, - ee as am, - pt as an, - Ai as ao, - ie as ap, - ne as aq, - po as ar, - ho as as, - go as at, - ue as au, - ri as av, - Kr as aw, - I as ax, - ji as ay, - Ue as az, - _n as b, - ht as c, + To as a1, + ht as a2, + mt as a3, + Oo as a4, + Ro as a5, + Or as a6, + ii as a7, + ti as a8, + Zi as a9, + Ne as aA, + qr as aB, + Kr as aC, + Ti as aD, + _r as aE, + Sr as aa, + Er as ab, + $r as ac, + vr as ad, + xr as ae, + Nr as af, + Fo as ag, + St as ah, + P as ai, + Ii as aj, + Lr as ak, + ee as al, + pt as am, + ji as an, + ie as ao, + ne as ap, + ho as aq, + mo as ar, + fo as as, + ue as at, + ri as au, + Hr as av, + I as aw, + Ai as ax, + Ue as ay, + Ie as az, + Jn as b, + gt as c, Mi as d, - fo as e, - yo as f, - Kn as g, - wo as h, - Hn as i, - Gn as j, - bo as k, + wo as e, + bo as f, + Hn as g, + Co as h, + _n as i, + Yn as j, + ko as k, Bi as l, - Jn as m, - So as n, + Gn as m, + $o as n, Ui as o, Zt as p, - Hi as q, + Ji as q, Lt as r, Yi as s, de as t, - mo as u, - mr as v, + yo as u, + fr as v, Gi as w, hr as x, - gr as y, - Eo as z + mr as y, + vo as z }; diff --git a/dist/common/vender-DTKG7Nf1.js b/dist/common/vender-DJd-PP9T.js similarity index 76% rename from dist/common/vender-DTKG7Nf1.js rename to dist/common/vender-DJd-PP9T.js index ccc05d6..589f5da 100644 --- a/dist/common/vender-DTKG7Nf1.js +++ b/dist/common/vender-DJd-PP9T.js @@ -1,27 +1,27 @@ -import ur from "react"; -function ke(t, e) { +import Ue from "react"; +function Be(t, e) { return function() { return t.apply(e, arguments); }; } -const { toString: lr } = Object.prototype, { getPrototypeOf: Jt } = Object, ft = (bt = /* @__PURE__ */ Object.create(null), (t) => { - const e = lr.call(t); +const { toString: pr } = Object.prototype, { getPrototypeOf: Jt } = Object, ft = (bt = /* @__PURE__ */ Object.create(null), (t) => { + const e = pr.call(t); return bt[e] || (bt[e] = e.slice(8, -1).toLowerCase()); }); var bt; -const B = (t) => (t = t.toLowerCase(), (e) => ft(e) === t), gt = (t) => (e) => typeof e === t, { isArray: J } = Array, Z = gt("undefined"), Xt = B("ArrayBuffer"), fr = gt("string"), k = gt("function"), Qt = gt("number"), ot = (t) => t !== null && typeof t == "object", st = (t) => { +const B = (t) => (t = t.toLowerCase(), (e) => ft(e) === t), yt = (t) => (e) => typeof e === t, { isArray: J } = Array, Z = yt("undefined"), Xt = B("ArrayBuffer"), yr = yt("string"), k = yt("function"), Qt = yt("number"), ot = (t) => t !== null && typeof t == "object", st = (t) => { if (ft(t) !== "object") return !1; const e = Jt(t); return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t); -}, hr = B("Date"), dr = B("File"), pr = B("Blob"), gr = B("FileList"), mr = B("URLSearchParams"), [yr, br, wr, vr] = ["ReadableStream", "Request", "Response", "Headers"].map(B); +}, mr = B("Date"), gr = B("File"), br = B("Blob"), wr = B("FileList"), vr = B("URLSearchParams"), [Er, Ar, Or, Sr] = ["ReadableStream", "Request", "Response", "Headers"].map(B); function Y(t, e, { allOwnKeys: r = !1 } = {}) { if (t == null) return; let n, o; if (typeof t != "object" && (t = [t]), J(t)) for (n = 0, o = t.length; n < o; n++) e.call(null, t[n], n, t); else { const a = r ? Object.getOwnPropertyNames(t) : Object.keys(t), c = a.length; - let y; - for (n = 0; n < c; n++) y = a[n], e.call(null, t[y], y, t); + let g; + for (n = 0; n < c; n++) g = a[n], e.call(null, t[g], g, t); } } function Zt(t, e) { @@ -31,15 +31,15 @@ function Zt(t, e) { for (; o-- > 0; ) if (n = r[o], e === n.toLowerCase()) return n; return null; } -const Ue = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Yt = (t) => !Z(t) && t !== Ue, Er = (wt = typeof Uint8Array < "u" && Jt(Uint8Array), (t) => wt && t instanceof wt); +const Me = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Yt = (t) => !Z(t) && t !== Me, Cr = (wt = typeof Uint8Array < "u" && Jt(Uint8Array), (t) => wt && t instanceof wt); var wt; -const Ar = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Or = B("RegExp"), ee = (t, e) => { +const Rr = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), xr = B("RegExp"), ee = (t, e) => { const r = Object.getOwnPropertyDescriptors(t), n = {}; Y(r, (o, a) => { let c; (c = e(o, a, t)) !== !1 && (n[a] = c || o); }), Object.defineProperties(t, n); -}, vt = "abcdefghijklmnopqrstuvwxyz", re = "0123456789", ne = { DIGIT: re, ALPHA: vt, ALPHA_DIGIT: vt + vt.toUpperCase() + re }, Sr = B("AsyncFunction"), v = { isArray: J, isArrayBuffer: Xt, isBuffer: function(t) { +}, vt = "abcdefghijklmnopqrstuvwxyz", re = "0123456789", ne = { DIGIT: re, ALPHA: vt, ALPHA_DIGIT: vt + vt.toUpperCase() + re }, Tr = B("AsyncFunction"), v = { isArray: J, isArrayBuffer: Xt, isBuffer: function(t) { return t !== null && !Z(t) && t.constructor !== null && !Z(t.constructor) && k(t.constructor.isBuffer) && t.constructor.isBuffer(t); }, isFormData: (t) => { let e; @@ -47,7 +47,7 @@ const Ar = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.ca }, isArrayBufferView: function(t) { let e; return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && Xt(t.buffer), e; -}, isString: fr, isNumber: Qt, isBoolean: (t) => t === !0 || t === !1, isObject: ot, isPlainObject: st, isReadableStream: yr, isRequest: br, isResponse: wr, isHeaders: vr, isUndefined: Z, isDate: hr, isFile: dr, isBlob: pr, isRegExp: Or, isFunction: k, isStream: (t) => ot(t) && k(t.pipe), isURLSearchParams: mr, isTypedArray: Er, isFileList: gr, forEach: Y, merge: function t() { +}, isString: yr, isNumber: Qt, isBoolean: (t) => t === !0 || t === !1, isObject: ot, isPlainObject: st, isReadableStream: Er, isRequest: Ar, isResponse: Or, isHeaders: Sr, isUndefined: Z, isDate: mr, isFile: gr, isBlob: br, isRegExp: xr, isFunction: k, isStream: (t) => ot(t) && k(t.pipe), isURLSearchParams: vr, isTypedArray: Cr, isFileList: wr, forEach: Y, merge: function t() { const { caseless: e } = Yt(this) && this || {}, r = {}, n = (o, a) => { const c = e && Zt(r, a) || a; st(r[c]) && st(o) ? r[c] = t(r[c], o) : st(o) ? r[c] = t({}, o) : J(o) ? r[c] = o.slice() : r[c] = o; @@ -55,15 +55,15 @@ const Ar = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.ca for (let o = 0, a = arguments.length; o < a; o++) arguments[o] && Y(arguments[o], n); return r; }, extend: (t, e, r, { allOwnKeys: n } = {}) => (Y(e, (o, a) => { - r && k(o) ? t[a] = ke(o, r) : t[a] = o; + r && k(o) ? t[a] = Be(o, r) : t[a] = o; }, { allOwnKeys: n }), t), trim: (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), stripBOM: (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), inherits: (t, e, r, n) => { t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), r && Object.assign(t.prototype, r); }, toFlatObject: (t, e, r, n) => { let o, a, c; - const y = {}; + const g = {}; if (e = e || {}, t == null) return e; do { - for (o = Object.getOwnPropertyNames(t), a = o.length; a-- > 0; ) c = o[a], n && !n(c, t, e) || y[c] || (e[c] = t[c], y[c] = !0); + for (o = Object.getOwnPropertyNames(t), a = o.length; a-- > 0; ) c = o[a], n && !n(c, t, e) || g[c] || (e[c] = t[c], g[c] = !0); t = r !== !1 && Jt(t); } while (t && (!r || r(t, e)) && t !== Object.prototype); return e; @@ -91,7 +91,7 @@ const Ar = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.ca const n = []; for (; (r = t.exec(e)) !== null; ) n.push(r); return n; -}, isHTMLForm: Ar, hasOwnProperty: te, hasOwnProp: te, reduceDescriptors: ee, freezeMethods: (t) => { +}, isHTMLForm: Rr, hasOwnProperty: te, hasOwnProp: te, reduceDescriptors: ee, freezeMethods: (t) => { ee(t, (e, r) => { if (k(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1) return !1; const n = t[r]; @@ -109,7 +109,7 @@ const Ar = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.ca }, toCamelCase: (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, r, n) { return r.toUpperCase() + n; }), noop: () => { -}, toFiniteNumber: (t, e) => t != null && Number.isFinite(t = +t) ? t : e, findKey: Zt, global: Ue, isContextDefined: Yt, ALPHABET: ne, generateString: (t = 16, e = ne.ALPHA_DIGIT) => { +}, toFiniteNumber: (t, e) => t != null && Number.isFinite(t = +t) ? t : e, findKey: Zt, global: Me, isContextDefined: Yt, ALPHABET: ne, generateString: (t = 16, e = ne.ALPHA_DIGIT) => { let r = ""; const { length: n } = e; for (; t--; ) r += e[Math.random() * n | 0]; @@ -123,16 +123,16 @@ const Ar = B("HTMLFormElement"), te = (({ hasOwnProperty: t }) => (e, r) => t.ca if (!("toJSON" in n)) { e[o] = n; const a = J(n) ? [] : {}; - return Y(n, (c, y) => { - const g = r(c, o + 1); - !Z(g) && (a[y] = g); + return Y(n, (c, g) => { + const y = r(c, o + 1); + !Z(y) && (a[g] = y); }), e[o] = void 0, a; } } return n; }; return r(t, 0); -}, isAsyncFn: Sr, isThenable: (t) => t && (ot(t) || k(t)) && k(t.then) && k(t.catch) }; +}, isAsyncFn: Tr, isThenable: (t) => t && (ot(t) || k(t)) && k(t.then) && k(t.catch) }; function C(t, e, r, n, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), o && (this.response = o); } @@ -144,22 +144,22 @@ const oe = C.prototype, se = {}; se[t] = { value: t }; }), Object.defineProperties(C, se), Object.defineProperty(oe, "isAxiosError", { value: !0 }), C.from = (t, e, r, n, o, a) => { const c = Object.create(oe); - return v.toFlatObject(t, c, function(y) { - return y !== Error.prototype; - }, (y) => y !== "isAxiosError"), C.call(c, t.message, e, r, n, o), c.cause = t, c.name = t.name, a && Object.assign(c, a), c; + return v.toFlatObject(t, c, function(g) { + return g !== Error.prototype; + }, (g) => g !== "isAxiosError"), C.call(c, t.message, e, r, n, o), c.cause = t, c.name = t.name, a && Object.assign(c, a), c; }; function Et(t) { return v.isPlainObject(t) || v.isArray(t); } -function Be(t) { +function Le(t) { return v.endsWith(t, "[]") ? t.slice(0, -2) : t; } function ie(t, e, r) { return t ? t.concat(e).map(function(n, o) { - return n = Be(n), !r && o ? "[" + n + "]" : n; + return n = Le(n), !r && o ? "[" + n + "]" : n; }).join(r ? "." : "") : e; } -const Cr = v.toFlatObject(v, {}, null, function(t) { +const _r = v.toFlatObject(v, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function ht(t, e, r) { @@ -167,13 +167,13 @@ function ht(t, e, r) { e = e || new FormData(); const n = (r = v.toFlatObject(r, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(w, E) { return !v.isUndefined(E[w]); - })).metaTokens, o = r.visitor || m, a = r.dots, c = r.indexes, y = (r.Blob || typeof Blob < "u" && Blob) && v.isSpecCompliantForm(e); + })).metaTokens, o = r.visitor || m, a = r.dots, c = r.indexes, g = (r.Blob || typeof Blob < "u" && Blob) && v.isSpecCompliantForm(e); if (!v.isFunction(o)) throw new TypeError("visitor must be a function"); - function g(w) { + function y(w) { if (w === null) return ""; if (v.isDate(w)) return w.toISOString(); - if (!y && v.isBlob(w)) throw new C("Blob is not supported. Use a Buffer instead."); - return v.isArrayBuffer(w) || v.isTypedArray(w) ? y && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w; + if (!g && v.isBlob(w)) throw new C("Blob is not supported. Use a Buffer instead."); + return v.isArrayBuffer(w) || v.isTypedArray(w) ? g && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w; } function m(w, E, d) { let l = w; @@ -181,13 +181,13 @@ function ht(t, e, r) { if (v.endsWith(E, "{}")) E = n ? E : E.slice(0, -2), w = JSON.stringify(w); else if (v.isArray(w) && function(i) { return v.isArray(i) && !i.some(Et); - }(w) || (v.isFileList(w) || v.endsWith(E, "[]")) && (l = v.toArray(w))) return E = Be(E), l.forEach(function(i, u) { - !v.isUndefined(i) && i !== null && e.append(c === !0 ? ie([E], u, a) : c === null ? E : E + "[]", g(i)); + }(w) || (v.isFileList(w) || v.endsWith(E, "[]")) && (l = v.toArray(w))) return E = Le(E), l.forEach(function(i, u) { + !v.isUndefined(i) && i !== null && e.append(c === !0 ? ie([E], u, a) : c === null ? E : E + "[]", y(i)); }), !1; } - return !!Et(w) || (e.append(ie(d, E, a), g(w)), !1); + return !!Et(w) || (e.append(ie(d, E, a), y(w)), !1); } - const s = [], b = Object.assign(Cr, { defaultVisitor: m, convertValue: g, isVisitable: Et }); + const s = [], b = Object.assign(_r, { defaultVisitor: m, convertValue: y, isVisitable: Et }); if (!v.isObject(t)) throw new TypeError("data must be an object"); return function w(E, d) { if (!v.isUndefined(E)) { @@ -208,12 +208,12 @@ function zt(t, e) { this._pairs = [], t && ht(t, this, e); } const ce = zt.prototype; -function Rr(t) { +function Pr(t) { return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } -function Me(t, e, r) { +function De(t, e, r) { if (!e) return t; - const n = r && r.encode || Rr, o = r && r.serialize; + const n = r && r.encode || Pr, o = r && r.serialize; let a; if (a = o ? o(e, r) : v.isURLSearchParams(e) ? e.toString() : new zt(e, r).toString(n), a) { const c = t.indexOf("#"); @@ -250,22 +250,22 @@ class ue { }); } } -const Le = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, xr = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : zt, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Vt = typeof window < "u" && typeof document < "u", Tr = (le = typeof navigator < "u" && navigator.product, Vt && ["ReactNative", "NativeScript", "NS"].indexOf(le) < 0); +const Fe = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, jr = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : zt, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Vt = typeof window < "u" && typeof document < "u", Nr = (le = typeof navigator < "u" && navigator.product, Vt && ["ReactNative", "NativeScript", "NS"].indexOf(le) < 0); var le; -const _r = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Nr = Vt && window.location.href || "http://localhost", U = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Vt, hasStandardBrowserEnv: Tr, hasStandardBrowserWebWorkerEnv: _r, origin: Nr }, Symbol.toStringTag, { value: "Module" })), ...xr }; -function De(t) { +const kr = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ur = Vt && window.location.href || "http://localhost", U = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: Vt, hasStandardBrowserEnv: Nr, hasStandardBrowserWebWorkerEnv: kr, origin: Ur }, Symbol.toStringTag, { value: "Module" })), ...jr }; +function Ie(t) { function e(r, n, o, a) { let c = r[a++]; if (c === "__proto__") return !0; - const y = Number.isFinite(+c), g = a >= r.length; - return c = !c && v.isArray(o) ? o.length : c, g ? (v.hasOwnProp(o, c) ? o[c] = [o[c], n] : o[c] = n, !y) : (o[c] && v.isObject(o[c]) || (o[c] = []), e(r, n, o[c], a) && v.isArray(o[c]) && (o[c] = function(m) { + const g = Number.isFinite(+c), y = a >= r.length; + return c = !c && v.isArray(o) ? o.length : c, y ? (v.hasOwnProp(o, c) ? o[c] = [o[c], n] : o[c] = n, !g) : (o[c] && v.isObject(o[c]) || (o[c] = []), e(r, n, o[c], a) && v.isArray(o[c]) && (o[c] = function(m) { const s = {}, b = Object.keys(m); let w; const E = b.length; let d; for (w = 0; w < E; w++) d = b[w], s[d] = m[d]; return s; - }(o[c])), !y); + }(o[c])), !g); } if (v.isFormData(t) && v.isFunction(t.entries)) { const r = {}; @@ -277,31 +277,31 @@ function De(t) { } return null; } -const rt = { transitional: Le, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, e) { +const rt = { transitional: Fe, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, e) { const r = e.getContentType() || "", n = r.indexOf("application/json") > -1, o = v.isObject(t); - if (o && v.isHTMLForm(t) && (t = new FormData(t)), v.isFormData(t)) return n ? JSON.stringify(De(t)) : t; + if (o && v.isHTMLForm(t) && (t = new FormData(t)), v.isFormData(t)) return n ? JSON.stringify(Ie(t)) : t; if (v.isArrayBuffer(t) || v.isBuffer(t) || v.isStream(t) || v.isFile(t) || v.isBlob(t) || v.isReadableStream(t)) return t; if (v.isArrayBufferView(t)) return t.buffer; if (v.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let a; if (o) { - if (r.indexOf("application/x-www-form-urlencoded") > -1) return function(c, y) { - return ht(c, new U.classes.URLSearchParams(), Object.assign({ visitor: function(g, m, s, b) { - return U.isNode && v.isBuffer(g) ? (this.append(m, g.toString("base64")), !1) : b.defaultVisitor.apply(this, arguments); - } }, y)); + if (r.indexOf("application/x-www-form-urlencoded") > -1) return function(c, g) { + return ht(c, new U.classes.URLSearchParams(), Object.assign({ visitor: function(y, m, s, b) { + return U.isNode && v.isBuffer(y) ? (this.append(m, y.toString("base64")), !1) : b.defaultVisitor.apply(this, arguments); + } }, g)); }(t, this.formSerializer).toString(); if ((a = v.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { const c = this.env && this.env.FormData; return ht(a ? { "files[]": t } : t, c && new c(), this.formSerializer); } } - return o || n ? (e.setContentType("application/json", !1), function(c, y, g) { + return o || n ? (e.setContentType("application/json", !1), function(c, g, y) { if (v.isString(c)) try { - return (y || JSON.parse)(c), v.trim(c); + return (g || JSON.parse)(c), v.trim(c); } catch (m) { if (m.name !== "SyntaxError") throw m; } - return (g || JSON.stringify)(c); + return (y || JSON.stringify)(c); }(t)) : t; }], transformResponse: [function(t) { const e = this.transitional || rt.transitional, r = e && e.forcedJSONParsing, n = this.responseType === "json"; @@ -322,7 +322,7 @@ const rt = { transitional: Le, adapter: ["xhr", "http", "fetch"], transformReque v.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => { rt.headers[t] = {}; }); -const Pr = v.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]), fe = Symbol("internals"); +const Br = v.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]), fe = Symbol("internals"); function X(t) { return t && String(t).trim().toLowerCase(); } @@ -332,29 +332,29 @@ function it(t) { function At(t, e, r, n, o) { return v.isFunction(n) ? n.call(this, e, r) : (o && (e = r), v.isString(e) ? v.isString(n) ? e.indexOf(n) !== -1 : v.isRegExp(n) ? n.test(e) : void 0 : void 0); } -let j = class { +let N = class { constructor(t) { t && this.set(t); } set(t, e, r) { const n = this; - function o(c, y, g) { - const m = X(y); + function o(c, g, y) { + const m = X(g); if (!m) throw new Error("header name must be a non-empty string"); const s = v.findKey(n, m); - (!s || n[s] === void 0 || g === !0 || g === void 0 && n[s] !== !1) && (n[s || y] = it(c)); + (!s || n[s] === void 0 || y === !0 || y === void 0 && n[s] !== !1) && (n[s || g] = it(c)); } - const a = (c, y) => v.forEach(c, (g, m) => o(g, m, y)); + const a = (c, g) => v.forEach(c, (y, m) => o(y, m, g)); if (v.isPlainObject(t) || t instanceof this.constructor) a(t, e); else if (v.isString(t) && (t = t.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())) a(((c) => { - const y = {}; - let g, m, s; + const g = {}; + let y, m, s; return c && c.split(` `).forEach(function(b) { - s = b.indexOf(":"), g = b.substring(0, s).trim().toLowerCase(), m = b.substring(s + 1).trim(), !g || y[g] && Pr[g] || (g === "set-cookie" ? y[g] ? y[g].push(m) : y[g] = [m] : y[g] = y[g] ? y[g] + ", " + m : m); - }), y; + s = b.indexOf(":"), y = b.substring(0, s).trim().toLowerCase(), m = b.substring(s + 1).trim(), !y || g[y] && Br[y] || (y === "set-cookie" ? g[y] ? g[y].push(m) : g[y] = [m] : g[y] = g[y] ? g[y] + ", " + m : m); + }), g; })(t), e); - else if (v.isHeaders(t)) for (const [c, y] of t.entries()) o(y, c, r); + else if (v.isHeaders(t)) for (const [c, g] of t.entries()) o(g, c, r); else t != null && o(e, t, r); return this; } @@ -366,8 +366,8 @@ let j = class { if (!e) return n; if (e === !0) return function(o) { const a = /* @__PURE__ */ Object.create(null), c = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let y; - for (; y = c.exec(o); ) a[y[1]] = y[2]; + let g; + for (; g = c.exec(o); ) a[g[1]] = g[2]; return a; }(n); if (v.isFunction(e)) return e.call(this, n, r); @@ -408,8 +408,8 @@ let j = class { return v.forEach(this, (n, o) => { const a = v.findKey(r, o); if (a) return e[a] = it(n), void delete e[o]; - const c = t ? function(y) { - return y.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (g, m, s) => m.toUpperCase() + s); + const c = t ? function(g) { + return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (y, m, s) => m.toUpperCase() + s); }(o) : String(o).trim(); c !== o && delete e[o], e[c] = it(n), r[c] = !0; }), this; @@ -444,11 +444,11 @@ let j = class { const e = (this[fe] = this[fe] = { accessors: {} }).accessors, r = this.prototype; function n(o) { const a = X(o); - e[a] || (function(c, y) { - const g = v.toCamelCase(" " + y); + e[a] || (function(c, g) { + const y = v.toCamelCase(" " + g); ["get", "set", "has"].forEach((m) => { - Object.defineProperty(c, m + g, { value: function(s, b, w) { - return this[m].call(this, y, s, b, w); + Object.defineProperty(c, m + y, { value: function(s, b, w) { + return this[m].call(this, g, s, b, w); }, configurable: !0 }); }); }(r, o), e[a] = !0); @@ -457,60 +457,60 @@ let j = class { } }; function Ot(t, e) { - const r = this || rt, n = e || r, o = j.from(n.headers); + const r = this || rt, n = e || r, o = N.from(n.headers); let a = n.data; return v.forEach(t, function(c) { a = c.call(r, a, o.normalize(), e ? e.status : void 0); }), o.normalize(), a; } -function Fe(t) { +function qe(t) { return !(!t || !t.__CANCEL__); } function G(t, e, r) { C.call(this, t ?? "canceled", C.ERR_CANCELED, e, r), this.name = "CanceledError"; } -function Ie(t, e, r) { +function We(t, e, r) { const n = r.config.validateStatus; r.status && n && !n(r.status) ? e(new C("Request failed with status code " + r.status, [C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4], r.config, r.request, r)) : t(r); } -j.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), v.reduceDescriptors(j.prototype, ({ value: t }, e) => { +N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), v.reduceDescriptors(N.prototype, ({ value: t }, e) => { let r = e[0].toUpperCase() + e.slice(1); return { get: () => t, set(n) { this[r] = n; } }; -}), v.freezeMethods(j), v.inherits(G, C, { __CANCEL__: !0 }); +}), v.freezeMethods(N), v.inherits(G, C, { __CANCEL__: !0 }); const dt = (t, e, r = 3) => { let n = 0; const o = function(a, c) { a = a || 10; - const y = new Array(a), g = new Array(a); + const g = new Array(a), y = new Array(a); let m, s = 0, b = 0; return c = c !== void 0 ? c : 1e3, function(w) { - const E = Date.now(), d = g[b]; - m || (m = E), y[s] = w, g[s] = E; + const E = Date.now(), d = y[b]; + m || (m = E), g[s] = w, y[s] = E; let l = b, i = 0; - for (; l !== s; ) i += y[l++], l %= a; + for (; l !== s; ) i += g[l++], l %= a; if (s = (s + 1) % a, s === b && (b = (b + 1) % a), E - m < c) return; const u = d && E - d; return u ? Math.round(1e3 * i / u) : void 0; }; }(50, 250); return function(a, c) { - let y = 0; - const g = 1e3 / c; + let g = 0; + const y = 1e3 / c; let m = null; return function() { const s = this === !0, b = Date.now(); - if (s || b - y > g) return m && (clearTimeout(m), m = null), y = b, a.apply(null, arguments); - m || (m = setTimeout(() => (m = null, y = Date.now(), a.apply(null, arguments)), g - (b - y))); + if (s || b - g > y) return m && (clearTimeout(m), m = null), g = b, a.apply(null, arguments); + m || (m = setTimeout(() => (m = null, g = Date.now(), a.apply(null, arguments)), y - (b - g))); }; }((a) => { - const c = a.loaded, y = a.lengthComputable ? a.total : void 0, g = c - n, m = o(g); + const c = a.loaded, g = a.lengthComputable ? a.total : void 0, y = c - n, m = o(y); n = c; - const s = { loaded: c, total: y, progress: y ? c / y : void 0, bytes: g, rate: m || void 0, estimated: m && y && c <= y ? (y - c) / m : void 0, event: a, lengthComputable: y != null }; + const s = { loaded: c, total: g, progress: g ? c / g : void 0, bytes: y, rate: m || void 0, estimated: m && g && c <= g ? (g - c) / m : void 0, event: a, lengthComputable: g != null }; s[e ? "download" : "upload"] = !0, t(s); }, r); -}, jr = U.hasStandardBrowserEnv ? function() { +}, Mr = U.hasStandardBrowserEnv ? function() { const t = /(msie|trident)/i.test(navigator.userAgent), e = document.createElement("a"); let r; function n(o) { @@ -523,7 +523,7 @@ const dt = (t, e, r = 3) => { }; }() : function() { return !0; -}, kr = U.hasStandardBrowserEnv ? { write(t, e, r, n, o, a) { +}, Lr = U.hasStandardBrowserEnv ? { write(t, e, r, n, o, a) { const c = [t + "=" + encodeURIComponent(e)]; v.isNumber(r) && c.push("expires=" + new Date(r).toGMTString()), v.isString(n) && c.push("path=" + n), v.isString(o) && c.push("domain=" + o), a === !0 && c.push("secure"), document.cookie = c.join("; "); }, read(t) { @@ -534,12 +534,12 @@ const dt = (t, e, r = 3) => { } } : { write() { }, read: () => null, remove() { } }; -function qe(t, e) { +function $e(t, e) { return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(r, n) { return n ? r.replace(/\/?\/$/, "") + "/" + n.replace(/^\/+/, "") : r; }(t, e) : e; } -const he = (t) => t instanceof j ? { ...t } : t; +const he = (t) => t instanceof N ? { ...t } : t; function H(t, e) { e = e || {}; const r = {}; @@ -555,48 +555,48 @@ function H(t, e) { function c(m, s) { return v.isUndefined(s) ? v.isUndefined(m) ? void 0 : n(void 0, m) : n(void 0, s); } - function y(m, s, b) { + function g(m, s, b) { return b in e ? n(m, s) : b in t ? n(void 0, m) : void 0; } - const g = { url: a, method: a, data: a, baseURL: c, transformRequest: c, transformResponse: c, paramsSerializer: c, timeout: c, timeoutMessage: c, withCredentials: c, withXSRFToken: c, adapter: c, responseType: c, xsrfCookieName: c, xsrfHeaderName: c, onUploadProgress: c, onDownloadProgress: c, decompress: c, maxContentLength: c, maxBodyLength: c, beforeRedirect: c, transport: c, httpAgent: c, httpsAgent: c, cancelToken: c, socketPath: c, responseEncoding: c, validateStatus: y, headers: (m, s) => o(he(m), he(s), !0) }; + const y = { url: a, method: a, data: a, baseURL: c, transformRequest: c, transformResponse: c, paramsSerializer: c, timeout: c, timeoutMessage: c, withCredentials: c, withXSRFToken: c, adapter: c, responseType: c, xsrfCookieName: c, xsrfHeaderName: c, onUploadProgress: c, onDownloadProgress: c, decompress: c, maxContentLength: c, maxBodyLength: c, beforeRedirect: c, transport: c, httpAgent: c, httpsAgent: c, cancelToken: c, socketPath: c, responseEncoding: c, validateStatus: g, headers: (m, s) => o(he(m), he(s), !0) }; return v.forEach(Object.keys(Object.assign({}, t, e)), function(m) { - const s = g[m] || o, b = s(t[m], e[m], m); - v.isUndefined(b) && s !== y || (r[m] = b); + const s = y[m] || o, b = s(t[m], e[m], m); + v.isUndefined(b) && s !== g || (r[m] = b); }), r; } -const We = (t) => { +const He = (t) => { const e = H({}, t); - let r, { data: n, withXSRFToken: o, xsrfHeaderName: a, xsrfCookieName: c, headers: y, auth: g } = e; - if (e.headers = y = j.from(y), e.url = Me(qe(e.baseURL, e.url), t.params, t.paramsSerializer), g && y.set("Authorization", "Basic " + btoa((g.username || "") + ":" + (g.password ? unescape(encodeURIComponent(g.password)) : ""))), v.isFormData(n)) { - if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) y.setContentType(void 0); - else if ((r = y.getContentType()) !== !1) { + let r, { data: n, withXSRFToken: o, xsrfHeaderName: a, xsrfCookieName: c, headers: g, auth: y } = e; + if (e.headers = g = N.from(g), e.url = De($e(e.baseURL, e.url), t.params, t.paramsSerializer), y && g.set("Authorization", "Basic " + btoa((y.username || "") + ":" + (y.password ? unescape(encodeURIComponent(y.password)) : ""))), v.isFormData(n)) { + if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) g.setContentType(void 0); + else if ((r = g.getContentType()) !== !1) { const [m, ...s] = r ? r.split(";").map((b) => b.trim()).filter(Boolean) : []; - y.setContentType([m || "multipart/form-data", ...s].join("; ")); + g.setContentType([m || "multipart/form-data", ...s].join("; ")); } } - if (U.hasStandardBrowserEnv && (o && v.isFunction(o) && (o = o(e)), o || o !== !1 && jr(e.url))) { - const m = a && c && kr.read(c); - m && y.set(a, m); + if (U.hasStandardBrowserEnv && (o && v.isFunction(o) && (o = o(e)), o || o !== !1 && Mr(e.url))) { + const m = a && c && Lr.read(c); + m && g.set(a, m); } return e; -}, Ur = typeof XMLHttpRequest < "u" && function(t) { +}, Dr = typeof XMLHttpRequest < "u" && function(t) { return new Promise(function(e, r) { - const n = We(t); + const n = He(t); let o = n.data; - const a = j.from(n.headers).normalize(); - let c, { responseType: y } = n; - function g() { + const a = N.from(n.headers).normalize(); + let c, { responseType: g } = n; + function y() { n.cancelToken && n.cancelToken.unsubscribe(c), n.signal && n.signal.removeEventListener("abort", c); } let m = new XMLHttpRequest(); function s() { if (!m) return; - const w = j.from("getAllResponseHeaders" in m && m.getAllResponseHeaders()); - Ie(function(E) { - e(E), g(); + const w = N.from("getAllResponseHeaders" in m && m.getAllResponseHeaders()); + We(function(E) { + e(E), y(); }, function(E) { - r(E), g(); - }, { data: y && y !== "text" && y !== "json" ? m.response : m.responseText, status: m.status, statusText: m.statusText, headers: w, config: t, request: m }), m = null; + r(E), y(); + }, { data: g && g !== "text" && g !== "json" ? m.response : m.responseText, status: m.status, statusText: m.statusText, headers: w, config: t, request: m }), m = null; } m.open(n.method.toUpperCase(), n.url, !0), m.timeout = n.timeout, "onloadend" in m ? m.onloadend = s : m.onreadystatechange = function() { m && m.readyState === 4 && (m.status !== 0 || m.responseURL && m.responseURL.indexOf("file:") === 0) && setTimeout(s); @@ -606,11 +606,11 @@ const We = (t) => { r(new C("Network Error", C.ERR_NETWORK, n, m)), m = null; }, m.ontimeout = function() { let w = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded"; - const E = n.transitional || Le; + const E = n.transitional || Fe; n.timeoutErrorMessage && (w = n.timeoutErrorMessage), r(new C(w, E.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED, n, m)), m = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in m && v.forEach(a.toJSON(), function(w, E) { m.setRequestHeader(E, w); - }), v.isUndefined(n.withCredentials) || (m.withCredentials = !!n.withCredentials), y && y !== "json" && (m.responseType = n.responseType), typeof n.onDownloadProgress == "function" && m.addEventListener("progress", dt(n.onDownloadProgress, !0)), typeof n.onUploadProgress == "function" && m.upload && m.upload.addEventListener("progress", dt(n.onUploadProgress)), (n.cancelToken || n.signal) && (c = (w) => { + }), v.isUndefined(n.withCredentials) || (m.withCredentials = !!n.withCredentials), g && g !== "json" && (m.responseType = n.responseType), typeof n.onDownloadProgress == "function" && m.addEventListener("progress", dt(n.onDownloadProgress, !0)), typeof n.onUploadProgress == "function" && m.upload && m.upload.addEventListener("progress", dt(n.onUploadProgress)), (n.cancelToken || n.signal) && (c = (w) => { m && (r(!w || w.type ? new G(null, t, m) : w), m.abort(), m = null); }, n.cancelToken && n.cancelToken.subscribe(c), n.signal && (n.signal.aborted ? c() : n.signal.addEventListener("abort", c))); const b = function(w) { @@ -619,12 +619,12 @@ const We = (t) => { }(n.url); b && U.protocols.indexOf(b) === -1 ? r(new C("Unsupported protocol " + b + ":", C.ERR_BAD_REQUEST, t)) : m.send(o || null); }); -}, Br = (t, e) => { +}, Fr = (t, e) => { let r, n = new AbortController(); - const o = function(g) { + const o = function(y) { if (!r) { r = !0, c(); - const m = g instanceof Error ? g : this.reason; + const m = y instanceof Error ? y : this.reason; n.abort(m instanceof C ? m : new G(m instanceof Error ? m.message : m)); } }; @@ -632,61 +632,61 @@ const We = (t) => { o(new C(`timeout ${e} of ms exceeded`, C.ETIMEDOUT)); }, e); const c = () => { - t && (a && clearTimeout(a), a = null, t.forEach((g) => { - g && (g.removeEventListener ? g.removeEventListener("abort", o) : g.unsubscribe(o)); + t && (a && clearTimeout(a), a = null, t.forEach((y) => { + y && (y.removeEventListener ? y.removeEventListener("abort", o) : y.unsubscribe(o)); }), t = null); }; - t.forEach((g) => g && g.addEventListener && g.addEventListener("abort", o)); - const { signal: y } = n; - return y.unsubscribe = c, [y, () => { + t.forEach((y) => y && y.addEventListener && y.addEventListener("abort", o)); + const { signal: g } = n; + return g.unsubscribe = c, [g, () => { a && clearTimeout(a), a = null; }]; -}, Mr = function* (t, e) { +}, Ir = function* (t, e) { let r = t.byteLength; if (!e || r < e) return void (yield t); let n, o = 0; for (; o < r; ) n = o + e, yield t.slice(o, n), o = n; }, de = (t, e, r, n, o) => { - const a = async function* (y, g, m) { - for await (const s of y) yield* Mr(ArrayBuffer.isView(s) ? s : await m(String(s)), g); + const a = async function* (g, y, m) { + for await (const s of g) yield* Ir(ArrayBuffer.isView(s) ? s : await m(String(s)), y); }(t, e, o); let c = 0; - return new ReadableStream({ type: "bytes", async pull(y) { - const { done: g, value: m } = await a.next(); - if (g) return y.close(), void n(); + return new ReadableStream({ type: "bytes", async pull(g) { + const { done: y, value: m } = await a.next(); + if (y) return g.close(), void n(); let s = m.byteLength; - r && r(c += s), y.enqueue(new Uint8Array(m)); - }, cancel: (y) => (n(y), a.return()) }, { highWaterMark: 2 }); + r && r(c += s), g.enqueue(new Uint8Array(m)); + }, cancel: (g) => (n(g), a.return()) }, { highWaterMark: 2 }); }, pe = (t, e) => { const r = t != null; return (n) => setTimeout(() => e({ lengthComputable: r, total: t, loaded: n })); -}, mt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", $e = mt && typeof ReadableStream == "function", Nt = mt && (typeof TextEncoder == "function" ? (ge = new TextEncoder(), (t) => ge.encode(t)) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())); -var ge; -const Lr = $e && (() => { +}, mt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Je = mt && typeof ReadableStream == "function", Pt = mt && (typeof TextEncoder == "function" ? (ye = new TextEncoder(), (t) => ye.encode(t)) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())); +var ye; +const qr = Je && (() => { let t = !1; const e = new Request(U.origin, { body: new ReadableStream(), method: "POST", get duplex() { return t = !0, "half"; } }).headers.has("Content-Type"); return t && !e; -})(), Pt = $e && !!(() => { +})(), jt = Je && !!(() => { try { return v.isReadableStream(new Response("").body); } catch { } -})(), pt = { stream: Pt && ((t) => t.body) }; +})(), pt = { stream: jt && ((t) => t.body) }; var me; mt && (me = new Response(), ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !pt[t] && (pt[t] = v.isFunction(me[t]) ? (e) => e[t]() : (e, r) => { throw new C(`Response type '${t}' is not supported`, C.ERR_NOT_SUPPORT, r); }); })); -const Dr = async (t, e) => { +const Wr = async (t, e) => { const r = v.toFiniteNumber(t.getContentLength()); - return r ?? (async (n) => n == null ? 0 : v.isBlob(n) ? n.size : v.isSpecCompliantForm(n) ? (await new Request(n).arrayBuffer()).byteLength : v.isArrayBufferView(n) ? n.byteLength : (v.isURLSearchParams(n) && (n += ""), v.isString(n) ? (await Nt(n)).byteLength : void 0))(e); -}, He = { http: null, xhr: Ur, fetch: mt && (async (t) => { - let { url: e, method: r, data: n, signal: o, cancelToken: a, timeout: c, onDownloadProgress: y, onUploadProgress: g, responseType: m, headers: s, withCredentials: b = "same-origin", fetchOptions: w } = We(t); + return r ?? (async (n) => n == null ? 0 : v.isBlob(n) ? n.size : v.isSpecCompliantForm(n) ? (await new Request(n).arrayBuffer()).byteLength : v.isArrayBufferView(n) ? n.byteLength : (v.isURLSearchParams(n) && (n += ""), v.isString(n) ? (await Pt(n)).byteLength : void 0))(e); +}, ze = { http: null, xhr: Dr, fetch: mt && (async (t) => { + let { url: e, method: r, data: n, signal: o, cancelToken: a, timeout: c, onDownloadProgress: g, onUploadProgress: y, responseType: m, headers: s, withCredentials: b = "same-origin", fetchOptions: w } = He(t); m = m ? (m + "").toLowerCase() : "text"; - let E, d, [l, i] = o || a || c ? Br([o, a], c) : []; + let E, d, [l, i] = o || a || c ? Fr([o, a], c) : []; const u = () => { !E && setTimeout(() => { l && l.unsubscribe(); @@ -694,31 +694,31 @@ const Dr = async (t, e) => { }; let h; try { - if (g && Lr && r !== "get" && r !== "head" && (h = await Dr(s, n)) !== 0) { + if (y && qr && r !== "get" && r !== "head" && (h = await Wr(s, n)) !== 0) { let O, x = new Request(e, { method: "POST", body: n, duplex: "half" }); - v.isFormData(n) && (O = x.headers.get("content-type")) && s.setContentType(O), x.body && (n = de(x.body, 65536, pe(h, dt(g)), null, Nt)); + v.isFormData(n) && (O = x.headers.get("content-type")) && s.setContentType(O), x.body && (n = de(x.body, 65536, pe(h, dt(y)), null, Pt)); } v.isString(b) || (b = b ? "cors" : "omit"), d = new Request(e, { ...w, signal: l, method: r.toUpperCase(), headers: s.normalize().toJSON(), body: n, duplex: "half", withCredentials: b }); let p = await fetch(d); - const f = Pt && (m === "stream" || m === "response"); - if (Pt && (y || f)) { + const f = jt && (m === "stream" || m === "response"); + if (jt && (g || f)) { const O = {}; - ["status", "statusText", "headers"].forEach((P) => { - O[P] = p[P]; + ["status", "statusText", "headers"].forEach((j) => { + O[j] = p[j]; }); const x = v.toFiniteNumber(p.headers.get("content-length")); - p = new Response(de(p.body, 65536, y && pe(x, dt(y, !0)), f && u, Nt), O); + p = new Response(de(p.body, 65536, g && pe(x, dt(g, !0)), f && u, Pt), O); } m = m || "text"; let A = await pt[v.findKey(pt, m) || "text"](p, t); return !f && u(), i && i(), await new Promise((O, x) => { - Ie(O, x, { data: A, headers: j.from(p.headers), status: p.status, statusText: p.statusText, config: t, request: d }); + We(O, x, { data: A, headers: N.from(p.headers), status: p.status, statusText: p.statusText, config: t, request: d }); }); } catch (p) { throw u(), p && p.name === "TypeError" && /fetch/i.test(p.message) ? Object.assign(new C("Network Error", C.ERR_NETWORK, t, d), { cause: p.cause || p }) : C.from(p, p && p.code, t, d); } }) }; -v.forEach(He, (t, e) => { +v.forEach(ze, (t, e) => { if (t) { try { Object.defineProperty(t, "name", { value: e }); @@ -727,22 +727,22 @@ v.forEach(He, (t, e) => { Object.defineProperty(t, "adapterName", { value: e }); } }); -const ye = (t) => `- ${t}`, Fr = (t) => v.isFunction(t) || t === null || t === !1, Je = (t) => { +const ge = (t) => `- ${t}`, $r = (t) => v.isFunction(t) || t === null || t === !1, Ve = (t) => { t = v.isArray(t) ? t : [t]; const { length: e } = t; let r, n; const o = {}; for (let a = 0; a < e; a++) { let c; - if (r = t[a], n = r, !Fr(r) && (n = He[(c = String(r)).toLowerCase()], n === void 0)) throw new C(`Unknown adapter '${c}'`); + if (r = t[a], n = r, !$r(r) && (n = ze[(c = String(r)).toLowerCase()], n === void 0)) throw new C(`Unknown adapter '${c}'`); if (n) break; o[c || "#" + a] = n; } if (!n) { - const a = Object.entries(o).map(([c, y]) => `adapter ${c} ` + (y === !1 ? "is not supported by the environment" : "is not available in the build")); + const a = Object.entries(o).map(([c, g]) => `adapter ${c} ` + (g === !1 ? "is not supported by the environment" : "is not available in the build")); throw new C("There is no suitable adapter to dispatch the request " + (e ? a.length > 1 ? `since : -` + a.map(ye).join(` -`) : " " + ye(a[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT"); +` + a.map(ge).join(` +`) : " " + ge(a[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT"); } return n; }; @@ -750,13 +750,13 @@ function St(t) { if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new G(null, t); } function be(t) { - return St(t), t.headers = j.from(t.headers), t.data = Ot.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Je(t.adapter || rt.adapter)(t).then(function(e) { - return St(t), e.data = Ot.call(t, t.transformResponse, e), e.headers = j.from(e.headers), e; + return St(t), t.headers = N.from(t.headers), t.data = Ot.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Ve(t.adapter || rt.adapter)(t).then(function(e) { + return St(t), e.data = Ot.call(t, t.transformResponse, e), e.headers = N.from(e.headers), e; }, function(e) { - return Fe(e) || (St(t), e && e.response && (e.response.data = Ot.call(t, t.transformResponse, e.response), e.response.headers = j.from(e.response.headers))), Promise.reject(e); + return qe(e) || (St(t), e && e.response && (e.response.data = Ot.call(t, t.transformResponse, e.response), e.response.headers = N.from(e.response.headers))), Promise.reject(e); }); } -const Ir = "1.7.2", Kt = {}; +const Hr = "1.7.2", Kt = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => { Kt[t] = function(r) { return typeof r === t || "a" + (e < 1 ? "n " : " ") + t; @@ -772,18 +772,18 @@ Kt.transitional = function(t, e, r) { return e && !we[a] && (we[a] = !0, console.warn(n(a, " has been deprecated since v" + e + " and will be removed in the near future"))), !t || t(o, a, c); }; }; -const jt = { assertOptions: function(t, e, r) { +const Nt = { assertOptions: function(t, e, r) { if (typeof t != "object") throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE); const n = Object.keys(t); let o = n.length; for (; o-- > 0; ) { const a = n[o], c = e[a]; if (c) { - const y = t[a], g = y === void 0 || c(y, a, t); - if (g !== !0) throw new C("option " + a + " must be " + g, C.ERR_BAD_OPTION_VALUE); + const g = t[a], y = g === void 0 || c(g, a, t); + if (y !== !0) throw new C("option " + a + " must be " + y, C.ERR_BAD_OPTION_VALUE); } else if (r !== !0) throw new C("Unknown option " + a, C.ERR_BAD_OPTION); } -}, validators: Kt }, F = jt.validators; +}, validators: Kt }, F = Nt.validators; let $ = class { constructor(t) { this.defaults = t, this.interceptors = { request: new ue(), response: new ue() }; @@ -808,25 +808,25 @@ let $ = class { _request(t, e) { typeof t == "string" ? (e = e || {}).url = t : e = t || {}, e = H(this.defaults, e); const { transitional: r, paramsSerializer: n, headers: o } = e; - r !== void 0 && jt.assertOptions(r, { silentJSONParsing: F.transitional(F.boolean), forcedJSONParsing: F.transitional(F.boolean), clarifyTimeoutError: F.transitional(F.boolean) }, !1), n != null && (v.isFunction(n) ? e.paramsSerializer = { serialize: n } : jt.assertOptions(n, { encode: F.function, serialize: F.function }, !0)), e.method = (e.method || this.defaults.method || "get").toLowerCase(); + r !== void 0 && Nt.assertOptions(r, { silentJSONParsing: F.transitional(F.boolean), forcedJSONParsing: F.transitional(F.boolean), clarifyTimeoutError: F.transitional(F.boolean) }, !1), n != null && (v.isFunction(n) ? e.paramsSerializer = { serialize: n } : Nt.assertOptions(n, { encode: F.function, serialize: F.function }, !0)), e.method = (e.method || this.defaults.method || "get").toLowerCase(); let a = o && v.merge(o.common, o[e.method]); o && v.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (E) => { delete o[E]; - }), e.headers = j.concat(a, o); + }), e.headers = N.concat(a, o); const c = []; - let y = !0; + let g = !0; this.interceptors.request.forEach(function(E) { - typeof E.runWhen == "function" && E.runWhen(e) === !1 || (y = y && E.synchronous, c.unshift(E.fulfilled, E.rejected)); + typeof E.runWhen == "function" && E.runWhen(e) === !1 || (g = g && E.synchronous, c.unshift(E.fulfilled, E.rejected)); }); - const g = []; + const y = []; let m; this.interceptors.response.forEach(function(E) { - g.push(E.fulfilled, E.rejected); + y.push(E.fulfilled, E.rejected); }); let s, b = 0; - if (!y) { + if (!g) { const E = [be.bind(this), void 0]; - for (E.unshift.apply(E, c), E.push.apply(E, g), s = E.length, m = Promise.resolve(e); b < s; ) m = m.then(E[b++], E[b++]); + for (E.unshift.apply(E, c), E.push.apply(E, y), s = E.length, m = Promise.resolve(e); b < s; ) m = m.then(E[b++], E[b++]); return m; } s = c.length; @@ -845,11 +845,11 @@ let $ = class { } catch (E) { return Promise.reject(E); } - for (b = 0, s = g.length; b < s; ) m = m.then(g[b++], g[b++]); + for (b = 0, s = y.length; b < s; ) m = m.then(y[b++], y[b++]); return m; } getUri(t) { - return Me(qe((t = H(this.defaults, t)).baseURL, t.url), t.params, t.paramsSerializer); + return De($e((t = H(this.defaults, t)).baseURL, t.url), t.params, t.paramsSerializer); } }; v.forEach(["delete", "get", "head", "options"], function(t) { @@ -869,12 +869,12 @@ Object.entries(kt).forEach(([t, e]) => { kt[e] = t; }); const _ = function t(e) { - const r = new $(e), n = ke($.prototype.request, r); + const r = new $(e), n = Be($.prototype.request, r); return v.extend(n, $.prototype, r, { allOwnKeys: !0 }), v.extend(n, r, null, { allOwnKeys: !0 }), n.create = function(o) { return t(H(e, o)); }, n; }(rt); -_.Axios = $, _.CanceledError = G, _.CancelToken = class ze { +_.Axios = $, _.CanceledError = G, _.CancelToken = class Ke { constructor(e) { if (typeof e != "function") throw new TypeError("executor must be a function."); let r; @@ -889,8 +889,8 @@ _.Axios = $, _.CanceledError = G, _.CancelToken = class ze { n._listeners = null; }), this.promise.then = (o) => { let a; - const c = new Promise((y) => { - n.subscribe(y), a = y; + const c = new Promise((g) => { + n.subscribe(g), a = g; }).then(o); return c.cancel = function() { n.unsubscribe(a); @@ -912,11 +912,11 @@ _.Axios = $, _.CanceledError = G, _.CancelToken = class ze { } static source() { let e; - return { token: new ze(function(r) { + return { token: new Ke(function(r) { e = r; }), cancel: e }; } -}, _.isCancel = Fe, _.VERSION = Ir, _.toFormData = ht, _.AxiosError = C, _.Cancel = _.CanceledError, _.all = function(t) { +}, _.isCancel = qe, _.VERSION = Hr, _.toFormData = ht, _.AxiosError = C, _.Cancel = _.CanceledError, _.all = function(t) { return Promise.all(t); }, _.spread = function(t) { return function(e) { @@ -924,12 +924,12 @@ _.Axios = $, _.CanceledError = G, _.CancelToken = class ze { }; }, _.isAxiosError = function(t) { return v.isObject(t) && t.isAxiosError === !0; -}, _.mergeConfig = H, _.AxiosHeaders = j, _.formToJSON = (t) => De(v.isHTMLForm(t) ? new FormData(t) : t), _.getAdapter = Je, _.HttpStatusCode = kt, _.default = _; -const { Axios: qr, AxiosError: Wr, CanceledError: $r, isCancel: Hr, CancelToken: Jr, VERSION: zr, all: Vr, Cancel: Kr, isAxiosError: Gr, spread: Xr, toFormData: Qr, AxiosHeaders: Zr, HttpStatusCode: Yr, formToJSON: tn, getAdapter: en, mergeConfig: rn } = _, nn = Object.freeze(Object.defineProperty({ __proto__: null, Axios: qr, AxiosError: Wr, AxiosHeaders: Zr, Cancel: Kr, CancelToken: Jr, CanceledError: $r, HttpStatusCode: Yr, VERSION: zr, all: Vr, default: _, formToJSON: tn, getAdapter: en, isAxiosError: Gr, isCancel: Hr, mergeConfig: rn, spread: Xr, toFormData: Qr }, Symbol.toStringTag, { value: "Module" })); -function yt(t) { +}, _.mergeConfig = H, _.AxiosHeaders = N, _.formToJSON = (t) => Ie(v.isHTMLForm(t) ? new FormData(t) : t), _.getAdapter = Ve, _.HttpStatusCode = kt, _.default = _; +const { Axios: Jr, AxiosError: zr, CanceledError: Vr, isCancel: Kr, CancelToken: Gr, VERSION: Xr, all: Qr, Cancel: Zr, isAxiosError: Yr, spread: tn, toFormData: en, AxiosHeaders: rn, HttpStatusCode: nn, formToJSON: on, getAdapter: sn, mergeConfig: an } = _, cn = Object.freeze(Object.defineProperty({ __proto__: null, Axios: Jr, AxiosError: zr, AxiosHeaders: rn, Cancel: Zr, CancelToken: Gr, CanceledError: Vr, HttpStatusCode: nn, VERSION: Xr, all: Qr, default: _, formToJSON: on, getAdapter: sn, isAxiosError: Yr, isCancel: Kr, mergeConfig: an, spread: tn, toFormData: en }, Symbol.toStringTag, { value: "Module" })); +function gt(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -function on(t) { +function un(t) { if (t.__esModule) return t; var e = t.default; if (typeof e == "function") { @@ -946,7 +946,7 @@ function on(t) { }), r; } var Ut = { exports: {} }; -const ve = on(nn), Ve = function t(e, r) { +const ve = un(cn), Ge = function t(e, r) { if (e === r) return !0; if (e && r && typeof e == "object" && typeof r == "object") { if (e.constructor !== r.constructor) return !1; @@ -968,9 +968,9 @@ const ve = on(nn), Ve = function t(e, r) { return !0; } return e != e && r != r; -}, Ke = function(t) { +}, Xe = function(t) { return t != null && t.constructor != null && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t); -}, Ge = ( +}, Qe = ( /*! * MIT License * @@ -992,7 +992,7 @@ const ve = on(nn), Ve = function t(e, r) { function(t) { return typeof Blob < "u" && (t instanceof Blob || Object.prototype.toString.call(t) === "[object Blob]"); } -), Xe = Object.prototype.toString; +), Ze = Object.prototype.toString; function Ee(t, e) { const r = t.length; for (let n = 0; n < r; n++) { @@ -1003,9 +1003,9 @@ function Ee(t, e) { function Gt(t) { return t !== null && typeof t == "object"; } -function sn(t) { +function ln(t) { return Gt(t) && function(e) { - return Xe.call(e) === "[object Function]"; + return Ze.call(e) === "[object Function]"; }(t.pipe); } function Ae(t, e) { @@ -1026,10 +1026,10 @@ function Se(t, e, r) { }(t, r.data); } function Bt(t, e) { - return e === void 0 || (typeof e.asymmetricMatch == "function" ? e.asymmetricMatch(t) : Ve(t, e)); + return e === void 0 || (typeof e.asymmetricMatch == "function" ? e.asymmetricMatch(t) : Ge(t, e)); } -function an(t) { - return e = t, Xe.call(e) === "[object ArrayBuffer]" || Ke(t) || sn(t) || Ge(t) ? t : Gt(t) ? JSON.parse(JSON.stringify(t)) : t; +function fn(t) { + return e = t, Ze.call(e) === "[object ArrayBuffer]" || Xe(t) || ln(t) || Qe(t) ? t : Gt(t) ? JSON.parse(JSON.stringify(t)) : t; var e; } function Ce(t, e, r, n) { @@ -1039,10 +1039,10 @@ function Ce(t, e, r, n) { return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: this.config, code: this.code }; }, o; } -var Qe = { find: Ee, findHandler: function(t, e, r, n, o, a, c) { - return Ee(t[e.toLowerCase()], function(y) { - let g = !1; - return typeof y.url == "string" ? g = Oe(r, y.url) || Oe(Ae(c, r), y.url) : y.url instanceof RegExp && (g = y.url.test(r) || y.url.test(Ae(c, r))), g && Se(n, o, y) && Bt(a, y.headers); +var Ye = { find: Ee, findHandler: function(t, e, r, n, o, a, c) { + return Ee(t[e.toLowerCase()], function(g) { + let y = !1; + return typeof g.url == "string" ? y = Oe(r, g.url) || Oe(Ae(c, r), g.url) : g.url instanceof RegExp && (y = g.url.test(r) || g.url.test(Ae(c, r))), y && Se(n, o, g) && Bt(a, g.headers); }); }, purgeIfReplyOnce: function(t, e) { const r = t.handlers.indexOf(e); @@ -1051,22 +1051,22 @@ var Qe = { find: Ee, findHandler: function(t, e, r, n, o, a, c) { r > 0 && await new Promise((o) => setTimeout(o, r)); const n = await async function(o, a) { typeof o == "function" && (o = await o(a)); - const c = o.status || o[0], y = an(o.data || o[1]), g = o.headers || o[2]; - return o.config && (a = o.config), { status: c, data: y, headers: g, config: a, request: { responseURL: a.url } }; + const c = o.status || o[0], g = fn(o.data || o[1]), y = o.headers || o[2]; + return o.config && (a = o.config), { status: c, data: g, headers: y, config: a, request: { responseURL: a.url } }; }(e, t); if (!n.config.validateStatus || n.config.validateStatus(n.status)) return n; throw Ce(`Request failed with status code ${n.status}`, n.config, n); -}, isObjectOrArray: Gt, isBuffer: Ke, isBlob: Ge, isBodyOrParametersMatching: Se, isEqual: Ve, createAxiosError: Ce, createCouldNotFindMockError: function(t) { +}, isObjectOrArray: Gt, isBuffer: Xe, isBlob: Qe, isBodyOrParametersMatching: Se, isEqual: Ge, createAxiosError: Ce, createCouldNotFindMockError: function(t) { const e = `Could not find mock for: ${JSON.stringify({ method: t.method, url: t.url, params: t.params, headers: t.headers }, null, 2)}`, r = new Error(e); return r.isCouldNotFindMockError = !0, r.url = t.url, r.method = t.method, r; } }; -const Q = Qe; +const Q = Ye; function Re(t, e) { let r = e.baseURL; return r && !/^https?:/.test(r) && (r = void 0), typeof t.originalAdapter == "function" ? t.originalAdapter(e) : t.axiosInstanceWithoutInterceptors(Object.assign({}, e, { baseURL: r, adapter: t.originalAdapter, transformRequest: [], transformResponse: [] })); } -const cn = async function(t, e) { +const hn = async function(t, e) { let r = e.url || ""; e.baseURL && r.substr(0, e.baseURL.length) === e.baseURL && (r = r.slice(e.baseURL.length)), delete e.adapter, t.history.push(e); const n = Q.findHandler(t.handlers, e.method, r, e.data, e.params, e.headers && e.headers.constructor.name === "AxiosHeaders" ? Object.assign({}, e.headers.toJSON()) : e.headers, e.baseURL); @@ -1081,10 +1081,10 @@ const cn = async function(t, e) { default: return Q.settle(e, { status: 404 }, t.delayResponse); } -}, D = Qe, Ze = ["get", "post", "head", "delete", "patch", "put", "options", "list", "link", "unlink"]; +}, D = Ye, tr = ["get", "post", "head", "delete", "patch", "put", "options", "list", "link", "unlink"]; function xe() { const t = []; - return Ze.forEach(function(e) { + return tr.forEach(function(e) { Object.defineProperty(t, e, { get: () => t.filter(function(r) { return !r.method || r.method === e; }) }); @@ -1096,7 +1096,7 @@ class Ct { this.axiosInstance = e, this.axiosInstanceWithoutInterceptors = e.create ? e.create() : void 0, this.originalAdapter = e.defaults.adapter, this.delayResponse = r.delayResponse > 0 ? r.delayResponse : null, this.onNoMatch = r.onNoMatch || null, e.defaults.adapter = this.adapter(); } adapter() { - return (e) => cn(this, e); + return (e) => hn(this, e); } restore() { this.axiosInstance && (this.axiosInstance.defaults.adapter = this.originalAdapter, this.axiosInstance = void 0); @@ -1111,12 +1111,12 @@ class Ct { this.history ? this.history.length = 0 : this.history = xe(); } } -const un = ["any", "get", "delete", "head", "options"], ln = ["headers", "params", "data"]; +const dn = ["any", "get", "delete", "head", "options"], pn = ["headers", "params", "data"]; function Te(t, e) { - for (const r in e) if (!ln.includes(r)) throw new Error(`Invalid config property ${JSON.stringify(r)} provided to ${Ye(t)}. Config: ${JSON.stringify(e)}`); + for (const r in e) if (!pn.includes(r)) throw new Error(`Invalid config property ${JSON.stringify(r)} provided to ${er(t)}. Config: ${JSON.stringify(e)}`); return e; } -function Ye(t) { +function er(t) { return `on${t.charAt(0).toUpperCase()}${t.slice(1)}`; } function Rt(t, e, r) { @@ -1124,63 +1124,63 @@ function Rt(t, e, r) { else { const n = function(o, a) { let c = -1; - for (let y = 0; y < o.length; y += 1) { - const g = o[y], m = g.url instanceof RegExp && a.url instanceof RegExp ? String(g.url) === String(a.url) : g.url === a.url; - (!g.method || g.method === a.method) && m && D.isEqual(g.params, a.params) && D.isEqual(g.data, a.data) && D.isEqual(g.headers, a.headers) && !g.replyOnce && (c = y); + for (let g = 0; g < o.length; g += 1) { + const y = o[g], m = y.url instanceof RegExp && a.url instanceof RegExp ? String(y.url) === String(a.url) : y.url === a.url; + (!y.method || y.method === a.method) && m && D.isEqual(y.params, a.params) && D.isEqual(y.data, a.data) && D.isEqual(y.headers, a.headers) && !y.replyOnce && (c = g); } return c; }(e, r); n > -1 && !r.replyOnce ? e.splice(n, 1, r) : e.push(r); } } -Ze.concat("any").forEach(function(t) { - Ct.prototype[Ye(t)] = function(e, r, n) { +tr.concat("any").forEach(function(t) { + Ct.prototype[er(t)] = function(e, r, n) { const o = this; let a; e = e === void 0 ? /.*/ : e; const c = function(s, b, w) { - return un.includes(s) ? Te(s, b || {}) : Te(s, Object.assign({}, w, { data: b })); + return dn.includes(s) ? Te(s, b || {}) : Te(s, Object.assign({}, w, { data: b })); }(t, r, n); - function y(s, b, w) { + function g(s, b, w) { const E = { url: e, method: t === "any" ? void 0 : t, params: c.params, data: c.data, headers: c.headers, replyOnce: !1, delay: a, response: typeof s == "function" ? s : [s, b, w] }; return Rt(t, o.handlers, E), o; } - function g(s, b, w) { + function y(s, b, w) { const E = { url: e, method: t === "any" ? void 0 : t, params: c.params, data: c.data, headers: c.headers, replyOnce: !0, delay: a, response: typeof s == "function" ? s : [s, b, w] }; return Rt(t, o.handlers, E), o; } - const m = { reply: y, replyOnce: g, withDelayInMs: function(s) { + const m = { reply: g, replyOnce: y, withDelayInMs: function(s) { a = s; const b = m.reply.bind(m); return Object.assign(b, m), b; }, passThrough() { const s = { passThrough: !0, method: t === "any" ? void 0 : t, url: e, params: c.params, data: c.data, headers: c.headers }; return Rt(t, o.handlers, s), o; - }, abortRequest: () => y(async function(s) { + }, abortRequest: () => g(async function(s) { throw D.createAxiosError("Request aborted", s, void 0, "ECONNABORTED"); - }), abortRequestOnce: () => g(async function(s) { + }), abortRequestOnce: () => y(async function(s) { throw D.createAxiosError("Request aborted", s, void 0, "ECONNABORTED"); - }), networkError: () => y(async function(s) { + }), networkError: () => g(async function(s) { throw D.createAxiosError("Network Error", s); - }), networkErrorOnce: () => g(async function(s) { + }), networkErrorOnce: () => y(async function(s) { throw D.createAxiosError("Network Error", s); - }), timeout: () => y(async function(s) { + }), timeout: () => g(async function(s) { throw D.createAxiosError(s.timeoutErrorMessage || `timeout of ${s.timeout}ms exceeded`, s, void 0, s.transitional && s.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"); - }), timeoutOnce: () => g(async function(s) { + }), timeoutOnce: () => y(async function(s) { throw D.createAxiosError(s.timeoutErrorMessage || `timeout of ${s.timeout}ms exceeded`, s, void 0, s.transitional && s.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"); }) }; return m; }; }), Ut.exports = Ct, Ut.exports.default = Ct; -const vn = yt(Ut.exports); -var fn = Object.defineProperty, tr = (t) => { +const Rn = gt(Ut.exports); +var yn = Object.defineProperty, rr = (t) => { throw TypeError(t); -}, T = (t, e, r) => ((n, o, a) => o in n ? fn(n, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[o] = a)(t, typeof e != "symbol" ? e + "" : e, r), er = (t, e, r) => e.has(t) || tr("Cannot " + r), S = (t, e, r) => (er(t, e, "read from private field"), r ? r.call(t) : e.get(t)), N = (t, e, r) => e.has(t) ? tr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), M = (t, e, r, n) => (er(t, e, "write to private field"), e.set(t, r), r); -function hn(t) { +}, T = (t, e, r) => ((n, o, a) => o in n ? yn(n, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[o] = a)(t, typeof e != "symbol" ? e + "" : e, r), nr = (t, e, r) => e.has(t) || rr("Cannot " + r), S = (t, e, r) => (nr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), P = (t, e, r) => e.has(t) ? rr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), M = (t, e, r, n) => (nr(t, e, "write to private field"), e.set(t, r), r); +function mn(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } -var _e, rr = {}; -_e = rr, function(t, e) { +var _e, or = {}; +_e = or, function(t, e) { var r = e(); for (var n in r) _e[n] = r[n]; }(0, function() { @@ -1197,16 +1197,16 @@ _e = rr, function(t, e) { }, n = function(a) { return parseInt(a, 36); }, o = Array.prototype.indexOf || function(a, c) { - for (var y = c || 0, g = this.length; y < g; y++) if (this[y] === a) return y; + for (var g = c || 0, y = this.length; g < y; g++) if (this[g] === a) return g; return -1; }; return { JSON, pack: function(a, c) { - var y = (c = c || {}).verbose || !1; - y && console.log("Normalize the JSON Object"), a = typeof a == "string" ? this.JSON.parse(a) : a, y && console.log("Creating a empty dictionary"); - var g = { strings: [], integers: [], floats: [] }; - y && console.log("Creating the AST"); + var g = (c = c || {}).verbose || !1; + g && console.log("Normalize the JSON Object"), a = typeof a == "string" ? this.JSON.parse(a) : a, g && console.log("Creating a empty dictionary"); + var y = { strings: [], integers: [], floats: [] }; + g && console.log("Creating the AST"); var m = function E(d) { - y && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(d)); + g && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(d)); var l, i = typeof d; if (d === null) return { type: "null", index: -3 }; if (typeof d > "u") return { type: "undefined", index: -5 }; @@ -1220,16 +1220,16 @@ _e = rr, function(t, e) { return u; } if (d === "") return { type: "empty", index: -4 }; - if (i === "string") return (l = o.call(g.strings, d)) == -1 && (g.strings.push(t(d)), l = g.strings.length - 1), { type: "strings", index: l }; - if (i === "number" && d % 1 == 0) return (l = o.call(g.integers, d)) == -1 && (g.integers.push(r(d)), l = g.integers.length - 1), { type: "integers", index: l }; - if (i === "number") return (l = o.call(g.floats, d)) == -1 && (g.floats.push(d), l = g.floats.length - 1), { type: "floats", index: l }; + if (i === "string") return (l = o.call(y.strings, d)) == -1 && (y.strings.push(t(d)), l = y.strings.length - 1), { type: "strings", index: l }; + if (i === "number" && d % 1 == 0) return (l = o.call(y.integers, d)) == -1 && (y.integers.push(r(d)), l = y.integers.length - 1), { type: "integers", index: l }; + if (i === "number") return (l = o.call(y.floats, d)) == -1 && (y.floats.push(d), l = y.floats.length - 1), { type: "floats", index: l }; if (i === "boolean") return { type: "boolean", index: d ? -1 : -2 }; throw new Error("Unexpected argument of type " + typeof d); - }(a), s = g.strings.length, b = g.integers.length; - g.floats.length, y && console.log("Parsing the dictionary"); - var w = g.strings.join("|"); - return w += "^" + g.integers.join("|"), w += "^" + g.floats.join("|"), y && console.log("Parsing the structure"), w += "^" + function E(d) { - if (y && console.log("Calling a recursiveParser with " + this.JSON.stringify(d)), d instanceof Array) { + }(a), s = y.strings.length, b = y.integers.length; + y.floats.length, g && console.log("Parsing the dictionary"); + var w = y.strings.join("|"); + return w += "^" + y.integers.join("|"), w += "^" + y.floats.join("|"), g && console.log("Parsing the structure"), w += "^" + function E(d) { + if (g && console.log("Calling a recursiveParser with " + this.JSON.stringify(d)), d instanceof Array) { var l = d.shift(); for (var i in d) d.hasOwnProperty(i) && (l += E(d[i]) + "|"); return (l[l.length - 1] === "|" ? l.slice(0, -1) : l) + "]"; @@ -1243,22 +1243,22 @@ _e = rr, function(t, e) { if (u === "undefined") return -5; if (u === "empty") return -4; throw new TypeError("The item is alien!"); - }(m), y && console.log("Ending parser"), c.debug ? { dictionary: g, ast: m, packed: w } : w; + }(m), g && console.log("Ending parser"), c.debug ? { dictionary: y, ast: m, packed: w } : w; }, unpack: function(a, c) { c = c || {}; - var y = a.split("^"); + var g = a.split("^"); c.verbose && console.log("Building dictionary"); - var g = [], m = y[0]; + var y = [], m = g[0]; if (m !== "") { m = m.split("|"), c.verbose && console.log("Parse the strings dictionary"); - for (var s = 0, b = m.length; s < b; s++) g.push(e(m[s])); + for (var s = 0, b = m.length; s < b; s++) y.push(e(m[s])); } - if ((m = y[1]) !== "") for (m = m.split("|"), c.verbose && console.log("Parse the integers dictionary"), s = 0, b = m.length; s < b; s++) g.push(n(m[s])); - if ((m = y[2]) !== "") for (m = m.split("|"), c.verbose && console.log("Parse the floats dictionary"), s = 0, b = m.length; s < b; s++) g.push(parseFloat(m[s])); + if ((m = g[1]) !== "") for (m = m.split("|"), c.verbose && console.log("Parse the integers dictionary"), s = 0, b = m.length; s < b; s++) y.push(n(m[s])); + if ((m = g[2]) !== "") for (m = m.split("|"), c.verbose && console.log("Parse the floats dictionary"), s = 0, b = m.length; s < b; s++) y.push(parseFloat(m[s])); m = null, c.verbose && console.log("Tokenizing the structure"); - var w = "", E = [], d = y[3].length; + var w = "", E = [], d = g[3].length; for (s = 0; s < d; s++) { - var l = y[3].charAt(s); + var l = g[3].charAt(s); l === "|" || l === "$" || l === "@" || l === "]" ? (w && (E.push(n(w)), w = ""), l !== "|" && E.push(l)) : w += l; } var i = E.length, u = 0; @@ -1286,7 +1286,7 @@ _e = rr, function(t, e) { f.push(""); break; default: - f.push(g[A]); + f.push(y[A]); } } return c.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; @@ -1295,7 +1295,7 @@ _e = rr, function(t, e) { for (f = {}; u < i; u++) { var O = E[u]; if (O === "]") return f; - if (O = O === -4 ? "" : g[O], (A = E[++u]) === "@" || A === "$") f[O] = h(); + if (O = O === -4 ? "" : y[O], (A = E[++u]) === "@" || A === "$") f[O] = h(); else switch (A) { case -1: f[O] = !0; @@ -1313,7 +1313,7 @@ _e = rr, function(t, e) { f[O] = ""; break; default: - f[O] = g[A]; + f[O] = y[A]; } } return c.verbose && console.log("Parsed " + this.JSON.stringify(f)), f; @@ -1322,19 +1322,19 @@ _e = rr, function(t, e) { }(); } }; }); -const Ne = hn(rr); +const Pe = mn(or); var tt, et, z, q, Mt, Lt, at, Dt, Ft; class It { constructor(e, r, n, o, a) { - return T(this, "code", 0), T(this, "message", "操作成功"), T(this, "data", null), T(this, "url", ""), T(this, "res", ""), N(this, tt), N(this, et, !0), N(this, z, !0), N(this, q, { get: (c, y) => S(this, Mt).call(this, y), ownKeys: () => Object.keys(S(this, q).getPrototypeOf() || {}), getPrototypeOf: () => S(this, et) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: S(this, q).getPrototypeOf() }) }), N(this, Mt, (c) => c === "$echoMsg" ? S(this, at) : c === "msg" ? S(this, Lt) : c === "then" || c === "resp" ? (M(this, z, !0), M(this, et, c === "resp"), S(this, Dt)) : c === "catch" ? S(this, Ft) : c === "IS_ECHO_MSG" ? S(this, z) : Reflect.get(this, c)), N(this, Lt, (c = (g) => g, y = !1) => (S(this, at).call(this), M(this, et, y), Promise.resolve(c == null ? void 0 : c(S(this, q).getPrototypeOf())))), N(this, at, () => { + return T(this, "code", 0), T(this, "message", "操作成功"), T(this, "data", null), T(this, "url", ""), T(this, "res", ""), P(this, tt), P(this, et, !0), P(this, z, !0), P(this, q, { get: (c, g) => S(this, Mt).call(this, g), ownKeys: () => Object.keys(S(this, q).getPrototypeOf() || {}), getPrototypeOf: () => S(this, et) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: S(this, q).getPrototypeOf() }) }), P(this, Mt, (c) => c === "$echoMsg" ? S(this, at) : c === "msg" ? S(this, Lt) : c === "then" || c === "resp" ? (M(this, z, !0), M(this, et, c === "resp"), S(this, Dt)) : c === "catch" ? S(this, Ft) : c === "IS_ECHO_MSG" ? S(this, z) : Reflect.get(this, c)), P(this, Lt, (c = (y) => y, g = !1) => (S(this, at).call(this), M(this, et, g), Promise.resolve(c == null ? void 0 : c(S(this, q).getPrototypeOf())))), P(this, at, () => { S(this, z) && (M(this, z, !1), $t.onMsg(this.code, this.message)); - }), N(this, Dt, (c) => [0, 1].includes(this.code) ? Promise.resolve(c == null ? void 0 : c(S(this, q).getPrototypeOf())) : Promise.reject(S(this, tt))), N(this, Ft, (c) => Promise.resolve(c(S(this, tt)))), this.code = e, this.message = r, this.data = n, this.url = o, this.res = a, M(this, tt, new Proxy(this, S(this, q))); + }), P(this, Dt, (c) => [0, 1].includes(this.code) ? Promise.resolve(c == null ? void 0 : c(S(this, q).getPrototypeOf())) : Promise.reject(S(this, tt))), P(this, Ft, (c) => Promise.resolve(c(S(this, tt)))), this.code = e, this.message = r, this.data = n, this.url = o, this.res = a, M(this, tt, new Proxy(this, S(this, q))); } } tt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(); const xt = (t, e, r, n = "/", o = "") => new It(t, e, r, n, o); -var Pe = ["utf8", "utf-8", "unicode-1-1-utf-8"], nr = { TextEncoder: function(t) { - if (Pe.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); +var je = ["utf8", "utf-8", "unicode-1-1-utf-8"], sr = { TextEncoder: function(t) { + if (je.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); this.encoding = "utf-8", this.encode = function(e) { if (typeof e != "string") throw new TypeError("passed argument must be of tye string"); var r = unescape(encodeURIComponent(e)), n = new Uint8Array(r.length); @@ -1343,7 +1343,7 @@ var Pe = ["utf8", "utf-8", "unicode-1-1-utf-8"], nr = { TextEncoder: function(t) return n; }; }, TextDecoder: function(t) { - if (Pe.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); + if (je.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported"); this.encoding = "utf-8", this.decode = function(e, r) { if (typeof e > "u") return ""; var n = typeof r < "u" && n in r && r.stream; @@ -1356,9 +1356,9 @@ var Pe = ["utf8", "utf-8", "unicode-1-1-utf-8"], nr = { TextEncoder: function(t) throw new TypeError("passed argument must be an array buffer view"); }; } }; -const dn = new nr.TextEncoder("utf8"); -new nr.TextDecoder("utf8"); -class pn { +const gn = new sr.TextEncoder("utf8"); +new sr.TextDecoder("utf8"); +class bn { constructor(e) { if (T(this, "encodeTable", []), T(this, "decodeMap", new Uint8Array(256).fill(255)), e.length !== 62) throw new Error("Encoding alphabet must be 62 characters long"); if (e.includes(` @@ -1368,19 +1368,19 @@ class pn { } encode(e) { if (!e || e.length === 0) return ""; - const r = new gn(this).encodeV2(e); + const r = new wn(this).encodeV2(e); return String.fromCharCode(...r); } decode(e) { if (!e || e.length === 0) return ""; - const r = new mn(this).decode(e); + const r = new vn(this).decode(e); return new TextDecoder().decode(r); } } var ct, ut, V, W, qt, L, I, K, Wt, lt; -class gn { +class wn { constructor(e) { - N(this, ct), T(this, "src", new Uint8Array()), T(this, "pos", 0), M(this, ct, e); + P(this, ct), T(this, "src", new Uint8Array()), T(this, "pos", 0), M(this, ct, e); } get6bits() { let e = 7 & this.pos, r = this.pos >> 3; @@ -1390,7 +1390,7 @@ class gn { } encodeV2(e) { this.src = function(n) { - return dn.encode(n || ""); + return gn.encode(n || ""); }(e), this.pos = 8 * this.src.length; const r = []; for (; this.pos > 0; ) { @@ -1401,17 +1401,17 @@ class gn { } } ct = /* @__PURE__ */ new WeakMap(); -class mn { +class vn { constructor(e) { - N(this, ut), M(this, ut, e); + P(this, ut), M(this, ut, e); } decode(e) { const r = new Uint8Array(Math.ceil(6 * e.length / 8) + 1); let n = r.length, o = 0, a = 0; for (let c = 0; c < e.length; c++) { - const y = e[c].charCodeAt(0), g = S(this, ut).decodeMap[y]; - if (g === 255) throw new Error(`CorruptInputError at index ${c}`); - c === e.length - 1 ? (a |= g << o, o += Math.ceil(Math.log2(g + 1))) : 30 & ~g ? (a |= g << o, o += 6) : (a |= g << o, o += 5), o >= 8 && (n--, r[n] = 255 & a, o %= 8, a >>= 8); + const g = e[c].charCodeAt(0), y = S(this, ut).decodeMap[g]; + if (y === 255) throw new Error(`CorruptInputError at index ${c}`); + c === e.length - 1 ? (a |= y << o, o += Math.ceil(Math.log2(y + 1))) : 30 & ~y ? (a |= y << o, o += 6) : (a |= y << o, o += 5), o >= 8 && (n--, r[n] = 255 & a, o %= 8, a >>= 8); } return o > 0 && (n--, r[n] = 255 & a), r.slice(n); } @@ -1424,19 +1424,19 @@ ut = /* @__PURE__ */ new WeakMap(), Promise.withResolvers || (Promise.withResolv }); class $t { constructor(e, r, n) { - N(this, V), N(this, W), N(this, qt), N(this, L, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), N(this, I, /* @__PURE__ */ new Map()), N(this, K, /* @__PURE__ */ new Set()), T(this, "init", (o, a, c) => { - o && M(this, qt, o), c && M(this, V, c), a && M(this, W, new pn(a)), S(this, Wt).call(this); - }), N(this, Wt, () => { + P(this, V), P(this, W), P(this, qt), P(this, L, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), P(this, I, /* @__PURE__ */ new Map()), P(this, K, /* @__PURE__ */ new Set()), T(this, "init", (o, a, c) => { + o && M(this, qt, o), c && M(this, V, c), a && M(this, W, new bn(a)), S(this, Wt).call(this); + }), P(this, Wt, () => { !S(this, K).size || !S(this, V) || (S(this, K).forEach((o) => S(this, lt).call(this, ...o)), S(this, K).clear()); - }), N(this, lt, (o, a, c, y = !1) => { + }), P(this, lt, (o, a, c, g = !1) => { if (S(this, V)) { - const { url: g, method: m, ...s } = c || {}; - S(this, V).call(this, { url: g, method: m, ...s }).then((b) => { - if (![0, 1].includes(b.code)) throw xt(b.code, b.msg, b.data, g, b == null ? void 0 : b.res); - return [b.code, b.msg, b.data, g, (b == null ? void 0 : b.res) ?? ""]; + const { url: y, method: m, ...s } = c || {}; + S(this, V).call(this, { url: y, method: m, ...s }).then((b) => { + if (![0, 1].includes(b.code)) throw xt(b.code, b.msg, b.data, y, b == null ? void 0 : b.res); + return [b.code, b.msg, b.data, y, (b == null ? void 0 : b.res) ?? ""]; }).then((b) => { const w = b; - return (a == "#" || m == "GET") && S(this, L)[a].set(o, w), a != "#" && m == "GET" && !y && setTimeout(() => { + return (a == "#" || m == "GET") && S(this, L)[a].set(o, w), a != "#" && m == "GET" && !g && setTimeout(() => { S(this, L)[a].delete(o); }, 300), w; }).then((b) => { @@ -1447,12 +1447,12 @@ class $t { }).catch((b) => { var w; S(this, L)[a].delete(o), (w = S(this, I).get(o)) == null || w.forEach((E, d, l) => { - E && E[1](b instanceof It ? b : xt(-1, b, null, g)), delete l[d]; + E && E[1](b instanceof It ? b : xt(-1, b, null, y)), delete l[d]; }); }).finally(() => S(this, I).delete(o)); - } else S(this, K).add([o, a, c, y]); - }), T(this, "request", ({ url: o = "/", method: a = "GET", ...c }, y = !1) => { - var g, m; + } else S(this, K).add([o, a, c, g]); + }), T(this, "request", ({ url: o = "/", method: a = "GET", ...c }, g = !1) => { + var y, m; o = function(i, u) { return i.replace(new RegExp(`^${u}+|${u}+$`, "g"), ""); }(o, "/"); @@ -1460,8 +1460,8 @@ class $t { let u = 5381; for (let h = 0; h < i.length; h++) u = 33 * u ^ i.charCodeAt(h); return (u >>> 0).toString(16); - }(JSON.stringify([o, s, c])), w = (g = o == null ? void 0 : o.includes) != null && g.call(o, "/_/") ? "#" : "$", { promise: E, resolve: d, reject: l } = Promise.withResolvers(); - return S(this, L)[w].has(b) ? (console.log("cache", o), d(S(this, L)[w].get(b))) : S(this, I).has(b) ? (m = S(this, I).get(b)) == null || m.push([d, l]) : (S(this, I).set(b, [[d, l]]), S(this, lt).call(this, b, w, { url: o, method: s, ...c }, y)), new Proxy(E, { get: (i, u) => (...h) => i.then((p) => xt(...p)[u](...h)).catch((p) => { + }(JSON.stringify([o, s, c])), w = (y = o == null ? void 0 : o.includes) != null && y.call(o, "/_/") ? "#" : "$", { promise: E, resolve: d, reject: l } = Promise.withResolvers(); + return S(this, L)[w].has(b) ? (console.log("cache", o), d(S(this, L)[w].get(b))) : S(this, I).has(b) ? (m = S(this, I).get(b)) == null || m.push([d, l]) : (S(this, I).set(b, [[d, l]]), S(this, lt).call(this, b, w, { url: o, method: s, ...c }, g)), new Proxy(E, { get: (i, u) => (...h) => i.then((p) => xt(...p)[u](...h)).catch((p) => { if (!(p instanceof It)) throw p; return typeof p[u] == "function" ? p[u](...h) : p[u]; }) }); @@ -1474,14 +1474,14 @@ class $t { try { if (!S(this, W)) throw new Error("未初始化 appSecret,请先通过 init 设置 appSecret"); const c = S(this, W).decode(o); - return Ne.unpack(c); + return Pe.unpack(c); } catch { return console.warn("core.decode", o), a; } }), T(this, "encode", (o = {}) => { if (!S(this, W)) throw new Error("未初始化 appSecret,请先通过 init 设置 appSecret"); - const a = JSON.stringify(o, (c, y) => y === void 0 ? null : y); - return S(this, W).encode(Ne.pack(a)); + const a = JSON.stringify(o, (c, g) => g === void 0 ? null : g); + return S(this, W).encode(Pe.pack(a)); }), this.init(e, r, n); } } @@ -1489,10 +1489,10 @@ V = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), qt = /* @_ var e, r, n, o, a, c; t != null && t.IS_ECHO_MSG ? ((e = t == null ? void 0 : t.$echoMsg) == null || e.call(t), (r = t == null ? void 0 : t.preventDefault) == null || r.call(t)) : (n = t.reason) != null && n.IS_ECHO_MSG && ((a = (o = t.reason) == null ? void 0 : o.$echoMsg) == null || a.call(o), (c = t == null ? void 0 : t.preventDefault) == null || c.call(t)); }, $t.onMsg = (t, e) => [0, 1].includes(t) ? console.log(e) : console.warn(e); -var or = { exports: {} }; +var ir = { exports: {} }; /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */ -or.exports = function() { +ir.exports = function() { var t, e, r = { version: "0.2.0" }, n = r.settings = { minimum: 0.08, easing: "ease", positionUsing: "", speed: 200, trickle: !0, trickleRate: 0.02, trickleSpeed: 800, showSpinner: !0, barSelector: '[role="bar"]', spinnerSelector: '[role="spinner"]', parent: "body", template: '
' }; function o(d, l, i) { return d < l ? l : d > i ? i : d; @@ -1512,9 +1512,9 @@ or.exports = function() { var l = r.isStarted(); d = o(d, n.minimum, 1), r.status = d === 1 ? null : d; var i = r.render(!l), u = i.querySelector(n.barSelector), h = n.speed, p = n.easing; - return i.offsetWidth, y(function(f) { - n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), g(u, c(d, h, p)), d === 1 ? (g(i, { transition: "none", opacity: 1 }), i.offsetWidth, setTimeout(function() { - g(i, { transition: "all " + h + "ms linear", opacity: 0 }), setTimeout(function() { + return i.offsetWidth, g(function(f) { + n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), y(u, c(d, h, p)), d === 1 ? (y(i, { transition: "none", opacity: 1 }), i.offsetWidth, setTimeout(function() { + y(i, { transition: "all " + h + "ms linear", opacity: 0 }), setTimeout(function() { r.remove(), f(); }, h); }, h)) : setTimeout(f, h); @@ -1546,7 +1546,7 @@ or.exports = function() { var l = document.createElement("div"); l.id = "nprogress", l.innerHTML = n.template; var i, u = l.querySelector(n.barSelector), h = d ? "-100" : a(r.status || 0), p = document.querySelector(n.parent); - return g(u, { transition: "all 0 linear", transform: "translate3d(" + h + "%,0,0)" }), n.showSpinner || (i = l.querySelector(n.spinnerSelector)) && E(i), p != document.body && s(p, "nprogress-custom-parent"), p.appendChild(l), l; + return y(u, { transition: "all 0 linear", transform: "translate3d(" + h + "%,0,0)" }), n.showSpinner || (i = l.querySelector(n.spinnerSelector)) && E(i), p != document.body && s(p, "nprogress-custom-parent"), p.appendChild(l), l; }, r.remove = function() { b(document.documentElement, "nprogress-busy"), b(document.querySelector(n.parent), "nprogress-custom-parent"); var d = document.getElementById("nprogress"); @@ -1557,7 +1557,7 @@ or.exports = function() { var d = document.body.style, l = "WebkitTransform" in d ? "Webkit" : "MozTransform" in d ? "Moz" : "msTransform" in d ? "ms" : "OTransform" in d ? "O" : ""; return l + "Perspective" in d ? "translate3d" : l + "Transform" in d ? "translate" : "margin"; }; - var y = /* @__PURE__ */ function() { + var g = /* @__PURE__ */ function() { var d = []; function l() { var i = d.shift(); @@ -1566,7 +1566,7 @@ or.exports = function() { return function(i) { d.push(i), d.length == 1 && l(); }; - }(), g = /* @__PURE__ */ function() { + }(), y = /* @__PURE__ */ function() { var d = ["Webkit", "O", "Moz", "ms"], l = {}; function i(f) { return f.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(A, O) { @@ -1576,7 +1576,7 @@ or.exports = function() { function u(f) { var A = document.body.style; if (f in A) return f; - for (var O, x = d.length, P = f.charAt(0).toUpperCase() + f.slice(1); x--; ) if ((O = d[x] + P) in A) return O; + for (var O, x = d.length, j = f.charAt(0).toUpperCase() + f.slice(1); x--; ) if ((O = d[x] + j) in A) return O; return f; } function h(f) { @@ -1586,9 +1586,9 @@ or.exports = function() { A = h(A), f.style[A] = O; } return function(f, A) { - var O, x, P = arguments; - if (P.length == 2) for (O in A) (x = A[O]) !== void 0 && A.hasOwnProperty(O) && p(f, O, x); - else p(f, P[1], P[2]); + var O, x, j = arguments; + if (j.length == 2) for (O in A) (x = A[O]) !== void 0 && A.hasOwnProperty(O) && p(f, O, x); + else p(f, j[1], j[2]); }; }(); function m(d, l) { @@ -1610,7 +1610,7 @@ or.exports = function() { } return r; }(); -const En = yt(or.exports); +const xn = gt(ir.exports); var Tt, _t, Ht = { exports: {} }; Tt = Ht, _t = Ht.exports, function() { var t = { version: "3.0.1", x86: {}, x64: {} }; @@ -1636,14 +1636,14 @@ Tt = Ht, _t = Ht.exports, function() { function c(s, b) { return (b %= 64) == 32 ? [s[1], s[0]] : b < 32 ? [s[0] << b | s[1] >>> 32 - b, s[1] << b | s[0] >>> 32 - b] : (b -= 32, [s[1] << b | s[0] >>> 32 - b, s[0] << b | s[1] >>> 32 - b]); } - function y(s, b) { + function g(s, b) { return (b %= 64) == 0 ? s : b < 32 ? [s[0] << b | s[1] >>> 32 - b, s[1] << b] : [s[1] << b - 32, 0]; } - function g(s, b) { + function y(s, b) { return [s[0] ^ b[0], s[1] ^ b[1]]; } function m(s) { - return s = g(s, [0, s[0] >>> 1]), s = g(s = a(s, [4283543511, 3981806797]), [0, s[0] >>> 1]), s = g(s = a(s, [3301882366, 444984403]), [0, s[0] >>> 1]); + return s = y(s, [0, s[0] >>> 1]), s = y(s = a(s, [4283543511, 3981806797]), [0, s[0] >>> 1]), s = y(s = a(s, [3301882366, 444984403]), [0, s[0] >>> 1]); } t.x86.hash32 = function(s, b) { b = b || 0; @@ -1659,7 +1659,7 @@ Tt = Ht, _t = Ht.exports, function() { return (d = n(d ^= s.length)) >>> 0; }, t.x86.hash128 = function(s, b) { b = b || 0; - for (var w = (s = s || "").length % 16, E = s.length - w, d = b, l = b, i = b, u = b, h = 0, p = 0, f = 0, A = 0, O = 597399067, x = 2869860233, P = 951274213, nt = 2716044179, R = 0; R < E; R += 16) h = 255 & s.charCodeAt(R) | (255 & s.charCodeAt(R + 1)) << 8 | (255 & s.charCodeAt(R + 2)) << 16 | (255 & s.charCodeAt(R + 3)) << 24, p = 255 & s.charCodeAt(R + 4) | (255 & s.charCodeAt(R + 5)) << 8 | (255 & s.charCodeAt(R + 6)) << 16 | (255 & s.charCodeAt(R + 7)) << 24, f = 255 & s.charCodeAt(R + 8) | (255 & s.charCodeAt(R + 9)) << 8 | (255 & s.charCodeAt(R + 10)) << 16 | (255 & s.charCodeAt(R + 11)) << 24, A = 255 & s.charCodeAt(R + 12) | (255 & s.charCodeAt(R + 13)) << 8 | (255 & s.charCodeAt(R + 14)) << 16 | (255 & s.charCodeAt(R + 15)) << 24, h = r(h = e(h, O), 15), d = r(d ^= h = e(h, x), 19), d = e(d += l, 5) + 1444728091, p = r(p = e(p, x), 16), l = r(l ^= p = e(p, P), 17), l = e(l += i, 5) + 197830471, f = r(f = e(f, P), 17), i = r(i ^= f = e(f, nt), 15), i = e(i += u, 5) + 2530024501, A = r(A = e(A, nt), 18), u = r(u ^= A = e(A, O), 13), u = e(u += d, 5) + 850148119; + for (var w = (s = s || "").length % 16, E = s.length - w, d = b, l = b, i = b, u = b, h = 0, p = 0, f = 0, A = 0, O = 597399067, x = 2869860233, j = 951274213, nt = 2716044179, R = 0; R < E; R += 16) h = 255 & s.charCodeAt(R) | (255 & s.charCodeAt(R + 1)) << 8 | (255 & s.charCodeAt(R + 2)) << 16 | (255 & s.charCodeAt(R + 3)) << 24, p = 255 & s.charCodeAt(R + 4) | (255 & s.charCodeAt(R + 5)) << 8 | (255 & s.charCodeAt(R + 6)) << 16 | (255 & s.charCodeAt(R + 7)) << 24, f = 255 & s.charCodeAt(R + 8) | (255 & s.charCodeAt(R + 9)) << 8 | (255 & s.charCodeAt(R + 10)) << 16 | (255 & s.charCodeAt(R + 11)) << 24, A = 255 & s.charCodeAt(R + 12) | (255 & s.charCodeAt(R + 13)) << 8 | (255 & s.charCodeAt(R + 14)) << 16 | (255 & s.charCodeAt(R + 15)) << 24, h = r(h = e(h, O), 15), d = r(d ^= h = e(h, x), 19), d = e(d += l, 5) + 1444728091, p = r(p = e(p, x), 16), l = r(l ^= p = e(p, j), 17), l = e(l += i, 5) + 197830471, f = r(f = e(f, j), 17), i = r(i ^= f = e(f, nt), 15), i = e(i += u, 5) + 2530024501, A = r(A = e(A, nt), 18), u = r(u ^= A = e(A, O), 13), u = e(u += d, 5) + 850148119; switch (h = 0, p = 0, f = 0, A = 0, w) { case 15: A ^= s.charCodeAt(R + 14) << 16; @@ -1674,7 +1674,7 @@ Tt = Ht, _t = Ht.exports, function() { case 10: f ^= s.charCodeAt(R + 9) << 8; case 9: - f = e(f ^= s.charCodeAt(R + 8), P), i ^= f = e(f = r(f, 17), nt); + f = e(f ^= s.charCodeAt(R + 8), j), i ^= f = e(f = r(f, 17), nt); case 8: p ^= s.charCodeAt(R + 7) << 24; case 7: @@ -1682,7 +1682,7 @@ Tt = Ht, _t = Ht.exports, function() { case 6: p ^= s.charCodeAt(R + 5) << 8; case 5: - p = e(p ^= s.charCodeAt(R + 4), x), l ^= p = e(p = r(p, 16), P); + p = e(p ^= s.charCodeAt(R + 4), x), l ^= p = e(p = r(p, 16), j); case 4: h ^= s.charCodeAt(R + 3) << 24; case 3: @@ -1695,44 +1695,44 @@ Tt = Ht, _t = Ht.exports, function() { return d ^= s.length, d += l ^= s.length, d += i ^= s.length, l += d += u ^= s.length, i += d, u += d, d = n(d), d += l = n(l), d += i = n(i), l += d += u = n(u), i += d, u += d, ("00000000" + (d >>> 0).toString(16)).slice(-8) + ("00000000" + (l >>> 0).toString(16)).slice(-8) + ("00000000" + (i >>> 0).toString(16)).slice(-8) + ("00000000" + (u >>> 0).toString(16)).slice(-8); }, t.x64.hash128 = function(s, b) { b = b || 0; - for (var w = (s = s || "").length % 16, E = s.length - w, d = [0, b], l = [0, b], i = [0, 0], u = [0, 0], h = [2277735313, 289559509], p = [1291169091, 658871167], f = 0; f < E; f += 16) i = [255 & s.charCodeAt(f + 4) | (255 & s.charCodeAt(f + 5)) << 8 | (255 & s.charCodeAt(f + 6)) << 16 | (255 & s.charCodeAt(f + 7)) << 24, 255 & s.charCodeAt(f) | (255 & s.charCodeAt(f + 1)) << 8 | (255 & s.charCodeAt(f + 2)) << 16 | (255 & s.charCodeAt(f + 3)) << 24], u = [255 & s.charCodeAt(f + 12) | (255 & s.charCodeAt(f + 13)) << 8 | (255 & s.charCodeAt(f + 14)) << 16 | (255 & s.charCodeAt(f + 15)) << 24, 255 & s.charCodeAt(f + 8) | (255 & s.charCodeAt(f + 9)) << 8 | (255 & s.charCodeAt(f + 10)) << 16 | (255 & s.charCodeAt(f + 11)) << 24], i = c(i = a(i, h), 31), d = o(d = c(d = g(d, i = a(i, p)), 27), l), d = o(a(d, [0, 5]), [0, 1390208809]), u = c(u = a(u, p), 33), l = o(l = c(l = g(l, u = a(u, h)), 31), d), l = o(a(l, [0, 5]), [0, 944331445]); + for (var w = (s = s || "").length % 16, E = s.length - w, d = [0, b], l = [0, b], i = [0, 0], u = [0, 0], h = [2277735313, 289559509], p = [1291169091, 658871167], f = 0; f < E; f += 16) i = [255 & s.charCodeAt(f + 4) | (255 & s.charCodeAt(f + 5)) << 8 | (255 & s.charCodeAt(f + 6)) << 16 | (255 & s.charCodeAt(f + 7)) << 24, 255 & s.charCodeAt(f) | (255 & s.charCodeAt(f + 1)) << 8 | (255 & s.charCodeAt(f + 2)) << 16 | (255 & s.charCodeAt(f + 3)) << 24], u = [255 & s.charCodeAt(f + 12) | (255 & s.charCodeAt(f + 13)) << 8 | (255 & s.charCodeAt(f + 14)) << 16 | (255 & s.charCodeAt(f + 15)) << 24, 255 & s.charCodeAt(f + 8) | (255 & s.charCodeAt(f + 9)) << 8 | (255 & s.charCodeAt(f + 10)) << 16 | (255 & s.charCodeAt(f + 11)) << 24], i = c(i = a(i, h), 31), d = o(d = c(d = y(d, i = a(i, p)), 27), l), d = o(a(d, [0, 5]), [0, 1390208809]), u = c(u = a(u, p), 33), l = o(l = c(l = y(l, u = a(u, h)), 31), d), l = o(a(l, [0, 5]), [0, 944331445]); switch (i = [0, 0], u = [0, 0], w) { case 15: - u = g(u, y([0, s.charCodeAt(f + 14)], 48)); + u = y(u, g([0, s.charCodeAt(f + 14)], 48)); case 14: - u = g(u, y([0, s.charCodeAt(f + 13)], 40)); + u = y(u, g([0, s.charCodeAt(f + 13)], 40)); case 13: - u = g(u, y([0, s.charCodeAt(f + 12)], 32)); + u = y(u, g([0, s.charCodeAt(f + 12)], 32)); case 12: - u = g(u, y([0, s.charCodeAt(f + 11)], 24)); + u = y(u, g([0, s.charCodeAt(f + 11)], 24)); case 11: - u = g(u, y([0, s.charCodeAt(f + 10)], 16)); + u = y(u, g([0, s.charCodeAt(f + 10)], 16)); case 10: - u = g(u, y([0, s.charCodeAt(f + 9)], 8)); + u = y(u, g([0, s.charCodeAt(f + 9)], 8)); case 9: - u = a(u = g(u, [0, s.charCodeAt(f + 8)]), p), l = g(l, u = a(u = c(u, 33), h)); + u = a(u = y(u, [0, s.charCodeAt(f + 8)]), p), l = y(l, u = a(u = c(u, 33), h)); case 8: - i = g(i, y([0, s.charCodeAt(f + 7)], 56)); + i = y(i, g([0, s.charCodeAt(f + 7)], 56)); case 7: - i = g(i, y([0, s.charCodeAt(f + 6)], 48)); + i = y(i, g([0, s.charCodeAt(f + 6)], 48)); case 6: - i = g(i, y([0, s.charCodeAt(f + 5)], 40)); + i = y(i, g([0, s.charCodeAt(f + 5)], 40)); case 5: - i = g(i, y([0, s.charCodeAt(f + 4)], 32)); + i = y(i, g([0, s.charCodeAt(f + 4)], 32)); case 4: - i = g(i, y([0, s.charCodeAt(f + 3)], 24)); + i = y(i, g([0, s.charCodeAt(f + 3)], 24)); case 3: - i = g(i, y([0, s.charCodeAt(f + 2)], 16)); + i = y(i, g([0, s.charCodeAt(f + 2)], 16)); case 2: - i = g(i, y([0, s.charCodeAt(f + 1)], 8)); + i = y(i, g([0, s.charCodeAt(f + 1)], 8)); case 1: - i = a(i = g(i, [0, s.charCodeAt(f)]), h), d = g(d, i = a(i = c(i, 31), p)); + i = a(i = y(i, [0, s.charCodeAt(f)]), h), d = y(d, i = a(i = c(i, 31), p)); } - return d = o(d = g(d, [0, s.length]), l = g(l, [0, s.length])), l = o(l, d), d = o(d = m(d), l = m(l)), l = o(l, d), ("00000000" + (d[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (d[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[1] >>> 0).toString(16)).slice(-8); + return d = o(d = y(d, [0, s.length]), l = y(l, [0, s.length])), l = o(l, d), d = o(d = m(d), l = m(l)), l = o(l, d), ("00000000" + (d[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (d[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[1] >>> 0).toString(16)).slice(-8); }, Tt.exports && (_t = Tt.exports = t), _t.murmurHash3 = t; }(); -const An = yt(Ht.exports); -var sr = {}, ir = { exports: {} }, ar = { exports: {} }; +const Tn = gt(Ht.exports); +var ar = {}, cr = { exports: {} }, ur = { exports: {} }; (function(t) { function e(r) { return t.exports = e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) { @@ -1742,10 +1742,10 @@ var sr = {}, ir = { exports: {} }, ar = { exports: {} }; }, t.exports.__esModule = !0, t.exports.default = t.exports, e(r); } t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports; -})(ar); -var yn = ar.exports; +})(ur); +var En = ur.exports; (function(t) { - var e = yn.default; + var e = En.default; function r(n) { if (typeof WeakMap != "function") return null; var o = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(); @@ -1758,24 +1758,66 @@ var yn = ar.exports; if (n === null || e(n) != "object" && typeof n != "function") return { default: n }; var a = r(o); if (a && a.has(n)) return a.get(n); - var c = { __proto__: null }, y = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var g in n) if (g !== "default" && {}.hasOwnProperty.call(n, g)) { - var m = y ? Object.getOwnPropertyDescriptor(n, g) : null; - m && (m.get || m.set) ? Object.defineProperty(c, g, m) : c[g] = n[g]; + var c = { __proto__: null }, g = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var y in n) if (y !== "default" && {}.hasOwnProperty.call(n, y)) { + var m = g ? Object.getOwnPropertyDescriptor(n, y) : null; + m && (m.get || m.set) ? Object.defineProperty(c, y, m) : c[y] = n[y]; } return c.default = n, a && a.set(n, c), c; }, t.exports.__esModule = !0, t.exports.default = t.exports; -})(ir); -var bn = ir.exports.default; -Object.defineProperty(sr, "__esModule", { value: !0 }); -var On = sr.default = function(t) { - var e = je.useRef(); - return e.current = t, je.useCallback(function() { +})(cr); +var An = cr.exports.default; +Object.defineProperty(ar, "__esModule", { value: !0 }); +var _n = ar.default = function(t) { + var e = Ne.useRef(); + return e.current = t, Ne.useCallback(function() { for (var r, n = arguments.length, o = new Array(n), a = 0; a < n; a++) o[a] = arguments[a]; return (r = e.current) === null || r === void 0 ? void 0 : r.call.apply(r, [e].concat(o)); }, []); -}, je = bn(ur), cr = { exports: {} }; -cr.exports = function(t) { +}, Ne = An(Ue), lr = {}, fr = { exports: {} }, hr = { exports: {} }; +(function(t) { + function e(r) { + return t.exports = e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) { + return typeof n; + } : function(n) { + return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n; + }, t.exports.__esModule = !0, t.exports.default = t.exports, e(r); + } + t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports; +})(hr); +var On = hr.exports; +(function(t) { + var e = On.default; + function r(n) { + if (typeof WeakMap != "function") return null; + var o = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(); + return (r = function(c) { + return c ? a : o; + })(n); + } + t.exports = function(n, o) { + if (!o && n && n.__esModule) return n; + if (n === null || e(n) != "object" && typeof n != "function") return { default: n }; + var a = r(o); + if (a && a.has(n)) return a.get(n); + var c = { __proto__: null }, g = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var y in n) if (y !== "default" && {}.hasOwnProperty.call(n, y)) { + var m = g ? Object.getOwnPropertyDescriptor(n, y) : null; + m && (m.get || m.set) ? Object.defineProperty(c, y, m) : c[y] = n[y]; + } + return c.default = n, a && a.set(n, c), c; + }, t.exports.__esModule = !0, t.exports.default = t.exports; +})(fr); +var Sn = fr.exports.default; +Object.defineProperty(lr, "__esModule", { value: !0 }); +var Pn = lr.default = function(t) { + var e = ke.useRef(); + return e.current = t, ke.useCallback(function() { + for (var r, n = arguments.length, o = new Array(n), a = 0; a < n; a++) o[a] = arguments[a]; + return (r = e.current) === null || r === void 0 ? void 0 : r.call.apply(r, [e].concat(o)); + }, []); +}, ke = Sn(Ue), dr = { exports: {} }; +dr.exports = function(t) { var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; function r(l, i) { var u = l[0], h = l[1], p = l[2], f = l[3]; @@ -1805,14 +1847,14 @@ cr.exports = function(t) { if (h[i >> 2] |= 128 << (i % 4 << 3), i > 55) for (r(x, h), i = 0; i < 16; i += 1) h[i] = 0; return p = (p = 8 * O).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(p[2], 16), A = parseInt(p[1], 16) || 0, h[14] = f, h[15] = A, r(x, h), x; } - function y(l) { + function g(l) { var i, u = ""; for (i = 0; i < 4; i += 1) u += e[l >> 8 * i + 4 & 15] + e[l >> 8 * i & 15]; return u; } - function g(l) { + function y(l) { var i; - for (i = 0; i < l.length; i += 1) l[i] = y(l[i]); + for (i = 0; i < l.length; i += 1) l[i] = g(l[i]); return l.join(""); } function m(l) { @@ -1838,13 +1880,13 @@ cr.exports = function(t) { function d() { this.reset(); } - return g(a("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() { + return y(a("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() { function l(i, u) { return (i = 0 | i || 0) < 0 ? Math.max(i + u, 0) : Math.min(i, u); } ArrayBuffer.prototype.slice = function(i, u) { - var h, p, f, A, O = this.byteLength, x = l(i, O), P = O; - return u !== t && (P = l(u, O)), x > P ? new ArrayBuffer(0) : (h = P - x, p = new ArrayBuffer(h), f = new Uint8Array(p), A = new Uint8Array(this, x, h), f.set(A), p); + var h, p, f, A, O = this.byteLength, x = l(i, O), j = O; + return u !== t && (j = l(u, O)), x > j ? new ArrayBuffer(0) : (h = j - x, p = new ArrayBuffer(h), f = new Uint8Array(p), A = new Uint8Array(this, x, h), f.set(A), p); }; }(), d.prototype.append = function(l) { return this.appendBinary(m(l)), this; @@ -1856,7 +1898,7 @@ cr.exports = function(t) { }, d.prototype.end = function(l) { var i, u, h = this._buff, p = h.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (i = 0; i < p; i += 1) f[i >> 2] |= h.charCodeAt(i) << (i % 4 << 3); - return this._finish(f, p), u = g(this._hash), l && (u = E(u)), this.reset(), u; + return this._finish(f, p), u = y(this._hash), l && (u = E(u)), this.reset(), u; }, d.prototype.reset = function() { return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; }, d.prototype.getState = function() { @@ -1872,7 +1914,7 @@ cr.exports = function(t) { }, d.hash = function(l, i) { return d.hashBinary(m(l), i); }, d.hashBinary = function(l, i) { - var u = g(a(l)); + var u = y(a(l)); return i ? E(u) : u; }, d.ArrayBuffer = function() { this.reset(); @@ -1883,7 +1925,7 @@ cr.exports = function(t) { }, d.ArrayBuffer.prototype.end = function(l) { var i, u, h = this._buff, p = h.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; for (i = 0; i < p; i += 1) f[i >> 2] |= h[i] << (i % 4 << 3); - return this._finish(f, p), u = g(this._hash), l && (u = E(u)), this.reset(), u; + return this._finish(f, p), u = y(this._hash), l && (u = E(u)), this.reset(), u; }, d.ArrayBuffer.prototype.reset = function() { return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this; }, d.ArrayBuffer.prototype.getState = function() { @@ -1892,17 +1934,18 @@ cr.exports = function(t) { }, d.ArrayBuffer.prototype.setState = function(l) { return l.buff = s(l.buff, !0), d.prototype.setState.call(this, l); }, d.ArrayBuffer.prototype.destroy = d.prototype.destroy, d.ArrayBuffer.prototype._finish = d.prototype._finish, d.ArrayBuffer.hash = function(l, i) { - var u = g(c(new Uint8Array(l))); + var u = y(c(new Uint8Array(l))); return i ? E(u) : u; }, d; }(); -const Sn = yt(cr.exports); +const jn = gt(dr.exports); export { - An as M, - En as N, - Sn as S, - On as _, - _ as a, - vn as b, + Tn as M, + xn as N, + jn as S, + _n as _, + Pn as a, + _ as b, + Rn as c, $t as s }; diff --git a/dist/components.js b/dist/components.js index cf8ab78..95061be 100644 --- a/dist/components.js +++ b/dist/components.js @@ -1,8 +1,8 @@ -import { ar as s, ai as p, as as t, at as n, aq as r } from "./common/main-D3Yt2diy.js"; +import { aq as s, ah as p, ar as n, as as r, ap as t } from "./common/main-DqCTTBs4.js"; export { s as Empty, p as Icon, - t as Loading, - n as NotFound, - r as Popup + n as Loading, + r as NotFound, + t as Popup }; diff --git a/dist/container.js b/dist/container.js index 1ece12b..8c862c5 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,10 +1,10 @@ -import { an as s, ar as e, as as p, at as t, ao as n, aq as d, ap as r, am as u } from "./common/main-D3Yt2diy.js"; +import { am as s, aq as e, ar as p, as as n, an as t, ap as d, ao as r, al as u } from "./common/main-DqCTTBs4.js"; export { s as Context, e as Empty, p as Loading, - t as NotFound, - n as PageRender, + n as NotFound, + t as PageRender, d as Popup, r as PopupRender, u as default diff --git a/dist/data-converter.js b/dist/data-converter.js index f33678a..2f89253 100644 --- a/dist/data-converter.js +++ b/dist/data-converter.js @@ -1,6 +1,6 @@ import "lodash"; import "react"; -import { D as p } from "./common/main-D3Yt2diy.js"; +import { D as p } from "./common/main-DqCTTBs4.js"; export { p as default }; diff --git a/dist/data-list.js b/dist/data-list.js index e71ccf2..96edc2b 100644 --- a/dist/data-list.js +++ b/dist/data-list.js @@ -1,4 +1,4 @@ -import { M as t, K as e, C as r, I as o, N as i, J as l, F as u, L as D, E as n, O as L, B as C, Q as m, P as p, X as b, T as c, V as F, U as d, W as O, S } from "./common/main-D3Yt2diy.js"; +import { M as t, K as e, C as r, I as o, N as i, J as l, F as u, L as D, E as n, O as L, B as C, Q as m, P as p, X as b, T as c, V as F, U as d, W as O, S } from "./common/main-DqCTTBs4.js"; export { t as DataListContent, e as DataListContext, diff --git a/dist/data-list/utils.js b/dist/data-list/utils.js index 1d1b0d3..9effa2d 100644 --- a/dist/data-list/utils.js +++ b/dist/data-list/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { q as a } from "../common/main-D3Yt2diy.js"; +import { q as a } from "../common/main-DqCTTBs4.js"; export { a as getDefaultExpandRowKeys }; diff --git a/dist/grid-layout-form.js b/dist/grid-layout-form.js index af7bffc..6e802a3 100644 --- a/dist/grid-layout-form.js +++ b/dist/grid-layout-form.js @@ -1,4 +1,4 @@ -import { a8 as s, aa as r, a9 as u, a7 as o, A as t, af as m, ad as d, ae as F, ah as i, ac as g, ab as c, ag as l } from "./common/main-D3Yt2diy.js"; +import { a7 as s, a9 as r, a8 as u, a6 as o, A as t, ae as m, ac as d, ad as F, ag as i, ab as g, aa as c, af as l } from "./common/main-DqCTTBs4.js"; export { s as GridLayoutForm, r as GridLayoutFormHelper, diff --git a/dist/grid-layout-form/utils.js b/dist/grid-layout-form/utils.js index f1ca930..6ca4bfb 100644 --- a/dist/grid-layout-form/utils.js +++ b/dist/grid-layout-form/utils.js @@ -1,5 +1,5 @@ import "lodash"; -import { a as o, g } from "../common/main-D3Yt2diy.js"; +import { a as o, g } from "../common/main-DqCTTBs4.js"; export { o as getNormalizeWidget, g as getOptionItemByValue diff --git a/dist/grid-layout.js b/dist/grid-layout.js index b4e1eae..6d03f6e 100644 --- a/dist/grid-layout.js +++ b/dist/grid-layout.js @@ -1,4 +1,4 @@ -import { s as u, w as e, v as r, H as t, G as d, y as i, A as o, z as y, x as G } from "./common/main-D3Yt2diy.js"; +import { s as u, w as e, v as r, H as t, G as d, y as i, A as o, z as y, x as G } from "./common/main-DqCTTBs4.js"; export { u as GridLayout, e as GridLayoutFramework, diff --git a/dist/grid-layout/utils.js b/dist/grid-layout/utils.js index 1994a64..381c2dd 100644 --- a/dist/grid-layout/utils.js +++ b/dist/grid-layout/utils.js @@ -1,4 +1,4 @@ -import { l as o, o as a, p as s, n as g } from "../common/main-D3Yt2diy.js"; +import { l as o, o as a, p as s, n as g } from "../common/main-DqCTTBs4.js"; export { o as getBoxStyle, a as getEventProps, diff --git a/dist/hooks.js b/dist/hooks.js index ddc1ad0..746efc8 100644 --- a/dist/hooks.js +++ b/dist/hooks.js @@ -1,15 +1,16 @@ import "lodash"; import "rc-field-form"; import "react"; -import { a4 as r, a3 as o, a5 as p, a1 as f, a2 as i, a6 as m, a0 as c } from "./common/main-D3Yt2diy.js"; -import { default as b } from "rc-util/lib/hooks/useMergedState"; +import { a3 as r, a2 as o, a4 as p, a1 as f, a5 as i, a0 as m } from "./common/main-DqCTTBs4.js"; +import { default as l } from "rc-util/lib/hooks/useMergedState"; +import { a as b } from "./common/vender-DJd-PP9T.js"; export { r as useDeepEffect, o as useDeepEqualEffect, - b as useMergedState, + b as useEvent, + l as useMergedState, p as useOptions, - f as usePrevious, - i as useStateWithCallback, - m as useSubscribeRequest, - c as useUpdate + f as useStateWithCallback, + i as useSubscribeRequest, + m as useUpdate }; diff --git a/dist/iconfont.js b/dist/iconfont.js index 1e969ca..36d352a 100644 --- a/dist/iconfont.js +++ b/dist/iconfont.js @@ -2,7 +2,7 @@ import "react/jsx-runtime"; import "react"; import "prop-types"; import "classnames"; -import { ai as a } from "./common/main-D3Yt2diy.js"; +import { ah as a } from "./common/main-DqCTTBs4.js"; export { a as default }; diff --git a/dist/index.js b/dist/index.js index e4a31d5..a14eac2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,6 +1,6 @@ -import { aC as t, aD as e, ay as o, az as n, au as p, aA as r, ax as c, aw as u, av as f, aB as l } from "./common/main-D3Yt2diy.js"; +import { aB as s, aC as e, ax as o, ay as n, at as p, az as r, aw as c, av as u, au as f, aA as l } from "./common/main-DqCTTBs4.js"; export { - t as AppContext, + s as AppContext, e as AppGlobalParamsContext, o as cache, n as configure, diff --git a/dist/pages.js b/dist/pages.js index 8b63fa8..fcc2701 100644 --- a/dist/pages.js +++ b/dist/pages.js @@ -1,4 +1,4 @@ -import { Z as t, Y as e, _ as o, $ as g } from "./common/main-D3Yt2diy.js"; +import { Z as t, Y as e, _ as o, $ as g } from "./common/main-DqCTTBs4.js"; export { t as CustomPage, e as DataListPage, diff --git a/dist/res-ws.js b/dist/res-ws.js index f5b9c53..d4f90a1 100644 --- a/dist/res-ws.js +++ b/dist/res-ws.js @@ -1,5 +1,5 @@ import "lodash"; -import { R as a } from "./common/main-D3Yt2diy.js"; +import { R as a } from "./common/main-DqCTTBs4.js"; export { a as default }; diff --git a/dist/utils.js b/dist/utils.js index e8419b7..86f5be3 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -1,6 +1,6 @@ import "lodash"; -import { d as s, f as i, e as g, h as m, b as o, k as P, c as p, j as d, i as h, m as k, r as f, t as u, u as l } from "./common/main-D3Yt2diy.js"; -import "./common/vender-DTKG7Nf1.js"; +import { d as s, f as i, e as g, h as m, b as o, k as P, c as p, j as d, i as h, m as k, r as f, t as u, u as l } from "./common/main-DqCTTBs4.js"; +import "./common/vender-DJd-PP9T.js"; export { s as deepSome, i as getPkgCategory, diff --git a/dist/virtual-fs.js b/dist/virtual-fs.js index 0f2065c..538449d 100644 --- a/dist/virtual-fs.js +++ b/dist/virtual-fs.js @@ -1,5 +1,5 @@ import "pathe"; -import { aE as o, aF as r } from "./common/main-D3Yt2diy.js"; +import { aD as o, aE as r } from "./common/main-DqCTTBs4.js"; export { o as default, r as toTreePaths diff --git a/package.json b/package.json index e78f662..3572bfd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ff", "private": true, - "version": "0.6.32", + "version": "0.6.34", "author": "www.fsdpf.com", "type": "module", "main": "./dist/index.js", @@ -31,6 +31,7 @@ "rc-drawer": "^7.2.0", "rc-field-form": "^1.44.0", "rc-notification": "^5.6.0", + "react-use": "^17.6.0", "rc-util": "^5.41.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -55,7 +56,7 @@ "rc-drawer": "^7.2.0", "rc-field-form": "^1.44.0", "rc-notification": "^5.6.0", - "rc-util": "^5.41.0", + "rc-util": "^5.44.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "6.21.2", @@ -74,4 +75,4 @@ "rc-util/lib/hooks/useMergedState" ] } -} +} \ No newline at end of file