@yeepay/fmc-material 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1315 @@
1
+ import { writeMaterialsVersion as ke } from "@yeepay/lowcode-shared";
2
+ import { useSchema as et, useEvent as tt, request as fe, i18n as rt } from "@yeepay/lowcode-renderer";
3
+ import { message as k } from "ant-design-vue";
4
+ import { ref as C, watch as ee, onMounted as at, computed as te } from "@vue/composition-api";
5
+ const nt = "@yeepay/fmc-material", it = "0.0.1", st = [
6
+ "./dist/styles/*"
7
+ ], ot = {
8
+ ".": {
9
+ types: "./types/index.d.ts",
10
+ import: "./dist/index.js",
11
+ require: "./dist/index.js"
12
+ },
13
+ "./dist/styles/*": {
14
+ import: "./dist/styles/*",
15
+ require: "./dist/styles/*"
16
+ },
17
+ "./setters": {
18
+ types: "./types/setters.d.ts",
19
+ import: "./dist/setters.js",
20
+ require: "./dist/setters.js"
21
+ },
22
+ "./types/*": {
23
+ types: "./types/*"
24
+ }
25
+ }, lt = "./dist/index.js", ut = "./types/index.d.ts", pt = [
26
+ "dist",
27
+ "types"
28
+ ], ct = {
29
+ dev: "vite",
30
+ clean: "rimraf dist dist.zip",
31
+ build: "nr clean && vite build --mode npm && nr build:cssfile",
32
+ "build:fed": "nr clean && vite build --config ./vite.config.fed.ts --mode fed",
33
+ "build:cssfile": "tsx ./scripts/build-cssfile.ts",
34
+ "build:entry": "tsx ./scripts/build-entry.ts",
35
+ prepublishOnly: "nr build",
36
+ postpublish: "nr sync",
37
+ release: "tsx scripts/release.ts",
38
+ "release:fed": "tsx scripts/release-fed.ts",
39
+ sync: "tsx scripts/cnpm-sync.ts",
40
+ lint: "eslint .",
41
+ "lint:fix": "eslint . --fix"
42
+ }, dt = {
43
+ "@vue/composition-api": ">= 1.4.9",
44
+ "@yeepay/antd-materials": "2.*",
45
+ "@yeepay/lowcode-renderer": "2.*",
46
+ vue: ">= 2.5 < 2.7"
47
+ }, ft = {
48
+ "@yeepay/lowcode-shared": "2.*",
49
+ "ant-design-vue": "^1.7.8",
50
+ "lodash-es": "^4.17.21",
51
+ nanoid: "^5.0.9"
52
+ }, vt = {
53
+ "@antfu/ni": "^0.21.12",
54
+ "@iconify-json/mdi": "^1.1.66",
55
+ "@originjs/vite-plugin-federation": "1.3.6",
56
+ "@types/eslint": "^8.56.10",
57
+ "@types/fs-extra": "^11.0.4",
58
+ "@types/lodash-es": "^4.17.12",
59
+ "@types/node": "^20.12.12",
60
+ "@types/prompts": "^2.4.9",
61
+ "@unocss/transformer-directives": "^0.58.7",
62
+ "@vitest/coverage-v8": "^1.6.0",
63
+ "@vitest/ui": "^1.6.0",
64
+ "@vue/compiler-sfc": "^3.4.27",
65
+ "@vue/runtime-core": "^3.5.12",
66
+ "@vue/runtime-dom": "^3.4.27",
67
+ "@vue/test-utils": "1.3.6",
68
+ "@yeepay/eslint-config": "^2.0.1",
69
+ "@yeepay/lowcode-engine": "^2.3.8",
70
+ "@yeepay/server-utils": "^0.0.3",
71
+ bumpp: "^9.4.1",
72
+ "cnpm-sync": "^0.0.4",
73
+ concurrently: "^8.2.2",
74
+ esbuild: "^0.21.3",
75
+ eslint: "^9.8.0",
76
+ "eslint-plugin-format": "^0.1.1",
77
+ execa: "9.1.0",
78
+ "execa-commonjs": "npm:execa@5.1.1",
79
+ "fs-extra": "^11.2.0",
80
+ husky: "^9.0.11",
81
+ jsdom: "^24.0.0",
82
+ less: "3.13.1",
83
+ picocolors: "^1.0.1",
84
+ postcss: "^8.4.38",
85
+ "postinstall-postinstall": "^2.1.0",
86
+ prettier: "^3.2.5",
87
+ prompts: "^2.4.2",
88
+ rimraf: "^5.0.7",
89
+ tsx: "^4.17.0",
90
+ typescript: "^5.4.5",
91
+ unocss: "^0.58.7",
92
+ "unplugin-auto-import": "0.16.4",
93
+ "unplugin-dev-proxy": "^1.0.2",
94
+ "unplugin-vue2-script-setup": "^0.11.4",
95
+ vite: "^5.2.11",
96
+ "vite-plugin-top-level-await": "^1.4.2",
97
+ "vite-plugin-vue2": "^2.0.3",
98
+ vitest: "^1.6.0",
99
+ "vue-template-compiler": "2.6.14",
100
+ "vue-tsc": "^2.0.29",
101
+ zx: "^8.1.0"
102
+ }, gt = {
103
+ access: "public"
104
+ }, yt = {
105
+ patchedDependencies: {
106
+ "picomatch@2.3.1": "patches/picomatch@2.3.1.patch",
107
+ "@originjs/vite-plugin-federation@1.3.6": "patches/@originjs__vite-plugin-federation@1.3.6.patch"
108
+ }
109
+ }, ve = {
110
+ name: nt,
111
+ version: it,
112
+ sideEffects: st,
113
+ exports: ot,
114
+ main: lt,
115
+ types: ut,
116
+ files: pt,
117
+ scripts: ct,
118
+ peerDependencies: dt,
119
+ dependencies: ft,
120
+ devDependencies: vt,
121
+ publishConfig: gt,
122
+ pnpm: yt
123
+ };
124
+ async function ge(e) {
125
+ return e.type.includes("image") ? new Promise((t) => {
126
+ const r = new FileReader();
127
+ r.onload = function(a) {
128
+ const i = new Image();
129
+ i.onload = function() {
130
+ const n = i.width, u = i.height;
131
+ t({ width: n, height: u });
132
+ }, i.src = a.target.result;
133
+ }, r.readAsDataURL(new Blob([e]));
134
+ }) : { width: 0, height: 0 };
135
+ }
136
+ const mt = {
137
+ name: "FmcUpload",
138
+ formItem: !0,
139
+ displayName: "上传",
140
+ description: "",
141
+ component: "fmc-upload",
142
+ group: "federation",
143
+ category: "流程魔方",
144
+ docs: "https://yeepay.feishu.cn/wiki/wikcnPZnHYmOomePyMkzxTIxHQe",
145
+ handleConfig: {
146
+ className: "yee-form-item-wrapper"
147
+ },
148
+ properties: {
149
+ label: { type: "code", displayName: "名称", placeholder: "Label Text" },
150
+ defaultValue: {
151
+ type: "code",
152
+ displayName: "默认值",
153
+ tip: '数组形式, 示例: [{ name: "图片", url: "https://placehold.co/400", }]',
154
+ isExposedVariable: !0
155
+ },
156
+ description: { type: "code", displayName: "帮助", placeholder: "Help" },
157
+ descriptionType: {
158
+ type: "select",
159
+ displayName: "帮助类型",
160
+ options: [
161
+ { value: "icon", label: "图标" },
162
+ { value: "text", label: "文本" }
163
+ ]
164
+ },
165
+ type: {
166
+ type: "select",
167
+ displayName: "上传方式",
168
+ options: [
169
+ { value: "1", label: "按钮上传" },
170
+ { value: "2", label: "拖拽上传" },
171
+ { value: "3", label: "图片上传" }
172
+ ]
173
+ },
174
+ buttonName: { type: "code", displayName: "按钮名称", visible: '{{type.value === "1"}}' },
175
+ draggerTypeTitle: { type: "code", displayName: "拖拽标题文字", visible: '{{type.value === "2"}}' },
176
+ draggerTypeHint: { type: "code", displayName: " 拖拽辅助提示文字", visible: '{{type.value === "2"}}' },
177
+ multiple: {
178
+ type: "select",
179
+ displayName: "是否支持多选文件",
180
+ options: [
181
+ { value: "true", label: "是" },
182
+ { value: "false", label: "否" }
183
+ ]
184
+ },
185
+ uploadListVisible: { type: "toggle", displayName: "默认显示文件列表" },
186
+ visible: { type: "toggle", displayName: "默认显示" },
187
+ disabled: { type: "toggle", displayName: "默认禁用" },
188
+ isOcr: { type: "toggle", displayName: "是否Ocr识别" },
189
+ ocrType: {
190
+ type: "select",
191
+ displayName: "ocr类型",
192
+ options: [
193
+ { value: "ID_CARD", label: "身份证" },
194
+ { value: "LICENCE", label: "拖拽上传" },
195
+ { value: "IDENTIFIER_LIST", label: "通用表格识别" }
196
+ ],
197
+ visible: "{{isOcr.value}}"
198
+ },
199
+ parserTemplateCode: {
200
+ type: "code",
201
+ displayName: "解析模板编码",
202
+ visible: '{{isOcr.value && ocrType.value === "IDENTIFIER_LIST"}}'
203
+ }
204
+ },
205
+ styles: {
206
+ form_span: {
207
+ type: "select",
208
+ displayName: "布局列数",
209
+ options: [
210
+ { value: "1", label: "1" },
211
+ { value: "2", label: "2" },
212
+ { value: "3", label: "3" },
213
+ { value: "4", label: "4" }
214
+ ]
215
+ },
216
+ labelAlign: {
217
+ type: "select",
218
+ displayName: "对齐方式",
219
+ options: [
220
+ { value: "right", label: "右对齐" },
221
+ { value: "left", label: "左对齐" },
222
+ { value: "hidden", label: "隐藏名称" },
223
+ { value: "vertical", label: "上下对齐" }
224
+ ]
225
+ },
226
+ labelWidth: {
227
+ type: "input",
228
+ displayName: "label 宽度",
229
+ placeholder: "最小宽度 85px",
230
+ suffix: "px"
231
+ },
232
+ space: {
233
+ type: "space",
234
+ custom: !0
235
+ },
236
+ size: {
237
+ type: "size"
238
+ }
239
+ },
240
+ validation: {
241
+ required: { type: "toggle", displayName: "必填", validate: (e) => e.length > 0 },
242
+ count: {
243
+ type: "group",
244
+ displayName: "最大上传数量",
245
+ children: {
246
+ maxNumber: {
247
+ type: "code",
248
+ displayName: "上传数量验证",
249
+ defaultErrorMessage: "上传数量验证有误",
250
+ regex: /^\d*$/,
251
+ validate: (e, t) => e.length <= Number(t),
252
+ placeholder: "请输入最大文件数量"
253
+ }
254
+ }
255
+ },
256
+ size: {
257
+ type: "group",
258
+ displayName: "最大文件大小(MB)",
259
+ children: {
260
+ maxSize: {
261
+ type: "code",
262
+ displayName: "最大文件大小(MB)",
263
+ defaultErrorMessage: "最大文件大小验证有误",
264
+ regex: /^\d*$/,
265
+ validate: (e, t) => e.every((r) => r.size / 1024 / 1024 <= Number(t)),
266
+ placeholder: "请输入最大文件限制"
267
+ }
268
+ }
269
+ },
270
+ dimension: {
271
+ type: "group",
272
+ displayName: "尺寸",
273
+ children: {
274
+ imgWidth: {
275
+ type: "input",
276
+ displayName: "最大宽度(PX)",
277
+ defaultErrorMessage: "最大宽度验证有误",
278
+ regex: /^\d*$/,
279
+ validate: async (e, t) => {
280
+ for await (const r of e) {
281
+ const { width: a } = await ge(r);
282
+ if (a > Number(t))
283
+ return !1;
284
+ }
285
+ return !0;
286
+ },
287
+ placeholder: "请输入最大宽度"
288
+ },
289
+ imgHeight: {
290
+ type: "input",
291
+ displayName: "最大高度(PX)",
292
+ defaultErrorMessage: "最大高度验证有误",
293
+ regex: /^\d*$/,
294
+ validate: async (e, t) => {
295
+ for await (const r of e) {
296
+ const { height: a } = await ge(r);
297
+ if (a > Number(t))
298
+ return !1;
299
+ }
300
+ return !0;
301
+ },
302
+ placeholder: "请输入最大高度"
303
+ }
304
+ }
305
+ },
306
+ suffix: {
307
+ type: "group",
308
+ displayName: "文件名后缀验证",
309
+ children: {
310
+ fileRegex: {
311
+ type: "input",
312
+ displayName: "文件名后缀验证",
313
+ placeholder: "/(jpeg|pdf)$/",
314
+ defaultErrorMessage: "文件名后缀验证有误",
315
+ validate: (e, t) => (t.startsWith("/") && t.endsWith("/") && (t = t.slice(1, -1)), e.every((r) => new RegExp(t).test(typeof r == "string" ? JSON.parse(r).name : r.name)))
316
+ }
317
+ }
318
+ }
319
+ },
320
+ events: {
321
+ onChange: { displayName: "On change" },
322
+ onRemove: { displayName: "On remove" },
323
+ ocrSuccess: { displayName: "Ocr success" }
324
+ },
325
+ definition: {
326
+ properties: {
327
+ label: { value: "上传" },
328
+ description: { value: "" },
329
+ descriptionType: { value: "text" },
330
+ type: { value: "1" },
331
+ draggerTypeTitle: { value: "" },
332
+ draggerTypeHint: { value: "" },
333
+ buttonName: { value: "点击上传" },
334
+ uploadListVisible: { value: "{{true}}" },
335
+ multiple: { value: "false" },
336
+ visible: { value: "{{true}}" },
337
+ disabled: { value: "{{false}}" },
338
+ isOcr: { value: "{{false}}" },
339
+ ocrType: { value: "" },
340
+ parserTemplateCode: { value: "" }
341
+ },
342
+ styles: {
343
+ labelAlign: { value: "" },
344
+ labelWidth: { value: "" },
345
+ form_span: { value: "1" },
346
+ size: {
347
+ value: {}
348
+ },
349
+ space: {
350
+ value: {
351
+ marginTop: "8",
352
+ marginBottom: "8"
353
+ }
354
+ }
355
+ },
356
+ validation: {
357
+ required: { value: !1, errorMessage: "" },
358
+ maxNumber: { value: "1", errorMessage: "" },
359
+ maxSize: { value: "", errorMessage: "" },
360
+ imgWidth: { value: "", errorMessage: "" },
361
+ imgHeight: { value: "", errorMessage: "" },
362
+ fileRegex: { value: "", errorMessage: "" }
363
+ },
364
+ exposedVariables: {
365
+ defaultValue: [],
366
+ value: [],
367
+ isValid: !0,
368
+ validationError: null,
369
+ ocrData: {}
370
+ },
371
+ events: [],
372
+ others: {}
373
+ }
374
+ };
375
+ function q(e) {
376
+ var t = typeof e;
377
+ return e != null && (t == "object" || t == "function");
378
+ }
379
+ var Fe = typeof global == "object" && global && global.Object === Object && global, ht = typeof self == "object" && self && self.Object === Object && self, j = Fe || ht || Function("return this")(), re = function() {
380
+ return j.Date.now();
381
+ }, bt = /\s/;
382
+ function _t(e) {
383
+ for (var t = e.length; t-- && bt.test(e.charAt(t)); )
384
+ ;
385
+ return t;
386
+ }
387
+ var Tt = /^\s+/;
388
+ function wt(e) {
389
+ return e && e.slice(0, _t(e) + 1).replace(Tt, "");
390
+ }
391
+ var F = j.Symbol, Ve = Object.prototype, xt = Ve.hasOwnProperty, Ot = Ve.toString, H = F ? F.toStringTag : void 0;
392
+ function At(e) {
393
+ var t = xt.call(e, H), r = e[H];
394
+ try {
395
+ e[H] = void 0;
396
+ var a = !0;
397
+ } catch (n) {
398
+ }
399
+ var i = Ot.call(e);
400
+ return a && (t ? e[H] = r : delete e[H]), i;
401
+ }
402
+ var St = Object.prototype, jt = St.toString;
403
+ function $t(e) {
404
+ return jt.call(e);
405
+ }
406
+ var It = "[object Null]", Nt = "[object Undefined]", ye = F ? F.toStringTag : void 0;
407
+ function z(e) {
408
+ return e == null ? e === void 0 ? Nt : It : ye && ye in Object(e) ? At(e) : $t(e);
409
+ }
410
+ function V(e) {
411
+ return e != null && typeof e == "object";
412
+ }
413
+ var Et = "[object Symbol]";
414
+ function Pt(e) {
415
+ return typeof e == "symbol" || V(e) && z(e) == Et;
416
+ }
417
+ var me = NaN, Ct = /^[-+]0x[0-9a-f]+$/i, Lt = /^0b[01]+$/i, Mt = /^0o[0-7]+$/i, Dt = parseInt;
418
+ function he(e) {
419
+ if (typeof e == "number")
420
+ return e;
421
+ if (Pt(e))
422
+ return me;
423
+ if (q(e)) {
424
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
425
+ e = q(t) ? t + "" : t;
426
+ }
427
+ if (typeof e != "string")
428
+ return e === 0 ? e : +e;
429
+ e = wt(e);
430
+ var r = Lt.test(e);
431
+ return r || Mt.test(e) ? Dt(e.slice(2), r ? 2 : 8) : Ct.test(e) ? me : +e;
432
+ }
433
+ var Rt = "Expected a function", Ft = Math.max, Vt = Math.min;
434
+ function zt(e, t, r) {
435
+ var a, i, n, u, p, l, o = 0, h = !1, v = !1, d = !0;
436
+ if (typeof e != "function")
437
+ throw new TypeError(Rt);
438
+ t = he(t) || 0, q(r) && (h = !!r.leading, v = "maxWait" in r, n = v ? Ft(he(r.maxWait) || 0, t) : n, d = "trailing" in r ? !!r.trailing : d);
439
+ function b(y) {
440
+ var S = a, P = i;
441
+ return a = i = void 0, o = y, u = e.apply(P, S), u;
442
+ }
443
+ function m(y) {
444
+ return o = y, p = setTimeout(_, t), h ? b(y) : u;
445
+ }
446
+ function c(y) {
447
+ var S = y - l, P = y - o, K = t - S;
448
+ return v ? Vt(K, n - P) : K;
449
+ }
450
+ function w(y) {
451
+ var S = y - l, P = y - o;
452
+ return l === void 0 || S >= t || S < 0 || v && P >= n;
453
+ }
454
+ function _() {
455
+ var y = re();
456
+ if (w(y))
457
+ return O(y);
458
+ p = setTimeout(_, c(y));
459
+ }
460
+ function O(y) {
461
+ return p = void 0, d && a ? b(y) : (a = i = void 0, u);
462
+ }
463
+ function R() {
464
+ p !== void 0 && clearTimeout(p), o = 0, a = l = i = p = void 0;
465
+ }
466
+ function I() {
467
+ return p === void 0 ? u : O(re());
468
+ }
469
+ function A() {
470
+ var y = re(), S = w(y);
471
+ if (a = arguments, i = this, l = y, S) {
472
+ if (p === void 0)
473
+ return m(l);
474
+ if (v)
475
+ return clearTimeout(p), p = setTimeout(_, t), b(l);
476
+ }
477
+ return p === void 0 && (p = setTimeout(_, t)), u;
478
+ }
479
+ return A.cancel = R, A.flush = I, A;
480
+ }
481
+ function Ut() {
482
+ this.__data__ = [], this.size = 0;
483
+ }
484
+ function ze(e, t) {
485
+ return e === t || e !== e && t !== t;
486
+ }
487
+ function Z(e, t) {
488
+ for (var r = e.length; r--; )
489
+ if (ze(e[r][0], t))
490
+ return r;
491
+ return -1;
492
+ }
493
+ var Ht = Array.prototype, Bt = Ht.splice;
494
+ function qt(e) {
495
+ var t = this.__data__, r = Z(t, e);
496
+ if (r < 0)
497
+ return !1;
498
+ var a = t.length - 1;
499
+ return r == a ? t.pop() : Bt.call(t, r, 1), --this.size, !0;
500
+ }
501
+ function Gt(e) {
502
+ var t = this.__data__, r = Z(t, e);
503
+ return r < 0 ? void 0 : t[r][1];
504
+ }
505
+ function Wt(e) {
506
+ return Z(this.__data__, e) > -1;
507
+ }
508
+ function Kt(e, t) {
509
+ var r = this.__data__, a = Z(r, e);
510
+ return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
511
+ }
512
+ function $(e) {
513
+ var t = -1, r = e == null ? 0 : e.length;
514
+ for (this.clear(); ++t < r; ) {
515
+ var a = e[t];
516
+ this.set(a[0], a[1]);
517
+ }
518
+ }
519
+ $.prototype.clear = Ut;
520
+ $.prototype.delete = qt;
521
+ $.prototype.get = Gt;
522
+ $.prototype.has = Wt;
523
+ $.prototype.set = Kt;
524
+ function Jt() {
525
+ this.__data__ = new $(), this.size = 0;
526
+ }
527
+ function Xt(e) {
528
+ var t = this.__data__, r = t.delete(e);
529
+ return this.size = t.size, r;
530
+ }
531
+ function Yt(e) {
532
+ return this.__data__.get(e);
533
+ }
534
+ function Zt(e) {
535
+ return this.__data__.has(e);
536
+ }
537
+ var Qt = "[object AsyncFunction]", kt = "[object Function]", er = "[object GeneratorFunction]", tr = "[object Proxy]";
538
+ function Ue(e) {
539
+ if (!q(e))
540
+ return !1;
541
+ var t = z(e);
542
+ return t == kt || t == er || t == Qt || t == tr;
543
+ }
544
+ var ae = j["__core-js_shared__"], be = function() {
545
+ var e = /[^.]+$/.exec(ae && ae.keys && ae.keys.IE_PROTO || "");
546
+ return e ? "Symbol(src)_1." + e : "";
547
+ }();
548
+ function rr(e) {
549
+ return !!be && be in e;
550
+ }
551
+ var ar = Function.prototype, nr = ar.toString;
552
+ function M(e) {
553
+ if (e != null) {
554
+ try {
555
+ return nr.call(e);
556
+ } catch (t) {
557
+ }
558
+ try {
559
+ return e + "";
560
+ } catch (t) {
561
+ }
562
+ }
563
+ return "";
564
+ }
565
+ var ir = /[\\^$.*+?()[\]{}|]/g, sr = /^\[object .+?Constructor\]$/, or = Function.prototype, lr = Object.prototype, ur = or.toString, pr = lr.hasOwnProperty, cr = RegExp(
566
+ "^" + ur.call(pr).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
567
+ );
568
+ function dr(e) {
569
+ if (!q(e) || rr(e))
570
+ return !1;
571
+ var t = Ue(e) ? cr : sr;
572
+ return t.test(M(e));
573
+ }
574
+ function fr(e, t) {
575
+ return e == null ? void 0 : e[t];
576
+ }
577
+ function U(e, t) {
578
+ var r = fr(e, t);
579
+ return dr(r) ? r : void 0;
580
+ }
581
+ var G = U(j, "Map"), W = U(Object, "create");
582
+ function vr() {
583
+ this.__data__ = W ? W(null) : {}, this.size = 0;
584
+ }
585
+ function gr(e) {
586
+ var t = this.has(e) && delete this.__data__[e];
587
+ return this.size -= t ? 1 : 0, t;
588
+ }
589
+ var yr = "__lodash_hash_undefined__", mr = Object.prototype, hr = mr.hasOwnProperty;
590
+ function br(e) {
591
+ var t = this.__data__;
592
+ if (W) {
593
+ var r = t[e];
594
+ return r === yr ? void 0 : r;
595
+ }
596
+ return hr.call(t, e) ? t[e] : void 0;
597
+ }
598
+ var _r = Object.prototype, Tr = _r.hasOwnProperty;
599
+ function wr(e) {
600
+ var t = this.__data__;
601
+ return W ? t[e] !== void 0 : Tr.call(t, e);
602
+ }
603
+ var xr = "__lodash_hash_undefined__";
604
+ function Or(e, t) {
605
+ var r = this.__data__;
606
+ return this.size += this.has(e) ? 0 : 1, r[e] = W && t === void 0 ? xr : t, this;
607
+ }
608
+ function L(e) {
609
+ var t = -1, r = e == null ? 0 : e.length;
610
+ for (this.clear(); ++t < r; ) {
611
+ var a = e[t];
612
+ this.set(a[0], a[1]);
613
+ }
614
+ }
615
+ L.prototype.clear = vr;
616
+ L.prototype.delete = gr;
617
+ L.prototype.get = br;
618
+ L.prototype.has = wr;
619
+ L.prototype.set = Or;
620
+ function Ar() {
621
+ this.size = 0, this.__data__ = {
622
+ hash: new L(),
623
+ map: new (G || $)(),
624
+ string: new L()
625
+ };
626
+ }
627
+ function Sr(e) {
628
+ var t = typeof e;
629
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
630
+ }
631
+ function Q(e, t) {
632
+ var r = e.__data__;
633
+ return Sr(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
634
+ }
635
+ function jr(e) {
636
+ var t = Q(this, e).delete(e);
637
+ return this.size -= t ? 1 : 0, t;
638
+ }
639
+ function $r(e) {
640
+ return Q(this, e).get(e);
641
+ }
642
+ function Ir(e) {
643
+ return Q(this, e).has(e);
644
+ }
645
+ function Nr(e, t) {
646
+ var r = Q(this, e), a = r.size;
647
+ return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
648
+ }
649
+ function D(e) {
650
+ var t = -1, r = e == null ? 0 : e.length;
651
+ for (this.clear(); ++t < r; ) {
652
+ var a = e[t];
653
+ this.set(a[0], a[1]);
654
+ }
655
+ }
656
+ D.prototype.clear = Ar;
657
+ D.prototype.delete = jr;
658
+ D.prototype.get = $r;
659
+ D.prototype.has = Ir;
660
+ D.prototype.set = Nr;
661
+ var Er = 200;
662
+ function Pr(e, t) {
663
+ var r = this.__data__;
664
+ if (r instanceof $) {
665
+ var a = r.__data__;
666
+ if (!G || a.length < Er - 1)
667
+ return a.push([e, t]), this.size = ++r.size, this;
668
+ r = this.__data__ = new D(a);
669
+ }
670
+ return r.set(e, t), this.size = r.size, this;
671
+ }
672
+ function E(e) {
673
+ var t = this.__data__ = new $(e);
674
+ this.size = t.size;
675
+ }
676
+ E.prototype.clear = Jt;
677
+ E.prototype.delete = Xt;
678
+ E.prototype.get = Yt;
679
+ E.prototype.has = Zt;
680
+ E.prototype.set = Pr;
681
+ var Cr = "__lodash_hash_undefined__";
682
+ function Lr(e) {
683
+ return this.__data__.set(e, Cr), this;
684
+ }
685
+ function Mr(e) {
686
+ return this.__data__.has(e);
687
+ }
688
+ function X(e) {
689
+ var t = -1, r = e == null ? 0 : e.length;
690
+ for (this.__data__ = new D(); ++t < r; )
691
+ this.add(e[t]);
692
+ }
693
+ X.prototype.add = X.prototype.push = Lr;
694
+ X.prototype.has = Mr;
695
+ function Dr(e, t) {
696
+ for (var r = -1, a = e == null ? 0 : e.length; ++r < a; )
697
+ if (t(e[r], r, e))
698
+ return !0;
699
+ return !1;
700
+ }
701
+ function Rr(e, t) {
702
+ return e.has(t);
703
+ }
704
+ var Fr = 1, Vr = 2;
705
+ function He(e, t, r, a, i, n) {
706
+ var u = r & Fr, p = e.length, l = t.length;
707
+ if (p != l && !(u && l > p))
708
+ return !1;
709
+ var o = n.get(e), h = n.get(t);
710
+ if (o && h)
711
+ return o == t && h == e;
712
+ var v = -1, d = !0, b = r & Vr ? new X() : void 0;
713
+ for (n.set(e, t), n.set(t, e); ++v < p; ) {
714
+ var m = e[v], c = t[v];
715
+ if (a)
716
+ var w = u ? a(c, m, v, t, e, n) : a(m, c, v, e, t, n);
717
+ if (w !== void 0) {
718
+ if (w)
719
+ continue;
720
+ d = !1;
721
+ break;
722
+ }
723
+ if (b) {
724
+ if (!Dr(t, function(_, O) {
725
+ if (!Rr(b, O) && (m === _ || i(m, _, r, a, n)))
726
+ return b.push(O);
727
+ })) {
728
+ d = !1;
729
+ break;
730
+ }
731
+ } else if (!(m === c || i(m, c, r, a, n))) {
732
+ d = !1;
733
+ break;
734
+ }
735
+ }
736
+ return n.delete(e), n.delete(t), d;
737
+ }
738
+ var _e = j.Uint8Array;
739
+ function zr(e) {
740
+ var t = -1, r = Array(e.size);
741
+ return e.forEach(function(a, i) {
742
+ r[++t] = [i, a];
743
+ }), r;
744
+ }
745
+ function Ur(e) {
746
+ var t = -1, r = Array(e.size);
747
+ return e.forEach(function(a) {
748
+ r[++t] = a;
749
+ }), r;
750
+ }
751
+ var Hr = 1, Br = 2, qr = "[object Boolean]", Gr = "[object Date]", Wr = "[object Error]", Kr = "[object Map]", Jr = "[object Number]", Xr = "[object RegExp]", Yr = "[object Set]", Zr = "[object String]", Qr = "[object Symbol]", kr = "[object ArrayBuffer]", ea = "[object DataView]", Te = F ? F.prototype : void 0, ne = Te ? Te.valueOf : void 0;
752
+ function ta(e, t, r, a, i, n, u) {
753
+ switch (r) {
754
+ case ea:
755
+ if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
756
+ return !1;
757
+ e = e.buffer, t = t.buffer;
758
+ case kr:
759
+ return !(e.byteLength != t.byteLength || !n(new _e(e), new _e(t)));
760
+ case qr:
761
+ case Gr:
762
+ case Jr:
763
+ return ze(+e, +t);
764
+ case Wr:
765
+ return e.name == t.name && e.message == t.message;
766
+ case Xr:
767
+ case Zr:
768
+ return e == t + "";
769
+ case Kr:
770
+ var p = zr;
771
+ case Yr:
772
+ var l = a & Hr;
773
+ if (p || (p = Ur), e.size != t.size && !l)
774
+ return !1;
775
+ var o = u.get(e);
776
+ if (o)
777
+ return o == t;
778
+ a |= Br, u.set(e, t);
779
+ var h = He(p(e), p(t), a, i, n, u);
780
+ return u.delete(e), h;
781
+ case Qr:
782
+ if (ne)
783
+ return ne.call(e) == ne.call(t);
784
+ }
785
+ return !1;
786
+ }
787
+ function ra(e, t) {
788
+ for (var r = -1, a = t.length, i = e.length; ++r < a; )
789
+ e[i + r] = t[r];
790
+ return e;
791
+ }
792
+ var Y = Array.isArray;
793
+ function aa(e, t, r) {
794
+ var a = t(e);
795
+ return Y(e) ? a : ra(a, r(e));
796
+ }
797
+ function na(e, t) {
798
+ for (var r = -1, a = e == null ? 0 : e.length, i = 0, n = []; ++r < a; ) {
799
+ var u = e[r];
800
+ t(u, r, e) && (n[i++] = u);
801
+ }
802
+ return n;
803
+ }
804
+ function ia() {
805
+ return [];
806
+ }
807
+ var sa = Object.prototype, oa = sa.propertyIsEnumerable, we = Object.getOwnPropertySymbols, la = we ? function(e) {
808
+ return e == null ? [] : (e = Object(e), na(we(e), function(t) {
809
+ return oa.call(e, t);
810
+ }));
811
+ } : ia;
812
+ function ua(e, t) {
813
+ for (var r = -1, a = Array(e); ++r < e; )
814
+ a[r] = t(r);
815
+ return a;
816
+ }
817
+ var pa = "[object Arguments]";
818
+ function xe(e) {
819
+ return V(e) && z(e) == pa;
820
+ }
821
+ var Be = Object.prototype, ca = Be.hasOwnProperty, da = Be.propertyIsEnumerable, fa = xe(/* @__PURE__ */ function() {
822
+ return arguments;
823
+ }()) ? xe : function(e) {
824
+ return V(e) && ca.call(e, "callee") && !da.call(e, "callee");
825
+ };
826
+ function va() {
827
+ return !1;
828
+ }
829
+ var qe = typeof exports == "object" && exports && !exports.nodeType && exports, Oe = qe && typeof module == "object" && module && !module.nodeType && module, ga = Oe && Oe.exports === qe, Ae = ga ? j.Buffer : void 0, ya = Ae ? Ae.isBuffer : void 0, se = ya || va, ma = 9007199254740991, ha = /^(?:0|[1-9]\d*)$/;
830
+ function ba(e, t) {
831
+ var r = typeof e;
832
+ return t = t == null ? ma : t, !!t && (r == "number" || r != "symbol" && ha.test(e)) && e > -1 && e % 1 == 0 && e < t;
833
+ }
834
+ var _a = 9007199254740991;
835
+ function Ge(e) {
836
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= _a;
837
+ }
838
+ var Ta = "[object Arguments]", wa = "[object Array]", xa = "[object Boolean]", Oa = "[object Date]", Aa = "[object Error]", Sa = "[object Function]", ja = "[object Map]", $a = "[object Number]", Ia = "[object Object]", Na = "[object RegExp]", Ea = "[object Set]", Pa = "[object String]", Ca = "[object WeakMap]", La = "[object ArrayBuffer]", Ma = "[object DataView]", Da = "[object Float32Array]", Ra = "[object Float64Array]", Fa = "[object Int8Array]", Va = "[object Int16Array]", za = "[object Int32Array]", Ua = "[object Uint8Array]", Ha = "[object Uint8ClampedArray]", Ba = "[object Uint16Array]", qa = "[object Uint32Array]", f = {};
839
+ f[Da] = f[Ra] = f[Fa] = f[Va] = f[za] = f[Ua] = f[Ha] = f[Ba] = f[qa] = !0;
840
+ f[Ta] = f[wa] = f[La] = f[xa] = f[Ma] = f[Oa] = f[Aa] = f[Sa] = f[ja] = f[$a] = f[Ia] = f[Na] = f[Ea] = f[Pa] = f[Ca] = !1;
841
+ function Ga(e) {
842
+ return V(e) && Ge(e.length) && !!f[z(e)];
843
+ }
844
+ function Wa(e) {
845
+ return function(t) {
846
+ return e(t);
847
+ };
848
+ }
849
+ var We = typeof exports == "object" && exports && !exports.nodeType && exports, B = We && typeof module == "object" && module && !module.nodeType && module, Ka = B && B.exports === We, ie = Ka && Fe.process, Se = function() {
850
+ try {
851
+ var e = B && B.require && B.require("util").types;
852
+ return e || ie && ie.binding && ie.binding("util");
853
+ } catch (t) {
854
+ }
855
+ }(), je = Se && Se.isTypedArray, Ke = je ? Wa(je) : Ga, Ja = Object.prototype, Xa = Ja.hasOwnProperty;
856
+ function Ya(e, t) {
857
+ var r = Y(e), a = !r && fa(e), i = !r && !a && se(e), n = !r && !a && !i && Ke(e), u = r || a || i || n, p = u ? ua(e.length, String) : [], l = p.length;
858
+ for (var o in e)
859
+ Xa.call(e, o) && !(u && // Safari 9 has enumerable `arguments.length` in strict mode.
860
+ (o == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
861
+ i && (o == "offset" || o == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
862
+ n && (o == "buffer" || o == "byteLength" || o == "byteOffset") || // Skip index properties.
863
+ ba(o, l))) && p.push(o);
864
+ return p;
865
+ }
866
+ var Za = Object.prototype;
867
+ function Qa(e) {
868
+ var t = e && e.constructor, r = typeof t == "function" && t.prototype || Za;
869
+ return e === r;
870
+ }
871
+ function ka(e, t) {
872
+ return function(r) {
873
+ return e(t(r));
874
+ };
875
+ }
876
+ var en = ka(Object.keys, Object), tn = Object.prototype, rn = tn.hasOwnProperty;
877
+ function an(e) {
878
+ if (!Qa(e))
879
+ return en(e);
880
+ var t = [];
881
+ for (var r in Object(e))
882
+ rn.call(e, r) && r != "constructor" && t.push(r);
883
+ return t;
884
+ }
885
+ function nn(e) {
886
+ return e != null && Ge(e.length) && !Ue(e);
887
+ }
888
+ function sn(e) {
889
+ return nn(e) ? Ya(e) : an(e);
890
+ }
891
+ function $e(e) {
892
+ return aa(e, sn, la);
893
+ }
894
+ var on = 1, ln = Object.prototype, un = ln.hasOwnProperty;
895
+ function pn(e, t, r, a, i, n) {
896
+ var u = r & on, p = $e(e), l = p.length, o = $e(t), h = o.length;
897
+ if (l != h && !u)
898
+ return !1;
899
+ for (var v = l; v--; ) {
900
+ var d = p[v];
901
+ if (!(u ? d in t : un.call(t, d)))
902
+ return !1;
903
+ }
904
+ var b = n.get(e), m = n.get(t);
905
+ if (b && m)
906
+ return b == t && m == e;
907
+ var c = !0;
908
+ n.set(e, t), n.set(t, e);
909
+ for (var w = u; ++v < l; ) {
910
+ d = p[v];
911
+ var _ = e[d], O = t[d];
912
+ if (a)
913
+ var R = u ? a(O, _, d, t, e, n) : a(_, O, d, e, t, n);
914
+ if (!(R === void 0 ? _ === O || i(_, O, r, a, n) : R)) {
915
+ c = !1;
916
+ break;
917
+ }
918
+ w || (w = d == "constructor");
919
+ }
920
+ if (c && !w) {
921
+ var I = e.constructor, A = t.constructor;
922
+ I != A && "constructor" in e && "constructor" in t && !(typeof I == "function" && I instanceof I && typeof A == "function" && A instanceof A) && (c = !1);
923
+ }
924
+ return n.delete(e), n.delete(t), c;
925
+ }
926
+ var oe = U(j, "DataView"), le = U(j, "Promise"), ue = U(j, "Set"), pe = U(j, "WeakMap"), Ie = "[object Map]", cn = "[object Object]", Ne = "[object Promise]", Ee = "[object Set]", Pe = "[object WeakMap]", Ce = "[object DataView]", dn = M(oe), fn = M(G), vn = M(le), gn = M(ue), yn = M(pe), N = z;
927
+ (oe && N(new oe(new ArrayBuffer(1))) != Ce || G && N(new G()) != Ie || le && N(le.resolve()) != Ne || ue && N(new ue()) != Ee || pe && N(new pe()) != Pe) && (N = function(e) {
928
+ var t = z(e), r = t == cn ? e.constructor : void 0, a = r ? M(r) : "";
929
+ if (a)
930
+ switch (a) {
931
+ case dn:
932
+ return Ce;
933
+ case fn:
934
+ return Ie;
935
+ case vn:
936
+ return Ne;
937
+ case gn:
938
+ return Ee;
939
+ case yn:
940
+ return Pe;
941
+ }
942
+ return t;
943
+ });
944
+ var mn = 1, Le = "[object Arguments]", Me = "[object Array]", J = "[object Object]", hn = Object.prototype, De = hn.hasOwnProperty;
945
+ function bn(e, t, r, a, i, n) {
946
+ var u = Y(e), p = Y(t), l = u ? Me : N(e), o = p ? Me : N(t);
947
+ l = l == Le ? J : l, o = o == Le ? J : o;
948
+ var h = l == J, v = o == J, d = l == o;
949
+ if (d && se(e)) {
950
+ if (!se(t))
951
+ return !1;
952
+ u = !0, h = !1;
953
+ }
954
+ if (d && !h)
955
+ return n || (n = new E()), u || Ke(e) ? He(e, t, r, a, i, n) : ta(e, t, l, r, a, i, n);
956
+ if (!(r & mn)) {
957
+ var b = h && De.call(e, "__wrapped__"), m = v && De.call(t, "__wrapped__");
958
+ if (b || m) {
959
+ var c = b ? e.value() : e, w = m ? t.value() : t;
960
+ return n || (n = new E()), i(c, w, r, a, n);
961
+ }
962
+ }
963
+ return d ? (n || (n = new E()), pn(e, t, r, a, i, n)) : !1;
964
+ }
965
+ function Je(e, t, r, a, i) {
966
+ return e === t ? !0 : e == null || t == null || !V(e) && !V(t) ? e !== e && t !== t : bn(e, t, r, a, Je, i);
967
+ }
968
+ function _n(e, t) {
969
+ return Je(e, t);
970
+ }
971
+ let Tn = (e, t = 21) => (r = t) => {
972
+ let a = "", i = r | 0;
973
+ for (; i--; )
974
+ a += e[Math.random() * e.length | 0];
975
+ return a;
976
+ };
977
+ const ce = {};
978
+ ce.props = {
979
+ id: {
980
+ key: "id",
981
+ required: !0,
982
+ type: String
983
+ },
984
+ customVariables: {
985
+ key: "customVariables",
986
+ required: !1,
987
+ type: Object,
988
+ default: () => ({})
989
+ },
990
+ properties: {
991
+ key: "properties",
992
+ required: !0,
993
+ type: null
994
+ },
995
+ validation: {
996
+ key: "validation",
997
+ required: !0,
998
+ type: null
999
+ },
1000
+ exposedVariables: {
1001
+ key: "exposedVariables",
1002
+ required: !0,
1003
+ type: null
1004
+ },
1005
+ styles: {
1006
+ key: "styles",
1007
+ required: !0,
1008
+ type: null
1009
+ }
1010
+ };
1011
+ ce.setup = (e, t) => {
1012
+ const r = e, a = Tn("1234567890abcdef", 4), {
1013
+ setExposedVariable: i,
1014
+ findComponent: n
1015
+ } = et({
1016
+ id: r.id
1017
+ }), {
1018
+ fireEvent: u
1019
+ } = tt({
1020
+ id: r.id
1021
+ }), p = C(void 0), l = n(r.id).validation, o = C(!1), h = C(!1), v = C(""), d = C(""), b = C(a());
1022
+ try {
1023
+ b.value = window.route.query.id;
1024
+ } catch (s) {
1025
+ console.log("获取绑定route参数错误", s);
1026
+ }
1027
+ const m = localStorage.getItem("yuiassotoken"), c = C([]);
1028
+ async function w(s) {
1029
+ const T = [];
1030
+ for (const g of s)
1031
+ file.uid = g.uid || a(), file.url = g.url, file.name = g.name || g.url.split("/").pop(), T.push(file);
1032
+ c.value = T;
1033
+ }
1034
+ w(r.exposedVariables.defaultValue), ee(() => c.value, () => {
1035
+ i("value", c.value.map((s) => s instanceof File ? s : JSON.stringify(s)));
1036
+ }, {
1037
+ immediate: !0
1038
+ }), ee(() => r.exposedVariables.value, (s) => {
1039
+ const T = s.map((g) => {
1040
+ if (g instanceof File)
1041
+ return g;
1042
+ {
1043
+ const x = typeof g == "string" ? JSON.parse(g) : g;
1044
+ return x.uid = x.uid || a(), x;
1045
+ }
1046
+ });
1047
+ _n(c.value, T) || (c.value = T);
1048
+ }), at(() => {
1049
+ ee(() => c.value, zt(() => {
1050
+ p.value !== void 0 && (p.value ? u("onChange") : u("onRemove"));
1051
+ }, 200));
1052
+ });
1053
+ const _ = te(() => r.exposedVariables.isValid), O = te(() => r.exposedVariables.validationError), R = te(() => r.properties.uploadListVisible);
1054
+ function I(s) {
1055
+ r.properties.multiple !== "true" && (c.value = []);
1056
+ const T = new FormData();
1057
+ return T.append("id", b.value), T.append("file", s), fe.value({
1058
+ headers: {
1059
+ yuiassotoken: m
1060
+ },
1061
+ url: `/fmc-boss/file/upload/${b.value}`,
1062
+ method: "post",
1063
+ data: T
1064
+ }).then((g) => {
1065
+ if (g.data.code === 200) {
1066
+ const x = {
1067
+ uid: a(),
1068
+ name: s.name,
1069
+ url: g.data.data
1070
+ };
1071
+ r.properties.multiple === "true" ? c.value.push(x) : c.value = [x], r.properties.isOcr && A(g.data.data);
1072
+ } else
1073
+ k.error(g.data.message);
1074
+ }), !1;
1075
+ }
1076
+ function A(s) {
1077
+ const {
1078
+ parserTemplateCode: T,
1079
+ ocrType: g
1080
+ } = r.properties;
1081
+ g === "IDENTIFIER_LIST" && !T || (h.value = !0, fe.value({
1082
+ headers: {
1083
+ yuiassotoken: m
1084
+ },
1085
+ url: "/fmc-boss/external-capability/ocr-auth/recognize",
1086
+ method: "post",
1087
+ data: {
1088
+ requestSystem: "fmc-boss",
1089
+ ocrType: g,
1090
+ parserTemplateCode: T,
1091
+ imageUrl: s
1092
+ }
1093
+ }).then((x) => {
1094
+ x.data.code === 200 ? (i("ocrData", null), i("ocrData", x.data.data), u("ocrSuccess")) : k.error(x.data.message);
1095
+ }).finally(() => {
1096
+ h.value = !1;
1097
+ }));
1098
+ }
1099
+ function y(s) {
1100
+ return (s == null ? void 0 : s.slice(0, 5)) === "image";
1101
+ }
1102
+ function S({
1103
+ file: s,
1104
+ _fileList: T
1105
+ }) {
1106
+ s.status === "removed" && (c.value = c.value.filter((x) => x.uid !== s.uid));
1107
+ }
1108
+ function P(s) {
1109
+ k.error(rt.value.t("upload.formatError"));
1110
+ }
1111
+ function K(s) {
1112
+ if (s) {
1113
+ let g = s.substring(s.indexOf("(") + 1, s.indexOf(")$/")).split("|");
1114
+ return g = g.map((Qe) => `.${Qe}`), g.join(",");
1115
+ }
1116
+ return "";
1117
+ }
1118
+ function Xe(s) {
1119
+ return `${window.location.origin}/fmc-boss/file/cloud-storage${s.replace(/http.*\.yeepay\.com/, "")}?yuiassotoken=${localStorage.getItem("yuiassotoken")}`;
1120
+ }
1121
+ function de(s) {
1122
+ return window.location.host === "fmc.yeepay.com" ? s.startsWith("http://staticres.yeepay.com") && (s = s.replace("http:", "https:")) : s = Xe(s), s;
1123
+ }
1124
+ async function Ye(s) {
1125
+ v.value = de(s.url), d.value = s.name, o.value = !0;
1126
+ }
1127
+ async function Ze(s) {
1128
+ if (y(s.type)) {
1129
+ Ye(s);
1130
+ return;
1131
+ }
1132
+ window.open(de(s.url), "_blank");
1133
+ }
1134
+ return {
1135
+ validationProps: l,
1136
+ previewVisible: o,
1137
+ ocrLoading: h,
1138
+ previewImage: v,
1139
+ previewImageName: d,
1140
+ value: c,
1141
+ isValid: _,
1142
+ validationError: O,
1143
+ uploadListVisible: R,
1144
+ beforeUpload: I,
1145
+ handleChange: S,
1146
+ rejectDragFile: P,
1147
+ changeFileRegex: K,
1148
+ handlePreview: Ze
1149
+ };
1150
+ };
1151
+ var wn = function() {
1152
+ var e = this, t = e.$createElement, r = e._self._c || t;
1153
+ return r("div", {
1154
+ staticClass: "yee-upload-wrapper",
1155
+ class: {
1156
+ "has-error": !e.isValid
1157
+ }
1158
+ }, [e.properties.type === "2" ? r("a-upload-dragger", {
1159
+ attrs: {
1160
+ name: "file",
1161
+ accept: e.changeFileRegex(e.validationProps.fileRegex.value),
1162
+ multiple: e.properties.multiple === "true",
1163
+ "before-upload": e.beforeUpload,
1164
+ "file-list": e.value,
1165
+ disabled: e.properties.disabled,
1166
+ "show-upload-list": e.uploadListVisible
1167
+ },
1168
+ on: {
1169
+ change: e.handleChange,
1170
+ reject: e.rejectDragFile
1171
+ }
1172
+ }, [r("p", {
1173
+ staticClass: "ant-upload-drag-icon"
1174
+ }, [r("a-icon", {
1175
+ attrs: {
1176
+ type: "inbox"
1177
+ }
1178
+ })], 1), r("p", {
1179
+ staticClass: "ant-upload-text"
1180
+ }, [e._v(" " + e._s(e.properties.draggerTypeTitle || "单击或拖动文件到此区域上传") + " ")]), r("p", {
1181
+ staticClass: "ant-upload-hint px-4"
1182
+ }, [e._v(" " + e._s(e.properties.draggerTypeHint || "") + " ")])]) : [e.properties.type === "1" ? r("a-upload", {
1183
+ attrs: {
1184
+ name: "file",
1185
+ accept: e.changeFileRegex(e.validationProps.fileRegex.value),
1186
+ multiple: e.properties.multiple === "true",
1187
+ "before-upload": e.beforeUpload,
1188
+ "file-list": e.value,
1189
+ disabled: e.properties.disabled,
1190
+ "show-upload-list": e.uploadListVisible
1191
+ },
1192
+ on: {
1193
+ change: e.handleChange
1194
+ }
1195
+ }, [r("a-button", {
1196
+ attrs: {
1197
+ disabled: e.properties.disabled
1198
+ }
1199
+ }, [e._v(" " + e._s(e.properties.buttonName) + " ")])], 1) : e._e(), e.properties.type === "3" ? r("a-upload", {
1200
+ attrs: {
1201
+ "list-type": "picture-card",
1202
+ name: "file",
1203
+ accept: e.changeFileRegex(e.validationProps.fileRegex.value),
1204
+ multiple: e.properties.multiple === "true",
1205
+ "before-upload": e.beforeUpload,
1206
+ "file-list": e.value,
1207
+ disabled: e.properties.disabled,
1208
+ "show-upload-list": e.uploadListVisible
1209
+ },
1210
+ on: {
1211
+ preview: e.handlePreview,
1212
+ change: e.handleChange
1213
+ }
1214
+ }, [e.value.length < e.validationProps.maxNumber.value ? r("div", [r("a-icon", {
1215
+ attrs: {
1216
+ type: "plus"
1217
+ }
1218
+ })], 1) : e._e()]) : e._e(), r("a-modal", {
1219
+ attrs: {
1220
+ visible: e.previewVisible,
1221
+ footer: null
1222
+ },
1223
+ on: {
1224
+ cancel: function(a) {
1225
+ e.previewVisible = !1;
1226
+ }
1227
+ },
1228
+ scopedSlots: e._u([{
1229
+ key: "title",
1230
+ fn: function() {
1231
+ return [r("div", {
1232
+ staticClass: "w-4/5",
1233
+ attrs: {
1234
+ truncate: ""
1235
+ }
1236
+ }, [e._v(" " + e._s(e.previewImageName) + " ")])];
1237
+ },
1238
+ proxy: !0
1239
+ }])
1240
+ }, [r("img", {
1241
+ staticStyle: {
1242
+ width: "100%"
1243
+ },
1244
+ attrs: {
1245
+ alt: "example",
1246
+ src: e.previewImage
1247
+ }
1248
+ })])], r("div", {
1249
+ directives: [{
1250
+ name: "show",
1251
+ rawName: "v-show",
1252
+ value: !e.isValid,
1253
+ expression: "!isValid"
1254
+ }],
1255
+ staticClass: "ant-form-explain"
1256
+ }, [e._v(" " + e._s(e.validationError) + " ")]), r("div", {
1257
+ directives: [{
1258
+ name: "show",
1259
+ rawName: "v-show",
1260
+ value: e.ocrLoading,
1261
+ expression: "ocrLoading"
1262
+ }]
1263
+ }, [e._v("识别中"), r("a-icon", {
1264
+ attrs: {
1265
+ type: "sync",
1266
+ spin: ""
1267
+ }
1268
+ })], 1)], 2);
1269
+ }, xn = [];
1270
+ function On(e, t, r, a, i, n, u, p) {
1271
+ var l = typeof e == "function" ? e.options : e;
1272
+ t && (l.render = t, l.staticRenderFns = r, l._compiled = !0);
1273
+ var o;
1274
+ if (i && (o = i), o)
1275
+ if (l.functional) {
1276
+ l._injectStyles = o;
1277
+ var h = l.render;
1278
+ l.render = function(b, m) {
1279
+ return o.call(m), h(b, m);
1280
+ };
1281
+ } else {
1282
+ var v = l.beforeCreate;
1283
+ l.beforeCreate = v ? [].concat(v, o) : [o];
1284
+ }
1285
+ return {
1286
+ exports: e,
1287
+ options: l
1288
+ };
1289
+ }
1290
+ const Re = {};
1291
+ var An = /* @__PURE__ */ On(
1292
+ ce,
1293
+ wn,
1294
+ xn,
1295
+ !1,
1296
+ Sn
1297
+ );
1298
+ function Sn(e) {
1299
+ for (let t in Re)
1300
+ this[t] = Re[t];
1301
+ }
1302
+ const jn = /* @__PURE__ */ function() {
1303
+ return An.exports;
1304
+ }(), $n = {
1305
+ component: jn,
1306
+ componentMeta: mt
1307
+ }, In = [
1308
+ $n
1309
+ ], Ln = {
1310
+ materials: In
1311
+ };
1312
+ ke(ve.name, ve.version);
1313
+ export {
1314
+ Ln as material
1315
+ };