z-crud-table
Version:
A powerful and flexible CRUD table component for Vue 3 and Element Plus.
2,494 lines • 99.7 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.header-cell-content[data-v-d23c8660]{display:inline-block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crud-table-container[data-v-7671be98]{display:flex;flex-direction:column;height:100%;width:100%;min-width:0;min-height:0;overflow:hidden}.search-section-wrapper[data-v-7671be98]{flex-shrink:0}.table-content-wrapper[data-v-7671be98]{flex:1;min-height:0;overflow:hidden}.pagination-wrapper[data-v-7671be98]{flex-shrink:0;padding-top:1rem;display:flex;justify-content:flex-end}[data-v-7671be98]::-webkit-scrollbar{width:8px;height:8px}[data-v-7671be98]::-webkit-scrollbar-track{background:transparent}[data-v-7671be98]::-webkit-scrollbar-thumb{background:#c0c4cc;border-radius:4px}[data-v-7671be98]::-webkit-scrollbar-thumb:hover{background:#909399}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.\\!mr-0{margin-right:0!important}.mt-2{margin-top:.5rem}.flex{display:flex}.hidden{display:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}body{background-color:#f0f2f5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;margin:0}#app{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50}.crud-container{transition:box-shadow .3s ease-in-out}.crud-container:hover{box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a}.query-form .el-form-item{margin-bottom:0!important}.el-table__expanded-cell{padding:1rem 3.5rem!important;background-color:#f8fafc}.action-buttons>*+*{margin-left:.75rem}.el-dialog__header{border-bottom:none;padding:24px 24px 10px}.el-dialog__title{font-size:1.25rem;font-weight:600}.el-dialog__footer{border-top:none;padding:10px 24px 24px}.el-dialog__body{padding:10px 24px}:root{--large-screen-border-color: rgba(120, 153, 199, 1);--large-screen-text-color: rgba(227, 246, 255, 1);--large-screen-search-bg: rgba(210, 224, 243, .1);--large-screen-button-bg: rgba(38, 120, 255, 1);--large-screen-action-link-color: rgba(39, 233, 255, 1);--large-screen-dialog-bg: #1e293b;--large-screen-hover-bg: rgba(120, 153, 199, .15)}.theme-large-screen{color:var(--large-screen-text-color)}.el-modal-dialog,.el-overlay-dialog{position:absolute!important}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
import { defineComponent as ze, createElementBlock as ne, openBlock as q, createElementVNode as fe, ref as Pe, resolveComponent as j, createBlock as V, mergeProps as ge, withCtx as N, createVNode as ae, Fragment as Ie, renderList as Le, createCommentVNode as G, createTextVNode as ye, toDisplayString as Me, getCurrentScope as An, onScopeDispose as _n, computed as Be, toValue as nn, watch as Hr, shallowRef as On, getCurrentInstance as En, onMounted as Qr, reactive as ut, toRaw as Pn, resolveDirective as Rn, normalizeClass as Fn, renderSlot as te, withDirectives as Dn, createSlots as xn, unref as Cn } from "vue";
import { ElMessage as $e, ElMessageBox as qn } from "element-plus";
import Bn from "axios";
/*! Element Plus Icons Vue v2.3.2 */
var $n = /* @__PURE__ */ ze({
name: "ArrowLeftBold",
__name: "arrow-left-bold",
setup(t) {
return (s, p) => (q(), ne("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024"
}, [
fe("path", {
fill: "currentColor",
d: "M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0"
})
]));
}
}), In = $n;
const ft = /* @__PURE__ */ ze({
__name: "DynamicForm",
props: {
modelValue: {},
formConfig: {},
rules: {}
},
setup(t, { expose: s }) {
const p = Pe(null);
return s({
validate: () => {
var u;
return (u = p.value) == null ? void 0 : u.validate();
}
}), (u, a) => {
const P = j("el-input"), D = j("el-option"), w = j("el-select"), R = j("el-date-picker"), S = j("el-time-picker"), d = j("el-radio"), g = j("el-radio-group"), h = j("el-form-item"), f = j("el-col"), y = j("el-row"), c = j("el-form");
return q(), V(c, ge({
model: u.modelValue,
rules: u.rules,
ref_key: "formRef",
ref: p
}, u.$attrs), {
default: N(() => [
ae(y, { gutter: 20 }, {
default: N(() => [
(q(!0), ne(Ie, null, Le(u.formConfig, (e) => (q(), V(f, {
key: e.prop,
span: e.span || 24
}, {
default: N(() => [
ae(h, {
label: e.label,
prop: e.prop
}, {
default: N(() => [
e.type === "input" ? (q(), V(P, ge({
key: 0,
modelValue: u.modelValue[e.prop],
"onUpdate:modelValue": (o) => u.modelValue[e.prop] = o
}, { ref_for: !0 }, e.componentProps), null, 16, ["modelValue", "onUpdate:modelValue"])) : G("", !0),
e.type === "textarea" ? (q(), V(P, ge({
key: 1,
type: "textarea",
modelValue: u.modelValue[e.prop],
"onUpdate:modelValue": (o) => u.modelValue[e.prop] = o
}, { ref_for: !0 }, e.componentProps), null, 16, ["modelValue", "onUpdate:modelValue"])) : G("", !0),
e.type === "select" ? (q(), V(w, ge({
key: 2,
modelValue: u.modelValue[e.prop],
"onUpdate:modelValue": (o) => u.modelValue[e.prop] = o
}, { ref_for: !0 }, e.componentProps, { style: { width: "100%" } }), {
default: N(() => [
(q(!0), ne(Ie, null, Le(e.options, (o, l) => {
var b, m, O, _, E, x;
return q(), V(D, {
key: o[((m = (b = e.componentProps) == null ? void 0 : b.props) == null ? void 0 : m.value) || "value"],
label: o[((_ = (O = e.componentProps) == null ? void 0 : O.props) == null ? void 0 : _.label) || "label"],
value: o[((x = (E = e.componentProps) == null ? void 0 : E.props) == null ? void 0 : x.value) || "value"]
}, null, 8, ["label", "value"]);
}), 128))
]),
_: 2
}, 1040, ["modelValue", "onUpdate:modelValue"])) : G("", !0),
e.type === "date-picker" ? (q(), V(R, ge({
key: 3,
modelValue: u.modelValue[e.prop],
"onUpdate:modelValue": (o) => u.modelValue[e.prop] = o
}, { ref_for: !0 }, e.componentProps, { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue"])) : G("", !0),
e.type === "time-picker" ? (q(), V(S, ge({
key: 4,
modelValue: u.modelValue[e.prop],
"onUpdate:modelValue": (o) => u.modelValue[e.prop] = o
}, { ref_for: !0 }, e.componentProps, { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue"])) : G("", !0),
e.type === "radio-group" ? (q(), V(g, ge({
key: 5,
modelValue: u.modelValue[e.prop],
"onUpdate:modelValue": (o) => u.modelValue[e.prop] = o
}, { ref_for: !0 }, e.componentProps), {
default: N(() => [
(q(!0), ne(Ie, null, Le(e.options, (o) => (q(), V(d, {
key: o.value,
label: o.value
}, {
default: N(() => [
ye(Me(o.label), 1)
]),
_: 2
}, 1032, ["label"]))), 128))
]),
_: 2
}, 1040, ["modelValue", "onUpdate:modelValue"])) : G("", !0),
e.type === "input-disabled" ? (q(), V(P, ge({
key: 6,
"model-value": u.modelValue[e.prop],
disabled: ""
}, { ref_for: !0 }, e.componentProps), null, 16, ["model-value"])) : G("", !0)
]),
_: 2
}, 1032, ["label", "prop"])
]),
_: 2
}, 1032, ["span"]))), 128))
]),
_: 1
})
]),
_: 1
}, 16, ["model", "rules"]);
};
}
});
var st = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function kn(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
function Tn(t) {
if (Object.prototype.hasOwnProperty.call(t, "__esModule")) return t;
var s = t.default;
if (typeof s == "function") {
var p = function u() {
return this instanceof u ? Reflect.construct(s, arguments, this.constructor) : s.apply(this, arguments);
};
p.prototype = s.prototype;
} else p = {};
return Object.defineProperty(p, "__esModule", { value: !0 }), Object.keys(t).forEach(function(u) {
var a = Object.getOwnPropertyDescriptor(t, u);
Object.defineProperty(p, u, a.get ? a : {
enumerable: !0,
get: function() {
return t[u];
}
});
}), p;
}
var tr, ct;
function ke() {
return ct || (ct = 1, tr = TypeError), tr;
}
const Nn = {}, Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Nn
}, Symbol.toStringTag, { value: "Module" })), Un = /* @__PURE__ */ Tn(Mn);
var nr, pt;
function Ge() {
if (pt) return nr;
pt = 1;
var t = typeof Map == "function" && Map.prototype, s = Object.getOwnPropertyDescriptor && t ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, p = t && s && typeof s.get == "function" ? s.get : null, u = t && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, P = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, D = a && P && typeof P.get == "function" ? P.get : null, w = a && Set.prototype.forEach, R = typeof WeakMap == "function" && WeakMap.prototype, S = R ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype, g = d ? WeakSet.prototype.has : null, h = typeof WeakRef == "function" && WeakRef.prototype, f = h ? WeakRef.prototype.deref : null, y = Boolean.prototype.valueOf, c = Object.prototype.toString, e = Function.prototype.toString, o = String.prototype.match, l = String.prototype.slice, b = String.prototype.replace, m = String.prototype.toUpperCase, O = String.prototype.toLowerCase, _ = RegExp.prototype.test, E = Array.prototype.concat, x = Array.prototype.join, k = Array.prototype.slice, C = Math.floor, U = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, i = Object.getOwnPropertySymbols, v = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, A = typeof Symbol == "function" && typeof Symbol.iterator == "object", I = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === A || !0) ? Symbol.toStringTag : null, Q = Object.prototype.propertyIsEnumerable, J = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
return r.__proto__;
} : null);
function B(r, n) {
if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || _.call(/e/, n))
return n;
var M = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
if (typeof r == "number") {
var L = r < 0 ? -C(-r) : C(r);
if (L !== r) {
var z = String(L), $ = l.call(n, z.length + 1);
return b.call(z, M, "$&_") + "." + b.call(b.call($, /([0-9]{3})/g, "$&_"), /_$/, "");
}
}
return b.call(n, M, "$&_");
}
var re = Un, se = re.custom, he = Z(se) ? se : null, ce = {
__proto__: null,
double: '"',
single: "'"
}, ve = {
__proto__: null,
double: /(["\\])/g,
single: /(['\\])/g
};
nr = function r(n, M, L, z) {
var $ = M || {};
if (oe($, "quoteStyle") && !oe(ce, $.quoteStyle))
throw new TypeError('option "quoteStyle" must be "single" or "double"');
if (oe($, "maxStringLength") && (typeof $.maxStringLength == "number" ? $.maxStringLength < 0 && $.maxStringLength !== 1 / 0 : $.maxStringLength !== null))
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
var Ae = oe($, "customInspect") ? $.customInspect : !0;
if (typeof Ae != "boolean" && Ae !== "symbol")
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
if (oe($, "indent") && $.indent !== null && $.indent !== " " && !(parseInt($.indent, 10) === $.indent && $.indent > 0))
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
if (oe($, "numericSeparator") && typeof $.numericSeparator != "boolean")
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
var Oe = $.numericSeparator;
if (typeof n > "u")
return "undefined";
if (n === null)
return "null";
if (typeof n == "boolean")
return n ? "true" : "false";
if (typeof n == "string")
return Xr(n, $);
if (typeof n == "number") {
if (n === 0)
return 1 / 0 / n > 0 ? "0" : "-0";
var ie = String(n);
return Oe ? B(n, ie) : ie;
}
if (typeof n == "bigint") {
var _e = String(n) + "n";
return Oe ? B(n, _e) : _e;
}
var Ke = typeof $.depth > "u" ? 5 : $.depth;
if (typeof L > "u" && (L = 0), L >= Ke && Ke > 0 && typeof n == "object")
return we(n) ? "[Array]" : "[Object]";
var Ce = wn($, L);
if (typeof z > "u")
z = [];
else if (Se(z, n) >= 0)
return "[Circular]";
function de(qe, We, Sn) {
if (We && (z = k.call(z), z.push(We)), Sn) {
var lt = {
depth: $.depth
};
return oe($, "quoteStyle") && (lt.quoteStyle = $.quoteStyle), r(qe, lt, L + 1, z);
}
return r(qe, $, L + 1, z);
}
if (typeof n == "function" && !X(n)) {
var et = Re(n), rt = Ue(n, de);
return "[Function" + (et ? ": " + et : " (anonymous)") + "]" + (rt.length > 0 ? " { " + x.call(rt, ", ") + " }" : "");
}
if (Z(n)) {
var tt = A ? b.call(String(n), /^(Symbol\(.*\))_[^)]*$/, "$1") : v.call(n);
return typeof n == "object" && !A ? Te(tt) : tt;
}
if (mn(n)) {
for (var Ne = "<" + O.call(String(n.nodeName)), Je = n.attributes || [], Ve = 0; Ve < Je.length; Ve++)
Ne += " " + Je[Ve].name + "=" + me(F(Je[Ve].value), "double", $);
return Ne += ">", n.childNodes && n.childNodes.length && (Ne += "..."), Ne += "</" + O.call(String(n.nodeName)) + ">", Ne;
}
if (we(n)) {
if (n.length === 0)
return "[]";
var Ye = Ue(n, de);
return Ce && !hn(Ye) ? "[" + Qe(Ye, Ce) + "]" : "[ " + x.call(Ye, ", ") + " ]";
}
if (T(n)) {
var Xe = Ue(n, de);
return !("cause" in Error.prototype) && "cause" in n && !Q.call(n, "cause") ? "{ [" + String(n) + "] " + x.call(E.call("[cause]: " + de(n.cause), Xe), ", ") + " }" : Xe.length === 0 ? "[" + String(n) + "]" : "{ [" + String(n) + "] " + x.call(Xe, ", ") + " }";
}
if (typeof n == "object" && Ae) {
if (he && typeof n[he] == "function" && re)
return re(n, { depth: Ke - L });
if (Ae !== "symbol" && typeof n.inspect == "function")
return n.inspect();
}
if (pe(n)) {
var nt = [];
return u && u.call(n, function(qe, We) {
nt.push(de(We, n, !0) + " => " + de(qe, n));
}), Zr("Map", p.call(n), nt, Ce);
}
if (xe(n)) {
var ot = [];
return w && w.call(n, function(qe) {
ot.push(de(qe, n));
}), Zr("Set", D.call(n), ot, Ce);
}
if (Fe(n))
return He("WeakMap");
if (vn(n))
return He("WeakSet");
if (De(n))
return He("WeakRef");
if (W(n))
return Te(de(Number(n)));
if (le(n))
return Te(de(U.call(n)));
if (K(n))
return Te(y.call(n));
if (H(n))
return Te(de(String(n)));
if (typeof window < "u" && n === window)
return "{ [object Window] }";
if (typeof globalThis < "u" && n === globalThis || typeof st < "u" && n === st)
return "{ [object globalThis] }";
if (!be(n) && !X(n)) {
var Ze = Ue(n, de), at = J ? J(n) === Object.prototype : n instanceof Object || n.constructor === Object, er = n instanceof Object ? "" : "null prototype", it = !at && I && Object(n) === n && I in n ? l.call(ue(n), 8, -1) : er ? "Object" : "", bn = at || typeof n.constructor != "function" ? "" : n.constructor.name ? n.constructor.name + " " : "", rr = bn + (it || er ? "[" + x.call(E.call([], it || [], er || []), ": ") + "] " : "");
return Ze.length === 0 ? rr + "{}" : Ce ? rr + "{" + Qe(Ze, Ce) + "}" : rr + "{ " + x.call(Ze, ", ") + " }";
}
return String(n);
};
function me(r, n, M) {
var L = M.quoteStyle || n, z = ce[L];
return z + r + z;
}
function F(r) {
return b.call(String(r), /"/g, """);
}
function Y(r) {
return !I || !(typeof r == "object" && (I in r || typeof r[I] < "u"));
}
function we(r) {
return ue(r) === "[object Array]" && Y(r);
}
function be(r) {
return ue(r) === "[object Date]" && Y(r);
}
function X(r) {
return ue(r) === "[object RegExp]" && Y(r);
}
function T(r) {
return ue(r) === "[object Error]" && Y(r);
}
function H(r) {
return ue(r) === "[object String]" && Y(r);
}
function W(r) {
return ue(r) === "[object Number]" && Y(r);
}
function K(r) {
return ue(r) === "[object Boolean]" && Y(r);
}
function Z(r) {
if (A)
return r && typeof r == "object" && r instanceof Symbol;
if (typeof r == "symbol")
return !0;
if (!r || typeof r != "object" || !v)
return !1;
try {
return v.call(r), !0;
} catch {
}
return !1;
}
function le(r) {
if (!r || typeof r != "object" || !U)
return !1;
try {
return U.call(r), !0;
} catch {
}
return !1;
}
var ee = Object.prototype.hasOwnProperty || function(r) {
return r in this;
};
function oe(r, n) {
return ee.call(r, n);
}
function ue(r) {
return c.call(r);
}
function Re(r) {
if (r.name)
return r.name;
var n = o.call(e.call(r), /^function\s*([\w$]+)/);
return n ? n[1] : null;
}
function Se(r, n) {
if (r.indexOf)
return r.indexOf(n);
for (var M = 0, L = r.length; M < L; M++)
if (r[M] === n)
return M;
return -1;
}
function pe(r) {
if (!p || !r || typeof r != "object")
return !1;
try {
p.call(r);
try {
D.call(r);
} catch {
return !0;
}
return r instanceof Map;
} catch {
}
return !1;
}
function Fe(r) {
if (!S || !r || typeof r != "object")
return !1;
try {
S.call(r, S);
try {
g.call(r, g);
} catch {
return !0;
}
return r instanceof WeakMap;
} catch {
}
return !1;
}
function De(r) {
if (!f || !r || typeof r != "object")
return !1;
try {
return f.call(r), !0;
} catch {
}
return !1;
}
function xe(r) {
if (!D || !r || typeof r != "object")
return !1;
try {
D.call(r);
try {
p.call(r);
} catch {
return !0;
}
return r instanceof Set;
} catch {
}
return !1;
}
function vn(r) {
if (!g || !r || typeof r != "object")
return !1;
try {
g.call(r, g);
try {
S.call(r, S);
} catch {
return !0;
}
return r instanceof WeakSet;
} catch {
}
return !1;
}
function mn(r) {
return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function";
}
function Xr(r, n) {
if (r.length > n.maxStringLength) {
var M = r.length - n.maxStringLength, L = "... " + M + " more character" + (M > 1 ? "s" : "");
return Xr(l.call(r, 0, n.maxStringLength), n) + L;
}
var z = ve[n.quoteStyle || "single"];
z.lastIndex = 0;
var $ = b.call(b.call(r, z, "\\$1"), /[\x00-\x1f]/g, gn);
return me($, "single", n);
}
function gn(r) {
var n = r.charCodeAt(0), M = {
8: "b",
9: "t",
10: "n",
12: "f",
13: "r"
}[n];
return M ? "\\" + M : "\\x" + (n < 16 ? "0" : "") + m.call(n.toString(16));
}
function Te(r) {
return "Object(" + r + ")";
}
function He(r) {
return r + " { ? }";
}
function Zr(r, n, M, L) {
var z = L ? Qe(M, L) : x.call(M, ", ");
return r + " (" + n + ") {" + z + "}";
}
function hn(r) {
for (var n = 0; n < r.length; n++)
if (Se(r[n], `
`) >= 0)
return !1;
return !0;
}
function wn(r, n) {
var M;
if (r.indent === " ")
M = " ";
else if (typeof r.indent == "number" && r.indent > 0)
M = x.call(Array(r.indent + 1), " ");
else
return null;
return {
base: M,
prev: x.call(Array(n + 1), M)
};
}
function Qe(r, n) {
if (r.length === 0)
return "";
var M = `
` + n.prev + n.base;
return M + x.call(r, "," + M) + `
` + n.prev;
}
function Ue(r, n) {
var M = we(r), L = [];
if (M) {
L.length = r.length;
for (var z = 0; z < r.length; z++)
L[z] = oe(r, z) ? n(r[z], r) : "";
}
var $ = typeof i == "function" ? i(r) : [], Ae;
if (A) {
Ae = {};
for (var Oe = 0; Oe < $.length; Oe++)
Ae["$" + $[Oe]] = $[Oe];
}
for (var ie in r)
oe(r, ie) && (M && String(Number(ie)) === ie && ie < r.length || A && Ae["$" + ie] instanceof Symbol || (_.call(/[^\w$]/, ie) ? L.push(n(ie, r) + ": " + n(r[ie], r)) : L.push(ie + ": " + n(r[ie], r))));
if (typeof i == "function")
for (var _e = 0; _e < $.length; _e++)
Q.call(r, $[_e]) && L.push("[" + n($[_e]) + "]: " + n(r[$[_e]], r));
return L;
}
return nr;
}
var or, dt;
function Vn() {
if (dt) return or;
dt = 1;
var t = /* @__PURE__ */ Ge(), s = /* @__PURE__ */ ke(), p = function(w, R, S) {
for (var d = w, g; (g = d.next) != null; d = g)
if (g.key === R)
return d.next = g.next, S || (g.next = /** @type {NonNullable<typeof list.next>} */
w.next, w.next = g), g;
}, u = function(w, R) {
if (w) {
var S = p(w, R);
return S && S.value;
}
}, a = function(w, R, S) {
var d = p(w, R);
d ? d.value = S : w.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
{
// eslint-disable-line no-param-reassign, no-extra-parens
key: R,
next: w.next,
value: S
};
}, P = function(w, R) {
return w ? !!p(w, R) : !1;
}, D = function(w, R) {
if (w)
return p(w, R, !0);
};
return or = function() {
var R, S = {
assert: function(d) {
if (!S.has(d))
throw new s("Side channel does not contain " + t(d));
},
delete: function(d) {
var g = R && R.next, h = D(R, d);
return h && g && g === h && (R = void 0), !!h;
},
get: function(d) {
return u(R, d);
},
has: function(d) {
return P(R, d);
},
set: function(d, g) {
R || (R = {
next: void 0
}), a(
/** @type {NonNullable<typeof $o>} */
R,
d,
g
);
}
};
return S;
}, or;
}
var ar, yt;
function on() {
return yt || (yt = 1, ar = Object), ar;
}
var ir, vt;
function Wn() {
return vt || (vt = 1, ir = Error), ir;
}
var lr, mt;
function Ln() {
return mt || (mt = 1, lr = EvalError), lr;
}
var ur, gt;
function zn() {
return gt || (gt = 1, ur = RangeError), ur;
}
var fr, ht;
function Gn() {
return ht || (ht = 1, fr = ReferenceError), fr;
}
var sr, wt;
function jn() {
return wt || (wt = 1, sr = SyntaxError), sr;
}
var cr, bt;
function Hn() {
return bt || (bt = 1, cr = URIError), cr;
}
var pr, St;
function Qn() {
return St || (St = 1, pr = Math.abs), pr;
}
var dr, At;
function Kn() {
return At || (At = 1, dr = Math.floor), dr;
}
var yr, _t;
function Jn() {
return _t || (_t = 1, yr = Math.max), yr;
}
var vr, Ot;
function Yn() {
return Ot || (Ot = 1, vr = Math.min), vr;
}
var mr, Et;
function Xn() {
return Et || (Et = 1, mr = Math.pow), mr;
}
var gr, Pt;
function Zn() {
return Pt || (Pt = 1, gr = Math.round), gr;
}
var hr, Rt;
function eo() {
return Rt || (Rt = 1, hr = Number.isNaN || function(s) {
return s !== s;
}), hr;
}
var wr, Ft;
function ro() {
if (Ft) return wr;
Ft = 1;
var t = /* @__PURE__ */ eo();
return wr = function(p) {
return t(p) || p === 0 ? p : p < 0 ? -1 : 1;
}, wr;
}
var br, Dt;
function to() {
return Dt || (Dt = 1, br = Object.getOwnPropertyDescriptor), br;
}
var Sr, xt;
function an() {
if (xt) return Sr;
xt = 1;
var t = /* @__PURE__ */ to();
if (t)
try {
t([], "length");
} catch {
t = null;
}
return Sr = t, Sr;
}
var Ar, Ct;
function no() {
if (Ct) return Ar;
Ct = 1;
var t = Object.defineProperty || !1;
if (t)
try {
t({}, "a", { value: 1 });
} catch {
t = !1;
}
return Ar = t, Ar;
}
var _r, qt;
function oo() {
return qt || (qt = 1, _r = function() {
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
return !1;
if (typeof Symbol.iterator == "symbol")
return !0;
var s = {}, p = Symbol("test"), u = Object(p);
if (typeof p == "string" || Object.prototype.toString.call(p) !== "[object Symbol]" || Object.prototype.toString.call(u) !== "[object Symbol]")
return !1;
var a = 42;
s[p] = a;
for (var P in s)
return !1;
if (typeof Object.keys == "function" && Object.keys(s).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(s).length !== 0)
return !1;
var D = Object.getOwnPropertySymbols(s);
if (D.length !== 1 || D[0] !== p || !Object.prototype.propertyIsEnumerable.call(s, p))
return !1;
if (typeof Object.getOwnPropertyDescriptor == "function") {
var w = (
/** @type {PropertyDescriptor} */
Object.getOwnPropertyDescriptor(s, p)
);
if (w.value !== a || w.enumerable !== !0)
return !1;
}
return !0;
}), _r;
}
var Or, Bt;
function ao() {
if (Bt) return Or;
Bt = 1;
var t = typeof Symbol < "u" && Symbol, s = oo();
return Or = function() {
return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : s();
}, Or;
}
var Er, $t;
function ln() {
return $t || ($t = 1, Er = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Er;
}
var Pr, It;
function un() {
if (It) return Pr;
It = 1;
var t = /* @__PURE__ */ on();
return Pr = t.getPrototypeOf || null, Pr;
}
var Rr, kt;
function io() {
if (kt) return Rr;
kt = 1;
var t = "Function.prototype.bind called on incompatible ", s = Object.prototype.toString, p = Math.max, u = "[object Function]", a = function(R, S) {
for (var d = [], g = 0; g < R.length; g += 1)
d[g] = R[g];
for (var h = 0; h < S.length; h += 1)
d[h + R.length] = S[h];
return d;
}, P = function(R, S) {
for (var d = [], g = S, h = 0; g < R.length; g += 1, h += 1)
d[h] = R[g];
return d;
}, D = function(w, R) {
for (var S = "", d = 0; d < w.length; d += 1)
S += w[d], d + 1 < w.length && (S += R);
return S;
};
return Rr = function(R) {
var S = this;
if (typeof S != "function" || s.apply(S) !== u)
throw new TypeError(t + S);
for (var d = P(arguments, 1), g, h = function() {
if (this instanceof g) {
var o = S.apply(
this,
a(d, arguments)
);
return Object(o) === o ? o : this;
}
return S.apply(
R,
a(d, arguments)
);
}, f = p(0, S.length - d.length), y = [], c = 0; c < f; c++)
y[c] = "$" + c;
if (g = Function("binder", "return function (" + D(y, ",") + "){ return binder.apply(this,arguments); }")(h), S.prototype) {
var e = function() {
};
e.prototype = S.prototype, g.prototype = new e(), e.prototype = null;
}
return g;
}, Rr;
}
var Fr, Tt;
function je() {
if (Tt) return Fr;
Tt = 1;
var t = io();
return Fr = Function.prototype.bind || t, Fr;
}
var Dr, Nt;
function Kr() {
return Nt || (Nt = 1, Dr = Function.prototype.call), Dr;
}
var xr, Mt;
function fn() {
return Mt || (Mt = 1, xr = Function.prototype.apply), xr;
}
var Cr, Ut;
function lo() {
return Ut || (Ut = 1, Cr = typeof Reflect < "u" && Reflect && Reflect.apply), Cr;
}
var qr, Vt;
function uo() {
if (Vt) return qr;
Vt = 1;
var t = je(), s = fn(), p = Kr(), u = lo();
return qr = u || t.call(p, s), qr;
}
var Br, Wt;
function sn() {
if (Wt) return Br;
Wt = 1;
var t = je(), s = /* @__PURE__ */ ke(), p = Kr(), u = uo();
return Br = function(P) {
if (P.length < 1 || typeof P[0] != "function")
throw new s("a function is required");
return u(t, p, P);
}, Br;
}
var $r, Lt;
function fo() {
if (Lt) return $r;
Lt = 1;
var t = sn(), s = /* @__PURE__ */ an(), p;
try {
p = /** @type {{ __proto__?: typeof Array.prototype }} */
[].__proto__ === Array.prototype;
} catch (D) {
if (!D || typeof D != "object" || !("code" in D) || D.code !== "ERR_PROTO_ACCESS")
throw D;
}
var u = !!p && s && s(
Object.prototype,
/** @type {keyof typeof Object.prototype} */
"__proto__"
), a = Object, P = a.getPrototypeOf;
return $r = u && typeof u.get == "function" ? t([u.get]) : typeof P == "function" ? (
/** @type {import('./get')} */
function(w) {
return P(w == null ? w : a(w));
}
) : !1, $r;
}
var Ir, zt;
function so() {
if (zt) return Ir;
zt = 1;
var t = ln(), s = un(), p = /* @__PURE__ */ fo();
return Ir = t ? function(a) {
return t(a);
} : s ? function(a) {
if (!a || typeof a != "object" && typeof a != "function")
throw new TypeError("getProto: not an object");
return s(a);
} : p ? function(a) {
return p(a);
} : null, Ir;
}
var kr, Gt;
function co() {
if (Gt) return kr;
Gt = 1;
var t = Function.prototype.call, s = Object.prototype.hasOwnProperty, p = je();
return kr = p.call(t, s), kr;
}
var Tr, jt;
function Jr() {
if (jt) return Tr;
jt = 1;
var t, s = /* @__PURE__ */ on(), p = /* @__PURE__ */ Wn(), u = /* @__PURE__ */ Ln(), a = /* @__PURE__ */ zn(), P = /* @__PURE__ */ Gn(), D = /* @__PURE__ */ jn(), w = /* @__PURE__ */ ke(), R = /* @__PURE__ */ Hn(), S = /* @__PURE__ */ Qn(), d = /* @__PURE__ */ Kn(), g = /* @__PURE__ */ Jn(), h = /* @__PURE__ */ Yn(), f = /* @__PURE__ */ Xn(), y = /* @__PURE__ */ Zn(), c = /* @__PURE__ */ ro(), e = Function, o = function(X) {
try {
return e('"use strict"; return (' + X + ").constructor;")();
} catch {
}
}, l = /* @__PURE__ */ an(), b = /* @__PURE__ */ no(), m = function() {
throw new w();
}, O = l ? (function() {
try {
return arguments.callee, m;
} catch {
try {
return l(arguments, "callee").get;
} catch {
return m;
}
}
})() : m, _ = ao()(), E = so(), x = un(), k = ln(), C = fn(), U = Kr(), i = {}, v = typeof Uint8Array > "u" || !E ? t : E(Uint8Array), A = {
__proto__: null,
"%AggregateError%": typeof AggregateError > "u" ? t : AggregateError,
"%Array%": Array,
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? t : ArrayBuffer,
"%ArrayIteratorPrototype%": _ && E ? E([][Symbol.iterator]()) : t,
"%AsyncFromSyncIteratorPrototype%": t,
"%AsyncFunction%": i,
"%AsyncGenerator%": i,
"%AsyncGeneratorFunction%": i,
"%AsyncIteratorPrototype%": i,
"%Atomics%": typeof Atomics > "u" ? t : Atomics,
"%BigInt%": typeof BigInt > "u" ? t : BigInt,
"%BigInt64Array%": typeof BigInt64Array > "u" ? t : BigInt64Array,
"%BigUint64Array%": typeof BigUint64Array > "u" ? t : BigUint64Array,
"%Boolean%": Boolean,
"%DataView%": typeof DataView > "u" ? t : DataView,
"%Date%": Date,
"%decodeURI%": decodeURI,
"%decodeURIComponent%": decodeURIComponent,
"%encodeURI%": encodeURI,
"%encodeURIComponent%": encodeURIComponent,
"%Error%": p,
"%eval%": eval,
// eslint-disable-line no-eval
"%EvalError%": u,
"%Float16Array%": typeof Float16Array > "u" ? t : Float16Array,
"%Float32Array%": typeof Float32Array > "u" ? t : Float32Array,
"%Float64Array%": typeof Float64Array > "u" ? t : Float64Array,
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? t : FinalizationRegistry,
"%Function%": e,
"%GeneratorFunction%": i,
"%Int8Array%": typeof Int8Array > "u" ? t : Int8Array,
"%Int16Array%": typeof Int16Array > "u" ? t : Int16Array,
"%Int32Array%": typeof Int32Array > "u" ? t : Int32Array,
"%isFinite%": isFinite,
"%isNaN%": isNaN,
"%IteratorPrototype%": _ && E ? E(E([][Symbol.iterator]())) : t,
"%JSON%": typeof JSON == "object" ? JSON : t,
"%Map%": typeof Map > "u" ? t : Map,
"%MapIteratorPrototype%": typeof Map > "u" || !_ || !E ? t : E((/* @__PURE__ */ new Map())[Symbol.iterator]()),
"%Math%": Math,
"%Number%": Number,
"%Object%": s,
"%Object.getOwnPropertyDescriptor%": l,
"%parseFloat%": parseFloat,
"%parseInt%": parseInt,
"%Promise%": typeof Promise > "u" ? t : Promise,
"%Proxy%": typeof Proxy > "u" ? t : Proxy,
"%RangeError%": a,
"%ReferenceError%": P,
"%Reflect%": typeof Reflect > "u" ? t : Reflect,
"%RegExp%": RegExp,
"%Set%": typeof Set > "u" ? t : Set,
"%SetIteratorPrototype%": typeof Set > "u" || !_ || !E ? t : E((/* @__PURE__ */ new Set())[Symbol.iterator]()),
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? t : SharedArrayBuffer,
"%String%": String,
"%StringIteratorPrototype%": _ && E ? E(""[Symbol.iterator]()) : t,
"%Symbol%": _ ? Symbol : t,
"%SyntaxError%": D,
"%ThrowTypeError%": O,
"%TypedArray%": v,
"%TypeError%": w,
"%Uint8Array%": typeof Uint8Array > "u" ? t : Uint8Array,
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? t : Uint8ClampedArray,
"%Uint16Array%": typeof Uint16Array > "u" ? t : Uint16Array,
"%Uint32Array%": typeof Uint32Array > "u" ? t : Uint32Array,
"%URIError%": R,
"%WeakMap%": typeof WeakMap > "u" ? t : WeakMap,
"%WeakRef%": typeof WeakRef > "u" ? t : WeakRef,
"%WeakSet%": typeof WeakSet > "u" ? t : WeakSet,
"%Function.prototype.call%": U,
"%Function.prototype.apply%": C,
"%Object.defineProperty%": b,
"%Object.getPrototypeOf%": x,
"%Math.abs%": S,
"%Math.floor%": d,
"%Math.max%": g,
"%Math.min%": h,
"%Math.pow%": f,
"%Math.round%": y,
"%Math.sign%": c,
"%Reflect.getPrototypeOf%": k
};
if (E)
try {
null.error;
} catch (X) {
var I = E(E(X));
A["%Error.prototype%"] = I;
}
var Q = function X(T) {
var H;
if (T === "%AsyncFunction%")
H = o("async function () {}");
else if (T === "%GeneratorFunction%")
H = o("function* () {}");
else if (T === "%AsyncGeneratorFunction%")
H = o("async function* () {}");
else if (T === "%AsyncGenerator%") {
var W = X("%AsyncGeneratorFunction%");
W && (H = W.prototype);
} else if (T === "%AsyncIteratorPrototype%") {
var K = X("%AsyncGenerator%");
K && E && (H = E(K.prototype));
}
return A[T] = H, H;
}, J = {
__proto__: null,
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
"%ArrayPrototype%": ["Array", "prototype"],
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
"%ArrayProto_values%": ["Array", "prototype", "values"],
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
"%BooleanPrototype%": ["Boolean", "prototype"],
"%DataViewPrototype%": ["DataView", "prototype"],
"%DatePrototype%": ["Date", "prototype"],
"%ErrorPrototype%": ["Error", "prototype"],
"%EvalErrorPrototype%": ["EvalError", "prototype"],
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
"%FunctionPrototype%": ["Function", "prototype"],
"%Generator%": ["GeneratorFunction", "prototype"],
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
"%JSONParse%": ["JSON", "parse"],
"%JSONStringify%": ["JSON", "stringify"],
"%MapPrototype%": ["Map", "prototype"],
"%NumberPrototype%": ["Number", "prototype"],
"%ObjectPrototype%": ["Object", "prototype"],
"%ObjProto_toString%": ["Object", "prototype", "toString"],
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
"%PromisePrototype%": ["Promise", "prototype"],
"%PromiseProto_then%": ["Promise", "prototype", "then"],
"%Promise_all%": ["Promise", "all"],
"%Promise_reject%": ["Promise", "reject"],
"%Promise_resolve%": ["Promise", "resolve"],
"%RangeErrorPrototype%": ["RangeError", "prototype"],
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
"%RegExpPrototype%": ["RegExp", "prototype"],
"%SetPrototype%": ["Set", "prototype"],
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
"%StringPrototype%": ["String", "prototype"],
"%SymbolPrototype%": ["Symbol", "prototype"],
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
"%TypeErrorPrototype%": ["TypeError", "prototype"],
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
"%URIErrorPrototype%": ["URIError", "prototype"],
"%WeakMapPrototype%": ["WeakMap", "prototype"],
"%WeakSetPrototype%": ["WeakSet", "prototype"]
}, B = je(), re = /* @__PURE__ */ co(), se = B.call(U, Array.prototype.concat), he = B.call(C, Array.prototype.splice), ce = B.call(U, String.prototype.replace), ve = B.call(U, String.prototype.slice), me = B.call(U, RegExp.prototype.exec), F = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Y = /\\(\\)?/g, we = function(T) {
var H = ve(T, 0, 1), W = ve(T, -1);
if (H === "%" && W !== "%")
throw new D("invalid intrinsic syntax, expected closing `%`");
if (W === "%" && H !== "%")
throw new D("invalid intrinsic syntax, expected opening `%`");
var K = [];
return ce(T, F, function(Z, le, ee, oe) {
K[K.length] = ee ? ce(oe, Y, "$1") : le || Z;
}), K;
}, be = function(T, H) {
var W = T, K;
if (re(J, W) && (K = J[W], W = "%" + K[0] + "%"), re(A, W)) {
var Z = A[W];
if (Z === i && (Z = Q(W)), typeof Z > "u" && !H)
throw new w("intrinsic " + T + " exists, but is not available. Please file an issue!");
return {
alias: K,
name: W,
value: Z
};
}
throw new D("intrinsic " + T + " does not exist!");
};
return Tr = function(T, H) {
if (typeof T != "string" || T.length === 0)
throw new w("intrinsic name must be a non-empty string");
if (arguments.length > 1 && typeof H != "boolean")
throw new w('"allowMissing" argument must be a boolean');
if (me(/^%?[^%]*%?$/, T) === null)
throw new D("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
var W = we(T), K = W.length > 0 ? W[0] : "", Z = be("%" + K + "%", H), le = Z.name, ee = Z.value, oe = !1, ue = Z.alias;
ue && (K = ue[0], he(W, se([0, 1], ue)));
for (var Re = 1, Se = !0; Re < W.length; Re += 1) {
var pe = W[Re], Fe = ve(pe, 0, 1), De = ve(pe, -1);
if ((Fe === '"' || Fe === "'" || Fe === "`" || De === '"' || De === "'" || De === "`") && Fe !== De)
throw new D("property names with quotes must have matching quotes");
if ((pe === "constructor" || !Se) && (oe = !0), K += "." + pe, le = "%" + K + "%", re(A, le))
ee = A[le];
else if (ee != null) {
if (!(pe in ee)) {
if (!H)
throw new w("base intrinsic for " + T + " exists, but the property is not available.");
return;
}
if (l && Re + 1 >= W.length) {
var xe = l(ee, pe);
Se = !!xe, Se && "get" in xe && !("originalValue" in xe.get) ? ee = xe.get : ee = ee[pe];
} else
Se = re(ee, pe), ee = ee[pe];
Se && !oe && (A[le] = ee);
}
}
return ee;
}, Tr;
}
var Nr, Ht;
function cn() {
if (Ht) return Nr;
Ht = 1;
var t = /* @__PURE__ */ Jr(), s = sn(), p = s([t("%String.prototype.indexOf%")]);
return Nr = function(a, P) {
var D = (
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
t(a, !!P)
);
return typeof D == "function" && p(a, ".prototype.") > -1 ? s(
/** @type {const} */
[D]
) : D;
}, Nr;
}
var Mr, Qt;
function pn() {
if (Qt) return Mr;
Qt = 1;
var t = /* @__PURE__ */ Jr(), s = /* @__PURE__ */ cn(), p = /* @__PURE__ */ Ge(), u = /* @__PURE__ */ ke(), a = t("%Map%", !0), P = s("Map.prototype.get", !0), D = s("Map.prototype.set", !0), w = s("Map.prototype.has", !0), R = s("Map.prototype.delete", !0), S = s("Map.prototype.size", !0);
return Mr = !!a && /** @type {Exclude<import('.'), false>} */
function() {
var g, h = {
assert: function(f) {
if (!h.has(f))
throw new u("Side channel does not contain " + p(f));
},
delete: function(f) {
if (g) {
var y = R(g, f);
return S(g) === 0 && (g = void 0), y;
}
return !1;
},
get: function(f) {
if (g)
return P(g, f);
},
has: function(f) {
return g ? w(g, f) : !1;
},
set: function(f, y) {
g || (g = new a()), D(g, f, y);
}
};
return h;
}, Mr;
}
var Ur, Kt;
function po() {
if (Kt) return Ur;
Kt = 1;
var t = /* @__PURE__ */ Jr(), s = /* @__PURE__ */ cn(), p = /* @__PURE__ */ Ge(), u = pn(), a = /* @__PURE__ */ ke(), P = t("%WeakMap%", !0), D = s("WeakMap.prototype.get", !0), w = s("WeakMap.prototype.set", !0), R = s("WeakMap.prototype.has", !0), S = s("WeakMap.prototype.delete", !0);
return Ur = P ? (
/** @type {Exclude<import('.'), false>} */
function() {
var g, h, f = {
assert: function(y) {
if (!f.has(y))
throw new a("Side channel does not contain " + p(y));
},
delete: function(y) {
if (P && y && (typeof y == "object" || typeof y == "function")) {
if (g)
return S(g, y);
} else if (u && h)
return h.delete(y);
return !1;
},
get: function(y) {
return P && y && (typeof y == "object" || typeof y == "function") && g ? D(g, y) : h && h.get(y);
},
has: function(y) {
return P && y && (typeof y == "object" || typeof y == "function") && g ? R(g, y) : !!h && h.has(y);
},
set: function(y, c) {
P && y && (typeof y == "object" || typeof y == "function") ? (g || (g = new P()), w(g, y, c)) : u && (h || (h = u()), h.set(y, c));
}
};
return f;
}
) : u, Ur;
}
var Vr, Jt;
function yo() {
if (Jt) return Vr;
Jt = 1;
var t = /* @__PURE__ */ ke(), s = /* @__PURE__ */ Ge(), p = Vn(), u = pn(), a = po(), P = a || u || p;
return Vr = function() {
var w, R = {
assert: function(S) {
if (!R.has(S))
throw new t("Side channel does not contain " + s(S));
},
delete: function(S) {
return !!w && w.delete(S);
},
get: function(S) {
return w && w.get(S);
},
has: function(S) {
return !!w && w.has(S);
},
set: function(S, d) {
w || (w = P()), w.set(S, d);
}
};
return R;
}, Vr;
}
var Wr, Yt;
function Yr() {
if (Yt) return Wr;
Yt = 1;
var t = String.prototype.replace, s = /%20/g, p = {
RFC1738: "RFC1738",
RFC3986: "RFC3986"
};
return Wr = {
default: p.RFC3986,
formatters: {
RFC1738: function(u) {
return t.call(u, s, "+");
},
RFC3986: function(u) {
return String(u);
}
},
RFC1738: p.RFC1738,
RFC3986: p.RFC3986
}, Wr;
}
var Lr, Xt;
function dn() {
if (Xt) return Lr;
Xt = 1;
var t = /* @__PURE__ */ Yr(), s = Object.prototype.hasOwnProperty, p = Array.isArray, u = (function() {
for (var e = [], o = 0; o < 256; ++o)
e.push("%" + ((o < 16 ? "0" : "") + o.toString(16)).toUpperCase());
return e;
})(), a = function(o) {
for (; o.length > 1; ) {
var l = o.pop(), b = l.obj[l.prop];
if (p(b)) {
for (var m = [], O = 0; O < b.length; ++O)
typeof b[O] < "u" && m.push(b[O]);
l.obj[l.prop] = m;
}
}
}, P = function(o, l) {
for (var b = l && l.plainObjects ? { __proto__: null } : {}, m = 0; m < o.length; ++m)
typeof o[m] < "u" && (b[m] = o[m]);
return b;
}, D = function e(o, l, b) {
if (!l)
return o;
if (typeof l != "object" && typeof l != "function") {
if (p(o))
o.push(l);
else if (o && typeof o == "object")
(b && (b.plainObjects || b.allowPrototypes) || !s.call(Object.prototype, l)) && (o[l] = !0);
else
return [o, l];
return o;
}
if (!o || typeof o != "object")
return [o].concat(l);
var m = o;
return p(o) && !p(l) && (m = P(o, b)), p(o) && p(l) ? (l.forEach(function(O, _) {
if (s.call(o, _)) {
var E = o[_];
E && typeof E == "object" && O && typeof O == "object" ? o[_] = e(E, O, b) : o.push(O);
} else
o[_] = O;
}), o) : Object.keys(l).reduce(function(O, _) {
var E = l[_];
return s.call(O, _) ? O[_] = e(O[_], E, b) : O[_] = E, O;
}, m);
}, w = function(o, l) {
return Object.keys(l).reduce(function(b, m) {
return b[m] = l[m], b;
}, o);
}, R = function(e, o, l) {
var b = e.replace(/\+/g, " ");
if (l === "iso-8859-1")
return b.replace(/%[0-9a-f]{2}/gi, unescape);
try {
return decodeURIComponent(b);
} catch {
return b;
}
}, S = 1024, d = function(o, l, b, m, O) {
if (o.length === 0)
return o;
var _ = o;
if (typeof o == "symbol" ? _ = Symbol.prototype.toString.call(o) : typeof o != "string" && (_ = String(o)), b === "iso-8859-1")
return escape(_).replace(/%u[0-9a-f]{4}/gi, function(v) {
return "%26%23" + parseInt(v.slice(2), 16) + "%3B";
});
for (var E = "", x = 0; x < _.length; x += S) {
for (var k = _.length >= S ? _.slice(x, x + S) : _, C = [], U = 0; U < k.length; ++U) {
var i = k.charCodeAt(U);
if (i === 45 || i === 46 || i === 95 || i === 126 || i >= 48 && i <= 57 || i >= 65 && i <= 90 || i >= 97 && i <= 122 || O === t.RFC1738 && (i === 40 || i === 41)) {
C[C.length] = k.charAt(U);
continue;
}
if (i < 128) {
C[C.length] = u[i];
continue;
}
if (i < 2048) {
C[C.length] = u[192 | i >> 6] + u[128 | i & 63];
continue;
}
if (i < 55296 || i >= 57344) {
C[C.length] = u[224 | i >> 12] + u[128 | i >> 6 & 63] + u[128 | i & 63];
continue;
}
U += 1, i = 65536 + ((i & 1023) << 10 | k.charCodeAt(U) & 1023), C[C.length] = u[240 | i >> 18] + u[128 | i >> 12 & 63] + u[128 | i >> 6 & 63] + u[128 | i & 63];
}
E += C.join("");
}
return E;
}, g = function(o) {
for (var l = [{ obj: { o }, prop: "o" }], b = [], m = 0; m < l.length; ++m)
for (var O = l[m], _ = O.obj[O.prop], E = Object.keys(_), x = 0; x < E.length; ++x) {
var k = E[x], C = _[k];
typeof C == "object" && C !== null && b.indexOf(C) === -1 && (l.push({ obj: _, prop: k }), b.push(C));
}
return a(l), o;
}, h = function(o) {
return Object.prototype.toString.call(o) === "[object RegExp]";
}, f = function(o) {
return !o || typeof o != "object" ? !1 : !!(o.constructor && o.constructor.isBuffer && o.constructor.isBuffer(o));
}, y = function(o, l) {
return [].concat(o, l);
}, c = function(o, l) {
if (p(o)) {
for (var b = [], m = 0; m < o.length; m += 1)
b.push(l(o[m]));
return b;
}
return l(o);
};
return Lr = {
arrayToObject: P,
assign: w,
combine: y,
compact: g,
decode: R,
encode: d,
isBuffer: f,
isRegExp: h,
maybeMap: c,
merge: D
}, Lr;
}
var zr, Zt;
function vo() {
if (Zt) return zr;
Zt = 1;
var t = yo(), s = /* @__PURE__ */ dn(), p = /* @__PURE__ */ Yr(), u = Object.prototype.hasOwnProperty, a = {
brackets: function(e) {
return e + "[]";
},
comma: "comma",
indices: function(e, o) {
return e + "[" + o + "]";
},
repeat: function(e) {
return e;
}
}, P = Array.isArray, D = Array.prototype.push, w = function(c, e) {
D.apply(c, P(e) ? e : [e]);
}, R = Date.prototype.toISOString, S = p.default, d = {
addQueryPrefix: !1,
allowDots: !1,
allowEmptyArrays: !1,
arrayFormat: "indices",
charset: "utf-8",
charsetSentinel: !1,
commaRoundTrip: !1,
delimiter: "&",
encode: !0,
encodeDotInKeys: !1,
encoder: s.encode,
encodeValuesOnly: !1,
filter: void 0,
format: S,
formatter: p.formatters[S],
// deprecated
indices: !1,
serializeDate: function(e) {
return R.call(e);
},
skipNulls: !1,
strictNullHandling: !1
}, g = function(e) {
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
}, h = {}, f = function c(e, o, l, b, m, O, _, E, x, k, C, U, i, v, A, I, Q, J) {
for (var B = e, re = J, se = 0, he = !1; (re = re.get(h)) !== void 0 && !he; ) {
var ce = re.get(e);
if (se += 1, typeof ce < "u") {
if (ce === se)
throw new RangeError("Cyclic object value");
he = !0;
}
typeof re.get(h) > "u" && (se = 0);
}
if (typeof k == "function" ? B = k(o, B) : B instanceof Date ? B = i(B) : l === "comma" && P(B) && (B = s.maybeMap(B, function(le) {
return le instanceof Date ? i(le) : le;
})), B === null) {
if (O)
return x && !I ? x(o, d.encoder, Q, "key", v) : o;
B = "";
}
if (g(B) || s.isBuffer(B)) {
if (x) {
var ve = I ? o : x(o, d.encoder, Q, "key", v);
return [A(ve) + "=" + A(x(B, d.encoder, Q, "value", v))];
}
return [A(o) + "=" + A(String(B))];
}
var me = [];
if (typeof B > "u")
return me;
var F;
if (l === "comma" && P(B))
I && x && (B = s.maybeMap(B, x)), F = [{ value: B.length > 0 ? B.join(",") || null : void 0 }];
else if (P(k))
F = k;
else {
var Y = Object.keys(B);
F = C ? Y.sort(C) : Y;
}
var we = E ? String(o).replace(/\./g, "%2E") : String(o), be = b && P(B) && B.length === 1 ? we + "[]" : we;
if (m && P(B) && B.length === 0)
return be + "[]";
for (var X = 0; X < F.length; ++X) {
var T = F[X], H = typeof T == "object" && T && typeof T.value < "u" ? T.value : B[T];
if (!(_ && H === null)) {
var W = U && E ? String(T).replace(/\./g, "%2E") : String(T), K = P(B) ? typeof l == "function" ? l(be, W) : be : be + (U ? "." + W : "[" + W + "]");
J.set(e, se);
var Z = t();
Z.set(h, J), w(me, c(
H,
K,
l,
b,
m,
O,
_,
E,
l === "comma" && I && P(B) ? null : x,
k,
C,
U,
i,
v,
A,
I,
Q,
Z
));
}
}
return me;
}, y = function(e) {
if (!e)
return d;
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
throw new TypeError("Encoder has to be a function.");
var o = e.charset || d.charset;
if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
var l = p.default;
if (typeof e.format < "u") {
if (!u.call(p.formatters, e.format))
throw new TypeError("Unknown format option provided.");
l = e.format;
}
var b = p.formatters[l], m = d.filter;
(typeof e.filter == "function" || P(e.filter)) && (m = e.filter);
var O;
if (e.arrayFormat in a ? O = e.arrayFormat : "indices" in e ? O = e.indices ? "indices" : "repeat" : O = d.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
var _ = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : d.allowDots : !!e.allowDots;
return {
addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : d.addQueryPrefix,
allowDots: _,
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : d.allowEmptyArrays,
arrayFormat: O,
charset: o,
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : d.charsetSentinel,
commaRoundTrip: !!e.commaRoundTrip,
delimiter: typeof e.delimiter > "u" ? d.delimiter : e.delimiter,
encode: typeof e.encode == "boolean" ? e.encode : d.encode,
encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : d.encodeDotInKeys,
encoder: typeof e.encoder == "function" ? e.encoder : d.encoder,
encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : d.encodeValuesOnly,
filter: m,
format: l,
formatter: b,
serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : d.serializeDate,
skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : d.skipNulls,
sort: typeof e.sort == "function" ? e.sort : null,
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : d.strictNullHandling
};
};
return zr = function(c, e) {
var o = c, l = y(e), b, m;
typeof l.filter == "function" ? (m = l.filter, o = m("", o)) : P(l.filter) && (m = l.filter, b = m);
var O = [];
if (typeof o != "object" || o === null)
return "";
var _ = a[l.arrayFormat], E = _ === "comma" && l.commaRoundTrip;
b || (b = Object.keys(o)), l.sort && b.sort(l.sort);
for (var x = t(), k = 0; k < b.length; ++k) {
var C = b[k], U = o[C];
l.skipNulls && U === null || w(O, f(
U,
C,
_,
E,
l.allowEmptyArrays,
l.strictNullHandling,
l.skipNulls,
l.encodeDotInKeys,
l.encode ? l.encoder : null,
l.filter,
l.sort,
l.allowDots,
l.serializeDate,
l.format,
l.formatter,
l.encodeValuesOnly,
l.charset,
x
));
}
var i = O.join(l.delimiter), v = l.addQueryPrefix === !0 ? "?" : "";
return l.charsetSentinel && (l.charset === "iso-8859-1" ? v += "utf8=%26%2310003%3B&" : v += "utf8=%E2%9C%93&"), i.length > 0 ? v + i : "";
}, zr;
}
var Gr, en;
function mo() {
if (en) return Gr;
en = 1;
var t = /* @__PURE__ */ dn(), s = Object.prototype.hasOwnProperty, p = Array.isArray, u = {
allowDots: !1,
allowEmptyArrays: !1,
allowPrototypes: !1,
allowSparse: !1,
arrayLimit: 20,
charset: "utf-8",
charsetSentinel: !1,
comma: !1,
decodeDotInKeys: !1,
decoder: t.decode,
delimiter: "&",
depth: 5,
duplicates: "combine",
ignoreQueryPrefix: !1,
interpretNumericEntities: !1,
parameterLimit: 1e3,
parseArrays: !0,
plainObjects: !1,
strictDepth: !1,
strictNullHandling: !1,
throwOnLimitExceeded: !1
}, a = function(h) {
return h.replace(/&#(\d+);/g, function(f, y) {
return String.fromCharCode(parseInt(y, 10));
});
}, P = function(h, f, y) {
if (h && typeof h == "string" && f.comma && h.indexOf(",") > -1)
return h.split(",");
if (f.throwOnLimitExceeded && y >= f.arrayLimit)
throw new RangeError("Array limit exceeded. Only " + f.arrayLimit + " element" + (f.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
return h;
}, D = "utf8=%26%2310003%3B", w = "utf8=%E2%9C%93", R = function(f, y) {
var c = { __proto__: null }, e = y.ignoreQueryPrefix ? f.replace(/^\?/, "") : f;
e = e.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
var o = y.parameterLimit === 1 / 0 ? void 0 : y.parameterLimit, l = e.split(
y.delimiter,
y.throwOnLimitExceeded ? o + 1 : o
);
if (y.throwOnLimitExceeded && l.length > o)
throw new RangeError("Parameter limit exceeded. Only " + o + " parameter" + (o === 1 ? "" : "s") + " allowed.");
var b = -1, m, O = y.charset;
if (y.charsetSentinel)
for (m = 0; m < l.length; ++m)
l[m].indexOf("utf8=") === 0 && (l[m] === w ? O = "utf-8" : l[m] === D && (O = "iso-8859-1"), b = m, m = l.length);
for (m = 0; m < l.length; ++m)
if (m !== b) {
var _ = l[m], E = _.indexOf("]="), x = E === -1 ? _.indexOf("=") : E + 1, k, C;
x === -1 ? (k = y.decoder(_, u.decoder, O, "key"), C = y.strictNullHandling ? null : "") : (k = y.decoder(_.slice(0, x), u.decoder, O, "key"), C = t.maybeMap(
P(
_.slice(x + 1),
y,
p(c[k]) ? c[k].length : 0
),
function(i) {
return y.decoder(i, u.decoder, O, "value");
}
)), C && y.interpretNumericEntities && O === "iso-8859-1" && (C = a(String(C))), _.indexOf("[]=") > -1 && (C = p(C) ? [C] : C);
var U = s.call(c, k);
U && y.duplicates === "combine" ? c[k] = t.combine(c[k], C) : (!U || y.duplicates === "last") && (c[k] = C);
}
return c;
}, S = function(h, f, y, c) {
var e = 0;
if (h.length > 0 && h[h.length - 1] === "[]") {
var o = h.slice(0, -1).join("");
e = Array.isArray(f) && f[o] ? f[o].length : 0;
}
for (var l = c ? f : P(f, y, e), b = h.length - 1; b >= 0; --b) {
var m, O = h[b];
if (O === "[]" && y.parseArrays)
m = y.allowEmptyArrays && (l === "" || y.strictNullHandling && l === null) ? [] : t.combine([], l);
else {
m = y.plainObjects ? { __proto__: null } : {};
var _ = O.charAt(0) === "[" && O.charAt(O.length - 1) === "]" ? O.slice(1, -1) : O, E = y.decodeDotInKeys ? _.replace(/%2E/g, ".") : _, x = parseInt(E, 10);
!y.parseArrays && E === "" ? m = { 0: l } : !isNaN(x) && O !== E && String(x) === E && x >= 0 && y.parseArrays && x <= y.arrayLimit ? (m = [], m[x] = l) : E !== "__proto__" && (m[E] = l);
}
l = m;
}
return l;
}, d = function(f, y, c, e) {
if (f) {
var o = c.allowDots ? f.replace(/\.([^.[]+)/g, "[$1]") : f, l = /(\[[^[\]]*])/, b = /(\[[^[\]]*])/g, m = c.depth > 0 && l.exec(o), O = m ? o.slice(0, m.index) : o, _ = [];
if (O) {
if (!c.plainObjects && s.call(Object.prototype, O) && !c.allowPrototypes)
return;
_.push(O);
}
for (var E = 0; c.depth > 0 && (m = b.exec(o)) !== null && E < c.depth; ) {
if (E += 1, !c.plainObjects && s.call(Object.prototype, m[1].slice(1, -1)) && !c.allowPrototypes)
return;
_.push(m[1]);
}
if (m) {
if (c.strictDepth === !0)
throw new RangeError("Input depth exceeded depth option of " + c.depth + " and strictDepth is true");
_.push("[" + o.slice(m.index) + "]");
}
return S(_, y, c, e);
}
}, g = function(f) {
if (!f)
return u;
if (typeof f.allowEmptyArrays < "u" && typeof f.allowEmptyArrays != "boolean")
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
if (typeof f.decodeDotInKeys < "u" && typeof f.decodeDotInKeys != "boolean")
throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
if (f.decoder !== null && typeof f.decoder < "u" && typeof f.decoder != "function")
throw new TypeError("Decoder has to be a function.");
if (typeof f.charset < "u" && f.charset !== "utf-8" && f.charset !== "iso-8859-1")
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
if (typeof f.throwOnLimitExceeded < "u" && typeof f.throwOnLimitExceeded != "boolean")
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
var y = typeof f.charset > "u" ? u.charset : f.charset, c = typeof f.duplicates > "u" ? u.duplicates : f.duplicates;
if (c !== "combine" && c !== "first" && c !== "last")
throw new TypeError("The duplicates option must be either combine, first, or last");
var e = typeof f.allowDots > "u" ? f.decodeDotInKeys === !0 ? !0 : u.allowDots : !!f.allowDots;
return {
allowDots: e,
allowEmptyArrays: typeof f.allowEmptyArrays == "boolean" ? !!f.allowEmptyArrays : u.allowEmptyArrays,
allowPrototypes: typeof f.allowPrototypes == "boolean" ? f.allowPrototypes : u.allowPrototypes,
allowSparse: typeof f.allowSparse == "boolean" ? f.allowSparse : u.allowSparse,
arrayLimit: typeof f.arrayLimit == "number" ? f.arrayLimit : u.arrayLimit,
charset: y,
charsetSentinel: typeof f.charsetSentinel == "boolean" ? f.charsetSentinel : u.charsetSentinel,
comma: typeof f.comma == "boolean" ? f.comma : u.comma,
decodeDotInKeys: typeof f.decodeDotInKeys == "boolean" ? f.decodeDotInKeys : u.decodeDotInKeys,
decoder: typeof f.decoder == "function" ? f.decoder : u.decoder,
delimiter: typeof f.delimiter == "string" || t.isRegExp(f.delimiter) ? f.delimiter : u.delimiter,
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
depth: typeof f.depth == "number" || f.depth === !1 ? +f.depth : u.depth,
duplicates: c,
ignoreQueryPrefix: f.ignoreQueryPrefix === !0,
interpretNumericEntities: typeof f.interpretNumericEntities == "boolean" ? f.interpretNumericEntities : u.interpretNumericEntities,
parameterLimit: typeof f.parameterLimit == "number" ? f.parameterLimit : u.parameterLimit,
parseArrays: f.parseArrays !== !1,
plainObjects: typeof f.plainObjects == "boolean" ? f.plainObjects : u.plainObjects,
strictDepth: typeof f.strictDepth == "boolean" ? !!f.strictDepth : u.strictDepth,
strictNullHandling: typeof f.strictNullHandling == "boolean" ? f.strictNullHandling : u.strictNullHandling,
throwOnLimitExceeded: typeof f.throwOnLimitExceeded == "boolean" ? f.throwOnLimitExceeded : !1
};
};
return Gr = function(h, f) {
var y = g(f);
if (h === "" || h === null || typeof h > "u")
return y.plainObjects ? { __proto__: null } : {};
for (var c = typeof h == "string" ? R(h, y) : h, e = y.plainObjects ? { __proto__: null } : {}, o = Object.keys(c), l = 0; l < o.length; ++l) {
var b = o[l], m = d(b, c[b], y, typeof h == "string");
e = t.merge(e, m, y);
}
return y.allowSparse === !0 ? e : t.compact(e);
}, Gr;
}
var jr, rn;
function go() {
if (rn) return jr;
rn = 1;
var t = /* @__PURE__ */ vo(), s = /* @__PURE__ */ mo(), p = /* @__PURE__ */ Yr();
return jr = {
formats: p,
parse: s,
stringify: t
}, jr;
}
var ho = /* @__PURE__ */ go();
const wo = /* @__PURE__ */ kn(ho), Ee = Bn.create({
// VITE_APP_BASE_API 是在 .env 文件中定义的基础 URL
baseURL: "",
timeout: 1e4,
// 请求超时时间
paramsSerializer: {
serialize: (t) => wo.stringify(t, { arrayFormat: "repeat" })
}
});
Ee.interceptors.request.use(
(t) => {
const s = localStorage.getItem("token");
return s && (t.headers.Authorization = "Bearer " + s), t;
},
(t) => (console.log(t), Promise.reject(t))
);
Ee.interceptors.response.use(
/**
* @description 如果您想直接获取诸如 headers 或 status 之类的信息,
* 请直接返回 response => response
*/
(t) => {
const s = t.data;
return s.code !== 200 ? ($e({
message: s.msg || "Error",
// 使用后端返回的 `msg` 作为错误提示
type: "error",
duration: 5 * 1e3
}), (s.code === 401 || s.code === 403) && qn.confirm(
"您的登录状态已失效,请重新登录",
"确认登出",
{
confirmButtonText: "重新登录",
cancelButtonText: "取消",
type: "warning"
}
).then(() => {
localStorage.removeItem("token"), location.reload();
}), Promise.reject(new Error(s.msg || "Error"))) : s;
},
(t) => (console.log("HTTP Error: " + t), $e({
message: "网络错误,请检查您的网络连接或联系管理员",
// 提供更友好的网络错误提示
type: "error",
duration: 5 * 1e3
}), Promise.reject(t))
);
function bo(t) {
return An() ? (_n(t), !0) : !1;
}
const So = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const Ao = So ? window : void 0;
function tn(t) {
var s;
const p = nn(t);
return (s = p == null ? void 0 : p.$el) != null ? s : p;
}
// @__NO_SIDE_EFFECTS__
function _o() {
const t = On(!1), s = En();
return s && Qr(() => {
t.value = !0;
}, s), t;
}
// @__NO_SIDE_EFFECTS__
function Oo(t) {
const s = /* @__PURE__ */ _o();
return Be(() => (s.value, !!t()));
}
function Eo(t, s, p = {}) {
const { window: u = Ao, ...a } = p;
let P;
const D = /* @__PURE__ */ Oo(() => u && "ResizeObserver" in u), w = () => {
P && (P.disconnect(), P = void 0);
}, R = Be(() => {
const g = nn(t);
return Array.isArray(g) ? g.map((h) => tn(h)) : [tn(g)];
}), S = Hr(
R,
(g) => {
if (w(), D.value && u) {
P = new ResizeObserver(s);
for (const h of g)
h && P.observe(h, a);
}
},
{ immediate: !0, flush: "post" }
), d = () => {
w(), S();
};
return bo(d), {
isSupported: D,
stop: d
};
}
const Po = /* @__PURE__ */ ze({
__name: "TableHeaderWithTooltip",
props: {
label: {},
placement: {}
},
setup(t) {
const s = Pe(null), p = Pe(!1), u = () => {
s.value && (p.value = s.value.scrollWidth > s.value.clientWidth);
};
return Qr(() => {
u();
}), Eo(s, () => {
u();
}), (a, P) => {
const D = j("el-tooltip");
return p.value ? (q(), V(D, {
key: 1,
content: a.label,
placement: a.placement || "top"
}, {
default: N(() => [
fe("span", {
ref_key: "textRef",
ref: s,
class: "header-cell-content"
}, Me(a.label), 513)
]),
_: 1
}, 8, ["content", "placement"])) : (q(), ne("span", {
key: 0,
ref_key: "textRef",
ref: s,
class: "header-cell-content"
}, Me(a.label), 513));
};
}
}), yn = (t, s) => {
const p = t.__vccOpts || t;
for (const [u, a] of s)
p[u] = a;
return p;
}, Ro = /* @__PURE__ */ yn(Po, [["__scopeId", "data-v-d23c8660"]]), Fo = {
key: 0,
class: "search-section-wrapper"
}, Do = { class: "flex flex-wrap items-center justify-between gap-4" }, xo = { class: "flex items-center gap-x-2" }, Co = { class: "flex items-center gap-x-3 action-buttons flex-shrink-0" }, qo = { class: "table-content-wrapper" }, Bo = { key: 1 }, $o = {
key: 0,
class: "flex items-center gap-x-2"
}, Io = {
key: 1,
class: "pagination-wrapper flex justify-end mt-2"
}, ko = { style: { "overflow-y": "auto", flex: "1" } }, To = {
key: 2,
style: { "max-width": "700px", width: "100%", margin: "0 auto" }
}, No = { style: { "max-width": "700px", width: "100%", margin: "0 auto", display: "flex", "justify-content": "flex-end", gap: "12px" } }, Mo = { class: "flex items-center" }, Uo = { class: "el-dialog__title" }, Vo = { style: { "overflow-y": "auto", flex: "1" } }, Wo = {
key: 1,
style: { width: "700px", margin: "0 auto" }
}, Lo = { style: { "max-width": "700px", width: "100%", margin: "0 auto", display: "flex", "justify-content": "flex-end", gap: "12px" } }, zo = /* @__PURE__ */ ze({
__name: "CrudTable",
props: {
/**
* @description 组件的主题风格
* @type {'default' | 'large-screen'}
*/
theme: { type: String, default: "default" },
customClass: { type: String, default: "" },
// API 相关配置
apiUrlQuery: { type: String, required: !0 },
apiUrlDetail: { type: String, required: !0 },
apiUrlCreate: { type: String, required: !0 },
apiUrlUpdate: { type: String, required: !0 },
apiUrlDelete: { type: String, required: !0 },
// ✨ [新增] Loading 状态相关配置
/**
* @description 加载数据时显示的提示文字
* @type {String}
*/
loadingText: {
type: String,
default: "加载中…"
// 默认为‘加载中…’
},
/**
* @description 遮罩层的背景色 (CSS color)
* @type {String}
*/
loadingBackground: {
type: String,
default: "rgba(0, 0, 0, 0.3)"
// 默认为 rgba(0, 0, 0, 0.3)
},
showSearchSection: { type: Boolean, default: !0 },
// ✨ [新增] 控制搜索/清空按钮的显示
showSearchActionButtons: { type: Boolean, default: !0 },
/**
* @description [✨ 新增] 单独控制“搜索”按钮的显示
* 必须在 showSearchActionButtons = true 时才生效
* @type {Boolean}
*/
showSearchButton: { type: Boolean, default: !0 },
/**
* @description [✨ 新增] 单独控制“清空”按钮的显示
* 必须在 showSearchActionButtons = true 时才生效
* @type {Boolean}
*/
showClearButton: { type: Boolean, default: !0 },
// 控制新增按钮
showNewBtn: { type: Boolean, default: !0 },
// 表格列定义,通过配置数组动态渲染,比 slot 更灵活。
columns: {
type: Array,
default: () => []
},
// 生命周期钩子函数,允许在特定操作前后注入自定义逻辑。
onBeforeQuery: { type: Function },
onAfterQuery: {
type: Function
},
onBeforeOpenDialog: { type: Function },
onAfterOpenDialog: { type: Function },
onBeforeSubmit: {
type: Function
},
onAfterSubmit: { type: Function },
onBeforeDelete: {
type: Function
},
onAfterDelete: {
type: Function
},
// 功能开关,控制UI元素的显示/隐藏。
showSelectionColumn: { type: Boolean, default: !0 },
showIndexColumn: { type: Boolean, default: !0 },
showActionsColumn: { type: Boolean, default: !0 },
showEditButton: { type: Boolean, default: !0 },
showDeleteButton: { type: Boolean, default: !0 },
showViewButton: { type: Boolean, default: !1 },
// UI 定制化配置
actionsColumnWidth: { type: [String, Number], default: 120 },
dialogWidth: { type: String, default: "50%" },
initialSearchForm: { type: Object, default: () => ({ pageNum: 1, pageSize: 10 }) },
// 分页相关配置
showPagination: { type: Boolean, default: !0 },
pageSizes: { type: Array, default: () => [10, 20, 50, 100] },
paginationLayout: { type: String, default: "total, sizes, prev, pager, next, jumper" },
paginationBackground: { type: Boolean, default: !0 },
paginationSmall: { type: Boolean, default: !1 },
paginationHideOnSinglePage: { type: Boolean, default: !1 },
// 弹窗表单配置
dialogFormConfig: { type: Array, default: () => [] },
dialogFormRules: { type: Object, default: () => ({}) },
/**
* @description 弹窗表单的标签宽度 (label-width)
* @type {String}
*/
dialogFormLabelWidth: { type: String, default: "120" },
/**
* @description 是否以 multipart/form-data 格式提交表单。
* 适用于需要上传文件的场景。
* @type {Boolean}
*/
submitAsFormData: { type: Boolean, default: !1 },
/**
* @description [✨ 新增] 控制弹窗是否在组件内部全屏
* @type {Boolean}
*/
dialogFullscreen: { type: Boolean, default: !1 },
/**
* @description [✨ 新增] 新增弹窗的自定义标题
* @type {String}
*/
addDialogTitle: { type: String, default: "新增" },
/**
* @description [✨ 新增] 编辑弹窗的自定义标题
* @type {String}
*/
editDialogTitle: { type: String, default: "编辑" }
},
emits: ["open-dialog", "submit", "delete", "update:initialSearchForm"],
setup(t, { expose: s, emit: p }) {
const u = p, a = t, P = Be(() => ["crud-table-wrapper", `theme-${a.theme}`, a.customClass]), D = Be(() => a.theme === "large-screen" ? "large-screen-dialog" : ""), w = (i, v) => i ? !0 : ($e.error(`${v} prop is required.`), !1), R = (i, v, A) => A ? i && Array.isArray(i.permissions) ? i.permissions.includes(v) : !0 : !1, S = async (i, v) => {
if (i === "view")
return Promise.resolve();
try {
let A = { ...v };
a.onBeforeSubmit && (A = await a.onBeforeSubmit(A, i));
let I = A;
if (a.submitAsFormData) {
const Q = new FormData();
for (const J in A)
if (Object.prototype.hasOwnProperty.call(A, J)) {
const B = A[J];
Q.append(J, B ?? "");
}
I = Q;
}
if (c.submitting = !0, i === "add") {
if (!w(a.apiUrlCreate, "apiUrlCreate")) throw new Error("apiUrlCreate is not configured.");
await Ee.post(a.apiUrlCreate, I), $e.success("新增成功");
} else {
if (!w(a.apiUrlUpdate, "apiUrlUpdate")) throw new Error("apiUrlUpdate is not configured.");
await Ee.put(a.apiUrlUpdate, I), $e.success("更新成功");
}
return a.onAfterSubmit && a.onAfterSubmit(i, A), u("submit", { mode: i, data: A }), c.visible && (c.visible = !1), l(), Promise.resolve();
} catch (A) {
return console.error("Submit failed:", A), Promise.reject(A);
} finally {
c.submitting = !1;
}
}, d = ut({ pageNum: 1, pageSize: 10, ...a.initialSearchForm }), g = Pe([]), h = Pe(0), f = Pe(!1), y = Pe([]), c = ut({ visible: !1, loading: !1, submitting: !1, mode: "add", data: {}, formRef: null }), e = Be(() => c.mode === "add" ? a.addDialogTitle : a.editDialogTitle), o = Be(() => c.mode === "add" ? a.dialogFormConfig.filter((v) => v.prop !== "id") : [...a.dialogFormConfig.filter((v) => v.prop !== "id")]), l = async () => {
if (w(a.apiUrlQuery, "apiUrlQuery")) {
f.value = !0;
try {
let i = { ...d };
a.onBeforeQuery && (i = await a.onBeforeQuery(i));
const v = await Ee.get(a.apiUrlQuery, { params: i });
let A = [], I = 0, Q = !1;
v != null && v.data && Array.isArray(v.data.rows) ? (A = v.data.rows, I = typeof v.data.total == "number" ? v.data.total : A.length, Q = !0) : Array.isArray(v == null ? void 0 : v.data) ? (A = v.data, I = v.data.length, Q = !0) : Array.isArray(v) && (A = v, I = v.length, Q = !0), Q ? (a.onAfterQuery && (A = await a.onAfterQuery(A, i)), g.value = A, h.value = I) : (console.warn("未识别的 API 响应格式,请检查 fetchData 中的兼容逻辑。", v), g.value = [], h.value = 0);
} catch (i) {
console.error("Fetch data failed:", i), g.value = [], h.value = 0;
} finally {
f.value = !1;
}
}
}, b = (i) => {
i ? Object.assign(d, i) : Object.assign(d, a.initialSearchForm), d.pageNum = 1, l();
}, m = () => {
const { pageNum: i, pageSize: v, ...A } = a.initialSearchForm;
Object.keys(d).forEach((I) => {
I !== "pageNum" && I !== "pageSize" && delete d[I];
}), Object.assign(d, A), b();
}, O = (i) => {
y.value = i;
}, _ = async (i, v) => {
debugger;
let A;
if (i === "add" ? A = v ? { ...v } : { role: "user" } : A = { ...v }, a.onBeforeOpenDialog) {
const I = await a.onBeforeOpenDialog(i, A);
I && (A = I);
}
if (c.mode = i, c.visible = !0, i === "edit" || i === "view") {
if (!w(a.apiUrlDetail, "apiUrlDetail")) return;
c.loading = !0;
try {
const I = await Ee.get(a.apiUrlDetail + "/" + A.id.toString());
c.data = I.data;
} finally {
c.loading = !1, a.onAfterOpenDialog && a.onAfterOpenDialog(i, c.data), u("open-dialog", { mode: i, data: c.data });
}
} else
c.data = A, a.onAfterOpenDialog && a.onAfterOpenDialog(i, c.data), u("open-dialog", { mode: i, data: c.data });
}, E = async () => {
if (c.mode !== "view")
try {
c.formRef ? await c.formRef.validate() : console.warn("Dialog form ref is not available for validation."), await S(c.mode, c.data);
} catch (i) {
console.log("Validation or submit error:", i);
}
}, x = async (i) => {
if (w(a.apiUrlDelete, "apiUrlDelete"))
try {
const v = g.value.filter((I) => i.includes(I.id));
if (a.onBeforeDelete && await a.onBeforeDelete(i, v) === !1)
return;
const A = i.join(",");
await Ee.delete(a.apiUrlDelete + "/" + A.toString()), $e.success("删除成功"), a.onAfterDelete && a.onAfterDelete(i, v), u("delete", i), g.value.length === i.length && d.pageNum > 1 && d.pageNum--, l();
} catch (v) {
console.error("Delete failed", v);
}
}, k = (i) => {
d.pageSize = i, b();
}, C = (i) => {
d.pageNum = i, l();
};
Qr(l);
const U = () => {
c.visible = !1;
};
return Hr(
d,
(i) => {
u("update:initialSearchForm", { ...Pn(i) });
},
{ deep: !0 }
), Hr(
() => a.initialSearchForm,
(i) => {
Object.assign(d, i);
},
{ deep: !0 }
), s({
refresh: l,
// 刷新表格
search: b,
// 按当前条件搜索
handleDelete: x,
// 手动触发删除
openDialog: _,
// 手动打开弹窗
submit: S,
// 手动提交
closeDialog: U
//关闭弹窗
}), (i, v) => {
const A = j("el-button"), I = j("el-form-item"), Q = j("el-form"), J = j("el-table-column"), B = j("el-popconfirm"), re = j("el-table"), se = j("el-pagination"), he = j("el-skeleton"), ce = j("el-dialog"), ve = j("el-icon"), me = Rn("loading");
return q(), ne("div", {
class: Fn([P.value, "crud-table-container"])
}, [
a.showSearchSection ? (q(), ne("div", Fo, [
te(i.$slots, "header", {}, void 0, !0),
fe("div", Do, [
ae(Q, {
model: d,
class: "query-form flex flex-nowrap items-center gap-x-4",
style: { "overflow-x": "auto", "padding-bottom": "8px" }
}, {
default: N(() => [
te(i.$slots, "query-conditions", { searchForm: d }, void 0, !0),
ae(I, { class: "!mr-0 flex-shrink-0" }, {
default: N(() => [
fe("div", xo, [
te(i.$slots, "query-left", { searchForm: d }, void 0, !0),
a.showSearchActionButtons ? (q(), ne(Ie, { key: 0 }, [
a.showSearchButton ? (q(), V(A, {
key: 0,
color: "#336FFF",
onClick: b,
loading: f.value
}, {
default: N(() => [...v[8] || (v[8] = [
ye("搜索", -1)
])]),
_: 1
}, 8, ["loading"])) : G("", !0),
a.showClearButton ? (q(), V(A, {
key: 1,
color: "#336FFF",
plain: "",
onClick: m
}, {
default: N(() => [...v[9] || (v[9] = [
ye("清空", -1)
])]),
_: 1
})) : G("", !0)
], 64)) : G("", !0),
te(i.$slots, "query-right", { searchForm: d }, void 0, !0)
])
]),
_: 3
})
]),
_: 3
}, 8, ["model"]),
fe("div", Co, [
te(i.$slots, "action-left", { selections: y.value }, void 0, !0),
te(i.$slots, "add-button-content", { selections: y.value }, () => [
a.showNewBtn ? (q(), V(A, {
key: 0,
color: "#336FFF",
onClick: v[0] || (v[0] = (F) => _("add"))
}, {
default: N(() => [...v[10] || (v[10] = [
ye("新增", -1)
])]),
_: 1
})) : G("", !0)
], !0),
te(i.$slots, "action-right", { selections: y.value }, void 0, !0)
])
])
])) : G("", !0),
fe("div", qo, [
Dn((q(), V(re, ge({
data: g.value,
"element-loading-text": a.loadingText,
"element-loading-background": a.loadingBackground,
onSelectionChange: O
}, i.$attrs, {
height: "100%",
style: { width: "100%" }
}), {
default: N(() => [
a.showSelectionColumn ? (q(), V(J, {
key: 0,
type: "selection",
width: "55",
fixed: ""
})) : G("", !0),
a.showIndexColumn ? (q(), V(J, {
key: 1,
type: "index",
label: "序号",
width: "70",
fixed: ""
})) : G("", !0),
(q(!0), ne(Ie, null, Le(a.columns, (F) => (q(), V(J, ge({
key: F.prop,
prop: F.prop,
label: F.label,
width: F.width,
sortable: F.sortable || !1
}, { ref_for: !0 }, F.attrs), xn({
header: N(() => [
F.headerTooltip ? (q(), V(Ro, {
key: 0,
label: F.label,
placement: F.placement
}, null, 8, ["label", "placement"])) : (q(), ne("span", Bo, Me(F.label), 1))
]),
_: 2
}, [
F.slot ? {
name: "default",
fn: N((Y) => [
te(i.$slots, F.slot, {
row: Y.row
}, void 0, !0)
]),
key: "0"
} : void 0
]), 1040, ["prop", "label", "width", "sortable"]))), 128)),
a.showActionsColumn ? (q(), V(J, {
key: 2,
label: "操作",
width: t.actionsColumnWidth
}, {
default: N((F) => [
F.row ? (q(), ne("div", $o, [
i.$slots.actions ? te(i.$slots, "actions", {
key: 0,
row: F.row
}, void 0, !0) : (q(), ne(Ie, { key: 1 }, [
te(i.$slots, "action-before-edit", {
row: F.row
}, void 0, !0),
R(F.row, "view", a.showViewButton) ? (q(), V(A, {
key: 0,
size: "small",
type: "success",
link: "",
onClick: (Y) => _("view", F.row)
}, {
default: N(() => [...v[11] || (v[11] = [
ye("查看 ", -1)
])]),
_: 1
}, 8, ["onClick"])) : G("", !0),
R(F.row, "edit", a.showEditButton) ? (q(), V(A, {
key: 1,
size: "small",
type: "primary",
link: "",
onClick: (Y) => _("edit", F.row)
}, {
default: N(() => [...v[12] || (v[12] = [
ye("编辑 ", -1)
])]),
_: 1
}, 8, ["onClick"])) : G("", !0),
R(F.row, "delete", a.showDeleteButton) ? (q(), V(B, {
key: 2,
title: "确定要删除这条数据吗?",
onConfirm: (Y) => x([F.row.id]),
"confirm-button-text": "确定",
"cancel-button-text": "取消",
width: "200"
}, {
reference: N(() => [
ae(A, {
size: "small",
type: "danger",
link: ""
}, {
default: N(() => [...v[13] || (v[13] = [
ye("删除", -1)
])]),
_: 1
})
]),
_: 1
}, 8, ["onConfirm"])) : G("", !0),
te(i.$slots, "action-after-delete", {
row: F.row
}, void 0, !0)
], 64))
])) : G("", !0)
]),
_: 3
}, 8, ["width"])) : G("", !0)
]),
_: 3
}, 16, ["data", "element-loading-text", "element-loading-background"])), [
[me, f.value]
])
]),
a.showPagination && h.value > 0 ? (q(), ne("div", Io, [
ae(se, {
"current-page": d.pageNum,
"onUpdate:currentPage": v[1] || (v[1] = (F) => d.pageNum = F),
"page-size": d.pageSize,
"onUpdate:pageSize": v[2] || (v[2] = (F) => d.pageSize = F),
"page-sizes": a.pageSizes,
layout: a.paginationLayout,
total: h.value,
background: a.paginationBackground,
small: a.paginationSmall,
"hide-on-single-page": a.paginationHideOnSinglePage,
onSizeChange: k,
onCurrentChange: C
}, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "background", "small", "hide-on-single-page"])
])) : G("", !0),
a.dialogFullscreen ? (q(), V(ce, {
key: 3,
modelValue: c.visible,
"onUpdate:modelValue": v[7] || (v[7] = (F) => c.visible = F),
fullscreen: !0,
width: a.dialogWidth,
"destroy-on-close": !0,
modal: !a.dialogFullscreen,
"custom-class": D.value,
"show-close": !1,
style: { display: "flex", "flex-direction": "column", "max-height": "100vh" }
}, {
header: N(() => [
fe("div", Mo, [
ae(A, {
type: "info",
text: "",
onClick: v[5] || (v[5] = (F) => c.visible = !1),
style: { "margin-right": "12px" }
}, {
default: N(() => [
ae(ve, { size: "20" }, {
default: N(() => [
ae(Cn(In))
]),
_: 1
})
]),
_: 1
}),
fe("span", Uo, Me(e.value), 1)
])
]),
footer: N(() => [
te(i.$slots, "dialog-footer", {
dialog: c,
submit: E,
cancel: () => c.visible = !1
}, () => [
fe("div", Lo, [
ae(A, {
color: "#336FFF",
plain: "",
onClick: v[6] || (v[6] = (F) => c.visible = !1)
}, {
default: N(() => [...v[16] || (v[16] = [
ye("取消", -1)
])]),
_: 1
}),
c.mode !== "view" ? (q(), V(A, {
key: 0,
color: "#336FFF",
onClick: E,
loading: c.submitting
}, {
default: N(() => [...v[17] || (v[17] = [
ye(" 确定 ", -1)
])]),
_: 1
}, 8, ["loading"])) : G("", !0)
])
], !0)
]),
default: N(() => [
fe("div", Vo, [
i.$slots["dialog-form"] ? te(i.$slots, "dialog-form", {
key: 0,
formData: c.data,
mode: c.mode,
formRef: (F) => {
c.formRef = F;
}
}, void 0, !0) : c.loading ? G("", !0) : (q(), ne("div", Wo, [
ae(ft, {
ref: (F) => {
c.formRef = F;
},
"model-value": c.data,
"form-config": o.value,
rules: a.dialogFormRules,
"label-width": a.dialogFormLabelWidth,
disabled: c.mode === "view"
}, null, 8, ["model-value", "form-config", "rules", "label-width", "disabled"])
]))
])
]),
_: 3
}, 8, ["modelValue", "width", "modal", "custom-class"])) : (q(), V(ce, {
key: 2,
modelValue: c.visible,
"onUpdate:modelValue": v[4] || (v[4] = (F) => c.visible = F),
title: e.value,
width: a.dialogWidth,
"destroy-on-close": !0,
"custom-class": D.value,
style: { display: "flex", "flex-direction": "column", "max-height": "80vh" }
}, {
footer: N(() => [
te(i.$slots, "dialog-footer", {
dialog: c,
submit: E,
cancel: () => c.visible = !1
}, () => [
fe("div", No, [
ae(A, {
color: "#336FFF",
onClick: v[3] || (v[3] = (F) => c.visible = !1)
}, {
default: N(() => [...v[14] || (v[14] = [
ye("取消", -1)
])]),
_: 1
}),
ae(A, {
color: "#336FFF",
onClick: E,
loading: c.submitting
}, {
default: N(() => [...v[15] || (v[15] = [
ye(" 确定 ", -1)
])]),
_: 1
}, 8, ["loading"])
])
], !0)
]),
default: N(() => [
fe("div", ko, [
i.$slots["dialog-form"] ? te(i.$slots, "dialog-form", {
key: 0,
formData: c.data,
mode: c.mode,
formRef: (F) => {
c.formRef = F;
}
}, void 0, !0) : c.loading ? (q(), V(he, {
key: 1,
rows: 5,
animated: ""
})) : c.loading ? G("", !0) : (q(), ne("div", To, [
ae(ft, {
ref: (F) => {
c.formRef = F;
},
"model-value": c.data,
"form-config": o.value,
rules: a.dialogFormRules,
"label-width": a.dialogFormLabelWidth,
disabled: c.mode === "view"
}, null, 8, ["model-value", "form-config", "rules", "label-width", "disabled"])
]))
])
]),
_: 3
}, 8, ["modelValue", "title", "width", "custom-class"]))
], 2);
};
}
}), Qo = /* @__PURE__ */ yn(zo, [["__scopeId", "data-v-7671be98"]]);
export {
Qo as CrudTable
};