morghulis 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/morghulis.es.js +2393 -229
- package/dist/morghulis.es.js.map +1 -1
- package/dist/morghulis.umd.js +10 -1
- package/dist/morghulis.umd.js.map +1 -1
- package/package.json +3 -1
- package/types/index.d.ts +9 -0
package/dist/morghulis.es.js
CHANGED
@@ -1,149 +1,179 @@
|
|
1
|
-
import
|
2
|
-
import { default as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import "
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
error: (e, u) => p.confirm(e, u, { type: "error" })
|
1
|
+
import an, { ElMessage as qe, ElMessageBox as _e } from "element-plus";
|
2
|
+
import { default as kl } from "element-plus";
|
3
|
+
import Lt from "axios";
|
4
|
+
import Pt from "nprogress";
|
5
|
+
import et from "js-cookie";
|
6
|
+
import xe from "lodash";
|
7
|
+
import { nanoid as Nn } from "nanoid";
|
8
|
+
import { reactive as rn, ref as G, watch as pt, defineComponent as ae, mergeDefaults as sn, useSlots as un, computed as Y, resolveComponent as M, resolveDirective as xt, openBlock as P, createBlock as q, mergeProps as kt, unref as O, withKeys as Rn, createSlots as Vn, withCtx as k, createElementVNode as pe, renderSlot as J, createVNode as $, createTextVNode as me, toDisplayString as we, createElementBlock as ce, Fragment as Oe, createCommentVNode as se, withDirectives as Mt, renderList as rt, resolveDynamicComponent as cn, withModifiers as it, readonly as $n, getCurrentScope as Yn, onScopeDispose as Ln, getCurrentInstance as Hn, onMounted as dn, nextTick as Un, onUnmounted as Xn } from "vue";
|
9
|
+
import { library as jn } from "@fortawesome/fontawesome-svg-core";
|
10
|
+
import { fas as Wn } from "@fortawesome/free-solid-svg-icons";
|
11
|
+
import { FontAwesomeIcon as zn } from "@fortawesome/vue-fontawesome";
|
12
|
+
const Ye = {
|
13
|
+
info: (t) => qe({ message: t, type: "info", grouping: !0 }),
|
14
|
+
success: (t) => qe({ message: t, type: "success", grouping: !0 }),
|
15
|
+
warning: (t) => qe({ message: t, type: "warning", grouping: !0 }),
|
16
|
+
error: (t) => qe({ message: t, type: "error", grouping: !0 })
|
17
|
+
}, Bl = {
|
18
|
+
info: (t, e) => _e.alert(t, e, { type: "info" }),
|
19
|
+
success: (t, e) => _e.alert(t, e, { type: "success" }),
|
20
|
+
warning: (t, e) => _e.alert(t, e, { type: "warning" }),
|
21
|
+
error: (t, e) => _e.alert(t, e, { type: "error" })
|
22
|
+
}, Il = {
|
23
|
+
info: (t, e) => _e.confirm(t, e, { type: "info" }),
|
24
|
+
success: (t, e) => _e.confirm(t, e, { type: "success" }),
|
25
|
+
warning: (t, e) => _e.confirm(t, e, { type: "warning" }),
|
26
|
+
error: (t, e) => _e.confirm(t, e, { type: "error" })
|
28
27
|
};
|
29
|
-
function
|
30
|
-
function
|
31
|
-
const
|
32
|
-
return
|
33
|
-
}
|
34
|
-
function
|
35
|
-
const
|
36
|
-
if (
|
37
|
-
o(
|
38
|
-
else if (
|
39
|
-
|
28
|
+
function Gn() {
|
29
|
+
function t(l) {
|
30
|
+
const a = vt(l), r = bt(a), i = l.substring(l.indexOf(".") + 1);
|
31
|
+
return a === l ? r : xe.get(r, i);
|
32
|
+
}
|
33
|
+
function e(l, a) {
|
34
|
+
const r = vt(l);
|
35
|
+
if (a == null)
|
36
|
+
o(r);
|
37
|
+
else if (r === l)
|
38
|
+
et.set(r, JSON.stringify(a));
|
40
39
|
else {
|
41
|
-
const
|
42
|
-
|
40
|
+
const i = bt(r) || {}, s = xe.set(i, l, a);
|
41
|
+
et.set(r, JSON.stringify(s));
|
43
42
|
}
|
44
43
|
}
|
45
|
-
function
|
46
|
-
return
|
44
|
+
function n(l, a) {
|
45
|
+
return t(l) == null && e(l, a), t(l);
|
47
46
|
}
|
48
|
-
function o(
|
49
|
-
const
|
50
|
-
if (
|
51
|
-
|
47
|
+
function o(l) {
|
48
|
+
const a = vt(l);
|
49
|
+
if (a === l)
|
50
|
+
et.remove(a);
|
52
51
|
else {
|
53
|
-
const
|
54
|
-
|
52
|
+
const r = bt(a), i = l.substring(l.indexOf(".") + 1);
|
53
|
+
xe.unset(r, i), e(a, r);
|
55
54
|
}
|
56
55
|
}
|
57
|
-
return { get:
|
56
|
+
return { get: t, set: e, remove: o, load: n };
|
58
57
|
}
|
59
|
-
function
|
60
|
-
let
|
61
|
-
return o === -1 ?
|
58
|
+
function vt(t) {
|
59
|
+
let n = t.split(".")[0], o = n.indexOf("[");
|
60
|
+
return o === -1 ? n : n.substring(0, o);
|
62
61
|
}
|
63
|
-
function
|
64
|
-
const
|
65
|
-
if (
|
62
|
+
function bt(t) {
|
63
|
+
const e = et.get(t);
|
64
|
+
if (e == null)
|
66
65
|
return null;
|
67
66
|
try {
|
68
|
-
return JSON.parse(
|
67
|
+
return JSON.parse(e);
|
69
68
|
} catch {
|
70
|
-
return
|
69
|
+
return e;
|
71
70
|
}
|
72
71
|
}
|
73
|
-
const
|
72
|
+
const De = {
|
74
73
|
CLIENT: "client",
|
75
74
|
USER: "uid",
|
76
75
|
AUTH: "auth"
|
77
|
-
}, { load:
|
78
|
-
function
|
79
|
-
let
|
80
|
-
|
81
|
-
const
|
82
|
-
return { $client:
|
83
|
-
|
84
|
-
}), logout: () => new Promise((
|
85
|
-
|
86
|
-
}), bearer: () =>
|
87
|
-
}
|
88
|
-
const { check:
|
89
|
-
function
|
90
|
-
function
|
91
|
-
const
|
92
|
-
return
|
93
|
-
}
|
94
|
-
function o() {
|
95
|
-
|
96
|
-
|
97
|
-
}
|
98
|
-
function
|
99
|
-
|
100
|
-
}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
76
|
+
}, { load: qn, get: Kn, remove: Qn, set: Jn } = Gn();
|
77
|
+
function fn() {
|
78
|
+
let t = Nn().replace(/-/g, "_");
|
79
|
+
t = qn(De.CLIENT, t);
|
80
|
+
const e = () => Kn(De.USER);
|
81
|
+
return { $client: t, user: e, check: (r) => e() === r, login: (r) => new Promise((i) => {
|
82
|
+
Jn(De.USER, r), i(r);
|
83
|
+
}), logout: () => new Promise((r) => {
|
84
|
+
Qn(De.USER), r(!0);
|
85
|
+
}), bearer: () => e() ? "Bearer 123" : null };
|
86
|
+
}
|
87
|
+
const { check: Zn, logout: pn, $client: eo, user: to, bearer: no } = fn();
|
88
|
+
function mn(t = "/api/", e) {
|
89
|
+
function n(a) {
|
90
|
+
const r = Lt.create({ baseURL: t, responseType: e });
|
91
|
+
return Ht(r);
|
92
|
+
}
|
93
|
+
function o(a = "/dfs/") {
|
94
|
+
const r = Lt.create({ baseURL: a, responseType: "arraybuffer" });
|
95
|
+
return Ht(r);
|
96
|
+
}
|
97
|
+
function l() {
|
98
|
+
}
|
99
|
+
return { getRequest: n, getMinioRequest: o, all: l };
|
100
|
+
}
|
101
|
+
function Ht(t, e) {
|
102
|
+
const { request: n, response: o } = t.interceptors;
|
103
|
+
return n.use((l) => oo(l), Ut), o.use(lo, Ut), t;
|
104
|
+
}
|
105
|
+
function oo(t, e) {
|
106
|
+
return Pt.start(), t.headers[De.CLIENT] = eo, t.headers[De.USER] = to(), t.headers[De.AUTH] = no(), t;
|
107
|
+
}
|
108
|
+
function lo(t) {
|
109
|
+
Pt.done();
|
110
|
+
let { headers: e, data: n } = t;
|
111
|
+
const o = e[De.USER];
|
112
|
+
if (o && !Zn(o))
|
113
|
+
return pn(), Promise.reject("登录已过期");
|
114
|
+
if (n && n.code !== void 0) {
|
115
|
+
const { code: l, message: a, result: r } = n;
|
116
|
+
if (l === 200)
|
117
|
+
return r;
|
118
|
+
const i = ao(l);
|
119
|
+
return Ye[i](a), Promise.reject(a);
|
120
|
+
}
|
121
|
+
return n;
|
122
|
+
}
|
123
|
+
function Ut(t) {
|
124
|
+
if (Pt.done(), t.response) {
|
125
|
+
const { status: e } = t.response;
|
126
|
+
e === 401 ? (pn(), Ye.error("登录已过期")) : Ye.error(`请求错误: ${e}`);
|
120
127
|
} else
|
121
|
-
|
122
|
-
return Promise.reject(
|
128
|
+
Ye.error(`网络错误: ${t.message}`);
|
129
|
+
return Promise.reject(t);
|
130
|
+
}
|
131
|
+
function ao(t) {
|
132
|
+
return t >= 200 && t < 300 ? "success" : t >= 300 && t < 400 ? "info" : t >= 400 && t < 500 ? "warning" : "error";
|
123
133
|
}
|
124
|
-
function
|
125
|
-
|
134
|
+
function ro(t) {
|
135
|
+
fn();
|
136
|
+
const e = rn({});
|
137
|
+
let n = G("DISCONNECTED");
|
138
|
+
const o = G(""), l = () => {
|
139
|
+
n.value = "CONNECTED", console.log("WebSocket连接已打开");
|
140
|
+
};
|
141
|
+
return pt(o, () => {
|
142
|
+
if (o.value)
|
143
|
+
try {
|
144
|
+
let { payload: a, handler: r, status: i } = JSON.parse(o.value);
|
145
|
+
const u = e[r][i];
|
146
|
+
u && u(a);
|
147
|
+
} catch (a) {
|
148
|
+
console.error("处理WebSocket数据时出错:", a);
|
149
|
+
}
|
150
|
+
}, { deep: !0 }), {
|
151
|
+
open: l,
|
152
|
+
status: n,
|
153
|
+
channels: e
|
154
|
+
};
|
126
155
|
}
|
127
|
-
const
|
128
|
-
const
|
129
|
-
|
130
|
-
const { getRequest:
|
156
|
+
const hn = (t = {}) => {
|
157
|
+
const e = t.baseURL || "/api/";
|
158
|
+
t.timeout, t.headers;
|
159
|
+
const { getRequest: n } = mn(e), o = n(), l = ro();
|
131
160
|
return {
|
132
161
|
// 发送消息
|
133
|
-
send: (
|
162
|
+
send: (a, r) => (console.log(`发送消息: ${a}`, r), o.post(a, r)),
|
134
163
|
// 接收消息
|
135
|
-
on: (
|
136
|
-
console.log(`取消监听: ${
|
164
|
+
on: (a, r) => (console.log(`监听事件: ${a}`), () => {
|
165
|
+
console.log(`取消监听: ${a}`);
|
137
166
|
}),
|
138
167
|
// 关闭通道
|
139
168
|
close: () => {
|
140
169
|
console.log("关闭通道");
|
141
170
|
},
|
142
|
-
// 暴露http
|
143
|
-
http: o
|
171
|
+
// 暴露http实例和WebSocket
|
172
|
+
http: o,
|
173
|
+
sockets: l
|
144
174
|
};
|
145
175
|
};
|
146
|
-
var
|
176
|
+
var gn = {
|
147
177
|
name: "zh-cn",
|
148
178
|
el: {
|
149
179
|
breadcrumb: {
|
@@ -321,7 +351,7 @@ var X = {
|
|
321
351
|
}
|
322
352
|
}
|
323
353
|
};
|
324
|
-
const
|
354
|
+
const io = {
|
325
355
|
title: "对话框",
|
326
356
|
width: 600,
|
327
357
|
fullscreen: !1,
|
@@ -339,7 +369,7 @@ const Me = {
|
|
339
369
|
closeOnClickModal: !1,
|
340
370
|
closeOnPressEscape: !1,
|
341
371
|
showClose: !1,
|
342
|
-
beforeClose: (
|
372
|
+
beforeClose: (t) => t(),
|
343
373
|
draggable: !0,
|
344
374
|
overFlow: !1,
|
345
375
|
center: !1,
|
@@ -348,13 +378,13 @@ const Me = {
|
|
348
378
|
closeIcon: "close",
|
349
379
|
confirmButtonText: "确认",
|
350
380
|
cancelButtonText: "取消"
|
351
|
-
},
|
381
|
+
}, so = {
|
352
382
|
class: "mor-dialog-body",
|
353
383
|
"element-loading-background": "rgba(0,0,0,0.1)",
|
354
384
|
"element-loading-text": "加载中..."
|
355
|
-
},
|
385
|
+
}, uo = /* @__PURE__ */ ae({
|
356
386
|
__name: "MDialog",
|
357
|
-
props: /* @__PURE__ */
|
387
|
+
props: /* @__PURE__ */ sn({
|
358
388
|
modelValue: { type: Boolean },
|
359
389
|
title: {},
|
360
390
|
subTitle: {},
|
@@ -387,146 +417,146 @@ const Me = {
|
|
387
417
|
cancel: { type: Function },
|
388
418
|
confirmButtonText: {},
|
389
419
|
cancelButtonText: {}
|
390
|
-
},
|
420
|
+
}, io),
|
391
421
|
emits: ["close", "update:title", "update:subTitle", "update:modelValue"],
|
392
|
-
setup(
|
393
|
-
let o =
|
394
|
-
const
|
395
|
-
get: () =>
|
396
|
-
set: (
|
397
|
-
o("update:title",
|
422
|
+
setup(t, { expose: e, emit: n }) {
|
423
|
+
let o = n, l = t;
|
424
|
+
const a = un(), r = Y(() => !!a.header), i = Y(() => !!a.footer), s = i.value || !!l.confirm, u = G(!1), c = G({}), d = G(""), p = G(""), h = Y({
|
425
|
+
get: () => l.title,
|
426
|
+
set: (m) => {
|
427
|
+
o("update:title", m), d.value = m || "对话框";
|
398
428
|
}
|
399
|
-
}),
|
400
|
-
get: () =>
|
401
|
-
set: (
|
402
|
-
o("update:subTitle",
|
429
|
+
}), b = Y({
|
430
|
+
get: () => l.subTitle,
|
431
|
+
set: (m) => {
|
432
|
+
o("update:subTitle", m), p.value = m || "";
|
403
433
|
}
|
404
|
-
}),
|
405
|
-
get: () =>
|
406
|
-
set: (
|
407
|
-
o("update:modelValue",
|
434
|
+
}), _ = G({}), C = Y({
|
435
|
+
get: () => l.modelValue,
|
436
|
+
set: (m) => {
|
437
|
+
o("update:modelValue", m);
|
408
438
|
}
|
409
439
|
});
|
410
|
-
function
|
411
|
-
if (
|
412
|
-
const { title:
|
413
|
-
|
440
|
+
function F(m = {}, D) {
|
441
|
+
if (D) {
|
442
|
+
const { title: I, subTitle: R } = D;
|
443
|
+
h.value = I, b.value = R;
|
414
444
|
}
|
415
|
-
|
445
|
+
_.value = m, c.value = xe.cloneDeep(m), o("update:modelValue", !0);
|
416
446
|
}
|
417
|
-
function
|
418
|
-
|
447
|
+
function B() {
|
448
|
+
u.value = !1, o("update:modelValue", !1);
|
419
449
|
}
|
420
|
-
function
|
421
|
-
|
450
|
+
function w() {
|
451
|
+
u.value = !0, l.confirm && l.confirm(c.value, B);
|
422
452
|
}
|
423
|
-
function
|
424
|
-
|
453
|
+
function y() {
|
454
|
+
u.value = !0, l.cancel ? l.cancel(c.value, B) : B();
|
425
455
|
}
|
426
|
-
return
|
427
|
-
const
|
428
|
-
return
|
456
|
+
return e({ open: F, close: B }), (m, D) => {
|
457
|
+
const I = M("el-text"), R = M("el-divider"), A = M("fa"), W = M("el-button"), U = M("el-space"), re = M("el-dialog"), x = xt("loading");
|
458
|
+
return P(), q(re, kt({
|
429
459
|
class: "mor-dialog",
|
430
|
-
modelValue:
|
431
|
-
"onUpdate:modelValue":
|
432
|
-
}, { ...
|
433
|
-
onClose:
|
434
|
-
onKeydown:
|
435
|
-
}),
|
436
|
-
header:
|
437
|
-
|
438
|
-
|
439
|
-
|
460
|
+
modelValue: C.value,
|
461
|
+
"onUpdate:modelValue": D[0] || (D[0] = (H) => C.value = H)
|
462
|
+
}, { ...m.$props, ...m.$attrs }, {
|
463
|
+
onClose: D[1] || (D[1] = (H) => O(o)("close")),
|
464
|
+
onKeydown: D[2] || (D[2] = Rn((H) => y(), ["esc"]))
|
465
|
+
}), Vn({
|
466
|
+
header: k(() => [
|
467
|
+
pe("div", null, [
|
468
|
+
J(m.$slots, "title", { data: c.value }, () => [
|
469
|
+
$(I, {
|
440
470
|
size: "large",
|
441
471
|
tag: "b"
|
442
472
|
}, {
|
443
|
-
default:
|
444
|
-
|
473
|
+
default: k(() => [
|
474
|
+
me(we(d.value), 1)
|
445
475
|
]),
|
446
476
|
_: 1
|
447
477
|
})
|
448
478
|
]),
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
479
|
+
J(m.$slots, "sub-title", { data: c.value }, () => [
|
480
|
+
b.value ? (P(), ce(Oe, { key: 0 }, [
|
481
|
+
$(R, { direction: "vertical" }),
|
482
|
+
$(I, {
|
453
483
|
tag: "b",
|
454
484
|
type: "info"
|
455
485
|
}, {
|
456
|
-
default:
|
457
|
-
|
486
|
+
default: k(() => [
|
487
|
+
me(we(p.value), 1)
|
458
488
|
]),
|
459
489
|
_: 1
|
460
490
|
})
|
461
|
-
], 64)) :
|
491
|
+
], 64)) : se("", !0)
|
462
492
|
])
|
463
493
|
]),
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
], 64)) :
|
469
|
-
|
494
|
+
pe("div", null, [
|
495
|
+
r.value ? (P(), ce(Oe, { key: 0 }, [
|
496
|
+
J(m.$slots, "header", { data: c.value }),
|
497
|
+
$(R, { direction: "vertical" })
|
498
|
+
], 64)) : se("", !0),
|
499
|
+
$(W, {
|
470
500
|
size: "small",
|
471
501
|
style: { padding: "3px 6px" },
|
472
502
|
type: "danger",
|
473
|
-
disabled:
|
474
|
-
onClick:
|
503
|
+
disabled: u.value,
|
504
|
+
onClick: y
|
475
505
|
}, {
|
476
|
-
default:
|
477
|
-
|
506
|
+
default: k(() => [
|
507
|
+
$(A, { icon: "close" })
|
478
508
|
]),
|
479
509
|
_: 1
|
480
510
|
}, 8, ["disabled"])
|
481
511
|
])
|
482
512
|
]),
|
483
|
-
default:
|
484
|
-
|
485
|
-
|
513
|
+
default: k(() => [
|
514
|
+
Mt((P(), ce("div", so, [
|
515
|
+
J(m.$slots, "default", { data: c.value })
|
486
516
|
])), [
|
487
|
-
[
|
517
|
+
[x, u.value]
|
488
518
|
])
|
489
519
|
]),
|
490
520
|
_: 2
|
491
521
|
}, [
|
492
|
-
|
522
|
+
O(s) ? {
|
493
523
|
name: "footer",
|
494
|
-
fn:
|
495
|
-
|
496
|
-
default:
|
497
|
-
|
524
|
+
fn: k(() => [
|
525
|
+
$(U, null, {
|
526
|
+
default: k(() => [
|
527
|
+
i.value ? J(m.$slots, "footer", {
|
498
528
|
key: 0,
|
499
|
-
data:
|
500
|
-
}) :
|
501
|
-
|
529
|
+
data: c.value
|
530
|
+
}) : se("", !0),
|
531
|
+
D[3] || (D[3] = me(" "))
|
502
532
|
]),
|
503
533
|
_: 3
|
504
534
|
}),
|
505
|
-
|
506
|
-
default:
|
507
|
-
|
535
|
+
m.confirm ? (P(), q(U, { key: 0 }, {
|
536
|
+
default: k(() => [
|
537
|
+
$(W, {
|
508
538
|
type: "success",
|
509
|
-
disabled:
|
510
|
-
onClick:
|
539
|
+
disabled: u.value,
|
540
|
+
onClick: w
|
511
541
|
}, {
|
512
|
-
default:
|
513
|
-
|
542
|
+
default: k(() => [
|
543
|
+
me(we(m.confirmButtonText), 1)
|
514
544
|
]),
|
515
545
|
_: 1
|
516
546
|
}, 8, ["disabled"]),
|
517
|
-
|
547
|
+
$(W, {
|
518
548
|
type: "info",
|
519
|
-
onClick:
|
520
|
-
disabled:
|
549
|
+
onClick: y,
|
550
|
+
disabled: u.value
|
521
551
|
}, {
|
522
|
-
default:
|
523
|
-
|
552
|
+
default: k(() => [
|
553
|
+
me(we(m.cancelButtonText), 1)
|
524
554
|
]),
|
525
555
|
_: 1
|
526
556
|
}, 8, ["disabled"])
|
527
557
|
]),
|
528
558
|
_: 1
|
529
|
-
})) :
|
559
|
+
})) : se("", !0)
|
530
560
|
]),
|
531
561
|
key: "0"
|
532
562
|
} : void 0
|
@@ -534,40 +564,2174 @@ const Me = {
|
|
534
564
|
};
|
535
565
|
}
|
536
566
|
});
|
537
|
-
|
538
|
-
|
567
|
+
const co = /* @__PURE__ */ ae({
|
568
|
+
__name: "BooleanCell",
|
569
|
+
props: {
|
570
|
+
modelValue: {},
|
571
|
+
disabled: { type: Boolean },
|
572
|
+
field: {}
|
573
|
+
},
|
574
|
+
emits: ["update:modelValue"],
|
575
|
+
setup(t, { emit: e }) {
|
576
|
+
const n = t, o = e, l = Y({
|
577
|
+
get: () => n.modelValue,
|
578
|
+
set: (a) => o("update:modelValue", a)
|
579
|
+
});
|
580
|
+
return (a, r) => {
|
581
|
+
const i = M("el-checkbox"), s = M("el-option"), u = M("el-select");
|
582
|
+
return a.field.not_null ? (P(), q(i, {
|
583
|
+
key: 0,
|
584
|
+
border: "",
|
585
|
+
modelValue: l.value,
|
586
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => l.value = c),
|
587
|
+
disabled: a.disabled,
|
588
|
+
style: { width: "100%" }
|
589
|
+
}, {
|
590
|
+
default: k(() => [
|
591
|
+
me(we(l.value ? "是" : "否"), 1)
|
592
|
+
]),
|
593
|
+
_: 1
|
594
|
+
}, 8, ["modelValue", "disabled"])) : (P(), q(u, {
|
595
|
+
key: 1,
|
596
|
+
modelValue: l.value,
|
597
|
+
"onUpdate:modelValue": r[1] || (r[1] = (c) => l.value = c),
|
598
|
+
disabled: a.disabled,
|
599
|
+
clearable: "",
|
600
|
+
teleported: !1,
|
601
|
+
style: { width: "100%" },
|
602
|
+
"value-on-clear": null
|
603
|
+
}, {
|
604
|
+
default: k(() => [
|
605
|
+
$(s, {
|
606
|
+
value: !0,
|
607
|
+
label: "是"
|
608
|
+
}),
|
609
|
+
$(s, {
|
610
|
+
value: !1,
|
611
|
+
label: "否"
|
612
|
+
})
|
613
|
+
]),
|
614
|
+
_: 1
|
615
|
+
}, 8, ["modelValue", "disabled"]));
|
616
|
+
};
|
617
|
+
}
|
618
|
+
}), fo = /* @__PURE__ */ ae({
|
619
|
+
__name: "NumberCell",
|
620
|
+
props: {
|
621
|
+
modelValue: {},
|
622
|
+
disabled: { type: Boolean },
|
623
|
+
field: {}
|
624
|
+
},
|
625
|
+
emits: ["update:modelValue"],
|
626
|
+
setup(t, { emit: e }) {
|
627
|
+
const n = t, o = e, l = Y({
|
628
|
+
get: () => n.modelValue,
|
629
|
+
set: (r) => o("update:modelValue", r)
|
630
|
+
}), a = Y(() => ({
|
631
|
+
min: n.field.min || -1 / 0,
|
632
|
+
max: n.field.max || 1 / 0,
|
633
|
+
step: n.field.step || 1,
|
634
|
+
precision: n.field.precision || 0,
|
635
|
+
tep_strictly: n.field.tep_strictly || !1
|
636
|
+
}));
|
637
|
+
return (r, i) => {
|
638
|
+
const s = M("el-input-number");
|
639
|
+
return P(), q(s, {
|
640
|
+
modelValue: l.value,
|
641
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => l.value = u),
|
642
|
+
disabled: r.disabled,
|
643
|
+
clearable: !r.field.not_null,
|
644
|
+
"controls-position": "right",
|
645
|
+
style: { width: "100%" },
|
646
|
+
min: a.value.min,
|
647
|
+
max: a.value.max,
|
648
|
+
step: a.value.step,
|
649
|
+
precision: a.value.precision,
|
650
|
+
"step-strictly": a.value.tep_strictly,
|
651
|
+
"value-on-clear": r.field.not_null ? 0 : null
|
652
|
+
}, null, 8, ["modelValue", "disabled", "clearable", "min", "max", "step", "precision", "step-strictly", "value-on-clear"]);
|
653
|
+
};
|
654
|
+
}
|
655
|
+
}), po = /* @__PURE__ */ ae({
|
656
|
+
__name: "CharCell",
|
657
|
+
props: {
|
658
|
+
modelValue: {},
|
659
|
+
disabled: { type: Boolean },
|
660
|
+
field: {}
|
661
|
+
},
|
662
|
+
emits: ["update:modelValue"],
|
663
|
+
setup(t, { emit: e }) {
|
664
|
+
const n = t, o = e, l = Y({
|
665
|
+
get: () => n.modelValue,
|
666
|
+
set: (a) => o("update:modelValue", a || null)
|
667
|
+
});
|
668
|
+
return (a, r) => {
|
669
|
+
var s, u;
|
670
|
+
const i = M("el-input");
|
671
|
+
return P(), q(i, {
|
672
|
+
modelValue: l.value,
|
673
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => l.value = c),
|
674
|
+
disabled: a.disabled,
|
675
|
+
type: (s = a.field.format) == null ? void 0 : s.type,
|
676
|
+
maxlength: (u = a.field.format) == null ? void 0 : u.maxlength,
|
677
|
+
clearable: !a.field.not_null,
|
678
|
+
"show-word-limit": "",
|
679
|
+
rows: 1
|
680
|
+
}, null, 8, ["modelValue", "disabled", "type", "maxlength", "clearable"]);
|
681
|
+
};
|
682
|
+
}
|
683
|
+
}), mo = /* @__PURE__ */ ae({
|
684
|
+
__name: "DefaultCell",
|
685
|
+
props: {
|
686
|
+
modelValue: {},
|
687
|
+
field: {},
|
688
|
+
disabled: { type: Boolean }
|
689
|
+
},
|
690
|
+
emits: ["update:modelValue"],
|
691
|
+
setup(t, { emit: e }) {
|
692
|
+
const n = t, o = e, l = Y({
|
693
|
+
get: () => n.modelValue,
|
694
|
+
set: (a) => o("update:modelValue", a)
|
695
|
+
});
|
696
|
+
return (a, r) => {
|
697
|
+
const i = M("el-input");
|
698
|
+
return P(), q(i, {
|
699
|
+
modelValue: l.value,
|
700
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
|
701
|
+
disabled: a.disabled,
|
702
|
+
placeholder: a.field.placeholder || "请输入"
|
703
|
+
}, null, 8, ["modelValue", "disabled", "placeholder"]);
|
704
|
+
};
|
705
|
+
}
|
706
|
+
}), ho = /* @__PURE__ */ ae({
|
707
|
+
__name: "SelectCell",
|
708
|
+
props: {
|
709
|
+
modelValue: {},
|
710
|
+
disabled: { type: Boolean },
|
711
|
+
field: {}
|
712
|
+
},
|
713
|
+
emits: ["update:modelValue"],
|
714
|
+
setup(t, { emit: e }) {
|
715
|
+
const n = t, o = e, l = Y({
|
716
|
+
get: () => n.modelValue,
|
717
|
+
set: (i) => o("update:modelValue", i)
|
718
|
+
}), a = G(!1), r = G([]);
|
719
|
+
return pt(() => n.field, () => {
|
720
|
+
var i;
|
721
|
+
(i = n.field.refer) != null && i.options && (r.value = n.field.refer.options);
|
722
|
+
}, { immediate: !0 }), (i, s) => {
|
723
|
+
var p, h, b, _, C;
|
724
|
+
const u = M("el-option"), c = M("el-select"), d = xt("loading");
|
725
|
+
return Mt((P(), q(c, {
|
726
|
+
modelValue: l.value,
|
727
|
+
"onUpdate:modelValue": s[0] || (s[0] = (F) => l.value = F),
|
728
|
+
disabled: i.disabled,
|
729
|
+
clearable: !i.field.not_null,
|
730
|
+
teleported: !1,
|
731
|
+
filterable: "",
|
732
|
+
"value-on-clear": null,
|
733
|
+
multiple: (p = i.field.refer) == null ? void 0 : p.multiple,
|
734
|
+
"collapse-tags": (h = i.field.refer) == null ? void 0 : h.multiple,
|
735
|
+
"collapse-tags-tooltip": (b = i.field.refer) == null ? void 0 : b.multiple,
|
736
|
+
"show-checkbox": (_ = i.field.refer) == null ? void 0 : _.multiple,
|
737
|
+
"check-strictly": (C = i.field.refer) == null ? void 0 : C.strict
|
738
|
+
}, {
|
739
|
+
default: k(() => [
|
740
|
+
(P(!0), ce(Oe, null, rt(r.value, (F) => (P(), q(u, {
|
741
|
+
key: F.value,
|
742
|
+
label: F.label,
|
743
|
+
value: F.value
|
744
|
+
}, null, 8, ["label", "value"]))), 128))
|
745
|
+
]),
|
746
|
+
_: 1
|
747
|
+
}, 8, ["modelValue", "disabled", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "show-checkbox", "check-strictly"])), [
|
748
|
+
[d, a.value]
|
749
|
+
]);
|
750
|
+
};
|
751
|
+
}
|
752
|
+
}), go = /* @__PURE__ */ ae({
|
753
|
+
__name: "DateCell",
|
754
|
+
props: {
|
755
|
+
modelValue: {},
|
756
|
+
disabled: { type: Boolean },
|
757
|
+
field: {}
|
758
|
+
},
|
759
|
+
emits: ["update:modelValue"],
|
760
|
+
setup(t, { emit: e }) {
|
761
|
+
const n = t, o = e, l = Y({
|
762
|
+
get: () => n.modelValue,
|
763
|
+
set: (r) => o("update:modelValue", r)
|
764
|
+
}), a = Y(() => {
|
765
|
+
const r = n.field.domain;
|
766
|
+
return { type: r === "DateTimeField" ? "datetime" : "date", format: r === "DateTimeField" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD" };
|
767
|
+
});
|
768
|
+
return (r, i) => {
|
769
|
+
const s = M("el-date-picker");
|
770
|
+
return P(), q(s, {
|
771
|
+
modelValue: l.value,
|
772
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => l.value = u),
|
773
|
+
style: { width: "100%" },
|
774
|
+
disabled: r.disabled,
|
775
|
+
teleported: !1,
|
776
|
+
clearable: !r.field.not_null,
|
777
|
+
type: a.value.type,
|
778
|
+
"value-format": a.value.format
|
779
|
+
}, null, 8, ["modelValue", "disabled", "clearable", "type", "value-format"]);
|
780
|
+
};
|
781
|
+
}
|
782
|
+
}), vo = /* @__PURE__ */ ae({
|
783
|
+
__name: "TimeCell",
|
784
|
+
props: {
|
785
|
+
modelValue: {},
|
786
|
+
disabled: { type: Boolean },
|
787
|
+
field: {}
|
788
|
+
},
|
789
|
+
emits: ["update:modelValue"],
|
790
|
+
setup(t, { emit: e }) {
|
791
|
+
const n = t, o = e, l = Y({
|
792
|
+
get: () => n.modelValue,
|
793
|
+
set: (a) => o("update:modelValue", a)
|
794
|
+
});
|
795
|
+
return (a, r) => {
|
796
|
+
const i = M("el-time-picker");
|
797
|
+
return P(), q(i, {
|
798
|
+
modelValue: l.value,
|
799
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => l.value = s),
|
800
|
+
style: { width: "100%" },
|
801
|
+
disabled: a.disabled,
|
802
|
+
teleported: !1,
|
803
|
+
clearable: !a.field.not_null,
|
804
|
+
"value-format": "HH:mm:ss"
|
805
|
+
}, null, 8, ["modelValue", "disabled", "clearable"]);
|
806
|
+
};
|
807
|
+
}
|
808
|
+
});
|
809
|
+
function bo(t) {
|
810
|
+
return { component: yo(t.domain) };
|
811
|
+
}
|
812
|
+
function yo(t) {
|
813
|
+
switch (t) {
|
814
|
+
case "BooleanField":
|
815
|
+
return co;
|
816
|
+
case "IntegerField":
|
817
|
+
case "FloatField":
|
818
|
+
return fo;
|
819
|
+
case "TextField":
|
820
|
+
case "CharField":
|
821
|
+
return po;
|
822
|
+
case "ManyToManyRel":
|
823
|
+
case "ManyToOneRel":
|
824
|
+
return ho;
|
825
|
+
case "DateField":
|
826
|
+
case "DateTimeField":
|
827
|
+
return go;
|
828
|
+
case "TimeField":
|
829
|
+
return vo;
|
830
|
+
default:
|
831
|
+
return mo;
|
832
|
+
}
|
833
|
+
}
|
834
|
+
const Eo = /* @__PURE__ */ ae({
|
835
|
+
__name: "MCell",
|
836
|
+
props: {
|
837
|
+
field: {},
|
838
|
+
bean: {},
|
839
|
+
disabled: { type: Boolean }
|
840
|
+
},
|
841
|
+
setup(t) {
|
842
|
+
const e = t, n = Y(() => e.field.prop), { component: o } = bo(e.field);
|
843
|
+
return (l, a) => (P(), q(cn(O(o)), {
|
844
|
+
modelValue: l.bean[n.value],
|
845
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => l.bean[n.value] = r),
|
846
|
+
field: l.field,
|
847
|
+
disabled: l.disabled
|
848
|
+
}, null, 8, ["modelValue", "field", "disabled"]));
|
849
|
+
}
|
850
|
+
}), _o = {
|
851
|
+
border: !0,
|
852
|
+
fit: !0,
|
853
|
+
showHeader: !0,
|
854
|
+
highlightCurrentRow: !1,
|
855
|
+
headerCellClassName: "m-table-header-cell",
|
856
|
+
showOverflowTooltip: !0
|
857
|
+
// currentRowKey: 'id',
|
858
|
+
// rowKey: 'id'
|
859
|
+
}, wo = { class: "justified" }, vn = /* @__PURE__ */ ae({
|
860
|
+
__name: "MTableHeader",
|
861
|
+
props: {
|
862
|
+
view: {},
|
863
|
+
field: {},
|
864
|
+
order: {}
|
865
|
+
},
|
866
|
+
emits: ["search", "meta", "order"],
|
867
|
+
setup(t, { emit: e }) {
|
868
|
+
const n = e;
|
869
|
+
return (o, l) => {
|
870
|
+
const a = M("el-text"), r = M("el-tooltip"), i = M("fa"), s = M("el-button");
|
871
|
+
return P(), ce("div", wo, [
|
872
|
+
$(r, {
|
873
|
+
content: o.field.label,
|
874
|
+
placement: "bottom",
|
875
|
+
effect: "dark",
|
876
|
+
"popper-class": "m-table-tooltip",
|
877
|
+
"hide-after": 0,
|
878
|
+
"show-after": 0,
|
879
|
+
transition: "none",
|
880
|
+
enterable: !1
|
881
|
+
}, {
|
882
|
+
default: k(() => [
|
883
|
+
$(a, {
|
884
|
+
style: { cursor: "pointer" },
|
885
|
+
onClick: l[0] || (l[0] = it((u) => n("search", u, o.field), ["prevent"])),
|
886
|
+
onContextmenu: l[1] || (l[1] = it((u) => n("meta", u, o.field), ["prevent"])),
|
887
|
+
truncated: ""
|
888
|
+
}, {
|
889
|
+
default: k(() => [
|
890
|
+
me(we(o.field.label), 1)
|
891
|
+
]),
|
892
|
+
_: 1
|
893
|
+
})
|
894
|
+
]),
|
895
|
+
_: 1
|
896
|
+
}, 8, ["content"]),
|
897
|
+
$(s, {
|
898
|
+
link: "",
|
899
|
+
size: "small",
|
900
|
+
type: "info"
|
901
|
+
}, {
|
902
|
+
default: k(() => [
|
903
|
+
$(i, { icon: "sort" })
|
904
|
+
]),
|
905
|
+
_: 1
|
906
|
+
})
|
907
|
+
]);
|
908
|
+
};
|
909
|
+
}
|
910
|
+
});
|
911
|
+
/**!
|
912
|
+
* Sortable 1.15.6
|
913
|
+
* @author RubaXa <trash@rubaxa.org>
|
914
|
+
* @author owenm <owen23355@gmail.com>
|
915
|
+
* @license MIT
|
916
|
+
*/
|
917
|
+
function Xt(t, e) {
|
918
|
+
var n = Object.keys(t);
|
919
|
+
if (Object.getOwnPropertySymbols) {
|
920
|
+
var o = Object.getOwnPropertySymbols(t);
|
921
|
+
e && (o = o.filter(function(l) {
|
922
|
+
return Object.getOwnPropertyDescriptor(t, l).enumerable;
|
923
|
+
})), n.push.apply(n, o);
|
924
|
+
}
|
925
|
+
return n;
|
926
|
+
}
|
927
|
+
function fe(t) {
|
928
|
+
for (var e = 1; e < arguments.length; e++) {
|
929
|
+
var n = arguments[e] != null ? arguments[e] : {};
|
930
|
+
e % 2 ? Xt(Object(n), !0).forEach(function(o) {
|
931
|
+
Do(t, o, n[o]);
|
932
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Xt(Object(n)).forEach(function(o) {
|
933
|
+
Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o));
|
934
|
+
});
|
935
|
+
}
|
936
|
+
return t;
|
937
|
+
}
|
938
|
+
function tt(t) {
|
939
|
+
"@babel/helpers - typeof";
|
940
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? tt = function(e) {
|
941
|
+
return typeof e;
|
942
|
+
} : tt = function(e) {
|
943
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
944
|
+
}, tt(t);
|
945
|
+
}
|
946
|
+
function Do(t, e, n) {
|
947
|
+
return e in t ? Object.defineProperty(t, e, {
|
948
|
+
value: n,
|
949
|
+
enumerable: !0,
|
950
|
+
configurable: !0,
|
951
|
+
writable: !0
|
952
|
+
}) : t[e] = n, t;
|
953
|
+
}
|
954
|
+
function ge() {
|
955
|
+
return ge = Object.assign || function(t) {
|
956
|
+
for (var e = 1; e < arguments.length; e++) {
|
957
|
+
var n = arguments[e];
|
958
|
+
for (var o in n)
|
959
|
+
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
960
|
+
}
|
961
|
+
return t;
|
962
|
+
}, ge.apply(this, arguments);
|
963
|
+
}
|
964
|
+
function Co(t, e) {
|
965
|
+
if (t == null)
|
966
|
+
return {};
|
967
|
+
var n = {}, o = Object.keys(t), l, a;
|
968
|
+
for (a = 0; a < o.length; a++)
|
969
|
+
l = o[a], !(e.indexOf(l) >= 0) && (n[l] = t[l]);
|
970
|
+
return n;
|
971
|
+
}
|
972
|
+
function So(t, e) {
|
973
|
+
if (t == null)
|
974
|
+
return {};
|
975
|
+
var n = Co(t, e), o, l;
|
976
|
+
if (Object.getOwnPropertySymbols) {
|
977
|
+
var a = Object.getOwnPropertySymbols(t);
|
978
|
+
for (l = 0; l < a.length; l++)
|
979
|
+
o = a[l], !(e.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(t, o) && (n[o] = t[o]);
|
980
|
+
}
|
981
|
+
return n;
|
982
|
+
}
|
983
|
+
var To = "1.15.6";
|
984
|
+
function he(t) {
|
985
|
+
if (typeof window < "u" && window.navigator)
|
986
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
987
|
+
}
|
988
|
+
var ve = he(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), We = he(/Edge/i), jt = he(/firefox/i), Le = he(/safari/i) && !he(/chrome/i) && !he(/android/i), Nt = he(/iP(ad|od|hone)/i), bn = he(/chrome/i) && he(/android/i), yn = {
|
989
|
+
capture: !1,
|
990
|
+
passive: !1
|
991
|
+
};
|
992
|
+
function T(t, e, n) {
|
993
|
+
t.addEventListener(e, n, !ve && yn);
|
994
|
+
}
|
995
|
+
function S(t, e, n) {
|
996
|
+
t.removeEventListener(e, n, !ve && yn);
|
997
|
+
}
|
998
|
+
function st(t, e) {
|
999
|
+
if (e) {
|
1000
|
+
if (e[0] === ">" && (e = e.substring(1)), t)
|
1001
|
+
try {
|
1002
|
+
if (t.matches)
|
1003
|
+
return t.matches(e);
|
1004
|
+
if (t.msMatchesSelector)
|
1005
|
+
return t.msMatchesSelector(e);
|
1006
|
+
if (t.webkitMatchesSelector)
|
1007
|
+
return t.webkitMatchesSelector(e);
|
1008
|
+
} catch {
|
1009
|
+
return !1;
|
1010
|
+
}
|
1011
|
+
return !1;
|
1012
|
+
}
|
1013
|
+
}
|
1014
|
+
function En(t) {
|
1015
|
+
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
1016
|
+
}
|
1017
|
+
function ue(t, e, n, o) {
|
1018
|
+
if (t) {
|
1019
|
+
n = n || document;
|
1020
|
+
do {
|
1021
|
+
if (e != null && (e[0] === ">" ? t.parentNode === n && st(t, e) : st(t, e)) || o && t === n)
|
1022
|
+
return t;
|
1023
|
+
if (t === n)
|
1024
|
+
break;
|
1025
|
+
} while (t = En(t));
|
1026
|
+
}
|
1027
|
+
return null;
|
1028
|
+
}
|
1029
|
+
var Wt = /\s+/g;
|
1030
|
+
function te(t, e, n) {
|
1031
|
+
if (t && e)
|
1032
|
+
if (t.classList)
|
1033
|
+
t.classList[n ? "add" : "remove"](e);
|
1034
|
+
else {
|
1035
|
+
var o = (" " + t.className + " ").replace(Wt, " ").replace(" " + e + " ", " ");
|
1036
|
+
t.className = (o + (n ? " " + e : "")).replace(Wt, " ");
|
1037
|
+
}
|
1038
|
+
}
|
1039
|
+
function g(t, e, n) {
|
1040
|
+
var o = t && t.style;
|
1041
|
+
if (o) {
|
1042
|
+
if (n === void 0)
|
1043
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(t, "") : t.currentStyle && (n = t.currentStyle), e === void 0 ? n : n[e];
|
1044
|
+
!(e in o) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), o[e] = n + (typeof n == "string" ? "" : "px");
|
1045
|
+
}
|
1046
|
+
}
|
1047
|
+
function ke(t, e) {
|
1048
|
+
var n = "";
|
1049
|
+
if (typeof t == "string")
|
1050
|
+
n = t;
|
1051
|
+
else
|
1052
|
+
do {
|
1053
|
+
var o = g(t, "transform");
|
1054
|
+
o && o !== "none" && (n = o + " " + n);
|
1055
|
+
} while (!e && (t = t.parentNode));
|
1056
|
+
var l = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
1057
|
+
return l && new l(n);
|
1058
|
+
}
|
1059
|
+
function _n(t, e, n) {
|
1060
|
+
if (t) {
|
1061
|
+
var o = t.getElementsByTagName(e), l = 0, a = o.length;
|
1062
|
+
if (n)
|
1063
|
+
for (; l < a; l++)
|
1064
|
+
n(o[l], l);
|
1065
|
+
return o;
|
1066
|
+
}
|
1067
|
+
return [];
|
1068
|
+
}
|
1069
|
+
function de() {
|
1070
|
+
var t = document.scrollingElement;
|
1071
|
+
return t || document.documentElement;
|
1072
|
+
}
|
1073
|
+
function j(t, e, n, o, l) {
|
1074
|
+
if (!(!t.getBoundingClientRect && t !== window)) {
|
1075
|
+
var a, r, i, s, u, c, d;
|
1076
|
+
if (t !== window && t.parentNode && t !== de() ? (a = t.getBoundingClientRect(), r = a.top, i = a.left, s = a.bottom, u = a.right, c = a.height, d = a.width) : (r = 0, i = 0, s = window.innerHeight, u = window.innerWidth, c = window.innerHeight, d = window.innerWidth), (e || n) && t !== window && (l = l || t.parentNode, !ve))
|
1077
|
+
do
|
1078
|
+
if (l && l.getBoundingClientRect && (g(l, "transform") !== "none" || n && g(l, "position") !== "static")) {
|
1079
|
+
var p = l.getBoundingClientRect();
|
1080
|
+
r -= p.top + parseInt(g(l, "border-top-width")), i -= p.left + parseInt(g(l, "border-left-width")), s = r + a.height, u = i + a.width;
|
1081
|
+
break;
|
1082
|
+
}
|
1083
|
+
while (l = l.parentNode);
|
1084
|
+
if (o && t !== window) {
|
1085
|
+
var h = ke(l || t), b = h && h.a, _ = h && h.d;
|
1086
|
+
h && (r /= _, i /= b, d /= b, c /= _, s = r + c, u = i + d);
|
1087
|
+
}
|
1088
|
+
return {
|
1089
|
+
top: r,
|
1090
|
+
left: i,
|
1091
|
+
bottom: s,
|
1092
|
+
right: u,
|
1093
|
+
width: d,
|
1094
|
+
height: c
|
1095
|
+
};
|
1096
|
+
}
|
1097
|
+
}
|
1098
|
+
function zt(t, e, n) {
|
1099
|
+
for (var o = Ce(t, !0), l = j(t)[e]; o; ) {
|
1100
|
+
var a = j(o)[n], r = void 0;
|
1101
|
+
if (n === "top" || n === "left" ? r = l >= a : r = l <= a, !r)
|
1102
|
+
return o;
|
1103
|
+
if (o === de())
|
1104
|
+
break;
|
1105
|
+
o = Ce(o, !1);
|
1106
|
+
}
|
1107
|
+
return !1;
|
1108
|
+
}
|
1109
|
+
function Me(t, e, n, o) {
|
1110
|
+
for (var l = 0, a = 0, r = t.children; a < r.length; ) {
|
1111
|
+
if (r[a].style.display !== "none" && r[a] !== v.ghost && (o || r[a] !== v.dragged) && ue(r[a], n.draggable, t, !1)) {
|
1112
|
+
if (l === e)
|
1113
|
+
return r[a];
|
1114
|
+
l++;
|
1115
|
+
}
|
1116
|
+
a++;
|
1117
|
+
}
|
1118
|
+
return null;
|
1119
|
+
}
|
1120
|
+
function Rt(t, e) {
|
1121
|
+
for (var n = t.lastElementChild; n && (n === v.ghost || g(n, "display") === "none" || e && !st(n, e)); )
|
1122
|
+
n = n.previousElementSibling;
|
1123
|
+
return n || null;
|
1124
|
+
}
|
1125
|
+
function le(t, e) {
|
1126
|
+
var n = 0;
|
1127
|
+
if (!t || !t.parentNode)
|
1128
|
+
return -1;
|
1129
|
+
for (; t = t.previousElementSibling; )
|
1130
|
+
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== v.clone && (!e || st(t, e)) && n++;
|
1131
|
+
return n;
|
1132
|
+
}
|
1133
|
+
function Gt(t) {
|
1134
|
+
var e = 0, n = 0, o = de();
|
1135
|
+
if (t)
|
1136
|
+
do {
|
1137
|
+
var l = ke(t), a = l.a, r = l.d;
|
1138
|
+
e += t.scrollLeft * a, n += t.scrollTop * r;
|
1139
|
+
} while (t !== o && (t = t.parentNode));
|
1140
|
+
return [e, n];
|
1141
|
+
}
|
1142
|
+
function Fo(t, e) {
|
1143
|
+
for (var n in t)
|
1144
|
+
if (t.hasOwnProperty(n)) {
|
1145
|
+
for (var o in e)
|
1146
|
+
if (e.hasOwnProperty(o) && e[o] === t[n][o])
|
1147
|
+
return Number(n);
|
1148
|
+
}
|
1149
|
+
return -1;
|
1150
|
+
}
|
1151
|
+
function Ce(t, e) {
|
1152
|
+
if (!t || !t.getBoundingClientRect)
|
1153
|
+
return de();
|
1154
|
+
var n = t, o = !1;
|
1155
|
+
do
|
1156
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
1157
|
+
var l = g(n);
|
1158
|
+
if (n.clientWidth < n.scrollWidth && (l.overflowX == "auto" || l.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (l.overflowY == "auto" || l.overflowY == "scroll")) {
|
1159
|
+
if (!n.getBoundingClientRect || n === document.body)
|
1160
|
+
return de();
|
1161
|
+
if (o || e)
|
1162
|
+
return n;
|
1163
|
+
o = !0;
|
1164
|
+
}
|
1165
|
+
}
|
1166
|
+
while (n = n.parentNode);
|
1167
|
+
return de();
|
1168
|
+
}
|
1169
|
+
function Oo(t, e) {
|
1170
|
+
if (t && e)
|
1171
|
+
for (var n in e)
|
1172
|
+
e.hasOwnProperty(n) && (t[n] = e[n]);
|
1173
|
+
return t;
|
1174
|
+
}
|
1175
|
+
function yt(t, e) {
|
1176
|
+
return Math.round(t.top) === Math.round(e.top) && Math.round(t.left) === Math.round(e.left) && Math.round(t.height) === Math.round(e.height) && Math.round(t.width) === Math.round(e.width);
|
1177
|
+
}
|
1178
|
+
var He;
|
1179
|
+
function wn(t, e) {
|
1180
|
+
return function() {
|
1181
|
+
if (!He) {
|
1182
|
+
var n = arguments, o = this;
|
1183
|
+
n.length === 1 ? t.call(o, n[0]) : t.apply(o, n), He = setTimeout(function() {
|
1184
|
+
He = void 0;
|
1185
|
+
}, e);
|
1186
|
+
}
|
1187
|
+
};
|
1188
|
+
}
|
1189
|
+
function Bo() {
|
1190
|
+
clearTimeout(He), He = void 0;
|
1191
|
+
}
|
1192
|
+
function Dn(t, e, n) {
|
1193
|
+
t.scrollLeft += e, t.scrollTop += n;
|
1194
|
+
}
|
1195
|
+
function Cn(t) {
|
1196
|
+
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
1197
|
+
return e && e.dom ? e.dom(t).cloneNode(!0) : n ? n(t).clone(!0)[0] : t.cloneNode(!0);
|
1198
|
+
}
|
1199
|
+
function Sn(t, e, n) {
|
1200
|
+
var o = {};
|
1201
|
+
return Array.from(t.children).forEach(function(l) {
|
1202
|
+
var a, r, i, s;
|
1203
|
+
if (!(!ue(l, e.draggable, t, !1) || l.animated || l === n)) {
|
1204
|
+
var u = j(l);
|
1205
|
+
o.left = Math.min((a = o.left) !== null && a !== void 0 ? a : 1 / 0, u.left), o.top = Math.min((r = o.top) !== null && r !== void 0 ? r : 1 / 0, u.top), o.right = Math.max((i = o.right) !== null && i !== void 0 ? i : -1 / 0, u.right), o.bottom = Math.max((s = o.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
1206
|
+
}
|
1207
|
+
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
1208
|
+
}
|
1209
|
+
var ee = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
1210
|
+
function Io() {
|
1211
|
+
var t = [], e;
|
1212
|
+
return {
|
1213
|
+
captureAnimationState: function() {
|
1214
|
+
if (t = [], !!this.options.animation) {
|
1215
|
+
var o = [].slice.call(this.el.children);
|
1216
|
+
o.forEach(function(l) {
|
1217
|
+
if (!(g(l, "display") === "none" || l === v.ghost)) {
|
1218
|
+
t.push({
|
1219
|
+
target: l,
|
1220
|
+
rect: j(l)
|
1221
|
+
});
|
1222
|
+
var a = fe({}, t[t.length - 1].rect);
|
1223
|
+
if (l.thisAnimationDuration) {
|
1224
|
+
var r = ke(l, !0);
|
1225
|
+
r && (a.top -= r.f, a.left -= r.e);
|
1226
|
+
}
|
1227
|
+
l.fromRect = a;
|
1228
|
+
}
|
1229
|
+
});
|
1230
|
+
}
|
1231
|
+
},
|
1232
|
+
addAnimationState: function(o) {
|
1233
|
+
t.push(o);
|
1234
|
+
},
|
1235
|
+
removeAnimationState: function(o) {
|
1236
|
+
t.splice(Fo(t, {
|
1237
|
+
target: o
|
1238
|
+
}), 1);
|
1239
|
+
},
|
1240
|
+
animateAll: function(o) {
|
1241
|
+
var l = this;
|
1242
|
+
if (!this.options.animation) {
|
1243
|
+
clearTimeout(e), typeof o == "function" && o();
|
1244
|
+
return;
|
1245
|
+
}
|
1246
|
+
var a = !1, r = 0;
|
1247
|
+
t.forEach(function(i) {
|
1248
|
+
var s = 0, u = i.target, c = u.fromRect, d = j(u), p = u.prevFromRect, h = u.prevToRect, b = i.rect, _ = ke(u, !0);
|
1249
|
+
_ && (d.top -= _.f, d.left -= _.e), u.toRect = d, u.thisAnimationDuration && yt(p, d) && !yt(c, d) && // Make sure animatingRect is on line between toRect & fromRect
|
1250
|
+
(b.top - d.top) / (b.left - d.left) === (c.top - d.top) / (c.left - d.left) && (s = Po(b, p, h, l.options)), yt(d, c) || (u.prevFromRect = c, u.prevToRect = d, s || (s = l.options.animation), l.animate(u, b, d, s)), s && (a = !0, r = Math.max(r, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
1251
|
+
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
1252
|
+
}, s), u.thisAnimationDuration = s);
|
1253
|
+
}), clearTimeout(e), a ? e = setTimeout(function() {
|
1254
|
+
typeof o == "function" && o();
|
1255
|
+
}, r) : typeof o == "function" && o(), t = [];
|
1256
|
+
},
|
1257
|
+
animate: function(o, l, a, r) {
|
1258
|
+
if (r) {
|
1259
|
+
g(o, "transition", ""), g(o, "transform", "");
|
1260
|
+
var i = ke(this.el), s = i && i.a, u = i && i.d, c = (l.left - a.left) / (s || 1), d = (l.top - a.top) / (u || 1);
|
1261
|
+
o.animatingX = !!c, o.animatingY = !!d, g(o, "transform", "translate3d(" + c + "px," + d + "px,0)"), this.forRepaintDummy = Ao(o), g(o, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), g(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
1262
|
+
g(o, "transition", ""), g(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
1263
|
+
}, r);
|
1264
|
+
}
|
1265
|
+
}
|
1266
|
+
};
|
1267
|
+
}
|
1268
|
+
function Ao(t) {
|
1269
|
+
return t.offsetWidth;
|
1270
|
+
}
|
1271
|
+
function Po(t, e, n, o) {
|
1272
|
+
return Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * o.animation;
|
1273
|
+
}
|
1274
|
+
var Be = [], Et = {
|
1275
|
+
initializeByDefault: !0
|
1276
|
+
}, ze = {
|
1277
|
+
mount: function(e) {
|
1278
|
+
for (var n in Et)
|
1279
|
+
Et.hasOwnProperty(n) && !(n in e) && (e[n] = Et[n]);
|
1280
|
+
Be.forEach(function(o) {
|
1281
|
+
if (o.pluginName === e.pluginName)
|
1282
|
+
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
1283
|
+
}), Be.push(e);
|
1284
|
+
},
|
1285
|
+
pluginEvent: function(e, n, o) {
|
1286
|
+
var l = this;
|
1287
|
+
this.eventCanceled = !1, o.cancel = function() {
|
1288
|
+
l.eventCanceled = !0;
|
1289
|
+
};
|
1290
|
+
var a = e + "Global";
|
1291
|
+
Be.forEach(function(r) {
|
1292
|
+
n[r.pluginName] && (n[r.pluginName][a] && n[r.pluginName][a](fe({
|
1293
|
+
sortable: n
|
1294
|
+
}, o)), n.options[r.pluginName] && n[r.pluginName][e] && n[r.pluginName][e](fe({
|
1295
|
+
sortable: n
|
1296
|
+
}, o)));
|
1297
|
+
});
|
1298
|
+
},
|
1299
|
+
initializePlugins: function(e, n, o, l) {
|
1300
|
+
Be.forEach(function(i) {
|
1301
|
+
var s = i.pluginName;
|
1302
|
+
if (!(!e.options[s] && !i.initializeByDefault)) {
|
1303
|
+
var u = new i(e, n, e.options);
|
1304
|
+
u.sortable = e, u.options = e.options, e[s] = u, ge(o, u.defaults);
|
1305
|
+
}
|
1306
|
+
});
|
1307
|
+
for (var a in e.options)
|
1308
|
+
if (e.options.hasOwnProperty(a)) {
|
1309
|
+
var r = this.modifyOption(e, a, e.options[a]);
|
1310
|
+
typeof r < "u" && (e.options[a] = r);
|
1311
|
+
}
|
1312
|
+
},
|
1313
|
+
getEventProperties: function(e, n) {
|
1314
|
+
var o = {};
|
1315
|
+
return Be.forEach(function(l) {
|
1316
|
+
typeof l.eventProperties == "function" && ge(o, l.eventProperties.call(n[l.pluginName], e));
|
1317
|
+
}), o;
|
1318
|
+
},
|
1319
|
+
modifyOption: function(e, n, o) {
|
1320
|
+
var l;
|
1321
|
+
return Be.forEach(function(a) {
|
1322
|
+
e[a.pluginName] && a.optionListeners && typeof a.optionListeners[n] == "function" && (l = a.optionListeners[n].call(e[a.pluginName], o));
|
1323
|
+
}), l;
|
1324
|
+
}
|
1325
|
+
};
|
1326
|
+
function xo(t) {
|
1327
|
+
var e = t.sortable, n = t.rootEl, o = t.name, l = t.targetEl, a = t.cloneEl, r = t.toEl, i = t.fromEl, s = t.oldIndex, u = t.newIndex, c = t.oldDraggableIndex, d = t.newDraggableIndex, p = t.originalEvent, h = t.putSortable, b = t.extraEventProperties;
|
1328
|
+
if (e = e || n && n[ee], !!e) {
|
1329
|
+
var _, C = e.options, F = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
1330
|
+
window.CustomEvent && !ve && !We ? _ = new CustomEvent(o, {
|
1331
|
+
bubbles: !0,
|
1332
|
+
cancelable: !0
|
1333
|
+
}) : (_ = document.createEvent("Event"), _.initEvent(o, !0, !0)), _.to = r || n, _.from = i || n, _.item = l || n, _.clone = a, _.oldIndex = s, _.newIndex = u, _.oldDraggableIndex = c, _.newDraggableIndex = d, _.originalEvent = p, _.pullMode = h ? h.lastPutMode : void 0;
|
1334
|
+
var B = fe(fe({}, b), ze.getEventProperties(o, e));
|
1335
|
+
for (var w in B)
|
1336
|
+
_[w] = B[w];
|
1337
|
+
n && n.dispatchEvent(_), C[F] && C[F].call(e, _);
|
1338
|
+
}
|
1339
|
+
}
|
1340
|
+
var ko = ["evt"], Z = function(e, n) {
|
1341
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = o.evt, a = So(o, ko);
|
1342
|
+
ze.pluginEvent.bind(v)(e, n, fe({
|
1343
|
+
dragEl: f,
|
1344
|
+
parentEl: L,
|
1345
|
+
ghostEl: E,
|
1346
|
+
rootEl: N,
|
1347
|
+
nextEl: Fe,
|
1348
|
+
lastDownEl: nt,
|
1349
|
+
cloneEl: V,
|
1350
|
+
cloneHidden: Ee,
|
1351
|
+
dragStarted: Re,
|
1352
|
+
putSortable: z,
|
1353
|
+
activeSortable: v.active,
|
1354
|
+
originalEvent: l,
|
1355
|
+
oldIndex: Pe,
|
1356
|
+
oldDraggableIndex: Ue,
|
1357
|
+
newIndex: ne,
|
1358
|
+
newDraggableIndex: ye,
|
1359
|
+
hideGhostForTarget: Bn,
|
1360
|
+
unhideGhostForTarget: In,
|
1361
|
+
cloneNowHidden: function() {
|
1362
|
+
Ee = !0;
|
1363
|
+
},
|
1364
|
+
cloneNowShown: function() {
|
1365
|
+
Ee = !1;
|
1366
|
+
},
|
1367
|
+
dispatchSortableEvent: function(i) {
|
1368
|
+
Q({
|
1369
|
+
sortable: n,
|
1370
|
+
name: i,
|
1371
|
+
originalEvent: l
|
1372
|
+
});
|
1373
|
+
}
|
1374
|
+
}, a));
|
1375
|
+
};
|
1376
|
+
function Q(t) {
|
1377
|
+
xo(fe({
|
1378
|
+
putSortable: z,
|
1379
|
+
cloneEl: V,
|
1380
|
+
targetEl: f,
|
1381
|
+
rootEl: N,
|
1382
|
+
oldIndex: Pe,
|
1383
|
+
oldDraggableIndex: Ue,
|
1384
|
+
newIndex: ne,
|
1385
|
+
newDraggableIndex: ye
|
1386
|
+
}, t));
|
1387
|
+
}
|
1388
|
+
var f, L, E, N, Fe, nt, V, Ee, Pe, ne, Ue, ye, Ke, z, Ae = !1, ut = !1, ct = [], Se, ie, _t, wt, qt, Kt, Re, Ie, Xe, je = !1, Qe = !1, ot, K, Dt = [], Ot = !1, dt = [], mt = typeof document < "u", Je = Nt, Qt = We || ve ? "cssFloat" : "float", Mo = mt && !bn && !Nt && "draggable" in document.createElement("div"), Tn = function() {
|
1389
|
+
if (mt) {
|
1390
|
+
if (ve)
|
1391
|
+
return !1;
|
1392
|
+
var t = document.createElement("x");
|
1393
|
+
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
1394
|
+
}
|
1395
|
+
}(), Fn = function(e, n) {
|
1396
|
+
var o = g(e), l = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), a = Me(e, 0, n), r = Me(e, 1, n), i = a && g(a), s = r && g(r), u = i && parseInt(i.marginLeft) + parseInt(i.marginRight) + j(a).width, c = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + j(r).width;
|
1397
|
+
if (o.display === "flex")
|
1398
|
+
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
1399
|
+
if (o.display === "grid")
|
1400
|
+
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
1401
|
+
if (a && i.float && i.float !== "none") {
|
1402
|
+
var d = i.float === "left" ? "left" : "right";
|
1403
|
+
return r && (s.clear === "both" || s.clear === d) ? "vertical" : "horizontal";
|
1404
|
+
}
|
1405
|
+
return a && (i.display === "block" || i.display === "flex" || i.display === "table" || i.display === "grid" || u >= l && o[Qt] === "none" || r && o[Qt] === "none" && u + c > l) ? "vertical" : "horizontal";
|
1406
|
+
}, No = function(e, n, o) {
|
1407
|
+
var l = o ? e.left : e.top, a = o ? e.right : e.bottom, r = o ? e.width : e.height, i = o ? n.left : n.top, s = o ? n.right : n.bottom, u = o ? n.width : n.height;
|
1408
|
+
return l === i || a === s || l + r / 2 === i + u / 2;
|
1409
|
+
}, Ro = function(e, n) {
|
1410
|
+
var o;
|
1411
|
+
return ct.some(function(l) {
|
1412
|
+
var a = l[ee].options.emptyInsertThreshold;
|
1413
|
+
if (!(!a || Rt(l))) {
|
1414
|
+
var r = j(l), i = e >= r.left - a && e <= r.right + a, s = n >= r.top - a && n <= r.bottom + a;
|
1415
|
+
if (i && s)
|
1416
|
+
return o = l;
|
1417
|
+
}
|
1418
|
+
}), o;
|
1419
|
+
}, On = function(e) {
|
1420
|
+
function n(a, r) {
|
1421
|
+
return function(i, s, u, c) {
|
1422
|
+
var d = i.options.group.name && s.options.group.name && i.options.group.name === s.options.group.name;
|
1423
|
+
if (a == null && (r || d))
|
1424
|
+
return !0;
|
1425
|
+
if (a == null || a === !1)
|
1426
|
+
return !1;
|
1427
|
+
if (r && a === "clone")
|
1428
|
+
return a;
|
1429
|
+
if (typeof a == "function")
|
1430
|
+
return n(a(i, s, u, c), r)(i, s, u, c);
|
1431
|
+
var p = (r ? i : s).options.group.name;
|
1432
|
+
return a === !0 || typeof a == "string" && a === p || a.join && a.indexOf(p) > -1;
|
1433
|
+
};
|
1434
|
+
}
|
1435
|
+
var o = {}, l = e.group;
|
1436
|
+
(!l || tt(l) != "object") && (l = {
|
1437
|
+
name: l
|
1438
|
+
}), o.name = l.name, o.checkPull = n(l.pull, !0), o.checkPut = n(l.put), o.revertClone = l.revertClone, e.group = o;
|
1439
|
+
}, Bn = function() {
|
1440
|
+
!Tn && E && g(E, "display", "none");
|
1441
|
+
}, In = function() {
|
1442
|
+
!Tn && E && g(E, "display", "");
|
1443
|
+
};
|
1444
|
+
mt && !bn && document.addEventListener("click", function(t) {
|
1445
|
+
if (ut)
|
1446
|
+
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), ut = !1, !1;
|
1447
|
+
}, !0);
|
1448
|
+
var Te = function(e) {
|
1449
|
+
if (f) {
|
1450
|
+
e = e.touches ? e.touches[0] : e;
|
1451
|
+
var n = Ro(e.clientX, e.clientY);
|
1452
|
+
if (n) {
|
1453
|
+
var o = {};
|
1454
|
+
for (var l in e)
|
1455
|
+
e.hasOwnProperty(l) && (o[l] = e[l]);
|
1456
|
+
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[ee]._onDragOver(o);
|
1457
|
+
}
|
1458
|
+
}
|
1459
|
+
}, Vo = function(e) {
|
1460
|
+
f && f.parentNode[ee]._isOutsideThisEl(e.target);
|
1461
|
+
};
|
1462
|
+
function v(t, e) {
|
1463
|
+
if (!(t && t.nodeType && t.nodeType === 1))
|
1464
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
1465
|
+
this.el = t, this.options = e = ge({}, e), t[ee] = this;
|
1466
|
+
var n = {
|
1467
|
+
group: null,
|
1468
|
+
sort: !0,
|
1469
|
+
disabled: !1,
|
1470
|
+
store: null,
|
1471
|
+
handle: null,
|
1472
|
+
draggable: /^[uo]l$/i.test(t.nodeName) ? ">li" : ">*",
|
1473
|
+
swapThreshold: 1,
|
1474
|
+
// percentage; 0 <= x <= 1
|
1475
|
+
invertSwap: !1,
|
1476
|
+
// invert always
|
1477
|
+
invertedSwapThreshold: null,
|
1478
|
+
// will be set to same as swapThreshold if default
|
1479
|
+
removeCloneOnHide: !0,
|
1480
|
+
direction: function() {
|
1481
|
+
return Fn(t, this.options);
|
1482
|
+
},
|
1483
|
+
ghostClass: "sortable-ghost",
|
1484
|
+
chosenClass: "sortable-chosen",
|
1485
|
+
dragClass: "sortable-drag",
|
1486
|
+
ignore: "a, img",
|
1487
|
+
filter: null,
|
1488
|
+
preventOnFilter: !0,
|
1489
|
+
animation: 0,
|
1490
|
+
easing: null,
|
1491
|
+
setData: function(r, i) {
|
1492
|
+
r.setData("Text", i.textContent);
|
1493
|
+
},
|
1494
|
+
dropBubble: !1,
|
1495
|
+
dragoverBubble: !1,
|
1496
|
+
dataIdAttr: "data-id",
|
1497
|
+
delay: 0,
|
1498
|
+
delayOnTouchOnly: !1,
|
1499
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
1500
|
+
forceFallback: !1,
|
1501
|
+
fallbackClass: "sortable-fallback",
|
1502
|
+
fallbackOnBody: !1,
|
1503
|
+
fallbackTolerance: 0,
|
1504
|
+
fallbackOffset: {
|
1505
|
+
x: 0,
|
1506
|
+
y: 0
|
1507
|
+
},
|
1508
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
1509
|
+
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && (!Le || Nt),
|
1510
|
+
emptyInsertThreshold: 5
|
1511
|
+
};
|
1512
|
+
ze.initializePlugins(this, t, n);
|
1513
|
+
for (var o in n)
|
1514
|
+
!(o in e) && (e[o] = n[o]);
|
1515
|
+
On(e);
|
1516
|
+
for (var l in this)
|
1517
|
+
l.charAt(0) === "_" && typeof this[l] == "function" && (this[l] = this[l].bind(this));
|
1518
|
+
this.nativeDraggable = e.forceFallback ? !1 : Mo, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? T(t, "pointerdown", this._onTapStart) : (T(t, "mousedown", this._onTapStart), T(t, "touchstart", this._onTapStart)), this.nativeDraggable && (T(t, "dragover", this), T(t, "dragenter", this)), ct.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), ge(this, Io());
|
1519
|
+
}
|
1520
|
+
v.prototype = /** @lends Sortable.prototype */
|
1521
|
+
{
|
1522
|
+
constructor: v,
|
1523
|
+
_isOutsideThisEl: function(e) {
|
1524
|
+
!this.el.contains(e) && e !== this.el && (Ie = null);
|
1525
|
+
},
|
1526
|
+
_getDirection: function(e, n) {
|
1527
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, f) : this.options.direction;
|
1528
|
+
},
|
1529
|
+
_onTapStart: function(e) {
|
1530
|
+
if (e.cancelable) {
|
1531
|
+
var n = this, o = this.el, l = this.options, a = l.preventOnFilter, r = e.type, i = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (i || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, c = l.filter;
|
1532
|
+
if (Wo(o), !f && !(/mousedown|pointerdown/.test(r) && e.button !== 0 || l.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Le && s && s.tagName.toUpperCase() === "SELECT") && (s = ue(s, l.draggable, o, !1), !(s && s.animated) && nt !== s)) {
|
1533
|
+
if (Pe = le(s), Ue = le(s, l.draggable), typeof c == "function") {
|
1534
|
+
if (c.call(this, e, s, this)) {
|
1535
|
+
Q({
|
1536
|
+
sortable: n,
|
1537
|
+
rootEl: u,
|
1538
|
+
name: "filter",
|
1539
|
+
targetEl: s,
|
1540
|
+
toEl: o,
|
1541
|
+
fromEl: o
|
1542
|
+
}), Z("filter", n, {
|
1543
|
+
evt: e
|
1544
|
+
}), a && e.preventDefault();
|
1545
|
+
return;
|
1546
|
+
}
|
1547
|
+
} else if (c && (c = c.split(",").some(function(d) {
|
1548
|
+
if (d = ue(u, d.trim(), o, !1), d)
|
1549
|
+
return Q({
|
1550
|
+
sortable: n,
|
1551
|
+
rootEl: d,
|
1552
|
+
name: "filter",
|
1553
|
+
targetEl: s,
|
1554
|
+
fromEl: o,
|
1555
|
+
toEl: o
|
1556
|
+
}), Z("filter", n, {
|
1557
|
+
evt: e
|
1558
|
+
}), !0;
|
1559
|
+
}), c)) {
|
1560
|
+
a && e.preventDefault();
|
1561
|
+
return;
|
1562
|
+
}
|
1563
|
+
l.handle && !ue(u, l.handle, o, !1) || this._prepareDragStart(e, i, s);
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
},
|
1567
|
+
_prepareDragStart: function(e, n, o) {
|
1568
|
+
var l = this, a = l.el, r = l.options, i = a.ownerDocument, s;
|
1569
|
+
if (o && !f && o.parentNode === a) {
|
1570
|
+
var u = j(o);
|
1571
|
+
if (N = a, f = o, L = f.parentNode, Fe = f.nextSibling, nt = o, Ke = r.group, v.dragged = f, Se = {
|
1572
|
+
target: f,
|
1573
|
+
clientX: (n || e).clientX,
|
1574
|
+
clientY: (n || e).clientY
|
1575
|
+
}, qt = Se.clientX - u.left, Kt = Se.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, f.style["will-change"] = "all", s = function() {
|
1576
|
+
if (Z("delayEnded", l, {
|
1577
|
+
evt: e
|
1578
|
+
}), v.eventCanceled) {
|
1579
|
+
l._onDrop();
|
1580
|
+
return;
|
1581
|
+
}
|
1582
|
+
l._disableDelayedDragEvents(), !jt && l.nativeDraggable && (f.draggable = !0), l._triggerDragStart(e, n), Q({
|
1583
|
+
sortable: l,
|
1584
|
+
name: "choose",
|
1585
|
+
originalEvent: e
|
1586
|
+
}), te(f, r.chosenClass, !0);
|
1587
|
+
}, r.ignore.split(",").forEach(function(c) {
|
1588
|
+
_n(f, c.trim(), Ct);
|
1589
|
+
}), T(i, "dragover", Te), T(i, "mousemove", Te), T(i, "touchmove", Te), r.supportPointer ? (T(i, "pointerup", l._onDrop), !this.nativeDraggable && T(i, "pointercancel", l._onDrop)) : (T(i, "mouseup", l._onDrop), T(i, "touchend", l._onDrop), T(i, "touchcancel", l._onDrop)), jt && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), Z("delayStart", this, {
|
1590
|
+
evt: e
|
1591
|
+
}), r.delay && (!r.delayOnTouchOnly || n) && (!this.nativeDraggable || !(We || ve))) {
|
1592
|
+
if (v.eventCanceled) {
|
1593
|
+
this._onDrop();
|
1594
|
+
return;
|
1595
|
+
}
|
1596
|
+
r.supportPointer ? (T(i, "pointerup", l._disableDelayedDrag), T(i, "pointercancel", l._disableDelayedDrag)) : (T(i, "mouseup", l._disableDelayedDrag), T(i, "touchend", l._disableDelayedDrag), T(i, "touchcancel", l._disableDelayedDrag)), T(i, "mousemove", l._delayedDragTouchMoveHandler), T(i, "touchmove", l._delayedDragTouchMoveHandler), r.supportPointer && T(i, "pointermove", l._delayedDragTouchMoveHandler), l._dragStartTimer = setTimeout(s, r.delay);
|
1597
|
+
} else
|
1598
|
+
s();
|
1599
|
+
}
|
1600
|
+
},
|
1601
|
+
_delayedDragTouchMoveHandler: function(e) {
|
1602
|
+
var n = e.touches ? e.touches[0] : e;
|
1603
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
1604
|
+
},
|
1605
|
+
_disableDelayedDrag: function() {
|
1606
|
+
f && Ct(f), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
1607
|
+
},
|
1608
|
+
_disableDelayedDragEvents: function() {
|
1609
|
+
var e = this.el.ownerDocument;
|
1610
|
+
S(e, "mouseup", this._disableDelayedDrag), S(e, "touchend", this._disableDelayedDrag), S(e, "touchcancel", this._disableDelayedDrag), S(e, "pointerup", this._disableDelayedDrag), S(e, "pointercancel", this._disableDelayedDrag), S(e, "mousemove", this._delayedDragTouchMoveHandler), S(e, "touchmove", this._delayedDragTouchMoveHandler), S(e, "pointermove", this._delayedDragTouchMoveHandler);
|
1611
|
+
},
|
1612
|
+
_triggerDragStart: function(e, n) {
|
1613
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? T(document, "pointermove", this._onTouchMove) : n ? T(document, "touchmove", this._onTouchMove) : T(document, "mousemove", this._onTouchMove) : (T(f, "dragend", this), T(N, "dragstart", this._onDragStart));
|
1614
|
+
try {
|
1615
|
+
document.selection ? lt(function() {
|
1616
|
+
document.selection.empty();
|
1617
|
+
}) : window.getSelection().removeAllRanges();
|
1618
|
+
} catch {
|
1619
|
+
}
|
1620
|
+
},
|
1621
|
+
_dragStarted: function(e, n) {
|
1622
|
+
if (Ae = !1, N && f) {
|
1623
|
+
Z("dragStarted", this, {
|
1624
|
+
evt: n
|
1625
|
+
}), this.nativeDraggable && T(document, "dragover", Vo);
|
1626
|
+
var o = this.options;
|
1627
|
+
!e && te(f, o.dragClass, !1), te(f, o.ghostClass, !0), v.active = this, e && this._appendGhost(), Q({
|
1628
|
+
sortable: this,
|
1629
|
+
name: "start",
|
1630
|
+
originalEvent: n
|
1631
|
+
});
|
1632
|
+
} else
|
1633
|
+
this._nulling();
|
1634
|
+
},
|
1635
|
+
_emulateDragOver: function() {
|
1636
|
+
if (ie) {
|
1637
|
+
this._lastX = ie.clientX, this._lastY = ie.clientY, Bn();
|
1638
|
+
for (var e = document.elementFromPoint(ie.clientX, ie.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ie.clientX, ie.clientY), e !== n); )
|
1639
|
+
n = e;
|
1640
|
+
if (f.parentNode[ee]._isOutsideThisEl(e), n)
|
1641
|
+
do {
|
1642
|
+
if (n[ee]) {
|
1643
|
+
var o = void 0;
|
1644
|
+
if (o = n[ee]._onDragOver({
|
1645
|
+
clientX: ie.clientX,
|
1646
|
+
clientY: ie.clientY,
|
1647
|
+
target: e,
|
1648
|
+
rootEl: n
|
1649
|
+
}), o && !this.options.dragoverBubble)
|
1650
|
+
break;
|
1651
|
+
}
|
1652
|
+
e = n;
|
1653
|
+
} while (n = En(n));
|
1654
|
+
In();
|
1655
|
+
}
|
1656
|
+
},
|
1657
|
+
_onTouchMove: function(e) {
|
1658
|
+
if (Se) {
|
1659
|
+
var n = this.options, o = n.fallbackTolerance, l = n.fallbackOffset, a = e.touches ? e.touches[0] : e, r = E && ke(E, !0), i = E && r && r.a, s = E && r && r.d, u = Je && K && Gt(K), c = (a.clientX - Se.clientX + l.x) / (i || 1) + (u ? u[0] - Dt[0] : 0) / (i || 1), d = (a.clientY - Se.clientY + l.y) / (s || 1) + (u ? u[1] - Dt[1] : 0) / (s || 1);
|
1660
|
+
if (!v.active && !Ae) {
|
1661
|
+
if (o && Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) < o)
|
1662
|
+
return;
|
1663
|
+
this._onDragStart(e, !0);
|
1664
|
+
}
|
1665
|
+
if (E) {
|
1666
|
+
r ? (r.e += c - (_t || 0), r.f += d - (wt || 0)) : r = {
|
1667
|
+
a: 1,
|
1668
|
+
b: 0,
|
1669
|
+
c: 0,
|
1670
|
+
d: 1,
|
1671
|
+
e: c,
|
1672
|
+
f: d
|
1673
|
+
};
|
1674
|
+
var p = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
1675
|
+
g(E, "webkitTransform", p), g(E, "mozTransform", p), g(E, "msTransform", p), g(E, "transform", p), _t = c, wt = d, ie = a;
|
1676
|
+
}
|
1677
|
+
e.cancelable && e.preventDefault();
|
1678
|
+
}
|
1679
|
+
},
|
1680
|
+
_appendGhost: function() {
|
1681
|
+
if (!E) {
|
1682
|
+
var e = this.options.fallbackOnBody ? document.body : N, n = j(f, !0, Je, !0, e), o = this.options;
|
1683
|
+
if (Je) {
|
1684
|
+
for (K = e; g(K, "position") === "static" && g(K, "transform") === "none" && K !== document; )
|
1685
|
+
K = K.parentNode;
|
1686
|
+
K !== document.body && K !== document.documentElement ? (K === document && (K = de()), n.top += K.scrollTop, n.left += K.scrollLeft) : K = de(), Dt = Gt(K);
|
1687
|
+
}
|
1688
|
+
E = f.cloneNode(!0), te(E, o.ghostClass, !1), te(E, o.fallbackClass, !0), te(E, o.dragClass, !0), g(E, "transition", ""), g(E, "transform", ""), g(E, "box-sizing", "border-box"), g(E, "margin", 0), g(E, "top", n.top), g(E, "left", n.left), g(E, "width", n.width), g(E, "height", n.height), g(E, "opacity", "0.8"), g(E, "position", Je ? "absolute" : "fixed"), g(E, "zIndex", "100000"), g(E, "pointerEvents", "none"), v.ghost = E, e.appendChild(E), g(E, "transform-origin", qt / parseInt(E.style.width) * 100 + "% " + Kt / parseInt(E.style.height) * 100 + "%");
|
1689
|
+
}
|
1690
|
+
},
|
1691
|
+
_onDragStart: function(e, n) {
|
1692
|
+
var o = this, l = e.dataTransfer, a = o.options;
|
1693
|
+
if (Z("dragStart", this, {
|
1694
|
+
evt: e
|
1695
|
+
}), v.eventCanceled) {
|
1696
|
+
this._onDrop();
|
1697
|
+
return;
|
1698
|
+
}
|
1699
|
+
Z("setupClone", this), v.eventCanceled || (V = Cn(f), V.removeAttribute("id"), V.draggable = !1, V.style["will-change"] = "", this._hideClone(), te(V, this.options.chosenClass, !1), v.clone = V), o.cloneId = lt(function() {
|
1700
|
+
Z("clone", o), !v.eventCanceled && (o.options.removeCloneOnHide || N.insertBefore(V, f), o._hideClone(), Q({
|
1701
|
+
sortable: o,
|
1702
|
+
name: "clone"
|
1703
|
+
}));
|
1704
|
+
}), !n && te(f, a.dragClass, !0), n ? (ut = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (S(document, "mouseup", o._onDrop), S(document, "touchend", o._onDrop), S(document, "touchcancel", o._onDrop), l && (l.effectAllowed = "move", a.setData && a.setData.call(o, l, f)), T(document, "drop", o), g(f, "transform", "translateZ(0)")), Ae = !0, o._dragStartId = lt(o._dragStarted.bind(o, n, e)), T(document, "selectstart", o), Re = !0, window.getSelection().removeAllRanges(), Le && g(document.body, "user-select", "none");
|
1705
|
+
},
|
1706
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
1707
|
+
_onDragOver: function(e) {
|
1708
|
+
var n = this.el, o = e.target, l, a, r, i = this.options, s = i.group, u = v.active, c = Ke === s, d = i.sort, p = z || u, h, b = this, _ = !1;
|
1709
|
+
if (Ot)
|
1710
|
+
return;
|
1711
|
+
function C(Ne, kn) {
|
1712
|
+
Z(Ne, b, fe({
|
1713
|
+
evt: e,
|
1714
|
+
isOwner: c,
|
1715
|
+
axis: h ? "vertical" : "horizontal",
|
1716
|
+
revert: r,
|
1717
|
+
dragRect: l,
|
1718
|
+
targetRect: a,
|
1719
|
+
canSort: d,
|
1720
|
+
fromSortable: p,
|
1721
|
+
target: o,
|
1722
|
+
completed: B,
|
1723
|
+
onMove: function(Yt, Mn) {
|
1724
|
+
return Ze(N, n, f, l, Yt, j(Yt), e, Mn);
|
1725
|
+
},
|
1726
|
+
changed: w
|
1727
|
+
}, kn));
|
1728
|
+
}
|
1729
|
+
function F() {
|
1730
|
+
C("dragOverAnimationCapture"), b.captureAnimationState(), b !== p && p.captureAnimationState();
|
1731
|
+
}
|
1732
|
+
function B(Ne) {
|
1733
|
+
return C("dragOverCompleted", {
|
1734
|
+
insertion: Ne
|
1735
|
+
}), Ne && (c ? u._hideClone() : u._showClone(b), b !== p && (te(f, z ? z.options.ghostClass : u.options.ghostClass, !1), te(f, i.ghostClass, !0)), z !== b && b !== v.active ? z = b : b === v.active && z && (z = null), p === b && (b._ignoreWhileAnimating = o), b.animateAll(function() {
|
1736
|
+
C("dragOverAnimationComplete"), b._ignoreWhileAnimating = null;
|
1737
|
+
}), b !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (o === f && !f.animated || o === n && !o.animated) && (Ie = null), !i.dragoverBubble && !e.rootEl && o !== document && (f.parentNode[ee]._isOutsideThisEl(e.target), !Ne && Te(e)), !i.dragoverBubble && e.stopPropagation && e.stopPropagation(), _ = !0;
|
1738
|
+
}
|
1739
|
+
function w() {
|
1740
|
+
ne = le(f), ye = le(f, i.draggable), Q({
|
1741
|
+
sortable: b,
|
1742
|
+
name: "change",
|
1743
|
+
toEl: n,
|
1744
|
+
newIndex: ne,
|
1745
|
+
newDraggableIndex: ye,
|
1746
|
+
originalEvent: e
|
1747
|
+
});
|
1748
|
+
}
|
1749
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = ue(o, i.draggable, n, !0), C("dragOver"), v.eventCanceled)
|
1750
|
+
return _;
|
1751
|
+
if (f.contains(e.target) || o.animated && o.animatingX && o.animatingY || b._ignoreWhileAnimating === o)
|
1752
|
+
return B(!1);
|
1753
|
+
if (ut = !1, u && !i.disabled && (c ? d || (r = L !== N) : z === this || (this.lastPutMode = Ke.checkPull(this, u, f, e)) && s.checkPut(this, u, f, e))) {
|
1754
|
+
if (h = this._getDirection(e, o) === "vertical", l = j(f), C("dragOverValid"), v.eventCanceled)
|
1755
|
+
return _;
|
1756
|
+
if (r)
|
1757
|
+
return L = N, F(), this._hideClone(), C("revert"), v.eventCanceled || (Fe ? N.insertBefore(f, Fe) : N.appendChild(f)), B(!0);
|
1758
|
+
var y = Rt(n, i.draggable);
|
1759
|
+
if (!y || Ho(e, h, this) && !y.animated) {
|
1760
|
+
if (y === f)
|
1761
|
+
return B(!1);
|
1762
|
+
if (y && n === e.target && (o = y), o && (a = j(o)), Ze(N, n, f, l, o, a, e, !!o) !== !1)
|
1763
|
+
return F(), y && y.nextSibling ? n.insertBefore(f, y.nextSibling) : n.appendChild(f), L = n, w(), B(!0);
|
1764
|
+
} else if (y && Lo(e, h, this)) {
|
1765
|
+
var m = Me(n, 0, i, !0);
|
1766
|
+
if (m === f)
|
1767
|
+
return B(!1);
|
1768
|
+
if (o = m, a = j(o), Ze(N, n, f, l, o, a, e, !1) !== !1)
|
1769
|
+
return F(), n.insertBefore(f, m), L = n, w(), B(!0);
|
1770
|
+
} else if (o.parentNode === n) {
|
1771
|
+
a = j(o);
|
1772
|
+
var D = 0, I, R = f.parentNode !== n, A = !No(f.animated && f.toRect || l, o.animated && o.toRect || a, h), W = h ? "top" : "left", U = zt(o, "top", "top") || zt(f, "top", "top"), re = U ? U.scrollTop : void 0;
|
1773
|
+
Ie !== o && (I = a[W], je = !1, Qe = !A && i.invertSwap || R), D = Uo(e, o, a, h, A ? 1 : i.swapThreshold, i.invertedSwapThreshold == null ? i.swapThreshold : i.invertedSwapThreshold, Qe, Ie === o);
|
1774
|
+
var x;
|
1775
|
+
if (D !== 0) {
|
1776
|
+
var H = le(f);
|
1777
|
+
do
|
1778
|
+
H -= D, x = L.children[H];
|
1779
|
+
while (x && (g(x, "display") === "none" || x === E));
|
1780
|
+
}
|
1781
|
+
if (D === 0 || x === o)
|
1782
|
+
return B(!1);
|
1783
|
+
Ie = o, Xe = D;
|
1784
|
+
var oe = o.nextElementSibling, be = !1;
|
1785
|
+
be = D === 1;
|
1786
|
+
var Ge = Ze(N, n, f, l, o, a, e, be);
|
1787
|
+
if (Ge !== !1)
|
1788
|
+
return (Ge === 1 || Ge === -1) && (be = Ge === 1), Ot = !0, setTimeout(Yo, 30), F(), be && !oe ? n.appendChild(f) : o.parentNode.insertBefore(f, be ? oe : o), U && Dn(U, 0, re - U.scrollTop), L = f.parentNode, I !== void 0 && !Qe && (ot = Math.abs(I - j(o)[W])), w(), B(!0);
|
1789
|
+
}
|
1790
|
+
if (n.contains(f))
|
1791
|
+
return B(!1);
|
1792
|
+
}
|
1793
|
+
return !1;
|
1794
|
+
},
|
1795
|
+
_ignoreWhileAnimating: null,
|
1796
|
+
_offMoveEvents: function() {
|
1797
|
+
S(document, "mousemove", this._onTouchMove), S(document, "touchmove", this._onTouchMove), S(document, "pointermove", this._onTouchMove), S(document, "dragover", Te), S(document, "mousemove", Te), S(document, "touchmove", Te);
|
1798
|
+
},
|
1799
|
+
_offUpEvents: function() {
|
1800
|
+
var e = this.el.ownerDocument;
|
1801
|
+
S(e, "mouseup", this._onDrop), S(e, "touchend", this._onDrop), S(e, "pointerup", this._onDrop), S(e, "pointercancel", this._onDrop), S(e, "touchcancel", this._onDrop), S(document, "selectstart", this);
|
1802
|
+
},
|
1803
|
+
_onDrop: function(e) {
|
1804
|
+
var n = this.el, o = this.options;
|
1805
|
+
if (ne = le(f), ye = le(f, o.draggable), Z("drop", this, {
|
1806
|
+
evt: e
|
1807
|
+
}), L = f && f.parentNode, ne = le(f), ye = le(f, o.draggable), v.eventCanceled) {
|
1808
|
+
this._nulling();
|
1809
|
+
return;
|
1810
|
+
}
|
1811
|
+
Ae = !1, Qe = !1, je = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Bt(this.cloneId), Bt(this._dragStartId), this.nativeDraggable && (S(document, "drop", this), S(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Le && g(document.body, "user-select", ""), g(f, "transform", ""), e && (Re && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), E && E.parentNode && E.parentNode.removeChild(E), (N === L || z && z.lastPutMode !== "clone") && V && V.parentNode && V.parentNode.removeChild(V), f && (this.nativeDraggable && S(f, "dragend", this), Ct(f), f.style["will-change"] = "", Re && !Ae && te(f, z ? z.options.ghostClass : this.options.ghostClass, !1), te(f, this.options.chosenClass, !1), Q({
|
1812
|
+
sortable: this,
|
1813
|
+
name: "unchoose",
|
1814
|
+
toEl: L,
|
1815
|
+
newIndex: null,
|
1816
|
+
newDraggableIndex: null,
|
1817
|
+
originalEvent: e
|
1818
|
+
}), N !== L ? (ne >= 0 && (Q({
|
1819
|
+
rootEl: L,
|
1820
|
+
name: "add",
|
1821
|
+
toEl: L,
|
1822
|
+
fromEl: N,
|
1823
|
+
originalEvent: e
|
1824
|
+
}), Q({
|
1825
|
+
sortable: this,
|
1826
|
+
name: "remove",
|
1827
|
+
toEl: L,
|
1828
|
+
originalEvent: e
|
1829
|
+
}), Q({
|
1830
|
+
rootEl: L,
|
1831
|
+
name: "sort",
|
1832
|
+
toEl: L,
|
1833
|
+
fromEl: N,
|
1834
|
+
originalEvent: e
|
1835
|
+
}), Q({
|
1836
|
+
sortable: this,
|
1837
|
+
name: "sort",
|
1838
|
+
toEl: L,
|
1839
|
+
originalEvent: e
|
1840
|
+
})), z && z.save()) : ne !== Pe && ne >= 0 && (Q({
|
1841
|
+
sortable: this,
|
1842
|
+
name: "update",
|
1843
|
+
toEl: L,
|
1844
|
+
originalEvent: e
|
1845
|
+
}), Q({
|
1846
|
+
sortable: this,
|
1847
|
+
name: "sort",
|
1848
|
+
toEl: L,
|
1849
|
+
originalEvent: e
|
1850
|
+
})), v.active && ((ne == null || ne === -1) && (ne = Pe, ye = Ue), Q({
|
1851
|
+
sortable: this,
|
1852
|
+
name: "end",
|
1853
|
+
toEl: L,
|
1854
|
+
originalEvent: e
|
1855
|
+
}), this.save()))), this._nulling();
|
1856
|
+
},
|
1857
|
+
_nulling: function() {
|
1858
|
+
Z("nulling", this), N = f = L = E = Fe = V = nt = Ee = Se = ie = Re = ne = ye = Pe = Ue = Ie = Xe = z = Ke = v.dragged = v.ghost = v.clone = v.active = null, dt.forEach(function(e) {
|
1859
|
+
e.checked = !0;
|
1860
|
+
}), dt.length = _t = wt = 0;
|
1861
|
+
},
|
1862
|
+
handleEvent: function(e) {
|
1863
|
+
switch (e.type) {
|
1864
|
+
case "drop":
|
1865
|
+
case "dragend":
|
1866
|
+
this._onDrop(e);
|
1867
|
+
break;
|
1868
|
+
case "dragenter":
|
1869
|
+
case "dragover":
|
1870
|
+
f && (this._onDragOver(e), $o(e));
|
1871
|
+
break;
|
1872
|
+
case "selectstart":
|
1873
|
+
e.preventDefault();
|
1874
|
+
break;
|
1875
|
+
}
|
1876
|
+
},
|
1877
|
+
/**
|
1878
|
+
* Serializes the item into an array of string.
|
1879
|
+
* @returns {String[]}
|
1880
|
+
*/
|
1881
|
+
toArray: function() {
|
1882
|
+
for (var e = [], n, o = this.el.children, l = 0, a = o.length, r = this.options; l < a; l++)
|
1883
|
+
n = o[l], ue(n, r.draggable, this.el, !1) && e.push(n.getAttribute(r.dataIdAttr) || jo(n));
|
1884
|
+
return e;
|
1885
|
+
},
|
1886
|
+
/**
|
1887
|
+
* Sorts the elements according to the array.
|
1888
|
+
* @param {String[]} order order of the items
|
1889
|
+
*/
|
1890
|
+
sort: function(e, n) {
|
1891
|
+
var o = {}, l = this.el;
|
1892
|
+
this.toArray().forEach(function(a, r) {
|
1893
|
+
var i = l.children[r];
|
1894
|
+
ue(i, this.options.draggable, l, !1) && (o[a] = i);
|
1895
|
+
}, this), n && this.captureAnimationState(), e.forEach(function(a) {
|
1896
|
+
o[a] && (l.removeChild(o[a]), l.appendChild(o[a]));
|
1897
|
+
}), n && this.animateAll();
|
1898
|
+
},
|
1899
|
+
/**
|
1900
|
+
* Save the current sorting
|
1901
|
+
*/
|
1902
|
+
save: function() {
|
1903
|
+
var e = this.options.store;
|
1904
|
+
e && e.set && e.set(this);
|
1905
|
+
},
|
1906
|
+
/**
|
1907
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
1908
|
+
* @param {HTMLElement} el
|
1909
|
+
* @param {String} [selector] default: `options.draggable`
|
1910
|
+
* @returns {HTMLElement|null}
|
1911
|
+
*/
|
1912
|
+
closest: function(e, n) {
|
1913
|
+
return ue(e, n || this.options.draggable, this.el, !1);
|
1914
|
+
},
|
1915
|
+
/**
|
1916
|
+
* Set/get option
|
1917
|
+
* @param {string} name
|
1918
|
+
* @param {*} [value]
|
1919
|
+
* @returns {*}
|
1920
|
+
*/
|
1921
|
+
option: function(e, n) {
|
1922
|
+
var o = this.options;
|
1923
|
+
if (n === void 0)
|
1924
|
+
return o[e];
|
1925
|
+
var l = ze.modifyOption(this, e, n);
|
1926
|
+
typeof l < "u" ? o[e] = l : o[e] = n, e === "group" && On(o);
|
1927
|
+
},
|
1928
|
+
/**
|
1929
|
+
* Destroy
|
1930
|
+
*/
|
1931
|
+
destroy: function() {
|
1932
|
+
Z("destroy", this);
|
1933
|
+
var e = this.el;
|
1934
|
+
e[ee] = null, S(e, "mousedown", this._onTapStart), S(e, "touchstart", this._onTapStart), S(e, "pointerdown", this._onTapStart), this.nativeDraggable && (S(e, "dragover", this), S(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
1935
|
+
n.removeAttribute("draggable");
|
1936
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ct.splice(ct.indexOf(this.el), 1), this.el = e = null;
|
1937
|
+
},
|
1938
|
+
_hideClone: function() {
|
1939
|
+
if (!Ee) {
|
1940
|
+
if (Z("hideClone", this), v.eventCanceled)
|
1941
|
+
return;
|
1942
|
+
g(V, "display", "none"), this.options.removeCloneOnHide && V.parentNode && V.parentNode.removeChild(V), Ee = !0;
|
1943
|
+
}
|
1944
|
+
},
|
1945
|
+
_showClone: function(e) {
|
1946
|
+
if (e.lastPutMode !== "clone") {
|
1947
|
+
this._hideClone();
|
1948
|
+
return;
|
1949
|
+
}
|
1950
|
+
if (Ee) {
|
1951
|
+
if (Z("showClone", this), v.eventCanceled)
|
1952
|
+
return;
|
1953
|
+
f.parentNode == N && !this.options.group.revertClone ? N.insertBefore(V, f) : Fe ? N.insertBefore(V, Fe) : N.appendChild(V), this.options.group.revertClone && this.animate(f, V), g(V, "display", ""), Ee = !1;
|
1954
|
+
}
|
1955
|
+
}
|
1956
|
+
};
|
1957
|
+
function $o(t) {
|
1958
|
+
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
1959
|
+
}
|
1960
|
+
function Ze(t, e, n, o, l, a, r, i) {
|
1961
|
+
var s, u = t[ee], c = u.options.onMove, d;
|
1962
|
+
return window.CustomEvent && !ve && !We ? s = new CustomEvent("move", {
|
1963
|
+
bubbles: !0,
|
1964
|
+
cancelable: !0
|
1965
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = t, s.dragged = n, s.draggedRect = o, s.related = l || e, s.relatedRect = a || j(e), s.willInsertAfter = i, s.originalEvent = r, t.dispatchEvent(s), c && (d = c.call(u, s, r)), d;
|
1966
|
+
}
|
1967
|
+
function Ct(t) {
|
1968
|
+
t.draggable = !1;
|
1969
|
+
}
|
1970
|
+
function Yo() {
|
1971
|
+
Ot = !1;
|
1972
|
+
}
|
1973
|
+
function Lo(t, e, n) {
|
1974
|
+
var o = j(Me(n.el, 0, n.options, !0)), l = Sn(n.el, n.options, E), a = 10;
|
1975
|
+
return e ? t.clientX < l.left - a || t.clientY < o.top && t.clientX < o.right : t.clientY < l.top - a || t.clientY < o.bottom && t.clientX < o.left;
|
1976
|
+
}
|
1977
|
+
function Ho(t, e, n) {
|
1978
|
+
var o = j(Rt(n.el, n.options.draggable)), l = Sn(n.el, n.options, E), a = 10;
|
1979
|
+
return e ? t.clientX > l.right + a || t.clientY > o.bottom && t.clientX > o.left : t.clientY > l.bottom + a || t.clientX > o.right && t.clientY > o.top;
|
1980
|
+
}
|
1981
|
+
function Uo(t, e, n, o, l, a, r, i) {
|
1982
|
+
var s = o ? t.clientY : t.clientX, u = o ? n.height : n.width, c = o ? n.top : n.left, d = o ? n.bottom : n.right, p = !1;
|
1983
|
+
if (!r) {
|
1984
|
+
if (i && ot < u * l) {
|
1985
|
+
if (!je && (Xe === 1 ? s > c + u * a / 2 : s < d - u * a / 2) && (je = !0), je)
|
1986
|
+
p = !0;
|
1987
|
+
else if (Xe === 1 ? s < c + ot : s > d - ot)
|
1988
|
+
return -Xe;
|
1989
|
+
} else if (s > c + u * (1 - l) / 2 && s < d - u * (1 - l) / 2)
|
1990
|
+
return Xo(e);
|
1991
|
+
}
|
1992
|
+
return p = p || r, p && (s < c + u * a / 2 || s > d - u * a / 2) ? s > c + u / 2 ? 1 : -1 : 0;
|
1993
|
+
}
|
1994
|
+
function Xo(t) {
|
1995
|
+
return le(f) < le(t) ? 1 : -1;
|
1996
|
+
}
|
1997
|
+
function jo(t) {
|
1998
|
+
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, n = e.length, o = 0; n--; )
|
1999
|
+
o += e.charCodeAt(n);
|
2000
|
+
return o.toString(36);
|
2001
|
+
}
|
2002
|
+
function Wo(t) {
|
2003
|
+
dt.length = 0;
|
2004
|
+
for (var e = t.getElementsByTagName("input"), n = e.length; n--; ) {
|
2005
|
+
var o = e[n];
|
2006
|
+
o.checked && dt.push(o);
|
2007
|
+
}
|
2008
|
+
}
|
2009
|
+
function lt(t) {
|
2010
|
+
return setTimeout(t, 0);
|
2011
|
+
}
|
2012
|
+
function Bt(t) {
|
2013
|
+
return clearTimeout(t);
|
2014
|
+
}
|
2015
|
+
mt && T(document, "touchmove", function(t) {
|
2016
|
+
(v.active || Ae) && t.cancelable && t.preventDefault();
|
2017
|
+
});
|
2018
|
+
v.utils = {
|
2019
|
+
on: T,
|
2020
|
+
off: S,
|
2021
|
+
css: g,
|
2022
|
+
find: _n,
|
2023
|
+
is: function(e, n) {
|
2024
|
+
return !!ue(e, n, e, !1);
|
2025
|
+
},
|
2026
|
+
extend: Oo,
|
2027
|
+
throttle: wn,
|
2028
|
+
closest: ue,
|
2029
|
+
toggleClass: te,
|
2030
|
+
clone: Cn,
|
2031
|
+
index: le,
|
2032
|
+
nextTick: lt,
|
2033
|
+
cancelNextTick: Bt,
|
2034
|
+
detectDirection: Fn,
|
2035
|
+
getChild: Me,
|
2036
|
+
expando: ee
|
2037
|
+
};
|
2038
|
+
v.get = function(t) {
|
2039
|
+
return t[ee];
|
2040
|
+
};
|
2041
|
+
v.mount = function() {
|
2042
|
+
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
2043
|
+
e[n] = arguments[n];
|
2044
|
+
e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {
|
2045
|
+
if (!o.prototype || !o.prototype.constructor)
|
2046
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
2047
|
+
o.utils && (v.utils = fe(fe({}, v.utils), o.utils)), ze.mount(o);
|
2048
|
+
});
|
2049
|
+
};
|
2050
|
+
v.create = function(t, e) {
|
2051
|
+
return new v(t, e);
|
2052
|
+
};
|
2053
|
+
v.version = To;
|
2054
|
+
var X = [], Ve, It, At = !1, St, Tt, ft, $e;
|
2055
|
+
function zo() {
|
2056
|
+
function t() {
|
2057
|
+
this.defaults = {
|
2058
|
+
scroll: !0,
|
2059
|
+
forceAutoScrollFallback: !1,
|
2060
|
+
scrollSensitivity: 30,
|
2061
|
+
scrollSpeed: 10,
|
2062
|
+
bubbleScroll: !0
|
2063
|
+
};
|
2064
|
+
for (var e in this)
|
2065
|
+
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
2066
|
+
}
|
2067
|
+
return t.prototype = {
|
2068
|
+
dragStarted: function(n) {
|
2069
|
+
var o = n.originalEvent;
|
2070
|
+
this.sortable.nativeDraggable ? T(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? T(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? T(document, "touchmove", this._handleFallbackAutoScroll) : T(document, "mousemove", this._handleFallbackAutoScroll);
|
2071
|
+
},
|
2072
|
+
dragOverCompleted: function(n) {
|
2073
|
+
var o = n.originalEvent;
|
2074
|
+
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
2075
|
+
},
|
2076
|
+
drop: function() {
|
2077
|
+
this.sortable.nativeDraggable ? S(document, "dragover", this._handleAutoScroll) : (S(document, "pointermove", this._handleFallbackAutoScroll), S(document, "touchmove", this._handleFallbackAutoScroll), S(document, "mousemove", this._handleFallbackAutoScroll)), Jt(), at(), Bo();
|
2078
|
+
},
|
2079
|
+
nulling: function() {
|
2080
|
+
ft = It = Ve = At = $e = St = Tt = null, X.length = 0;
|
2081
|
+
},
|
2082
|
+
_handleFallbackAutoScroll: function(n) {
|
2083
|
+
this._handleAutoScroll(n, !0);
|
2084
|
+
},
|
2085
|
+
_handleAutoScroll: function(n, o) {
|
2086
|
+
var l = this, a = (n.touches ? n.touches[0] : n).clientX, r = (n.touches ? n.touches[0] : n).clientY, i = document.elementFromPoint(a, r);
|
2087
|
+
if (ft = n, o || this.options.forceAutoScrollFallback || We || ve || Le) {
|
2088
|
+
Ft(n, this.options, i, o);
|
2089
|
+
var s = Ce(i, !0);
|
2090
|
+
At && (!$e || a !== St || r !== Tt) && ($e && Jt(), $e = setInterval(function() {
|
2091
|
+
var u = Ce(document.elementFromPoint(a, r), !0);
|
2092
|
+
u !== s && (s = u, at()), Ft(n, l.options, u, o);
|
2093
|
+
}, 10), St = a, Tt = r);
|
2094
|
+
} else {
|
2095
|
+
if (!this.options.bubbleScroll || Ce(i, !0) === de()) {
|
2096
|
+
at();
|
2097
|
+
return;
|
2098
|
+
}
|
2099
|
+
Ft(n, this.options, Ce(i, !1), !1);
|
2100
|
+
}
|
2101
|
+
}
|
2102
|
+
}, ge(t, {
|
2103
|
+
pluginName: "scroll",
|
2104
|
+
initializeByDefault: !0
|
2105
|
+
});
|
2106
|
+
}
|
2107
|
+
function at() {
|
2108
|
+
X.forEach(function(t) {
|
2109
|
+
clearInterval(t.pid);
|
2110
|
+
}), X = [];
|
2111
|
+
}
|
2112
|
+
function Jt() {
|
2113
|
+
clearInterval($e);
|
2114
|
+
}
|
2115
|
+
var Ft = wn(function(t, e, n, o) {
|
2116
|
+
if (e.scroll) {
|
2117
|
+
var l = (t.touches ? t.touches[0] : t).clientX, a = (t.touches ? t.touches[0] : t).clientY, r = e.scrollSensitivity, i = e.scrollSpeed, s = de(), u = !1, c;
|
2118
|
+
It !== n && (It = n, at(), Ve = e.scroll, c = e.scrollFn, Ve === !0 && (Ve = Ce(n, !0)));
|
2119
|
+
var d = 0, p = Ve;
|
2120
|
+
do {
|
2121
|
+
var h = p, b = j(h), _ = b.top, C = b.bottom, F = b.left, B = b.right, w = b.width, y = b.height, m = void 0, D = void 0, I = h.scrollWidth, R = h.scrollHeight, A = g(h), W = h.scrollLeft, U = h.scrollTop;
|
2122
|
+
h === s ? (m = w < I && (A.overflowX === "auto" || A.overflowX === "scroll" || A.overflowX === "visible"), D = y < R && (A.overflowY === "auto" || A.overflowY === "scroll" || A.overflowY === "visible")) : (m = w < I && (A.overflowX === "auto" || A.overflowX === "scroll"), D = y < R && (A.overflowY === "auto" || A.overflowY === "scroll"));
|
2123
|
+
var re = m && (Math.abs(B - l) <= r && W + w < I) - (Math.abs(F - l) <= r && !!W), x = D && (Math.abs(C - a) <= r && U + y < R) - (Math.abs(_ - a) <= r && !!U);
|
2124
|
+
if (!X[d])
|
2125
|
+
for (var H = 0; H <= d; H++)
|
2126
|
+
X[H] || (X[H] = {});
|
2127
|
+
(X[d].vx != re || X[d].vy != x || X[d].el !== h) && (X[d].el = h, X[d].vx = re, X[d].vy = x, clearInterval(X[d].pid), (re != 0 || x != 0) && (u = !0, X[d].pid = setInterval((function() {
|
2128
|
+
o && this.layer === 0 && v.active._onTouchMove(ft);
|
2129
|
+
var oe = X[this.layer].vy ? X[this.layer].vy * i : 0, be = X[this.layer].vx ? X[this.layer].vx * i : 0;
|
2130
|
+
typeof c == "function" && c.call(v.dragged.parentNode[ee], be, oe, t, ft, X[this.layer].el) !== "continue" || Dn(X[this.layer].el, be, oe);
|
2131
|
+
}).bind({
|
2132
|
+
layer: d
|
2133
|
+
}), 24))), d++;
|
2134
|
+
} while (e.bubbleScroll && p !== s && (p = Ce(p, !1)));
|
2135
|
+
At = u;
|
2136
|
+
}
|
2137
|
+
}, 30), An = function(e) {
|
2138
|
+
var n = e.originalEvent, o = e.putSortable, l = e.dragEl, a = e.activeSortable, r = e.dispatchSortableEvent, i = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
2139
|
+
if (n) {
|
2140
|
+
var u = o || a;
|
2141
|
+
i();
|
2142
|
+
var c = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, d = document.elementFromPoint(c.clientX, c.clientY);
|
2143
|
+
s(), u && !u.el.contains(d) && (r("spill"), this.onSpill({
|
2144
|
+
dragEl: l,
|
2145
|
+
putSortable: o
|
2146
|
+
}));
|
2147
|
+
}
|
2148
|
+
};
|
2149
|
+
function Vt() {
|
2150
|
+
}
|
2151
|
+
Vt.prototype = {
|
2152
|
+
startIndex: null,
|
2153
|
+
dragStart: function(e) {
|
2154
|
+
var n = e.oldDraggableIndex;
|
2155
|
+
this.startIndex = n;
|
2156
|
+
},
|
2157
|
+
onSpill: function(e) {
|
2158
|
+
var n = e.dragEl, o = e.putSortable;
|
2159
|
+
this.sortable.captureAnimationState(), o && o.captureAnimationState();
|
2160
|
+
var l = Me(this.sortable.el, this.startIndex, this.options);
|
2161
|
+
l ? this.sortable.el.insertBefore(n, l) : this.sortable.el.appendChild(n), this.sortable.animateAll(), o && o.animateAll();
|
2162
|
+
},
|
2163
|
+
drop: An
|
2164
|
+
};
|
2165
|
+
ge(Vt, {
|
2166
|
+
pluginName: "revertOnSpill"
|
2167
|
+
});
|
2168
|
+
function $t() {
|
2169
|
+
}
|
2170
|
+
$t.prototype = {
|
2171
|
+
onSpill: function(e) {
|
2172
|
+
var n = e.dragEl, o = e.putSortable, l = o || this.sortable;
|
2173
|
+
l.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), l.animateAll();
|
2174
|
+
},
|
2175
|
+
drop: An
|
2176
|
+
};
|
2177
|
+
ge($t, {
|
2178
|
+
pluginName: "removeOnSpill"
|
2179
|
+
});
|
2180
|
+
v.mount(new zo());
|
2181
|
+
v.mount($t, Vt);
|
2182
|
+
var Zt;
|
2183
|
+
const ht = typeof window < "u", Go = (t) => typeof t == "string", qo = () => {
|
2184
|
+
};
|
2185
|
+
ht && ((Zt = window == null ? void 0 : window.navigator) != null && Zt.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
2186
|
+
function gt(t) {
|
2187
|
+
return typeof t == "function" ? t() : O(t);
|
2188
|
+
}
|
2189
|
+
function Ko(t) {
|
2190
|
+
return t;
|
2191
|
+
}
|
2192
|
+
function Pn(t) {
|
2193
|
+
return Yn() ? (Ln(t), !0) : !1;
|
2194
|
+
}
|
2195
|
+
function Qo(t, e = !0) {
|
2196
|
+
Hn() ? dn(t) : e ? t() : Un(t);
|
2197
|
+
}
|
2198
|
+
function Jo(t, e, n = {}) {
|
2199
|
+
const {
|
2200
|
+
immediate: o = !0
|
2201
|
+
} = n, l = G(!1);
|
2202
|
+
let a = null;
|
2203
|
+
function r() {
|
2204
|
+
a && (clearTimeout(a), a = null);
|
2205
|
+
}
|
2206
|
+
function i() {
|
2207
|
+
l.value = !1, r();
|
2208
|
+
}
|
2209
|
+
function s(...u) {
|
2210
|
+
r(), l.value = !0, a = setTimeout(() => {
|
2211
|
+
l.value = !1, a = null, t(...u);
|
2212
|
+
}, gt(e));
|
2213
|
+
}
|
2214
|
+
return o && (l.value = !0, ht && s()), Pn(i), {
|
2215
|
+
isPending: $n(l),
|
2216
|
+
start: s,
|
2217
|
+
stop: i
|
2218
|
+
};
|
2219
|
+
}
|
2220
|
+
function Zo(t) {
|
2221
|
+
var e;
|
2222
|
+
const n = gt(t);
|
2223
|
+
return (e = n == null ? void 0 : n.$el) != null ? e : n;
|
2224
|
+
}
|
2225
|
+
const el = ht ? window : void 0, tl = ht ? window.navigator : void 0;
|
2226
|
+
function nl(...t) {
|
2227
|
+
let e, n, o, l;
|
2228
|
+
if (Go(t[0]) || Array.isArray(t[0]) ? ([n, o, l] = t, e = el) : [e, n, o, l] = t, !e)
|
2229
|
+
return qo;
|
2230
|
+
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
2231
|
+
const a = [], r = () => {
|
2232
|
+
a.forEach((c) => c()), a.length = 0;
|
2233
|
+
}, i = (c, d, p, h) => (c.addEventListener(d, p, h), () => c.removeEventListener(d, p, h)), s = pt(() => [Zo(e), gt(l)], ([c, d]) => {
|
2234
|
+
r(), c && a.push(...n.flatMap((p) => o.map((h) => i(c, p, h, d))));
|
2235
|
+
}, { immediate: !0, flush: "post" }), u = () => {
|
2236
|
+
s(), r();
|
2237
|
+
};
|
2238
|
+
return Pn(u), u;
|
2239
|
+
}
|
2240
|
+
function ol(t, e = !1) {
|
2241
|
+
const n = G(), o = () => n.value = !!t();
|
2242
|
+
return o(), Qo(o, e), n;
|
2243
|
+
}
|
2244
|
+
function ll(t = {}) {
|
2245
|
+
const {
|
2246
|
+
navigator: e = tl,
|
2247
|
+
read: n = !1,
|
2248
|
+
source: o,
|
2249
|
+
copiedDuring: l = 1500,
|
2250
|
+
legacy: a = !1
|
2251
|
+
} = t, r = ["copy", "cut"], i = ol(() => e && "clipboard" in e), s = Y(() => i.value || a), u = G(""), c = G(!1), d = Jo(() => c.value = !1, l);
|
2252
|
+
function p() {
|
2253
|
+
i.value ? e.clipboard.readText().then((C) => {
|
2254
|
+
u.value = C;
|
2255
|
+
}) : u.value = _();
|
2256
|
+
}
|
2257
|
+
if (s.value && n)
|
2258
|
+
for (const C of r)
|
2259
|
+
nl(C, p);
|
2260
|
+
async function h(C = gt(o)) {
|
2261
|
+
s.value && C != null && (i.value ? await e.clipboard.writeText(C) : b(C), u.value = C, c.value = !0, d.start());
|
2262
|
+
}
|
2263
|
+
function b(C) {
|
2264
|
+
const F = document.createElement("textarea");
|
2265
|
+
F.value = C ?? "", F.style.position = "absolute", F.style.opacity = "0", document.body.appendChild(F), F.select(), document.execCommand("copy"), F.remove();
|
2266
|
+
}
|
2267
|
+
function _() {
|
2268
|
+
var C, F, B;
|
2269
|
+
return (B = (F = (C = document == null ? void 0 : document.getSelection) == null ? void 0 : C.call(document)) == null ? void 0 : F.toString()) != null ? B : "";
|
2270
|
+
}
|
2271
|
+
return {
|
2272
|
+
isSupported: s,
|
2273
|
+
text: u,
|
2274
|
+
copied: c,
|
2275
|
+
copy: h
|
2276
|
+
};
|
2277
|
+
}
|
2278
|
+
const en = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, tn = "__vueuse_ssr_handlers__";
|
2279
|
+
en[tn] = en[tn] || {};
|
2280
|
+
var nn;
|
2281
|
+
(function(t) {
|
2282
|
+
t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
|
2283
|
+
})(nn || (nn = {}));
|
2284
|
+
var al = Object.defineProperty, on = Object.getOwnPropertySymbols, rl = Object.prototype.hasOwnProperty, il = Object.prototype.propertyIsEnumerable, ln = (t, e, n) => e in t ? al(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, sl = (t, e) => {
|
2285
|
+
for (var n in e || (e = {}))
|
2286
|
+
rl.call(e, n) && ln(t, n, e[n]);
|
2287
|
+
if (on)
|
2288
|
+
for (var n of on(e))
|
2289
|
+
il.call(e, n) && ln(t, n, e[n]);
|
2290
|
+
return t;
|
2291
|
+
};
|
2292
|
+
const ul = {
|
2293
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
2294
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
2295
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
2296
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
2297
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
2298
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
2299
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
2300
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
2301
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
2302
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
2303
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
2304
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
2305
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
2306
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
2307
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
2308
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
2309
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
2310
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
2311
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
2312
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
2313
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
2314
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
2315
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
2316
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
2317
|
+
};
|
2318
|
+
sl({
|
2319
|
+
linear: Ko
|
2320
|
+
}, ul);
|
2321
|
+
function cl(t, e) {
|
2322
|
+
const n = G({}), o = rn({ ref: { getBoundingClientRect: () => n.value } }), l = Y(() => {
|
2323
|
+
var y;
|
2324
|
+
return (y = t.value) == null ? void 0 : y.getSelectionRows();
|
2325
|
+
}), a = un(), r = Y(() => !!a["pop-meta"]), i = Y(() => !!a["pop-search"]), s = Y(() => !!a["pop-field"]), u = Y(() => !!a["pop-index"]), c = Y(() => !!a["pop-cell"]), { copy: d } = ll();
|
2326
|
+
function p(y) {
|
2327
|
+
const { column: { type: m, property: D } } = y;
|
2328
|
+
if (m !== "default" || !D)
|
2329
|
+
return "m-table-core-cell";
|
2330
|
+
}
|
2331
|
+
function h(y) {
|
2332
|
+
var D;
|
2333
|
+
const m = (D = t.value) == null ? void 0 : D.getSelectionRows();
|
2334
|
+
return m != null && m.includes(y.row) ? m.length === 1 ? "m-table-current" : "m-table-highlight" : "";
|
2335
|
+
}
|
2336
|
+
const b = (y) => {
|
2337
|
+
var m;
|
2338
|
+
(m = t.value) == null || m.clearSelection(), e.data.forEach((D) => {
|
2339
|
+
y.includes(D.id) && t.value.toggleRowSelection(D);
|
2340
|
+
});
|
2341
|
+
};
|
2342
|
+
function _(y, m, D, I) {
|
2343
|
+
I.preventDefault(), I.stopPropagation();
|
2344
|
+
const { type: R, property: A } = m;
|
2345
|
+
R === "default" && !A || t.value.toggleRowSelection(y);
|
2346
|
+
}
|
2347
|
+
function C(y, m, D, I) {
|
2348
|
+
I.preventDefault(), I.stopPropagation();
|
2349
|
+
const { type: R, property: A } = m;
|
2350
|
+
if (!(R === "default" && !A))
|
2351
|
+
if (t.value.clearSelection(y), t.value.toggleRowSelection(y), R === "default" && A)
|
2352
|
+
if (c.value)
|
2353
|
+
F(I, "cell", { row: y, prop: A });
|
2354
|
+
else {
|
2355
|
+
const W = y[A], U = W instanceof Object ? JSON.stringify(W) : W;
|
2356
|
+
d(U).then((re) => Ye.info("单元格内容已复制"));
|
2357
|
+
}
|
2358
|
+
else
|
2359
|
+
R === "index" && u.value && F(I, "index", y, "right");
|
2360
|
+
}
|
2361
|
+
function F(y, m, D, I = "bottom") {
|
2362
|
+
const { clientX: R, clientY: A } = y;
|
2363
|
+
n.value = DOMRect.fromRect({ x: R, y: A }), o.visible = !0, o.type = m, o.data = D, o.placement = I;
|
2364
|
+
}
|
2365
|
+
let B = null;
|
2366
|
+
pt(() => [e.data, e.view], (y) => {
|
2367
|
+
if (!xe.isEmpty(e.view)) {
|
2368
|
+
const m = !e.view.allow_pop;
|
2369
|
+
w(m);
|
2370
|
+
}
|
2371
|
+
}, { deep: !0 });
|
2372
|
+
function w(y = !1) {
|
2373
|
+
B && B.destroy();
|
2374
|
+
const m = t.value.$el.querySelectorAll("tbody")[0];
|
2375
|
+
B = new v(m, {
|
2376
|
+
draggable: "tr.el-table__row",
|
2377
|
+
handle: ".m-table-current ",
|
2378
|
+
animation: 150,
|
2379
|
+
disabled: y,
|
2380
|
+
sort: !0,
|
2381
|
+
onEnd(D) {
|
2382
|
+
const { newIndex: I, oldIndex: R } = D, A = this.toArray(), W = A.splice(I, 1)[0];
|
2383
|
+
A.splice(R, 0, W), this.sort(A), Array.from(t.value.$el.querySelectorAll(".el-table__row")).forEach((U) => {
|
2384
|
+
U.classList.remove("hover-row");
|
2385
|
+
}), e.sortableCallback && e.sortableCallback(I, R);
|
2386
|
+
}
|
2387
|
+
});
|
2388
|
+
}
|
2389
|
+
return Xn(() => {
|
2390
|
+
B && B.destroy();
|
2391
|
+
}), {
|
2392
|
+
popover: o,
|
2393
|
+
selection: l,
|
2394
|
+
tableCellClassName: p,
|
2395
|
+
tableRowClassName: h,
|
2396
|
+
handleCellClick: _,
|
2397
|
+
handleCellContextMenu: C,
|
2398
|
+
showPopover: F,
|
2399
|
+
closePopover: () => o.visible = !1,
|
2400
|
+
setSelection: b,
|
2401
|
+
hasSearchSlot: i,
|
2402
|
+
hasFieldSlot: s,
|
2403
|
+
hasMetaViewSlot: r
|
2404
|
+
};
|
2405
|
+
}
|
2406
|
+
const dl = ["innerHTML"], xn = /* @__PURE__ */ ae({
|
2407
|
+
__name: "MTableButtons",
|
2408
|
+
props: {
|
2409
|
+
buttons: {},
|
2410
|
+
item: {}
|
2411
|
+
},
|
2412
|
+
emits: ["click", "width"],
|
2413
|
+
setup(t, { emit: e }) {
|
2414
|
+
const n = e, o = t, l = G(), a = Y(() => o.buttons.map(r));
|
2415
|
+
function r(u) {
|
2416
|
+
const c = xe.mapValues(u, (d, p) => p === "handler" ? d : d instanceof Function ? d(o.item) : d);
|
2417
|
+
return c.size = c.size || "small", c.type = c.type || "primary", c.link = c.link || !0, c.disabled = c.disabled || !c.handler, c;
|
2418
|
+
}
|
2419
|
+
dn(i);
|
2420
|
+
function i() {
|
2421
|
+
n("width", parseFloat(l.value.offsetWidth));
|
2422
|
+
}
|
2423
|
+
function s(u, c) {
|
2424
|
+
const d = u.handler;
|
2425
|
+
d && d(o.item, c);
|
2426
|
+
}
|
2427
|
+
return (u, c) => {
|
2428
|
+
const d = M("el-button");
|
2429
|
+
return P(), ce("div", {
|
2430
|
+
ref_key: "wrapper",
|
2431
|
+
ref: l,
|
2432
|
+
style: { display: "inline-flex" },
|
2433
|
+
onMouseover: i
|
2434
|
+
}, [
|
2435
|
+
(P(!0), ce(Oe, null, rt(a.value, (p) => (P(), q(d, kt({ ref_for: !0 }, { ...p }, {
|
2436
|
+
onClick: it((h) => s(p, h), ["prevent"])
|
2437
|
+
}), {
|
2438
|
+
default: k(() => [
|
2439
|
+
pe("strong", {
|
2440
|
+
innerHTML: p.title
|
2441
|
+
}, null, 8, dl)
|
2442
|
+
]),
|
2443
|
+
_: 2
|
2444
|
+
}, 1040, ["onClick"]))), 256))
|
2445
|
+
], 544);
|
2446
|
+
};
|
2447
|
+
}
|
2448
|
+
}), fl = {
|
2449
|
+
"element-loading-svg": "-",
|
2450
|
+
"element-loading-background": "rgba(0,0,0,.10)",
|
2451
|
+
"element-loading-custom-class": "m-table-loading"
|
2452
|
+
}, pl = { class: "justified m-table-outer m-table-header" }, ml = { class: "justified m-table-outer m-table-footer" }, hl = /* @__PURE__ */ ae({
|
2453
|
+
__name: "MTable",
|
2454
|
+
props: /* @__PURE__ */ sn({
|
2455
|
+
data: {},
|
2456
|
+
height: {},
|
2457
|
+
maxHeight: {},
|
2458
|
+
stripe: { type: Boolean },
|
2459
|
+
border: { type: Boolean },
|
2460
|
+
size: {},
|
2461
|
+
fit: { type: Boolean },
|
2462
|
+
showHeader: { type: Boolean },
|
2463
|
+
highlightCurrentRow: { type: Boolean },
|
2464
|
+
currentRowKey: {},
|
2465
|
+
rowClassName: { type: [Function, String] },
|
2466
|
+
rowStyle: { type: [Function, Object] },
|
2467
|
+
cellClassName: { type: [Function, String] },
|
2468
|
+
cellStyle: { type: [Function, Object] },
|
2469
|
+
headerRowClassName: { type: [Function, String] },
|
2470
|
+
headerRowStyle: { type: [Function, Object] },
|
2471
|
+
headerCellClassName: { type: [Function, String] },
|
2472
|
+
headerCellStyle: { type: [Function, Object] },
|
2473
|
+
rowKey: { type: [Function, String] },
|
2474
|
+
emptyText: {},
|
2475
|
+
defaultExpandAll: { type: Boolean },
|
2476
|
+
expandRowKeys: {},
|
2477
|
+
defaultSort: {},
|
2478
|
+
tooltipEffect: {},
|
2479
|
+
tooltipOptions: {},
|
2480
|
+
appendFilterPanelTo: {},
|
2481
|
+
showSummary: { type: Boolean },
|
2482
|
+
sumText: {},
|
2483
|
+
summaryMethod: { type: Function },
|
2484
|
+
spanMethod: { type: Function },
|
2485
|
+
selectOnIndeterminate: { type: Boolean },
|
2486
|
+
indent: {},
|
2487
|
+
lazy: { type: Boolean },
|
2488
|
+
load: { type: Function },
|
2489
|
+
treeProps: {},
|
2490
|
+
tableLayout: {},
|
2491
|
+
scrollbarAlwaysOn: { type: Boolean },
|
2492
|
+
showOverflowTooltip: { type: Boolean },
|
2493
|
+
flexible: { type: Boolean },
|
2494
|
+
scrollbarTabindex: {},
|
2495
|
+
allowDragLastColumn: { type: Boolean },
|
2496
|
+
tooltipFormatter: { type: Function },
|
2497
|
+
preserveExpandedContent: { type: Boolean },
|
2498
|
+
loading: { type: Boolean },
|
2499
|
+
view: {},
|
2500
|
+
buttons: {},
|
2501
|
+
columns: {},
|
2502
|
+
sortableCallback: { type: Function }
|
2503
|
+
}, _o),
|
2504
|
+
setup(t, { expose: e }) {
|
2505
|
+
const n = G();
|
2506
|
+
let o = t, l = G(0);
|
2507
|
+
function a(w) {
|
2508
|
+
l.value = w + 26;
|
2509
|
+
}
|
2510
|
+
const {
|
2511
|
+
popover: r,
|
2512
|
+
selection: i,
|
2513
|
+
tableRowClassName: s,
|
2514
|
+
tableCellClassName: u,
|
2515
|
+
handleCellClick: c,
|
2516
|
+
handleCellContextMenu: d,
|
2517
|
+
showPopover: p,
|
2518
|
+
setSelection: h,
|
2519
|
+
hasSearchSlot: b,
|
2520
|
+
hasFieldSlot: _,
|
2521
|
+
hasMetaViewSlot: C,
|
2522
|
+
closePopover: F
|
2523
|
+
} = cl(n, o);
|
2524
|
+
function B() {
|
2525
|
+
return i.value;
|
2526
|
+
}
|
2527
|
+
return e({ getSelection: B, setSelection: h, closePopover: F }), (w, y) => {
|
2528
|
+
const m = M("fa"), D = M("el-text"), I = M("el-table-column"), R = M("el-table"), A = M("el-popover"), W = xt("loading");
|
2529
|
+
return P(), ce(Oe, null, [
|
2530
|
+
Mt((P(), ce("div", fl, [
|
2531
|
+
pe("div", pl, [
|
2532
|
+
pe("div", null, [
|
2533
|
+
J(w.$slots, "header")
|
2534
|
+
]),
|
2535
|
+
pe("div", null, [
|
2536
|
+
J(w.$slots, "header-tool")
|
2537
|
+
])
|
2538
|
+
]),
|
2539
|
+
$(R, kt({
|
2540
|
+
ref_key: "table",
|
2541
|
+
ref: n
|
2542
|
+
}, { ...w.$props, ...w.$attrs }, {
|
2543
|
+
"tooltip-options": { placement: "bottom-end", popperClass: "m-table-tooltip", enterable: !1 },
|
2544
|
+
"row-class-name": O(s),
|
2545
|
+
"cell-class-name": O(u),
|
2546
|
+
onCellClick: O(c),
|
2547
|
+
onCellContextmenu: O(d)
|
2548
|
+
}), {
|
2549
|
+
default: k(() => {
|
2550
|
+
var U, re;
|
2551
|
+
return [
|
2552
|
+
$(I, {
|
2553
|
+
type: "index",
|
2554
|
+
align: "center",
|
2555
|
+
fixed: "left"
|
2556
|
+
}, {
|
2557
|
+
header: k(() => [
|
2558
|
+
$(m, {
|
2559
|
+
icon: "cubes",
|
2560
|
+
style: { cursor: "pointer" },
|
2561
|
+
onClick: y[0] || (y[0] = it((x) => O(C) && O(p)(x, "meta"), ["prevent"]))
|
2562
|
+
})
|
2563
|
+
]),
|
2564
|
+
default: k(({ $index: x, row: H }) => [
|
2565
|
+
$(D, {
|
2566
|
+
size: "small",
|
2567
|
+
type: O(i).includes(H) ? "primary" : "info",
|
2568
|
+
tag: O(i).includes(H) ? "b" : "span"
|
2569
|
+
}, {
|
2570
|
+
default: k(() => [
|
2571
|
+
me(we(x + 1), 1)
|
2572
|
+
]),
|
2573
|
+
_: 2
|
2574
|
+
}, 1032, ["type", "tag"])
|
2575
|
+
]),
|
2576
|
+
_: 1
|
2577
|
+
}),
|
2578
|
+
(P(!0), ce(Oe, null, rt(w.view.fields, (x, H) => (P(), q(I, {
|
2579
|
+
key: H,
|
2580
|
+
prop: H,
|
2581
|
+
label: x.label
|
2582
|
+
}, {
|
2583
|
+
header: k(() => [
|
2584
|
+
$(vn, {
|
2585
|
+
view: w.view,
|
2586
|
+
field: x,
|
2587
|
+
onSearch: (oe) => O(b) && O(p)(oe, "search", x),
|
2588
|
+
onMeta: (oe) => O(_) && O(p)(oe, "field", x)
|
2589
|
+
}, null, 8, ["view", "field", "onSearch", "onMeta"])
|
2590
|
+
]),
|
2591
|
+
default: k(({ row: oe }) => [
|
2592
|
+
J(w.$slots, "cell", {
|
2593
|
+
field: x,
|
2594
|
+
row: oe,
|
2595
|
+
prop: H
|
2596
|
+
}, () => [
|
2597
|
+
me(we(oe[H]), 1)
|
2598
|
+
])
|
2599
|
+
]),
|
2600
|
+
_: 2
|
2601
|
+
}, 1032, ["prop", "label"]))), 128)),
|
2602
|
+
(U = w.columns) != null && U.length ? (P(!0), ce(Oe, { key: 0 }, rt(w.columns, (x) => (P(), q(I, {
|
2603
|
+
"show-overflow-tooltip": !1,
|
2604
|
+
align: "center",
|
2605
|
+
fixed: "right",
|
2606
|
+
label: x.label,
|
2607
|
+
width: x.width || "auto"
|
2608
|
+
}, {
|
2609
|
+
default: k(({ row: H }) => [
|
2610
|
+
(P(), q(cn(x.component), { item: H }, null, 8, ["item"]))
|
2611
|
+
]),
|
2612
|
+
_: 2
|
2613
|
+
}, 1032, ["label", "width"]))), 256)) : se("", !0),
|
2614
|
+
(re = w.buttons) != null && re.length ? (P(), q(I, {
|
2615
|
+
key: 1,
|
2616
|
+
"show-overflow-tooltip": !1,
|
2617
|
+
width: O(l),
|
2618
|
+
align: "center",
|
2619
|
+
fixed: "right",
|
2620
|
+
label: "操作"
|
2621
|
+
}, {
|
2622
|
+
header: k(() => [
|
2623
|
+
$(m, { icon: "cogs" })
|
2624
|
+
]),
|
2625
|
+
default: k(({ row: x }) => [
|
2626
|
+
$(xn, {
|
2627
|
+
buttons: w.buttons,
|
2628
|
+
item: x,
|
2629
|
+
onWidth: a
|
2630
|
+
}, null, 8, ["buttons", "item"])
|
2631
|
+
]),
|
2632
|
+
_: 1
|
2633
|
+
}, 8, ["width"])) : se("", !0)
|
2634
|
+
];
|
2635
|
+
}),
|
2636
|
+
_: 3
|
2637
|
+
}, 16, ["row-class-name", "cell-class-name", "onCellClick", "onCellContextmenu"]),
|
2638
|
+
pe("div", ml, [
|
2639
|
+
pe("div", null, [
|
2640
|
+
J(w.$slots, "footer")
|
2641
|
+
]),
|
2642
|
+
pe("div", null, [
|
2643
|
+
J(w.$slots, "footer-tool")
|
2644
|
+
])
|
2645
|
+
])
|
2646
|
+
])), [
|
2647
|
+
[W, w.loading || O(r).visible]
|
2648
|
+
]),
|
2649
|
+
$(A, {
|
2650
|
+
visible: O(r).visible,
|
2651
|
+
"onUpdate:visible": y[1] || (y[1] = (U) => O(r).visible = U),
|
2652
|
+
"virtual-ref": O(r).ref,
|
2653
|
+
trigger: "click",
|
2654
|
+
placement: O(r).placement,
|
2655
|
+
"virtual-triggering": "",
|
2656
|
+
teleported: "",
|
2657
|
+
width: "auto"
|
2658
|
+
}, {
|
2659
|
+
default: k(() => [
|
2660
|
+
O(r).type === "meta" ? J(w.$slots, "pop-meta", {
|
2661
|
+
key: 0,
|
2662
|
+
view: w.view
|
2663
|
+
}) : se("", !0),
|
2664
|
+
O(r).type === "search" ? J(w.$slots, "pop-search", {
|
2665
|
+
key: 1,
|
2666
|
+
field: O(r).data
|
2667
|
+
}) : se("", !0),
|
2668
|
+
O(r).type === "field" ? J(w.$slots, "pop-field", {
|
2669
|
+
key: 2,
|
2670
|
+
field: O(r).data
|
2671
|
+
}) : se("", !0),
|
2672
|
+
O(r).type === "cell" ? J(w.$slots, "pop-cell", {
|
2673
|
+
key: 3,
|
2674
|
+
data: O(r).data.row,
|
2675
|
+
prop: O(r).data.prop
|
2676
|
+
}) : se("", !0),
|
2677
|
+
O(r).type === "index" ? J(w.$slots, "pop-index", {
|
2678
|
+
key: 4,
|
2679
|
+
row: O(r).data
|
2680
|
+
}) : se("", !0)
|
2681
|
+
]),
|
2682
|
+
_: 3
|
2683
|
+
}, 8, ["visible", "virtual-ref", "placement"])
|
2684
|
+
], 64);
|
2685
|
+
};
|
2686
|
+
}
|
2687
|
+
});
|
2688
|
+
function gl(t) {
|
2689
|
+
const { getRequest: e } = mn(t), n = e(), o = hn({ baseURL: t }), { sockets: l } = o, { channels: a, status: r, open: i } = l;
|
2690
|
+
function s(u, c, d = !1, p) {
|
2691
|
+
a[u] = c;
|
2692
|
+
const h = e(d);
|
2693
|
+
return p = p || `socket/${u}`, (b) => h.post(p, b);
|
2694
|
+
}
|
539
2695
|
return {
|
540
|
-
http:
|
2696
|
+
http: n,
|
2697
|
+
open: i,
|
2698
|
+
status: r,
|
2699
|
+
register: s
|
541
2700
|
};
|
542
2701
|
}
|
543
|
-
|
544
|
-
const
|
545
|
-
const
|
546
|
-
return
|
2702
|
+
jn.add(Wn);
|
2703
|
+
const vl = (t) => {
|
2704
|
+
const e = hn(t || {}), { baseURL: n } = t || { baseURL: "/api/", minioURL: "/dfs/" };
|
2705
|
+
return gl(n), {
|
547
2706
|
install: (o) => {
|
548
|
-
o.provide("options",
|
549
|
-
locale:
|
550
|
-
}), o.component("fa",
|
2707
|
+
o.provide("options", t), o.provide("channel", e), o.component("MDialog", uo), o.component("MCell", Eo), o.component("MTable", hl), o.component("MTableButtons", xn), o.component("MTableHeader", vn), o.use(an, {
|
2708
|
+
locale: gn
|
2709
|
+
}), o.component("fa", zn);
|
551
2710
|
}
|
552
2711
|
};
|
553
|
-
},
|
554
|
-
install: (
|
555
|
-
|
556
|
-
locale:
|
557
|
-
}),
|
2712
|
+
}, Al = {
|
2713
|
+
install: (t, e) => {
|
2714
|
+
t.use(an, {
|
2715
|
+
locale: gn
|
2716
|
+
}), vl(e).install(t);
|
558
2717
|
}
|
559
2718
|
};
|
560
2719
|
export {
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
2720
|
+
Bl as $alert,
|
2721
|
+
hn as $channel,
|
2722
|
+
Il as $confirm,
|
2723
|
+
Ye as $message,
|
2724
|
+
kl as ElementPlus,
|
2725
|
+
Eo as MCell,
|
2726
|
+
uo as MDialog,
|
2727
|
+
hl as MTable,
|
2728
|
+
xn as MTableButtons,
|
2729
|
+
vn as MTableHeader,
|
2730
|
+
vl as createMorghulis,
|
2731
|
+
Al as default,
|
2732
|
+
fn as useMorghulisAuthorize,
|
2733
|
+
gl as useMorghulisChannel,
|
2734
|
+
Gn as useMorghulisCookies,
|
2735
|
+
mn as useMorghulisRequest
|
572
2736
|
};
|
573
2737
|
//# sourceMappingURL=morghulis.es.js.map
|