magtool 1.4.2 → 1.5.0

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.
@@ -0,0 +1,4302 @@
1
+ import { createElementBlock as M, openBlock as p, normalizeStyle as se, unref as t, createCommentVNode as B, createElementVNode as c, normalizeClass as G, renderSlot as H, toDisplayString as I, createVNode as N, markRaw as ve, resolveComponent as D, mergeProps as K, withCtx as _, resolveDirective as _e, withDirectives as be, createBlock as Y, withKeys as ye, createSlots as ee, Fragment as oe, renderList as le, createTextVNode as te, defineComponent as we, reactive as $e, onBeforeMount as Se, withModifiers as ie, resolveDynamicComponent as Ce, nextTick as pe } from "vue";
2
+ import { _ as ae } from "./vendor.js";
3
+ import { dayjs as ke, ElDatePicker as xe } from "element-plus";
4
+ import { u as Ve } from "./composition.js";
5
+ import me from "vuedraggable";
6
+ const Te = { class: "fw700" }, Oe = /* @__PURE__ */ Object.assign({
7
+ name: "MvcCard"
8
+ }, {
9
+ __name: "index",
10
+ props: {
11
+ title: {
12
+ type: String,
13
+ default: ""
14
+ },
15
+ noheader: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ nobg: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
23
+ headerClass: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ bodyClass: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ bodyStyle: {
32
+ type: String,
33
+ default: ""
34
+ },
35
+ footerClass: {
36
+ type: String,
37
+ default: ""
38
+ },
39
+ color: {
40
+ type: String,
41
+ default: "",
42
+ validate: (A) => ["primary", "green", "red", "purple", "orange", "blue"].indexOf(A) > -1
43
+ },
44
+ headerHide: {
45
+ type: Boolean,
46
+ default: !1
47
+ }
48
+ },
49
+ setup(A) {
50
+ const x = A, { proxy: s } = getCurrentInstance(), e = () => {
51
+ o.toggle = !o.toggle;
52
+ };
53
+ onMounted(() => {
54
+ o.toggle = x.headerHide;
55
+ });
56
+ const o = reactive({
57
+ toggle: !1
58
+ });
59
+ return (h, a) => (p(), M("div", {
60
+ class: "MvcCard",
61
+ style: se(t(o).cardStyle)
62
+ }, [
63
+ x.noheader ? B("", !0) : (p(), M("div", {
64
+ key: 0,
65
+ ref: "header",
66
+ class: G(["cardHeader flexMode vc fs18 txt-dark9", x.headerClass])
67
+ }, [
68
+ c("i", {
69
+ class: G(["mr4 block imicon im-arrow-right fw700 fs14 transition3 hover", !t(o).toggle && "rotateZ90"]),
70
+ onClick: e
71
+ }, null, 2),
72
+ c("div", Te, I(h.$l(x.title)), 1),
73
+ H(h.$slots, "header", {}, void 0, !0)
74
+ ], 2)),
75
+ c("div", {
76
+ class: G(["cardArea transition3", [x.nobg && "nobg", t(o).toggle && "miniArea"]])
77
+ }, [
78
+ c("div", {
79
+ class: G(["cardBody relative nobar", x.bodyClass]),
80
+ style: se(x.bodyStyle)
81
+ }, [
82
+ H(h.$slots, "default", {}, void 0, !0)
83
+ ], 6),
84
+ h.$slots.footer ? (p(), M("div", {
85
+ key: 0,
86
+ class: G(["cardFooter", x.footerClass])
87
+ }, [
88
+ H(h.$slots, "footer", {}, void 0, !0)
89
+ ], 2)) : B("", !0)
90
+ ], 2)
91
+ ], 4));
92
+ }
93
+ }), Me = /* @__PURE__ */ ae(Oe, [["__scopeId", "data-v-d54f1970"]]), Ae = { class: "SuperDatePicker" }, De = /* @__PURE__ */ Object.assign({
94
+ name: "SuperDatePicker"
95
+ }, {
96
+ __name: "index",
97
+ props: {
98
+ source: {
99
+ type: String,
100
+ default: ""
101
+ },
102
+ modelValue: {
103
+ type: [String, Array],
104
+ default: () => []
105
+ },
106
+ withToday: {
107
+ type: Boolean,
108
+ default: !1
109
+ },
110
+ defaultDate: {
111
+ type: Array,
112
+ default: () => [-7, -1]
113
+ },
114
+ // 开始,结束的分割符号,也是v-model str时的分割符号
115
+ separator: {
116
+ type: String,
117
+ default: "~"
118
+ },
119
+ offset: {
120
+ type: [String, Number],
121
+ default: 0
122
+ },
123
+ range: {
124
+ type: [String, Number],
125
+ default: 180
126
+ },
127
+ limit: {
128
+ type: [String, Number],
129
+ default: 30
130
+ },
131
+ // today, yersterday, thisweek, last7days, thismonth, last30days, lastmonth
132
+ shortcuts: {
133
+ type: [Object, Boolean],
134
+ default: !1
135
+ },
136
+ placement: {
137
+ type: String,
138
+ default: "bottom"
139
+ },
140
+ disabled: {
141
+ type: Boolean,
142
+ default: !1
143
+ },
144
+ size: {
145
+ type: String,
146
+ default: "large"
147
+ }
148
+ },
149
+ emits: ["change", "update:modelValue"],
150
+ setup(A, { expose: x, emit: s }) {
151
+ ke.en.weekStart = 7;
152
+ const e = A, o = reactive({
153
+ type: "",
154
+ date: [],
155
+ shortBtn: [],
156
+ firstStamp: 0
157
+ });
158
+ onMounted(() => {
159
+ if (!g.value.length) {
160
+ const l = e.defaultDate[0], n = e.defaultDate[1];
161
+ o.date = [
162
+ window.$m().add(l, "days").format("YYYY-MM-DD"),
163
+ window.$m().add(n, "days").format("YYYY-MM-DD")
164
+ ], k(o.date);
165
+ }
166
+ V();
167
+ });
168
+ const h = s, a = (l) => {
169
+ let { limit: n, range: S } = e;
170
+ n = Number(n), S = Number(S);
171
+ const { firstStamp: L } = o, R = n * 864e5;
172
+ let U = +window.$m().add(-S, "d"), Z = +window.$m();
173
+ if (e.source === "report" && !L)
174
+ return l > Z;
175
+ if (L) {
176
+ if (e.source !== "report") {
177
+ let P = L - R;
178
+ P > U && (U = P);
179
+ } else
180
+ U = L - R;
181
+ let W = L + R;
182
+ W < Z && (Z = W);
183
+ }
184
+ return l < U || l > Z;
185
+ }, y = (l) => {
186
+ l[1] === null ? o.firstStamp = +l[0] : o.firstStamp = 0;
187
+ }, k = (l) => {
188
+ const n = d(l);
189
+ h("change", n, "cpt");
190
+ }, V = () => {
191
+ const { shortcuts: l } = e;
192
+ let n = {};
193
+ if (l === !1)
194
+ o.shortBtn = [];
195
+ else {
196
+ l === !0 ? n = T : n = {
197
+ ...T,
198
+ ...l
199
+ };
200
+ const S = [];
201
+ n.today && S.push(O()), n.yesterday && S.push(b()), n.thisweek && S.push(f()), n.last7days && S.push(r()), n.todaylast7days && S.push(C()), n.thismonth && S.push(u()), n.last30days && S.push(m()), n.lastmonth && S.push($()), o.shortBtn = S;
202
+ }
203
+ }, O = () => ({
204
+ text: window.$l("Today"),
205
+ value: () => {
206
+ const l = window.$m().format("YYYY-MM-DD");
207
+ return [l, l];
208
+ },
209
+ onClick: (l) => {
210
+ }
211
+ }), b = () => ({
212
+ text: window.$l("Yesterday"),
213
+ value: () => {
214
+ const l = window.$m().add(-1, "days").format("YYYY-MM-DD");
215
+ return [l, l];
216
+ },
217
+ onClick: (l) => {
218
+ }
219
+ }), f = () => ({
220
+ text: window.$l("This Week"),
221
+ value: () => {
222
+ let l = 0, n = window.$m().weekday(0), S = window.$m().add(l, "days");
223
+ return +n > +S && (n = n.format("YYYY-MM-DD"), S = n), [n, S];
224
+ },
225
+ onClick: (l) => {
226
+ }
227
+ }), r = () => ({
228
+ text: window.$l("Last 7 Days"),
229
+ value: () => {
230
+ let l = -7, n = -1;
231
+ return e.widthToday && (l += 1, n += 1), [
232
+ window.$m().add(l, "days").format("YYYY-MM-DD"),
233
+ window.$m().add(n, "days").format("YYYY-MM-DD")
234
+ ];
235
+ },
236
+ onClick: (l) => {
237
+ }
238
+ }), C = () => ({
239
+ text: window.$l("Last 7 Days (with Today)"),
240
+ value: () => [
241
+ window.$m().add(-6, "days").format("YYYY-MM-DD"),
242
+ window.$m().add(0, "days").format("YYYY-MM-DD")
243
+ ],
244
+ onClick: (l) => {
245
+ }
246
+ }), u = () => ({
247
+ text: window.$l("This Month"),
248
+ value: () => {
249
+ let l = 0, n = window.$m().date(1), S = window.$m().add(l, "days");
250
+ return +n > +S && (n = n.format("YYYY-MM-DD"), S = n), [n, S];
251
+ },
252
+ onClick: (l) => {
253
+ }
254
+ }), m = () => ({
255
+ text: window.$l("Last 30 Days"),
256
+ value: () => {
257
+ let l = -30, n = -1;
258
+ return e.widthToday && (l += 1, n += 1), [
259
+ window.$m().add(l, "days").format("YYYY-MM-DD"),
260
+ window.$m().add(n, "days").format("YYYY-MM-DD")
261
+ ];
262
+ },
263
+ onClick: (l) => {
264
+ }
265
+ }), $ = () => ({
266
+ text: window.$l("Last Month"),
267
+ value: () => [
268
+ window.$m().date(1).add(-1, "days").date(1).format("YYYY-MM-DD"),
269
+ window.$m().date(1).add(-1, "days").format("YYYY-MM-DD")
270
+ ],
271
+ onClick: (l) => {
272
+ }
273
+ }), d = (l, n = !1) => {
274
+ n && (o.date = l);
275
+ let S;
276
+ return w.value === "Array" ? S = l : w.value === "Object" ? S = {
277
+ startDate: l[0],
278
+ endDate: l[1]
279
+ } : S = l[0] + e.separator + l[1], h("update:modelValue", S), S;
280
+ }, i = computed(() => window.$getLang()), w = computed(() => window.$getType(e.modelValue)), g = computed(() => w.value === "Array" ? e.modelValue : w.value === "Object" ? [e.modelValue.startDate, e.modelValue.endDate] : e.modelValue ? e.modelValue.split(e.separator) : []), z = computed(() => ({
281
+ start: window.$l("Start Date"),
282
+ end: window.$l("End Date")
283
+ }));
284
+ computed(() => {
285
+ let { disabledDate: l, offset: n } = e, S = 0;
286
+ n = Number(n) || 0;
287
+ const L = window.$getType(l);
288
+ return L !== "Function" && L !== "Array" && (S = parseInt(l) || 0, S > -1 && (S = -1), S > n && (S = n)), S;
289
+ });
290
+ const T = {
291
+ today: !0,
292
+ yesterday: !0,
293
+ thisweek: !1,
294
+ last7days: !0,
295
+ todaylast7days: !1,
296
+ thismonth: !0,
297
+ last30days: !0,
298
+ lastmonth: !0
299
+ };
300
+ return watch(
301
+ () => g.value,
302
+ (l, n) => {
303
+ l.length && JSON.stringify(l) !== JSON.stringify(o.date) && (o.date = l, k(l));
304
+ }
305
+ ), x({
306
+ setDate: d
307
+ }), (l, n) => (p(), M("div", Ae, [
308
+ N(t(xe), {
309
+ modelValue: t(o).date,
310
+ "onUpdate:modelValue": n[0] || (n[0] = (S) => t(o).date = S),
311
+ class: "wp100",
312
+ "popper-class": t(i),
313
+ type: "daterange",
314
+ "value-format": "YYYY-MM-DD",
315
+ editable: !1,
316
+ size: e.size,
317
+ clearable: !1,
318
+ "range-separator": e.separator,
319
+ shortcuts: t(o).shortBtn,
320
+ "end-placeholder": l.$l(t(z).end),
321
+ "start-placeholder": l.$l(t(z).start),
322
+ "disabled-date": a,
323
+ placement: e.placement,
324
+ disabled: e.disabled,
325
+ source: e.source,
326
+ onChange: k,
327
+ onCalendarChange: y
328
+ }, null, 8, ["modelValue", "popper-class", "size", "range-separator", "shortcuts", "end-placeholder", "start-placeholder", "placement", "disabled", "source"])
329
+ ]));
330
+ }
331
+ }), Ie = { class: "EChart" }, Ne = ["id"], ze = /* @__PURE__ */ Object.assign({
332
+ name: "EChart"
333
+ }, {
334
+ __name: "index",
335
+ props: {
336
+ options: {
337
+ type: Object,
338
+ default: () => {
339
+ }
340
+ },
341
+ type: {
342
+ type: String,
343
+ default: ""
344
+ },
345
+ height: {
346
+ type: [String, Number],
347
+ default: "300"
348
+ },
349
+ width: {
350
+ type: [String, Number],
351
+ default: ""
352
+ },
353
+ minusWidth: {
354
+ type: String,
355
+ default: ""
356
+ },
357
+ theme: {
358
+ type: String,
359
+ default: "light"
360
+ }
361
+ // tool: {
362
+ // type: Boolean,
363
+ // default: false,
364
+ // },
365
+ },
366
+ setup(A, { expose: x, emit: s }) {
367
+ const e = A, { proxy: o } = getCurrentInstance();
368
+ inject("store").launch();
369
+ const a = reactive({
370
+ chart: {},
371
+ chartID: "",
372
+ defaultOptions: {
373
+ grid: {
374
+ top: 20,
375
+ left: 50,
376
+ right: 20,
377
+ bottom: 72
378
+ },
379
+ legend: {
380
+ id: "bar",
381
+ itemWidth: 18,
382
+ bottom: 14,
383
+ textStyle: {
384
+ color: "#4d4d4d"
385
+ }
386
+ },
387
+ color: window.global.config.color,
388
+ xAxis: {
389
+ animationEasing: "cubicInOut",
390
+ animationDuration: 300,
391
+ axisLine: {
392
+ show: !1
393
+ },
394
+ axisTick: {
395
+ show: !1
396
+ }
397
+ },
398
+ yAxis: {
399
+ animationEasing: "cubicInOut",
400
+ animationDuration: 300,
401
+ splitLine: {
402
+ lineStyle: {
403
+ type: "dotted"
404
+ }
405
+ }
406
+ },
407
+ tooltip: {
408
+ show: !0,
409
+ trigger: "axis",
410
+ padding: [8, 16],
411
+ borderWidth: 0
412
+ },
413
+ mounted: !1
414
+ },
415
+ options: {},
416
+ chartType: ""
417
+ });
418
+ onBeforeMount(() => {
419
+ a.chartID = `chart${+/* @__PURE__ */ new Date()}${parseInt(Math.random() * 1e4)}`;
420
+ }), onMounted(() => {
421
+ a.mounted = !0, a.chart = ve(
422
+ window.$echarts.init(o.$refs.chart, { renderer: "svg" })
423
+ );
424
+ });
425
+ const y = s, k = async () => {
426
+ V();
427
+ }, V = () => {
428
+ nextTick(() => {
429
+ var d;
430
+ a.optioning = !0, a.chart.clear();
431
+ let m = window.$deepClone(e.options);
432
+ ["pie", "radar", "scatter"].indexOf(e.type) > -1 ? (m = {
433
+ color: a.defaultOptions.color,
434
+ animationEasing: "cubicInOut",
435
+ animationDuration: 500,
436
+ ...m
437
+ }, m.tooltip ? (m.tooltip.textStyle ? m.tooltip.textStyle.fontFamily = "Monaco" : m.tooltip.textStyle = {
438
+ fontFamily: "Monaco"
439
+ }, m.tooltip = {
440
+ ...m.tooltip,
441
+ ...u[e.theme]
442
+ }) : m.tooltip = {
443
+ textStyle: {
444
+ fontFamily: "Monaco"
445
+ },
446
+ ...u[e.theme]
447
+ }) : e.type === "map" || (e.tool === !0 && (a.defaultOptions.toolbox = {
448
+ show: !0,
449
+ right: 24,
450
+ emphasis: {
451
+ iconStyle: {
452
+ color: window.global.config.color[0]
453
+ }
454
+ },
455
+ feature: {
456
+ // myRestore: {
457
+ // show: true,
458
+ // title: '',
459
+ // icon: 'path://M486.464 83.584a424.96 424.96 0 0 0-276.928 102.336 48.256 48.256 0 0 0-6.4 6.528l-6.4-6.016-34.24-31.04-10.88-9.152-22.912-20.736-4.928-3.968c-4.864-3.52-7.68-3.84-9.536 0.384l-0.96 3.072-1.152 6.784-0.896 9.472-1.92 36.864-11.392 165.888-0.512 15.616-1.408 27.776 0.128 7.168c0.64 7.936 3.2 11.008 10.368 11.2l3.904-0.128 7.872-1.088 38.272-7.232 160.896-34.56 39.68-7.232 6.912-1.728c6.4-1.92 8.192-4.224 5.696-8.512l-1.984-2.752-4.928-5.248-88.512-80.384 10.56-8.576a328.768 328.768 0 0 1 201.6-68.736c183.616 0 332.608 150.4 332.608 336 0 185.664-148.992 336-332.608 336a331.52 331.52 0 0 1-282.56-158.656 48 48 0 1 0-81.728 50.368 427.52 427.52 0 0 0 364.288 204.288c236.8 0 428.608-193.472 428.608-432 0-238.464-191.808-432-428.608-432z',
460
+ // onclick: () => {
461
+ // state.chart.clear();
462
+ // state.chart.setOption(state.options);
463
+ // },
464
+ // },
465
+ // myLine: {
466
+ // show: true,
467
+ // icon: 'lineChart',
468
+ // onclick: ()=>{}
469
+ // },
470
+ // magicType: {
471
+ // title: {
472
+ // line: '',
473
+ // bar: '',
474
+ // },
475
+ // type: ['line', 'bar'],
476
+ // options: {
477
+ // line: {
478
+ // onclick: () => {
479
+ // state.chartType = 'line';
480
+ // console.info('line click');
481
+ // },
482
+ // },
483
+ // },
484
+ // },
485
+ }
486
+ }), a.defaultOptions.tooltip = {
487
+ ...a.defaultOptions.tooltip,
488
+ ...u[e.theme]
489
+ }, m = O(a.defaultOptions, m)), (d = m.series) == null || d.forEach((i) => {
490
+ i.animation = !0, i.animationDuration = 300, i.type === "line" ? (i.animationEasing = "cubicInOut", i.animationDelay = (w) => w * 100) : (i.animationEasing = "cubicInOut", i.animationDelay = (w) => w * 100);
491
+ }), a.options = m, a.chart.setOption(m), e.type === "wordcloud" && a.chart.on("click", (...i) => {
492
+ y("chart-click", i);
493
+ }), a.optioning = !1;
494
+ });
495
+ }, O = (m, $) => {
496
+ const { yAxis: d } = $, { yAxis: i } = m;
497
+ let w;
498
+ window.$getType(d) === "Array" ? w = d.map((T) => ({
499
+ ...i,
500
+ ...T
501
+ })) : w = {
502
+ ...i,
503
+ ...d
504
+ };
505
+ const g = { ...$, ...m };
506
+ return Object.keys(g).forEach((T) => {
507
+ const l = window.$getType(g[T]);
508
+ if (l === "Array") {
509
+ const n = m[T] || [], S = $[T] || [];
510
+ g[T] = n.length && !S.length ? n : S;
511
+ } else if (l === "Object") {
512
+ const n = m[T] || {}, S = $[T] || {};
513
+ g[T] = { ...n, ...S };
514
+ }
515
+ }), w && (g.yAxis = w), g;
516
+ }, b = () => a.chart, f = computed(() => window.global.config.options.cardWidth), r = computed(() => {
517
+ const m = window.$getType(e.width), $ = Number(e.height);
518
+ let d = e.width;
519
+ return d ? m === "String" && (d.indexOf("%") > -1 ? d = parseInt(parseInt(d) * f.value / 100) : d = Number(d)) : d = f.value, {
520
+ height: $ + "px",
521
+ width: d + "px"
522
+ };
523
+ }), C = computed(() => a.mounted && e.options && Object.keys(e.options).length ? +/* @__PURE__ */ new Date() : !1);
524
+ watch(
525
+ () => C.value,
526
+ (m) => {
527
+ var $;
528
+ m && ($ = e.options.series) != null && $.length && V();
529
+ },
530
+ {
531
+ immediate: !0,
532
+ deep: !0
533
+ }
534
+ ), watch(
535
+ () => e.width,
536
+ (m) => {
537
+ m && a.chart && a.optioning === !1 && a.chart.resize({
538
+ width: m,
539
+ height: e.height
540
+ });
541
+ }
542
+ ), x({
543
+ getChart: b,
544
+ initChart: k
545
+ });
546
+ const u = {
547
+ dark: {
548
+ className: "echart-tooltip",
549
+ extraCssText: "backdrop-filter: blur(8px)",
550
+ animation: !1,
551
+ appendToBody: !0,
552
+ hideDelay: 0,
553
+ transitionDuration: 0,
554
+ backgroundColor: "rgba(50, 50, 50, 0.9)",
555
+ textStyle: {
556
+ color: "rgba(255, 255, 255, 0.9)",
557
+ fontSize: 12,
558
+ fontFamily: "Monaco"
559
+ },
560
+ axisPointer: {
561
+ type: "shadow",
562
+ label: {
563
+ padding: [4, 8],
564
+ color: "rgba(46, 38, 61, 0.5)",
565
+ backgroundColor: "rgba(240, 240, 240, 0.9)"
566
+ },
567
+ lineStyle: {
568
+ color: "rgba(46, 38, 61, 0.2)"
569
+ },
570
+ crossStyle: {
571
+ color: "rgba(46, 38, 61, 0.2)"
572
+ }
573
+ }
574
+ },
575
+ light: {
576
+ className: "echart-tooltip",
577
+ extraCssText: "backdrop-filter: blur(8px)",
578
+ backgroundColor: "rgba(255, 255, 255, 0.9)",
579
+ animation: !1,
580
+ appendToBody: !0,
581
+ hideDelay: 0,
582
+ transitionDuration: 0,
583
+ textStyle: {
584
+ color: "rgba(46, 38, 61, 0.9)",
585
+ fontSize: 14,
586
+ fontFamily: "Monaco"
587
+ },
588
+ axisPointer: {
589
+ type: "shadow",
590
+ label: {
591
+ padding: [4, 8],
592
+ color: "rgba(46, 38, 61, 0.5)",
593
+ backgroundColor: "rgba(240, 240, 240, 0.9)"
594
+ },
595
+ lineStyle: {
596
+ color: "rgba(46, 38, 61, 0.2)"
597
+ },
598
+ crossStyle: {
599
+ color: "rgba(46, 38, 61, 0.2)"
600
+ }
601
+ }
602
+ // position: (pos, params, dom, rect, size) => {
603
+ // // 鼠标在左侧时 tooltip 显示到右侧,鼠标在右侧时 tooltip 显示到左侧。
604
+ // let left = pos[0] + 24;
605
+ // if (size.viewSize[0] < size.contentSize[0]) {
606
+ // left = size.contentSize[0];
607
+ // } else if (pos[0] > size.viewSize[0] - size.contentSize[0]) {
608
+ // left = pos[0] - size.contentSize[0];
609
+ // }
610
+ // // obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
611
+ // return [left, pos[1] + 24];
612
+ // },
613
+ }
614
+ };
615
+ return (m, $) => (p(), M("div", Ie, [
616
+ c("div", {
617
+ ref: "chart",
618
+ style: se(t(r)),
619
+ id: t(a).chartID
620
+ }, null, 12, Ne)
621
+ ]));
622
+ }
623
+ }), je = /* @__PURE__ */ ae(ze, [["__scopeId", "data-v-2dc454ed"]]), Be = {
624
+ class: "MvcIcon",
625
+ "aria-hidden": "true"
626
+ }, Ye = ["xlink:href"], Ee = /* @__PURE__ */ Object.assign({
627
+ name: "MvcIcon"
628
+ }, {
629
+ __name: "index",
630
+ props: {
631
+ name: {
632
+ type: String,
633
+ default: "cloud"
634
+ }
635
+ },
636
+ setup(A) {
637
+ return (x, s) => (p(), M("svg", Be, [
638
+ c("use", {
639
+ "xlink:href": `#imc-${A.name}`
640
+ }, null, 8, Ye)
641
+ ]));
642
+ }
643
+ }), Le = { class: "SuperImage" }, Re = { class: "flexMode hc vc hp100 bg-gray1 radius4" }, Pe = { class: "fs10-i lh1" }, Fe = /* @__PURE__ */ Object.assign({
644
+ name: "SuperImage"
645
+ }, {
646
+ __name: "index",
647
+ props: {
648
+ imageClass: {
649
+ type: String,
650
+ default: ""
651
+ },
652
+ type: {
653
+ type: String,
654
+ default: "icon"
655
+ }
656
+ },
657
+ setup(A, { emit: x }) {
658
+ const s = A, e = reactive({
659
+ style: {},
660
+ diyClass: "hp100"
661
+ }), { proxy: o } = getCurrentInstance();
662
+ onMounted(() => {
663
+ a();
664
+ });
665
+ const h = x, a = async () => {
666
+ const y = await window.$loadImage(o.$attrs.src);
667
+ if (!y)
668
+ return;
669
+ const { height: k, width: V } = y;
670
+ k < V && (e.diyClass = ""), h("load", V, k);
671
+ };
672
+ return (y, k) => {
673
+ const V = D("el-image");
674
+ return p(), M("div", Le, [
675
+ N(V, K({
676
+ "min-scale": 0.9,
677
+ "max-scale": 1.8,
678
+ "zoom-rate": 1.1
679
+ }, y.$attrs, {
680
+ class: [t(e).diyClass, s.imageClass],
681
+ style: t(e).style
682
+ }), {
683
+ placeholder: _(() => k[0] || (k[0] = [
684
+ c("i", { class: "imicon im-loading ani-rotate" }, null, -1)
685
+ ])),
686
+ error: _(() => [
687
+ c("div", Re, [
688
+ c("span", Pe, I(y.$l("Fail")), 1)
689
+ ])
690
+ ]),
691
+ _: 1
692
+ }, 16, ["class", "style"])
693
+ ]);
694
+ };
695
+ }
696
+ }), Ue = { class: "SuperInput" }, Ge = /* @__PURE__ */ Object.assign({
697
+ name: "SuperInput"
698
+ }, {
699
+ __name: "index",
700
+ props: {
701
+ modelValue: {
702
+ type: String,
703
+ default: ""
704
+ },
705
+ placeholder: {
706
+ type: String,
707
+ default: ""
708
+ },
709
+ icon: {
710
+ type: String,
711
+ default: ""
712
+ },
713
+ nobreak: {
714
+ type: Boolean,
715
+ default: !1
716
+ },
717
+ focus: {
718
+ type: Boolean,
719
+ default: !1
720
+ },
721
+ center: {
722
+ type: Boolean,
723
+ default: !1
724
+ }
725
+ },
726
+ emits: ["change", "enter", "update:modelValue"],
727
+ setup(A, { expose: x, emit: s }) {
728
+ const e = A, o = reactive({
729
+ composition: !1,
730
+ v: ""
731
+ }), { proxy: h } = getCurrentInstance(), a = s, y = () => {
732
+ o.composition = !0;
733
+ }, k = () => {
734
+ o.composition = !1;
735
+ }, V = () => {
736
+ o.composition || (a("update:modelValue", o.v), nextTick(() => {
737
+ a("enter", o.v);
738
+ }));
739
+ }, O = () => {
740
+ if (e.nobreak) {
741
+ const u = window.event || arguments[0];
742
+ if (u.key === "Enter" || u.code === "Enter" || u.keyCode === 13)
743
+ return u.returnValue = !1, !1;
744
+ }
745
+ }, b = (u) => {
746
+ e.nobreak ? a("update:modelValue", u.replace(/\n/g, "")) : a("update:modelValue", u), a("change", u);
747
+ }, f = (u) => {
748
+ nextTick(() => {
749
+ h.$refs.input.focus(), u && h.$refs.input.select();
750
+ });
751
+ }, r = computed(() => h.$slots), C = computed(() => e.placeholder ? window.$l(e.placeholder) : " ");
752
+ return watch(
753
+ () => e.modelValue,
754
+ (u) => {
755
+ u !== void 0 && u !== o.v && (o.v = u);
756
+ },
757
+ {
758
+ immediate: !0
759
+ }
760
+ ), x({
761
+ focus: f
762
+ }), (u, m) => {
763
+ const $ = D("el-input"), d = _e("focus");
764
+ return p(), M("div", Ue, [
765
+ be((p(), Y($, K({
766
+ ref: "input",
767
+ modelValue: t(o).v,
768
+ "onUpdate:modelValue": m[0] || (m[0] = (i) => t(o).v = i),
769
+ type: e.nobreak ? "textarea" : "text",
770
+ resize: "none",
771
+ clearable: "",
772
+ "input-style": e.center ? "text-align: center" : ""
773
+ }, u.$attrs, {
774
+ placeholder: t(C),
775
+ onChange: b,
776
+ onCompositionstart: y,
777
+ onCompositionend: k,
778
+ onKeydown: [
779
+ ye(V, ["enter"]),
780
+ ye(O, ["enter", "native"])
781
+ ],
782
+ class: "wp100"
783
+ }), ee({ _: 2 }, [
784
+ t(r).prefix || e.icon ? {
785
+ name: "prefix",
786
+ fn: _(() => [
787
+ t(r).prefix ? H(u.$slots, "prefix", { key: 0 }) : (p(), M("i", {
788
+ key: 1,
789
+ class: G(["imicon", `im-${e.icon}`])
790
+ }, null, 2))
791
+ ]),
792
+ key: "0"
793
+ } : void 0,
794
+ t(r).append ? {
795
+ name: "append",
796
+ fn: _(() => [
797
+ H(u.$slots, "append")
798
+ ]),
799
+ key: "1"
800
+ } : void 0,
801
+ t(r).prepend ? {
802
+ name: "prepend",
803
+ fn: _(() => [
804
+ H(u.$slots, "prepend")
805
+ ]),
806
+ key: "2"
807
+ } : void 0,
808
+ t(r).suffix ? {
809
+ name: "suffix",
810
+ fn: _(() => [
811
+ H(u.$slots, "suffix")
812
+ ]),
813
+ key: "3"
814
+ } : void 0
815
+ ]), 1040, ["modelValue", "type", "input-style", "placeholder"])), [
816
+ [d, e.focus ? 300 : null, "time"]
817
+ ])
818
+ ]);
819
+ };
820
+ }
821
+ }), He = { class: "SuperMultipleSelect relative" }, Je = {
822
+ key: 0,
823
+ class: "flexMode vc hb h40 outsideIgnore"
824
+ }, Ke = {
825
+ key: 1,
826
+ class: "flexMode vc hb h40 outsideIgnore"
827
+ }, We = { class: "flexMode vc g4 fs14 noevent" }, qe = { class: "txt-primary" }, Ze = { class: "txt-dark5" }, Qe = { class: "txt-primary" }, Xe = { class: "txt-dark5" }, et = /* @__PURE__ */ Object.assign({
828
+ name: "SuperMultipleSelect"
829
+ }, {
830
+ __name: "index",
831
+ props: {
832
+ modelValue: {
833
+ type: Array,
834
+ default: () => []
835
+ },
836
+ options: {
837
+ type: Array,
838
+ default: () => []
839
+ },
840
+ label: {
841
+ type: String,
842
+ default: "label"
843
+ },
844
+ value: {
845
+ type: String,
846
+ default: "value"
847
+ }
848
+ },
849
+ emits: ["update:modelValue", "change"],
850
+ setup(A, { expose: x, emit: s }) {
851
+ const e = A, o = reactive({ v: [] }), { proxy: h } = getCurrentInstance(), a = s, y = () => {
852
+ a("update:modelValue", o.v), a("change", o.v);
853
+ }, k = () => {
854
+ o.v = e.options.map((C) => C[e.value]), y();
855
+ }, V = () => {
856
+ o.v = [], y();
857
+ }, O = () => {
858
+ h.$refs.select.blur();
859
+ }, b = computed(() => e.options.length <= o.v.length && e.options.length !== 0), f = computed(() => h.$attrs["multiple-limit"]), r = computed(() => h.$attrs["collapse-tags"] !== void 0);
860
+ return watchPostEffect(() => {
861
+ JSON.stringify(e.modelValue) !== JSON.stringify(o.v) && (o.v = e.modelValue);
862
+ }), x({
863
+ blur: O
864
+ }), (C, u) => {
865
+ const m = D("el-button"), $ = D("el-option"), d = D("el-select");
866
+ return p(), M("div", He, [
867
+ N(d, K({
868
+ ref: "select",
869
+ modelValue: t(o).v,
870
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => t(o).v = i),
871
+ clearable: "",
872
+ placeholder: " ",
873
+ placement: "top"
874
+ }, C.$attrs, {
875
+ multiple: "",
876
+ onChange: y,
877
+ class: ["wp100 MultipleSelect", t(r) && "nowrap"]
878
+ }), ee({
879
+ default: _(() => [
880
+ (p(!0), M(oe, null, le(e.options, (i, w) => (p(), Y($, {
881
+ key: w,
882
+ label: C.$l(i[e.label]),
883
+ value: i[e.value],
884
+ disabled: i.disabled,
885
+ class: G(i.hide && "hide-i")
886
+ }, {
887
+ default: _(() => [
888
+ C.$slots.default ? H(C.$slots, "default", {
889
+ key: 0,
890
+ it: i
891
+ }, void 0, !0) : B("", !0)
892
+ ]),
893
+ _: 2
894
+ }, 1032, ["label", "value", "disabled", "class"]))), 128))
895
+ ]),
896
+ _: 2
897
+ }, [
898
+ C.$slots.prefix ? {
899
+ name: "prefix",
900
+ fn: _(() => [
901
+ H(C.$slots, "prefix", {}, void 0, !0)
902
+ ]),
903
+ key: "0"
904
+ } : void 0,
905
+ t(f) ? void 0 : {
906
+ name: "header",
907
+ fn: _(() => [
908
+ C.$slots.header ? (p(), M("div", Je, [
909
+ H(C.$slots, "header", {}, void 0, !0)
910
+ ])) : (p(), M("div", Ke, [
911
+ t(b) ? (p(), Y(m, {
912
+ key: 0,
913
+ type: "primary",
914
+ size: "default",
915
+ onClick: V
916
+ }, {
917
+ default: _(() => [
918
+ te(I(C.$l("Cancel All")), 1)
919
+ ]),
920
+ _: 1
921
+ })) : (p(), Y(m, {
922
+ key: 1,
923
+ size: "default",
924
+ onClick: k
925
+ }, {
926
+ default: _(() => [
927
+ te(I(C.$l("Select All")), 1)
928
+ ]),
929
+ _: 1
930
+ })),
931
+ c("div", We, [
932
+ c("span", qe, I(t(o).v.length), 1),
933
+ u[1] || (u[1] = c("span", { class: "txt-dark3" }, "/", -1)),
934
+ c("span", Ze, I(t(f) || e.options.length), 1)
935
+ ])
936
+ ]))
937
+ ]),
938
+ key: "1"
939
+ },
940
+ C.$slots.footer ? {
941
+ name: "footer",
942
+ fn: _(() => [
943
+ H(C.$slots, "footer", {}, void 0, !0)
944
+ ]),
945
+ key: "2"
946
+ } : void 0
947
+ ]), 1040, ["modelValue", "class"]),
948
+ t(f) ? (p(), M("div", {
949
+ key: 0,
950
+ class: G(["countArea abs flexMode vc p4 fs12", t(r) && "nowrap"])
951
+ }, [
952
+ c("span", Qe, I(t(o).v.length), 1),
953
+ u[2] || (u[2] = c("span", { class: "txt-dark3" }, "/", -1)),
954
+ c("span", Xe, I(t(f)), 1)
955
+ ], 2)) : B("", !0)
956
+ ]);
957
+ };
958
+ }
959
+ }), tt = /* @__PURE__ */ ae(et, [["__scopeId", "data-v-954e82ab"]]), ot = { class: "SuperNodata" }, he = {
960
+ data: "No Data",
961
+ selection: "Unselected"
962
+ }, lt = /* @__PURE__ */ Object.assign({
963
+ name: "SuperNodata"
964
+ }, {
965
+ __name: "index",
966
+ props: {
967
+ size: {
968
+ type: [String, Number],
969
+ default: "48"
970
+ },
971
+ type: {
972
+ type: String,
973
+ default: "data",
974
+ validate: (A) => he[A]
975
+ },
976
+ txt: {
977
+ type: String,
978
+ default: ""
979
+ }
980
+ },
981
+ setup(A) {
982
+ const x = A, s = computed(() => Number(x.size)), e = computed(() => x.txt ? window.$l(x.txt) : window.$l(he[x.type]));
983
+ return (o, h) => {
984
+ const a = D("el-empty");
985
+ return p(), M("div", ot, [
986
+ N(a, {
987
+ "image-size": t(s),
988
+ description: t(e)
989
+ }, null, 8, ["image-size", "description"])
990
+ ]);
991
+ };
992
+ }
993
+ }), at = /* @__PURE__ */ ae(lt, [["__scopeId", "data-v-325bf284"]]), nt = { class: "Page relative yscroll vh100" }, st = {
994
+ key: 1,
995
+ class: "title fw700 fs24"
996
+ }, rt = {
997
+ class: "PageFooter flexMode vc g8 fs14",
998
+ style: { padding: "14px 30px 24px 30px" }
999
+ }, it = { class: "txt-dark5" }, dt = { class: "txt-primary" }, ut = { class: "txt-dark5" }, ct = /* @__PURE__ */ Object.assign({
1000
+ name: "Page"
1001
+ }, {
1002
+ __name: "index",
1003
+ props: {
1004
+ loading: {
1005
+ type: Boolean,
1006
+ default: !1
1007
+ },
1008
+ title: {
1009
+ type: String,
1010
+ default: ""
1011
+ },
1012
+ headerClass: {
1013
+ type: String,
1014
+ default: "sticky"
1015
+ },
1016
+ noheader: {
1017
+ type: Boolean,
1018
+ default: !1
1019
+ }
1020
+ },
1021
+ setup(A) {
1022
+ const x = A, s = computed(() => window.global.config.meta), e = computed(() => ({
1023
+ minHeight: window.global.config.options.pageHeight + "px"
1024
+ }));
1025
+ return (o, h) => {
1026
+ const a = D("Loading");
1027
+ return p(), M("div", nt, [
1028
+ N(a, {
1029
+ loading: x.loading
1030
+ }, null, 8, ["loading"]),
1031
+ x.noheader ? B("", !0) : (p(), M("div", {
1032
+ key: 0,
1033
+ class: G(["PageHeader h80 p0-30 flexMode vc hb z9 xscroll nobar", x.headerClass])
1034
+ }, [
1035
+ o.$slots.title ? H(o.$slots, "title", { key: 0 }, void 0, !0) : x.title ? (p(), M("div", st, I(o.$l(x.title)), 1)) : B("", !0),
1036
+ H(o.$slots, "tool", {}, void 0, !0)
1037
+ ], 2)),
1038
+ c("div", {
1039
+ class: "PageBody relative p0-30 z1",
1040
+ style: se(t(e))
1041
+ }, [
1042
+ H(o.$slots, "default", {}, void 0, !0)
1043
+ ], 4),
1044
+ c("div", rt, [
1045
+ c("span", it, I(t(s).copyright), 1),
1046
+ c("span", dt, I(t(s).campany), 1),
1047
+ c("span", ut, I(t(s).email), 1)
1048
+ ])
1049
+ ]);
1050
+ };
1051
+ }
1052
+ }), pt = /* @__PURE__ */ ae(ct, [["__scopeId", "data-v-5f809937"]]), mt = { class: "MvcTableHeaderTool" }, ft = { class: "ToolArea" }, gt = /* @__PURE__ */ Object.assign({
1053
+ name: "MvcTableHeaderTool",
1054
+ inheritAttrs: !1
1055
+ }, {
1056
+ __name: "Tool",
1057
+ props: {
1058
+ tableName: {
1059
+ type: String,
1060
+ default: ""
1061
+ },
1062
+ list: {
1063
+ type: Array,
1064
+ default: () => []
1065
+ },
1066
+ selection: {
1067
+ type: Array,
1068
+ default: () => []
1069
+ },
1070
+ loadData: {
1071
+ type: [Function, void 0],
1072
+ default: void 0
1073
+ },
1074
+ remote: {
1075
+ type: Boolean,
1076
+ default: !1
1077
+ },
1078
+ filter: {
1079
+ type: Object,
1080
+ default: /* @__PURE__ */ Object.create(null)
1081
+ },
1082
+ tool: {
1083
+ type: [Object, Boolean, void 0],
1084
+ default: /* @__PURE__ */ Object.create(null)
1085
+ },
1086
+ showTotalChosen: {
1087
+ type: Boolean,
1088
+ default: !1
1089
+ },
1090
+ total: {
1091
+ type: Number,
1092
+ default: 0
1093
+ },
1094
+ type: {
1095
+ type: String,
1096
+ default: ""
1097
+ }
1098
+ },
1099
+ setup(A, { emit: x }) {
1100
+ const s = defineAsyncComponent(() => Promise.resolve().then(() => _l)), e = defineAsyncComponent(() => Promise.resolve().then(() => jl)), o = A, h = reactive({
1101
+ drawer: [
1102
+ {
1103
+ title: window.$l("Table Column Customization"),
1104
+ size: 1024,
1105
+ cpt: markRaw(s)
1106
+ },
1107
+ {
1108
+ title: window.$l("Download from Current Table"),
1109
+ cpt: markRaw(e)
1110
+ }
1111
+ ],
1112
+ groupby: [],
1113
+ current: "",
1114
+ searchGroupBy: "",
1115
+ filterVisible: !1,
1116
+ filterTop: 0,
1117
+ loading: !1,
1118
+ dt: []
1119
+ }), { proxy: a } = getCurrentInstance(), y = x, k = (d) => {
1120
+ o.type === "drawer" || (d.target.localName === "span" ? window.$pageScrollTo(d.target.parentNode) : d.target.localName === "i" ? d.target.parentNode.localName === "button" ? window.$pageScrollTo(d.target.parentNode) : window.$pageScrollTo(d.target.parentNode.parentNode) : window.$pageScrollTo(d.target)), y("refresh");
1121
+ }, V = () => {
1122
+ h.drawer[0].params = { tableName: o.tableName }, h.current = 0;
1123
+ }, O = () => {
1124
+ h.drawer[1].params = {
1125
+ showTotalChosen: o.showTotalChosen,
1126
+ tableName: o.tableName,
1127
+ list: o.list,
1128
+ selection: o.selection,
1129
+ remote: o.remote
1130
+ }, h.current = 1;
1131
+ }, b = (d) => {
1132
+ d === "column" ? y("to-init-table") : d === "download" && y("to-download");
1133
+ }, f = async () => {
1134
+ if (o.loadData) {
1135
+ h.loading = !0;
1136
+ const d = await o.loadData({ pageStart: 1, pageSize: o.total });
1137
+ h.loading = !1, d && (h.dt = d, h.drawer[1].params.list = h.dt.list);
1138
+ }
1139
+ }, r = () => {
1140
+ h.drawer[1].params.list = o.list;
1141
+ }, C = computed(() => {
1142
+ var d;
1143
+ return ((d = o.tool) == null ? void 0 : d.download) === void 0;
1144
+ }), u = computed(() => {
1145
+ var d;
1146
+ return ((d = o.tool) == null ? void 0 : d.column) === void 0;
1147
+ }), m = computed(() => {
1148
+ var d;
1149
+ return ((d = o.tool) == null ? void 0 : d.refresh) === void 0;
1150
+ });
1151
+ computed(() => {
1152
+ const d = h.searchGroupBy.toLowerCase();
1153
+ return $.map((i) => (i.label.toLowerCase().includes(d) ? i.hide = !1 : i.hide = !0, i));
1154
+ });
1155
+ const $ = [
1156
+ {
1157
+ label: "Age",
1158
+ value: "Age",
1159
+ width: 100
1160
+ },
1161
+ {
1162
+ label: "Campaign Category",
1163
+ value: "CampaignCategory",
1164
+ width: 200
1165
+ },
1166
+ {
1167
+ label: "Campaign Type",
1168
+ value: "CampaignType",
1169
+ width: 200
1170
+ },
1171
+ {
1172
+ label: "Country",
1173
+ value: "Country",
1174
+ width: 120
1175
+ },
1176
+ {
1177
+ label: "Day",
1178
+ value: "Day",
1179
+ width: 100
1180
+ }
1181
+ ];
1182
+ return (d, i) => {
1183
+ const w = D("el-button"), g = D("Drawer");
1184
+ return p(), M("div", mt, [
1185
+ c("div", ft, [
1186
+ t(m) ? (p(), Y(w, {
1187
+ key: 0,
1188
+ plain: "",
1189
+ onClick: i[0] || (i[0] = (z) => k(z))
1190
+ }, {
1191
+ icon: _(() => i[2] || (i[2] = [
1192
+ c("i", { class: "imicon im-reset" }, null, -1)
1193
+ ])),
1194
+ default: _(() => [
1195
+ te(" " + I(d.$l("Refresh")), 1)
1196
+ ]),
1197
+ _: 1
1198
+ })) : B("", !0),
1199
+ t(u) ? (p(), Y(w, {
1200
+ key: 1,
1201
+ plain: "",
1202
+ onClick: V
1203
+ }, {
1204
+ icon: _(() => i[3] || (i[3] = [
1205
+ c("i", { class: "imicon im-columns1" }, null, -1)
1206
+ ])),
1207
+ default: _(() => [
1208
+ te(" " + I(d.$l("Columns")), 1)
1209
+ ]),
1210
+ _: 1
1211
+ })) : B("", !0),
1212
+ t(C) ? (p(), Y(w, {
1213
+ key: 2,
1214
+ plain: "",
1215
+ onClick: O
1216
+ }, {
1217
+ icon: _(() => i[4] || (i[4] = [
1218
+ c("i", { class: "imicon im-download1" }, null, -1)
1219
+ ])),
1220
+ default: _(() => [
1221
+ te(" " + I(d.$l("Download")), 1)
1222
+ ]),
1223
+ _: 1
1224
+ })) : B("", !0)
1225
+ ]),
1226
+ N(g, {
1227
+ current: t(h).current,
1228
+ "onUpdate:current": i[1] || (i[1] = (z) => t(h).current = z),
1229
+ drawer: t(h).drawer,
1230
+ loading: t(h).loading,
1231
+ dt: t(h).dt,
1232
+ onFetchAllData: f,
1233
+ onRecoverCurrentData: r,
1234
+ onSubmit: b
1235
+ }, null, 8, ["current", "drawer", "loading", "dt"])
1236
+ ]);
1237
+ };
1238
+ }
1239
+ }), yt = /* @__PURE__ */ ae(gt, [["__scopeId", "data-v-54e80741"]]), ht = { class: "HeaderArea" }, _t = {
1240
+ key: 0,
1241
+ class: "flexGrow xscroll nobar"
1242
+ }, bt = {
1243
+ key: 1,
1244
+ class: "titleArea"
1245
+ }, vt = { key: 2 }, wt = {
1246
+ key: 0,
1247
+ class: "filterRowArea"
1248
+ }, $t = /* @__PURE__ */ Object.assign({
1249
+ name: "MvcTableHeader",
1250
+ inheritAttrs: !1
1251
+ }, {
1252
+ __name: "Header",
1253
+ props: {
1254
+ title: {
1255
+ type: String,
1256
+ default: ""
1257
+ },
1258
+ tableName: {
1259
+ type: String,
1260
+ default: ""
1261
+ },
1262
+ noheader: {
1263
+ type: Boolean,
1264
+ default: !1
1265
+ },
1266
+ filterTagShow: {
1267
+ type: Boolean,
1268
+ default: !1
1269
+ },
1270
+ showTotalChosen: {
1271
+ type: Boolean,
1272
+ default: !1
1273
+ },
1274
+ total: {
1275
+ type: Number,
1276
+ default: 0
1277
+ }
1278
+ },
1279
+ setup(A, { emit: x }) {
1280
+ const s = A;
1281
+ return (e, o) => (p(), M("div", {
1282
+ class: "MvcTableHeader",
1283
+ style: se(s.filterTagShow ? "padding-bottom: 2px !important" : "")
1284
+ }, [
1285
+ c("div", ht, [
1286
+ e.$slots.default ? (p(), M("div", _t, [
1287
+ H(e.$slots, "default", {}, void 0, !0)
1288
+ ])) : s.title ? (p(), M("div", bt, I(s.title), 1)) : (p(), M("div", vt)),
1289
+ e.$attrs.tool !== !1 ? (p(), Y(yt, K({ key: 3 }, e.$attrs, {
1290
+ "table-name": s.tableName,
1291
+ total: s.total,
1292
+ "show-total-chosen": s.showTotalChosen
1293
+ }), null, 16, ["table-name", "total", "show-total-chosen"])) : B("", !0)
1294
+ ]),
1295
+ e.$slots.filterRow ? (p(), M("div", wt, [
1296
+ H(e.$slots, "filterRow", {}, void 0, !0)
1297
+ ])) : B("", !0)
1298
+ ], 4));
1299
+ }
1300
+ }), St = /* @__PURE__ */ ae($t, [["__scopeId", "data-v-3becf565"]]), Ct = we({
1301
+ name: "MvcTableColumnFilter",
1302
+ props: {
1303
+ tableName: {
1304
+ type: String,
1305
+ default: ""
1306
+ },
1307
+ group: {
1308
+ type: Object,
1309
+ default: /* @__PURE__ */ Object.create(null)
1310
+ }
1311
+ },
1312
+ setup: (A, x) => {
1313
+ var y;
1314
+ const s = $e({
1315
+ options: [],
1316
+ slots: []
1317
+ }), e = A.tableName + "_Column";
1318
+ let o = [];
1319
+ (() => {
1320
+ const k = x.slots.default()[0].children[0].children, V = {
1321
+ left: [],
1322
+ center: [],
1323
+ right: []
1324
+ }, O = A.tableName ? JSON.parse(localStorage.getItem(e)) : {}, b = [void 0];
1325
+ k.forEach((r) => {
1326
+ window.$getType(r.type) === "Symbol" ? o = o.concat(r.children) : o.push(r);
1327
+ }), o.forEach((r, C) => {
1328
+ var m;
1329
+ const u = window.$getType(r.type);
1330
+ if (((m = r.type) == null ? void 0 : m.name) === "ElTableColumn") {
1331
+ let $ = {
1332
+ ...r.props,
1333
+ labelKey: r.props.label,
1334
+ label: window.$l(r.props.label),
1335
+ sort: C,
1336
+ nomove: r.props.nomove || r.props.nomove === "" || r.props.label === "-" || r.props.type === "selection" || r.props.label === "Operation",
1337
+ resizable: !0,
1338
+ visible: r.props.visible !== !1
1339
+ };
1340
+ if (O != null && O.length && b.indexOf(r.props.prop) === -1) {
1341
+ const { data: d } = O.filter1(
1342
+ (i) => i.prop === r.props.prop
1343
+ );
1344
+ d && ($.sort = d.sort, $.fixed = d.fixed, $.visible = d.visible);
1345
+ }
1346
+ r.props.fixed ? V[r.props.fixed].push($) : V.center.push($), r.props = $;
1347
+ } else u === "Symbol" && r.children;
1348
+ }), s.columnInfo = V;
1349
+ const f = [
1350
+ ...V.left,
1351
+ ...V.center.sort((r, C) => r.sort - C.sort),
1352
+ ...V.right
1353
+ ];
1354
+ A.tableName && localStorage.setItem(e, JSON.stringify(f));
1355
+ })();
1356
+ let a = [];
1357
+ if (o.forEach((k) => {
1358
+ window.$getType(k) !== "String" && k.props.visible && a.push(k);
1359
+ }), (y = A.group) != null && y.label) {
1360
+ const k = {
1361
+ label: "Group By " + A.group.label,
1362
+ // prop: props.group.value,
1363
+ width: A.group.width,
1364
+ fixed: "left",
1365
+ visible: !0,
1366
+ resizable: !0
1367
+ };
1368
+ a[0].props.type === "selection" ? a.splice(1, 0, {
1369
+ ...a[1],
1370
+ props: k
1371
+ }) : a.unshift({
1372
+ ...a[0],
1373
+ props: k
1374
+ });
1375
+ }
1376
+ return a = a.sort((k, V) => k.props.sort - V.props.sort), () => a;
1377
+ }
1378
+ }), kt = { class: "MvcTableFooter" }, xt = { class: "FooterArea xscroll nobar" }, Vt = { class: "flexMode vc g8" }, Tt = {
1379
+ key: 1,
1380
+ class: "flexMode vc g4 fs14"
1381
+ }, Ot = { class: "txt-dark3" }, Mt = { class: "flexMode vc" }, At = { class: "txt-blue" }, Dt = {
1382
+ key: 2,
1383
+ class: "flexMode vc g4 fs14"
1384
+ }, It = { class: "txt-dark3" }, Nt = { class: "flexMode vc" }, zt = { class: "txt-blue" }, jt = { class: "txt-dark7" }, Bt = { class: "flexMode vc g4 fs14" }, Yt = { class: "txt-dark3" }, Et = { class: "txt-dark7" }, Lt = /* @__PURE__ */ Object.assign({
1385
+ name: "MvcTableFooter"
1386
+ }, {
1387
+ __name: "Footer",
1388
+ props: {
1389
+ pageNum: {
1390
+ type: Number,
1391
+ default: 1
1392
+ },
1393
+ pageSize: {
1394
+ type: Number,
1395
+ default: 50
1396
+ },
1397
+ pageCount: {
1398
+ type: Number,
1399
+ default: 0
1400
+ },
1401
+ pageSizes: {
1402
+ type: Array,
1403
+ default: () => [10, 20, 50, 100]
1404
+ },
1405
+ total: {
1406
+ type: Number,
1407
+ default: 0
1408
+ },
1409
+ filterTotal: {
1410
+ type: Number,
1411
+ default: 0
1412
+ },
1413
+ rows: {
1414
+ type: Number,
1415
+ default: 0
1416
+ },
1417
+ filterRows: {
1418
+ type: Number,
1419
+ default: 0
1420
+ },
1421
+ selectionLength: {
1422
+ type: Number,
1423
+ default: 0
1424
+ },
1425
+ remoteData: {
1426
+ type: [String, Number],
1427
+ default: ""
1428
+ },
1429
+ nosummary: {
1430
+ type: Boolean,
1431
+ default: !1
1432
+ },
1433
+ staticTotal: {
1434
+ type: Boolean,
1435
+ default: !1
1436
+ }
1437
+ },
1438
+ setup(A, { emit: x }) {
1439
+ const s = A, e = reactive({
1440
+ summaryMode: 1
1441
+ }), o = x, h = (r) => {
1442
+ o("size-change", r);
1443
+ }, a = (r) => {
1444
+ o("page-change", r);
1445
+ }, y = (r) => {
1446
+ o("summary-mode-change", r);
1447
+ }, k = computed(() => s.staticTotal ? !1 : s.filterTotal !== s.total), V = computed(() => Number(s.pageCount) || 7), O = computed(() => window.$getType(s.remoteData) === "String"), b = computed(() => O.value ? "slot, ->, prev, pager, next, sizes" : "slot, ->"), f = [
1448
+ {
1449
+ label: window.$l("Current Page"),
1450
+ value: 0
1451
+ },
1452
+ {
1453
+ label: window.$l("All Page"),
1454
+ value: 1
1455
+ }
1456
+ ];
1457
+ return (r, C) => {
1458
+ const u = D("el-option"), m = D("el-select"), $ = D("el-pagination");
1459
+ return p(), M("div", kt, [
1460
+ c("div", xt, [
1461
+ N($, {
1462
+ ref: "pagination",
1463
+ background: "",
1464
+ layout: t(b),
1465
+ total: s.total,
1466
+ "current-page": s.pageNum,
1467
+ "onUpdate:currentPage": C[1] || (C[1] = (d) => s.pageNum = d),
1468
+ "page-size": s.pageSize,
1469
+ "page-sizes": s.pageSizes,
1470
+ "pager-count": t(V),
1471
+ onSizeChange: h,
1472
+ onCurrentChange: a,
1473
+ class: "wp100"
1474
+ }, {
1475
+ default: _(() => [
1476
+ c("div", Vt, [
1477
+ s.nosummary ? B("", !0) : (p(), Y(m, {
1478
+ key: 0,
1479
+ modelValue: t(e).summaryMode,
1480
+ "onUpdate:modelValue": C[0] || (C[0] = (d) => t(e).summaryMode = d),
1481
+ placeholder: " ",
1482
+ class: "w160-i",
1483
+ size: "default",
1484
+ onChange: y
1485
+ }, {
1486
+ prefix: _(() => [
1487
+ te(I(r.$l("Sum")), 1)
1488
+ ]),
1489
+ default: _(() => [
1490
+ (p(), M(oe, null, le(f, (d, i) => N(u, {
1491
+ key: i,
1492
+ label: d.label,
1493
+ value: d.value
1494
+ }, null, 8, ["label", "value"])), 64))
1495
+ ]),
1496
+ _: 1
1497
+ }, 8, ["modelValue"])),
1498
+ s.selectionLength ? (p(), M("div", Tt, [
1499
+ c("div", Ot, I(r.$l("Selected")), 1),
1500
+ c("div", Mt, [
1501
+ c("span", At, I(s.selectionLength), 1)
1502
+ ])
1503
+ ])) : B("", !0),
1504
+ t(k) ? (p(), M("div", Dt, [
1505
+ c("div", It, I(r.$l("Current")), 1),
1506
+ c("div", Nt, [
1507
+ c("span", zt, I(r.$fa(s.filterTotal, 0)), 1),
1508
+ C[2] || (C[2] = c("span", { class: "p0-2 txt-dark3" }, "/", -1)),
1509
+ c("span", jt, I(r.$fa(s.rows, 0)), 1)
1510
+ ])
1511
+ ])) : B("", !0),
1512
+ c("div", Bt, [
1513
+ c("div", Yt, I(r.$l("Total")), 1),
1514
+ c("div", Et, I(r.$fa(s.total, 0)), 1)
1515
+ ])
1516
+ ])
1517
+ ]),
1518
+ _: 1
1519
+ }, 8, ["layout", "total", "current-page", "page-size", "page-sizes", "pager-count"])
1520
+ ])
1521
+ ]);
1522
+ };
1523
+ }
1524
+ }), Rt = /* @__PURE__ */ ae(Lt, [["__scopeId", "data-v-3c31d004"]]), Pt = ["id"], Ft = /* @__PURE__ */ Object.assign({
1525
+ name: "MvcTableGroupMain",
1526
+ inheritAttrs: !1
1527
+ }, {
1528
+ __name: "Group",
1529
+ props: {
1530
+ loading: {
1531
+ type: Boolean,
1532
+ default: !1
1533
+ },
1534
+ total: {
1535
+ type: Number,
1536
+ default: 0
1537
+ },
1538
+ tableName: {
1539
+ type: String,
1540
+ default: ""
1541
+ },
1542
+ channel: {
1543
+ type: String,
1544
+ default: ""
1545
+ },
1546
+ cellClassName: {
1547
+ type: [Function, String],
1548
+ default: void 0
1549
+ },
1550
+ loadData: {
1551
+ type: [Function, void 0],
1552
+ default: void 0
1553
+ },
1554
+ list: {
1555
+ type: [Array, void 0],
1556
+ default: void 0
1557
+ },
1558
+ height: {
1559
+ type: [String, Number],
1560
+ default: 0
1561
+ },
1562
+ minusHeight: {
1563
+ type: [String, Number],
1564
+ default: 0
1565
+ },
1566
+ noheader: {
1567
+ type: Boolean,
1568
+ default: !1
1569
+ },
1570
+ nofooter: {
1571
+ type: Boolean,
1572
+ default: !1
1573
+ },
1574
+ noscrolltop: {
1575
+ type: Boolean,
1576
+ default: !1
1577
+ },
1578
+ immediate: {
1579
+ type: Boolean,
1580
+ default: !0
1581
+ },
1582
+ pageSize: {
1583
+ type: Number,
1584
+ default: 0
1585
+ },
1586
+ filter: {
1587
+ type: Object,
1588
+ default: /* @__PURE__ */ Object.create(null)
1589
+ },
1590
+ defaultSort: {
1591
+ type: Object,
1592
+ default: /* @__PURE__ */ Object.create(null)
1593
+ },
1594
+ rowKey: {
1595
+ type: [String, void 0],
1596
+ default: void 0
1597
+ },
1598
+ showSummary: {
1599
+ type: Boolean,
1600
+ default: !1
1601
+ },
1602
+ summaryMethod: {
1603
+ type: Function,
1604
+ default: void 0
1605
+ },
1606
+ groupInfo: {
1607
+ type: Object,
1608
+ default: /* @__PURE__ */ Object.create(null)
1609
+ }
1610
+ },
1611
+ setup(A, { expose: x, emit: s }) {
1612
+ const e = A, o = reactive({
1613
+ loading: !0,
1614
+ tableKey: 0,
1615
+ pageStart: 1,
1616
+ pageSize: 50,
1617
+ search: {},
1618
+ dt: {},
1619
+ filter: {},
1620
+ selection: [],
1621
+ scrollTop: 0,
1622
+ scrollAni: !1,
1623
+ summaryMode: 1,
1624
+ tableId: "",
1625
+ sizeChanged: !1
1626
+ }), { proxy: h } = getCurrentInstance();
1627
+ inject("store").table();
1628
+ const y = ref();
1629
+ Se(() => {
1630
+ o.tableId = `Table${+/* @__PURE__ */ new Date()}_${window.$rn(9999)}`;
1631
+ });
1632
+ const k = s, V = async (j = {}) => {
1633
+ const { refresh: F, remote: E } = j;
1634
+ U.value && F || (j ? (o.pageStart = j.pageStart || 1, j.pageSize && (o.pageSize = j.pageSize), delete j.pageStart, delete j.pageSize, delete j.refresh, delete j.remote, o.search = j) : o.pageStart = 1, await b({ remote: E }));
1635
+ }, O = (j) => {
1636
+ j || o.tableKey++;
1637
+ }, b = async (j = {}, F) => {
1638
+ var q;
1639
+ const { remote: E } = j;
1640
+ if (e.loadData !== void 0) {
1641
+ o.loading = !0;
1642
+ let Q;
1643
+ e.pageSize && o.sizeChanged === !1 ? Q = e.pageSize : Q = o.pageSize;
1644
+ const X = {
1645
+ pageStart: o.pageStart,
1646
+ pageSize: Q,
1647
+ ...o.search
1648
+ };
1649
+ o.pageSize = X.pageSize, o.pageStart = X.pageStart, (q = e.groupInfo) != null && q.value && (X.groupBy = e.groupInfo.value), E && (X.remote = !0);
1650
+ const re = await e.loadData(X);
1651
+ o.loading = !1, re ? (o.dt = re, o.filter = JSON.parse(JSON.stringify(re)), k("update:total", o.dt.total)) : (o.dt = {
1652
+ total: 0,
1653
+ list: []
1654
+ }, o.filter = {
1655
+ total: 0,
1656
+ list: []
1657
+ }), W.value ? C() : k("list-change", re.list || []);
1658
+ }
1659
+ S();
1660
+ }, f = (j) => {
1661
+ o.summaryMode = j;
1662
+ }, r = ({ columns: j, data: F }) => Ve({ columns: j, data: F, currency: window.currency }), C = (j = {}) => {
1663
+ let { v: F = e.filter } = j;
1664
+ F || (F = j);
1665
+ const E = Object.keys(F), q = [];
1666
+ return E.forEach((Q) => {
1667
+ const X = F[Q];
1668
+ X && X.length && q.push(Q);
1669
+ }), q.length ? u(q, F) : (o.dt.list = [...o.filter.list], o.filter.total = o.dt.total, k("list-change", o.dt.list), o.filter.list);
1670
+ }, u = (j, F) => {
1671
+ const E = [];
1672
+ return o.filter.list.forEach((q) => {
1673
+ let Q = !1;
1674
+ j.forEach((X) => {
1675
+ const re = String(q[X]).toLowerCase();
1676
+ let ue = F[X];
1677
+ if (window.$getType(ue) === "Array")
1678
+ try {
1679
+ ue.forEach((ce) => {
1680
+ if (ce && re.includes(String(ce).toLowerCase()))
1681
+ throw Q = !0, new Error();
1682
+ });
1683
+ } catch {
1684
+ }
1685
+ else re.includes(ue.toLowerCase()) && (Q = !0);
1686
+ }), Q && E.push(q);
1687
+ }), o.dt.list = E, o.filter.total = E.length, k("list-change", E), E;
1688
+ }, m = () => {
1689
+ o.dt = {
1690
+ list: e.list,
1691
+ total: e.list.length
1692
+ }, o.filter = JSON.parse(JSON.stringify(o.dt)), k("list-change", e.list);
1693
+ }, $ = ({ row: j = {}, id: F }) => {
1694
+ F === void 0 ? o.dt.list.unshift(j) : o.dt.list = o.dt.list.map((E) => E.id === F ? {
1695
+ ...E,
1696
+ ...j
1697
+ } : E);
1698
+ }, d = (j, F) => {
1699
+ o.dt.list = o.dt.list.filter((E) => E[j] !== F), o.filter.list = o.filter.list.filter((E) => E[j] !== F);
1700
+ }, i = (j) => {
1701
+ y.value.toggleRowExpansion(j);
1702
+ }, w = (j, F) => {
1703
+ y.value.toggleRowSelection(j, F);
1704
+ }, g = (j) => {
1705
+ o.selection = j, k("selection-change", j);
1706
+ }, z = (j) => {
1707
+ k("sort-change", j);
1708
+ }, T = (j) => {
1709
+ o.pageSize = j, o.sizeChanged = !0, b();
1710
+ }, l = (j) => {
1711
+ o.pageStart = j, b();
1712
+ }, n = (j, F, E) => {
1713
+ let q = localStorage.getItem(J.value);
1714
+ if (q) {
1715
+ q = JSON.parse(q);
1716
+ const { data: Q } = q.filter1((X) => X.prop === E.property);
1717
+ Q && (Q.width = E.width, localStorage.setItem(J.value, JSON.stringify(q)));
1718
+ }
1719
+ }, S = () => {
1720
+ y.value && y.value.setScrollTop(0);
1721
+ }, L = () => {
1722
+ o.loading = !1;
1723
+ }, R = (j) => {
1724
+ o.dt.list.unshift(j);
1725
+ }, U = computed(() => e.loading || o.loading), Z = computed(() => {
1726
+ const {
1727
+ options: { tableHeight: j },
1728
+ page: F
1729
+ } = window.global.config;
1730
+ let E = e.height || j;
1731
+ return e.nofooter && (E = E + F.footer), e.noheader && (E = E + F.header), e.minusHeight && (E = E - Number(e.minusHeight)), E < 200 && (E = 200), E;
1732
+ }), W = computed(() => 0), P = computed(() => e.list === void 0 ? String(+/* @__PURE__ */ new Date()) : +/* @__PURE__ */ new Date()), ne = computed(() => window.$getType(P.value) === "String"), J = computed(() => e.tableName + "_Column"), ge = computed(() => o.summaryMode === 0 ? r : e.summaryMethod);
1733
+ watch(
1734
+ () => P.value,
1735
+ (j) => {
1736
+ if (j) {
1737
+ const F = window.$getType(j);
1738
+ F === "String" ? e.immediate && b() : F === "Number" && (o.loading = !1, m());
1739
+ }
1740
+ },
1741
+ {
1742
+ immediate: !0
1743
+ }
1744
+ ), x({
1745
+ toFilter: C,
1746
+ initTable: V,
1747
+ editRow: $,
1748
+ removeRow: d,
1749
+ refreshTable: O,
1750
+ toggleRowExpansion: i,
1751
+ toggleRowSelection: w,
1752
+ toStop: L,
1753
+ toAdd: R
1754
+ });
1755
+ const de = {
1756
+ "popper-class": "maxw300"
1757
+ };
1758
+ return (j, F) => {
1759
+ var Q, X;
1760
+ const E = D("Loading"), q = D("el-table");
1761
+ return p(), M("div", {
1762
+ class: G(["MvcTableGroupMain", t(ne) && "PagiTable"]),
1763
+ id: t(o).tableId
1764
+ }, [
1765
+ N(E, {
1766
+ loading: t(U),
1767
+ class: "loadingRect"
1768
+ }, null, 8, ["loading"]),
1769
+ (p(), Y(q, {
1770
+ ref_key: "table",
1771
+ ref: y,
1772
+ key: t(o).tableKey,
1773
+ data: t(o).dt.list,
1774
+ "row-key": e.rowKey,
1775
+ height: t(Z),
1776
+ stripe: "",
1777
+ border: "",
1778
+ "default-sort": A.defaultSort,
1779
+ "show-summary": e.showSummary,
1780
+ "summary-method": t(ge),
1781
+ "tooltip-options": de,
1782
+ "cell-class-name": e.cellClassName,
1783
+ onHeaderDragend: n,
1784
+ onSelectionChange: g,
1785
+ onSortChange: z,
1786
+ onToggleRowSelection: w
1787
+ }, {
1788
+ default: _(() => [
1789
+ N(t(Ct), {
1790
+ "table-name": e.tableName,
1791
+ group: e.groupInfo
1792
+ }, {
1793
+ default: _(() => [
1794
+ H(j.$slots, "default", {}, void 0, !0)
1795
+ ]),
1796
+ _: 3
1797
+ }, 8, ["table-name", "group"])
1798
+ ]),
1799
+ _: 3
1800
+ }, 8, ["data", "row-key", "height", "default-sort", "show-summary", "summary-method", "cell-class-name"])),
1801
+ e.nofooter ? B("", !0) : (p(), Y(Rt, K({
1802
+ key: 0,
1803
+ ref: "footer"
1804
+ }, j.$attrs, {
1805
+ nosummary: !e.showSummary,
1806
+ "page-num": t(o).pageStart,
1807
+ "page-size": t(o).pageSize,
1808
+ rows: (Q = t(o).filter.list) == null ? void 0 : Q.length,
1809
+ "filter-rows": (X = t(o).dt.list) == null ? void 0 : X.length,
1810
+ total: e.total || t(o).dt.total,
1811
+ "filter-total": t(o).filter.total,
1812
+ "selection-length": t(o).selection.length,
1813
+ "remote-data": t(P),
1814
+ "static-total": !!e.total,
1815
+ onSizeChange: T,
1816
+ onPageChange: l,
1817
+ onSummaryModeChange: f
1818
+ }), null, 16, ["nosummary", "page-num", "page-size", "rows", "filter-rows", "total", "filter-total", "selection-length", "remote-data", "static-total"]))
1819
+ ], 10, Pt);
1820
+ };
1821
+ }
1822
+ }), Ut = /* @__PURE__ */ ae(Ft, [["__scopeId", "data-v-9dba2804"]]), Gt = /* @__PURE__ */ Object.assign({
1823
+ name: "Table",
1824
+ inheritAttrs: !1
1825
+ }, {
1826
+ __name: "index",
1827
+ props: {
1828
+ showTotalChosen: {
1829
+ type: Boolean,
1830
+ default: !1
1831
+ },
1832
+ noheader: {
1833
+ type: Boolean,
1834
+ default: !1
1835
+ },
1836
+ tableClass: {
1837
+ type: String,
1838
+ default: ""
1839
+ },
1840
+ customRefresh: {
1841
+ type: Boolean,
1842
+ default: !1
1843
+ },
1844
+ remote: {
1845
+ type: Boolean,
1846
+ default: !0
1847
+ },
1848
+ filterTagShow: {
1849
+ type: Boolean,
1850
+ default: !1
1851
+ }
1852
+ },
1853
+ setup(A, { expose: x, emit: s }) {
1854
+ const e = s, o = A, h = reactive({
1855
+ columnInfo: {},
1856
+ selection: [],
1857
+ list: [],
1858
+ total: 0,
1859
+ groupInfo: {}
1860
+ }), a = ref();
1861
+ ref();
1862
+ const y = ref(), { proxy: k } = getCurrentInstance(), V = (l) => {
1863
+ y.value.toFilter(l);
1864
+ }, O = (l) => {
1865
+ y.value.initTable(l);
1866
+ }, b = (l) => {
1867
+ y.value.editRow(l);
1868
+ }, f = () => {
1869
+ y.value.refreshTable();
1870
+ }, r = (l) => {
1871
+ h.list = l;
1872
+ }, C = (l) => {
1873
+ h.selection = l;
1874
+ }, u = (l) => {
1875
+ y.value.toggleRowExpansion(l);
1876
+ }, m = (l, n) => {
1877
+ y.value.toggleRowSelection(l, n);
1878
+ }, $ = () => {
1879
+ k.$attrs.list || y.value.initTable({ refresh: !0, remote: o.remote }), o.customRefresh && e("customRefreshFunc");
1880
+ }, d = (l) => {
1881
+ h.groupInfo = l, nextTick(() => {
1882
+ y.value.initTable();
1883
+ });
1884
+ }, i = () => {
1885
+ y.value.$refs.table.clearSelection();
1886
+ }, w = () => {
1887
+ y.value.toStop();
1888
+ }, g = (l) => {
1889
+ y.value.toAdd(l);
1890
+ }, z = (l, n) => {
1891
+ y.value.removeRow(l, n);
1892
+ }, T = computed(() => k.$attrs["table-name"]);
1893
+ return computed(() => `${T.value}_Column`), x({
1894
+ initTable: O,
1895
+ editRow: b,
1896
+ removeRow: z,
1897
+ toFilter: V,
1898
+ toggleRowExpansion: u,
1899
+ toggleRowSelection: m,
1900
+ toInitTable: f,
1901
+ clearSelection: i,
1902
+ toStop: w,
1903
+ toAdd: g
1904
+ }), (l, n) => (p(), M("div", {
1905
+ class: G(["Table", o.tableClass])
1906
+ }, [
1907
+ o.noheader ? B("", !0) : (p(), Y(St, K({
1908
+ key: 0,
1909
+ ref_key: "header",
1910
+ ref: a
1911
+ }, l.$attrs, {
1912
+ filterTagShow: o.filterTagShow,
1913
+ list: t(h).list,
1914
+ selection: t(h).selection,
1915
+ total: t(h).total,
1916
+ showTotalChosen: o.showTotalChosen,
1917
+ onToInitTable: f,
1918
+ onGroupChange: d,
1919
+ onRefresh: $
1920
+ }), ee({
1921
+ default: _(() => [
1922
+ l.$slots.actions ? H(l.$slots, "actions", { key: 0 }, void 0, !0) : B("", !0)
1923
+ ]),
1924
+ _: 2
1925
+ }, [
1926
+ l.$slots.filterRow ? {
1927
+ name: "filterRow",
1928
+ fn: _(() => [
1929
+ H(l.$slots, "filterRow", {}, void 0, !0)
1930
+ ]),
1931
+ key: "0"
1932
+ } : void 0
1933
+ ]), 1040, ["filterTagShow", "list", "selection", "total", "showTotalChosen"])),
1934
+ N(Ut, K({
1935
+ ref_key: "main",
1936
+ ref: y
1937
+ }, l.$attrs, {
1938
+ "group-info": t(h).groupInfo,
1939
+ total: t(h).total,
1940
+ "onUpdate:total": n[0] || (n[0] = (S) => t(h).total = S),
1941
+ onSelectionChange: C,
1942
+ onListChange: r
1943
+ }), {
1944
+ default: _(() => [
1945
+ H(l.$slots, "default", {}, void 0, !0)
1946
+ ]),
1947
+ _: 3
1948
+ }, 16, ["group-info", "total"])
1949
+ ], 2));
1950
+ }
1951
+ }), Ht = /* @__PURE__ */ ae(Gt, [["__scopeId", "data-v-869ef365"]]), Jt = { class: "SuperTextarea relative" }, Kt = {
1952
+ key: 0,
1953
+ class: "absFull flexMode hc vc z9"
1954
+ }, Wt = /* @__PURE__ */ Object.assign({
1955
+ name: "SuperTextarea"
1956
+ }, {
1957
+ __name: "index",
1958
+ props: {
1959
+ modelValue: {
1960
+ type: [String, Array],
1961
+ default: ""
1962
+ },
1963
+ rows: {
1964
+ type: [Number, String],
1965
+ default: 8
1966
+ },
1967
+ max: {
1968
+ type: [String, Number],
1969
+ default: 10
1970
+ },
1971
+ placeholder: {
1972
+ type: String,
1973
+ default: ""
1974
+ },
1975
+ focus: {
1976
+ type: Boolean,
1977
+ default: !1
1978
+ },
1979
+ loading: {
1980
+ type: Boolean,
1981
+ default: !1
1982
+ },
1983
+ disabled: {
1984
+ type: Boolean,
1985
+ default: !1
1986
+ },
1987
+ sep: {
1988
+ type: String,
1989
+ default: `
1990
+ `
1991
+ },
1992
+ resize: {
1993
+ type: String,
1994
+ default: "none"
1995
+ }
1996
+ },
1997
+ emits: ["total", "update:modelValue", "blur"],
1998
+ setup(A, { expose: x, emit: s }) {
1999
+ const e = A, o = reactive({ v: "", total: 0, mounted: !1 }), { proxy: h } = getCurrentInstance();
2000
+ onMounted(() => {
2001
+ e.focus && y(v);
2002
+ });
2003
+ const a = s, y = ($) => {
2004
+ nextTick(() => {
2005
+ h.$refs.input.focus(), $ && h.$refs.input.select();
2006
+ });
2007
+ }, k = ($) => {
2008
+ let d = 0, i = [];
2009
+ const w = [];
2010
+ if ($) {
2011
+ if (i = $.split(`
2012
+ `), i.forEach((g) => {
2013
+ g.trim() && (d++, w.push(g));
2014
+ }), !b.value) {
2015
+ o.v = r.value ? [] : "";
2016
+ return;
2017
+ }
2018
+ b.value > -1 && d > b.value && (i = w.slice(0, b.value), o.v = i.join(e.sep), d = b.value), a("update:modelValue", r.value ? i : o.v);
2019
+ } else
2020
+ a("update:modelValue", r.value ? [] : "");
2021
+ o.total = d, a("total", d);
2022
+ }, V = () => {
2023
+ o.v = "", o.total = 0, a("update:modelValue", ""), a("change", ""), y();
2024
+ }, O = () => {
2025
+ a("blur");
2026
+ }, b = computed(() => Number(e.max) || 0), f = computed(() => o.total === b.value ? "txt-red" : "txt-blue"), r = computed(() => window.$getType(e.modelValue) === "Array"), C = computed(() => window.$l("One per Line")), u = computed(() => e.placeholder ? `${window.$l(e.placeholder)}
2027
+ ${C.value}` : `${C.value}`), m = computed(() => r.value ? e.modelValue.join(e.sep) : e.modelValue);
2028
+ return watchPostEffect(() => {
2029
+ m.value && b.value ? m.value !== o.v && (o.v = m.value, k(m.value)) : (o.v = "", o.total = 0);
2030
+ }), x({
2031
+ toFocus: y
2032
+ }), ($, d) => {
2033
+ const i = D("el-input");
2034
+ return p(), M("div", Jt, [
2035
+ e.loading ? (p(), M("div", Kt, d[1] || (d[1] = [
2036
+ c("i", { class: "imicon im-loading ani-rotate" }, null, -1)
2037
+ ]))) : B("", !0),
2038
+ N(i, {
2039
+ ref: "input",
2040
+ modelValue: t(o).v,
2041
+ "onUpdate:modelValue": d[0] || (d[0] = (w) => t(o).v = w),
2042
+ rows: e.rows,
2043
+ resize: e.resize,
2044
+ type: "textarea",
2045
+ placeholder: $.$l(t(u)),
2046
+ class: G(["fullTextArea", $.$slots.prefix && "prefix"]),
2047
+ disabled: e.loading || e.disabled,
2048
+ onInput: k,
2049
+ onBlur: O
2050
+ }, null, 8, ["modelValue", "rows", "resize", "placeholder", "class", "disabled"]),
2051
+ t(b) > -1 ? (p(), M("div", {
2052
+ key: 1,
2053
+ class: G(["countArea abs fs12 txt-blue", e.rows > 1 && "lh20"])
2054
+ }, [
2055
+ c("span", {
2056
+ class: G(t(f))
2057
+ }, I(t(o).total), 3),
2058
+ d[2] || (d[2] = c("span", null, " / ", -1)),
2059
+ c("span", null, I(t(b)), 1)
2060
+ ], 2)) : B("", !0),
2061
+ c("div", {
2062
+ class: G(["clearArea abs txt-dark3 hover-txt-red5", [t(o).v && "content"]]),
2063
+ onClick: V
2064
+ }, d[3] || (d[3] = [
2065
+ c("i", { class: "imicon im-close-circle" }, null, -1)
2066
+ ]), 2),
2067
+ $.$slots.prefix ? (p(), M("div", {
2068
+ key: 2,
2069
+ class: "prefix abs l t",
2070
+ style: { padding: "6px 11px" },
2071
+ onClick: ie((w) => null, ["stop"])
2072
+ }, [
2073
+ H($.$slots, "prefix", {}, void 0, !0)
2074
+ ])) : B("", !0)
2075
+ ]);
2076
+ };
2077
+ }
2078
+ }), qt = /* @__PURE__ */ ae(Wt, [["__scopeId", "data-v-197f3839"]]), Zt = { class: "SuperAiApp relative" }, Qt = { class: "flexMode vc g8" }, Xt = { class: "txt-nowrap" }, eo = { class: "txt-dark5" }, to = /* @__PURE__ */ Object.assign({
2079
+ name: "SuperAiApp"
2080
+ }, {
2081
+ __name: "index",
2082
+ props: {
2083
+ modelValue: {
2084
+ type: Number,
2085
+ default: null
2086
+ },
2087
+ multiple: {
2088
+ type: Boolean,
2089
+ default: !1
2090
+ },
2091
+ placeholder: {
2092
+ type: String,
2093
+ default: ""
2094
+ },
2095
+ useDefault: {
2096
+ type: Boolean,
2097
+ default: !1
2098
+ }
2099
+ },
2100
+ emits: [
2101
+ "success",
2102
+ "update:icon",
2103
+ "update:orgs",
2104
+ "update:name"
2105
+ ],
2106
+ setup(A, { emit: x }) {
2107
+ const s = A, e = reactive({
2108
+ loading: !1,
2109
+ single: "",
2110
+ multiple: [],
2111
+ options: []
2112
+ }), h = inject("store").ai();
2113
+ onMounted(() => {
2114
+ y();
2115
+ });
2116
+ const a = x, y = async () => {
2117
+ if (V.value.length) {
2118
+ a("success");
2119
+ return;
2120
+ }
2121
+ e.loading = !0, await h.getAppOptions(), e.loading = !1, a("success");
2122
+ }, k = (f) => {
2123
+ a("update:modelValue", f);
2124
+ const { data: r } = h.appOptions.filter1((C) => C.id === e.single);
2125
+ r && (a("update:name", r.name), a("update:icon", r.icon), a("update:orgs", r.orgs));
2126
+ }, V = computed(() => h.appOptions), O = computed(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), b = computed(() => V.value.filter1((r) => r.id === e.single).data);
2127
+ return watch(
2128
+ () => s.modelValue,
2129
+ (f) => {
2130
+ f && f !== e.v && (e.single = f, k(f));
2131
+ },
2132
+ {
2133
+ immediate: !0
2134
+ }
2135
+ ), watch(
2136
+ () => V.value,
2137
+ (f) => {
2138
+ s.useDefault && (f == null ? void 0 : f.length) === 1 && (e.single = f[0].id, k(f[0].id));
2139
+ },
2140
+ {
2141
+ immediate: !0
2142
+ }
2143
+ ), (f, r) => {
2144
+ const C = D("IconLoading"), u = D("Image"), m = D("el-option"), $ = D("el-select");
2145
+ return p(), M("div", Zt, [
2146
+ t(e).loading ? (p(), Y(C, { key: 0 })) : B("", !0),
2147
+ N($, K({
2148
+ modelValue: t(e).single,
2149
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => t(e).single = d),
2150
+ placeholder: t(O),
2151
+ filterable: "",
2152
+ clearable: "",
2153
+ "default-first-option": "",
2154
+ "fit-input-width": ""
2155
+ }, f.$attrs, { onChange: k }), ee({
2156
+ default: _(() => [
2157
+ (p(!0), M(oe, null, le(t(V), (d, i) => (p(), Y(m, {
2158
+ key: i,
2159
+ label: d.label,
2160
+ value: d.id
2161
+ }, {
2162
+ default: _(() => [
2163
+ c("div", Qt, [
2164
+ N(u, {
2165
+ src: d.icon,
2166
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2167
+ }, null, 8, ["src"]),
2168
+ c("span", Xt, I(d.name), 1),
2169
+ c("span", eo, "(" + I(d.id) + ")", 1)
2170
+ ])
2171
+ ]),
2172
+ _: 2
2173
+ }, 1032, ["label", "value"]))), 128))
2174
+ ]),
2175
+ _: 2
2176
+ }, [
2177
+ t(b) ? {
2178
+ name: "prefix",
2179
+ fn: _(() => [
2180
+ N(u, {
2181
+ src: t(b).icon,
2182
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2183
+ }, null, 8, ["src"])
2184
+ ]),
2185
+ key: "0"
2186
+ } : void 0
2187
+ ]), 1040, ["modelValue", "placeholder"])
2188
+ ]);
2189
+ };
2190
+ }
2191
+ }), oo = { class: "SuperAsaOrg relative" }, lo = { class: "inputGroup" }, ao = { class: "inputGroupLeft noShrink" }, no = { class: "flexMode vc g4" }, so = { class: "txt-dark5" }, ro = /* @__PURE__ */ Object.assign({
2192
+ name: "SuperAsaOrg"
2193
+ }, {
2194
+ __name: "index",
2195
+ props: {
2196
+ app: {
2197
+ type: Number,
2198
+ default: 0
2199
+ },
2200
+ changeImmediately: {
2201
+ type: Boolean,
2202
+ default: !1
2203
+ },
2204
+ modelValue: {
2205
+ type: [Number, String],
2206
+ default: 0
2207
+ },
2208
+ readonly: {
2209
+ type: Boolean,
2210
+ default: !1
2211
+ },
2212
+ unTimezone: {
2213
+ type: Boolean,
2214
+ default: !1
2215
+ }
2216
+ },
2217
+ emits: [
2218
+ "update:modelValue",
2219
+ "update:name",
2220
+ "update:currency",
2221
+ "update:readonly",
2222
+ "success",
2223
+ "error",
2224
+ "change"
2225
+ ],
2226
+ setup(A, { emit: x }) {
2227
+ const s = A, e = reactive({
2228
+ loading: !1,
2229
+ single: "",
2230
+ multiple: [],
2231
+ options: []
2232
+ }), h = inject("store").ai();
2233
+ onMounted(() => {
2234
+ y();
2235
+ });
2236
+ const a = x, y = async () => {
2237
+ f.value.length ? (e.single || k(f.value[0].id), a("success")) : a("error");
2238
+ }, k = (u) => {
2239
+ var m, $, d, i;
2240
+ a("update:modelValue", u), a("update:name", (m = r.value) == null ? void 0 : m.name), a("update:currency", ($ = r.value) == null ? void 0 : $.currency), a("update:timezone", (d = r.value) == null ? void 0 : d.timezone), a("update:readonly", (i = r.value) == null ? void 0 : i.readonly), s.changeImmediately && a("change", u), s.unTimezone || V();
2241
+ }, V = () => {
2242
+ var m;
2243
+ let u = r.value;
2244
+ h.saveData("accountTimezone", {
2245
+ timezoneName: u == null ? void 0 : u.timezone,
2246
+ tip: "Account",
2247
+ timezone: (m = window.$map.common.timezone.filter1(
2248
+ ($) => $.label === (u == null ? void 0 : u.timezone)
2249
+ ).data) == null ? void 0 : m.value
2250
+ });
2251
+ }, O = () => {
2252
+ e.single = "", a("update:modelValue", ""), a("update:name", ""), a("update:currency", ""), a("update:timezone", ""), a("update:readonly", !1);
2253
+ }, b = computed(() => window.$l("Campaign Group")), f = computed(() => {
2254
+ var u;
2255
+ return s.app ? ((u = h.appOptions.filter1((m) => m.id === s.app).data) == null ? void 0 : u.orgs) || [] : [];
2256
+ }), r = computed(() => f.value.filter1((u) => u.id === e.single).data), C = computed(() => !s.app);
2257
+ return watch(
2258
+ () => s.modelValue,
2259
+ (u) => {
2260
+ u ? u !== e.single && (e.single = u, k(u)) : O();
2261
+ },
2262
+ {
2263
+ immediate: !0
2264
+ }
2265
+ ), (u, m) => {
2266
+ const $ = D("IconLoading"), d = D("el-button"), i = D("el-option"), w = D("el-select");
2267
+ return p(), M("div", oo, [
2268
+ t(e).loading ? (p(), Y($, { key: 0 })) : B("", !0),
2269
+ c("div", lo, [
2270
+ c("div", ao, [
2271
+ N(d, {
2272
+ circle: "",
2273
+ onClick: m[0] || (m[0] = (g) => u.$copy(t(e).single, "ID"))
2274
+ }, {
2275
+ icon: _(() => m[2] || (m[2] = [
2276
+ c("i", { class: "imicon im-copy" }, null, -1)
2277
+ ])),
2278
+ _: 1
2279
+ })
2280
+ ]),
2281
+ N(w, K({
2282
+ modelValue: t(e).single,
2283
+ "onUpdate:modelValue": m[1] || (m[1] = (g) => t(e).single = g),
2284
+ placeholder: t(b),
2285
+ disabled: t(C),
2286
+ filterable: ""
2287
+ }, u.$attrs, {
2288
+ class: "inputGroupRight",
2289
+ onChange: k
2290
+ }), {
2291
+ default: _(() => [
2292
+ (p(!0), M(oe, null, le(t(f), (g, z) => (p(), Y(i, {
2293
+ key: z,
2294
+ label: `${g.name} (${g.id})`,
2295
+ value: g.id,
2296
+ disabled: s.readonly && g.readonly
2297
+ }, {
2298
+ default: _(() => [
2299
+ c("div", no, [
2300
+ c("i", {
2301
+ class: G(["imicon", g.readonly ? "" : "im-writing"])
2302
+ }, null, 2),
2303
+ c("span", null, I(g.name), 1),
2304
+ c("span", so, "(" + I(g.id) + ")", 1)
2305
+ ])
2306
+ ]),
2307
+ _: 2
2308
+ }, 1032, ["label", "value", "disabled"]))), 128))
2309
+ ]),
2310
+ _: 1
2311
+ }, 16, ["modelValue", "placeholder", "disabled"])
2312
+ ])
2313
+ ]);
2314
+ };
2315
+ }
2316
+ }), io = { class: "SuperAsaAdGroup relative" }, uo = { class: "outsideIgnore" }, co = { class: "flexMode vc g8" }, po = { class: "flexMode hr outsideIgnore" }, mo = {
2317
+ key: 2,
2318
+ class: "inputGroup"
2319
+ }, fo = { class: "inputGroupLeft noShrink" }, go = { class: "flexMode vc g8" }, yo = /* @__PURE__ */ Object.assign({
2320
+ name: "SuperAsaAdGroup"
2321
+ }, {
2322
+ __name: "index",
2323
+ props: {
2324
+ modelValue: {
2325
+ type: [Number, Array],
2326
+ default: 0
2327
+ },
2328
+ app: {
2329
+ type: [Number, Array],
2330
+ default: 0
2331
+ },
2332
+ org: {
2333
+ type: [String, Number, Array],
2334
+ default: 0
2335
+ },
2336
+ campaign: {
2337
+ type: [String, Number, Array],
2338
+ default: 0
2339
+ },
2340
+ multiple: {
2341
+ type: Boolean,
2342
+ default: !1
2343
+ },
2344
+ value: {
2345
+ type: String,
2346
+ default: "id"
2347
+ },
2348
+ special: {
2349
+ type: Boolean,
2350
+ default: !1
2351
+ },
2352
+ confirmAction: {
2353
+ type: Boolean,
2354
+ default: !1
2355
+ },
2356
+ needNew: {
2357
+ type: Boolean,
2358
+ default: !1
2359
+ }
2360
+ },
2361
+ emits: [
2362
+ "change",
2363
+ "confirm",
2364
+ "update:modelValue",
2365
+ "update:name"
2366
+ ],
2367
+ setup(A, { expose: x, emit: s }) {
2368
+ const e = A, o = reactive({
2369
+ loading: !1,
2370
+ single: "",
2371
+ multiple: [],
2372
+ options: [],
2373
+ filterTxt: ""
2374
+ }), { proxy: h } = getCurrentInstance(), a = s, y = async () => {
2375
+ const i = window.$getType(e.campaign);
2376
+ let w;
2377
+ if (i === "Array" ? w = e.campaign.join(",") : w = e.campaign.toString(), !w)
2378
+ return;
2379
+ let g = {
2380
+ data: {
2381
+ appId: e.app,
2382
+ orgId: e.org,
2383
+ campaignId: w
2384
+ }
2385
+ };
2386
+ e.needNew && (g.ex = +/* @__PURE__ */ new Date()), o.loading = !0;
2387
+ const { code: z, data: T } = await window.$post({
2388
+ url: window.$api.asa.adGroupOptions,
2389
+ ...g
2390
+ });
2391
+ if (o.loading = !1, z === 200) {
2392
+ let l;
2393
+ e.permission ? l = T.filter((n) => n.permission === e.permission) : l = T, o.options = l.map((n) => (n.sort = window.$map.statusMap[n.status].sort, n.ca = `${n.campaignId}_${n.id}`, n.oca = `${n.orgId}_${n.valueCA}`, n)).sort((n, S) => n.sort - S.sort);
2394
+ }
2395
+ if (e.multiple && e.modelValue && e.modelValue.length > 0) {
2396
+ const l = e.modelValue.map((n) => {
2397
+ const { data: S } = m.value.filter1((L) => L[e.value] === n);
2398
+ return S ? S.name : `Unknown Name ${n}`;
2399
+ });
2400
+ a("update:name", l);
2401
+ }
2402
+ !e.multiple && u.value && a("update:name", u.value.name);
2403
+ }, k = (i) => {
2404
+ o.filterTxt = i;
2405
+ }, V = () => {
2406
+ h.$refs.multipleSelect.blur(), e.confirmAction && a("confirm");
2407
+ }, O = (i) => {
2408
+ const w = i.map((g) => {
2409
+ const { data: z } = m.value.filter1((T) => T[e.value] === g);
2410
+ return z ? z.name : `Unknown Name ${g}`;
2411
+ });
2412
+ a("update:modelValue", o.multiple), a("update:name", w), a("change", i);
2413
+ }, b = () => {
2414
+ a("update:modelValue", o.single), a("update:name", u.value.name), a("change", o.single);
2415
+ }, f = () => {
2416
+ o.multiple = m.value.filter((i) => {
2417
+ if (i.hide === !1)
2418
+ return i;
2419
+ }).map((i) => i[e.value]), a("update:modelValue", o.multiple);
2420
+ }, r = () => {
2421
+ y();
2422
+ }, C = computed(() => window.$l("Ad Group")), u = computed(() => o.single ? o.options.filter1((i) => i[e.value] === o.single).data : ""), m = computed(() => o.filterTxt ? o.options.map((i) => (i.name.includes(o.filterTxt) ? i.hide = !1 : i.hide = !0, i)) : (o.options.map((i) => (i.hide = !1, i)), o.options.map((i) => (i.hide = !1, i)))), $ = computed(() => m.value.filter((i) => i.hide === !1).length);
2423
+ computed(() => e.app && e.org && e.campaign);
2424
+ const d = computed(() => {
2425
+ var g, z;
2426
+ let i = !1;
2427
+ const w = window.$getType(e.campaign);
2428
+ return e.multiple && w === "Array" ? i = e.special ? ((g = e.campaign) == null ? void 0 : g.length) !== 1 : !((z = e.campaign) != null && z.length) : i = !e.campaign, i;
2429
+ });
2430
+ return watch(
2431
+ () => e.campaign,
2432
+ (i, w) => {
2433
+ const g = window.$getType(i);
2434
+ e.multiple ? (g === "Array" && i.length || g === "Number" && i) && y() : i && i !== w && y();
2435
+ },
2436
+ {
2437
+ immediate: !0
2438
+ }
2439
+ ), watch(
2440
+ () => e.modelValue,
2441
+ (i) => {
2442
+ e.multiple ? JSON.stringify(o.single) !== JSON.stringify(i) && (o.multiple = i) : i ? o.single !== i && (o.single = i) : o.single = "";
2443
+ },
2444
+ {
2445
+ immediate: !0
2446
+ }
2447
+ ), x({
2448
+ reload: r
2449
+ }), (i, w) => {
2450
+ const g = D("IconLoading"), z = D("el-button"), T = D("el-tag"), l = D("StatusItem"), n = D("MultipleSelect"), S = D("el-option"), L = D("el-select");
2451
+ return p(), M("div", io, [
2452
+ t(o).loading ? (p(), Y(g, { key: 0 })) : B("", !0),
2453
+ e.multiple ? (p(), Y(n, K({
2454
+ key: 1,
2455
+ ref: "multipleSelect",
2456
+ modelValue: t(o).multiple,
2457
+ "onUpdate:modelValue": w[0] || (w[0] = (R) => t(o).multiple = R),
2458
+ options: t(m),
2459
+ placeholder: t(C),
2460
+ label: i.$l("name"),
2461
+ value: e.value,
2462
+ clearable: "",
2463
+ filterable: "",
2464
+ "filter-method": k,
2465
+ "collapse-tags": "",
2466
+ "collapse-tags-tooltip": "",
2467
+ disabled: t(d)
2468
+ }, i.$attrs, { onChange: O }), {
2469
+ header: _(() => [
2470
+ c("div", uo, [
2471
+ t(o).filterTxt ? (p(), Y(z, {
2472
+ key: 0,
2473
+ onClick: f,
2474
+ class: "outsideIgnore"
2475
+ }, {
2476
+ default: _(() => [
2477
+ te(I(i.$l("Select All")), 1)
2478
+ ]),
2479
+ _: 1
2480
+ })) : B("", !0)
2481
+ ]),
2482
+ N(T, {
2483
+ type: "info",
2484
+ effect: "light",
2485
+ round: "",
2486
+ size: "small",
2487
+ class: "noevent"
2488
+ }, {
2489
+ default: _(() => [
2490
+ te(I(t($)), 1)
2491
+ ]),
2492
+ _: 1
2493
+ })
2494
+ ]),
2495
+ default: _(({ it: R }) => [
2496
+ c("div", co, [
2497
+ N(l, {
2498
+ status: R.status,
2499
+ nolabel: ""
2500
+ }, null, 8, ["status"]),
2501
+ c("span", null, I(R.name), 1)
2502
+ ])
2503
+ ]),
2504
+ footer: _(() => [
2505
+ c("div", po, [
2506
+ N(z, {
2507
+ type: "primary",
2508
+ onClick: ie(V, ["stop"])
2509
+ }, {
2510
+ default: _(() => [
2511
+ te(I(i.$l("Confirm")), 1)
2512
+ ]),
2513
+ _: 1
2514
+ })
2515
+ ])
2516
+ ]),
2517
+ _: 1
2518
+ }, 16, ["modelValue", "options", "placeholder", "label", "value", "disabled"])) : (p(), M("div", mo, [
2519
+ c("div", fo, [
2520
+ N(z, {
2521
+ circle: "",
2522
+ onClick: w[1] || (w[1] = (R) => i.$copy(t(o).single, "ID"))
2523
+ }, {
2524
+ icon: _(() => w[3] || (w[3] = [
2525
+ c("i", { class: "imicon im-copy" }, null, -1)
2526
+ ])),
2527
+ _: 1
2528
+ })
2529
+ ]),
2530
+ N(L, K({
2531
+ modelValue: t(o).single,
2532
+ "onUpdate:modelValue": w[2] || (w[2] = (R) => t(o).single = R),
2533
+ placeholder: t(C),
2534
+ clearable: "",
2535
+ filterable: ""
2536
+ }, i.$attrs, {
2537
+ disabled: t(d),
2538
+ class: "inputGroupRight",
2539
+ onChange: b
2540
+ }), ee({
2541
+ default: _(() => [
2542
+ (p(!0), M(oe, null, le(t(o).options, (R, U) => (p(), Y(S, {
2543
+ key: U,
2544
+ label: i.$l(R.name),
2545
+ value: R[e.value]
2546
+ }, {
2547
+ default: _(() => [
2548
+ c("div", go, [
2549
+ N(l, {
2550
+ status: R.status,
2551
+ nolabel: ""
2552
+ }, null, 8, ["status"]),
2553
+ c("span", null, I(R.name), 1)
2554
+ ])
2555
+ ]),
2556
+ _: 2
2557
+ }, 1032, ["label", "value"]))), 128))
2558
+ ]),
2559
+ _: 2
2560
+ }, [
2561
+ t(u) ? {
2562
+ name: "prefix",
2563
+ fn: _(() => [
2564
+ N(l, {
2565
+ status: t(u).status,
2566
+ nolabel: ""
2567
+ }, null, 8, ["status"])
2568
+ ]),
2569
+ key: "0"
2570
+ } : void 0
2571
+ ]), 1040, ["modelValue", "placeholder", "disabled"])
2572
+ ]))
2573
+ ]);
2574
+ };
2575
+ }
2576
+ }), ho = { class: "SuperAsaApp relative" }, _o = { class: "flexMode vc g8" }, bo = { class: "txt-nowrap" }, vo = { class: "txt-dark5" }, wo = /* @__PURE__ */ Object.assign({
2577
+ name: "SuperAsaApp"
2578
+ }, {
2579
+ __name: "index",
2580
+ props: {
2581
+ modelValue: {
2582
+ type: Number,
2583
+ default: null
2584
+ },
2585
+ multiple: {
2586
+ type: Boolean,
2587
+ default: !1
2588
+ },
2589
+ placeholder: {
2590
+ type: String,
2591
+ default: ""
2592
+ },
2593
+ useDefault: {
2594
+ type: Boolean,
2595
+ default: !1
2596
+ },
2597
+ aiDefault: {
2598
+ type: Boolean,
2599
+ default: !1
2600
+ }
2601
+ },
2602
+ emits: [
2603
+ "change",
2604
+ "success",
2605
+ "update:icon",
2606
+ "update:orgs",
2607
+ "update:name"
2608
+ ],
2609
+ setup(A, { emit: x }) {
2610
+ const s = A, e = reactive({
2611
+ loading: !1,
2612
+ single: "",
2613
+ multiple: [],
2614
+ options: []
2615
+ }), h = inject("store").asa();
2616
+ onMounted(() => {
2617
+ y();
2618
+ });
2619
+ const a = x, y = async () => {
2620
+ if (V.value.length) {
2621
+ a("success");
2622
+ return;
2623
+ }
2624
+ e.loading = !0, await h.getAppOptions(), e.loading = !1, a("success");
2625
+ }, k = (f) => {
2626
+ a("update:modelValue", f);
2627
+ const { data: r } = h.appOptions.filter1((C) => C.id === e.single);
2628
+ r && (a("update:name", r.name), a("update:icon", r.icon), a("update:orgs", r.orgs)), a("change", f);
2629
+ }, V = computed(() => h.appOptions), O = computed(() => s.placeholder ? window.$l(s.placeholder) : window.$l("App")), b = computed(() => V.value.filter1((r) => r.id === e.single).data);
2630
+ return watch(
2631
+ () => s.modelValue,
2632
+ (f) => {
2633
+ f && f !== e.v && (e.single = f, k(f));
2634
+ },
2635
+ {
2636
+ immediate: !0
2637
+ }
2638
+ ), watch(
2639
+ () => V.value,
2640
+ (f) => {
2641
+ (s.useDefault && (f == null ? void 0 : f.length) === 1 || s.aiDefault && f.length > 0) && (e.single = f[0].id, k(f[0].id));
2642
+ },
2643
+ {
2644
+ immediate: !0
2645
+ }
2646
+ ), (f, r) => {
2647
+ const C = D("IconLoading"), u = D("Image"), m = D("el-option"), $ = D("el-select");
2648
+ return p(), M("div", ho, [
2649
+ t(e).loading ? (p(), Y(C, { key: 0 })) : B("", !0),
2650
+ N($, K({
2651
+ modelValue: t(e).single,
2652
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => t(e).single = d),
2653
+ placeholder: t(O),
2654
+ filterable: "",
2655
+ clearable: "",
2656
+ "default-first-option": "",
2657
+ "fit-input-width": ""
2658
+ }, f.$attrs, { onChange: k }), ee({
2659
+ default: _(() => [
2660
+ (p(!0), M(oe, null, le(t(V), (d, i) => (p(), Y(m, {
2661
+ key: i,
2662
+ label: d.label,
2663
+ value: d.id
2664
+ }, {
2665
+ default: _(() => [
2666
+ c("div", _o, [
2667
+ N(u, {
2668
+ src: d.icon,
2669
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2670
+ }, null, 8, ["src"]),
2671
+ c("span", bo, I(d.name), 1),
2672
+ c("span", vo, "(" + I(d.id) + ")", 1)
2673
+ ])
2674
+ ]),
2675
+ _: 2
2676
+ }, 1032, ["label", "value"]))), 128))
2677
+ ]),
2678
+ _: 2
2679
+ }, [
2680
+ t(b) ? {
2681
+ name: "prefix",
2682
+ fn: _(() => [
2683
+ N(u, {
2684
+ src: t(b).icon,
2685
+ class: "noShrink w24 h24 radius radius4 border-dark1"
2686
+ }, null, 8, ["src"])
2687
+ ]),
2688
+ key: "0"
2689
+ } : void 0
2690
+ ]), 1040, ["modelValue", "placeholder"])
2691
+ ]);
2692
+ };
2693
+ }
2694
+ }), $o = { class: "SuperAsaCampaign relative" }, So = { class: "outsideIgnore" }, Co = { class: "flexMode vc g8" }, ko = {
2695
+ key: 0,
2696
+ class: "imicon im-writing"
2697
+ }, xo = { class: "txt-nowrap" }, Vo = { class: "flexMode hr outsideIgnore" }, To = {
2698
+ key: 2,
2699
+ class: "inputGroup"
2700
+ }, Oo = { class: "inputGroupLeft noShrink" }, Mo = { class: "flexMode vc g8" }, Ao = {
2701
+ key: 0,
2702
+ class: "imicon im-writing"
2703
+ }, Do = { class: "txt-nowrap" }, Io = /* @__PURE__ */ Object.assign({
2704
+ name: "SuperAsaCampaign"
2705
+ }, {
2706
+ __name: "index",
2707
+ props: {
2708
+ modelValue: {
2709
+ type: [Array, Number],
2710
+ defualt: 0
2711
+ },
2712
+ app: {
2713
+ type: [Number, Array],
2714
+ default: 0
2715
+ },
2716
+ org: {
2717
+ type: [String, Number, Array],
2718
+ default: 0
2719
+ },
2720
+ value: {
2721
+ type: String,
2722
+ default: "id"
2723
+ },
2724
+ multiple: {
2725
+ type: Boolean,
2726
+ default: !1
2727
+ },
2728
+ useex: {
2729
+ type: Boolean,
2730
+ default: !1
2731
+ },
2732
+ type: {
2733
+ type: String,
2734
+ default: "APPSTORE_SEARCH_RESULTS,APPSTORE_SEARCH_TAB,APPSTORE_TODAY_TAB,APPSTORE_PRODUCT_PAGES_BROWSE"
2735
+ },
2736
+ force: {
2737
+ type: Boolean,
2738
+ default: !1
2739
+ }
2740
+ },
2741
+ emits: [
2742
+ "change",
2743
+ "confirm",
2744
+ "update:modelValue",
2745
+ "update:name",
2746
+ "update:adplacement",
2747
+ "success"
2748
+ ],
2749
+ setup(A, { expose: x, emit: s }) {
2750
+ const e = A, o = reactive({
2751
+ loading: !1,
2752
+ single: "",
2753
+ multiple: [],
2754
+ options: [],
2755
+ filterTxt: ""
2756
+ }), { proxy: h } = getCurrentInstance();
2757
+ inject("store").common();
2758
+ const y = s, k = async (T) => {
2759
+ o.loading = !0;
2760
+ const { code: l, data: n } = await window.$post({
2761
+ url: window.$api.asa.campaignOptions,
2762
+ data: {
2763
+ appId: e.app,
2764
+ orgId: e.org
2765
+ },
2766
+ ex: e.useex ? e.org : +/* @__PURE__ */ new Date()
2767
+ });
2768
+ o.loading = !1, l === 200 && (o.options = n.map((S) => (S.oc = `${S.orgId}_${S.id}`, S)).filter((S) => e.type.includes(S.adPlacement)), y("success", o.options));
2769
+ }, V = () => {
2770
+ h.$refs.multipleSelect.blur(), y("confirm");
2771
+ }, O = (T) => {
2772
+ y("update:modelValue", T), y("change", T);
2773
+ const l = {};
2774
+ d.value.filter((S) => T.indexOf(S.id) > -1).forEach((S) => {
2775
+ l[S.adChannelType] = !0;
2776
+ });
2777
+ const n = T.map((S) => {
2778
+ const { data: L } = d.value.filter1((R) => R[e.value] === S);
2779
+ return L ? L.name : `Unknown Name ${S}`;
2780
+ });
2781
+ y("update:name", n), y("update:ad-type", Object.keys(l));
2782
+ }, b = (T) => {
2783
+ var l, n;
2784
+ y("update:modelValue", T), y("update:adplacement", (l = $.value) == null ? void 0 : l.adPlacement), y("update:name", (n = $.value) == null ? void 0 : n.name), y("change", T);
2785
+ }, f = (T) => {
2786
+ var l, n;
2787
+ y("update:modelValue", T), y("update:adplacement", (l = $.value) == null ? void 0 : l.adPlacement), y("update:name", (n = $.value) == null ? void 0 : n.name);
2788
+ }, r = () => {
2789
+ o.multiple = d.value.filter((T) => {
2790
+ if (T.hide === !1)
2791
+ return T;
2792
+ }).map((T) => T[e.value]), y("update:modelValue", o.multiple);
2793
+ }, C = (T) => {
2794
+ o.filterTxt = T;
2795
+ }, u = () => {
2796
+ k();
2797
+ }, m = computed(() => window.$l("Campaign")), $ = computed(() => o.single ? o.options.filter1((T) => T[e.value] === o.single).data : ""), d = computed(() => o.filterTxt ? o.options.map((T) => (T.name.includes(o.filterTxt) && e.type.includes(T.adPlacement) ? T.hide = !1 : T.hide = !0, T)) : o.options.map((l) => (e.type.includes(l.adPlacement) ? l.hide = !1 : l.hide = !0, l))), i = computed(() => d.value.filter((T) => T.hide === !1).length), w = computed(() => window.$getType(e.app) === "Array" ? e.app.join(",") : e.app), g = computed(() => window.$getType(e.org) === "Array" ? e.org.join(",") : e.org);
2798
+ computed(() => `${w.value} ${g.value}`), computed(() => e.app && e.org);
2799
+ const z = computed(() => !e.org);
2800
+ return watch(
2801
+ () => e.org,
2802
+ (T, l) => {
2803
+ T && T !== l && k();
2804
+ },
2805
+ {
2806
+ immediate: !0
2807
+ }
2808
+ ), watch(
2809
+ () => e.modelValue,
2810
+ (T) => {
2811
+ e.multiple ? JSON.stringify(o.multiple) !== JSON.stringify(T) && (o.multiple = T) : o.single !== T && (o.single = T, f(T));
2812
+ },
2813
+ {
2814
+ immediate: !0
2815
+ }
2816
+ ), watch(
2817
+ () => o.options,
2818
+ (T) => {
2819
+ T != null && T.length && !e.multiple && f(e.modelValue);
2820
+ },
2821
+ {
2822
+ immediate: !0
2823
+ }
2824
+ ), x({
2825
+ reload: u
2826
+ }), (T, l) => {
2827
+ const n = D("IconLoading"), S = D("el-button"), L = D("el-tag"), R = D("StatusItem"), U = D("MultipleSelect"), Z = D("el-option"), W = D("el-select");
2828
+ return p(), M("div", $o, [
2829
+ t(o).loading ? (p(), Y(n, { key: 0 })) : B("", !0),
2830
+ e.multiple ? (p(), Y(U, K({
2831
+ key: 1,
2832
+ ref: "multipleSelect",
2833
+ modelValue: t(o).multiple,
2834
+ "onUpdate:modelValue": l[0] || (l[0] = (P) => t(o).multiple = P),
2835
+ options: t(d),
2836
+ placeholder: T.$l(t(m)),
2837
+ clearable: "",
2838
+ label: "name",
2839
+ value: e.value,
2840
+ disabled: t(z),
2841
+ filterable: "",
2842
+ "filter-method": C,
2843
+ "collapse-tags": "",
2844
+ "collapse-tags-tooltip": ""
2845
+ }, T.$attrs, { onChange: O }), {
2846
+ header: _(() => [
2847
+ c("div", So, [
2848
+ t(o).filterTxt ? (p(), Y(S, {
2849
+ key: 0,
2850
+ onClick: r,
2851
+ class: "outsideIgnore"
2852
+ }, {
2853
+ default: _(() => [
2854
+ te(I(T.$l("Select All")), 1)
2855
+ ]),
2856
+ _: 1
2857
+ })) : B("", !0)
2858
+ ]),
2859
+ N(L, {
2860
+ type: "info",
2861
+ effect: "light",
2862
+ round: "",
2863
+ size: "small",
2864
+ class: "noevent"
2865
+ }, {
2866
+ default: _(() => [
2867
+ te(I(t(i)), 1)
2868
+ ]),
2869
+ _: 1
2870
+ })
2871
+ ]),
2872
+ default: _(({ it: P }) => [
2873
+ c("div", Co, [
2874
+ N(R, {
2875
+ status: P.status,
2876
+ nolabel: "",
2877
+ class: "noShrink"
2878
+ }, null, 8, ["status"]),
2879
+ P.readonly === !1 ? (p(), M("i", ko)) : B("", !0),
2880
+ c("span", xo, I(P.name), 1)
2881
+ ])
2882
+ ]),
2883
+ footer: _(() => [
2884
+ c("div", Vo, [
2885
+ N(S, {
2886
+ type: "primary",
2887
+ onClick: ie(V, ["stop"])
2888
+ }, {
2889
+ default: _(() => [
2890
+ te(I(T.$l("Confirm")), 1)
2891
+ ]),
2892
+ _: 1
2893
+ })
2894
+ ])
2895
+ ]),
2896
+ _: 1
2897
+ }, 16, ["modelValue", "options", "placeholder", "value", "disabled"])) : (p(), M("div", To, [
2898
+ c("div", Oo, [
2899
+ N(S, {
2900
+ circle: "",
2901
+ onClick: l[1] || (l[1] = (P) => T.$copy(t(o).single, "ID"))
2902
+ }, {
2903
+ icon: _(() => l[3] || (l[3] = [
2904
+ c("i", { class: "imicon im-copy" }, null, -1)
2905
+ ])),
2906
+ _: 1
2907
+ })
2908
+ ]),
2909
+ N(W, K({
2910
+ modelValue: t(o).single,
2911
+ "onUpdate:modelValue": l[2] || (l[2] = (P) => t(o).single = P),
2912
+ placeholder: t(m),
2913
+ clearable: "",
2914
+ filterable: "",
2915
+ disabled: t(z)
2916
+ }, T.$attrs, {
2917
+ class: "inputGroupRight",
2918
+ onChange: b
2919
+ }), ee({
2920
+ default: _(() => [
2921
+ (p(!0), M(oe, null, le(t(d), (P, ne) => (p(), Y(Z, {
2922
+ key: ne,
2923
+ label: P.name,
2924
+ value: P[e.value]
2925
+ }, {
2926
+ default: _(() => [
2927
+ c("div", Mo, [
2928
+ N(R, {
2929
+ status: P.status,
2930
+ nolabel: "",
2931
+ class: "noShrink"
2932
+ }, null, 8, ["status"]),
2933
+ P.readonly === !1 ? (p(), M("i", Ao)) : B("", !0),
2934
+ c("span", Do, I(P.name), 1)
2935
+ ])
2936
+ ]),
2937
+ _: 2
2938
+ }, 1032, ["label", "value"]))), 128))
2939
+ ]),
2940
+ _: 2
2941
+ }, [
2942
+ t($) ? {
2943
+ name: "prefix",
2944
+ fn: _(() => [
2945
+ N(R, {
2946
+ status: t($).status,
2947
+ nolabel: "",
2948
+ class: "noShrink"
2949
+ }, null, 8, ["status"])
2950
+ ]),
2951
+ key: "0"
2952
+ } : void 0
2953
+ ]), 1040, ["modelValue", "placeholder", "disabled"])
2954
+ ]))
2955
+ ]);
2956
+ };
2957
+ }
2958
+ }), No = { class: "SuperAsaOrg relative" }, zo = { class: "inputGroup" }, jo = { class: "inputGroupLeft noShrink" }, Bo = { class: "flexMode vc g4" }, Yo = { class: "txt-dark5" }, Eo = /* @__PURE__ */ Object.assign({
2959
+ name: "SuperAsaOrg"
2960
+ }, {
2961
+ __name: "index",
2962
+ props: {
2963
+ app: {
2964
+ type: Number,
2965
+ default: 0
2966
+ },
2967
+ changeImmediately: {
2968
+ type: Boolean,
2969
+ default: !1
2970
+ },
2971
+ modelValue: {
2972
+ type: [Number, String],
2973
+ default: 0
2974
+ },
2975
+ readonly: {
2976
+ type: Boolean,
2977
+ default: !1
2978
+ },
2979
+ unTimezone: {
2980
+ type: Boolean,
2981
+ default: !1
2982
+ }
2983
+ },
2984
+ emits: [
2985
+ "update:modelValue",
2986
+ "update:name",
2987
+ "update:currency",
2988
+ "update:readonly",
2989
+ "success",
2990
+ "error",
2991
+ "change"
2992
+ ],
2993
+ setup(A, { emit: x }) {
2994
+ const s = A, e = reactive({
2995
+ loading: !1,
2996
+ single: "",
2997
+ multiple: [],
2998
+ options: []
2999
+ }), h = inject("store").asa();
3000
+ onMounted(() => {
3001
+ y();
3002
+ });
3003
+ const a = x, y = async () => {
3004
+ f.value.length ? (e.single || k(f.value[0].id), a("success")) : a("error");
3005
+ }, k = (u) => {
3006
+ var m, $, d, i;
3007
+ a("update:modelValue", u), a("update:name", (m = r.value) == null ? void 0 : m.name), a("update:currency", ($ = r.value) == null ? void 0 : $.currency), a("update:timezone", (d = r.value) == null ? void 0 : d.timezone), a("update:readonly", (i = r.value) == null ? void 0 : i.readonly), s.changeImmediately && a("change", u), s.unTimezone || V();
3008
+ }, V = () => {
3009
+ var m;
3010
+ let u = r.value;
3011
+ h.saveData("accountTimezone", {
3012
+ timezoneName: u == null ? void 0 : u.timezone,
3013
+ tip: "Account",
3014
+ timezone: (m = window.$map.common.timezone.filter1(
3015
+ ($) => $.label === (u == null ? void 0 : u.timezone)
3016
+ ).data) == null ? void 0 : m.value
3017
+ });
3018
+ }, O = () => {
3019
+ e.single = "", a("update:modelValue", ""), a("update:name", ""), a("update:currency", ""), a("update:timezone", ""), a("update:readonly", !1);
3020
+ }, b = computed(() => window.$l("Campaign Group")), f = computed(() => {
3021
+ var u;
3022
+ return s.app ? ((u = h.appOptions.filter1((m) => m.id === s.app).data) == null ? void 0 : u.orgs) || [] : [];
3023
+ }), r = computed(() => f.value.filter1((u) => u.id === e.single).data), C = computed(() => !s.app);
3024
+ return watch(
3025
+ () => s.modelValue,
3026
+ (u) => {
3027
+ u ? u !== e.single && (e.single = u, k(u)) : O();
3028
+ },
3029
+ {
3030
+ immediate: !0
3031
+ }
3032
+ ), (u, m) => {
3033
+ const $ = D("IconLoading"), d = D("el-button"), i = D("el-option"), w = D("el-select");
3034
+ return p(), M("div", No, [
3035
+ t(e).loading ? (p(), Y($, { key: 0 })) : B("", !0),
3036
+ c("div", zo, [
3037
+ c("div", jo, [
3038
+ N(d, {
3039
+ circle: "",
3040
+ onClick: m[0] || (m[0] = (g) => u.$copy(t(e).single, "ID"))
3041
+ }, {
3042
+ icon: _(() => m[2] || (m[2] = [
3043
+ c("i", { class: "imicon im-copy" }, null, -1)
3044
+ ])),
3045
+ _: 1
3046
+ })
3047
+ ]),
3048
+ N(w, K({
3049
+ modelValue: t(e).single,
3050
+ "onUpdate:modelValue": m[1] || (m[1] = (g) => t(e).single = g),
3051
+ placeholder: t(b),
3052
+ disabled: t(C),
3053
+ filterable: ""
3054
+ }, u.$attrs, {
3055
+ class: "inputGroupRight",
3056
+ onChange: k
3057
+ }), {
3058
+ default: _(() => [
3059
+ (p(!0), M(oe, null, le(t(f), (g, z) => (p(), Y(i, {
3060
+ key: z,
3061
+ label: `${g.name} (${g.id})`,
3062
+ value: g.id,
3063
+ disabled: s.readonly && g.readonly
3064
+ }, {
3065
+ default: _(() => [
3066
+ c("div", Bo, [
3067
+ c("i", {
3068
+ class: G(["imicon", g.readonly ? "" : "im-writing"])
3069
+ }, null, 2),
3070
+ c("span", null, I(g.name), 1),
3071
+ c("span", Yo, "(" + I(g.id) + ")", 1)
3072
+ ])
3073
+ ]),
3074
+ _: 2
3075
+ }, 1032, ["label", "value", "disabled"]))), 128))
3076
+ ]),
3077
+ _: 1
3078
+ }, 16, ["modelValue", "placeholder", "disabled"])
3079
+ ])
3080
+ ]);
3081
+ };
3082
+ }
3083
+ }), Lo = /* @__PURE__ */ Object.assign({
3084
+ name: "SuperCountry"
3085
+ }, {
3086
+ __name: "index",
3087
+ props: {
3088
+ type: {
3089
+ type: String,
3090
+ default: "aso"
3091
+ },
3092
+ nowrap: {
3093
+ type: Boolean,
3094
+ default: !1
3095
+ }
3096
+ },
3097
+ setup(A) {
3098
+ const x = defineAsyncComponent(() => Promise.resolve().then(() => Ll)), s = defineAsyncComponent(() => Promise.resolve().then(() => Ul)), e = {
3099
+ CountryAso: x,
3100
+ CountryDiy: s
3101
+ }, o = A, h = computed(() => e["Country" + window.$toUpperCamel(o.type)]), a = computed(() => o.nowrap);
3102
+ return (y, k) => (p(), M("div", {
3103
+ class: G(["SuperCountry", o.nowrap && "nowrap"])
3104
+ }, [
3105
+ (p(), Y(Ce(t(h)), K(y.$attrs, {
3106
+ "collapse-tags": t(a),
3107
+ "collapse-tags-tooltip": t(a)
3108
+ }), null, 16, ["collapse-tags", "collapse-tags-tooltip"]))
3109
+ ], 2));
3110
+ }
3111
+ }), Ro = ["title"], Po = {
3112
+ key: 0,
3113
+ class: "pl4"
3114
+ }, Fo = /* @__PURE__ */ Object.assign({
3115
+ name: "SuperCountryItem"
3116
+ }, {
3117
+ __name: "index",
3118
+ props: {
3119
+ name: {
3120
+ type: String,
3121
+ default: ""
3122
+ },
3123
+ nolabel: {
3124
+ type: Boolean,
3125
+ default: !1
3126
+ },
3127
+ size: {
3128
+ type: [String, Number],
3129
+ default: 16
3130
+ },
3131
+ radius: {
3132
+ type: [String, Number],
3133
+ default: 8
3134
+ }
3135
+ },
3136
+ setup(A) {
3137
+ const x = A;
3138
+ reactive({});
3139
+ const e = inject("store").common(), o = computed(() => {
3140
+ const V = x.name.toLowerCase();
3141
+ return e.countryObj[V] || window.$map.country.countryAllObj[V] || {};
3142
+ }), h = computed(() => `fi-${o.value.value_lower}`);
3143
+ computed(() => window.$getLang());
3144
+ const a = computed(() => window.$l(o.value.label)), y = computed(() => {
3145
+ const V = parseInt(x.size);
3146
+ return {
3147
+ width: V + "px",
3148
+ height: V + "px"
3149
+ };
3150
+ }), k = computed(() => `radius${Number(x.radius) || 2}`);
3151
+ return window.$map.country.countryAllObj, (V, O) => (p(), M("div", {
3152
+ class: "SuperCountryItem flexMode vc g4",
3153
+ title: t(a)
3154
+ }, [
3155
+ c("span", {
3156
+ class: G(["box-shadow-gray3 fi fis noShrink", [t(h), t(k)]]),
3157
+ style: se(t(y))
3158
+ }, null, 6),
3159
+ x.nolabel ? B("", !0) : (p(), M("span", Po, I(t(a)), 1))
3160
+ ], 8, Ro));
3161
+ }
3162
+ }), Uo = { class: "SuperOrg relative wp100" }, Go = /* @__PURE__ */ Object.assign({
3163
+ name: "SuperOrg",
3164
+ inheritAttrs: !1
3165
+ }, {
3166
+ __name: "index",
3167
+ props: {
3168
+ modelValue: {
3169
+ type: [Number, String],
3170
+ default: ""
3171
+ },
3172
+ permission: {
3173
+ type: String,
3174
+ default: "all"
3175
+ }
3176
+ },
3177
+ emits: "change",
3178
+ setup(A, { emit: x }) {
3179
+ const s = A, e = reactive({
3180
+ loading: !1,
3181
+ v: "",
3182
+ orgOptions: []
3183
+ }), h = inject("store").asa();
3184
+ onMounted(() => {
3185
+ y();
3186
+ });
3187
+ const a = x, y = async () => {
3188
+ if (h.orgOptions.length > 0) {
3189
+ e.orgOptions = h.orgOptions, a("success", e.orgOptions), pe(() => {
3190
+ const f = e.orgOptions.filter1(
3191
+ (r) => r.orgId === e.v
3192
+ ).data;
3193
+ a("update:paymentModel", f == null ? void 0 : f.paymentModel);
3194
+ });
3195
+ return;
3196
+ }
3197
+ e.loading = !0;
3198
+ const { code: O, data: b } = await window.$post({
3199
+ url: window.$api.asa.orgOptions
3200
+ });
3201
+ e.loading = !1, O === 200 && (e.orgOptions = b.map((f) => (f.label = `${f.orgName} (${f.orgId})`, f)), h.saveData("orgOptions", e.orgOptions), pe(() => {
3202
+ const f = e.orgOptions.filter1(
3203
+ (r) => r.orgId === e.v
3204
+ ).data;
3205
+ a("update:paymentModel", f == null ? void 0 : f.paymentModel);
3206
+ }), a("success", e.orgOptions));
3207
+ }, k = (O) => {
3208
+ a("update:modelValue", O);
3209
+ const b = e.orgOptions.filter1((f) => f.orgId === O).data;
3210
+ a("update:currency", b == null ? void 0 : b.currency), a("update:name", b == null ? void 0 : b.orgName), a("update:timezone", b == null ? void 0 : b.timezone), a("update:paymentModel", b == null ? void 0 : b.paymentModel), a("change", O);
3211
+ }, V = computed(() => {
3212
+ if (s.permission === "all")
3213
+ return e.orgOptions;
3214
+ {
3215
+ const O = s.permission === "readonly";
3216
+ return e.orgOptions.filter((f) => f.readonly === O);
3217
+ }
3218
+ });
3219
+ return watch(
3220
+ () => s.modelValue,
3221
+ (O) => {
3222
+ O ? O !== e.v && (e.v = O, pe(() => {
3223
+ const b = e.orgOptions.filter1(
3224
+ (f) => f.orgId === e.v
3225
+ ).data;
3226
+ a("update:paymentModel", b == null ? void 0 : b.paymentModel);
3227
+ })) : e.v = "";
3228
+ },
3229
+ {
3230
+ immediate: !0
3231
+ }
3232
+ ), (O, b) => {
3233
+ const f = D("IconLoading"), r = D("el-option"), C = D("el-select");
3234
+ return p(), M("div", Uo, [
3235
+ t(e).loading ? (p(), Y(f, { key: 0 })) : B("", !0),
3236
+ N(C, {
3237
+ modelValue: t(e).v,
3238
+ "onUpdate:modelValue": b[0] || (b[0] = (u) => t(e).v = u),
3239
+ filterable: "",
3240
+ "collapse-tags": "",
3241
+ placeholder: " ",
3242
+ class: "wp100",
3243
+ onChange: k
3244
+ }, {
3245
+ default: _(() => [
3246
+ (p(!0), M(oe, null, le(t(V), (u, m) => (p(), Y(r, {
3247
+ key: m,
3248
+ label: u.label,
3249
+ value: u.orgId
3250
+ }, null, 8, ["label", "value"]))), 128))
3251
+ ]),
3252
+ _: 1
3253
+ }, 8, ["modelValue"])
3254
+ ]);
3255
+ };
3256
+ }
3257
+ }), Ho = { class: "SuperStatusItem flexMode vc g8" }, Jo = /* @__PURE__ */ Object.assign({
3258
+ name: "SuperStatusItem"
3259
+ }, {
3260
+ __name: "index",
3261
+ props: {
3262
+ status: {
3263
+ type: String,
3264
+ default: ""
3265
+ },
3266
+ nolabel: {
3267
+ type: Boolean,
3268
+ default: !1
3269
+ },
3270
+ size: {
3271
+ type: String,
3272
+ default: "small"
3273
+ },
3274
+ lang: {
3275
+ type: String,
3276
+ default: ""
3277
+ },
3278
+ isButton: {
3279
+ type: Boolean,
3280
+ default: !1
3281
+ },
3282
+ id1: {
3283
+ type: String,
3284
+ default: ""
3285
+ },
3286
+ id2: {
3287
+ type: String,
3288
+ default: ""
3289
+ },
3290
+ id3: {
3291
+ type: String,
3292
+ default: ""
3293
+ }
3294
+ },
3295
+ emits: ["changeStatus"],
3296
+ setup(A, { emit: x }) {
3297
+ const s = A, e = x, o = () => {
3298
+ s.isButton && e("changeStatus", s.status, s.id1, s.id2, s.id3);
3299
+ }, h = computed(() => window.$map.statusMap[s.status] || !1), a = computed(() => window.$toUpperCamel(s.status));
3300
+ computed(() => s.lang || window.$getLang());
3301
+ const y = computed(() => k[s.size] || "fs12"), k = {
3302
+ small: "fs12",
3303
+ default: "fs16",
3304
+ large: "fs24"
3305
+ };
3306
+ return (V, O) => (p(), M("div", Ho, [
3307
+ t(h) ? (p(), M("i", {
3308
+ key: 0,
3309
+ class: G(["imicon", [
3310
+ t(h).class,
3311
+ t(y),
3312
+ s.isButton && s.status !== "DELETED" ? t(h).button_class : ""
3313
+ ]]),
3314
+ onClick: o
3315
+ }, null, 2)) : B("", !0),
3316
+ s.nolabel ? B("", !0) : (p(), M("span", {
3317
+ key: 1,
3318
+ class: G(["txt-h1", t(y)])
3319
+ }, I(V.$l(t(h) ? t(h).label : t(a))), 3))
3320
+ ]));
3321
+ }
3322
+ }), Ko = { class: "SuperStatusSelect" }, Wo = /* @__PURE__ */ Object.assign({
3323
+ name: "SuperStatusSelect"
3324
+ }, {
3325
+ __name: "index",
3326
+ props: {
3327
+ modelValue: {
3328
+ type: String,
3329
+ default: ""
3330
+ },
3331
+ options: {
3332
+ type: Array,
3333
+ default: () => []
3334
+ },
3335
+ placeholder: {
3336
+ type: String,
3337
+ default: ""
3338
+ }
3339
+ },
3340
+ setup(A) {
3341
+ const x = A, s = reactive({
3342
+ v: ""
3343
+ }), { proxy: e } = getCurrentInstance(), o = computed(() => window.$getLang()), h = computed(() => e.$slots), a = computed(() => x.options.length ? x.options : ["RUNNING", "PAUSED"]), y = computed(() => {
3344
+ const V = x.placeholder || "Status";
3345
+ return window.$l(V);
3346
+ });
3347
+ watchEffect(() => {
3348
+ s.v = x.modelValue;
3349
+ });
3350
+ const k = window.$map.statusMap;
3351
+ return (V, O) => {
3352
+ const b = D("StatusItem"), f = D("el-option"), r = D("el-select");
3353
+ return p(), M("div", Ko, [
3354
+ N(r, K({
3355
+ modelValue: t(s).v,
3356
+ "onUpdate:modelValue": O[0] || (O[0] = (C) => t(s).v = C),
3357
+ "collapse-tags": "",
3358
+ "collapse-tags-tooltip": ""
3359
+ }, V.$attrs, {
3360
+ placeholder: t(y),
3361
+ onChange: V.change
3362
+ }), ee({
3363
+ default: _(() => [
3364
+ (p(!0), M(oe, null, le(t(a), (C, u) => (p(), Y(f, {
3365
+ key: C,
3366
+ label: V.$l(t(k)[C].label),
3367
+ value: C
3368
+ }, {
3369
+ default: _(() => [
3370
+ N(b, {
3371
+ status: C,
3372
+ lang: t(o)
3373
+ }, null, 8, ["status", "lang"])
3374
+ ]),
3375
+ _: 2
3376
+ }, 1032, ["label", "value"]))), 128))
3377
+ ]),
3378
+ _: 2
3379
+ }, [
3380
+ t(s).v ? {
3381
+ name: "prefix",
3382
+ fn: _(() => [
3383
+ t(h).prefix ? H(V.$slots, "prefix", { key: 0 }) : (p(), Y(b, {
3384
+ key: 1,
3385
+ status: t(s).v,
3386
+ nolabel: "",
3387
+ lang: t(o)
3388
+ }, null, 8, ["status", "lang"]))
3389
+ ]),
3390
+ key: "0"
3391
+ } : void 0
3392
+ ]), 1040, ["modelValue", "placeholder", "onChange"])
3393
+ ]);
3394
+ };
3395
+ }
3396
+ }), Zl = {
3397
+ Card: Me,
3398
+ DatePicker: De,
3399
+ EChart: je,
3400
+ Icon: Ee,
3401
+ Image: Fe,
3402
+ Input: Ge,
3403
+ MultipleSelect: tt,
3404
+ Nodata: at,
3405
+ Page: pt,
3406
+ Table: Ht,
3407
+ Textarea: qt,
3408
+ AiApp: to,
3409
+ AiOrg: ro,
3410
+ AsaAdGroup: yo,
3411
+ AsaApp: wo,
3412
+ AsaCampaign: Io,
3413
+ AsaOrg: Eo,
3414
+ Country: Lo,
3415
+ CountryItem: Fo,
3416
+ Org: Go,
3417
+ StatusItem: Jo,
3418
+ StatusSelect: Wo
3419
+ }, qo = { class: "dragCenter flexMode vc flexGrow txt-nowrap" }, Zo = { class: "pl10 fs14 txt-h2" }, Qo = { class: "pb5 fs12 txt-primary3" }, Xo = /* @__PURE__ */ Object.assign({
3420
+ name: "ColumnConfigDragItem"
3421
+ }, {
3422
+ __name: "DragItem",
3423
+ props: {
3424
+ modelValue: {
3425
+ type: Object,
3426
+ default: /* @__PURE__ */ Object.create(null)
3427
+ },
3428
+ it: {
3429
+ type: Object,
3430
+ default: /* @__PURE__ */ Object.create(null)
3431
+ },
3432
+ index: {
3433
+ type: Number,
3434
+ default: 0
3435
+ },
3436
+ type: {
3437
+ type: String,
3438
+ default: "center"
3439
+ },
3440
+ lang: {
3441
+ type: String,
3442
+ default: "en_us"
3443
+ }
3444
+ },
3445
+ setup(A, { emit: x }) {
3446
+ const s = A, e = reactive({
3447
+ editMode: !1,
3448
+ form: {},
3449
+ info: {}
3450
+ });
3451
+ onMounted(() => {
3452
+ e.form = s.it;
3453
+ });
3454
+ const o = x, h = () => {
3455
+ o("add-left", s);
3456
+ }, a = () => {
3457
+ o("add-right", s);
3458
+ }, y = (O) => {
3459
+ o("change", { it: e.form, index: s.index, type: s.type });
3460
+ };
3461
+ computed(() => e.form.align ? " " : V[0].label);
3462
+ const k = computed(() => s.it.nomove || e.editMode), V = [
3463
+ {
3464
+ label: "Left",
3465
+ value: "left"
3466
+ },
3467
+ {
3468
+ label: "Center",
3469
+ value: "center"
3470
+ },
3471
+ {
3472
+ label: "Right",
3473
+ value: "right"
3474
+ }
3475
+ ];
3476
+ return (O, b) => {
3477
+ const f = D("el-switch");
3478
+ return p(), M("div", {
3479
+ class: G(["ColumnConfigDragItem", [!t(k) && "drag", s.type]])
3480
+ }, [
3481
+ c("div", {
3482
+ class: G(["itemArea relative flexMode vc p4", [
3483
+ t(e).editMode && "edit",
3484
+ t(k) ? "cursor-disabled hover-bg-gray1" : "cursor-grab hover-bg-primary1"
3485
+ ]])
3486
+ }, [
3487
+ c("div", {
3488
+ class: "arrowLeft ml4 mr8 circle24 hover-txt-primary",
3489
+ onClick: ie(h, ["stop"])
3490
+ }, b[1] || (b[1] = [
3491
+ c("i", { class: "imicon im-arrow-left" }, null, -1)
3492
+ ])),
3493
+ c("div", qo, [
3494
+ N(f, {
3495
+ modelValue: t(e).form.visible,
3496
+ "onUpdate:modelValue": b[0] || (b[0] = (r) => t(e).form.visible = r),
3497
+ disabled: t(e).form.nomove,
3498
+ size: "default",
3499
+ onChange: y
3500
+ }, null, 8, ["modelValue", "disabled"]),
3501
+ c("span", Zo, I(t(e).form.label || t(e).form.type), 1)
3502
+ ]),
3503
+ c("span", Qo, I(t(e).form.tips), 1),
3504
+ c("div", {
3505
+ class: "arrowRight mr4 ml8 circle24 hover-txt-primary",
3506
+ onClick: ie(a, ["stop"])
3507
+ }, b[2] || (b[2] = [
3508
+ c("i", { class: "imicon im-arrow-right" }, null, -1)
3509
+ ]))
3510
+ ], 2)
3511
+ ], 2);
3512
+ };
3513
+ }
3514
+ }), fe = /* @__PURE__ */ ae(Xo, [["__scopeId", "data-v-696fbfee"]]), el = { class: "flexMode vs p16 g16" }, tl = { class: "lh12" }, ol = { class: "fs12 txt-primary" }, ll = { class: "fs12 txt-dark5" }, al = {
3515
+ key: 0,
3516
+ class: "fs12 txt-dark3"
3517
+ }, nl = {
3518
+ key: 0,
3519
+ class: "absCenter txt-nowrap txt-dark7 fs12"
3520
+ }, sl = { class: "lh12" }, rl = { class: "fs12 txt-primary" }, il = { class: "fs12 txt-dark5" }, dl = {
3521
+ key: 0,
3522
+ class: "fs12 txt-dark3"
3523
+ }, ul = {
3524
+ key: 0,
3525
+ class: "absCenter txt-nowrap txt-dark7 fs12"
3526
+ }, cl = { class: "lh12" }, pl = { class: "fs12 txt-primary" }, ml = { class: "fs12 txt-dark5" }, fl = {
3527
+ key: 0,
3528
+ class: "fs12 txt-dark3"
3529
+ }, gl = {
3530
+ key: 0,
3531
+ class: "absCenter txt-nowrap txt-dark7 fs12"
3532
+ }, yl = /* @__PURE__ */ Object.assign({
3533
+ name: "TableHeaderColumnConfig",
3534
+ inheritAttrs: !1
3535
+ }, {
3536
+ __name: "ColumnConfig",
3537
+ props: {
3538
+ params: {
3539
+ type: Object,
3540
+ default: /* @__PURE__ */ Object.create(null)
3541
+ }
3542
+ },
3543
+ setup(A, { emit: x }) {
3544
+ const s = A, e = reactive({
3545
+ loading: !1,
3546
+ left: [],
3547
+ center: [],
3548
+ right: [],
3549
+ total: 0
3550
+ });
3551
+ onMounted(() => {
3552
+ h();
3553
+ });
3554
+ const o = x, h = () => {
3555
+ a();
3556
+ }, a = () => {
3557
+ let w = localStorage.getItem(C.value);
3558
+ if (w) {
3559
+ w = JSON.parse(w);
3560
+ let g = 0;
3561
+ w.forEach((z) => {
3562
+ z.label && !z.nomove && (g++, z.fixed ? e[z.fixed].push(z) : e.center.push(z));
3563
+ }), e.total = g;
3564
+ }
3565
+ }, y = ({ it: w, index: g, type: z }) => {
3566
+ e.left.unshift(w), e.center.splice(g, 1);
3567
+ }, k = ({ it: w, index: g, type: z }) => {
3568
+ e.right.unshift(w), e.center.splice(g, 1);
3569
+ }, V = ({ it: w, index: g, type: z }) => {
3570
+ e.center.unshift(w), e.left.splice(g, 1);
3571
+ }, O = ({ it: w, index: g, type: z }) => {
3572
+ e.center.unshift(w), e.right.splice(g, 1);
3573
+ }, b = ({ it: w, index: g, type: z }) => {
3574
+ e[z][g] = w;
3575
+ }, f = async () => {
3576
+ e.loading = !0, localStorage.removeItem(C.value), window.$promise(() => {
3577
+ e.loading = !1, o("submit", "column"), o("close");
3578
+ });
3579
+ }, r = async () => {
3580
+ e.loading = !0, await window.$promise(() => {
3581
+ const { left: w, center: g, right: z } = e;
3582
+ w.forEach((l, n) => {
3583
+ l.fixed = "left", l.sort = n;
3584
+ }), g.forEach((l, n) => {
3585
+ l.fixed = !1, l.sort = n;
3586
+ }), z.forEach((l, n) => {
3587
+ l.fixed = "right", l.sort = n;
3588
+ });
3589
+ const T = [...w, ...g, ...z].sort(
3590
+ (l, n) => l.sort - n.sort
3591
+ );
3592
+ localStorage.setItem(C.value, JSON.stringify(T));
3593
+ }, 10), e.loading = !1, o("submit", "column"), o("close");
3594
+ }, C = computed(() => `${s.params.tableName}_Column`), u = computed(() => ({
3595
+ height: window.global.config.options.drawerHeight - 96 + "px"
3596
+ })), m = computed(() => {
3597
+ let w = 0, g = 0;
3598
+ return e.left.forEach((z) => {
3599
+ z.visible ? w++ : g++;
3600
+ }), {
3601
+ visible: w,
3602
+ hide: g
3603
+ };
3604
+ }), $ = computed(() => {
3605
+ let w = 0, g = 0;
3606
+ return e.center.forEach((z) => {
3607
+ z.visible ? w++ : g++;
3608
+ }), {
3609
+ visible: w,
3610
+ hide: g
3611
+ };
3612
+ }), d = computed(() => {
3613
+ let w = 0, g = 0;
3614
+ return e.right.forEach((z) => {
3615
+ z.visible ? w++ : g++;
3616
+ }), {
3617
+ visible: w,
3618
+ hide: g
3619
+ };
3620
+ }), i = computed(() => window.$getLang());
3621
+ return (w, g) => {
3622
+ const z = D("Card"), T = D("el-button"), l = D("DrawerArea");
3623
+ return p(), Y(l, {
3624
+ class: "TableHeaderColumnConfig",
3625
+ loading: t(e).loading,
3626
+ noscroll: "",
3627
+ onSubmit: r
3628
+ }, {
3629
+ cancel: _(() => [
3630
+ N(T, {
3631
+ plain: "",
3632
+ onClick: f
3633
+ }, {
3634
+ icon: _(() => g[3] || (g[3] = [
3635
+ c("i", { class: "imicon im-reset" }, null, -1)
3636
+ ])),
3637
+ default: _(() => [
3638
+ te(" " + I(w.$l("Reset")), 1)
3639
+ ]),
3640
+ _: 1
3641
+ })
3642
+ ]),
3643
+ default: _(() => [
3644
+ c("div", el, [
3645
+ N(z, {
3646
+ title: "Fixed on Left",
3647
+ class: "flex1"
3648
+ }, ee({
3649
+ default: _(() => [
3650
+ t(e).left.length === 0 ? (p(), M("div", nl, I(w.$l("No Column Fixed on Left")), 1)) : B("", !0),
3651
+ g[0] || (g[0] = c("div", { class: "border-t" }, null, -1)),
3652
+ N(t(me), {
3653
+ list: t(e).left,
3654
+ group: "columnFilter",
3655
+ class: "dragBody p4-0 yscroll nobar",
3656
+ draggable: ".drag",
3657
+ style: se(t(u)),
3658
+ "item-key": (n) => n
3659
+ }, {
3660
+ item: _(({ element: n, index: S }) => [
3661
+ N(fe, {
3662
+ it: n,
3663
+ index: S,
3664
+ lang: t(i),
3665
+ type: "left",
3666
+ onAddRight: V,
3667
+ onChange: b
3668
+ }, null, 8, ["it", "index", "lang"])
3669
+ ]),
3670
+ _: 1
3671
+ }, 8, ["list", "style", "item-key"])
3672
+ ]),
3673
+ _: 2
3674
+ }, [
3675
+ t(m) ? {
3676
+ name: "header",
3677
+ fn: _(() => [
3678
+ c("div", tl, [
3679
+ c("span", ol, I(t(m).visible), 1),
3680
+ c("span", ll, " / " + I(t(e).total), 1),
3681
+ t(m).hide ? (p(), M("span", al, "(" + I(t(m).hide) + ")", 1)) : B("", !0)
3682
+ ])
3683
+ ]),
3684
+ key: "0"
3685
+ } : void 0
3686
+ ]), 1024),
3687
+ N(z, {
3688
+ title: "In Center",
3689
+ class: "flex1"
3690
+ }, ee({
3691
+ default: _(() => [
3692
+ t(e).center.length === 0 ? (p(), M("div", ul, I(w.$l("No Column Fixed on Left")), 1)) : B("", !0),
3693
+ g[1] || (g[1] = c("div", { class: "border-t" }, null, -1)),
3694
+ N(t(me), {
3695
+ list: t(e).center,
3696
+ group: "columnFilter",
3697
+ class: "dragBody p4-0 yscroll nobar",
3698
+ draggable: ".drag",
3699
+ style: se(t(u)),
3700
+ "item-key": (n) => n
3701
+ }, {
3702
+ item: _(({ element: n, index: S }) => [
3703
+ N(fe, {
3704
+ it: n,
3705
+ index: S,
3706
+ onAddLeft: y,
3707
+ lang: t(i),
3708
+ onAddRight: k,
3709
+ onChange: b
3710
+ }, null, 8, ["it", "index", "lang"])
3711
+ ]),
3712
+ _: 1
3713
+ }, 8, ["list", "style", "item-key"])
3714
+ ]),
3715
+ _: 2
3716
+ }, [
3717
+ t($) ? {
3718
+ name: "header",
3719
+ fn: _(() => [
3720
+ c("div", sl, [
3721
+ c("span", rl, I(t($).visible), 1),
3722
+ c("span", il, " / " + I(t(e).total), 1),
3723
+ t($).hide ? (p(), M("span", dl, "(" + I(t($).hide) + ")", 1)) : B("", !0)
3724
+ ])
3725
+ ]),
3726
+ key: "0"
3727
+ } : void 0
3728
+ ]), 1024),
3729
+ N(z, {
3730
+ title: "Fixed on Right",
3731
+ class: "flex1"
3732
+ }, ee({
3733
+ default: _(() => [
3734
+ t(e).right.length === 0 ? (p(), M("div", gl, I(w.$l("No Column Fixed on Right")), 1)) : B("", !0),
3735
+ g[2] || (g[2] = c("div", { class: "border-t" }, null, -1)),
3736
+ N(t(me), {
3737
+ list: t(e).right,
3738
+ group: "columnFilter",
3739
+ class: "dragBody p4-0 yscroll nobar",
3740
+ draggable: ".drag",
3741
+ style: se(t(u)),
3742
+ "item-key": (n) => n
3743
+ }, {
3744
+ item: _(({ element: n, index: S }) => [
3745
+ N(fe, {
3746
+ it: n,
3747
+ index: S,
3748
+ type: "right",
3749
+ lang: t(i),
3750
+ onAddLeft: O,
3751
+ onChange: b
3752
+ }, null, 8, ["it", "index", "lang"])
3753
+ ]),
3754
+ _: 1
3755
+ }, 8, ["list", "style", "item-key"])
3756
+ ]),
3757
+ _: 2
3758
+ }, [
3759
+ t(d) ? {
3760
+ name: "header",
3761
+ fn: _(() => [
3762
+ c("div", cl, [
3763
+ c("span", pl, I(t(d).visible), 1),
3764
+ c("span", ml, " / " + I(t(e).total), 1),
3765
+ t(d).hide ? (p(), M("span", fl, "(" + I(t(d).hide) + ")", 1)) : B("", !0)
3766
+ ])
3767
+ ]),
3768
+ key: "0"
3769
+ } : void 0
3770
+ ]), 1024)
3771
+ ])
3772
+ ]),
3773
+ _: 1
3774
+ }, 8, ["loading"]);
3775
+ };
3776
+ }
3777
+ }), hl = /* @__PURE__ */ ae(yl, [["__scopeId", "data-v-e8053f13"]]), _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3778
+ __proto__: null,
3779
+ default: hl
3780
+ }, Symbol.toStringTag, { value: "Module" })), bl = { class: "p16 wp100 sticky bg-white9 border-b backdrop z2" }, vl = { class: "p8" }, wl = { class: "txt-dark5" }, $l = { class: "pl8 txt-dark9" }, Sl = {
3781
+ key: 0,
3782
+ class: "flexMode vc p8"
3783
+ }, Cl = {
3784
+ key: 1,
3785
+ class: "flexMode vc p8"
3786
+ }, kl = { class: "txt-dark5" }, xl = { class: "pl8 pr16 txt-dark9" }, Vl = {
3787
+ key: 2,
3788
+ class: "flexMode vc p8"
3789
+ }, Tl = { class: "flexMode hr vc g16" }, Ol = { class: "pr8" }, Ml = { class: "relative wp100 pb8 border-b z1" }, Al = { class: "p16 txt-dark9" }, Dl = { class: "pr8" }, Il = { class: "inputGroup flexMode vc flexGrow" }, Nl = { class: "inputGroupRight" }, zl = /* @__PURE__ */ Object.assign({
3790
+ name: "TableDownload"
3791
+ }, {
3792
+ __name: "TableDownload",
3793
+ props: {
3794
+ params: {
3795
+ type: Object,
3796
+ default: /* @__PURE__ */ Object.create(null)
3797
+ }
3798
+ },
3799
+ setup(A, { emit: x }) {
3800
+ const s = A, e = reactive({
3801
+ columns: [],
3802
+ items: [],
3803
+ downloadAll: !1,
3804
+ onlySelection: !1,
3805
+ // 只下载选中项
3806
+ remoteDownload: !1,
3807
+ // 远程下载
3808
+ filename: "",
3809
+ // 文件名
3810
+ useCountryName: !1,
3811
+ // 使用国家名称
3812
+ widthTableHead: !0
3813
+ }), { proxy: o } = getCurrentInstance(), h = useRoute();
3814
+ onMounted(() => {
3815
+ k();
3816
+ });
3817
+ const a = x, y = () => {
3818
+ e.downloadAll ? a("fetch-all-data") : a("recover-current-data");
3819
+ }, k = () => {
3820
+ V(), O();
3821
+ }, V = () => {
3822
+ z.value.length && (e.onlySelection = !0);
3823
+ }, O = () => {
3824
+ const l = JSON.parse(localStorage.getItem(d.value)) || [], n = [], S = [];
3825
+ l.forEach((L) => {
3826
+ L.prop && (n.push(L), L.visible && S.push(L.prop));
3827
+ }), e.columns = n, e.items = S;
3828
+ }, b = () => {
3829
+ }, f = (l = ",", n) => {
3830
+ const S = e.items.map((U) => w.value[U].label);
3831
+ let L = [];
3832
+ e.onlySelection ? L = z.value : L = g.value;
3833
+ const R = L.map((U) => {
3834
+ const Z = [];
3835
+ return e.items.forEach((W) => {
3836
+ if (["country"].includes(W))
3837
+ if (e.useCountryName) {
3838
+ const P = window.$getType(U[W]);
3839
+ let ne;
3840
+ P === "Array" ? ne = U[W] : ne = U[W].split(","), ne = ne.map((J) => window.$map.country.asaObj[J.toLowerCase()][`label_${u.value}`]), Z.push(`"${ne.join(",")}"`);
3841
+ } else
3842
+ Z.push(`"${U[W]}"`);
3843
+ else if (["spendOrigin"].includes(W)) {
3844
+ const P = U.currency + " " + (U[`${W}Format`] || U[W]);
3845
+ Z.push(`"${P || "-"}"`);
3846
+ } else {
3847
+ const P = U[`${W}Format`] || U[W];
3848
+ Z.push(`"${P || "-"}"`);
3849
+ }
3850
+ }), Z.join(l);
3851
+ });
3852
+ return n && R.unshift(S.join(l)), R.join(`
3853
+ `);
3854
+ }, r = () => {
3855
+ var n;
3856
+ let l = !1;
3857
+ if ((e.onlySelection && ((n = s.params.selection) != null && n.length) || g.value.length) && (l = !0), l) {
3858
+ const S = f(" ", e.withTableHead);
3859
+ window.$copy(S);
3860
+ } else
3861
+ o.$message.info("No Data to Download");
3862
+ }, C = () => {
3863
+ const l = f(",", !0);
3864
+ let n = $.value;
3865
+ e.filename ? n ? n += `_${e.filename}` : n = e.filename : n || (n = i.value), window.$download({
3866
+ type: "csv",
3867
+ name: n,
3868
+ data: l
3869
+ }), o.$message.success(window.$l("Download Mode"));
3870
+ }, u = computed(() => window.$getLang()), m = computed(() => s.params.tableName), $ = computed(() => m.value ? `${window.$l(m.value)}_${window.$moment().format("YYYYMMDD_hhmmss")}` : ""), d = computed(() => s.params.tableName + "_Column"), i = computed(() => `${h.name}_${window.$moment().format("YYYYMMDD_hhmmss")}`), w = computed(() => {
3871
+ const l = {};
3872
+ return e.columns.forEach((n) => {
3873
+ l[n.prop] = n;
3874
+ }), l;
3875
+ }), g = computed(() => {
3876
+ var l;
3877
+ return ((l = s.params) == null ? void 0 : l.list) || [];
3878
+ }), z = computed(() => {
3879
+ var l;
3880
+ return ((l = s.params) == null ? void 0 : l.selection) || [];
3881
+ }), T = computed(() => {
3882
+ var l;
3883
+ return e.items.length === 0 || g.value.length === 0 || !!((l = s.params) != null && l.loading);
3884
+ });
3885
+ return (l, n) => {
3886
+ const S = D("el-checkbox"), L = D("el-button"), R = D("Alert"), U = D("el-switch"), Z = D("el-checkbox-group"), W = D("el-input"), P = D("DrawerArea"), ne = _e("loading");
3887
+ return p(), Y(P, { onSubmit: C }, {
3888
+ footer: _(() => [
3889
+ c("div", Il, [
3890
+ N(W, {
3891
+ modelValue: t(e).filename,
3892
+ "onUpdate:modelValue": n[6] || (n[6] = (J) => t(e).filename = J),
3893
+ clearable: "",
3894
+ placeholder: l.$l(t($)),
3895
+ class: "inputGroupLeft"
3896
+ }, {
3897
+ prefix: _(() => n[8] || (n[8] = [
3898
+ c("i", { class: "imicon im-file" }, null, -1)
3899
+ ])),
3900
+ _: 1
3901
+ }, 8, ["modelValue", "placeholder"]),
3902
+ c("div", Nl, [
3903
+ N(L, {
3904
+ disabled: t(T),
3905
+ plain: "",
3906
+ type: "primary",
3907
+ onClick: C
3908
+ }, {
3909
+ icon: _(() => n[9] || (n[9] = [
3910
+ c("i", { class: "imicon im-download1" }, null, -1)
3911
+ ])),
3912
+ default: _(() => [
3913
+ c("span", null, I(l.$l("Download")), 1)
3914
+ ]),
3915
+ _: 1
3916
+ }, 8, ["disabled"])
3917
+ ])
3918
+ ])
3919
+ ]),
3920
+ default: _(() => [
3921
+ be((p(), M("div", bl, [
3922
+ N(R, null, {
3923
+ default: _(() => [
3924
+ c("div", vl, [
3925
+ c("span", wl, I(t(e).downloadAll ? l.$l("Total in All Pages: ") : l.$l("Total in Current Page: ")), 1),
3926
+ c("span", $l, I(t(g).length), 1)
3927
+ ]),
3928
+ s.params.showTotalChosen ? (p(), M("div", Sl, [
3929
+ N(S, {
3930
+ modelValue: t(e).downloadAll,
3931
+ "onUpdate:modelValue": n[0] || (n[0] = (J) => t(e).downloadAll = J),
3932
+ label: l.$l("Download All Data"),
3933
+ class: "h24-i",
3934
+ onChange: y
3935
+ }, null, 8, ["modelValue", "label"])
3936
+ ])) : B("", !0),
3937
+ t(z).length ? (p(), M("div", Cl, [
3938
+ c("span", kl, I(l.$l("Selected")), 1),
3939
+ c("span", xl, I(t(z).length), 1),
3940
+ N(S, {
3941
+ modelValue: t(e).onlySelection,
3942
+ "onUpdate:modelValue": n[1] || (n[1] = (J) => t(e).onlySelection = J),
3943
+ label: l.$l("Only Selection"),
3944
+ class: "h24-i"
3945
+ }, null, 8, ["modelValue", "label"])
3946
+ ])) : B("", !0),
3947
+ s.params.remote ? (p(), M("div", Vl, [
3948
+ N(S, {
3949
+ modelValue: t(e).remoteDownload,
3950
+ "onUpdate:modelValue": n[2] || (n[2] = (J) => t(e).remoteDownload = J),
3951
+ label: l.$l("Download all data using remote download")
3952
+ }, null, 8, ["modelValue", "label"])
3953
+ ])) : B("", !0),
3954
+ c("div", Tl, [
3955
+ N(L, {
3956
+ plain: "",
3957
+ size: "default",
3958
+ onClick: r
3959
+ }, {
3960
+ icon: _(() => n[7] || (n[7] = [
3961
+ c("i", { class: "imicon im-copy" }, null, -1)
3962
+ ])),
3963
+ default: _(() => [
3964
+ c("span", Ol, I(l.$l("Copy to Clipboard")), 1),
3965
+ N(S, {
3966
+ modelValue: t(e).withTableHead,
3967
+ "onUpdate:modelValue": n[3] || (n[3] = (J) => t(e).withTableHead = J),
3968
+ label: l.$l("With Table Head"),
3969
+ onClick: ie((J) => null, ["stop"])
3970
+ }, null, 8, ["modelValue", "label"])
3971
+ ]),
3972
+ _: 1
3973
+ })
3974
+ ])
3975
+ ]),
3976
+ _: 1
3977
+ })
3978
+ ])), [
3979
+ [ne, s.params.loading]
3980
+ ]),
3981
+ c("div", Ml, [
3982
+ c("div", Al, I(l.$l("What do you want to Download?")), 1),
3983
+ N(Z, {
3984
+ modelValue: t(e).items,
3985
+ "onUpdate:modelValue": n[5] || (n[5] = (J) => t(e).items = J)
3986
+ }, {
3987
+ default: _(() => [
3988
+ (p(!0), M(oe, null, le(t(e).columns, (J, ge) => (p(), Y(S, {
3989
+ key: J.prop,
3990
+ value: J.prop,
3991
+ class: "wp100 p0-16 h36-i hover-bg-gray1"
3992
+ }, {
3993
+ default: _(() => [
3994
+ c("span", Dl, I(J.label), 1),
3995
+ J.prop === "country" ? (p(), Y(U, {
3996
+ key: 0,
3997
+ modelValue: t(e).useCountryName,
3998
+ "onUpdate:modelValue": n[4] || (n[4] = (de) => t(e).useCountryName = de),
3999
+ "inline-prompt": "",
4000
+ "active-text": " Use name  ",
4001
+ "inactive-text": " Use Alpha-2 code ",
4002
+ onChange: b
4003
+ }, null, 8, ["modelValue"])) : B("", !0)
4004
+ ]),
4005
+ _: 2
4006
+ }, 1032, ["value"]))), 128))
4007
+ ]),
4008
+ _: 1
4009
+ }, 8, ["modelValue"])
4010
+ ]),
4011
+ n[10] || (n[10] = c("div", { class: "TheEnd" }, null, -1))
4012
+ ]),
4013
+ _: 1
4014
+ });
4015
+ };
4016
+ }
4017
+ }), jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4018
+ __proto__: null,
4019
+ default: zl
4020
+ }, Symbol.toStringTag, { value: "Module" })), Bl = { class: "SuperCountryAso relative" }, Yl = { class: "flexMode hr" }, El = /* @__PURE__ */ Object.assign({
4021
+ name: "SuperCountryAso"
4022
+ }, {
4023
+ __name: "CountryAso",
4024
+ props: {
4025
+ modelValue: {
4026
+ type: [String, Array],
4027
+ default: ""
4028
+ },
4029
+ multiple: {
4030
+ type: Boolean,
4031
+ default: !1
4032
+ },
4033
+ limit: {
4034
+ type: Number,
4035
+ default: 0
4036
+ },
4037
+ useFooter: {
4038
+ type: Boolean,
4039
+ default: !1
4040
+ },
4041
+ nowrap: {
4042
+ type: Boolean,
4043
+ default: !1
4044
+ },
4045
+ useAll: {
4046
+ type: Boolean,
4047
+ default: !1
4048
+ },
4049
+ allValue: {
4050
+ type: [String, Number],
4051
+ default: "all"
4052
+ }
4053
+ },
4054
+ emits: [
4055
+ "to-change",
4056
+ "update:modelValue",
4057
+ "confirm",
4058
+ "update:name"
4059
+ ],
4060
+ setup(A, { emit: x }) {
4061
+ const s = A, { proxy: e } = getCurrentInstance(), h = inject("store").common(), a = reactive({
4062
+ loading: !1,
4063
+ v: "",
4064
+ arr: []
4065
+ }), y = x, k = (r) => {
4066
+ y("update:modelValue", r), y("to-change", r);
4067
+ }, V = (r) => {
4068
+ let C = [];
4069
+ h.countryOptions.forEach((u) => {
4070
+ r.forEach((m) => {
4071
+ u.value === m && C.push(u.label);
4072
+ });
4073
+ }), y("update:modelValue", r), y("update:name", C.join(", ")), y("to-change", r);
4074
+ }, O = () => {
4075
+ y("update:modelValue", a.arr), y("confirm", a.arr), e.$refs.multiple.blur();
4076
+ }, b = computed(() => h.countryOptions), f = computed(() => window.$l("Countries or Regions"));
4077
+ return watch(
4078
+ () => s.modelValue,
4079
+ (r, C) => {
4080
+ r && JSON.stringify(r) !== JSON.stringify(C) && (s.multiple ? a.arr = r : a.v = r);
4081
+ },
4082
+ {
4083
+ immediate: !0
4084
+ }
4085
+ ), (r, C) => {
4086
+ const u = D("IconLoading"), m = D("CountryItem"), $ = D("el-option"), d = D("el-select"), i = D("el-button"), w = D("MultipleSelect");
4087
+ return p(), M("div", Bl, [
4088
+ t(a).loading ? (p(), Y(u, { key: 0 })) : B("", !0),
4089
+ s.multiple ? (p(), Y(w, K({
4090
+ key: 2,
4091
+ ref: "multiple",
4092
+ modelValue: t(a).arr,
4093
+ "onUpdate:modelValue": C[1] || (C[1] = (g) => t(a).arr = g),
4094
+ options: t(b),
4095
+ placeholder: t(f)
4096
+ }, r.$attrs, {
4097
+ "multiple-limit": s.limit,
4098
+ onChange: V
4099
+ }), ee({
4100
+ default: _(({ it: g }) => [
4101
+ N(m, {
4102
+ name: g.value_lower
4103
+ }, null, 8, ["name"])
4104
+ ]),
4105
+ _: 2
4106
+ }, [
4107
+ s.useFooter ? {
4108
+ name: "footer",
4109
+ fn: _(() => [
4110
+ c("div", Yl, [
4111
+ N(i, {
4112
+ type: "primary",
4113
+ onClick: O
4114
+ }, {
4115
+ icon: _(() => C[2] || (C[2] = [
4116
+ c("i", { class: "imicon im-search" }, null, -1)
4117
+ ])),
4118
+ default: _(() => [
4119
+ te(" " + I(r.$l("Confirm")), 1)
4120
+ ]),
4121
+ _: 1
4122
+ })
4123
+ ])
4124
+ ]),
4125
+ key: "0"
4126
+ } : void 0
4127
+ ]), 1040, ["modelValue", "options", "placeholder", "multiple-limit"])) : (p(), Y(d, K({
4128
+ key: 1,
4129
+ modelValue: t(a).v,
4130
+ "onUpdate:modelValue": C[0] || (C[0] = (g) => t(a).v = g),
4131
+ filterable: "",
4132
+ placeholder: t(f),
4133
+ class: "wp100"
4134
+ }, r.$attrs, { onChange: k }), ee({
4135
+ default: _(() => [
4136
+ s.useAll ? (p(), Y($, {
4137
+ key: 0,
4138
+ label: r.$l("All"),
4139
+ value: s.allValue
4140
+ }, null, 8, ["label", "value"])) : B("", !0),
4141
+ (p(!0), M(oe, null, le(t(b), (g, z) => (p(), Y($, {
4142
+ key: g.value,
4143
+ label: r.$l(g.label),
4144
+ value: g.value_lower
4145
+ }, {
4146
+ default: _(() => [
4147
+ N(m, {
4148
+ name: g.value_lower
4149
+ }, null, 8, ["name"])
4150
+ ]),
4151
+ _: 2
4152
+ }, 1032, ["label", "value"]))), 128))
4153
+ ]),
4154
+ _: 2
4155
+ }, [
4156
+ t(a).v ? {
4157
+ name: "prefix",
4158
+ fn: _(() => [
4159
+ N(m, {
4160
+ name: t(a).v,
4161
+ nolabel: ""
4162
+ }, null, 8, ["name"])
4163
+ ]),
4164
+ key: "0"
4165
+ } : void 0
4166
+ ]), 1040, ["modelValue", "placeholder"]))
4167
+ ]);
4168
+ };
4169
+ }
4170
+ }), Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4171
+ __proto__: null,
4172
+ default: El
4173
+ }, Symbol.toStringTag, { value: "Module" })), Rl = { class: "SuperCountryDiy" }, Pl = { class: "flexMode hr" }, Fl = /* @__PURE__ */ Object.assign({
4174
+ name: "SuperCountryDiy"
4175
+ }, {
4176
+ __name: "CountryDiy",
4177
+ props: {
4178
+ modelValue: {
4179
+ tupe: [Array, String],
4180
+ default: ""
4181
+ },
4182
+ multiple: {
4183
+ type: Boolean,
4184
+ default: !1
4185
+ },
4186
+ useFooter: {
4187
+ type: Boolean,
4188
+ default: !1
4189
+ },
4190
+ placeholder: {
4191
+ type: String,
4192
+ default: ""
4193
+ },
4194
+ options: {
4195
+ type: Array,
4196
+ default: () => []
4197
+ }
4198
+ },
4199
+ emits: ["change", "update:modelValue"],
4200
+ setup(A, { emit: x }) {
4201
+ const s = A, e = reactive({
4202
+ single: "",
4203
+ multiple: []
4204
+ }), { proxy: o } = getCurrentInstance(), h = x, a = () => {
4205
+ o.$refs.multiple.blur();
4206
+ }, y = (O) => {
4207
+ h("update:modelValue", O), h("change", O);
4208
+ }, k = computed(() => s.placeholder ? window.$l(s.placeholder) : window.$l("Country or Region")), V = computed(() => s.options.sort((O, b) => O.label.localeCompare(b.label)));
4209
+ return watch(
4210
+ () => s.modelValue,
4211
+ (O, b) => {
4212
+ JSON.stringify(O) !== JSON.stringify(b) && (s.multiple ? e.multiple = O : e.single = O);
4213
+ },
4214
+ {
4215
+ immediate: !0
4216
+ }
4217
+ ), (O, b) => {
4218
+ const f = D("CountryItem"), r = D("el-button"), C = D("MultipleSelect"), u = D("el-option"), m = D("el-select");
4219
+ return p(), M("div", Rl, [
4220
+ s.multiple ? (p(), Y(C, K({
4221
+ key: 0,
4222
+ ref: "multiple",
4223
+ modelValue: t(e).multiple,
4224
+ "onUpdate:modelValue": b[0] || (b[0] = ($) => t(e).multiple = $),
4225
+ placeholder: t(k)
4226
+ }, O.$attrs, {
4227
+ options: t(V),
4228
+ onChange: y
4229
+ }), ee({
4230
+ default: _(({ it: $ }) => [
4231
+ N(f, {
4232
+ name: $.value
4233
+ }, null, 8, ["name"])
4234
+ ]),
4235
+ _: 2
4236
+ }, [
4237
+ s.useFooter ? {
4238
+ name: "footer",
4239
+ fn: _(() => [
4240
+ c("div", Pl, [
4241
+ N(r, {
4242
+ type: "primary",
4243
+ onClick: a
4244
+ }, {
4245
+ default: _(() => [
4246
+ te(I(O.$l("Confirm")), 1)
4247
+ ]),
4248
+ _: 1
4249
+ })
4250
+ ])
4251
+ ]),
4252
+ key: "0"
4253
+ } : O.$slots.footer ? {
4254
+ name: "footer",
4255
+ fn: _(() => [
4256
+ H(O.$slots, "footer")
4257
+ ]),
4258
+ key: "1"
4259
+ } : void 0
4260
+ ]), 1040, ["modelValue", "placeholder", "options"])) : (p(), Y(m, K({
4261
+ key: 1,
4262
+ modelValue: t(e).single,
4263
+ "onUpdate:modelValue": b[1] || (b[1] = ($) => t(e).single = $),
4264
+ placeholder: t(k)
4265
+ }, O.$attrs, { onChange: y }), ee({
4266
+ default: _(() => [
4267
+ (p(!0), M(oe, null, le(t(V), ($, d) => (p(), Y(u, {
4268
+ key: d,
4269
+ label: O.$l($.label),
4270
+ value: $.value
4271
+ }, {
4272
+ default: _(() => [
4273
+ N(f, {
4274
+ name: $.value
4275
+ }, null, 8, ["name"])
4276
+ ]),
4277
+ _: 2
4278
+ }, 1032, ["label", "value"]))), 128))
4279
+ ]),
4280
+ _: 2
4281
+ }, [
4282
+ t(e).single ? {
4283
+ name: "prefix",
4284
+ fn: _(() => [
4285
+ N(f, {
4286
+ name: t(e).single,
4287
+ nolabel: ""
4288
+ }, null, 8, ["name"])
4289
+ ]),
4290
+ key: "0"
4291
+ } : void 0
4292
+ ]), 1040, ["modelValue", "placeholder"]))
4293
+ ]);
4294
+ };
4295
+ }
4296
+ }), Ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4297
+ __proto__: null,
4298
+ default: Fl
4299
+ }, Symbol.toStringTag, { value: "Module" }));
4300
+ export {
4301
+ Zl as c
4302
+ };