yc-vep-ui 0.3.7 → 0.3.8

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,4791 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f, isRef as p, isVNode as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onMounted as b, onUnmounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDirective as ee, resolveDynamicComponent as k, setBlockTracking as A, shallowRef as j, toDisplayString as M, toRaw as te, toValue as N, unref as P, useAttrs as ne, useCssVars as re, useModel as ie, watch as F, watchEffect as ae, withCtx as I, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
2
+ import { AiEditor as le } from "aieditor";
3
+ //#region \0rolldown/runtime.js
4
+ var ue = Object.defineProperty, L = (e, t) => {
5
+ let n = {};
6
+ for (var r in e) ue(n, r, {
7
+ get: e[r],
8
+ enumerable: !0
9
+ });
10
+ return t || ue(n, Symbol.toStringTag, { value: "Module" }), n;
11
+ }, de = { class: /* @__PURE__ */ v({ bodyClass: !0 }) }, fe = /* @__PURE__ */ u({
12
+ __name: "index",
13
+ props: {
14
+ title: {},
15
+ bodyClass: {},
16
+ hideBorder: { type: Boolean },
17
+ icon: {}
18
+ },
19
+ setup(e) {
20
+ let i = t(() => ({
21
+ display: "flex",
22
+ alignItems: "center",
23
+ gap: "4px",
24
+ borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
25
+ }));
26
+ return (t, o) => {
27
+ let l = O("el-icon"), u = O("el-card");
28
+ return S(), n(u, g(t.$attrs, { class: {
29
+ "ui-card": !0,
30
+ hideBorder: e.hideBorder
31
+ } }), s({
32
+ default: I(() => [a("div", de, [D(t.$slots, "default", {}, void 0, !0)])]),
33
+ _: 2
34
+ }, [e.title && e.title?.length > 0 ? {
35
+ name: "header",
36
+ fn: I(() => [a("div", { style: y(i.value) }, [e.icon ? (S(), n(l, { key: 0 }, {
37
+ default: I(() => [(S(), n(k(e.icon), { color: "#2563eb" }))]),
38
+ _: 1
39
+ })) : r("", !0), o[0] || (A(-1, !0), (o[0] = a("h4", null, [c(M(e.title), 1)])).cacheIndex = 0, A(1), o[0])], 4)]),
40
+ key: "0"
41
+ } : void 0]), 1040, ["class"]);
42
+ };
43
+ }
44
+ }), R = (e, t) => {
45
+ let n = e.__vccOpts || e;
46
+ for (let [e, r] of t) n[e] = r;
47
+ return n;
48
+ }, pe = /* @__PURE__ */ L({ default: () => me }), me = /* @__PURE__ */ R(fe, [["__scopeId", "data-v-6ebb01d7"]]), z = {
49
+ get Button() {
50
+ return $()?.resolveComponent?.("el-button") || "el-button";
51
+ },
52
+ get Link() {
53
+ return $()?.resolveComponent?.("el-link") || "el-link";
54
+ },
55
+ get Tag() {
56
+ return $()?.resolveComponent?.("el-tag") || "el-tag";
57
+ },
58
+ get Select() {
59
+ return $()?.resolveComponent?.("el-select") || "el-select";
60
+ },
61
+ get DatePicker() {
62
+ return $()?.resolveComponent?.("el-date-picker") || "el-date-picker";
63
+ },
64
+ get Input() {
65
+ return $()?.resolveComponent?.("el-input") || "el-input";
66
+ },
67
+ get InputTag() {
68
+ return $()?.resolveComponent?.("el-input-tag") || "el-input-tag";
69
+ },
70
+ get TimeSelect() {
71
+ return $()?.resolveComponent?.("el-time-select") || "el-time-select";
72
+ },
73
+ get InputNumber() {
74
+ return $()?.resolveComponent?.("el-input-number") || "el-input-number";
75
+ },
76
+ get RadioGroup() {
77
+ return $()?.resolveComponent?.("el-radio-group") || "el-radio-group";
78
+ },
79
+ get Text() {
80
+ return $()?.resolveComponent?.("el-text") || "el-text";
81
+ },
82
+ get Card() {
83
+ return $()?.resolveComponent?.("el-card") || "el-card";
84
+ },
85
+ get Table() {
86
+ return $()?.resolveComponent?.("el-table") || "el-table";
87
+ },
88
+ get TableColumn() {
89
+ return $()?.resolveComponent?.("el-table-column") || "el-table-column";
90
+ },
91
+ get Pagination() {
92
+ return $()?.resolveComponent?.("el-pagination") || "el-pagination";
93
+ },
94
+ get Form() {
95
+ return $()?.resolveComponent?.("el-form") || "el-form";
96
+ },
97
+ get FormItem() {
98
+ return $()?.resolveComponent?.("el-form-item") || "el-form-item";
99
+ },
100
+ get Row() {
101
+ return $()?.resolveComponent?.("el-row") || "el-row";
102
+ },
103
+ get Col() {
104
+ return $()?.resolveComponent?.("el-col") || "el-col";
105
+ },
106
+ get Icon() {
107
+ return $()?.resolveComponent?.("el-icon") || "el-icon";
108
+ },
109
+ get TreeV2() {
110
+ return $()?.resolveComponent?.("el-tree-v2") || "el-tree-v2";
111
+ },
112
+ get Dropdown() {
113
+ return $()?.resolveComponent?.("el-dropdown") || "el-dropdown";
114
+ },
115
+ get DropdownMenu() {
116
+ return $()?.resolveComponent?.("el-dropdown-menu") || "el-dropdown-menu";
117
+ },
118
+ get DropdownItem() {
119
+ return $()?.resolveComponent?.("el-dropdown-item") || "el-dropdown-item";
120
+ },
121
+ get Dialog() {
122
+ return $()?.resolveComponent?.("el-dialog") || "el-dialog";
123
+ },
124
+ get ButtonGroup() {
125
+ return $()?.resolveComponent?.("el-button-group") || "el-button-group";
126
+ },
127
+ get Descriptions() {
128
+ return $()?.resolveComponent?.("el-descriptions") || "el-descriptions";
129
+ },
130
+ get DescriptionsItem() {
131
+ return $()?.resolveComponent?.("el-descriptions-item") || "el-descriptions-item";
132
+ },
133
+ get Message() {
134
+ return $()?.config?.globalProperties?.$message || {
135
+ error: (e) => console.error("[Message.error]", e),
136
+ success: (e) => console.log("[Message.success]", e),
137
+ warning: (e) => console.warn("[Message.warning]", e)
138
+ };
139
+ }
140
+ };
141
+ //#endregion
142
+ //#region src/components/utils/render.ts
143
+ function B() {
144
+ let e = $();
145
+ return e?.h ? e.h : function(e, t, n) {
146
+ return console.warn("[yc-vep-ui] Vue not initialized. Call setHostVue(Vue) before using components."), null;
147
+ };
148
+ }
149
+ function he(e) {
150
+ let t = B();
151
+ return t ? t("div", { style: {
152
+ display: "flex",
153
+ flexDirection: "row",
154
+ flexWrap: "wrap",
155
+ gap: "8px"
156
+ } }, (Array.isArray(e) ? e : [e]).map((e) => {
157
+ let { text: n, ...r } = e;
158
+ return t(z.Button, {
159
+ ...r,
160
+ link: !0,
161
+ size: "small",
162
+ type: e.type || "default"
163
+ }, () => n);
164
+ })) : null;
165
+ }
166
+ function ge(e) {
167
+ let t = B();
168
+ return t ? Array.isArray(e) ? t("div", { style: {
169
+ display: "flex",
170
+ gap: "8px",
171
+ flexDirection: "row",
172
+ flexWrap: "wrap"
173
+ } }, e.map((e) => t(z.Link, {
174
+ ...e,
175
+ type: e.type || "primary"
176
+ }, () => t(z.Text, {
177
+ lineClamp: e?.lineClamp,
178
+ type: e.type || "primary"
179
+ }, () => e.prop)))) : t(z.Link, {
180
+ ...e,
181
+ type: e.type || "primary"
182
+ }, () => t(z.Text, {
183
+ lineClamp: e?.lineClamp,
184
+ type: e.type || "primary"
185
+ }, () => e.prop)) : null;
186
+ }
187
+ function _e(e) {
188
+ let t = B();
189
+ return t ? t("div", { style: {
190
+ display: "flex",
191
+ gap: "4px",
192
+ flexDirection: "row",
193
+ flexWrap: "wrap"
194
+ } }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((n) => t(z.Tag, e, () => n))) : null;
195
+ }
196
+ function ve(e) {
197
+ let t = B();
198
+ return t ? t(z.Tag, { ...e }) : null;
199
+ }
200
+ function ye(e) {
201
+ let t = B();
202
+ return t ? t(z.Select, {
203
+ style: { minWidth: "160px" },
204
+ ...e,
205
+ placeholder: "请选择",
206
+ filterable: !0
207
+ }) : null;
208
+ }
209
+ function be(e) {
210
+ let t = B();
211
+ if (!t) return null;
212
+ let n = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
213
+ return t(z.DatePicker, {
214
+ format: n,
215
+ valueFormat: n,
216
+ startPlaceholder: "开始时间",
217
+ endPlaceholder: "结束时间",
218
+ ...e,
219
+ placeholder: "请选择",
220
+ "onUpdate:modelValue": (t) => e?.onChange?.(t)
221
+ });
222
+ }
223
+ function xe(e) {
224
+ let t = B();
225
+ if (!t) return null;
226
+ let { start: n = "00:00", end: r = "23:30", ...i } = e;
227
+ return t(z.TimeSelect, {
228
+ start: n,
229
+ end: r,
230
+ ...i,
231
+ placeholder: "请选择",
232
+ filterable: !0
233
+ });
234
+ }
235
+ function Se(e) {
236
+ let t = B();
237
+ return t ? t(z.Input, {
238
+ ...e,
239
+ placeholder: "请输入"
240
+ }) : null;
241
+ }
242
+ function Ce(e) {
243
+ let t = B();
244
+ if (!t) return null;
245
+ let { align: n = "left", controlsPosition: r = "right", ...i } = e, a = {
246
+ ...e?.style || {},
247
+ width: "100%"
248
+ };
249
+ return t(z.InputNumber, {
250
+ align: n,
251
+ style: a,
252
+ controlsPosition: r,
253
+ placeholder: "请输入",
254
+ ...i
255
+ });
256
+ }
257
+ function we(e) {
258
+ let t = B();
259
+ if (!t) return null;
260
+ let { rows: n = 1, ...r } = e;
261
+ return t(z.Input, {
262
+ placeholder: "请输入",
263
+ rows: n,
264
+ ...r,
265
+ type: "textarea"
266
+ });
267
+ }
268
+ function Te(e) {
269
+ let t = B();
270
+ return t ? t(z.InputTag, {
271
+ placeholder: "请输入",
272
+ ...e,
273
+ clearable: !1
274
+ }) : null;
275
+ }
276
+ function Ee(e) {
277
+ let t = B();
278
+ return t ? t(Vt || Bt, e) : null;
279
+ }
280
+ function De(e) {
281
+ let t = B();
282
+ return t ? t(z.RadioGroup, e) : null;
283
+ }
284
+ function Oe(e) {
285
+ let t = B();
286
+ return t ? t(z.Text, e, () => typeof e == "string" ? e : e.prop ?? "") : null;
287
+ }
288
+ function ke(e) {
289
+ let t = B();
290
+ return t ? t(kn || On, {
291
+ placeholder: "请选择",
292
+ ...e,
293
+ searchable: !0
294
+ }) : null;
295
+ }
296
+ function Ae(e) {
297
+ let t = B();
298
+ return t ? t(Fn || Pn, e) : null;
299
+ }
300
+ var je = {
301
+ button: he,
302
+ link: ge,
303
+ tag: _e,
304
+ switch: ve,
305
+ select: ye,
306
+ datePicker: be,
307
+ timeSelect: xe,
308
+ input: Se,
309
+ inputNumber: Ce,
310
+ textarea: we,
311
+ inputTag: Te,
312
+ editor: Ee,
313
+ radio: De,
314
+ text: Oe,
315
+ staffSelect: ke,
316
+ upload: Ae
317
+ }, Me = /* @__PURE__ */ u({
318
+ name: "UiColumn",
319
+ __name: "UiColumn",
320
+ props: {
321
+ key: {},
322
+ data: {},
323
+ column: {},
324
+ align: {},
325
+ size: {}
326
+ },
327
+ emits: ["update:data"],
328
+ setup(t, { emit: r }) {
329
+ let a = r, o = t;
330
+ function s(e, t, n) {
331
+ let r = {};
332
+ Object.keys(je).forEach((i) => {
333
+ let o = i;
334
+ r[o] = (r) => {
335
+ let i = Array.isArray(r) ? r : {
336
+ placeholder: "请输入",
337
+ filterable: !0,
338
+ ...r,
339
+ prop: r?.prop || e[n.prop],
340
+ modelValue: r?.prop || e[n.prop],
341
+ onChange: r?.onChange || ((e) => a("update:data", t, n.prop, e)),
342
+ onInput: r?.onInput || ((e) => a("update:data", t, n.prop, e))
343
+ };
344
+ return je[o](i);
345
+ };
346
+ });
347
+ let i = n.render ? n.render({
348
+ data: e,
349
+ index: t,
350
+ h: r,
351
+ column: n
352
+ }) : null;
353
+ return i ? typeof i == "object" ? i : f("div", { innerHTML: String(i) }) : null;
354
+ }
355
+ return (r, a) => {
356
+ let l = O("UiColumn", !0), u = O("el-table-column"), d = O("el-text");
357
+ return t.column?.children && t.column?.children?.length > 0 ? (S(), n(u, {
358
+ key: 0,
359
+ label: t.column.label,
360
+ align: o.align
361
+ }, {
362
+ default: I(() => [(S(!0), i(e, null, E(t.column.children, (e) => (S(), n(l, g({
363
+ column: e,
364
+ data: o.data
365
+ }, { ref_for: !0 }, r.$attrs, { align: o.align }), null, 16, [
366
+ "column",
367
+ "data",
368
+ "align"
369
+ ]))), 256))]),
370
+ _: 1
371
+ }, 8, ["label", "align"])) : (S(), n(u, {
372
+ key: 1,
373
+ prop: String(t.column.prop),
374
+ label: t.column.label,
375
+ "column-key": String(t.column.prop),
376
+ align: o.align,
377
+ width: t.column.width,
378
+ "show-overflow-tooltip": t.column.showOverflowTooltip
379
+ }, {
380
+ default: I(({ row: e, $index: r }) => [t.column.render ? (S(), n(k(s(e, r, t.column)), {
381
+ key: 0,
382
+ align: o.align,
383
+ size: o.size
384
+ }, null, 8, ["align", "size"])) : (S(), n(d, {
385
+ key: 1,
386
+ "line-clamp": t.column?.lineClamp || 2
387
+ }, {
388
+ default: I(() => [c(M(e[t.column.prop]), 1)]),
389
+ _: 2
390
+ }, 1032, ["line-clamp"]))]),
391
+ _: 1
392
+ }, 8, [
393
+ "prop",
394
+ "label",
395
+ "column-key",
396
+ "align",
397
+ "width",
398
+ "show-overflow-tooltip"
399
+ ]));
400
+ };
401
+ }
402
+ }), Ne = /* @__PURE__ */ u({
403
+ __name: "index",
404
+ props: {
405
+ loading: {
406
+ type: [Boolean, Object],
407
+ default: !1
408
+ },
409
+ border: {
410
+ type: Boolean,
411
+ default: !1
412
+ },
413
+ size: { default: "default" },
414
+ data: { default: () => C([]) },
415
+ columns: {},
416
+ align: { default: "left" },
417
+ hidePagination: {
418
+ type: Boolean,
419
+ default: !1
420
+ },
421
+ pagination: { default: () => C({
422
+ page: 1,
423
+ pageSize: 10,
424
+ total: 0,
425
+ pageSizes: [
426
+ 10,
427
+ 20,
428
+ 50
429
+ ]
430
+ }) },
431
+ currentChange: { type: Function },
432
+ selectionChange: { type: Function },
433
+ selectable: { type: Function },
434
+ defaultCheckedKeys: {},
435
+ rowKey: {}
436
+ },
437
+ emits: ["pagination"],
438
+ setup(a, { emit: s }) {
439
+ let c = s, l = o(a, [
440
+ "loading",
441
+ "border",
442
+ "align",
443
+ "hidePagination",
444
+ "pagination",
445
+ "data",
446
+ "size"
447
+ ]), u = T(), d = t(() => N(l.columns)?.some((e) => e.type === "index")), f = t(() => N(l.columns)?.some((e) => e.type === "selection")), p = t(() => !l.columns || !l.columns.length ? [] : l.columns.filter((e) => e.type !== "index" && e.type !== "selection"));
448
+ F(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
449
+ !e?.length || !t?.length || _(() => {
450
+ if (!u.value) return;
451
+ let n = t.filter((t) => e.includes(t.id));
452
+ u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
453
+ });
454
+ }, { immediate: !0 });
455
+ function m(e, t) {
456
+ a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", N(a.pagination));
457
+ }
458
+ function h(e, t, n) {
459
+ a.data[e] && (a.data[e] = {
460
+ ...a.data[e],
461
+ [t]: n
462
+ });
463
+ }
464
+ return (t, o) => {
465
+ let s = O("el-table-column"), c = O("el-table"), _ = O("el-pagination"), v = ee("loading");
466
+ return S(), i("div", null, [
467
+ oe((S(), n(c, g({ border: a.border }, t.$attrs, {
468
+ data: a.data,
469
+ lazy: !0,
470
+ class: "ui-table",
471
+ fit: "",
472
+ ref_key: "tableRef",
473
+ ref: u
474
+ }), {
475
+ default: I(() => [
476
+ f.value ? (S(), n(s, {
477
+ key: 0,
478
+ type: "selection",
479
+ selectable: l.selectable,
480
+ "column-key": "selection_0",
481
+ align: a.align,
482
+ fixed: "left"
483
+ }, null, 8, ["selectable", "align"])) : r("", !0),
484
+ d.value ? (S(), n(s, {
485
+ key: 1,
486
+ fixed: "left",
487
+ type: "index",
488
+ label: "序号",
489
+ width: "60",
490
+ "column-key": "index_1",
491
+ align: a.align
492
+ }, null, 8, ["align"])) : r("", !0),
493
+ (S(!0), i(e, null, E(p.value, (e, t) => (S(), n(Me, {
494
+ key: t + "column_" + e?.prop?.toString(),
495
+ column: e,
496
+ data: a.data,
497
+ align: a.align,
498
+ "onUpdate:data": h,
499
+ size: a.size
500
+ }, null, 8, [
501
+ "column",
502
+ "data",
503
+ "align",
504
+ "size"
505
+ ]))), 128))
506
+ ]),
507
+ _: 1
508
+ }, 16, ["border", "data"])), [[v, a.loading]]),
509
+ a.hidePagination ? r("", !0) : (S(), n(_, {
510
+ key: 0,
511
+ class: "ui-pagination",
512
+ size: "small",
513
+ background: "",
514
+ layout: "total, sizes, prev, pager, next, jumper",
515
+ "page-sizes": a.pagination?.pageSizes || [
516
+ 10,
517
+ 20,
518
+ 50
519
+ ],
520
+ "page-size": a.pagination.pageSize,
521
+ "onUpdate:pageSize": o[0] ||= (e) => a.pagination.pageSize = e,
522
+ "current-page": a.pagination.page,
523
+ "onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
524
+ total: a.pagination.total,
525
+ "onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
526
+ onChange: m
527
+ }, null, 8, [
528
+ "page-sizes",
529
+ "page-size",
530
+ "current-page",
531
+ "total"
532
+ ])),
533
+ D(t.$slots, "default", {}, void 0, !0)
534
+ ]);
535
+ };
536
+ }
537
+ }), Pe = /* @__PURE__ */ L({ default: () => Fe }), Fe = /* @__PURE__ */ R(Ne, [["__scopeId", "data-v-adf869c1"]]), Ie = ["src"], Le = /* @__PURE__ */ u({
538
+ __name: "Icon",
539
+ props: {
540
+ name: {},
541
+ url: {},
542
+ size: {}
543
+ },
544
+ setup(e) {
545
+ return (t, a) => e.name ? (S(), n(k(t.$attrs.component || e.name), g({ key: 0 }, t.$attrs, { style: {
546
+ width: "100%",
547
+ height: "100%"
548
+ } }), null, 16)) : e.url ? (S(), i("img", {
549
+ key: 1,
550
+ src: e.url,
551
+ style: y({
552
+ width: e.size,
553
+ height: e.size
554
+ })
555
+ }, null, 12, Ie)) : r("", !0);
556
+ }
557
+ }), Re = {
558
+ style: {
559
+ width: "100%",
560
+ height: "100%"
561
+ },
562
+ t: "1779702889490",
563
+ class: "icon",
564
+ viewBox: "0 0 1024 1024",
565
+ version: "1.1",
566
+ xmlns: "http://www.w3.org/2000/svg",
567
+ "p-id": "8979"
568
+ }, ze = /* @__PURE__ */ u({
569
+ __name: "Search",
570
+ setup(e) {
571
+ return (e, t) => (S(), i("svg", Re, [...t[0] ||= [a("path", {
572
+ d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z",
573
+ "p-id": "8980"
574
+ }, null, -1)]]));
575
+ }
576
+ }), Be = {
577
+ style: {
578
+ width: "100%",
579
+ height: "100%"
580
+ },
581
+ viewBox: "0 0 1024 1024",
582
+ xmlns: "http://www.w3.org/2000/svg"
583
+ }, Ve = /* @__PURE__ */ u({
584
+ __name: "CloseBold",
585
+ setup(e) {
586
+ return (e, t) => (S(), i("svg", Be, [...t[0] ||= [a("path", {
587
+ d: "M512 476.25l256-256 33.75 33.75-256 256 256 256-33.75 33.75-256-256-256 256-33.75-33.75 256-256-256-256L256 220.25l256 256z",
588
+ fill: "currentColor"
589
+ }, null, -1)]]));
590
+ }
591
+ }), He = {
592
+ style: {
593
+ width: "100%",
594
+ height: "100%"
595
+ },
596
+ t: "1779703362484",
597
+ class: "icon",
598
+ viewBox: "0 0 1024 1024",
599
+ version: "1.1",
600
+ xmlns: "http://www.w3.org/2000/svg",
601
+ "p-id": "10092"
602
+ }, Ue = /* @__PURE__ */ u({
603
+ __name: "User",
604
+ setup(e) {
605
+ return (e, t) => (S(), i("svg", He, [...t[0] ||= [a("path", {
606
+ d: "M512 512c141.385 0 256-114.615 256-256S653.385 0 512 0 256 114.615 256 256s114.615 256 256 256zM366.336 110.336C405.244 71.428 456.976 50 512 50s106.756 21.428 145.664 60.336S718 200.976 718 256s-21.428 106.756-60.336 145.664S567.024 462 512 462s-106.756-21.428-145.664-60.336S306 311.024 306 256s21.428-106.756 60.336-145.664z",
607
+ fill: "#999999",
608
+ "p-id": "10093"
609
+ }, null, -1), a("path", {
610
+ d: "M716.903 474C669.947 527.911 590.06 562.11 512 562.11S354.053 527.911 307.097 474C184.731 524.207 112 620.226 112 730.426 112 892.563 291.087 1024 512 1024c220.914 0 400-131.438 400-293.574 0-110.2-72.731-206.22-195.097-256.426z m48.356 423.705c-32.252 23.672-70.063 42.335-112.384 55.473C608.365 966.994 560.969 974 512 974c-48.968 0-96.365-7.006-140.874-20.822-42.321-13.138-80.132-31.801-112.384-55.473C196.357 851.919 162 792.512 162 730.426c0-21.672 3.545-42.928 10.538-63.177 6.961-20.159 17.368-39.432 30.933-57.281 22.865-30.09 54.718-56.024 93.187-76.069C353.356 582.787 432.632 612.11 512 612.11c79.367 0 158.644-29.323 215.342-78.212 38.469 20.044 70.321 45.979 93.188 76.068 13.564 17.851 23.972 37.123 30.933 57.282 6.992 20.25 10.537 41.506 10.537 63.178 0 62.086-34.356 121.493-96.741 167.279z",
611
+ fill: "#999999",
612
+ "p-id": "10094"
613
+ }, null, -1)]]));
614
+ }
615
+ }), We = {
616
+ style: {
617
+ width: "100%",
618
+ height: "100%"
619
+ },
620
+ t: "1779705400881",
621
+ class: "icon",
622
+ viewBox: "0 0 1152 1024",
623
+ version: "1.1",
624
+ xmlns: "http://www.w3.org/2000/svg",
625
+ "p-id": "11055"
626
+ }, Ge = /* @__PURE__ */ u({
627
+ __name: "Plus",
628
+ setup(e) {
629
+ return (e, t) => (S(), i("svg", We, [...t[0] ||= [a("path", {
630
+ d: "M489.244444 489.244444v295.822223c0 18.850702-15.282631 34.133333-34.133333 34.133333s-34.133333-15.282631-34.133333-34.133333v-295.822223h-295.822222c-18.850702 0-34.133333-15.282631-34.133334-34.133333s15.282631-34.133333 34.133334-34.133333h295.822222v-295.822222c0-18.850702 15.282631-34.133333 34.133333-34.133334s34.133333 15.282631 34.133333 34.133334v295.822222h295.822223c18.850702 0 34.133333 15.282631 34.133333 34.133333s-15.282631 34.133333-34.133333 34.133333h-295.822223z",
631
+ fill: "#323233",
632
+ "p-id": "11056"
633
+ }, null, -1)]]));
634
+ }
635
+ }), Ke = {}, qe = {
636
+ style: {
637
+ width: "100%",
638
+ height: "100%"
639
+ },
640
+ t: "1779754328342",
641
+ class: "icon",
642
+ viewBox: "0 0 1024 1024",
643
+ version: "1.1",
644
+ xmlns: "http://www.w3.org/2000/svg",
645
+ "p-id": "4859"
646
+ };
647
+ function Je(e, t) {
648
+ return S(), i("svg", qe, [...t[0] ||= [a("path", {
649
+ d: "M731.733333 480l-384-341.333333c-17.066667-14.933333-44.8-14.933333-59.733333 4.266666-14.933333 17.066667-14.933333 44.8 4.266667 59.733334L640 512 292.266667 821.333333c-17.066667 14.933333-19.2 42.666667-4.266667 59.733334 8.533333 8.533333 19.2 14.933333 32 14.933333 10.666667 0 19.2-4.266667 27.733333-10.666667l384-341.333333c8.533333-8.533333 14.933333-19.2 14.933334-32s-4.266667-23.466667-14.933334-32z",
650
+ fill: "#666666",
651
+ "p-id": "4860"
652
+ }, null, -1)]]);
653
+ }
654
+ var Ye = /* @__PURE__ */ R(Ke, [["render", Je]]), Xe = {}, Ze = {
655
+ style: {
656
+ width: "100%",
657
+ height: "100%"
658
+ },
659
+ t: "1779754450238",
660
+ class: "icon",
661
+ viewBox: "0 0 1024 1024",
662
+ version: "1.1",
663
+ xmlns: "http://www.w3.org/2000/svg",
664
+ "p-id": "6029"
665
+ };
666
+ function Qe(e, t) {
667
+ return S(), i("svg", Ze, [...t[0] ||= [a("path", {
668
+ d: "M897.96 728.3c-18.8 18.8-49.1 18.801-67.901 0l-318-318-318 318c-18.8 18.8-49.2 18.8-67.901 0-18.8-18.8-18.801-49.1 0-67.901l352-352c18.8-18.8 49.2-18.8 67.901 0l352 352c9.4 9.4 14 21.7 14 34-0.1 12.2-4.7 24.501-14.1 33.9z",
669
+ "p-id": "6030"
670
+ }, null, -1)]]);
671
+ }
672
+ var $e = /* @__PURE__ */ R(Xe, [["render", Qe]]), et = {}, tt = {
673
+ style: {
674
+ width: "100%",
675
+ height: "100%"
676
+ },
677
+ t: "1779754522950",
678
+ class: "icon",
679
+ viewBox: "0 0 1024 1024",
680
+ version: "1.1",
681
+ xmlns: "http://www.w3.org/2000/svg",
682
+ "p-id": "6997"
683
+ };
684
+ function nt(e, t) {
685
+ return S(), i("svg", tt, [...t[0] ||= [a("path", {
686
+ d: "M512.34133333 931.38488889c-49.94844445 0-98.87288889-8.64711111-145.29422222-25.82755556-44.94222222-16.61155555-86.35733333-40.61866667-123.22133333-71.45244444-74.29688889-61.89511111-125.15555555-148.02488889-143.24622223-242.34666667l71.45244445-13.76711111c31.28888889 162.58844445 174.42133333 280.576 340.30933333 280.576 70.08711111 0 137.55733333-20.82133333 195.12888889-60.07466666 56.32-38.45688889 99.66933333-91.93244445 125.49688889-154.73777778l67.35644444 27.648c-31.28888889 76.00355555-83.74044445 140.74311111-151.77955555 187.16444444-69.85955555 47.67288889-151.43822222 72.81777778-236.20266667 72.81777778zM846.848 421.43288889C827.392 349.29777778 783.92888889 284.33066667 724.65066667 238.13688889c-61.21244445-47.55911111-134.59911111-72.704-212.30933334-72.704-69.97333333 0-137.44355555 20.70755555-194.90133333 59.96088889-56.32 38.57066667-99.78311111 91.93244445-125.61066667 154.624l-67.35644444-27.76177778c31.28888889-75.88977778 83.74044445-140.40177778 151.77955556-186.82311111 69.74577778-47.55911111 151.32444445-72.704 235.9751111-72.704 47.33155555 0 93.86666667 7.85066667 138.12622223 23.32444444 42.89422222 14.90488889 82.83022222 36.75022222 118.784 64.62577778 35.61244445 27.648 66.33244445 60.64355555 91.47733333 98.07644444 25.48622222 38.00177778 44.48711111 79.64444445 56.32 123.67644445l-70.08711111 19.00088889z",
687
+ "p-id": "6998"
688
+ }, null, -1), a("path", {
689
+ d: "M30.26488889 669.35466667l93.52533333-162.58844445 162.58844445 93.52533333M997.71733333 345.20177778l-83.28533333 168.16355555-168.16355555-83.17155555",
690
+ "p-id": "6999"
691
+ }, null, -1)]]);
692
+ }
693
+ var rt = /* @__PURE__ */ R(et, [["render", nt]]), it = {}, at = {
694
+ style: {
695
+ width: "100%",
696
+ height: "100%"
697
+ },
698
+ t: "1779754755766",
699
+ class: "icon",
700
+ viewBox: "0 0 1024 1024",
701
+ version: "1.1",
702
+ xmlns: "http://www.w3.org/2000/svg",
703
+ "p-id": "9850"
704
+ };
705
+ function ot(e, t) {
706
+ return S(), i("svg", at, [...t[0] ||= [a("path", {
707
+ d: "M64 448l832-320-128 704-446.016-243.008L832 192 243.008 544.96 64 448z m256 512v-303.04L512 768l-192 192z",
708
+ "p-id": "9851"
709
+ }, null, -1)]]);
710
+ }
711
+ var st = /* @__PURE__ */ R(it, [["render", ot]]), ct = {}, lt = {
712
+ style: {
713
+ width: "100%",
714
+ height: "100%"
715
+ },
716
+ t: "1780036867825",
717
+ class: "icon",
718
+ viewBox: "0 0 1024 1024",
719
+ version: "1.1",
720
+ xmlns: "http://www.w3.org/2000/svg",
721
+ "p-id": "2958"
722
+ };
723
+ function ut(e, t) {
724
+ return S(), i("svg", lt, [...t[0] ||= [a("path", {
725
+ d: "M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 268.190476v292.571428h-73.142858V438.857143h73.142858z m0-121.904762v73.142857h-73.142858v-73.142857h73.142858z",
726
+ "p-id": "2959"
727
+ }, null, -1)]]);
728
+ }
729
+ var dt = /* @__PURE__ */ R(ct, [["render", ut]]), ft = {}, pt = {
730
+ style: {
731
+ width: "100%",
732
+ height: "100%"
733
+ },
734
+ t: "1780037293881",
735
+ class: "icon",
736
+ viewBox: "0 0 1024 1024",
737
+ version: "1.1",
738
+ xmlns: "http://www.w3.org/2000/svg",
739
+ "p-id": "5846"
740
+ };
741
+ function mt(e, t) {
742
+ return S(), i("svg", pt, [...t[0] ||= [a("path", {
743
+ d: "M768.73106 703.537712c-35.606921 0-67.945574 14.793214-91.167479 38.359147l-309.109357-171.670082c9.116748-17.545439 14.621199-37.155048 14.621199-58.312783 0-12.55703-2.408198-24.426004-5.676466-35.950949l304.63699-189.215522c22.705863 20.469679 52.464304 33.198723 85.146985 33.198723 70.525785 0 127.978498-57.452713 127.978498-127.978498S837.708718 63.989249 767.182933 63.989249s-127.978498 57.452713-127.978498 127.978498c0 14.621199 2.92424 28.382328 7.396607 41.455401L344.716278 420.746514c-23.049891-22.705863-54.700487-36.983034-89.791366-36.983034-70.525785 0-127.978498 57.452713-127.978498 127.978498s57.452713 127.978498 127.978498 127.978498c25.630102 0 49.540064-7.740635 69.493701-20.813707l321.150344 178.378633c-3.096254 11.008903-5.160423 22.18982-5.160423 34.058794 0 70.525785 57.452713 127.978498 127.978498 127.978498s127.978498-57.452713 127.978498-127.978498S839.256845 703.537712 768.73106 703.537712zM767.182933 127.978498c35.262893 0 63.989249 28.726356 63.989249 63.989249s-28.726356 63.989249-63.989249 63.989249-63.989249-28.726356-63.989249-63.989249S731.92004 127.978498 767.182933 127.978498zM191.107677 511.913993c0-35.262893 28.726356-63.989249 63.989249-63.989249s63.989249 28.726356 63.989249 63.989249-28.726356 63.989249-63.989249 63.989249S191.107677 547.176886 191.107677 511.913993zM768.73106 895.505459c-35.262893 0-63.989249-28.726356-63.989249-63.989249s28.726356-63.989249 63.989249-63.989249 63.989249 28.726356 63.989249 63.989249C832.720309 866.951117 803.993953 895.505459 768.73106 895.505459z",
744
+ fill: "#575B66",
745
+ "p-id": "5847"
746
+ }, null, -1)]]);
747
+ }
748
+ var ht = /* @__PURE__ */ R(ft, [["render", mt]]), gt = {}, _t = {
749
+ style: {
750
+ width: "100%",
751
+ height: "100%"
752
+ },
753
+ t: "1780037548768",
754
+ class: "icon",
755
+ viewBox: "0 0 1024 1024",
756
+ version: "1.1",
757
+ xmlns: "http://www.w3.org/2000/svg",
758
+ "p-id": "7726"
759
+ };
760
+ function vt(e, t) {
761
+ return S(), i("svg", _t, [...t[0] ||= [a("path", {
762
+ d: "M501.84 393.44h16a16 16 0 0 1 16 16v151.584a16 16 0 0 1-6.768 13.072l-84.928 59.952a16 16 0 0 1-22.304-3.84l-9.216-13.072a16 16 0 0 1 3.84-22.304l71.376-50.4V409.44a16 16 0 0 1 16-16z m3.552 458.96C332.304 852.4 192 712.08 192 539.008s140.32-313.392 313.392-313.392c173.088 0 313.392 140.32 313.392 313.392 0 173.088-140.32 313.392-313.392 313.392z m0-48c146.56 0 265.392-118.816 265.392-265.392 0-146.56-118.816-265.392-265.392-265.392-146.56 0-265.392 118.832-265.392 265.392 0 146.576 118.816 265.392 265.392 265.392z m-100.288-617.6l4.752 17.36c4.224 13.632-4.48 17.712-8.784 19.088a333.824 333.824 0 0 0-156.72 106.448c-4.032 4.912-11.408 13.952-26.24 4.528l-11.952-8.688c-11.472-9.088-5.648-17.904-2.176-22.24a381.792 381.792 0 0 1 183.44-126.08c4.608-1.456 13.968-3.344 17.68 9.568z m396.768 137.376l-13.184 9.696c-13.04 8.912-19.84 0.48-23.424-3.904a333.84 333.84 0 0 0-155.12-106.032c-5.44-1.76-15.936-5.376-11.664-23.04l3.728-13.856c5.104-14.64 15.328-11.136 21.008-9.328a381.808 381.808 0 0 1 180.608 123.6c3.616 4.48 11.136 14.288-1.952 22.864z",
763
+ fill: "#000000",
764
+ "p-id": "7727"
765
+ }, null, -1)]]);
766
+ }
767
+ var yt = /* @__PURE__ */ R(gt, [["render", vt]]), bt = {}, xt = {
768
+ style: {
769
+ width: "100%",
770
+ height: "100%"
771
+ },
772
+ t: "1780038539022",
773
+ class: "icon",
774
+ viewBox: "0 0 1024 1024",
775
+ version: "1.1",
776
+ xmlns: "http://www.w3.org/2000/svg",
777
+ "p-id": "8719"
778
+ };
779
+ function St(e, t) {
780
+ return S(), i("svg", xt, [...t[0] ||= [a("path", {
781
+ d: "M938.666667 682.666667c-46.933333 0-85.333333-38.4-85.333334-85.333334V384c0-187.733333-153.6-341.333333-341.333333-341.333333S170.666667 196.266667 170.666667 384v213.333333c0 46.933333-38.4 85.333333-85.333334 85.333334-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h853.333334c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666zM234.666667 682.666667c12.8-25.6 21.333333-55.466667 21.333333-85.333334V384c0-140.8 115.2-256 256-256s256 115.2 256 256v213.333333c0 29.866667 8.533333 59.733333 21.333333 85.333334h-554.666666zM605.866667 857.6c-21.333333-12.8-46.933333-4.266667-59.733334 17.066667-4.266667 12.8-17.066667 21.333333-34.133333 21.333333s-29.866667-8.533333-38.4-21.333333c-12.8-21.333333-38.4-25.6-59.733333-17.066667-21.333333 12.8-25.6 38.4-17.066667 59.733333 34.133333 59.733333 115.2 81.066667 174.933333 46.933334 17.066667-12.8 34.133333-25.6 46.933334-46.933334 17.066667-21.333333 8.533333-46.933333-12.8-59.733333z",
782
+ "p-id": "8720"
783
+ }, null, -1)]]);
784
+ }
785
+ var Ct = /* @__PURE__ */ R(bt, [["render", St]]), wt = /* @__PURE__ */ L({
786
+ ArrowRight: () => Ye,
787
+ ArrowUp: () => $e,
788
+ Bell: () => Ct,
789
+ Clock: () => yt,
790
+ CloseBold: () => Ve,
791
+ Info: () => dt,
792
+ Plus: () => Ge,
793
+ Promotion: () => st,
794
+ Refresh: () => rt,
795
+ Search: () => ze,
796
+ Share: () => ht,
797
+ User: () => Ue,
798
+ YcIcon: () => Le
799
+ });
800
+ //#endregion
801
+ //#region src/components/utils/tools.ts
802
+ function Tt(e) {
803
+ return typeof e == "number" ? e + "px" : e || "100px";
804
+ }
805
+ function Et(e) {
806
+ return typeof e == "number" ? e + "px" : e || "180px";
807
+ }
808
+ function Dt(e, t) {
809
+ let n = Object.fromEntries(Object.entries(je).map(([n, r]) => [n, (i = {}) => ({
810
+ props: {
811
+ ...i,
812
+ data: t,
813
+ prop: e.prop
814
+ },
815
+ type: n,
816
+ component: r
817
+ })]));
818
+ return typeof e.render == "function" ? e.render({
819
+ h: n,
820
+ data: t
821
+ }) : n.input({ prop: e.prop });
822
+ }
823
+ function V(e, t) {
824
+ let n = e.prop;
825
+ n && typeof t == "object" && t && t[n];
826
+ let r = Dt(e, t);
827
+ return typeof r != "object" || !r ? r ?? "" : (r.component, r);
828
+ }
829
+ //#endregion
830
+ //#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
831
+ var Ot = { style: {
832
+ display: "flex",
833
+ "justify-content": "end",
834
+ "align-items": "center",
835
+ width: "100%"
836
+ } }, kt = /* @__PURE__ */ u({
837
+ name: "UiDefaultFilter",
838
+ __name: "index",
839
+ props: {
840
+ type: {},
841
+ size: { default: "default" },
842
+ fields: {},
843
+ expandNum: {},
844
+ valueWidth: { default: "100%" },
845
+ labelWidth: { default: "100px" },
846
+ omitFields: { default: () => [] },
847
+ rules: {},
848
+ required: { type: Boolean },
849
+ column: { default: 4 },
850
+ filterFixedValues: { default: () => ({ page: 1 }) }
851
+ },
852
+ emits: [
853
+ "submit",
854
+ "reset",
855
+ "search"
856
+ ],
857
+ setup(s, { emit: u }) {
858
+ let d = u, f = o(s, [
859
+ "fields",
860
+ "labelWidth",
861
+ "valueWidth",
862
+ "omitFields",
863
+ "column",
864
+ "size",
865
+ "filterFixedValues"
866
+ ]), p = C({
867
+ expandNum: 0,
868
+ expand: !1
869
+ }), m = C({}), h = t(() => s.fields.slice(0, p.expand ? s.fields.length : p.expandNum)), _ = t(() => 24 - h.value?.reduce((e, t) => e + (t.span || 24 / s.column), 0) % 24 - 24 / s.column);
870
+ b(() => {
871
+ p.expandNum = f?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
872
+ let t = Dt(e, m)?.props?.defaultValue;
873
+ t !== void 0 && (m[e.prop] = t);
874
+ });
875
+ });
876
+ function v() {
877
+ let e = {};
878
+ Object.keys(m).forEach((t) => {
879
+ if (m[t] !== void 0) {
880
+ let n = N(m[t]);
881
+ e[t] = typeof n == "string" ? n.trim() : n;
882
+ }
883
+ }), d("submit", {
884
+ ...e,
885
+ ...s.filterFixedValues
886
+ }), d("search", {
887
+ ...e,
888
+ ...s.filterFixedValues
889
+ });
890
+ }
891
+ function x() {
892
+ Object.keys(m).forEach((e) => {
893
+ s.omitFields.includes(e) || (m[e] = void 0);
894
+ }), d("reset", m);
895
+ }
896
+ return (t, o) => {
897
+ let u = O("el-input"), d = O("el-form-item"), f = O("el-col"), b = O("el-button"), C = O("el-row"), w = O("el-form");
898
+ return S(), n(w, g({
899
+ model: m,
900
+ class: "ui-filter",
901
+ size: s.size
902
+ }, t.$attrs), {
903
+ default: I(() => [l(C, {
904
+ gutter: 20,
905
+ style: { "margin-bottom": "-15px" }
906
+ }, {
907
+ default: I(() => [(S(!0), i(e, null, E(h.value, (e) => (S(), n(f, { span: e.span || 24 / s.column }, {
908
+ default: I(() => [(S(), n(d, {
909
+ key: e.prop,
910
+ label: e.label,
911
+ "label-width": P(Tt)(e?.labelWidth || s.labelWidth),
912
+ "value-width": P(Et)(e?.valueWidth || s.valueWidth)
913
+ }, {
914
+ default: I(() => [e.render ? (S(), n(k(P(Dt)(e, m).component), g({
915
+ key: 0,
916
+ modelValue: m[e.prop],
917
+ "onUpdate:modelValue": (t) => m[e.prop] = t
918
+ }, { ref_for: !0 }, P(Dt)(e, m).props, {
919
+ clearable: !0,
920
+ style: { width: P(Et)(e?.valueWidth || s.valueWidth) }
921
+ }), null, 16, [
922
+ "modelValue",
923
+ "onUpdate:modelValue",
924
+ "style"
925
+ ])) : (S(), n(u, {
926
+ key: 1,
927
+ modelValue: m[e.prop],
928
+ "onUpdate:modelValue": (t) => m[e.prop] = t,
929
+ placeholder: "请输入",
930
+ clearable: !0,
931
+ style: y({ width: P(Et)(e?.valueWidth || s.valueWidth) })
932
+ }, null, 8, [
933
+ "modelValue",
934
+ "onUpdate:modelValue",
935
+ "style"
936
+ ]))]),
937
+ _: 2
938
+ }, 1032, [
939
+ "label",
940
+ "label-width",
941
+ "value-width"
942
+ ]))]),
943
+ _: 2
944
+ }, 1032, ["span"]))), 256)), l(f, {
945
+ span: 24 / s.column,
946
+ offset: _.value
947
+ }, {
948
+ default: I(() => [l(d, {
949
+ label: "",
950
+ "label-width": "30px"
951
+ }, {
952
+ default: I(() => [a("div", Ot, [
953
+ D(t.$slots, "left", { form: m }, void 0, !0),
954
+ s.fields.length >= 2 * s.column ? (S(), n(b, {
955
+ key: 0,
956
+ text: "",
957
+ icon: p.expand ? P($e) : P(Ye),
958
+ onClick: o[0] ||= (e) => p.expand = !p.expand
959
+ }, {
960
+ default: I(() => [c(M(p.expand ? "收起" : "展开"), 1)]),
961
+ _: 1
962
+ }, 8, ["icon"])) : r("", !0),
963
+ l(b, {
964
+ icon: P(ze),
965
+ type: "primary",
966
+ onClick: v
967
+ }, {
968
+ default: I(() => [...o[1] ||= [c("查询", -1)]]),
969
+ _: 1
970
+ }, 8, ["icon"]),
971
+ l(b, {
972
+ icon: P(rt),
973
+ onClick: x
974
+ }, {
975
+ default: I(() => [...o[2] ||= [c("重置", -1)]]),
976
+ _: 1
977
+ }, 8, ["icon"]),
978
+ D(t.$slots, "handle", { form: m }, void 0, !0),
979
+ D(t.$slots, "right", { form: m }, void 0, !0)
980
+ ])]),
981
+ _: 3
982
+ })]),
983
+ _: 3
984
+ }, 8, ["span", "offset"])]),
985
+ _: 3
986
+ })]),
987
+ _: 3
988
+ }, 16, ["model", "size"]);
989
+ };
990
+ }
991
+ }), At = /* @__PURE__ */ L({ default: () => jt }), jt = /* @__PURE__ */ R(kt, [["__scopeId", "data-v-0e3c7086"]]), Mt = {
992
+ key: 2,
993
+ style: { display: "inline-block" }
994
+ }, Nt = {
995
+ key: 2,
996
+ style: { display: "inline-block" }
997
+ }, Pt = {
998
+ key: 0,
999
+ class: "ui-form-buttons"
1000
+ }, Ft = /* @__PURE__ */ u({
1001
+ __name: "index",
1002
+ props: {
1003
+ fields: {},
1004
+ expandNum: {},
1005
+ valueWidth: {},
1006
+ labelWidth: {},
1007
+ labelPosition: {},
1008
+ omitFields: {},
1009
+ rules: {},
1010
+ required: { type: Boolean },
1011
+ column: {},
1012
+ defaultValues: {},
1013
+ model: {},
1014
+ modelValue: {},
1015
+ valueModel: {},
1016
+ size: {}
1017
+ },
1018
+ emits: [
1019
+ "submit",
1020
+ "reset",
1021
+ "update:model",
1022
+ "update:modelValue"
1023
+ ],
1024
+ setup(a, { expose: o, emit: s }) {
1025
+ re((e) => ({ v57cec5bb: P(ee) / 2 }));
1026
+ let u = s, d = a, { fields: f, labelWidth: p = "100px", valueWidth: h = "auto", omitFields: _ = [], rules: b = C({}), labelPosition: x = "top", valueModel: w = "default", column: ee = 24 } = d, A = T(0), j = T(), N = t(() => d.modelValue !== void 0), ne = C({}), ie = t(() => N.value ? d.modelValue : d.model || ne), F = t({
1027
+ get: () => ie.value,
1028
+ set: (e) => {
1029
+ N.value && u("update:modelValue", e);
1030
+ }
1031
+ }), ae = t(() => f.filter((e) => typeof e.prop == "string")), oe = t(() => {
1032
+ if (b && Object.keys(b).length) return b;
1033
+ let e = {};
1034
+ return f.forEach((t) => {
1035
+ t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
1036
+ required: !0,
1037
+ message: "请输入" + t.label,
1038
+ trigger: "change"
1039
+ }]);
1040
+ }), e;
1041
+ });
1042
+ async function se() {
1043
+ await j.value?.validate().catch(() => !1) && u("submit", te(ie.value));
1044
+ }
1045
+ function ce() {
1046
+ let e = {};
1047
+ Object.keys(ie.value).forEach((t) => {
1048
+ _.includes(t) || (e[t] = void 0);
1049
+ }), Object.assign(ie.value, e), A.value += 1, u("reset", te(ie.value));
1050
+ }
1051
+ function le() {
1052
+ return te(ie.value);
1053
+ }
1054
+ function ue(e) {
1055
+ Object.assign(ie.value, e);
1056
+ }
1057
+ function L() {
1058
+ j.value?.clearValidate();
1059
+ }
1060
+ async function de() {
1061
+ return new Promise((e) => {
1062
+ j.value?.validate((t, n) => e(n));
1063
+ });
1064
+ }
1065
+ return o({
1066
+ getValues: le,
1067
+ setValues: ue,
1068
+ clearValidate: L,
1069
+ onSubmit: se,
1070
+ validate: de
1071
+ }), (t, a) => {
1072
+ let o = O("el-input"), s = O("el-form-item"), u = O("el-form"), d = O("el-button");
1073
+ return S(), i(e, null, [l(u, g({
1074
+ ref_key: "uiFormRef",
1075
+ ref: j,
1076
+ model: F.value
1077
+ }, t.$attrs, {
1078
+ rules: oe.value,
1079
+ inline: P(x) !== "top",
1080
+ "label-position": P(x),
1081
+ class: {
1082
+ "ui-form": !0,
1083
+ horizontal: P(x) !== "top"
1084
+ },
1085
+ "validate-on-rule-change": !1
1086
+ }), {
1087
+ default: I(() => [(S(!0), i(e, null, E(ae.value, (r, a) => (S(), n(s, {
1088
+ key: `${r.prop}-${a}-${A.value}`,
1089
+ label: r.label,
1090
+ "label-width": P(p),
1091
+ "value-width": P(h),
1092
+ prop: r.prop,
1093
+ style: y({
1094
+ width: `${r?.width ? r?.width + "px" : "100%"}`,
1095
+ gridColumn: `span ${(r?.span || P(ee)) / 2 || 1}`
1096
+ })
1097
+ }, {
1098
+ default: I(() => [r.render ? (S(), i(e, { key: 0 }, [m(P(V)(r, F.value)) ? (S(), n(k(P(V)(r, F.value)), {
1099
+ key: 0,
1100
+ style: { display: "inline-block" }
1101
+ })) : P(V)(r, F.value).component ? (S(), n(k(P(V)(r, F.value).component), g({
1102
+ key: 1,
1103
+ modelValue: F.value[r.prop],
1104
+ "onUpdate:modelValue": (e) => F.value[r.prop] = e
1105
+ }, { ref_for: !0 }, P(V)(r, F.value).props, {
1106
+ clearable: !0,
1107
+ key: `${r.prop}-${A.value}`,
1108
+ style: { display: "inline-block" },
1109
+ class: { underline: P(w) === "underline" }
1110
+ }), null, 16, [
1111
+ "modelValue",
1112
+ "onUpdate:modelValue",
1113
+ "class"
1114
+ ])) : (S(), i("span", Mt, M(P(V)(r, F.value) || "-"), 1)), (S(!0), i(e, null, E(r.slots, (e) => D(t.$slots, "default", { form: F.value }, () => [m(P(V)(e, F.value)) ? (S(), n(k(P(V)(e, F.value)), {
1115
+ key: 0,
1116
+ style: { display: "inline-block" }
1117
+ })) : P(V)(e, F.value).component ? (S(), n(k(P(V)(e, F.value).component), g({
1118
+ key: 1,
1119
+ modelValue: F.value[e.prop],
1120
+ "onUpdate:modelValue": (t) => F.value[e.prop] = t,
1121
+ "default-value": e.defaultValue,
1122
+ placeholder: e.placeholder
1123
+ }, { ref_for: !0 }, P(V)(e, F.value).props, {
1124
+ style: {
1125
+ display: "inline-block",
1126
+ marginLeft: "10px",
1127
+ width: `${e.width ? e.width + "px" : "100%"}`
1128
+ },
1129
+ class: { underline: P(w) === "underline" },
1130
+ clearable: !0,
1131
+ key: `${e.prop}-${A.value}`
1132
+ }), null, 16, [
1133
+ "modelValue",
1134
+ "onUpdate:modelValue",
1135
+ "default-value",
1136
+ "placeholder",
1137
+ "style",
1138
+ "class"
1139
+ ])) : (S(), i("span", Nt, M(P(V)(e, F.value) || "-"), 1))], !0)), 256))], 64)) : (S(), n(o, {
1140
+ key: 1,
1141
+ modelValue: F.value[r.prop],
1142
+ "onUpdate:modelValue": (e) => F.value[r.prop] = e,
1143
+ placeholder: "请输入",
1144
+ clearable: !0,
1145
+ class: v({ underline: P(w) === "underline" })
1146
+ }, null, 8, [
1147
+ "modelValue",
1148
+ "onUpdate:modelValue",
1149
+ "class"
1150
+ ]))]),
1151
+ _: 2
1152
+ }, 1032, [
1153
+ "label",
1154
+ "label-width",
1155
+ "value-width",
1156
+ "prop",
1157
+ "style"
1158
+ ]))), 128))]),
1159
+ _: 3
1160
+ }, 16, [
1161
+ "model",
1162
+ "rules",
1163
+ "inline",
1164
+ "label-position",
1165
+ "class"
1166
+ ]), t.$attrs?.hideHandle ? r("", !0) : (S(), i("div", Pt, [
1167
+ D(t.$slots, "handle", { form: F.value }, void 0, !0),
1168
+ l(d, {
1169
+ icon: P(rt),
1170
+ onClick: ce,
1171
+ size: t.$props.size
1172
+ }, {
1173
+ default: I(() => [...a[0] ||= [c("重置", -1)]]),
1174
+ _: 1
1175
+ }, 8, ["icon", "size"]),
1176
+ l(d, {
1177
+ icon: P(st),
1178
+ type: "primary",
1179
+ onClick: se,
1180
+ size: t.$props.size
1181
+ }, {
1182
+ default: I(() => [...a[1] ||= [c("提交", -1)]]),
1183
+ _: 1
1184
+ }, 8, ["icon", "size"])
1185
+ ]))], 64);
1186
+ };
1187
+ }
1188
+ }), It = /* @__PURE__ */ L({ default: () => Lt }), Lt = /* @__PURE__ */ R(Ft, [["__scopeId", "data-v-539b7aeb"]]), Rt = ["disabled"], zt = /* @__PURE__ */ u({
1189
+ __name: "index",
1190
+ props: /* @__PURE__ */ h({
1191
+ defaultValue: { default: "" },
1192
+ disabled: {
1193
+ type: Boolean,
1194
+ default: !1
1195
+ }
1196
+ }, {
1197
+ modelValue: {
1198
+ type: String,
1199
+ default: ""
1200
+ },
1201
+ modelModifiers: {}
1202
+ }),
1203
+ emits: /* @__PURE__ */ h(["change"], ["update:modelValue"]),
1204
+ setup(e, { emit: t }) {
1205
+ let n = T(), r = ie(e, "modelValue"), a = T(r.value || e.defaultValue || ""), o = null, s = t;
1206
+ return b(() => {
1207
+ o = new le({
1208
+ element: n.value,
1209
+ placeholder: "点击输入内容...",
1210
+ content: r.value || e.defaultValue || "",
1211
+ toolbarExcludeKeys: ["ai"],
1212
+ onChange: (e) => {
1213
+ let t = e.getHtml();
1214
+ r.value = t, a.value = t, s("change", t);
1215
+ }
1216
+ }), o.setEditable(!e.disabled);
1217
+ }), F(r, (e) => {
1218
+ o && e !== o.getHtml() && o.setContent(e);
1219
+ }), x(() => {
1220
+ o && o.destroy();
1221
+ }), (t, r) => (S(), i("div", {
1222
+ ref_key: "editorRef",
1223
+ ref: n,
1224
+ style: { height: "500px" },
1225
+ disabled: e.disabled
1226
+ }, null, 8, Rt));
1227
+ }
1228
+ }), Bt = /* @__PURE__ */ L({ default: () => Vt }), Vt = zt, Ht = { class: "ui-tree-wrapper" }, Ut = {
1229
+ key: 0,
1230
+ style: {
1231
+ display: "flex",
1232
+ "flex-direction": "row",
1233
+ "justify-content": "space-between",
1234
+ "align-items": "center",
1235
+ gap: "10px"
1236
+ }
1237
+ }, Wt = {
1238
+ key: 0,
1239
+ class: "custom-tree-node"
1240
+ }, Gt = { class: "node-label" }, Kt = { key: 0 }, qt = ["onClick"], Jt = /* @__PURE__ */ u({
1241
+ __name: "index",
1242
+ props: {
1243
+ id: {},
1244
+ data: { default: () => [] },
1245
+ filterable: { type: Boolean },
1246
+ placeholder: {},
1247
+ hidePlusHandle: { type: Boolean },
1248
+ hideNodeAdd: { type: Boolean },
1249
+ hideNodeEdit: { type: Boolean },
1250
+ hideNodeDel: { type: Boolean },
1251
+ hideNodeHandle: { type: Boolean },
1252
+ onNodeAdd: { type: Function },
1253
+ onNodeEdit: { type: Function },
1254
+ onNodeDel: { type: Function },
1255
+ showTotal: { type: Boolean },
1256
+ "show-total": { type: Boolean },
1257
+ nodeKey: {},
1258
+ props: { default: () => ({ label: "label" }) }
1259
+ },
1260
+ emits: [
1261
+ "add",
1262
+ "edit",
1263
+ "delete"
1264
+ ],
1265
+ setup(e, { emit: s }) {
1266
+ let u = s, f = ne(), p = o(e, [
1267
+ "filterable",
1268
+ "placeholder",
1269
+ "data",
1270
+ "props"
1271
+ ]), m = T(""), h = T(), _ = T(), v = d()?.appContext.config.globalProperties.$messageBox;
1272
+ F(m, (t) => {
1273
+ e.filterable && _.value?.filter(t);
1274
+ });
1275
+ let y = t(() => f?.["show-total"] ?? p?.showTotal ?? !0);
1276
+ function b(t, n) {
1277
+ return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
1278
+ }
1279
+ function x(e, t) {
1280
+ e?.stopPropagation(), h.value = t.id;
1281
+ }
1282
+ function C(e) {
1283
+ v?.prompt("请输入新的名称", "添加节点", {
1284
+ confirmButtonText: "确定",
1285
+ cancelButtonText: "取消"
1286
+ }).then(({ value: t }) => {
1287
+ u("add", {
1288
+ node: e,
1289
+ value: t
1290
+ });
1291
+ });
1292
+ }
1293
+ function w(t) {
1294
+ v?.prompt("请输入新的名称", "重命名", {
1295
+ confirmButtonText: "确定",
1296
+ cancelButtonText: "取消",
1297
+ inputValue: e.props?.label ? t[e.props?.label] : ""
1298
+ }).then(({ value: e }) => {
1299
+ u("edit", {
1300
+ node: t,
1301
+ value: e
1302
+ });
1303
+ });
1304
+ }
1305
+ async function E(e) {
1306
+ e.id && u("delete", e);
1307
+ }
1308
+ return (t, o) => {
1309
+ let s = O("el-input"), u = O("el-button"), d = O("el-dropdown-item"), f = O("el-dropdown-menu"), h = O("el-dropdown"), v = O("el-tree-v2");
1310
+ return S(), i("div", Ht, [
1311
+ e.filterable ? (S(), i("div", Ut, [l(s, {
1312
+ modelValue: m.value,
1313
+ "onUpdate:modelValue": o[0] ||= (e) => m.value = e,
1314
+ placeholder: e.placeholder ?? "请输入",
1315
+ clearable: ""
1316
+ }, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (S(), n(u, {
1317
+ key: 0,
1318
+ style: {
1319
+ margin: "0px",
1320
+ padding: "0px"
1321
+ },
1322
+ link: "",
1323
+ onClick: o[1] ||= (e) => C()
1324
+ }, {
1325
+ default: I(() => [...o[2] ||= [a("span", { style: { padding: "4px" } }, "+", -1)]]),
1326
+ _: 1
1327
+ }))])) : r("", !0),
1328
+ D(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
1329
+ l(v, g({
1330
+ ref_key: "treeRef",
1331
+ ref: _,
1332
+ style: { "margin-top": "8px" }
1333
+ }, {
1334
+ ...t.$props,
1335
+ ...t.$attrs
1336
+ }, {
1337
+ "node-key": p?.nodeKey || "id",
1338
+ "highlight-current": !0,
1339
+ "filter-method": b
1340
+ }), {
1341
+ default: I((s) => [s?.data ? (S(), i("div", Wt, [a("div", Gt, [s.data?.children?.length ? (S(), i("span", Kt, "📁")) : r("", !0), c(" " + M(s.data?.[e.props?.label || "label"]) + " " + M(y.value && s.data?.children?.length ? `(${s.data.children.length})` : ""), 1)]), p.hideNodeHandle ? r("", !0) : (S(), n(h, {
1342
+ key: 0,
1343
+ trigger: "click"
1344
+ }, {
1345
+ dropdown: I(() => [l(f, null, {
1346
+ default: I(() => [
1347
+ p?.hideNodeAdd ? r("", !0) : (S(), n(d, {
1348
+ key: 0,
1349
+ onClick: (e) => C(s.data)
1350
+ }, {
1351
+ default: I(() => [...o[3] ||= [c(" 添加 ", -1)]]),
1352
+ _: 1
1353
+ }, 8, ["onClick"])),
1354
+ p?.hideNodeEdit ? r("", !0) : (S(), n(d, {
1355
+ key: 1,
1356
+ onClick: (e) => w(s.data)
1357
+ }, {
1358
+ default: I(() => [...o[4] ||= [c(" 编辑 ", -1)]]),
1359
+ _: 1
1360
+ }, 8, ["onClick"])),
1361
+ p?.hideNodeDel ? r("", !0) : (S(), n(d, {
1362
+ key: 2,
1363
+ onClick: (e) => E(s.data)
1364
+ }, {
1365
+ default: I(() => [...o[5] ||= [a("span", { style: { color: "#ef4444" } }, "删除", -1)]]),
1366
+ _: 1
1367
+ }, 8, ["onClick"])),
1368
+ D(t.$slots, "node-handle", { data: s.data }, void 0, !0)
1369
+ ]),
1370
+ _: 2
1371
+ }, 1024)]),
1372
+ default: I(() => [a("span", {
1373
+ onClick: (e) => x(e, s.data),
1374
+ style: {
1375
+ padding: "4px",
1376
+ "font-weight": "bold"
1377
+ }
1378
+ }, "⋮", 8, qt)]),
1379
+ _: 2
1380
+ }, 1024))])) : r("", !0)]),
1381
+ _: 3
1382
+ }, 16, ["node-key"])
1383
+ ]);
1384
+ };
1385
+ }
1386
+ }), Yt = /* @__PURE__ */ L({ default: () => Xt }), Xt = /* @__PURE__ */ R(Jt, [["__scopeId", "data-v-7858d79e"]]), Zt = { style: { height: "100%" } }, Qt = { style: {
1387
+ display: "flex",
1388
+ "flex-direction": "row",
1389
+ "justify-content": "space-between",
1390
+ "align-items": "center",
1391
+ gap: "10px"
1392
+ } }, $t = { style: { margin: "10px 0px" } }, en = ["onClick"], tn = { key: 0 }, nn = /* @__PURE__ */ u({
1393
+ __name: "index",
1394
+ props: {
1395
+ loading: { default: () => T(!1) },
1396
+ data: {},
1397
+ placeholder: {},
1398
+ props: {},
1399
+ vInfiniteScroll: { type: Function },
1400
+ filterable: { type: Boolean }
1401
+ },
1402
+ emits: ["node-click"],
1403
+ setup(o, { emit: s }) {
1404
+ let c = s, l = T(""), u = T(), d = t(() => l.value ? o.data.filter((e) => e[o.props?.label || "label"]?.includes(l.value)) : o.data);
1405
+ F(() => [u.value, o.data?.[0]], (e) => {
1406
+ !e[0] && e[1] && (u.value = o.data?.[0]);
1407
+ }, { immediate: !0 });
1408
+ function f(e) {
1409
+ u.value = e, c("node-click", e);
1410
+ }
1411
+ return (t, s) => {
1412
+ let c = O("el-input");
1413
+ return S(), i("div", Zt, [
1414
+ a("div", Qt, [o.filterable ? (S(), n(c, {
1415
+ key: 0,
1416
+ modelValue: l.value,
1417
+ "onUpdate:modelValue": s[0] ||= (e) => l.value = e,
1418
+ placeholder: o.placeholder ?? "请输入"
1419
+ }, null, 8, ["modelValue", "placeholder"])) : r("", !0), D(t.$slots, "plus", {}, void 0, !0)]),
1420
+ a("div", $t, [D(t.$slots, "handle", {}, void 0, !0)]),
1421
+ oe((S(), i("ul", g({
1422
+ class: "infinite-list",
1423
+ "infinite-scroll-immediate": !1
1424
+ }, t.$attrs), [(S(!0), i(e, null, E(d.value, (e, n) => (S(), i("li", {
1425
+ key: "infinite-list-" + n,
1426
+ class: v({
1427
+ "infinite-list-item": !0,
1428
+ active: e === u.value
1429
+ }),
1430
+ onClick: (t) => f(e)
1431
+ }, [a("span", null, M(e[o.props?.label || "label"]), 1), D(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, en))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
1432
+ o.loading.value ? (S(), i("p", tn, "loading...")) : r("", !0)
1433
+ ]);
1434
+ };
1435
+ }
1436
+ }), rn = /* @__PURE__ */ L({ default: () => an }), an = /* @__PURE__ */ R(nn, [["__scopeId", "data-v-0ab5cd97"]]), on = {
1437
+ key: 0,
1438
+ style: {
1439
+ padding: "10px 0px",
1440
+ "margin-bottom": "10px",
1441
+ "border-bottom": "1px solid #e5e5e5"
1442
+ }
1443
+ }, sn = { key: 1 }, cn = /* @__PURE__ */ u({
1444
+ __name: "index",
1445
+ props: {
1446
+ data: {},
1447
+ fields: { default: () => [] },
1448
+ column: { default: 4 },
1449
+ title: { default: "" }
1450
+ },
1451
+ setup(t) {
1452
+ let a = o(t, [
1453
+ "title",
1454
+ "column",
1455
+ "fields",
1456
+ "data"
1457
+ ]);
1458
+ return (o, s) => {
1459
+ let c = O("el-descriptions-item"), u = O("el-descriptions");
1460
+ return S(), i(e, null, [
1461
+ t.title ? (S(), i("h4", on, M(t.title), 1)) : r("", !0),
1462
+ D(o.$slots, "title", {}, void 0, !0),
1463
+ l(u, g({ column: t.column }, a, { class: "ui-descriptions" }), {
1464
+ default: I(() => [(S(!0), i(e, null, E(t.fields, (e) => (S(), n(c, {
1465
+ key: e.prop,
1466
+ label: e.label,
1467
+ span: e.span || 2
1468
+ }, {
1469
+ default: I(() => [e.render ? (S(), n(k(P(Dt)(e, t.data).component), g({
1470
+ key: 0,
1471
+ modelValue: t.data[e.prop],
1472
+ "onUpdate:modelValue": (n) => t.data[e.prop] = n
1473
+ }, { ref_for: !0 }, P(Dt)(e, t.data).props, {
1474
+ clearable: !0,
1475
+ key: e.prop,
1476
+ style: { display: "inline-block" }
1477
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), i("span", sn, M(t.data[e.prop] || "-"), 1))]),
1478
+ _: 2
1479
+ }, 1032, ["label", "span"]))), 128))]),
1480
+ _: 1
1481
+ }, 16, ["column"])
1482
+ ], 64);
1483
+ };
1484
+ }
1485
+ }), ln = /* @__PURE__ */ L({ default: () => un }), un = /* @__PURE__ */ R(cn, [["__scopeId", "data-v-f02c30f9"]]), dn = {
1486
+ key: 0,
1487
+ style: {
1488
+ display: "flex",
1489
+ "margin-top": "12px",
1490
+ "justify-content": "end"
1491
+ }
1492
+ }, fn = /* @__PURE__ */ u({
1493
+ __name: "index",
1494
+ props: {
1495
+ visible: { type: Boolean },
1496
+ width: {},
1497
+ disabled: { type: Boolean },
1498
+ component: {},
1499
+ componentProps: {}
1500
+ },
1501
+ emits: [
1502
+ "update:visible",
1503
+ "close",
1504
+ "submit"
1505
+ ],
1506
+ setup(e, { emit: t }) {
1507
+ let a = t, o = e, s = T();
1508
+ function u() {
1509
+ a("close"), a("update:visible", !1);
1510
+ }
1511
+ function d() {
1512
+ a("submit", N(s?.value || {})), a("update:visible", !1);
1513
+ }
1514
+ return (e, t) => {
1515
+ let a = O("el-button"), f = O("el-dialog");
1516
+ return S(), n(f, g(e.$attrs, {
1517
+ "model-value": o.visible,
1518
+ "show-close": o.disabled,
1519
+ fullscreen: !o.width,
1520
+ "destroy-on-close": "",
1521
+ "lock-scroll": !1,
1522
+ "close-on-click-modal": !1,
1523
+ "onUpdate:modelValue": t[0] ||= (e) => !e && u(),
1524
+ onClose: u
1525
+ }), {
1526
+ default: I(() => [(S(), n(k(o.component), g({
1527
+ ref_key: "slotRef",
1528
+ ref: s
1529
+ }, o.componentProps, {
1530
+ onClose: u,
1531
+ onSubmit: d
1532
+ }), null, 16)), o.disabled ? r("", !0) : (S(), i("div", dn, [l(a, { onClick: u }, {
1533
+ default: I(() => [...t[1] ||= [c("取消", -1)]]),
1534
+ _: 1
1535
+ }), l(a, {
1536
+ type: "primary",
1537
+ onClick: d
1538
+ }, {
1539
+ default: I(() => [...t[2] ||= [c("确定", -1)]]),
1540
+ _: 1
1541
+ })]))]),
1542
+ _: 1
1543
+ }, 16, [
1544
+ "model-value",
1545
+ "show-close",
1546
+ "fullscreen"
1547
+ ]);
1548
+ };
1549
+ }
1550
+ }), pn = /* @__PURE__ */ L({ default: () => mn }), mn = fn, hn = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
1551
+ function gn(e) {
1552
+ return Array.from(new Set(e));
1553
+ }
1554
+ function _n(e, t) {
1555
+ let n = /* @__PURE__ */ new Set();
1556
+ return e.filter((e) => {
1557
+ let r = typeof t == "function" ? t(e) : e[t];
1558
+ return n.has(r) ? !1 : (n.add(r), !0);
1559
+ });
1560
+ }
1561
+ //#endregion
1562
+ //#region src/components/StaffSelect/default.vue
1563
+ var vn = /* @__PURE__ */ u({
1564
+ __name: "default",
1565
+ props: {
1566
+ multiple: { type: Boolean },
1567
+ type: {},
1568
+ valueAt: {},
1569
+ modelValue: {},
1570
+ token: {}
1571
+ },
1572
+ emits: ["update:modelValue"],
1573
+ setup(r, { emit: a }) {
1574
+ let o = r, s = a, c = o.valueAt ?? "all", u = new Headers({
1575
+ "Content-Type": "application/json",
1576
+ "X-Requested-With": "XMLHttpRequest",
1577
+ token: localStorage.getItem("TOKEN") ?? "",
1578
+ Accept: "application/json"
1579
+ }), d = t({
1580
+ get: () => o.modelValue || "",
1581
+ set: (e) => s("update:modelValue", e)
1582
+ }), f = T([]);
1583
+ b(() => {
1584
+ o.modelValue && p(o.modelValue);
1585
+ });
1586
+ async function p(e = "") {
1587
+ f.value = ((await fetch(hn + "/user/pageQueryUser", {
1588
+ method: "POST",
1589
+ headers: u,
1590
+ body: JSON.stringify({
1591
+ page: 1,
1592
+ pageSize: 999,
1593
+ name: e
1594
+ })
1595
+ }).then((e) => e.json()))?.table || []).map((e) => {
1596
+ let t = c === "all" ? `${e.name}(${e.account})` : e[c];
1597
+ return {
1598
+ ...e,
1599
+ label: `${e.name}(${e.account})`,
1600
+ value: t
1601
+ };
1602
+ });
1603
+ }
1604
+ async function m(e) {
1605
+ e.length < 1 || (d.value = e, await p(e));
1606
+ }
1607
+ return (t, r) => {
1608
+ let a = O("el-icon"), o = O("el-option"), s = O("el-select");
1609
+ return S(), n(s, g({
1610
+ remote: "",
1611
+ filterable: "",
1612
+ modelValue: d.value,
1613
+ "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
1614
+ "remote-method": m
1615
+ }, t.$attrs), {
1616
+ prefix: I(() => [l(a, null, {
1617
+ default: I(() => [l(P(Ue))]),
1618
+ _: 1
1619
+ })]),
1620
+ default: I(() => [(S(!0), i(e, null, E(f.value, (e) => (S(), n(o, {
1621
+ key: `${e.employeeCode}-${e.employeeName}`,
1622
+ label: e.label,
1623
+ value: e.value
1624
+ }, null, 8, ["label", "value"]))), 128))]),
1625
+ _: 1
1626
+ }, 16, ["modelValue"]);
1627
+ };
1628
+ }
1629
+ }), yn = { style: {
1630
+ display: "flex",
1631
+ "max-width": "100%",
1632
+ gap: "20px",
1633
+ "overflow-y": "scroll",
1634
+ height: "400px"
1635
+ } }, bn = { style: { flex: "1" } }, xn = { style: { width: "320px" } }, Sn = { style: {
1636
+ display: "flex",
1637
+ "justify-content": "space-between",
1638
+ "align-items": "center",
1639
+ "margin-bottom": "8px",
1640
+ height: "30px"
1641
+ } }, Cn = { key: 0 }, wn = { style: {
1642
+ "overflow-y": "auto",
1643
+ height: "90%"
1644
+ } }, Tn = { style: {
1645
+ display: "flex",
1646
+ "justify-content": "end",
1647
+ "align-items": "center"
1648
+ } }, En = /* @__PURE__ */ R(/* @__PURE__ */ u({
1649
+ __name: "dialog",
1650
+ props: {
1651
+ modelValue: {},
1652
+ disabled: {
1653
+ type: Boolean,
1654
+ default: !1
1655
+ },
1656
+ data: {},
1657
+ required: { type: Boolean },
1658
+ valueAt: { default: "all" }
1659
+ },
1660
+ emits: ["update:modelValue", "change"],
1661
+ setup(n, { expose: o, emit: s }) {
1662
+ let u = s, d = ne(), f = n, p = f.valueAt ?? "all", m = T(), h = T(!1), v = new Headers({
1663
+ "Content-Type": "application/json",
1664
+ "X-Requested-With": "XMLHttpRequest",
1665
+ token: localStorage.getItem("TOKEN") ?? "",
1666
+ Accept: "application/json"
1667
+ }), y = C({
1668
+ searchData: [],
1669
+ staffData: [],
1670
+ loading: !1,
1671
+ filterText: "",
1672
+ requiredVisible: !1
1673
+ }), b = T([]), x = T([]), w = t(() => y.searchData?.length ? y.searchData : y.staffData), D = t(() => f.required ?? d?.required ?? !1);
1674
+ ae(() => {
1675
+ x.value = gn(f.modelValue || []);
1676
+ }), ae(() => {
1677
+ h.value && ee();
1678
+ });
1679
+ async function ee() {
1680
+ let e = await fetch(hn + "/department/queryDepartmentTree", {
1681
+ method: "GET",
1682
+ headers: v
1683
+ }).then((e) => e.json());
1684
+ y.staffData = e.data || [], e.data?.[0] && A(e.data?.[0]);
1685
+ }
1686
+ async function k(e) {
1687
+ return fetch(hn + "/user/pageQueryUser", {
1688
+ method: "POST",
1689
+ headers: v,
1690
+ body: JSON.stringify(e)
1691
+ }).then((e) => e.json());
1692
+ }
1693
+ async function A(e, t) {
1694
+ let n = !!e?.data?.code, r = e?.data?.code || e?.code;
1695
+ return !r || e?.data?.account ? t?.([]) : (y.loading = !0, k({
1696
+ page: 1,
1697
+ pageSize: 9999,
1698
+ departmentCode: r
1699
+ }).then((t) => {
1700
+ if (t.code !== "ok") return;
1701
+ let r = (t?.table || []).map((e) => ({
1702
+ ...e,
1703
+ code: e.account
1704
+ }));
1705
+ n ? e.data.children = _n([...r, ...e.data.children || []], "code") : e.children = _n([...r, ...e.children || []], "code"), y.loading = !1;
1706
+ }), t?.(e?.children || []));
1707
+ }
1708
+ function j(e, { data: t }) {
1709
+ let n = y.searchData?.length > 0;
1710
+ return t?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
1711
+ width: "14px",
1712
+ height: "14px"
1713
+ } }, e(Ue)), n ? t.fullName : t.name]) : n ? t.fullName : t.name;
1714
+ }
1715
+ function te(e) {
1716
+ if (x.value = x.value.filter((t) => t !== e), m.value) {
1717
+ let t = e.match(/\((.*?)\)/)?.[1];
1718
+ _(() => {
1719
+ m.value?.setChecked(t, !1);
1720
+ });
1721
+ }
1722
+ }
1723
+ async function N() {
1724
+ if (!y.filterText?.trim()) return y.searchData = [];
1725
+ let e = await k({
1726
+ page: 1,
1727
+ pageSize: 9999,
1728
+ name: y.filterText?.trim()
1729
+ });
1730
+ if (e.code !== "ok") return z.Message.error(e.message);
1731
+ y.searchData = (e?.table || []).map((e) => ({
1732
+ ...e,
1733
+ code: e.account
1734
+ }));
1735
+ }
1736
+ function re(e, t) {
1737
+ let n = t?.checkedNodes?.map((e) => `${e.name}(${e.account ?? e.code})`);
1738
+ x.value = gn([...x.value, ...n]);
1739
+ }
1740
+ function ie() {
1741
+ let e = p === "all" ? x.value : x.value?.map((e) => {
1742
+ let [t, n] = e.split("(");
1743
+ return {
1744
+ name: t.trim(),
1745
+ account: n?.replace(")", "")
1746
+ }[p] || e.trim();
1747
+ });
1748
+ u("change", e), u("update:modelValue", e), h.value = !1, oe();
1749
+ }
1750
+ function F() {
1751
+ u("update:modelValue", void 0), h.value = !1;
1752
+ }
1753
+ function oe() {
1754
+ return y.requiredVisible = D.value && x.value.length === 0, y.requiredVisible;
1755
+ }
1756
+ return o({ validate: oe }), (t, n) => {
1757
+ let o = O("el-select"), s = O("el-input"), u = O("el-tree"), d = O("el-icon"), p = O("el-button"), _ = O("el-dialog");
1758
+ return S(), i(e, null, [a("div", {
1759
+ class: "staff-select-trigger",
1760
+ onClick: n[1] ||= (e) => !f.disabled && (h.value = !0)
1761
+ }, [l(o, g({
1762
+ ...t.$attrs,
1763
+ ...t.$props
1764
+ }, {
1765
+ modelValue: x.value,
1766
+ "onUpdate:modelValue": n[0] ||= (e) => x.value = e,
1767
+ class: { "is-required": y.requiredVisible },
1768
+ options: b.value,
1769
+ placeholder: "请选择",
1770
+ multiple: "",
1771
+ disabled: f.disabled,
1772
+ props: {
1773
+ label: "label",
1774
+ value: "account"
1775
+ }
1776
+ }), null, 16, [
1777
+ "modelValue",
1778
+ "class",
1779
+ "options",
1780
+ "disabled"
1781
+ ])]), l(_, {
1782
+ modelValue: h.value,
1783
+ "onUpdate:modelValue": n[3] ||= (e) => h.value = e,
1784
+ style: {
1785
+ height: "480px",
1786
+ width: "70%",
1787
+ "z-index": "10000"
1788
+ },
1789
+ "show-close": !1,
1790
+ "append-to-body": "",
1791
+ "close-on-click-modal": !1,
1792
+ "destroy-on-close": ""
1793
+ }, {
1794
+ default: I(() => [a("div", yn, [a("div", bn, [l(s, {
1795
+ placeholder: "请输入",
1796
+ modelValue: y.filterText,
1797
+ "onUpdate:modelValue": n[2] ||= (e) => y.filterText = e,
1798
+ clearable: "",
1799
+ "prefix-icon": P(ze),
1800
+ onKeydown: se(N, ["enter"])
1801
+ }, null, 8, ["modelValue", "prefix-icon"]), l(u, {
1802
+ loading: y.loading,
1803
+ data: w.value,
1804
+ props: { label: "fullName" },
1805
+ "highlight-current": !0,
1806
+ "render-content": j,
1807
+ load: A,
1808
+ onCheck: re,
1809
+ "show-checkbox": "",
1810
+ "check-strictly": "",
1811
+ lazy: "",
1812
+ class: "staff-tree",
1813
+ ref_key: "staffDialogRef",
1814
+ ref: m,
1815
+ "node-key": "code"
1816
+ }, null, 8, ["loading", "data"])]), a("div", xn, [a("div", Sn, [n[4] ||= a("h3", null, "已选择", -1), x.value.length ? (S(), i("span", Cn, "已选择" + M(x.value.length) + "个用户", 1)) : r("", !0)]), a("div", wn, [(S(!0), i(e, null, E(x.value, (e) => (S(), i("li", {
1817
+ key: e,
1818
+ class: "staff-item"
1819
+ }, [a("span", null, M(e), 1), l(d, {
1820
+ color: "red",
1821
+ onClick: ce((t) => te(e), ["stop"])
1822
+ }, {
1823
+ default: I(() => [l(P(Ve))]),
1824
+ _: 1
1825
+ }, 8, ["onClick"])]))), 128))])])]), a("div", Tn, [l(p, { onClick: F }, {
1826
+ default: I(() => [...n[5] ||= [c("取消", -1)]]),
1827
+ _: 1
1828
+ }), l(p, {
1829
+ type: "primary",
1830
+ onClick: ie
1831
+ }, {
1832
+ default: I(() => [...n[6] ||= [c("确定", -1)]]),
1833
+ _: 1
1834
+ })])]),
1835
+ _: 1
1836
+ }, 8, ["modelValue"])], 64);
1837
+ };
1838
+ }
1839
+ }), [["__scopeId", "data-v-6c972882"]]), Dn = /* @__PURE__ */ u({
1840
+ __name: "index",
1841
+ props: {
1842
+ multiple: { type: Boolean },
1843
+ type: {},
1844
+ valueAt: {},
1845
+ modelValue: {},
1846
+ token: {}
1847
+ },
1848
+ setup(e, { expose: t }) {
1849
+ let r = e, i = T();
1850
+ return t({ validate: () => i.value?.validate?.() }), (e, t) => (S(), n(k(r?.type === "dialog" ? En : vn), g({
1851
+ ref_key: "staffSelectRef",
1852
+ ref: i
1853
+ }, {
1854
+ ...e.$attrs,
1855
+ ...r
1856
+ }), null, 16));
1857
+ }
1858
+ }), On = /* @__PURE__ */ L({ default: () => kn }), kn = Dn, An = /* @__PURE__ */ R(/* @__PURE__ */ u({
1859
+ __name: "file",
1860
+ props: {
1861
+ icon: {},
1862
+ limit: {},
1863
+ size: {},
1864
+ prop: {},
1865
+ text: {},
1866
+ type: {},
1867
+ defaultValue: {},
1868
+ fileList: {},
1869
+ action: {},
1870
+ onChange: { type: Function }
1871
+ },
1872
+ setup(e) {
1873
+ let r = e, { text: i = "选择文件", icon: a = void 0, size: o = "default" } = r, u = ne(), d = u.disabled, f = T(r.fileList || []);
1874
+ F(() => r.fileList, (e) => {
1875
+ f.value = e || [];
1876
+ }, {
1877
+ immediate: !0,
1878
+ deep: !0
1879
+ });
1880
+ let p = t(() => r.limit && u.count < r.limit), m = t(() => r.limit && u.count >= r.limit), h = t(() => r.limit === void 0 ? !1 : !p.value);
1881
+ return (e, t) => {
1882
+ let u = O("el-button"), _ = O("el-upload");
1883
+ return S(), n(_, g(e.$attrs, {
1884
+ style: { width: "100%" },
1885
+ action: r.action,
1886
+ "file-list": f.value,
1887
+ "onUpdate:fileList": t[0] ||= (e) => f.value = e,
1888
+ limit: r.limit,
1889
+ class: {
1890
+ "hide-upload-list": p.value,
1891
+ "hide-upload-text": m.value
1892
+ }
1893
+ }), s({
1894
+ default: I(() => [D(e.$slots, "tip", {}, void 0, !0)]),
1895
+ _: 2
1896
+ }, [h.value ? void 0 : {
1897
+ name: "trigger",
1898
+ fn: I(() => [l(u, {
1899
+ type: "primary",
1900
+ plain: "",
1901
+ icon: P(a),
1902
+ size: P(o),
1903
+ disabled: P(d)
1904
+ }, {
1905
+ default: I(() => [c(M(P(i)), 1)]),
1906
+ _: 1
1907
+ }, 8, [
1908
+ "icon",
1909
+ "size",
1910
+ "disabled"
1911
+ ])]),
1912
+ key: "0"
1913
+ }]), 1040, [
1914
+ "action",
1915
+ "file-list",
1916
+ "limit",
1917
+ "class"
1918
+ ]);
1919
+ };
1920
+ }
1921
+ }), [["__scopeId", "data-v-43d34dc4"]]), jn = ["src"], Mn = /* @__PURE__ */ u({
1922
+ __name: "image",
1923
+ props: {
1924
+ icon: {},
1925
+ limit: {},
1926
+ size: {},
1927
+ prop: {},
1928
+ text: {},
1929
+ type: {},
1930
+ defaultValue: {},
1931
+ fileList: {},
1932
+ action: {},
1933
+ onChange: { type: Function }
1934
+ },
1935
+ emits: ["update:fileList"],
1936
+ setup(n, { emit: r }) {
1937
+ let o = n, s = T({}), c = T(!1), u = r, d = t({
1938
+ get: () => o.fileList || [],
1939
+ set: (e) => u("update:fileList", e)
1940
+ });
1941
+ function f(e) {
1942
+ s.value = e, c.value = !0;
1943
+ }
1944
+ return (t, n) => {
1945
+ let r = O("el-icon"), u = O("el-upload"), p = O("el-dialog");
1946
+ return S(), i(e, null, [l(u, g({
1947
+ accept: "image/*",
1948
+ action: o.action,
1949
+ "auto-upload": !1
1950
+ }, t.$attrs, {
1951
+ "list-type": "picture-card",
1952
+ "on-preview": f,
1953
+ "file-list": d.value,
1954
+ "onUpdate:fileList": n[0] ||= (e) => d.value = e
1955
+ }), {
1956
+ default: I(() => [l(r, null, {
1957
+ default: I(() => [l(P(Ge))]),
1958
+ _: 1
1959
+ })]),
1960
+ _: 1
1961
+ }, 16, ["action", "file-list"]), l(p, {
1962
+ modelValue: c.value,
1963
+ "onUpdate:modelValue": n[1] ||= (e) => c.value = e
1964
+ }, {
1965
+ default: I(() => [a("img", {
1966
+ "w-full": "",
1967
+ src: s.value.url,
1968
+ alt: "预览"
1969
+ }, null, 8, jn)]),
1970
+ _: 1
1971
+ }, 8, ["modelValue"])], 64);
1972
+ };
1973
+ }
1974
+ }), Nn = /* @__PURE__ */ u({
1975
+ __name: "index",
1976
+ props: {
1977
+ icon: {},
1978
+ limit: {},
1979
+ size: {},
1980
+ prop: {},
1981
+ text: {},
1982
+ type: {},
1983
+ defaultValue: {},
1984
+ fileList: {},
1985
+ action: {},
1986
+ onChange: { type: Function },
1987
+ data: {}
1988
+ },
1989
+ emits: [
1990
+ "update:modelValue",
1991
+ "update:fileList",
1992
+ "change",
1993
+ "success",
1994
+ "error",
1995
+ "exceed",
1996
+ "remove"
1997
+ ],
1998
+ setup(e, { emit: r }) {
1999
+ let i = r, a = e, { type: o = "file", onChange: s, limit: c, action: l, data: u, prop: d, fileList: f, ...p } = a, m = l || hn + "/attachment/uploadAttachment", h = { token: localStorage.getItem("TOKEN") || "" }, _ = t(() => u && d && u[d] ? u[d] : a.fileList || []), v = t(() => _.value.length);
2000
+ function y(e) {
2001
+ i("update:fileList", e);
2002
+ }
2003
+ function b(e, t) {
2004
+ let n = Array.isArray(t) ? t : [];
2005
+ s?.(n, e), i("update:fileList", n), i("update:modelValue", n), i("change", n);
2006
+ }
2007
+ function x() {
2008
+ c && z.Message.warning(`最多只能上传 ${c} 个文件`);
2009
+ }
2010
+ function C(e, t) {
2011
+ i("update:fileList", t), i("update:modelValue", t), i("remove", t);
2012
+ }
2013
+ function w(e, t) {
2014
+ let n = [...a.fileList || []];
2015
+ if (e?.code !== "ok") return z.Message.error(e?.message);
2016
+ let r = hn + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${h.token}`;
2017
+ n.some((t) => t?.objectKey === e.data?.objectKey) || n.push({
2018
+ name: t.name,
2019
+ uid: t.uid,
2020
+ size: t.size,
2021
+ status: "success",
2022
+ ...e.data,
2023
+ url: r
2024
+ }), i("update:fileList", n), i("update:modelValue", n), i("success", n);
2025
+ }
2026
+ function T(e, t, n) {
2027
+ i("update:fileList", n), i("update:modelValue", n);
2028
+ }
2029
+ return (e, t) => (S(), n(k(P(o) === "image" ? Mn : An), g({
2030
+ ref: "uploadInstance",
2031
+ name: "file",
2032
+ action: P(m),
2033
+ headers: h,
2034
+ "on-change": b,
2035
+ "on-exceed": x,
2036
+ "on-remove": C,
2037
+ "on-success": w,
2038
+ "on-error": T,
2039
+ "file-list": _.value,
2040
+ "onUpdate:fileList": y,
2041
+ count: v.value,
2042
+ limit: P(c)
2043
+ }, p), null, 16, [
2044
+ "action",
2045
+ "file-list",
2046
+ "count",
2047
+ "limit"
2048
+ ]));
2049
+ }
2050
+ }), Pn = /* @__PURE__ */ L({ default: () => Fn }), Fn = Nn, In = new Headers({
2051
+ "Content-Type": "application/json",
2052
+ token: localStorage.getItem("TOKEN") || ""
2053
+ });
2054
+ async function Ln(e, t) {
2055
+ let n = `${hn}${e}`;
2056
+ if (t) {
2057
+ let e = new URLSearchParams(t).toString();
2058
+ e && (n = `${n}?${e}`);
2059
+ }
2060
+ return (await fetch(n, {
2061
+ headers: In,
2062
+ method: "GET"
2063
+ })).json();
2064
+ }
2065
+ async function Rn(e, t) {
2066
+ return (await fetch(`${hn}${e}`, {
2067
+ headers: In,
2068
+ method: "POST",
2069
+ body: JSON.stringify(t)
2070
+ })).json();
2071
+ }
2072
+ async function zn(e, t) {
2073
+ return (await fetch(`${hn}${e}`, {
2074
+ headers: In,
2075
+ method: "POST",
2076
+ body: JSON.stringify(t)
2077
+ })).blob();
2078
+ }
2079
+ var Bn = {
2080
+ get: Ln,
2081
+ post: Rn,
2082
+ blob: zn
2083
+ };
2084
+ //#endregion
2085
+ //#region src/hooks/useFetch.ts
2086
+ function Vn(e, t = {}) {
2087
+ let { immediate: n = !0, method: r = "GET", onBefore: i, onSuccess: a, onError: o, onFinally: s, ...c } = t, l = localStorage.getItem("TOKEN"), u = {
2088
+ method: r,
2089
+ headers: new Headers({
2090
+ "Content-Type": "application/json",
2091
+ token: l ?? "",
2092
+ ...c.headers || {}
2093
+ })
2094
+ }, d = T(!1), f = T(null), m = T(null), h = C({}), g = !1;
2095
+ async function v() {
2096
+ if (g) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
2097
+ g = !0, d.value = !0, m.value = null;
2098
+ try {
2099
+ let t = hn + e;
2100
+ if (i?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
2101
+ if (r === "GET") {
2102
+ let e = new URLSearchParams(te(h)).toString();
2103
+ e && (t = `${t}?${e}`);
2104
+ } else u.body = JSON.stringify(te(h));
2105
+ let n = await (await fetch(t, u)).json();
2106
+ return n.code ? ["return.optSuccess", "ok"].includes(n.code) || z.Message.error(n.message || "未知错误!") : n.data?.success || z.Message.error(n.message || "未知错误!"), f.value = n, a?.(n), n;
2107
+ } catch (e) {
2108
+ let t = e instanceof Error ? e : Error(String(e));
2109
+ throw m.value = t, console.error("请求发生错误:", t), o?.(t), t;
2110
+ } finally {
2111
+ d.value = !1, g = !1, s?.();
2112
+ }
2113
+ }
2114
+ let y = null, b = "", x;
2115
+ ae(() => {
2116
+ let e = N(c.defaultParams);
2117
+ Object.keys(h).forEach((e) => delete h[e]), Object.assign(h, e || {}), y && clearTimeout(y), y = setTimeout(() => {
2118
+ let e = p(t.ready) ? t.ready.value : t.ready ?? !0, r = JSON.stringify(te(h));
2119
+ n && e && !g && (r !== b || e !== x) && (b = r, x = e, _(() => v()));
2120
+ }, 10);
2121
+ });
2122
+ function S(e) {
2123
+ for (let e in h) h[e] = void 0;
2124
+ Object.assign(h, e);
2125
+ }
2126
+ return {
2127
+ execute: v,
2128
+ loading: d,
2129
+ data: f,
2130
+ error: m,
2131
+ params: h,
2132
+ setParams: S
2133
+ };
2134
+ }
2135
+ //#endregion
2136
+ //#region src/hooks/useTable/default.ts
2137
+ function Hn(e, t) {
2138
+ let n = C({
2139
+ ignoreAttrs: [
2140
+ "tableName",
2141
+ "sort",
2142
+ ...t?.ignoreAttrs || []
2143
+ ],
2144
+ replaceAttrs: t?.replaceAttrs || {
2145
+ table: "table",
2146
+ total: "total"
2147
+ }
2148
+ }), r = j([]), i = C({
2149
+ total: 0,
2150
+ page: 1,
2151
+ pageSize: 10
2152
+ }), a = T([]), o = C({
2153
+ page: 1,
2154
+ pageSize: 10
2155
+ });
2156
+ if (t?.onBefore?.(o) === !1) return {
2157
+ loading: T(!1),
2158
+ data: r,
2159
+ pagination: i
2160
+ };
2161
+ let s = Vn(e, {
2162
+ ...t,
2163
+ defaultParams: o,
2164
+ onSuccess: (e) => {
2165
+ t?.onSuccess?.(e), i.total = e[n?.replaceAttrs?.total] || 0, r.value = e[n?.replaceAttrs?.table] || [];
2166
+ }
2167
+ });
2168
+ ae(() => {
2169
+ let e = N(t.defaultParams || {});
2170
+ i.page = 1, i.pageSize = 10;
2171
+ for (let t in e) t !== "page" && t !== "pageSize" && (o[t] = e[t]);
2172
+ });
2173
+ function c(e = {}) {
2174
+ i.page = 1, i.pageSize = 10, e && (Object.keys(o).forEach((t) => {
2175
+ n.ignoreAttrs?.includes(t) || Object.keys(e).includes(t) || delete o[t];
2176
+ }), Object.assign(o, {
2177
+ ...e,
2178
+ page: 1,
2179
+ pageSize: 10
2180
+ }));
2181
+ }
2182
+ function l({ page: e, pageSize: t }) {
2183
+ i.page = e, i.pageSize = t, Object.assign(o, {
2184
+ page: e,
2185
+ pageSize: t
2186
+ });
2187
+ }
2188
+ function u(e) {
2189
+ a.value = e;
2190
+ }
2191
+ return C({
2192
+ ...s,
2193
+ data: r,
2194
+ pagination: i,
2195
+ selection: a,
2196
+ reset: c,
2197
+ updatePagination: l,
2198
+ selectionChange: u
2199
+ });
2200
+ }
2201
+ //#endregion
2202
+ //#region src/hooks/useTable/common.ts
2203
+ function Un(e, n) {
2204
+ let { defaultParams: r, ...i } = n, a = p(r) ? r : T(r || {}), o = Hn(e, {
2205
+ ...i,
2206
+ ready: t(() => {
2207
+ let e = p(n.ready) ? n.ready.value : n.ready, t = !!a.value?.tableId;
2208
+ return (e === void 0 || e) && t;
2209
+ }),
2210
+ defaultParams: t(() => {
2211
+ let { tableId: e, page: t, pageSize: n, sort: r, ...i } = N(a) || {};
2212
+ return {
2213
+ tableId: e,
2214
+ page: t || 1,
2215
+ pageSize: n || 10,
2216
+ params: {
2217
+ ...i,
2218
+ sort: r
2219
+ }
2220
+ };
2221
+ }),
2222
+ ignoreAttrs: [
2223
+ "tableName",
2224
+ "sort",
2225
+ ...n?.ignoreAttrs || []
2226
+ ]
2227
+ });
2228
+ function s(e = {}) {
2229
+ Object.assign(a.value, e, {
2230
+ page: 1,
2231
+ pageSize: 10
2232
+ });
2233
+ }
2234
+ async function c(e) {
2235
+ let t = N(a);
2236
+ return Bn.post("/common/insert", {
2237
+ params: { ...e },
2238
+ tableId: t?.tableId
2239
+ });
2240
+ }
2241
+ async function l(e) {
2242
+ let t = N(a);
2243
+ return Bn.post("/common/update", {
2244
+ params: { ...e },
2245
+ tableId: t?.tableId
2246
+ });
2247
+ }
2248
+ async function u(e) {
2249
+ let t = N(a);
2250
+ return Bn.post("/common/delete", {
2251
+ idList: e,
2252
+ tableId: t?.tableId
2253
+ });
2254
+ }
2255
+ async function d(t) {
2256
+ let { title: n = "export" } = t || {}, r = N(a), i = await Bn.blob(e ?? "/common/exportExcel", {
2257
+ tableId: r?.tableId,
2258
+ type: "all"
2259
+ }), o = new Blob([i]), s = document.createElement("a");
2260
+ s.href = window.URL.createObjectURL(o), s.download = `${n}.xlsx`, s.click(), z.Message.success("导出成功"), window.URL.revokeObjectURL(s.href);
2261
+ }
2262
+ let f = C({
2263
+ loading: !1,
2264
+ data: [],
2265
+ insert: c,
2266
+ update: l,
2267
+ remove: u,
2268
+ delete: u,
2269
+ exportData: d
2270
+ });
2271
+ return ae(() => {
2272
+ Object.assign(f, o, { reset: s });
2273
+ }), f;
2274
+ }
2275
+ //#endregion
2276
+ //#region src/hooks/useTable/index.ts
2277
+ function Wn(e, t) {
2278
+ return e?.includes("/common/pageQuery") ? Un(e, t) : Hn(e, t);
2279
+ }
2280
+ //#endregion
2281
+ //#region src/hooks/useRoute.ts
2282
+ var Gn = T(window.location.pathname), Kn = T(Object.fromEntries(new URLSearchParams(window.location.search))), qn = T(window.location.hash);
2283
+ window.addEventListener("popstate", () => {
2284
+ Gn.value = window.location.pathname, Kn.value = Object.fromEntries(new URLSearchParams(window.location.search)), qn.value = window.location.hash;
2285
+ });
2286
+ function Jn(e) {
2287
+ let t = {}, n = e.match(/\/user\/(\d+)/);
2288
+ return n && (t.id = n[1]), t;
2289
+ }
2290
+ function Yn() {
2291
+ return w({
2292
+ path: t(() => Gn.value),
2293
+ query: t(() => Kn.value),
2294
+ hash: t(() => qn.value),
2295
+ fullPath: t(() => window.location.href),
2296
+ params: t(() => Jn(Gn.value))
2297
+ });
2298
+ }
2299
+ function Xn() {
2300
+ function e(e) {
2301
+ window.history.pushState({}, "", e), Gn.value = window.location.pathname, Kn.value = Object.fromEntries(new URLSearchParams(window.location.search)), qn.value = window.location.hash;
2302
+ }
2303
+ function t(e) {
2304
+ window.history.replaceState({}, "", e), Gn.value = window.location.pathname, Kn.value = Object.fromEntries(new URLSearchParams(window.location.search)), qn.value = window.location.hash;
2305
+ }
2306
+ function n() {
2307
+ window.history.back();
2308
+ }
2309
+ return {
2310
+ push: e,
2311
+ replace: t,
2312
+ back: n
2313
+ };
2314
+ }
2315
+ //#endregion
2316
+ //#region src/hooks/useDictionary.ts
2317
+ function Zn(e) {
2318
+ return Bn.post("/dictionary/mergeDictionaryValue", e);
2319
+ }
2320
+ function Qn(e) {
2321
+ let { page: t = 1, pageSize: n = 10 } = e || {}, r = j([]), i = j([]), { loading: a, execute: o } = Vn("/dictionary/pageQueryDictionaryValue", {
2322
+ method: "POST",
2323
+ defaultParams: {
2324
+ dictionaryCode: e.code,
2325
+ page: t,
2326
+ pageSize: n
2327
+ },
2328
+ onSuccess: (e) => {
2329
+ e.code === "ok" && (r.value = e.table || [], i.value = r.value.map((e) => ({
2330
+ label: e.name,
2331
+ value: e.code,
2332
+ description: e.description
2333
+ })));
2334
+ }
2335
+ });
2336
+ async function s(e) {
2337
+ let t = await Zn(e);
2338
+ return t.code === "ok" ? t : z.Message.error(t.message);
2339
+ }
2340
+ return C({
2341
+ loading: a,
2342
+ data: r,
2343
+ options: i,
2344
+ update: s,
2345
+ execute: o
2346
+ });
2347
+ }
2348
+ //#endregion
2349
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/util.js
2350
+ var $n = "0123456789abcdefghijklmnopqrstuvwxyz";
2351
+ function H(e) {
2352
+ return $n.charAt(e);
2353
+ }
2354
+ function er(e, t) {
2355
+ return e & t;
2356
+ }
2357
+ function tr(e, t) {
2358
+ return e | t;
2359
+ }
2360
+ function nr(e, t) {
2361
+ return e ^ t;
2362
+ }
2363
+ function rr(e, t) {
2364
+ return e & ~t;
2365
+ }
2366
+ function ir(e) {
2367
+ if (e == 0) return -1;
2368
+ var t = 0;
2369
+ return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
2370
+ }
2371
+ function ar(e) {
2372
+ for (var t = 0; e != 0;) e &= e - 1, ++t;
2373
+ return t;
2374
+ }
2375
+ //#endregion
2376
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/base64.js
2377
+ var or = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", sr = "=";
2378
+ function cr(e) {
2379
+ var t, n, r = "";
2380
+ for (t = 0; t + 3 <= e.length; t += 3) n = parseInt(e.substring(t, t + 3), 16), r += or.charAt(n >> 6) + or.charAt(n & 63);
2381
+ for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16), r += or.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16), r += or.charAt(n >> 2) + or.charAt((n & 3) << 4)); (r.length & 3) > 0;) r += sr;
2382
+ return r;
2383
+ }
2384
+ function lr(e) {
2385
+ var t = "", n, r = 0, i = 0;
2386
+ for (n = 0; n < e.length && e.charAt(n) != sr; ++n) {
2387
+ var a = or.indexOf(e.charAt(n));
2388
+ a < 0 || (r == 0 ? (t += H(a >> 2), i = a & 3, r = 1) : r == 1 ? (t += H(i << 2 | a >> 4), i = a & 15, r = 2) : r == 2 ? (t += H(i), t += H(a >> 2), i = a & 3, r = 3) : (t += H(i << 2 | a >> 4), t += H(a & 15), r = 0));
2389
+ }
2390
+ return r == 1 && (t += H(i << 2)), t;
2391
+ }
2392
+ //#endregion
2393
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/asn1js/hex.js
2394
+ var ur, dr = { decode: function(e) {
2395
+ var t;
2396
+ if (ur === void 0) {
2397
+ var n = "0123456789ABCDEF", r = " \f\n\r \xA0\u2028\u2029";
2398
+ for (ur = {}, t = 0; t < 16; ++t) ur[n.charAt(t)] = t;
2399
+ for (n = n.toLowerCase(), t = 10; t < 16; ++t) ur[n.charAt(t)] = t;
2400
+ for (t = 0; t < r.length; ++t) ur[r.charAt(t)] = -1;
2401
+ }
2402
+ var i = [], a = 0, o = 0;
2403
+ for (t = 0; t < e.length; ++t) {
2404
+ var s = e.charAt(t);
2405
+ if (s == "=") break;
2406
+ if (s = ur[s], s != -1) {
2407
+ if (s === void 0) throw Error("Illegal character at offset " + t);
2408
+ a |= s, ++o >= 2 ? (i[i.length] = a, a = 0, o = 0) : a <<= 4;
2409
+ }
2410
+ }
2411
+ if (o) throw Error("Hex encoding incomplete: 4 bits missing");
2412
+ return i;
2413
+ } }, fr, pr = {
2414
+ decode: function(e) {
2415
+ var t;
2416
+ if (fr === void 0) {
2417
+ var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = "= \f\n\r \xA0\u2028\u2029";
2418
+ for (fr = Object.create(null), t = 0; t < 64; ++t) fr[n.charAt(t)] = t;
2419
+ for (fr["-"] = 62, fr._ = 63, t = 0; t < r.length; ++t) fr[r.charAt(t)] = -1;
2420
+ }
2421
+ var i = [], a = 0, o = 0;
2422
+ for (t = 0; t < e.length; ++t) {
2423
+ var s = e.charAt(t);
2424
+ if (s == "=") break;
2425
+ if (s = fr[s], s != -1) {
2426
+ if (s === void 0) throw Error("Illegal character at offset " + t);
2427
+ a |= s, ++o >= 4 ? (i[i.length] = a >> 16, i[i.length] = a >> 8 & 255, i[i.length] = a & 255, a = 0, o = 0) : a <<= 6;
2428
+ }
2429
+ }
2430
+ switch (o) {
2431
+ case 1: throw Error("Base64 encoding incomplete: at least 2 bits missing");
2432
+ case 2:
2433
+ i[i.length] = a >> 10;
2434
+ break;
2435
+ case 3:
2436
+ i[i.length] = a >> 16, i[i.length] = a >> 8 & 255;
2437
+ break;
2438
+ }
2439
+ return i;
2440
+ },
2441
+ re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
2442
+ unarmor: function(e) {
2443
+ var t = pr.re.exec(e);
2444
+ if (t) if (t[1]) e = t[1];
2445
+ else if (t[2]) e = t[2];
2446
+ else throw Error("RegExp out of sync");
2447
+ return pr.decode(e);
2448
+ }
2449
+ }, mr = 0x9184e72a000, hr = function() {
2450
+ function e(e) {
2451
+ this.buf = [+e || 0];
2452
+ }
2453
+ return e.prototype.mulAdd = function(e, t) {
2454
+ var n = this.buf, r = n.length, i, a;
2455
+ for (i = 0; i < r; ++i) a = n[i] * e + t, a < mr ? t = 0 : (t = 0 | a / mr, a -= t * mr), n[i] = a;
2456
+ t > 0 && (n[i] = t);
2457
+ }, e.prototype.sub = function(e) {
2458
+ var t = this.buf, n = t.length, r, i;
2459
+ for (r = 0; r < n; ++r) i = t[r] - e, i < 0 ? (i += mr, e = 1) : e = 0, t[r] = i;
2460
+ for (; t[t.length - 1] === 0;) t.pop();
2461
+ }, e.prototype.toString = function(e) {
2462
+ if ((e || 10) != 10) throw Error("only base 10 is supported");
2463
+ for (var t = this.buf, n = t[t.length - 1].toString(), r = t.length - 2; r >= 0; --r) n += (mr + t[r]).toString().substring(1);
2464
+ return n;
2465
+ }, e.prototype.valueOf = function() {
2466
+ for (var e = this.buf, t = 0, n = e.length - 1; n >= 0; --n) t = t * mr + e[n];
2467
+ return t;
2468
+ }, e.prototype.simplify = function() {
2469
+ var e = this.buf;
2470
+ return e.length == 1 ? e[0] : this;
2471
+ }, e;
2472
+ }(), gr = "…", _r = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, vr = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
2473
+ function yr(e, t) {
2474
+ return e.length > t && (e = e.substring(0, t) + gr), e;
2475
+ }
2476
+ var br = function() {
2477
+ function e(t, n) {
2478
+ this.hexDigits = "0123456789ABCDEF", t instanceof e ? (this.enc = t.enc, this.pos = t.pos) : (this.enc = t, this.pos = n);
2479
+ }
2480
+ return e.prototype.get = function(e) {
2481
+ if (e === void 0 && (e = this.pos++), e >= this.enc.length) throw Error(`Requesting byte offset ${e} on a stream of length ${this.enc.length}`);
2482
+ return typeof this.enc == "string" ? this.enc.charCodeAt(e) : this.enc[e];
2483
+ }, e.prototype.hexByte = function(e) {
2484
+ return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(e & 15);
2485
+ }, e.prototype.hexDump = function(e, t, n) {
2486
+ for (var r = "", i = e; i < t; ++i) if (r += this.hexByte(this.get(i)), n !== !0) switch (i & 15) {
2487
+ case 7:
2488
+ r += " ";
2489
+ break;
2490
+ case 15:
2491
+ r += "\n";
2492
+ break;
2493
+ default: r += " ";
2494
+ }
2495
+ return r;
2496
+ }, e.prototype.isASCII = function(e, t) {
2497
+ for (var n = e; n < t; ++n) {
2498
+ var r = this.get(n);
2499
+ if (r < 32 || r > 176) return !1;
2500
+ }
2501
+ return !0;
2502
+ }, e.prototype.parseStringISO = function(e, t) {
2503
+ for (var n = "", r = e; r < t; ++r) n += String.fromCharCode(this.get(r));
2504
+ return n;
2505
+ }, e.prototype.parseStringUTF = function(e, t) {
2506
+ for (var n = "", r = e; r < t;) {
2507
+ var i = this.get(r++);
2508
+ i < 128 ? n += String.fromCharCode(i) : i > 191 && i < 224 ? n += String.fromCharCode((i & 31) << 6 | this.get(r++) & 63) : n += String.fromCharCode((i & 15) << 12 | (this.get(r++) & 63) << 6 | this.get(r++) & 63);
2509
+ }
2510
+ return n;
2511
+ }, e.prototype.parseStringBMP = function(e, t) {
2512
+ for (var n = "", r, i, a = e; a < t;) r = this.get(a++), i = this.get(a++), n += String.fromCharCode(r << 8 | i);
2513
+ return n;
2514
+ }, e.prototype.parseTime = function(e, t, n) {
2515
+ var r = this.parseStringISO(e, t), i = (n ? _r : vr).exec(r);
2516
+ return i ? (n && (i[1] = +i[1], i[1] += +i[1] < 70 ? 2e3 : 1900), r = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4], i[5] && (r += ":" + i[5], i[6] && (r += ":" + i[6], i[7] && (r += "." + i[7]))), i[8] && (r += " UTC", i[8] != "Z" && (r += i[8], i[9] && (r += ":" + i[9]))), r) : "Unrecognized time: " + r;
2517
+ }, e.prototype.parseInteger = function(e, t) {
2518
+ for (var n = this.get(e), r = n > 127, i = r ? 255 : 0, a, o = ""; n == i && ++e < t;) n = this.get(e);
2519
+ if (a = t - e, a === 0) return r ? -1 : 0;
2520
+ if (a > 4) {
2521
+ for (o = n, a <<= 3; !((+o ^ i) & 128);) o <<= 1, --a;
2522
+ o = "(" + a + " bit)\n";
2523
+ }
2524
+ r && (n -= 256);
2525
+ for (var s = new hr(n), c = e + 1; c < t; ++c) s.mulAdd(256, this.get(c));
2526
+ return o + s.toString();
2527
+ }, e.prototype.parseBitString = function(e, t, n) {
2528
+ for (var r = this.get(e), i = "(" + ((t - e - 1 << 3) - r) + " bit)\n", a = "", o = e + 1; o < t; ++o) {
2529
+ for (var s = this.get(o), c = o == t - 1 ? r : 0, l = 7; l >= c; --l) a += s >> l & 1 ? "1" : "0";
2530
+ if (a.length > n) return i + yr(a, n);
2531
+ }
2532
+ return i + a;
2533
+ }, e.prototype.parseOctetString = function(e, t, n) {
2534
+ if (this.isASCII(e, t)) return yr(this.parseStringISO(e, t), n);
2535
+ var r = t - e, i = "(" + r + " byte)\n";
2536
+ n /= 2, r > n && (t = e + n);
2537
+ for (var a = e; a < t; ++a) i += this.hexByte(this.get(a));
2538
+ return r > n && (i += gr), i;
2539
+ }, e.prototype.parseOID = function(e, t, n) {
2540
+ for (var r = "", i = new hr(), a = 0, o = e; o < t; ++o) {
2541
+ var s = this.get(o);
2542
+ if (i.mulAdd(128, s & 127), a += 7, !(s & 128)) {
2543
+ if (r === "") if (i = i.simplify(), i instanceof hr) i.sub(80), r = "2." + i.toString();
2544
+ else {
2545
+ var c = i < 80 ? i < 40 ? 0 : 1 : 2;
2546
+ r = c + "." + (i - c * 40);
2547
+ }
2548
+ else r += "." + i.toString();
2549
+ if (r.length > n) return yr(r, n);
2550
+ i = new hr(), a = 0;
2551
+ }
2552
+ }
2553
+ return a > 0 && (r += ".incomplete"), r;
2554
+ }, e;
2555
+ }(), xr = function() {
2556
+ function e(e, t, n, r, i) {
2557
+ if (!(r instanceof Sr)) throw Error("Invalid tag value.");
2558
+ this.stream = e, this.header = t, this.length = n, this.tag = r, this.sub = i;
2559
+ }
2560
+ return e.prototype.typeName = function() {
2561
+ switch (this.tag.tagClass) {
2562
+ case 0:
2563
+ switch (this.tag.tagNumber) {
2564
+ case 0: return "EOC";
2565
+ case 1: return "BOOLEAN";
2566
+ case 2: return "INTEGER";
2567
+ case 3: return "BIT_STRING";
2568
+ case 4: return "OCTET_STRING";
2569
+ case 5: return "NULL";
2570
+ case 6: return "OBJECT_IDENTIFIER";
2571
+ case 7: return "ObjectDescriptor";
2572
+ case 8: return "EXTERNAL";
2573
+ case 9: return "REAL";
2574
+ case 10: return "ENUMERATED";
2575
+ case 11: return "EMBEDDED_PDV";
2576
+ case 12: return "UTF8String";
2577
+ case 16: return "SEQUENCE";
2578
+ case 17: return "SET";
2579
+ case 18: return "NumericString";
2580
+ case 19: return "PrintableString";
2581
+ case 20: return "TeletexString";
2582
+ case 21: return "VideotexString";
2583
+ case 22: return "IA5String";
2584
+ case 23: return "UTCTime";
2585
+ case 24: return "GeneralizedTime";
2586
+ case 25: return "GraphicString";
2587
+ case 26: return "VisibleString";
2588
+ case 27: return "GeneralString";
2589
+ case 28: return "UniversalString";
2590
+ case 30: return "BMPString";
2591
+ }
2592
+ return "Universal_" + this.tag.tagNumber.toString();
2593
+ case 1: return "Application_" + this.tag.tagNumber.toString();
2594
+ case 2: return "[" + this.tag.tagNumber.toString() + "]";
2595
+ case 3: return "Private_" + this.tag.tagNumber.toString();
2596
+ }
2597
+ }, e.prototype.content = function(e) {
2598
+ if (this.tag === void 0) return null;
2599
+ e === void 0 && (e = Infinity);
2600
+ var t = this.posContent(), n = Math.abs(this.length);
2601
+ if (!this.tag.isUniversal()) return this.sub === null ? this.stream.parseOctetString(t, t + n, e) : "(" + this.sub.length + " elem)";
2602
+ switch (this.tag.tagNumber) {
2603
+ case 1: return this.stream.get(t) === 0 ? "false" : "true";
2604
+ case 2: return this.stream.parseInteger(t, t + n);
2605
+ case 3: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(t, t + n, e);
2606
+ case 4: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + n, e);
2607
+ case 6: return this.stream.parseOID(t, t + n, e);
2608
+ case 16:
2609
+ case 17: return this.sub === null ? "(no elem)" : "(" + this.sub.length + " elem)";
2610
+ case 12: return yr(this.stream.parseStringUTF(t, t + n), e);
2611
+ case 18:
2612
+ case 19:
2613
+ case 20:
2614
+ case 21:
2615
+ case 22:
2616
+ case 26: return yr(this.stream.parseStringISO(t, t + n), e);
2617
+ case 30: return yr(this.stream.parseStringBMP(t, t + n), e);
2618
+ case 23:
2619
+ case 24: return this.stream.parseTime(t, t + n, this.tag.tagNumber == 23);
2620
+ }
2621
+ return null;
2622
+ }, e.prototype.toString = function() {
2623
+ return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
2624
+ }, e.prototype.toPrettyString = function(e) {
2625
+ e === void 0 && (e = "");
2626
+ var t = e + this.typeName() + " @" + this.stream.pos;
2627
+ if (this.length >= 0 && (t += "+"), t += this.length, this.tag.tagConstructed ? t += " (constructed)" : this.tag.isUniversal() && (this.tag.tagNumber == 3 || this.tag.tagNumber == 4) && this.sub !== null && (t += " (encapsulates)"), t += "\n", this.sub !== null) {
2628
+ e += " ";
2629
+ for (var n = 0, r = this.sub.length; n < r; ++n) t += this.sub[n].toPrettyString(e);
2630
+ }
2631
+ return t;
2632
+ }, e.prototype.posStart = function() {
2633
+ return this.stream.pos;
2634
+ }, e.prototype.posContent = function() {
2635
+ return this.stream.pos + this.header;
2636
+ }, e.prototype.posEnd = function() {
2637
+ return this.stream.pos + this.header + Math.abs(this.length);
2638
+ }, e.prototype.toHexString = function() {
2639
+ return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
2640
+ }, e.decodeLength = function(e) {
2641
+ var t = e.get(), n = t & 127;
2642
+ if (n == t) return n;
2643
+ if (n > 6) throw Error("Length over 48 bits not supported at position " + (e.pos - 1));
2644
+ if (n === 0) return null;
2645
+ t = 0;
2646
+ for (var r = 0; r < n; ++r) t = t * 256 + e.get();
2647
+ return t;
2648
+ }, e.prototype.getHexStringValue = function() {
2649
+ var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
2650
+ return e.substring(t, t + n);
2651
+ }, e.decode = function(t) {
2652
+ var n = t instanceof br ? t : new br(t, 0), r = new br(n), i = new Sr(n), a = e.decodeLength(n), o = n.pos, s = o - r.pos, c = null, l = function() {
2653
+ var t = [];
2654
+ if (a !== null) {
2655
+ for (var r = o + a; n.pos < r;) t[t.length] = e.decode(n);
2656
+ if (n.pos != r) throw Error("Content size is not correct for container starting at offset " + o);
2657
+ } else try {
2658
+ for (;;) {
2659
+ var i = e.decode(n);
2660
+ if (i.tag.isEOC()) break;
2661
+ t[t.length] = i;
2662
+ }
2663
+ a = o - n.pos;
2664
+ } catch (e) {
2665
+ throw Error("Exception while decoding undefined length content: " + e);
2666
+ }
2667
+ return t;
2668
+ };
2669
+ if (i.tagConstructed) c = l();
2670
+ else if (i.isUniversal() && (i.tagNumber == 3 || i.tagNumber == 4)) try {
2671
+ if (i.tagNumber == 3 && n.get() != 0) throw Error("BIT STRINGs with unused bits cannot encapsulate.");
2672
+ c = l();
2673
+ for (var u = 0; u < c.length; ++u) if (c[u].tag.isEOC()) throw Error("EOC is not supposed to be actual content.");
2674
+ } catch {
2675
+ c = null;
2676
+ }
2677
+ if (c === null) {
2678
+ if (a === null) throw Error("We can't skip over an invalid tag with undefined length at offset " + o);
2679
+ n.pos = o + Math.abs(a);
2680
+ }
2681
+ return new e(r, s, a, i, c);
2682
+ }, e;
2683
+ }(), Sr = function() {
2684
+ function e(e) {
2685
+ var t = e.get();
2686
+ if (this.tagClass = t >> 6, this.tagConstructed = (t & 32) != 0, this.tagNumber = t & 31, this.tagNumber == 31) {
2687
+ var n = new hr();
2688
+ do
2689
+ t = e.get(), n.mulAdd(128, t & 127);
2690
+ while (t & 128);
2691
+ this.tagNumber = n.simplify();
2692
+ }
2693
+ }
2694
+ return e.prototype.isUniversal = function() {
2695
+ return this.tagClass === 0;
2696
+ }, e.prototype.isEOC = function() {
2697
+ return this.tagClass === 0 && this.tagNumber === 0;
2698
+ }, e;
2699
+ }(), Cr, wr = !0, U = [
2700
+ 2,
2701
+ 3,
2702
+ 5,
2703
+ 7,
2704
+ 11,
2705
+ 13,
2706
+ 17,
2707
+ 19,
2708
+ 23,
2709
+ 29,
2710
+ 31,
2711
+ 37,
2712
+ 41,
2713
+ 43,
2714
+ 47,
2715
+ 53,
2716
+ 59,
2717
+ 61,
2718
+ 67,
2719
+ 71,
2720
+ 73,
2721
+ 79,
2722
+ 83,
2723
+ 89,
2724
+ 97,
2725
+ 101,
2726
+ 103,
2727
+ 107,
2728
+ 109,
2729
+ 113,
2730
+ 127,
2731
+ 131,
2732
+ 137,
2733
+ 139,
2734
+ 149,
2735
+ 151,
2736
+ 157,
2737
+ 163,
2738
+ 167,
2739
+ 173,
2740
+ 179,
2741
+ 181,
2742
+ 191,
2743
+ 193,
2744
+ 197,
2745
+ 199,
2746
+ 211,
2747
+ 223,
2748
+ 227,
2749
+ 229,
2750
+ 233,
2751
+ 239,
2752
+ 241,
2753
+ 251,
2754
+ 257,
2755
+ 263,
2756
+ 269,
2757
+ 271,
2758
+ 277,
2759
+ 281,
2760
+ 283,
2761
+ 293,
2762
+ 307,
2763
+ 311,
2764
+ 313,
2765
+ 317,
2766
+ 331,
2767
+ 337,
2768
+ 347,
2769
+ 349,
2770
+ 353,
2771
+ 359,
2772
+ 367,
2773
+ 373,
2774
+ 379,
2775
+ 383,
2776
+ 389,
2777
+ 397,
2778
+ 401,
2779
+ 409,
2780
+ 419,
2781
+ 421,
2782
+ 431,
2783
+ 433,
2784
+ 439,
2785
+ 443,
2786
+ 449,
2787
+ 457,
2788
+ 461,
2789
+ 463,
2790
+ 467,
2791
+ 479,
2792
+ 487,
2793
+ 491,
2794
+ 499,
2795
+ 503,
2796
+ 509,
2797
+ 521,
2798
+ 523,
2799
+ 541,
2800
+ 547,
2801
+ 557,
2802
+ 563,
2803
+ 569,
2804
+ 571,
2805
+ 577,
2806
+ 587,
2807
+ 593,
2808
+ 599,
2809
+ 601,
2810
+ 607,
2811
+ 613,
2812
+ 617,
2813
+ 619,
2814
+ 631,
2815
+ 641,
2816
+ 643,
2817
+ 647,
2818
+ 653,
2819
+ 659,
2820
+ 661,
2821
+ 673,
2822
+ 677,
2823
+ 683,
2824
+ 691,
2825
+ 701,
2826
+ 709,
2827
+ 719,
2828
+ 727,
2829
+ 733,
2830
+ 739,
2831
+ 743,
2832
+ 751,
2833
+ 757,
2834
+ 761,
2835
+ 769,
2836
+ 773,
2837
+ 787,
2838
+ 797,
2839
+ 809,
2840
+ 811,
2841
+ 821,
2842
+ 823,
2843
+ 827,
2844
+ 829,
2845
+ 839,
2846
+ 853,
2847
+ 857,
2848
+ 859,
2849
+ 863,
2850
+ 877,
2851
+ 881,
2852
+ 883,
2853
+ 887,
2854
+ 907,
2855
+ 911,
2856
+ 919,
2857
+ 929,
2858
+ 937,
2859
+ 941,
2860
+ 947,
2861
+ 953,
2862
+ 967,
2863
+ 971,
2864
+ 977,
2865
+ 983,
2866
+ 991,
2867
+ 997
2868
+ ], Tr = (1 << 26) / U[U.length - 1], W = function() {
2869
+ function e(e, t, n) {
2870
+ e != null && (typeof e == "number" ? this.fromNumber(e, t, n) : t == null && typeof e != "string" ? this.fromString(e, 256) : this.fromString(e, t));
2871
+ }
2872
+ return e.prototype.toString = function(e) {
2873
+ if (this.s < 0) return "-" + this.negate().toString(e);
2874
+ var t;
2875
+ if (e == 16) t = 4;
2876
+ else if (e == 8) t = 3;
2877
+ else if (e == 2) t = 1;
2878
+ else if (e == 32) t = 5;
2879
+ else if (e == 4) t = 2;
2880
+ else return this.toRadix(e);
2881
+ var n = (1 << t) - 1, r, i = !1, a = "", o = this.t, s = this.DB - o * this.DB % t;
2882
+ if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a = H(r)); o >= 0;) s < t ? (r = (this[o] & (1 << s) - 1) << t - s, r |= this[--o] >> (s += this.DB - t)) : (r = this[o] >> (s -= t) & n, s <= 0 && (s += this.DB, --o)), r > 0 && (i = !0), i && (a += H(r));
2883
+ return i ? a : "0";
2884
+ }, e.prototype.negate = function() {
2885
+ var t = G();
2886
+ return e.ZERO.subTo(this, t), t;
2887
+ }, e.prototype.abs = function() {
2888
+ return this.s < 0 ? this.negate() : this;
2889
+ }, e.prototype.compareTo = function(e) {
2890
+ var t = this.s - e.s;
2891
+ if (t != 0) return t;
2892
+ var n = this.t;
2893
+ if (t = n - e.t, t != 0) return this.s < 0 ? -t : t;
2894
+ for (; --n >= 0;) if ((t = this[n] - e[n]) != 0) return t;
2895
+ return 0;
2896
+ }, e.prototype.bitLength = function() {
2897
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Ir(this[this.t - 1] ^ this.s & this.DM);
2898
+ }, e.prototype.mod = function(t) {
2899
+ var n = G();
2900
+ return this.abs().divRemTo(t, null, n), this.s < 0 && n.compareTo(e.ZERO) > 0 && t.subTo(n, n), n;
2901
+ }, e.prototype.modPowInt = function(e, t) {
2902
+ var n = e < 256 || t.isEven() ? new Dr(t) : new Or(t);
2903
+ return this.exp(e, n);
2904
+ }, e.prototype.clone = function() {
2905
+ var e = G();
2906
+ return this.copyTo(e), e;
2907
+ }, e.prototype.intValue = function() {
2908
+ if (this.s < 0) {
2909
+ if (this.t == 1) return this[0] - this.DV;
2910
+ if (this.t == 0) return -1;
2911
+ } else if (this.t == 1) return this[0];
2912
+ else if (this.t == 0) return 0;
2913
+ return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
2914
+ }, e.prototype.byteValue = function() {
2915
+ return this.t == 0 ? this.s : this[0] << 24 >> 24;
2916
+ }, e.prototype.shortValue = function() {
2917
+ return this.t == 0 ? this.s : this[0] << 16 >> 16;
2918
+ }, e.prototype.signum = function() {
2919
+ return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
2920
+ }, e.prototype.toByteArray = function() {
2921
+ var e = this.t, t = [];
2922
+ t[0] = this.s;
2923
+ var n = this.DB - e * this.DB % 8, r, i = 0;
2924
+ if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
2925
+ return t;
2926
+ }, e.prototype.equals = function(e) {
2927
+ return this.compareTo(e) == 0;
2928
+ }, e.prototype.min = function(e) {
2929
+ return this.compareTo(e) < 0 ? this : e;
2930
+ }, e.prototype.max = function(e) {
2931
+ return this.compareTo(e) > 0 ? this : e;
2932
+ }, e.prototype.and = function(e) {
2933
+ var t = G();
2934
+ return this.bitwiseTo(e, er, t), t;
2935
+ }, e.prototype.or = function(e) {
2936
+ var t = G();
2937
+ return this.bitwiseTo(e, tr, t), t;
2938
+ }, e.prototype.xor = function(e) {
2939
+ var t = G();
2940
+ return this.bitwiseTo(e, nr, t), t;
2941
+ }, e.prototype.andNot = function(e) {
2942
+ var t = G();
2943
+ return this.bitwiseTo(e, rr, t), t;
2944
+ }, e.prototype.not = function() {
2945
+ for (var e = G(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
2946
+ return e.t = this.t, e.s = ~this.s, e;
2947
+ }, e.prototype.shiftLeft = function(e) {
2948
+ var t = G();
2949
+ return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
2950
+ }, e.prototype.shiftRight = function(e) {
2951
+ var t = G();
2952
+ return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
2953
+ }, e.prototype.getLowestSetBit = function() {
2954
+ for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + ir(this[e]);
2955
+ return this.s < 0 ? this.t * this.DB : -1;
2956
+ }, e.prototype.bitCount = function() {
2957
+ for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += ar(this[n] ^ t);
2958
+ return e;
2959
+ }, e.prototype.testBit = function(e) {
2960
+ var t = Math.floor(e / this.DB);
2961
+ return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
2962
+ }, e.prototype.setBit = function(e) {
2963
+ return this.changeBit(e, tr);
2964
+ }, e.prototype.clearBit = function(e) {
2965
+ return this.changeBit(e, rr);
2966
+ }, e.prototype.flipBit = function(e) {
2967
+ return this.changeBit(e, nr);
2968
+ }, e.prototype.add = function(e) {
2969
+ var t = G();
2970
+ return this.addTo(e, t), t;
2971
+ }, e.prototype.subtract = function(e) {
2972
+ var t = G();
2973
+ return this.subTo(e, t), t;
2974
+ }, e.prototype.multiply = function(e) {
2975
+ var t = G();
2976
+ return this.multiplyTo(e, t), t;
2977
+ }, e.prototype.divide = function(e) {
2978
+ var t = G();
2979
+ return this.divRemTo(e, t, null), t;
2980
+ }, e.prototype.remainder = function(e) {
2981
+ var t = G();
2982
+ return this.divRemTo(e, null, t), t;
2983
+ }, e.prototype.divideAndRemainder = function(e) {
2984
+ var t = G(), n = G();
2985
+ return this.divRemTo(e, t, n), [t, n];
2986
+ }, e.prototype.modPow = function(e, t) {
2987
+ var n = e.bitLength(), r, i = Fr(1), a;
2988
+ if (n <= 0) return i;
2989
+ r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new Dr(t) : t.isEven() ? new kr(t) : new Or(t);
2990
+ var o = [], s = 3, c = r - 1, l = (1 << r) - 1;
2991
+ if (o[1] = a.convert(this), r > 1) {
2992
+ var u = G();
2993
+ for (a.sqrTo(o[1], u); s <= l;) o[s] = G(), a.mulTo(u, o[s - 2], o[s]), s += 2;
2994
+ }
2995
+ var d = e.t - 1, f, p = !0, m = G(), h;
2996
+ for (n = Ir(e[d]) - 1; d >= 0;) {
2997
+ for (n >= c ? f = e[d] >> n - c & l : (f = (e[d] & (1 << n + 1) - 1) << c - n, d > 0 && (f |= e[d - 1] >> this.DB + n - c)), s = r; !(f & 1);) f >>= 1, --s;
2998
+ if ((n -= s) < 0 && (n += this.DB, --d), p) o[f].copyTo(i), p = !1;
2999
+ else {
3000
+ for (; s > 1;) a.sqrTo(i, m), a.sqrTo(m, i), s -= 2;
3001
+ s > 0 ? a.sqrTo(i, m) : (h = i, i = m, m = h), a.mulTo(m, o[f], i);
3002
+ }
3003
+ for (; d >= 0 && !(e[d] & 1 << n);) a.sqrTo(i, m), h = i, i = m, m = h, --n < 0 && (n = this.DB - 1, --d);
3004
+ }
3005
+ return a.revert(i);
3006
+ }, e.prototype.modInverse = function(t) {
3007
+ var n = t.isEven();
3008
+ if (this.isEven() && n || t.signum() == 0) return e.ZERO;
3009
+ for (var r = t.clone(), i = this.clone(), a = Fr(1), o = Fr(0), s = Fr(0), c = Fr(1); r.signum() != 0;) {
3010
+ for (; r.isEven();) r.rShiftTo(1, r), n ? ((!a.isEven() || !o.isEven()) && (a.addTo(this, a), o.subTo(t, o)), a.rShiftTo(1, a)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
3011
+ for (; i.isEven();) i.rShiftTo(1, i), n ? ((!s.isEven() || !c.isEven()) && (s.addTo(this, s), c.subTo(t, c)), s.rShiftTo(1, s)) : c.isEven() || c.subTo(t, c), c.rShiftTo(1, c);
3012
+ r.compareTo(i) >= 0 ? (r.subTo(i, r), n && a.subTo(s, a), o.subTo(c, o)) : (i.subTo(r, i), n && s.subTo(a, s), c.subTo(o, c));
3013
+ }
3014
+ if (i.compareTo(e.ONE) != 0) return e.ZERO;
3015
+ if (c.compareTo(t) >= 0) return c.subtract(t);
3016
+ if (c.signum() < 0) c.addTo(t, c);
3017
+ else return c;
3018
+ return c.signum() < 0 ? c.add(t) : c;
3019
+ }, e.prototype.pow = function(e) {
3020
+ return this.exp(e, new Er());
3021
+ }, e.prototype.gcd = function(e) {
3022
+ var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
3023
+ if (t.compareTo(n) < 0) {
3024
+ var r = t;
3025
+ t = n, n = r;
3026
+ }
3027
+ var i = t.getLowestSetBit(), a = n.getLowestSetBit();
3028
+ if (a < 0) return t;
3029
+ for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
3030
+ return a > 0 && n.lShiftTo(a, n), n;
3031
+ }, e.prototype.isProbablePrime = function(e) {
3032
+ var t, n = this.abs();
3033
+ if (n.t == 1 && n[0] <= U[U.length - 1]) {
3034
+ for (t = 0; t < U.length; ++t) if (n[0] == U[t]) return !0;
3035
+ return !1;
3036
+ }
3037
+ if (n.isEven()) return !1;
3038
+ for (t = 1; t < U.length;) {
3039
+ for (var r = U[t], i = t + 1; i < U.length && r < Tr;) r *= U[i++];
3040
+ for (r = n.modInt(r); t < i;) if (r % U[t++] == 0) return !1;
3041
+ }
3042
+ return n.millerRabin(e);
3043
+ }, e.prototype.copyTo = function(e) {
3044
+ for (var t = this.t - 1; t >= 0; --t) e[t] = this[t];
3045
+ e.t = this.t, e.s = this.s;
3046
+ }, e.prototype.fromInt = function(e) {
3047
+ this.t = 1, this.s = e < 0 ? -1 : 0, e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0;
3048
+ }, e.prototype.fromString = function(t, n) {
3049
+ var r;
3050
+ if (n == 16) r = 4;
3051
+ else if (n == 8) r = 3;
3052
+ else if (n == 256) r = 8;
3053
+ else if (n == 2) r = 1;
3054
+ else if (n == 32) r = 5;
3055
+ else if (n == 4) r = 2;
3056
+ else {
3057
+ this.fromRadix(t, n);
3058
+ return;
3059
+ }
3060
+ this.t = 0, this.s = 0;
3061
+ for (var i = t.length, a = !1, o = 0; --i >= 0;) {
3062
+ var s = r == 8 ? t[i] & 255 : Pr(t, i);
3063
+ if (s < 0) {
3064
+ t.charAt(i) == "-" && (a = !0);
3065
+ continue;
3066
+ }
3067
+ a = !1, o == 0 ? this[this.t++] = s : o + r > this.DB ? (this[this.t - 1] |= (s & (1 << this.DB - o) - 1) << o, this[this.t++] = s >> this.DB - o) : this[this.t - 1] |= s << o, o += r, o >= this.DB && (o -= this.DB);
3068
+ }
3069
+ r == 8 && t[0] & 128 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), a && e.ZERO.subTo(this, this);
3070
+ }, e.prototype.clamp = function() {
3071
+ for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;) --this.t;
3072
+ }, e.prototype.dlShiftTo = function(e, t) {
3073
+ var n;
3074
+ for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n];
3075
+ for (n = e - 1; n >= 0; --n) t[n] = 0;
3076
+ t.t = this.t + e, t.s = this.s;
3077
+ }, e.prototype.drShiftTo = function(e, t) {
3078
+ for (var n = e; n < this.t; ++n) t[n - e] = this[n];
3079
+ t.t = Math.max(this.t - e, 0), t.s = this.s;
3080
+ }, e.prototype.lShiftTo = function(e, t) {
3081
+ for (var n = e % this.DB, r = this.DB - n, i = (1 << r) - 1, a = Math.floor(e / this.DB), o = this.s << n & this.DM, s = this.t - 1; s >= 0; --s) t[s + a + 1] = this[s] >> r | o, o = (this[s] & i) << n;
3082
+ for (var s = a - 1; s >= 0; --s) t[s] = 0;
3083
+ t[a] = o, t.t = this.t + a + 1, t.s = this.s, t.clamp();
3084
+ }, e.prototype.rShiftTo = function(e, t) {
3085
+ t.s = this.s;
3086
+ var n = Math.floor(e / this.DB);
3087
+ if (n >= this.t) {
3088
+ t.t = 0;
3089
+ return;
3090
+ }
3091
+ var r = e % this.DB, i = this.DB - r, a = (1 << r) - 1;
3092
+ t[0] = this[n] >> r;
3093
+ for (var o = n + 1; o < this.t; ++o) t[o - n - 1] |= (this[o] & a) << i, t[o - n] = this[o] >> r;
3094
+ r > 0 && (t[this.t - n - 1] |= (this.s & a) << i), t.t = this.t - n, t.clamp();
3095
+ }, e.prototype.subTo = function(e, t) {
3096
+ for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] - e[n], t[n++] = r & this.DM, r >>= this.DB;
3097
+ if (e.t < this.t) {
3098
+ for (r -= e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
3099
+ r += this.s;
3100
+ } else {
3101
+ for (r += this.s; n < e.t;) r -= e[n], t[n++] = r & this.DM, r >>= this.DB;
3102
+ r -= e.s;
3103
+ }
3104
+ t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
3105
+ }, e.prototype.multiplyTo = function(t, n) {
3106
+ var r = this.abs(), i = t.abs(), a = r.t;
3107
+ for (n.t = a + i.t; --a >= 0;) n[a] = 0;
3108
+ for (a = 0; a < i.t; ++a) n[a + r.t] = r.am(0, i[a], n, a, 0, r.t);
3109
+ n.s = 0, n.clamp(), this.s != t.s && e.ZERO.subTo(n, n);
3110
+ }, e.prototype.squareTo = function(e) {
3111
+ for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;) e[n] = 0;
3112
+ for (n = 0; n < t.t - 1; ++n) {
3113
+ var r = t.am(n, t[n], e, 2 * n, 0, 1);
3114
+ (e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, r, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV, e[n + t.t + 1] = 1);
3115
+ }
3116
+ e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
3117
+ }, e.prototype.divRemTo = function(t, n, r) {
3118
+ var i = t.abs();
3119
+ if (!(i.t <= 0)) {
3120
+ var a = this.abs();
3121
+ if (a.t < i.t) {
3122
+ n?.fromInt(0), r != null && this.copyTo(r);
3123
+ return;
3124
+ }
3125
+ r ??= G();
3126
+ var o = G(), s = this.s, c = t.s, l = this.DB - Ir(i[i.t - 1]);
3127
+ l > 0 ? (i.lShiftTo(l, o), a.lShiftTo(l, r)) : (i.copyTo(o), a.copyTo(r));
3128
+ var u = o.t, d = o[u - 1];
3129
+ if (d != 0) {
3130
+ var f = d * (1 << this.F1) + (u > 1 ? o[u - 2] >> this.F2 : 0), p = this.FV / f, m = (1 << this.F1) / f, h = 1 << this.F2, g = r.t, _ = g - u, v = n ?? G();
3131
+ for (o.dlShiftTo(_, v), r.compareTo(v) >= 0 && (r[r.t++] = 1, r.subTo(v, r)), e.ONE.dlShiftTo(u, v), v.subTo(o, o); o.t < u;) o[o.t++] = 0;
3132
+ for (; --_ >= 0;) {
3133
+ var y = r[--g] == d ? this.DM : Math.floor(r[g] * p + (r[g - 1] + h) * m);
3134
+ if ((r[g] += o.am(0, y, r, _, 0, u)) < y) for (o.dlShiftTo(_, v), r.subTo(v, r); r[g] < --y;) r.subTo(v, r);
3135
+ }
3136
+ n != null && (r.drShiftTo(u, n), s != c && e.ZERO.subTo(n, n)), r.t = u, r.clamp(), l > 0 && r.rShiftTo(l, r), s < 0 && e.ZERO.subTo(r, r);
3137
+ }
3138
+ }
3139
+ }, e.prototype.invDigit = function() {
3140
+ if (this.t < 1) return 0;
3141
+ var e = this[0];
3142
+ if (!(e & 1)) return 0;
3143
+ var t = e & 3;
3144
+ return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
3145
+ }, e.prototype.isEven = function() {
3146
+ return (this.t > 0 ? this[0] & 1 : this.s) == 0;
3147
+ }, e.prototype.exp = function(t, n) {
3148
+ if (t > 4294967295 || t < 1) return e.ONE;
3149
+ var r = G(), i = G(), a = n.convert(this), o = Ir(t) - 1;
3150
+ for (a.copyTo(r); --o >= 0;) if (n.sqrTo(r, i), (t & 1 << o) > 0) n.mulTo(i, a, r);
3151
+ else {
3152
+ var s = r;
3153
+ r = i, i = s;
3154
+ }
3155
+ return n.revert(r);
3156
+ }, e.prototype.chunkSize = function(e) {
3157
+ return Math.floor(Math.LN2 * this.DB / Math.log(e));
3158
+ }, e.prototype.toRadix = function(e) {
3159
+ if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
3160
+ var t = this.chunkSize(e), n = e ** +t, r = Fr(n), i = G(), a = G(), o = "";
3161
+ for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substring(1) + o, i.divRemTo(r, i, a);
3162
+ return a.intValue().toString(e) + o;
3163
+ }, e.prototype.fromRadix = function(t, n) {
3164
+ this.fromInt(0), n ??= 10;
3165
+ for (var r = this.chunkSize(n), i = n ** +r, a = !1, o = 0, s = 0, c = 0; c < t.length; ++c) {
3166
+ var l = Pr(t, c);
3167
+ if (l < 0) {
3168
+ t.charAt(c) == "-" && this.signum() == 0 && (a = !0);
3169
+ continue;
3170
+ }
3171
+ s = n * s + l, ++o >= r && (this.dMultiply(i), this.dAddOffset(s, 0), o = 0, s = 0);
3172
+ }
3173
+ o > 0 && (this.dMultiply(n ** +o), this.dAddOffset(s, 0)), a && e.ZERO.subTo(this, this);
3174
+ }, e.prototype.fromNumber = function(t, n, r) {
3175
+ if (typeof n == "number") if (t < 2) this.fromInt(1);
3176
+ else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), tr, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n);) this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(e.ONE.shiftLeft(t - 1), this);
3177
+ else {
3178
+ var i = [], a = t & 7;
3179
+ i.length = (t >> 3) + 1, n.nextBytes(i), a > 0 ? i[0] &= (1 << a) - 1 : i[0] = 0, this.fromString(i, 256);
3180
+ }
3181
+ }, e.prototype.bitwiseTo = function(e, t, n) {
3182
+ var r, i, a = Math.min(e.t, this.t);
3183
+ for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
3184
+ if (e.t < this.t) {
3185
+ for (i = e.s & this.DM, r = a; r < this.t; ++r) n[r] = t(this[r], i);
3186
+ n.t = this.t;
3187
+ } else {
3188
+ for (i = this.s & this.DM, r = a; r < e.t; ++r) n[r] = t(i, e[r]);
3189
+ n.t = e.t;
3190
+ }
3191
+ n.s = t(this.s, e.s), n.clamp();
3192
+ }, e.prototype.changeBit = function(t, n) {
3193
+ var r = e.ONE.shiftLeft(t);
3194
+ return this.bitwiseTo(r, n, r), r;
3195
+ }, e.prototype.addTo = function(e, t) {
3196
+ for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
3197
+ if (e.t < this.t) {
3198
+ for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
3199
+ r += this.s;
3200
+ } else {
3201
+ for (r += this.s; n < e.t;) r += e[n], t[n++] = r & this.DM, r >>= this.DB;
3202
+ r += e.s;
3203
+ }
3204
+ t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
3205
+ }, e.prototype.dMultiply = function(e) {
3206
+ this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
3207
+ }, e.prototype.dAddOffset = function(e, t) {
3208
+ if (e != 0) {
3209
+ for (; this.t <= t;) this[this.t++] = 0;
3210
+ for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
3211
+ }
3212
+ }, e.prototype.multiplyLowerTo = function(e, t, n) {
3213
+ var r = Math.min(this.t + e.t, t);
3214
+ for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
3215
+ for (var i = n.t - this.t; r < i; ++r) n[r + this.t] = this.am(0, e[r], n, r, 0, this.t);
3216
+ for (var i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
3217
+ n.clamp();
3218
+ }, e.prototype.multiplyUpperTo = function(e, t, n) {
3219
+ --t;
3220
+ var r = n.t = this.t + e.t - t;
3221
+ for (n.s = 0; --r >= 0;) n[r] = 0;
3222
+ for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
3223
+ n.clamp(), n.drShiftTo(1, n);
3224
+ }, e.prototype.modInt = function(e) {
3225
+ if (e <= 0) return 0;
3226
+ var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
3227
+ if (this.t > 0) if (t == 0) n = this[0] % e;
3228
+ else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
3229
+ return n;
3230
+ }, e.prototype.millerRabin = function(t) {
3231
+ var n = this.subtract(e.ONE), r = n.getLowestSetBit();
3232
+ if (r <= 0) return !1;
3233
+ var i = n.shiftRight(r);
3234
+ t = t + 1 >> 1, t > U.length && (t = U.length);
3235
+ for (var a = G(), o = 0; o < t; ++o) {
3236
+ a.fromInt(U[Math.floor(Math.random() * U.length)]);
3237
+ var s = a.modPow(i, this);
3238
+ if (s.compareTo(e.ONE) != 0 && s.compareTo(n) != 0) {
3239
+ for (var c = 1; c++ < r && s.compareTo(n) != 0;) if (s = s.modPowInt(2, this), s.compareTo(e.ONE) == 0) return !1;
3240
+ if (s.compareTo(n) != 0) return !1;
3241
+ }
3242
+ }
3243
+ return !0;
3244
+ }, e.prototype.square = function() {
3245
+ var e = G();
3246
+ return this.squareTo(e), e;
3247
+ }, e.prototype.gcda = function(e, t) {
3248
+ var n = this.s < 0 ? this.negate() : this.clone(), r = e.s < 0 ? e.negate() : e.clone();
3249
+ if (n.compareTo(r) < 0) {
3250
+ var i = n;
3251
+ n = r, r = i;
3252
+ }
3253
+ var a = n.getLowestSetBit(), o = r.getLowestSetBit();
3254
+ if (o < 0) {
3255
+ t(n);
3256
+ return;
3257
+ }
3258
+ a < o && (o = a), o > 0 && (n.rShiftTo(o, n), r.rShiftTo(o, r));
3259
+ var s = function() {
3260
+ (a = n.getLowestSetBit()) > 0 && n.rShiftTo(a, n), (a = r.getLowestSetBit()) > 0 && r.rShiftTo(a, r), n.compareTo(r) >= 0 ? (n.subTo(r, n), n.rShiftTo(1, n)) : (r.subTo(n, r), r.rShiftTo(1, r)), n.signum() > 0 ? setTimeout(s, 0) : (o > 0 && r.lShiftTo(o, r), setTimeout(function() {
3261
+ t(r);
3262
+ }, 0));
3263
+ };
3264
+ setTimeout(s, 10);
3265
+ }, e.prototype.fromNumberAsync = function(t, n, r, i) {
3266
+ if (typeof n == "number") if (t < 2) this.fromInt(1);
3267
+ else {
3268
+ this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), tr, this), this.isEven() && this.dAddOffset(1, 0);
3269
+ var a = this, o = function() {
3270
+ a.dAddOffset(2, 0), a.bitLength() > t && a.subTo(e.ONE.shiftLeft(t - 1), a), a.isProbablePrime(n) ? setTimeout(function() {
3271
+ i();
3272
+ }, 0) : setTimeout(o, 0);
3273
+ };
3274
+ setTimeout(o, 0);
3275
+ }
3276
+ else {
3277
+ var s = [], c = t & 7;
3278
+ s.length = (t >> 3) + 1, n.nextBytes(s), c > 0 ? s[0] &= (1 << c) - 1 : s[0] = 0, this.fromString(s, 256);
3279
+ }
3280
+ }, e;
3281
+ }(), Er = function() {
3282
+ function e() {}
3283
+ return e.prototype.convert = function(e) {
3284
+ return e;
3285
+ }, e.prototype.revert = function(e) {
3286
+ return e;
3287
+ }, e.prototype.mulTo = function(e, t, n) {
3288
+ e.multiplyTo(t, n);
3289
+ }, e.prototype.sqrTo = function(e, t) {
3290
+ e.squareTo(t);
3291
+ }, e;
3292
+ }(), Dr = function() {
3293
+ function e(e) {
3294
+ this.m = e;
3295
+ }
3296
+ return e.prototype.convert = function(e) {
3297
+ return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
3298
+ }, e.prototype.revert = function(e) {
3299
+ return e;
3300
+ }, e.prototype.reduce = function(e) {
3301
+ e.divRemTo(this.m, null, e);
3302
+ }, e.prototype.mulTo = function(e, t, n) {
3303
+ e.multiplyTo(t, n), this.reduce(n);
3304
+ }, e.prototype.sqrTo = function(e, t) {
3305
+ e.squareTo(t), this.reduce(t);
3306
+ }, e;
3307
+ }(), Or = function() {
3308
+ function e(e) {
3309
+ this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
3310
+ }
3311
+ return e.prototype.convert = function(e) {
3312
+ var t = G();
3313
+ return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(W.ZERO) > 0 && this.m.subTo(t, t), t;
3314
+ }, e.prototype.revert = function(e) {
3315
+ var t = G();
3316
+ return e.copyTo(t), this.reduce(t), t;
3317
+ }, e.prototype.reduce = function(e) {
3318
+ for (; e.t <= this.mt2;) e[e.t++] = 0;
3319
+ for (var t = 0; t < this.m.t; ++t) {
3320
+ var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
3321
+ for (n = t + this.m.t, e[n] += this.m.am(0, r, e, t, 0, this.m.t); e[n] >= e.DV;) e[n] -= e.DV, e[++n]++;
3322
+ }
3323
+ e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
3324
+ }, e.prototype.mulTo = function(e, t, n) {
3325
+ e.multiplyTo(t, n), this.reduce(n);
3326
+ }, e.prototype.sqrTo = function(e, t) {
3327
+ e.squareTo(t), this.reduce(t);
3328
+ }, e;
3329
+ }(), kr = function() {
3330
+ function e(e) {
3331
+ this.m = e, this.r2 = G(), this.q3 = G(), W.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
3332
+ }
3333
+ return e.prototype.convert = function(e) {
3334
+ if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
3335
+ if (e.compareTo(this.m) < 0) return e;
3336
+ var t = G();
3337
+ return e.copyTo(t), this.reduce(t), t;
3338
+ }, e.prototype.revert = function(e) {
3339
+ return e;
3340
+ }, e.prototype.reduce = function(e) {
3341
+ for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
3342
+ for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
3343
+ }, e.prototype.mulTo = function(e, t, n) {
3344
+ e.multiplyTo(t, n), this.reduce(n);
3345
+ }, e.prototype.sqrTo = function(e, t) {
3346
+ e.squareTo(t), this.reduce(t);
3347
+ }, e;
3348
+ }();
3349
+ function G() {
3350
+ return new W(null);
3351
+ }
3352
+ function K(e, t) {
3353
+ return new W(e, t);
3354
+ }
3355
+ var Ar = typeof navigator < "u";
3356
+ Ar && wr && navigator.appName == "Microsoft Internet Explorer" ? (W.prototype.am = function(e, t, n, r, i, a) {
3357
+ for (var o = t & 32767, s = t >> 15; --a >= 0;) {
3358
+ var c = this[e] & 32767, l = this[e++] >> 15, u = s * c + l * o;
3359
+ c = o * c + ((u & 32767) << 15) + n[r] + (i & 1073741823), i = (c >>> 30) + (u >>> 15) + s * l + (i >>> 30), n[r++] = c & 1073741823;
3360
+ }
3361
+ return i;
3362
+ }, Cr = 30) : Ar && wr && navigator.appName != "Netscape" ? (W.prototype.am = function(e, t, n, r, i, a) {
3363
+ for (; --a >= 0;) {
3364
+ var o = t * this[e++] + n[r] + i;
3365
+ i = Math.floor(o / 67108864), n[r++] = o & 67108863;
3366
+ }
3367
+ return i;
3368
+ }, Cr = 26) : (W.prototype.am = function(e, t, n, r, i, a) {
3369
+ for (var o = t & 16383, s = t >> 14; --a >= 0;) {
3370
+ var c = this[e] & 16383, l = this[e++] >> 14, u = s * c + l * o;
3371
+ c = o * c + ((u & 16383) << 14) + n[r] + i, i = (c >> 28) + (u >> 14) + s * l, n[r++] = c & 268435455;
3372
+ }
3373
+ return i;
3374
+ }, Cr = 28), W.prototype.DB = Cr, W.prototype.DM = (1 << Cr) - 1, W.prototype.DV = 1 << Cr;
3375
+ var jr = 52;
3376
+ W.prototype.FV = 2 ** jr, W.prototype.F1 = jr - Cr, W.prototype.F2 = 2 * Cr - jr;
3377
+ var Mr = [], Nr = 48, q;
3378
+ for (q = 0; q <= 9; ++q) Mr[Nr++] = q;
3379
+ for (Nr = 97, q = 10; q < 36; ++q) Mr[Nr++] = q;
3380
+ for (Nr = 65, q = 10; q < 36; ++q) Mr[Nr++] = q;
3381
+ function Pr(e, t) {
3382
+ return Mr[e.charCodeAt(t)] ?? -1;
3383
+ }
3384
+ function Fr(e) {
3385
+ var t = G();
3386
+ return t.fromInt(e), t;
3387
+ }
3388
+ function Ir(e) {
3389
+ var t = 1, n;
3390
+ return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
3391
+ }
3392
+ W.ZERO = Fr(0), W.ONE = Fr(1);
3393
+ //#endregion
3394
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/prng4.js
3395
+ var Lr = function() {
3396
+ function e() {
3397
+ this.i = 0, this.j = 0, this.S = [];
3398
+ }
3399
+ return e.prototype.init = function(e) {
3400
+ var t, n, r;
3401
+ for (t = 0; t < 256; ++t) this.S[t] = t;
3402
+ for (n = 0, t = 0; t < 256; ++t) n = n + this.S[t] + e[t % e.length] & 255, r = this.S[t], this.S[t] = this.S[n], this.S[n] = r;
3403
+ this.i = 0, this.j = 0;
3404
+ }, e.prototype.next = function() {
3405
+ var e;
3406
+ return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
3407
+ }, e;
3408
+ }();
3409
+ function Rr() {
3410
+ return new Lr();
3411
+ }
3412
+ //#endregion
3413
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rng.js
3414
+ var zr, Br = null, J;
3415
+ if (Br == null) {
3416
+ Br = [], J = 0;
3417
+ var Vr = void 0;
3418
+ if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
3419
+ var Hr = new Uint32Array(256);
3420
+ for (self.crypto.getRandomValues(Hr), Vr = 0; Vr < Hr.length; ++Vr) Br[J++] = Hr[Vr] & 255;
3421
+ }
3422
+ var Ur = 0, Wr = function(e) {
3423
+ if (Ur ||= 0, Ur >= 256 || J >= 256) {
3424
+ self.removeEventListener ? self.removeEventListener("mousemove", Wr, !1) : self.detachEvent && self.detachEvent("onmousemove", Wr);
3425
+ return;
3426
+ }
3427
+ try {
3428
+ var t = e.x + e.y;
3429
+ Br[J++] = t & 255, Ur += 1;
3430
+ } catch {}
3431
+ };
3432
+ typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Wr, !1) : self.attachEvent && self.attachEvent("onmousemove", Wr));
3433
+ }
3434
+ function Gr() {
3435
+ if (zr == null) {
3436
+ for (zr = Rr(); J < 256;) {
3437
+ var e = Math.floor(65536 * Math.random());
3438
+ Br[J++] = e & 255;
3439
+ }
3440
+ for (zr.init(Br), J = 0; J < Br.length; ++J) Br[J] = 0;
3441
+ J = 0;
3442
+ }
3443
+ return zr.next();
3444
+ }
3445
+ var Kr = function() {
3446
+ function e() {}
3447
+ return e.prototype.nextBytes = function(e) {
3448
+ for (var t = 0; t < e.length; ++t) e[t] = Gr();
3449
+ }, e;
3450
+ }();
3451
+ //#endregion
3452
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/sha256.js
3453
+ function qr(e) {
3454
+ return Xr(ai(Yr(e), e.length * 8));
3455
+ }
3456
+ function Jr(e) {
3457
+ for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
3458
+ var i = e.charCodeAt(r);
3459
+ n += t.charAt(i >>> 4 & 15) + t.charAt(i & 15);
3460
+ }
3461
+ return n;
3462
+ }
3463
+ function Yr(e) {
3464
+ for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
3465
+ for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
3466
+ return t;
3467
+ }
3468
+ function Xr(e) {
3469
+ for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
3470
+ return t;
3471
+ }
3472
+ function Y(e, t) {
3473
+ return e >>> t | e << 32 - t;
3474
+ }
3475
+ function Zr(e, t) {
3476
+ return e >>> t;
3477
+ }
3478
+ function Qr(e, t, n) {
3479
+ return e & t ^ ~e & n;
3480
+ }
3481
+ function $r(e, t, n) {
3482
+ return e & t ^ e & n ^ t & n;
3483
+ }
3484
+ function ei(e) {
3485
+ return Y(e, 2) ^ Y(e, 13) ^ Y(e, 22);
3486
+ }
3487
+ function ti(e) {
3488
+ return Y(e, 6) ^ Y(e, 11) ^ Y(e, 25);
3489
+ }
3490
+ function ni(e) {
3491
+ return Y(e, 7) ^ Y(e, 18) ^ Zr(e, 3);
3492
+ }
3493
+ function ri(e) {
3494
+ return Y(e, 17) ^ Y(e, 19) ^ Zr(e, 10);
3495
+ }
3496
+ var ii = [
3497
+ 1116352408,
3498
+ 1899447441,
3499
+ -1245643825,
3500
+ -373957723,
3501
+ 961987163,
3502
+ 1508970993,
3503
+ -1841331548,
3504
+ -1424204075,
3505
+ -670586216,
3506
+ 310598401,
3507
+ 607225278,
3508
+ 1426881987,
3509
+ 1925078388,
3510
+ -2132889090,
3511
+ -1680079193,
3512
+ -1046744716,
3513
+ -459576895,
3514
+ -272742522,
3515
+ 264347078,
3516
+ 604807628,
3517
+ 770255983,
3518
+ 1249150122,
3519
+ 1555081692,
3520
+ 1996064986,
3521
+ -1740746414,
3522
+ -1473132947,
3523
+ -1341970488,
3524
+ -1084653625,
3525
+ -958395405,
3526
+ -710438585,
3527
+ 113926993,
3528
+ 338241895,
3529
+ 666307205,
3530
+ 773529912,
3531
+ 1294757372,
3532
+ 1396182291,
3533
+ 1695183700,
3534
+ 1986661051,
3535
+ -2117940946,
3536
+ -1838011259,
3537
+ -1564481375,
3538
+ -1474664885,
3539
+ -1035236496,
3540
+ -949202525,
3541
+ -778901479,
3542
+ -694614492,
3543
+ -200395387,
3544
+ 275423344,
3545
+ 430227734,
3546
+ 506948616,
3547
+ 659060556,
3548
+ 883997877,
3549
+ 958139571,
3550
+ 1322822218,
3551
+ 1537002063,
3552
+ 1747873779,
3553
+ 1955562222,
3554
+ 2024104815,
3555
+ -2067236844,
3556
+ -1933114872,
3557
+ -1866530822,
3558
+ -1538233109,
3559
+ -1090935817,
3560
+ -965641998
3561
+ ];
3562
+ function ai(e, t) {
3563
+ var n = [
3564
+ 1779033703,
3565
+ -1150833019,
3566
+ 1013904242,
3567
+ -1521486534,
3568
+ 1359893119,
3569
+ -1694144372,
3570
+ 528734635,
3571
+ 1541459225
3572
+ ], r = Array(64), i, a, o, s, c, l, u, d, f, p, m, h;
3573
+ for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, f = 0; f < e.length; f += 16) {
3574
+ for (i = n[0], a = n[1], o = n[2], s = n[3], c = n[4], l = n[5], u = n[6], d = n[7], p = 0; p < 64; p++) p < 16 ? r[p] = e[p + f] : r[p] = X(X(X(ri(r[p - 2]), r[p - 7]), ni(r[p - 15])), r[p - 16]), m = X(X(X(X(d, ti(c)), Qr(c, l, u)), ii[p]), r[p]), h = X(ei(i), $r(i, a, o)), d = u, u = l, l = c, c = X(s, m), s = o, o = a, a = i, i = X(m, h);
3575
+ n[0] = X(i, n[0]), n[1] = X(a, n[1]), n[2] = X(o, n[2]), n[3] = X(s, n[3]), n[4] = X(c, n[4]), n[5] = X(l, n[5]), n[6] = X(u, n[6]), n[7] = X(d, n[7]);
3576
+ }
3577
+ return n;
3578
+ }
3579
+ function X(e, t) {
3580
+ var n = (e & 65535) + (t & 65535);
3581
+ return (e >> 16) + (t >> 16) + (n >> 16) << 16 | n & 65535;
3582
+ }
3583
+ //#endregion
3584
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rsa.js
3585
+ function oi(e, t) {
3586
+ if (t < e.length + 22) return console.error("Message too long for RSA"), null;
3587
+ for (var n = t - e.length - 6, r = "", i = 0; i < n; i += 2) r += "ff";
3588
+ return K("0001" + r + "00" + e, 16);
3589
+ }
3590
+ function si(e, t) {
3591
+ if (t < e.length + 11) return console.error("Message too long for RSA"), null;
3592
+ for (var n = [], r = e.length - 1; r >= 0 && t > 0;) {
3593
+ var i = e.charCodeAt(r--);
3594
+ i < 128 ? n[--t] = i : i > 127 && i < 2048 ? (n[--t] = i & 63 | 128, n[--t] = i >> 6 | 192) : (n[--t] = i & 63 | 128, n[--t] = i >> 6 & 63 | 128, n[--t] = i >> 12 | 224);
3595
+ }
3596
+ n[--t] = 0;
3597
+ for (var a = new Kr(), o = []; t > 2;) {
3598
+ for (o[0] = 0; o[0] == 0;) a.nextBytes(o);
3599
+ n[--t] = o[0];
3600
+ }
3601
+ return n[--t] = 2, n[--t] = 0, new W(n);
3602
+ }
3603
+ function ci(e, t, n) {
3604
+ for (var r = "", i = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
3605
+ (i & 4278190080) >> 24,
3606
+ (i & 16711680) >> 16,
3607
+ (i & 65280) >> 8,
3608
+ i & 255
3609
+ ]))), i += 1;
3610
+ return r;
3611
+ }
3612
+ var li = 32;
3613
+ function ui(e, t) {
3614
+ var n = li, r = qr;
3615
+ if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
3616
+ var i = "", a;
3617
+ for (a = 0; a < t - e.length - 2 * n - 2; a += 1) i += "\0";
3618
+ var o = r("") + i + "" + e, s = Array(n);
3619
+ new Kr().nextBytes(s);
3620
+ var c = ci(s, o.length, r), l = [];
3621
+ for (a = 0; a < o.length; a += 1) l[a] = o.charCodeAt(a) ^ c.charCodeAt(a);
3622
+ var u = ci(l, s.length, r), d = [0];
3623
+ for (a = 0; a < s.length; a += 1) d[a + 1] = s[a] ^ u.charCodeAt(a);
3624
+ return new W(d.concat(l));
3625
+ }
3626
+ var di = function() {
3627
+ function e() {
3628
+ this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
3629
+ }
3630
+ return e.prototype.doPublic = function(e) {
3631
+ return e.modPowInt(this.e, this.n);
3632
+ }, e.prototype.doPrivate = function(e) {
3633
+ if (this.p == null || this.q == null) return e.modPow(this.d, this.n);
3634
+ for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0;) t = t.add(this.p);
3635
+ return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
3636
+ }, e.prototype.setPublic = function(e, t) {
3637
+ e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = K(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
3638
+ }, e.prototype.encrypt = function(e, t) {
3639
+ t === void 0 && (t = si);
3640
+ var n = this.n.bitLength() + 7 >> 3, r = t(e, n);
3641
+ if (r == null) return null;
3642
+ var i = this.doPublic(r);
3643
+ if (i == null) return null;
3644
+ for (var a = i.toString(16), o = a.length, s = 0; s < n * 2 - o; s++) a = "0" + a;
3645
+ return a;
3646
+ }, e.prototype.setPrivate = function(e, t, n) {
3647
+ e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = K(e, 16), this.e = parseInt(t, 16), this.d = K(n, 16)) : console.error("Invalid RSA private key");
3648
+ }, e.prototype.setPrivateEx = function(e, t, n, r, i, a, o, s) {
3649
+ e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = K(e, 16), this.e = parseInt(t, 16), this.d = K(n, 16), this.p = K(r, 16), this.q = K(i, 16), this.dmp1 = K(a, 16), this.dmq1 = K(o, 16), this.coeff = K(s, 16)) : console.error("Invalid RSA private key");
3650
+ }, e.prototype.generate = function(e, t) {
3651
+ var n = new Kr(), r = e >> 1;
3652
+ this.e = parseInt(t, 16);
3653
+ for (var i = new W(t, 16);;) {
3654
+ for (; this.p = new W(e - r, 1, n), !(this.p.subtract(W.ONE).gcd(i).compareTo(W.ONE) == 0 && this.p.isProbablePrime(10)););
3655
+ for (; this.q = new W(r, 1, n), !(this.q.subtract(W.ONE).gcd(i).compareTo(W.ONE) == 0 && this.q.isProbablePrime(10)););
3656
+ if (this.p.compareTo(this.q) <= 0) {
3657
+ var a = this.p;
3658
+ this.p = this.q, this.q = a;
3659
+ }
3660
+ var o = this.p.subtract(W.ONE), s = this.q.subtract(W.ONE), c = o.multiply(s);
3661
+ if (c.gcd(i).compareTo(W.ONE) == 0) {
3662
+ this.n = this.p.multiply(this.q), this.d = i.modInverse(c), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(s), this.coeff = this.q.modInverse(this.p);
3663
+ break;
3664
+ }
3665
+ }
3666
+ }, e.prototype.decrypt = function(e) {
3667
+ var t = K(e, 16), n = this.doPrivate(t);
3668
+ return n == null ? null : fi(n, this.n.bitLength() + 7 >> 3);
3669
+ }, e.prototype.generateAsync = function(e, t, n) {
3670
+ var r = new Kr(), i = e >> 1;
3671
+ this.e = parseInt(t, 16);
3672
+ var a = new W(t, 16), o = this, s = function() {
3673
+ var t = function() {
3674
+ if (o.p.compareTo(o.q) <= 0) {
3675
+ var e = o.p;
3676
+ o.p = o.q, o.q = e;
3677
+ }
3678
+ var t = o.p.subtract(W.ONE), r = o.q.subtract(W.ONE), i = t.multiply(r);
3679
+ i.gcd(a).compareTo(W.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(i), o.dmp1 = o.d.mod(t), o.dmq1 = o.d.mod(r), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
3680
+ n();
3681
+ }, 0)) : setTimeout(s, 0);
3682
+ }, c = function() {
3683
+ o.q = G(), o.q.fromNumberAsync(i, 1, r, function() {
3684
+ o.q.subtract(W.ONE).gcda(a, function(e) {
3685
+ e.compareTo(W.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(t, 0) : setTimeout(c, 0);
3686
+ });
3687
+ });
3688
+ }, l = function() {
3689
+ o.p = G(), o.p.fromNumberAsync(e - i, 1, r, function() {
3690
+ o.p.subtract(W.ONE).gcda(a, function(e) {
3691
+ e.compareTo(W.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(l, 0);
3692
+ });
3693
+ });
3694
+ };
3695
+ setTimeout(l, 0);
3696
+ };
3697
+ setTimeout(s, 0);
3698
+ }, e.prototype.sign = function(e, t, n) {
3699
+ var r = mi(n) + t(e).toString(), i = this.n.bitLength() / 4, a = oi(r, i);
3700
+ if (a == null) return null;
3701
+ var o = this.doPrivate(a);
3702
+ if (o == null) return null;
3703
+ for (var s = o.toString(16), c = s.length, l = 0; l < i - c; l++) s = "0" + s;
3704
+ return s;
3705
+ }, e.prototype.verify = function(e, t, n) {
3706
+ var r = K(t, 16), i = this.doPublic(r);
3707
+ return i == null ? null : hi(i.toString(16).replace(/^1f+00/, "")) == n(e).toString();
3708
+ }, e;
3709
+ }();
3710
+ function fi(e, t) {
3711
+ for (var n = e.toByteArray(), r = 0; r < n.length && n[r] == 0;) ++r;
3712
+ if (n.length - r != t - 1 || n[r] != 2) return null;
3713
+ for (++r; n[r] != 0;) if (++r >= n.length) return null;
3714
+ for (var i = ""; ++r < n.length;) {
3715
+ var a = n[r] & 255;
3716
+ a < 128 ? i += String.fromCharCode(a) : a > 191 && a < 224 ? (i += String.fromCharCode((a & 31) << 6 | n[r + 1] & 63), ++r) : (i += String.fromCharCode((a & 15) << 12 | (n[r + 1] & 63) << 6 | n[r + 2] & 63), r += 2);
3717
+ }
3718
+ return i;
3719
+ }
3720
+ var pi = {
3721
+ md2: "3020300c06082a864886f70d020205000410",
3722
+ md5: "3020300c06082a864886f70d020505000410",
3723
+ sha1: "3021300906052b0e03021a05000414",
3724
+ sha224: "302d300d06096086480165030402040500041c",
3725
+ sha256: "3031300d060960864801650304020105000420",
3726
+ sha384: "3041300d060960864801650304020205000430",
3727
+ sha512: "3051300d060960864801650304020305000440",
3728
+ ripemd160: "3021300906052b2403020105000414"
3729
+ };
3730
+ function mi(e) {
3731
+ return pi[e] || "";
3732
+ }
3733
+ function hi(e) {
3734
+ for (var t in pi) if (pi.hasOwnProperty(t)) {
3735
+ var n = pi[t], r = n.length;
3736
+ if (e.substring(0, r) == n) return e.substring(r);
3737
+ }
3738
+ return e;
3739
+ }
3740
+ //#endregion
3741
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js
3742
+ function Z(e, t, n) {
3743
+ if (!t || !e) throw Error("extend failed, please check that all dependencies are included.");
3744
+ var r = function() {};
3745
+ if (r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e, e.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), n) {
3746
+ for (var i in n) e.prototype[i] = n[i];
3747
+ var a = function() {}, o = ["toString", "valueOf"];
3748
+ try {
3749
+ /MSIE/.test(navigator.userAgent) && (a = function(e, t) {
3750
+ for (i = 0; i < o.length; i += 1) {
3751
+ var n = o[i], r = t[n];
3752
+ typeof r == "function" && r != Object.prototype[n] && (e[n] = r);
3753
+ }
3754
+ });
3755
+ } catch {}
3756
+ a(e.prototype, n);
3757
+ }
3758
+ }
3759
+ var Q = {};
3760
+ (Q.asn1 === void 0 || !Q.asn1) && (Q.asn1 = {}), Q.asn1.ASN1Util = new function() {
3761
+ this.integerToByteHex = function(e) {
3762
+ var t = e.toString(16);
3763
+ return t.length % 2 == 1 && (t = "0" + t), t;
3764
+ }, this.bigIntToMinTwosComplementsHex = function(e) {
3765
+ var t = e.toString(16);
3766
+ if (t.substring(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
3767
+ else {
3768
+ var n = t.substring(1).length;
3769
+ n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
3770
+ for (var r = "", i = 0; i < n; i++) r += "f";
3771
+ t = new W(r, 16).xor(e).add(W.ONE).toString(16).replace(/^-/, "");
3772
+ }
3773
+ return t;
3774
+ }, this.getPEMStringFromHex = function(e, t) {
3775
+ return hextopem(e, t);
3776
+ }, this.newObject = function(e) {
3777
+ var t = Q.asn1, n = t.DERBoolean, r = t.DERInteger, i = t.DERBitString, a = t.DEROctetString, o = t.DERNull, s = t.DERObjectIdentifier, c = t.DEREnumerated, l = t.DERUTF8String, u = t.DERNumericString, d = t.DERPrintableString, f = t.DERTeletexString, p = t.DERIA5String, m = t.DERUTCTime, h = t.DERGeneralizedTime, g = t.DERSequence, _ = t.DERSet, v = t.DERTaggedObject, y = t.ASN1Util.newObject, b = Object.keys(e);
3778
+ if (b.length != 1) throw "key of param shall be only one.";
3779
+ var x = b[0];
3780
+ if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + x + ":") == -1) throw "undefined key: " + x;
3781
+ if (x == "bool") return new n(e[x]);
3782
+ if (x == "int") return new r(e[x]);
3783
+ if (x == "bitstr") return new i(e[x]);
3784
+ if (x == "octstr") return new a(e[x]);
3785
+ if (x == "null") return new o(e[x]);
3786
+ if (x == "oid") return new s(e[x]);
3787
+ if (x == "enum") return new c(e[x]);
3788
+ if (x == "utf8str") return new l(e[x]);
3789
+ if (x == "numstr") return new u(e[x]);
3790
+ if (x == "prnstr") return new d(e[x]);
3791
+ if (x == "telstr") return new f(e[x]);
3792
+ if (x == "ia5str") return new p(e[x]);
3793
+ if (x == "utctime") return new m(e[x]);
3794
+ if (x == "gentime") return new h(e[x]);
3795
+ if (x == "seq") {
3796
+ for (var S = e[x], C = [], w = 0; w < S.length; w++) {
3797
+ var T = y(S[w]);
3798
+ C.push(T);
3799
+ }
3800
+ return new g({ array: C });
3801
+ }
3802
+ if (x == "set") {
3803
+ for (var S = e[x], C = [], w = 0; w < S.length; w++) {
3804
+ var T = y(S[w]);
3805
+ C.push(T);
3806
+ }
3807
+ return new _({ array: C });
3808
+ }
3809
+ if (x == "tag") {
3810
+ var E = e[x];
3811
+ if (Object.prototype.toString.call(E) === "[object Array]" && E.length == 3) {
3812
+ var D = y(E[2]);
3813
+ return new v({
3814
+ tag: E[0],
3815
+ explicit: E[1],
3816
+ obj: D
3817
+ });
3818
+ } else {
3819
+ var O = {};
3820
+ if (E.explicit !== void 0 && (O.explicit = E.explicit), E.tag !== void 0 && (O.tag = E.tag), E.obj === void 0) throw "obj shall be specified for 'tag'.";
3821
+ return O.obj = y(E.obj), new v(O);
3822
+ }
3823
+ }
3824
+ }, this.jsonToASN1HEX = function(e) {
3825
+ return this.newObject(e).getEncodedHex();
3826
+ };
3827
+ }(), Q.asn1.ASN1Util.oidHexToInt = function(e) {
3828
+ for (var t = "", n = parseInt(e.substring(0, 2), 16), r = Math.floor(n / 40), i = n % 40, t = r + "." + i, a = "", o = 2; o < e.length; o += 2) {
3829
+ var s = ("00000000" + parseInt(e.substring(o, o + 2), 16).toString(2)).slice(-8);
3830
+ if (a += s.substring(1, 8), s.substring(0, 1) == "0") {
3831
+ var c = new W(a, 2);
3832
+ t = t + "." + c.toString(10), a = "";
3833
+ }
3834
+ }
3835
+ return t;
3836
+ }, Q.asn1.ASN1Util.oidIntToHex = function(e) {
3837
+ var t = function(e) {
3838
+ var t = e.toString(16);
3839
+ return t.length == 1 && (t = "0" + t), t;
3840
+ }, n = function(e) {
3841
+ var n = "", r = new W(e, 10).toString(2), i = 7 - r.length % 7;
3842
+ i == 7 && (i = 0);
3843
+ for (var a = "", o = 0; o < i; o++) a += "0";
3844
+ r = a + r;
3845
+ for (var o = 0; o < r.length - 1; o += 7) {
3846
+ var s = r.substring(o, o + 7);
3847
+ o != r.length - 7 && (s = "1" + s), n += t(parseInt(s, 2));
3848
+ }
3849
+ return n;
3850
+ };
3851
+ if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
3852
+ var r = "", i = e.split("."), a = parseInt(i[0]) * 40 + parseInt(i[1]);
3853
+ r += t(a), i.splice(0, 2);
3854
+ for (var o = 0; o < i.length; o++) r += n(i[o]);
3855
+ return r;
3856
+ }, Q.asn1.ASN1Object = function() {
3857
+ var e = "";
3858
+ this.getLengthHexFromValue = function() {
3859
+ if (this.hV === void 0 || this.hV == null) throw "this.hV is null or undefined.";
3860
+ if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + e.length + ",v=" + this.hV;
3861
+ var t = this.hV.length / 2, n = t.toString(16);
3862
+ if (n.length % 2 == 1 && (n = "0" + n), t < 128) return n;
3863
+ var r = n.length / 2;
3864
+ if (r > 15) throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
3865
+ return (128 + r).toString(16) + n;
3866
+ }, this.getEncodedHex = function() {
3867
+ return (this.hTLV == null || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
3868
+ }, this.getValueHex = function() {
3869
+ return this.getEncodedHex(), this.hV;
3870
+ }, this.getFreshValueHex = function() {
3871
+ return "";
3872
+ };
3873
+ }, Q.asn1.DERAbstractString = function(e) {
3874
+ Q.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
3875
+ return this.s;
3876
+ }, this.setString = function(e) {
3877
+ this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(this.s);
3878
+ }, this.setStringHex = function(e) {
3879
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
3880
+ }, this.getFreshValueHex = function() {
3881
+ return this.hV;
3882
+ }, e !== void 0 && (typeof e == "string" ? this.setString(e) : e.str === void 0 ? e.hex !== void 0 && this.setStringHex(e.hex) : this.setString(e.str));
3883
+ }, Z(Q.asn1.DERAbstractString, Q.asn1.ASN1Object), Q.asn1.DERAbstractTime = function(e) {
3884
+ Q.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
3885
+ return utc = e.getTime() + e.getTimezoneOffset() * 6e4, new Date(utc);
3886
+ }, this.formatDate = function(e, t, n) {
3887
+ var r = this.zeroPadding, i = this.localDateToUTC(e), a = String(i.getFullYear());
3888
+ t == "utc" && (a = a.substring(2, 4));
3889
+ var o = r(String(i.getMonth() + 1), 2), s = r(String(i.getDate()), 2), c = r(String(i.getHours()), 2), l = r(String(i.getMinutes()), 2), u = r(String(i.getSeconds()), 2), d = a + o + s + c + l + u;
3890
+ if (n === !0) {
3891
+ var f = i.getMilliseconds();
3892
+ if (f != 0) {
3893
+ var p = r(String(f), 3);
3894
+ p = p.replace(/[0]+$/, ""), d = d + "." + p;
3895
+ }
3896
+ }
3897
+ return d + "Z";
3898
+ }, this.zeroPadding = function(e, t) {
3899
+ return e.length >= t ? e : Array(t - e.length + 1).join("0") + e;
3900
+ }, this.getString = function() {
3901
+ return this.s;
3902
+ }, this.setString = function(e) {
3903
+ this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(e);
3904
+ }, this.setByDateValue = function(e, t, n, r, i, a) {
3905
+ var o = new Date(Date.UTC(e, t - 1, n, r, i, a, 0));
3906
+ this.setByDate(o);
3907
+ }, this.getFreshValueHex = function() {
3908
+ return this.hV;
3909
+ };
3910
+ }, Z(Q.asn1.DERAbstractTime, Q.asn1.ASN1Object), Q.asn1.DERAbstractStructured = function(e) {
3911
+ Q.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
3912
+ this.hTLV = null, this.isModified = !0, this.asn1Array = e;
3913
+ }, this.appendASN1Object = function(e) {
3914
+ this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
3915
+ }, this.asn1Array = [], e !== void 0 && e.array !== void 0 && (this.asn1Array = e.array);
3916
+ }, Z(Q.asn1.DERAbstractStructured, Q.asn1.ASN1Object), Q.asn1.DERBoolean = function() {
3917
+ Q.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
3918
+ }, Z(Q.asn1.DERBoolean, Q.asn1.ASN1Object), Q.asn1.DERInteger = function(e) {
3919
+ Q.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
3920
+ this.hTLV = null, this.isModified = !0, this.hV = Q.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
3921
+ }, this.setByInteger = function(e) {
3922
+ var t = new W(String(e), 10);
3923
+ this.setByBigInteger(t);
3924
+ }, this.setValueHex = function(e) {
3925
+ this.hV = e;
3926
+ }, this.getFreshValueHex = function() {
3927
+ return this.hV;
3928
+ }, e !== void 0 && (e.bigint === void 0 ? e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int) : this.setByBigInteger(e.bigint));
3929
+ }, Z(Q.asn1.DERInteger, Q.asn1.ASN1Object), Q.asn1.DERBitString = function(e) {
3930
+ e !== void 0 && e.obj !== void 0 && (e.hex = "00" + Q.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), Q.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
3931
+ this.hTLV = null, this.isModified = !0, this.hV = e;
3932
+ }, this.setUnusedBitsAndHexValue = function(e, t) {
3933
+ if (e < 0 || 7 < e) throw "unused bits shall be from 0 to 7: u = " + e;
3934
+ var n = "0" + e;
3935
+ this.hTLV = null, this.isModified = !0, this.hV = n + t;
3936
+ }, this.setByBinaryString = function(e) {
3937
+ e = e.replace(/0+$/, "");
3938
+ var t = 8 - e.length % 8;
3939
+ t == 8 && (t = 0);
3940
+ for (var n = 0; n <= t; n++) e += "0";
3941
+ for (var r = "", n = 0; n < e.length - 1; n += 8) {
3942
+ var i = e.substring(n, n + 8), a = parseInt(i, 2).toString(16);
3943
+ a.length == 1 && (a = "0" + a), r += a;
3944
+ }
3945
+ this.hTLV = null, this.isModified = !0, this.hV = "0" + t + r;
3946
+ }, this.setByBooleanArray = function(e) {
3947
+ for (var t = "", n = 0; n < e.length; n++) e[n] == 1 ? t += "1" : t += "0";
3948
+ this.setByBinaryString(t);
3949
+ }, this.newFalseArray = function(e) {
3950
+ for (var t = Array(e), n = 0; n < e; n++) t[n] = !1;
3951
+ return t;
3952
+ }, this.getFreshValueHex = function() {
3953
+ return this.hV;
3954
+ }, e !== void 0 && (typeof e == "string" && e.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(e) : e.hex === void 0 ? e.bin === void 0 ? e.array !== void 0 && this.setByBooleanArray(e.array) : this.setByBinaryString(e.bin) : this.setHexValueIncludingUnusedBits(e.hex));
3955
+ }, Z(Q.asn1.DERBitString, Q.asn1.ASN1Object), Q.asn1.DEROctetString = function(e) {
3956
+ e !== void 0 && e.obj !== void 0 && (e.hex = Q.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), Q.asn1.DEROctetString.superclass.constructor.call(this, e), this.hT = "04";
3957
+ }, Z(Q.asn1.DEROctetString, Q.asn1.DERAbstractString), Q.asn1.DERNull = function() {
3958
+ Q.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
3959
+ }, Z(Q.asn1.DERNull, Q.asn1.ASN1Object), Q.asn1.DERObjectIdentifier = function(e) {
3960
+ var t = function(e) {
3961
+ var t = e.toString(16);
3962
+ return t.length == 1 && (t = "0" + t), t;
3963
+ }, n = function(e) {
3964
+ var n = "", r = new W(e, 10).toString(2), i = 7 - r.length % 7;
3965
+ i == 7 && (i = 0);
3966
+ for (var a = "", o = 0; o < i; o++) a += "0";
3967
+ r = a + r;
3968
+ for (var o = 0; o < r.length - 1; o += 7) {
3969
+ var s = r.substring(o, o + 7);
3970
+ o != r.length - 7 && (s = "1" + s), n += t(parseInt(s, 2));
3971
+ }
3972
+ return n;
3973
+ };
3974
+ Q.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(e) {
3975
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
3976
+ }, this.setValueOidString = function(e) {
3977
+ if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
3978
+ var r = "", i = e.split("."), a = parseInt(i[0]) * 40 + parseInt(i[1]);
3979
+ r += t(a), i.splice(0, 2);
3980
+ for (var o = 0; o < i.length; o++) r += n(i[o]);
3981
+ this.hTLV = null, this.isModified = !0, this.s = null, this.hV = r;
3982
+ }, this.setValueName = function(e) {
3983
+ var t = Q.asn1.x509.OID.name2oid(e);
3984
+ if (t !== "") this.setValueOidString(t);
3985
+ else throw "DERObjectIdentifier oidName undefined: " + e;
3986
+ }, this.getFreshValueHex = function() {
3987
+ return this.hV;
3988
+ }, e !== void 0 && (typeof e == "string" ? e.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(e) : this.setValueName(e) : e.oid === void 0 ? e.hex === void 0 ? e.name !== void 0 && this.setValueName(e.name) : this.setValueHex(e.hex) : this.setValueOidString(e.oid));
3989
+ }, Z(Q.asn1.DERObjectIdentifier, Q.asn1.ASN1Object), Q.asn1.DEREnumerated = function(e) {
3990
+ Q.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
3991
+ this.hTLV = null, this.isModified = !0, this.hV = Q.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
3992
+ }, this.setByInteger = function(e) {
3993
+ var t = new W(String(e), 10);
3994
+ this.setByBigInteger(t);
3995
+ }, this.setValueHex = function(e) {
3996
+ this.hV = e;
3997
+ }, this.getFreshValueHex = function() {
3998
+ return this.hV;
3999
+ }, e !== void 0 && (e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int));
4000
+ }, Z(Q.asn1.DEREnumerated, Q.asn1.ASN1Object), Q.asn1.DERUTF8String = function(e) {
4001
+ Q.asn1.DERUTF8String.superclass.constructor.call(this, e), this.hT = "0c";
4002
+ }, Z(Q.asn1.DERUTF8String, Q.asn1.DERAbstractString), Q.asn1.DERNumericString = function(e) {
4003
+ Q.asn1.DERNumericString.superclass.constructor.call(this, e), this.hT = "12";
4004
+ }, Z(Q.asn1.DERNumericString, Q.asn1.DERAbstractString), Q.asn1.DERPrintableString = function(e) {
4005
+ Q.asn1.DERPrintableString.superclass.constructor.call(this, e), this.hT = "13";
4006
+ }, Z(Q.asn1.DERPrintableString, Q.asn1.DERAbstractString), Q.asn1.DERTeletexString = function(e) {
4007
+ Q.asn1.DERTeletexString.superclass.constructor.call(this, e), this.hT = "14";
4008
+ }, Z(Q.asn1.DERTeletexString, Q.asn1.DERAbstractString), Q.asn1.DERIA5String = function(e) {
4009
+ Q.asn1.DERIA5String.superclass.constructor.call(this, e), this.hT = "16";
4010
+ }, Z(Q.asn1.DERIA5String, Q.asn1.DERAbstractString), Q.asn1.DERUTCTime = function(e) {
4011
+ Q.asn1.DERUTCTime.superclass.constructor.call(this, e), this.hT = "17", this.setByDate = function(e) {
4012
+ this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
4013
+ }, this.getFreshValueHex = function() {
4014
+ return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
4015
+ }, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{12}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str));
4016
+ }, Z(Q.asn1.DERUTCTime, Q.asn1.DERAbstractTime), Q.asn1.DERGeneralizedTime = function(e) {
4017
+ Q.asn1.DERGeneralizedTime.superclass.constructor.call(this, e), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
4018
+ this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
4019
+ }, this.getFreshValueHex = function() {
4020
+ return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
4021
+ }, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{14}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str), e.millis === !0 && (this.withMillis = !0));
4022
+ }, Z(Q.asn1.DERGeneralizedTime, Q.asn1.DERAbstractTime), Q.asn1.DERSequence = function(e) {
4023
+ Q.asn1.DERSequence.superclass.constructor.call(this, e), this.hT = "30", this.getFreshValueHex = function() {
4024
+ for (var e = "", t = 0; t < this.asn1Array.length; t++) {
4025
+ var n = this.asn1Array[t];
4026
+ e += n.getEncodedHex();
4027
+ }
4028
+ return this.hV = e, this.hV;
4029
+ };
4030
+ }, Z(Q.asn1.DERSequence, Q.asn1.DERAbstractStructured), Q.asn1.DERSet = function(e) {
4031
+ Q.asn1.DERSet.superclass.constructor.call(this, e), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
4032
+ for (var e = [], t = 0; t < this.asn1Array.length; t++) {
4033
+ var n = this.asn1Array[t];
4034
+ e.push(n.getEncodedHex());
4035
+ }
4036
+ return this.sortFlag == 1 && e.sort(), this.hV = e.join(""), this.hV;
4037
+ }, e !== void 0 && e.sortflag !== void 0 && e.sortflag == 0 && (this.sortFlag = !1);
4038
+ }, Z(Q.asn1.DERSet, Q.asn1.DERAbstractStructured), Q.asn1.DERTaggedObject = function(e) {
4039
+ Q.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(e, t, n) {
4040
+ this.hT = t, this.isExplicit = e, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, t), this.isModified = !1);
4041
+ }, this.getFreshValueHex = function() {
4042
+ return this.hV;
4043
+ }, e !== void 0 && (e.tag !== void 0 && (this.hT = e.tag), e.explicit !== void 0 && (this.isExplicit = e.explicit), e.obj !== void 0 && (this.asn1Object = e.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
4044
+ }, Z(Q.asn1.DERTaggedObject, Q.asn1.ASN1Object);
4045
+ //#endregion
4046
+ //#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/JSEncryptRSAKey.js
4047
+ var gi = (function() {
4048
+ var e = function(t, n) {
4049
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
4050
+ e.__proto__ = t;
4051
+ } || function(e, t) {
4052
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
4053
+ }, e(t, n);
4054
+ };
4055
+ return function(t, n) {
4056
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
4057
+ e(t, n);
4058
+ function r() {
4059
+ this.constructor = t;
4060
+ }
4061
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
4062
+ };
4063
+ })(), _i = function(e) {
4064
+ gi(t, e);
4065
+ function t(n) {
4066
+ var r = e.call(this) || this;
4067
+ return n && (typeof n == "string" ? r.parseKey(n) : (t.hasPrivateKeyProperty(n) || t.hasPublicKeyProperty(n)) && r.parsePropertiesFrom(n)), r;
4068
+ }
4069
+ return t.prototype.parseKey = function(e) {
4070
+ try {
4071
+ var t = 0, n = 0, r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ? dr.decode(e) : pr.unarmor(e), i = xr.decode(r);
4072
+ if (i.sub.length === 3 && (i = i.sub[2].sub[0]), i.sub.length === 9) {
4073
+ t = i.sub[1].getHexStringValue(), this.n = K(t, 16), n = i.sub[2].getHexStringValue(), this.e = parseInt(n, 16);
4074
+ var a = i.sub[3].getHexStringValue();
4075
+ this.d = K(a, 16);
4076
+ var o = i.sub[4].getHexStringValue();
4077
+ this.p = K(o, 16);
4078
+ var s = i.sub[5].getHexStringValue();
4079
+ this.q = K(s, 16);
4080
+ var c = i.sub[6].getHexStringValue();
4081
+ this.dmp1 = K(c, 16);
4082
+ var l = i.sub[7].getHexStringValue();
4083
+ this.dmq1 = K(l, 16);
4084
+ var u = i.sub[8].getHexStringValue();
4085
+ this.coeff = K(u, 16);
4086
+ } else if (i.sub.length === 2) if (i.sub[0].sub) {
4087
+ var d = i.sub[1].sub[0];
4088
+ t = d.sub[0].getHexStringValue(), this.n = K(t, 16), n = d.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
4089
+ } else t = i.sub[0].getHexStringValue(), this.n = K(t, 16), n = i.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
4090
+ else return !1;
4091
+ return !0;
4092
+ } catch {
4093
+ return !1;
4094
+ }
4095
+ }, t.prototype.getPrivateBaseKey = function() {
4096
+ var e = { array: [
4097
+ new Q.asn1.DERInteger({ int: 0 }),
4098
+ new Q.asn1.DERInteger({ bigint: this.n }),
4099
+ new Q.asn1.DERInteger({ int: this.e }),
4100
+ new Q.asn1.DERInteger({ bigint: this.d }),
4101
+ new Q.asn1.DERInteger({ bigint: this.p }),
4102
+ new Q.asn1.DERInteger({ bigint: this.q }),
4103
+ new Q.asn1.DERInteger({ bigint: this.dmp1 }),
4104
+ new Q.asn1.DERInteger({ bigint: this.dmq1 }),
4105
+ new Q.asn1.DERInteger({ bigint: this.coeff })
4106
+ ] };
4107
+ return new Q.asn1.DERSequence(e).getEncodedHex();
4108
+ }, t.prototype.getPrivateBaseKeyB64 = function() {
4109
+ return cr(this.getPrivateBaseKey());
4110
+ }, t.prototype.getPublicBaseKey = function() {
4111
+ var e = new Q.asn1.DERSequence({ array: [new Q.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }), new Q.asn1.DERNull()] }), t = new Q.asn1.DERSequence({ array: [new Q.asn1.DERInteger({ bigint: this.n }), new Q.asn1.DERInteger({ int: this.e })] }), n = new Q.asn1.DERBitString({ hex: "00" + t.getEncodedHex() });
4112
+ return new Q.asn1.DERSequence({ array: [e, n] }).getEncodedHex();
4113
+ }, t.prototype.getPublicBaseKeyB64 = function() {
4114
+ return cr(this.getPublicBaseKey());
4115
+ }, t.wordwrap = function(e, t) {
4116
+ if (t ||= 64, !e) return e;
4117
+ var n = "(.{1," + t + "})( +|$\n?)|(.{1," + t + "})";
4118
+ return e.match(RegExp(n, "g")).join("\n");
4119
+ }, t.prototype.getPrivateKey = function() {
4120
+ var e = "-----BEGIN RSA PRIVATE KEY-----\n";
4121
+ return e += t.wordwrap(this.getPrivateBaseKeyB64()) + "\n", e += "-----END RSA PRIVATE KEY-----", e;
4122
+ }, t.prototype.getPublicKey = function() {
4123
+ var e = "-----BEGIN PUBLIC KEY-----\n";
4124
+ return e += t.wordwrap(this.getPublicBaseKeyB64()) + "\n", e += "-----END PUBLIC KEY-----", e;
4125
+ }, t.hasPublicKeyProperty = function(e) {
4126
+ return e ||= {}, e.hasOwnProperty("n") && e.hasOwnProperty("e");
4127
+ }, t.hasPrivateKeyProperty = function(e) {
4128
+ return e ||= {}, e.hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff");
4129
+ }, t.prototype.parsePropertiesFrom = function(e) {
4130
+ this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
4131
+ }, t;
4132
+ }(di), vi = typeof process < "u" ? process.env?.npm_package_version : void 0, yi = function() {
4133
+ function e(e) {
4134
+ e === void 0 && (e = {}), this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key = e.key || null;
4135
+ }
4136
+ return e.prototype.setKey = function(e) {
4137
+ e ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new _i(e)) : !this.key && this.log && console.error("A key was not set.");
4138
+ }, e.prototype.setPrivateKey = function(e) {
4139
+ this.setKey(e);
4140
+ }, e.prototype.setPublicKey = function(e) {
4141
+ this.setKey(e);
4142
+ }, e.prototype.decrypt = function(e) {
4143
+ try {
4144
+ return this.getKey().decrypt(lr(e));
4145
+ } catch {
4146
+ return !1;
4147
+ }
4148
+ }, e.prototype.encrypt = function(e) {
4149
+ try {
4150
+ return cr(this.getKey().encrypt(e));
4151
+ } catch {
4152
+ return !1;
4153
+ }
4154
+ }, e.prototype.encryptOAEP = function(e) {
4155
+ try {
4156
+ return cr(this.getKey().encrypt(e, ui));
4157
+ } catch {
4158
+ return !1;
4159
+ }
4160
+ }, e.prototype.sign = function(e, t, n) {
4161
+ t === void 0 && (t = function(e) {
4162
+ return e;
4163
+ }), n === void 0 && (n = "");
4164
+ try {
4165
+ return cr(this.getKey().sign(e, t, n));
4166
+ } catch {
4167
+ return !1;
4168
+ }
4169
+ }, e.prototype.signSha256 = function(e) {
4170
+ return this.sign(e, function(e) {
4171
+ return Jr(qr(e));
4172
+ }, "sha256");
4173
+ }, e.prototype.verify = function(e, t, n) {
4174
+ n === void 0 && (n = function(e) {
4175
+ return e;
4176
+ });
4177
+ try {
4178
+ return this.getKey().verify(e, lr(t), n);
4179
+ } catch {
4180
+ return !1;
4181
+ }
4182
+ }, e.prototype.verifySha256 = function(e, t) {
4183
+ return this.verify(e, t, function(e) {
4184
+ return Jr(qr(e));
4185
+ });
4186
+ }, e.prototype.getKey = function(e) {
4187
+ if (!this.key) {
4188
+ if (this.key = new _i(), e && {}.toString.call(e) === "[object Function]") {
4189
+ this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
4190
+ return;
4191
+ }
4192
+ this.key.generate(this.default_key_size, this.default_public_exponent);
4193
+ }
4194
+ return this.key;
4195
+ }, e.prototype.getPrivateKey = function() {
4196
+ return this.getKey().getPrivateKey();
4197
+ }, e.prototype.getPrivateKeyB64 = function() {
4198
+ return this.getKey().getPrivateBaseKeyB64();
4199
+ }, e.prototype.getPublicKey = function() {
4200
+ return this.getKey().getPublicKey();
4201
+ }, e.prototype.getPublicKeyB64 = function() {
4202
+ return this.getKey().getPublicBaseKeyB64();
4203
+ }, e.version = vi, e;
4204
+ }(), bi = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApmTqXPG9vBsvUS2cmzdboGWL3vnqBlQ6PNdz8y5UxHe7lH8PyyZaquyNDS4BG00g8Yo1jF2I5Kg8jDd6+KLggKCL9xQSQUouU5nU3XAPnyCHS05oi6h7zaH7pP97DcovNsW5sEblncsMm0Xu9AcNHszIlSiX9fDJqi+bIyELyPWCw4QDmPToB+DsrVXxmUqPKxkjqb4yFghWDZY7nNVK28ra8i9KFj9segH4ujGymCorNPY8f8nEIe2+oxrb+dXGv5xmaBfwi/q7EEyMdzTkSDgUnExnkIhJ+Ki43u9cFFMU94noIsOzmFWJ78JAkiG+I9dE2c0XZx4Asm+tBgw+oQIDAQAB";
4205
+ (class e {
4206
+ static instance;
4207
+ encryptor;
4208
+ constructor() {
4209
+ this.encryptor = new yi(), this.encryptor.setPublicKey(bi);
4210
+ }
4211
+ static getInstance() {
4212
+ return e.instance ||= new e(), e.instance;
4213
+ }
4214
+ encrypt(e) {
4215
+ let t = this.encryptor.encrypt(e);
4216
+ if (!t) throw Error(`RSA 加密失败,数据: ${e.substring(0, 20)}...`);
4217
+ return t;
4218
+ }
4219
+ }).getInstance();
4220
+ function xi(e) {
4221
+ try {
4222
+ if (!e) return console.warn("Token 为空"), null;
4223
+ let t = e.split(".");
4224
+ if (t.length !== 3) return console.warn("Token 格式无效:不是有效的 JWT"), null;
4225
+ let n = t[1];
4226
+ if (!n) return console.warn("Token 格式无效:缺少 payload"), null;
4227
+ let r = n.replace(/-/g, "+").replace(/_/g, "/"), i = atob(r), a = decodeURIComponent(i.split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join(""));
4228
+ return JSON.parse(a);
4229
+ } catch (e) {
4230
+ return console.error("Token 解析失败:", e), null;
4231
+ }
4232
+ }
4233
+ //#endregion
4234
+ //#region src/hooks/useUser.ts
4235
+ function Si() {
4236
+ let e = localStorage.getItem("TOKEN"), t = C(xi(e) || {});
4237
+ function n() {
4238
+ return xi(e);
4239
+ }
4240
+ return {
4241
+ userInfo: t,
4242
+ getUserInfo: n
4243
+ };
4244
+ }
4245
+ //#endregion
4246
+ //#region src/hooks/index.ts
4247
+ var Ci = /* @__PURE__ */ L({
4248
+ useDictionary: () => Qn,
4249
+ useFetch: () => Vn,
4250
+ useRoute: () => Yn,
4251
+ useRouter: () => Xn,
4252
+ useTable: () => Wn,
4253
+ useUser: () => Si
4254
+ });
4255
+ //#endregion
4256
+ //#region src/components/YcApproval/useDetail.ts
4257
+ function wi(e) {
4258
+ return Bn.post("/process/operateProcess", e);
4259
+ }
4260
+ function Ti(e) {
4261
+ let n = Yn(), { userInfo: r } = Si(), i = T(), a = T(), o = T({}), s = T(!1), c = C({
4262
+ code: "",
4263
+ confirmVisible: !1,
4264
+ nextAssigneeVisible: !1,
4265
+ nextActivityVisible: !1,
4266
+ buttonList: [],
4267
+ currentHandlers: "",
4268
+ current: r.account,
4269
+ activityName: ""
4270
+ }), l = C({
4271
+ processInfo: {
4272
+ processId: "",
4273
+ processTitle: "",
4274
+ createdBy: "",
4275
+ createdByName: "",
4276
+ activityName: "",
4277
+ creationDate: "",
4278
+ assignee: "",
4279
+ assigneeName: "",
4280
+ processCode: e?.processCode,
4281
+ processVersion: void 0,
4282
+ activityId: "",
4283
+ activityCode: ""
4284
+ },
4285
+ processData: {
4286
+ attachment: "",
4287
+ direction: "",
4288
+ readScope: "",
4289
+ signScope: ""
4290
+ },
4291
+ action: "",
4292
+ businessData: {},
4293
+ historyList: [],
4294
+ nextAssignee: "",
4295
+ nextActivity: "",
4296
+ comments: ""
4297
+ }), u = t(() => [
4298
+ {
4299
+ label: "流程主题",
4300
+ prop: "processTitle",
4301
+ span: 12,
4302
+ required: !s.value,
4303
+ render: ({ h: e, data: t }) => s.value ? t?.processTitle || "" : e.input()
4304
+ },
4305
+ {
4306
+ label: "创建者",
4307
+ prop: "createdByName",
4308
+ span: 12,
4309
+ render: ({ data: e }) => e?.createdByName || ""
4310
+ },
4311
+ {
4312
+ label: "创建时间",
4313
+ prop: "creationDate",
4314
+ span: 12,
4315
+ render: ({ data: e }) => e?.creationDate || ""
4316
+ },
4317
+ {
4318
+ label: "当前环节",
4319
+ prop: "activityName",
4320
+ span: 12,
4321
+ render: ({ h: e, data: t }) => e.link({ prop: t?.activityName })
4322
+ },
4323
+ {
4324
+ label: "当前处理人",
4325
+ prop: "assigneeName",
4326
+ span: 12,
4327
+ render: ({ data: e }) => e?.assigneeName || ""
4328
+ }
4329
+ ]);
4330
+ Vn("/process/queryProcessDetail", {
4331
+ defaultParams: {
4332
+ processCode: e.processCode,
4333
+ instanceId: n.query?.instanceId || ""
4334
+ },
4335
+ onSuccess: (e) => {
4336
+ let t = e.data || {};
4337
+ Object.assign(l, t), c.buttonList = t.buttonList || [];
4338
+ let n = ["ACT_START", "ACT_DRAFT"], i = n.includes(t?.processInfo?.activityCode) ? r.account : (t?.instanceHandlerList || [])?.find((e) => e.activityName === t.processInfo?.activityName)?.assignee, a = n.includes(t?.processInfo?.activityCode) && i?.includes(r.account);
4339
+ s.value = !a, sessionStorage.setItem("disabled", (!a).toString()), sessionStorage.setItem("activityCode", t?.processInfo?.activityCode);
4340
+ try {
4341
+ l.processData = t.processData ? JSON.parse(t.processData) : {}, l.businessData = Array.isArray(t?.businessData) ? t.businessData?.at(-1) : t?.businessData || {};
4342
+ } catch (e) {
4343
+ console.log("queryProcessDetail error ->>>", e);
4344
+ }
4345
+ }
4346
+ });
4347
+ let d = t(() => {
4348
+ let e = [];
4349
+ if (c.nextActivityVisible) {
4350
+ let t = o.value?.getValues();
4351
+ if (!t?.length) return;
4352
+ let n = t.findIndex((e) => e.activityCode === l.processInfo?.activityCode);
4353
+ e = t.slice(0, n).map((e) => ({
4354
+ label: e.activityName || "",
4355
+ value: e.activityId || ""
4356
+ }));
4357
+ }
4358
+ return [
4359
+ c.nextAssigneeVisible && {
4360
+ prop: "nextAssignee",
4361
+ label: "处理人",
4362
+ render: ({ h: e }) => e.staffSelect({ multiple: !0 })
4363
+ },
4364
+ c.nextActivityVisible && {
4365
+ prop: "nextActivity",
4366
+ label: "退回环节",
4367
+ render: ({ h: t }) => t.radio({
4368
+ multiple: !0,
4369
+ options: e
4370
+ })
4371
+ },
4372
+ {
4373
+ prop: "comments",
4374
+ label: "审批意见",
4375
+ render: ({ h: e }) => e.textarea({ rows: 4 })
4376
+ }
4377
+ ].filter(Boolean);
4378
+ });
4379
+ async function f() {
4380
+ if (!a.value || !i.value || !o.value) return;
4381
+ let t = await i.value?.validate(), n = await o.value?.validate(), r = await e?.getData?.() || {};
4382
+ if (t || n || !r || !Object.keys(r).length) return z.Message.error("请完善信息");
4383
+ Object.assign(l.processInfo, i.value.getValues() || {}), l.instanceHandlerList = o.value.getValues(), l.processData.readScope = a.value?.formData?.readScope || [];
4384
+ let s = await wi({
4385
+ processInfo: { ...N(l.processInfo) },
4386
+ processData: JSON.stringify(l.processData),
4387
+ instanceHandlerList: l.instanceHandlerList,
4388
+ businessData: r,
4389
+ action: c.code,
4390
+ comments: l.comments,
4391
+ nextAssignee: c.nextAssigneeVisible ? l.nextAssignee : void 0,
4392
+ nextActivity: c.nextActivityVisible ? l.nextActivity : void 0
4393
+ });
4394
+ s.code === "ok" && s.data ? (z.Message.success("提交成功, 即将关闭页面..."), setTimeout(() => window.close(), 2e3)) : z.Message.error(s?.message || "提交失败");
4395
+ }
4396
+ async function p(e) {
4397
+ c.code = e, c.nextActivityVisible = e === "back", c.nextAssigneeVisible = ["forward", "reassign"].includes(e), c.confirmVisible = ![
4398
+ "withdraw",
4399
+ "draft",
4400
+ "save"
4401
+ ].includes(e), c.confirmVisible || await f();
4402
+ }
4403
+ async function m(e) {
4404
+ l.comments = e.comments, l.nextAssignee = ((Array.isArray(e.nextAssignee) ? e.nextAssignee?.join(",") : e.nextAssignee)?.match(/\(([^)]+)\)/g)?.map((e) => e.slice(1, -1)) || []).join(","), l.nextActivity = e.nextActivity, c.confirmVisible = !1, await f();
4405
+ }
4406
+ return {
4407
+ processInfoRef: i,
4408
+ readScopeRef: a,
4409
+ remindRef: o,
4410
+ disabled: s,
4411
+ states: c,
4412
+ confirmFields: d,
4413
+ formData: l,
4414
+ baseFields: u,
4415
+ buttonClick: p,
4416
+ onConfirmSubmit: m
4417
+ };
4418
+ }
4419
+ //#endregion
4420
+ //#region src/components/YcApproval/useBtnActive.ts
4421
+ function Ei({ processCode: e }) {
4422
+ let n = localStorage.getItem("TOkEN"), r = Qn({
4423
+ code: "ApprovalButtonActive",
4424
+ pageSize: 100
4425
+ }), i = t(() => {
4426
+ let e = /* @__PURE__ */ new Map();
4427
+ return r.data?.forEach((t) => {
4428
+ e.set(t.code, [t.name, t.description || "default"]);
4429
+ }), e;
4430
+ });
4431
+ function a() {
4432
+ let t = `/intellicit-service/#/flowchart?processCode=${e}&instanceId=&token=${n}`;
4433
+ window.open(t);
4434
+ }
4435
+ return {
4436
+ btnActiveMaps: i,
4437
+ toFlowchart: a
4438
+ };
4439
+ }
4440
+ //#endregion
4441
+ //#region src/components/YcApproval/Remind.vue?vue&type=script&setup=true&lang.ts
4442
+ var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
4443
+ __name: "Remind",
4444
+ props: {
4445
+ disabled: { type: Boolean },
4446
+ formData: {}
4447
+ },
4448
+ setup(e, { expose: r }) {
4449
+ let s = o(e, ["formData"]), { userInfo: u } = Si(), d = T([]), f = T([]);
4450
+ Vn("/process/queryProcessActivity", {
4451
+ defaultParams: t(() => ({ processId: e.formData?.processInfo?.processId })),
4452
+ ready: t(() => !!e.formData?.processInfo?.processId && e.formData?.processInfo?.activityCode === "ACT_START"),
4453
+ onSuccess: (t) => {
4454
+ e.formData?.instanceHandlerList && e.formData?.instanceHandlerList.length > 0 || (d.value = (t?.data || []).filter((e) => e.code !== "ACT_END").map((e) => e.code === "ACT_START" ? {
4455
+ activityCode: e.code,
4456
+ activityId: e.id,
4457
+ code: e.code,
4458
+ activityName: e.name,
4459
+ assigneeName: `${u.name}(${u.account})`
4460
+ } : {
4461
+ activityCode: e.code,
4462
+ activityId: e.id,
4463
+ code: e.code,
4464
+ activityName: e.name
4465
+ }));
4466
+ }
4467
+ }), ae(() => {
4468
+ d.value = (e.formData?.instanceHandlerList || []).map((e, t) => {
4469
+ if (t === 0) return {
4470
+ ...e,
4471
+ assigneeName: e?.assignee ? `${e.assigneeName}(${e.assignee})` : ""
4472
+ };
4473
+ let n = e.assigneeName?.split(","), r = e?.assignee?.split(","), i = n?.map((e, t) => `${e}(${r?.[t]})`);
4474
+ return {
4475
+ ...e,
4476
+ assigneeName: i
4477
+ };
4478
+ });
4479
+ });
4480
+ function p() {
4481
+ let e = !1;
4482
+ return f.value?.forEach((t, n) => {
4483
+ e = t?.validate();
4484
+ }), e;
4485
+ }
4486
+ function m() {
4487
+ return d.value.map((e, t) => {
4488
+ let n = e?.assigneeName;
4489
+ if (t === 0) {
4490
+ let t = n?.includes("(") ? n?.slice(0, n?.indexOf("(")) : n, r = n.slice(n.indexOf("(") + 1, -1);
4491
+ return {
4492
+ ...e,
4493
+ assignee: r,
4494
+ assigneeName: t
4495
+ };
4496
+ }
4497
+ let r = (n || [])?.reduce((e, t) => {
4498
+ let n = t?.includes("(") ? t?.slice(0, t?.indexOf("(")) : t, r = t.slice(t.indexOf("(") + 1, -1);
4499
+ return e.name.push(n), e.account.push(r), e;
4500
+ }, {
4501
+ name: [],
4502
+ account: []
4503
+ });
4504
+ return {
4505
+ ...e,
4506
+ assignee: r.account?.join(","),
4507
+ assigneeName: r.name?.join(",")
4508
+ };
4509
+ });
4510
+ }
4511
+ return r({
4512
+ getValues: m,
4513
+ validate: p
4514
+ }), (e, t) => {
4515
+ let r = O("el-table-column"), o = O("YcStaffSelect"), u = O("el-table"), p = O("yc-card");
4516
+ return S(), n(p, {
4517
+ icon: P(Ct),
4518
+ title: "流程提醒",
4519
+ hideBorder: !0,
4520
+ class: "mt-3"
4521
+ }, {
4522
+ default: I(() => [l(u, { data: d.value }, {
4523
+ default: I(() => [
4524
+ l(r, {
4525
+ label: "序号",
4526
+ type: "index",
4527
+ width: "60"
4528
+ }),
4529
+ l(r, {
4530
+ label: "流程环节",
4531
+ prop: "activityName"
4532
+ }),
4533
+ l(r, { prop: "assigneeName" }, {
4534
+ header: I(() => [...t[0] ||= [c("处理人 ", -1), a("span", { style: { color: "red" } }, "*", -1)]]),
4535
+ default: I(({ row: e, $index: t }) => [t === 0 ? (S(), i("span", Di, M(e.assigneeName), 1)) : (S(), n(o, {
4536
+ key: 1,
4537
+ ref: (e) => f.value[t] = e,
4538
+ modelValue: e.assigneeName,
4539
+ "onUpdate:modelValue": (t) => e.assigneeName = t,
4540
+ type: "dialog",
4541
+ valueOf: "all",
4542
+ disabled: s.disabled,
4543
+ required: ""
4544
+ }, null, 8, [
4545
+ "modelValue",
4546
+ "onUpdate:modelValue",
4547
+ "disabled"
4548
+ ]))]),
4549
+ _: 1
4550
+ })
4551
+ ]),
4552
+ _: 1
4553
+ }, 8, ["data"])]),
4554
+ _: 1
4555
+ }, 8, ["icon"]);
4556
+ };
4557
+ }
4558
+ }), ki = /* @__PURE__ */ u({
4559
+ __name: "ReadScope",
4560
+ props: {
4561
+ disabled: { type: Boolean },
4562
+ formData: {}
4563
+ },
4564
+ setup(e, { expose: t }) {
4565
+ let r = e, i = C({ readScope: "" });
4566
+ return ae(() => {
4567
+ i.readScope = r.formData?.processData?.readScope || [];
4568
+ }), t({ formData: i }), (e, t) => {
4569
+ let a = O("YcStaffSelect"), o = O("el-form-item"), s = O("el-form"), c = O("yc-card");
4570
+ return S(), n(c, {
4571
+ icon: P(Ue),
4572
+ title: "阅读范围",
4573
+ hideBorder: !0,
4574
+ class: "mt-3"
4575
+ }, {
4576
+ default: I(() => [l(s, {
4577
+ model: i,
4578
+ "label-width": "100px",
4579
+ "label-position": "left"
4580
+ }, {
4581
+ default: I(() => [l(o, {
4582
+ label: "阅读范围",
4583
+ prop: "readScope"
4584
+ }, {
4585
+ default: I(() => [l(a, {
4586
+ modelValue: i.readScope,
4587
+ "onUpdate:modelValue": t[0] ||= (e) => i.readScope = e,
4588
+ type: "dialog",
4589
+ disabled: r.disabled
4590
+ }, null, 8, ["modelValue", "disabled"])]),
4591
+ _: 1
4592
+ })]),
4593
+ _: 1
4594
+ }, 8, ["model"])]),
4595
+ _: 1
4596
+ }, 8, ["icon"]);
4597
+ };
4598
+ }
4599
+ }), Ai = /* @__PURE__ */ u({
4600
+ __name: "History",
4601
+ props: { formData: {} },
4602
+ setup(e) {
4603
+ let t = e, r = [
4604
+ {
4605
+ label: "审批环节",
4606
+ prop: "activityName",
4607
+ width: 120
4608
+ },
4609
+ {
4610
+ label: "审批人",
4611
+ prop: "allAssigneeName"
4612
+ },
4613
+ {
4614
+ label: "审批时间",
4615
+ prop: "creationDate",
4616
+ width: 180
4617
+ },
4618
+ {
4619
+ label: "操作",
4620
+ prop: "actionName",
4621
+ width: 120
4622
+ },
4623
+ {
4624
+ label: "意见",
4625
+ prop: "comments"
4626
+ }
4627
+ ];
4628
+ return (e, i) => {
4629
+ let a = O("yc-table"), o = O("yc-card");
4630
+ return S(), n(o, {
4631
+ icon: P(yt),
4632
+ title: "审批历史",
4633
+ hideBorder: !0,
4634
+ class: "mt-3"
4635
+ }, {
4636
+ default: I(() => [l(a, {
4637
+ data: t?.formData?.historyList,
4638
+ columns: r,
4639
+ hidePagination: !0
4640
+ }, null, 8, ["data"])]),
4641
+ _: 1
4642
+ }, 8, ["icon"]);
4643
+ };
4644
+ }
4645
+ }), ji = { class: "mb-3 fixed-buttons" }, Mi = { key: 0 }, Ni = /* @__PURE__ */ u({
4646
+ __name: "index",
4647
+ props: {
4648
+ processCode: {},
4649
+ getData: { type: Function }
4650
+ },
4651
+ setup(t) {
4652
+ let o = t, s = o.processCode || Yn().params.processCode, u = {
4653
+ IntegratedApprovalProcess: "手工构建流程",
4654
+ SoftwareReleaseProcess: "软件释放流程"
4655
+ }, { btnActiveMaps: d, toFlowchart: f } = Ei({ processCode: s }), { processInfoRef: p, readScopeRef: m, remindRef: h, disabled: g, formData: _, states: v, confirmFields: y, baseFields: b, buttonClick: x, onConfirmSubmit: C } = Ti(o);
4656
+ return (t, o) => {
4657
+ let w = O("el-button"), T = O("yc-form"), k = O("yc-card"), A = O("el-card"), j = O("el-dialog"), te = ee("sticky");
4658
+ return S(), i(e, null, [l(A, { class: "ml-30 mr-30" }, {
4659
+ default: I(() => [
4660
+ oe((S(), i("div", ji, [P(v).buttonList.length ? (S(), i("div", Mi, [(S(!0), i(e, null, E(P(v).buttonList, (e) => (S(), n(w, {
4661
+ key: e.code,
4662
+ type: P(d)?.get(e.code)?.[1] || "default",
4663
+ onClick: (t) => P(x)(e.code)
4664
+ }, {
4665
+ default: I(() => [c(M(e.name), 1)]),
4666
+ _: 2
4667
+ }, 1032, ["type", "onClick"]))), 128)), l(w, {
4668
+ icon: P(ht),
4669
+ onClick: P(f)
4670
+ }, {
4671
+ default: I(() => [...o[1] ||= [c("流程图", -1)]]),
4672
+ _: 1
4673
+ }, 8, ["icon", "onClick"])])) : r("", !0), a("h3", null, M(u[P(s)]), 1)])), [[te]]),
4674
+ l(k, {
4675
+ icon: P(dt),
4676
+ title: "基本信息",
4677
+ class: "mt-4 mb-3",
4678
+ hideBorder: !0
4679
+ }, {
4680
+ default: I(() => [l(T, {
4681
+ ref_key: "processInfoRef",
4682
+ ref: p,
4683
+ model: P(_)?.processInfo,
4684
+ fields: P(b),
4685
+ hideHandle: !0,
4686
+ labelPosition: "left",
4687
+ valueModel: "underline"
4688
+ }, null, 8, ["model", "fields"])]),
4689
+ _: 1
4690
+ }, 8, ["icon"]),
4691
+ D(t.$slots, "default", { data: P(_)?.businessData }, void 0, !0),
4692
+ l(Oi, {
4693
+ ref_key: "remindRef",
4694
+ ref: h,
4695
+ "form-data": P(_),
4696
+ disabled: P(g)
4697
+ }, null, 8, ["form-data", "disabled"]),
4698
+ l(ki, {
4699
+ ref_key: "readScopeRef",
4700
+ ref: m,
4701
+ "form-data": P(_),
4702
+ disabled: P(g)
4703
+ }, null, 8, ["form-data", "disabled"]),
4704
+ l(Ai, {
4705
+ "form-data": P(_),
4706
+ disabled: P(g)
4707
+ }, null, 8, ["form-data", "disabled"])
4708
+ ]),
4709
+ _: 3
4710
+ }), l(j, {
4711
+ modelValue: P(v).confirmVisible,
4712
+ "onUpdate:modelValue": o[0] ||= (e) => P(v).confirmVisible = e,
4713
+ "destroy-on-close": "",
4714
+ "close-on-click-modal": !1
4715
+ }, {
4716
+ default: I(() => [l(T, {
4717
+ fields: P(y),
4718
+ onSubmit: P(C)
4719
+ }, null, 8, ["fields", "onSubmit"])]),
4720
+ _: 1
4721
+ }, 8, ["modelValue"])], 64);
4722
+ };
4723
+ }
4724
+ }), Pi = /* @__PURE__ */ L({ default: () => Fi }), Fi = /* @__PURE__ */ R(Ni, [["__scopeId", "data-v-c1d084f4"]]), Ii = {
4725
+ mounted(e, t) {
4726
+ let n = t.value || {}, r = n.target || "body", i = n.top || 0;
4727
+ e._stickyOriginalStyles = {
4728
+ position: e.style.position || "",
4729
+ top: e.style.top || "",
4730
+ zIndex: e.style.zIndex || "",
4731
+ width: e.style.width || ""
4732
+ }, e._stickyConfig = {
4733
+ target: typeof r == "string" ? document.querySelector(r) || document.body : r,
4734
+ top: i
4735
+ }, e._stickyOffsetTop = e.offsetTop, e._stickyScrollListener = () => {
4736
+ (window.pageYOffset || document.documentElement.scrollTop) >= e._stickyOffsetTop - e._stickyConfig.top ? (e.style.position = "fixed", e.style.top = `${e._stickyConfig.top}px`, e.style.zIndex = "100", e.style.width = `${e.offsetWidth}px`) : (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
4737
+ }, window.addEventListener("scroll", e._stickyScrollListener, { passive: !0 }), e._stickyScrollListener();
4738
+ },
4739
+ updated(e, t) {
4740
+ let n = t.value || {}, r = n.target || "body", i = n.top || 0;
4741
+ e._stickyConfig = {
4742
+ target: typeof r == "string" ? document.querySelector(r) || document.body : r,
4743
+ top: i
4744
+ }, e._stickyOffsetTop = e.offsetTop, e._stickyScrollListener();
4745
+ },
4746
+ unmounted(e) {
4747
+ e._stickyScrollListener && window.removeEventListener("scroll", e._stickyScrollListener), e._stickyOriginalStyles && (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
4748
+ }
4749
+ }, Li = { mounted(e) {
4750
+ e.style.boxShadow = "0px 0px 12px rgba(0, 0, 0, 0.12)", e.style.padding = "20px", e.style.borderRadius = "4px", e.style.border = "1px solid #e4e7ed", e.style.backgroundColor = "#fff";
4751
+ } }, Ri = /* @__PURE__ */ L({
4752
+ card: () => Li,
4753
+ sticky: () => Ii
4754
+ }), zi = "Yc", Bi = {
4755
+ UiCard: pe,
4756
+ UiTable: Pe,
4757
+ UiFilter: At,
4758
+ UiForm: It,
4759
+ UiEditor: Bt,
4760
+ UiTree: Yt,
4761
+ UiInfiniteScroll: rn,
4762
+ UiDescriptions: ln,
4763
+ UiDialog: pn,
4764
+ UiStaffSelect: On,
4765
+ UiUpload: Pn
4766
+ }, Vi = null;
4767
+ function Hi(e) {
4768
+ Vi = e;
4769
+ }
4770
+ function $() {
4771
+ return Vi;
4772
+ }
4773
+ var Ui = { install(e, t) {
4774
+ t?.elementPlus && t.elementPlus.install(e), Vi ||= {
4775
+ ...e,
4776
+ h: f
4777
+ };
4778
+ for (let [t, n] of Object.entries(Bi)) {
4779
+ let r = n?.default || n;
4780
+ if (r && (typeof r == "function" || typeof r == "object")) {
4781
+ let n = t.replace(/^Ui/, zi);
4782
+ e.component(n, r);
4783
+ let i = n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
4784
+ i !== n && e.component(i, r);
4785
+ }
4786
+ }
4787
+ for (let [t, n] of Object.entries(wt)) e.component(t, n), e.component(t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n);
4788
+ for (let [t, n] of Object.entries(Ri)) (typeof n == "function" || typeof n == "object") && e.directive(t, n);
4789
+ } };
4790
+ //#endregion
4791
+ export { pe as S, Yt as _, Ci as a, At as b, Yn as c, Vn as d, Pn as f, rn as g, ln as h, Pi as i, Xn as l, pn as m, Hi as n, Si as o, On as p, Ui as r, Qn as s, $ as t, Wn as u, Bt as v, Pe as x, It as y };