iking-web-ui-pro 0.2.3 → 0.2.5

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.
Files changed (51) hide show
  1. package/dist/IKDetailPreviewFiles/ik.index.es.js +522 -510
  2. package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
  3. package/dist/IKPreviewFile/ik.index.es.js +410 -398
  4. package/dist/IKPreviewFile/ik.index.umd.js +1 -1
  5. package/dist/IkApprovalProcess/ik.index.es.js +1 -0
  6. package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
  7. package/dist/IkApprovalProcess/style.css +1 -1
  8. package/dist/IkApprovalProcessDetail/ik.index.es.js +685 -672
  9. package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
  10. package/dist/IkApprovalProcessDetail/style.css +1 -1
  11. package/dist/IkDescription/ik.index.es.js +417 -405
  12. package/dist/IkDescription/ik.index.umd.js +1 -1
  13. package/dist/IkDescription/style.css +1 -1
  14. package/dist/IkOnlyOffice/ik.index.es.js +59 -58
  15. package/dist/IkOnlyOffice/ik.index.umd.js +1 -1
  16. package/dist/IkPreviewFileDialog/ik.index.es.js +85 -82
  17. package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
  18. package/dist/IkTemplateOfficeConfig/ik.index.es.js +12 -11
  19. package/dist/IkTemplateOfficeConfig/ik.index.umd.js +1 -1
  20. package/dist/IkUploadFile/ik.index.es.js +868 -853
  21. package/dist/IkUploadFile/ik.index.umd.js +1 -1
  22. package/dist/IkUploadFile/style.css +1 -1
  23. package/dist/IkUploadImage/ik.index.es.js +284 -275
  24. package/dist/IkUploadImage/ik.index.umd.js +1 -1
  25. package/dist/IkUploadImage/style.css +1 -1
  26. package/dist/Provider/ik.index.es.js +1607 -0
  27. package/dist/Provider/ik.index.umd.js +17 -0
  28. package/dist/index.es.js +39185 -37575
  29. package/dist/index.umd.js +95 -79
  30. package/dist/src/components/IKDetailPreviewFiles/index.d.ts +1 -1
  31. package/dist/src/components/IKDetailPreviewFiles/src/IKDetailPreviewFiles.vue.d.ts +1 -1
  32. package/dist/src/components/IKPreviewFile/index.d.ts +3 -3
  33. package/dist/src/components/IKPreviewFile/src/IkPreviewFile.vue.d.ts +1 -1
  34. package/dist/src/components/IkApprovalProcess/index.d.ts +1 -1
  35. package/dist/src/components/IkApprovalProcess/src/IKApprovalProcess.vue.d.ts +1 -1
  36. package/dist/src/components/IkDescription/index.d.ts +3 -3
  37. package/dist/src/components/IkDescription/src/IkDescription.vue.d.ts +1 -1
  38. package/dist/src/components/IkPreviewFileDialog/index.d.ts +1 -1
  39. package/dist/src/components/IkPreviewFileDialog/src/IkPreviewFileDialog.vue.d.ts +1 -1
  40. package/dist/src/components/IkTinymce/index.d.ts +1 -1
  41. package/dist/src/components/IkTinymce/src/index.vue.d.ts +1 -1
  42. package/dist/src/components/IkUploadFile/index.d.ts +3 -3
  43. package/dist/src/components/IkUploadFile/src/index.vue.d.ts +1 -1
  44. package/dist/src/components/IkUploadImage/index.d.ts +3 -3
  45. package/dist/src/components/IkUploadImage/src/index.vue.d.ts +1 -1
  46. package/dist/src/components/Provider/ProviderConfig.vue.d.ts +57 -0
  47. package/dist/src/components/Provider/index.d.ts +120 -0
  48. package/dist/src/components/index.d.ts +1 -0
  49. package/dist/src/utils/use-provider.d.ts +8 -0
  50. package/dist/style.css +1 -1
  51. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, computed as F, resolveComponent as z, openBlock as l, createElementBlock as d, normalizeClass as w, normalizeStyle as v, createCommentVNode as S, createElementVNode as I, createBlock as _, withCtx as m, createTextVNode as B, toDisplayString as $, createVNode as D, unref as y, mergeModels as H, useModel as W, ref as x, h as X, mergeProps as Y, createSlots as G, renderSlot as C, reactive as K, watch as J, nextTick as Q, Fragment as Z } from "vue";
1
+ import { defineComponent as y, computed as F, resolveComponent as z, openBlock as l, createElementBlock as p, normalizeClass as _, normalizeStyle as v, createCommentVNode as S, createElementVNode as I, createBlock as k, withCtx as h, createTextVNode as B, toDisplayString as O, createVNode as D, unref as w, mergeModels as H, useModel as W, ref as x, h as X, mergeProps as Y, createSlots as G, renderSlot as C, reactive as K, watch as J, nextTick as Q, Fragment as Z } from "vue";
2
2
  import { ikColor as ee, buildUUID as te } from "iking-utils-pro";
3
3
  const q = (n, e) => {
4
4
  if (n.install = (o) => {
@@ -14,8 +14,8 @@ const q = (n, e) => {
14
14
  o[r] = t;
15
15
  return o;
16
16
  }, ne = (n, e) => {
17
- var i, a, u, p;
18
- const o = (i = n == null ? void 0 : n.response) != null && i.data ? L((u = (a = n == null ? void 0 : n.response) == null ? void 0 : a.data) == null ? void 0 : u.suffix) : ((p = n.raw) == null ? void 0 : p.type) || L(n[e.suffix]), r = o == null ? void 0 : o.toLowerCase(), t = {
17
+ var i, a, u, f;
18
+ const o = (i = n == null ? void 0 : n.response) != null && i.data ? L((u = (a = n == null ? void 0 : n.response) == null ? void 0 : a.data) == null ? void 0 : u.suffix) : ((f = n.raw) == null ? void 0 : f.type) || L(n[e.suffix]), r = o == null ? void 0 : o.toLowerCase(), t = {
19
19
  sheet: "excel",
20
20
  excel: "excel",
21
21
  zip: "zip",
@@ -137,7 +137,7 @@ const q = (n, e) => {
137
137
  key: 1,
138
138
  class: "h-[1em] w-[1em]",
139
139
  "aria-hidden": "true"
140
- }, ue = ["xlink:href"], de = ["src"], pe = /* @__PURE__ */ h({
140
+ }, ue = ["xlink:href"], de = ["src"], pe = /* @__PURE__ */ y({
141
141
  name: "IkSvgIcon",
142
142
  __name: "index",
143
143
  props: {
@@ -196,12 +196,12 @@ const q = (n, e) => {
196
196
  });
197
197
  return (t, i) => {
198
198
  const a = z("el-tooltip"), u = z("el-button");
199
- return t.tableIconType === "icon" ? (l(), d("span", se, [
200
- t.notip || !t.title ? (l(), d(
199
+ return t.tableIconType === "icon" ? (l(), p("span", se, [
200
+ t.notip || !t.title ? (l(), p(
201
201
  "i",
202
202
  {
203
203
  key: 0,
204
- class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
204
+ class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
205
205
  [t.name]: o.value === "unocss",
206
206
  "show-bg": t.showBg || t.bg,
207
207
  default: t.size === "default",
@@ -218,29 +218,29 @@ const q = (n, e) => {
218
218
  },
219
219
  [
220
220
  S(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
221
- o.value === "iksig" ? (l(), d(
221
+ o.value === "iksig" ? (l(), p(
222
222
  "i",
223
223
  {
224
224
  key: 0,
225
- class: w(`iksig ${t.name}`),
225
+ class: _(`iksig ${t.name}`),
226
226
  style: v(r.value)
227
227
  },
228
228
  null,
229
229
  6
230
230
  /* CLASS, STYLE */
231
- )) : o.value === "svg" ? (l(), d("svg", re, [
231
+ )) : o.value === "svg" ? (l(), p("svg", re, [
232
232
  I("use", {
233
233
  "xlink:href": `#${t.name}`
234
234
  }, null, 8, ae)
235
- ])) : o.value === "img" ? (l(), d("img", {
235
+ ])) : o.value === "img" ? (l(), p("img", {
236
236
  key: 2,
237
237
  src: t.name,
238
238
  class: "h-[1em] w-[1em]"
239
- }, null, 8, le)) : (l(), d(
239
+ }, null, 8, le)) : (l(), p(
240
240
  "i",
241
241
  {
242
242
  key: 3,
243
- class: w(t.name),
243
+ class: _(t.name),
244
244
  style: v(r.value)
245
245
  },
246
246
  null,
@@ -250,16 +250,16 @@ const q = (n, e) => {
250
250
  ],
251
251
  6
252
252
  /* CLASS, STYLE */
253
- )) : (l(), _(a, {
253
+ )) : (l(), k(a, {
254
254
  key: 1,
255
255
  content: t.title,
256
256
  placement: "top"
257
257
  }, {
258
- default: m(() => [
258
+ default: h(() => [
259
259
  I(
260
260
  "i",
261
261
  {
262
- class: w(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
262
+ class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
263
263
  [t.name]: o.value === "unocss",
264
264
  "show-bg": t.showBg || t.bg,
265
265
  default: t.size === "default",
@@ -274,29 +274,29 @@ const q = (n, e) => {
274
274
  style: v(r.value)
275
275
  },
276
276
  [
277
- o.value === "iksig" ? (l(), d(
277
+ o.value === "iksig" ? (l(), p(
278
278
  "i",
279
279
  {
280
280
  key: 0,
281
- class: w(`iksig ${t.name}`),
281
+ class: _(`iksig ${t.name}`),
282
282
  style: v(r.value)
283
283
  },
284
284
  null,
285
285
  6
286
286
  /* CLASS, STYLE */
287
- )) : o.value === "svg" ? (l(), d("svg", ce, [
287
+ )) : o.value === "svg" ? (l(), p("svg", ce, [
288
288
  I("use", {
289
289
  "xlink:href": `#${t.name}`
290
290
  }, null, 8, ue)
291
- ])) : o.value === "img" ? (l(), d("img", {
291
+ ])) : o.value === "img" ? (l(), p("img", {
292
292
  key: 2,
293
293
  src: t.name,
294
294
  class: "h-[1em] w-[1em]"
295
- }, null, 8, de)) : (l(), d(
295
+ }, null, 8, de)) : (l(), p(
296
296
  "i",
297
297
  {
298
298
  key: 3,
299
- class: w(t.name),
299
+ class: _(t.name),
300
300
  style: v(r.value)
301
301
  },
302
302
  null,
@@ -311,13 +311,13 @@ const q = (n, e) => {
311
311
  _: 1
312
312
  /* STABLE */
313
313
  }, 8, ["content"]))
314
- ])) : (l(), _(u, {
314
+ ])) : (l(), k(u, {
315
315
  key: 1,
316
316
  type: ["warning", "error"].includes(t.type) ? "danger" : ""
317
317
  }, {
318
- default: m(() => [
318
+ default: h(() => [
319
319
  B(
320
- $(t.title),
320
+ O(t.title),
321
321
  1
322
322
  /* TEXT */
323
323
  )
@@ -328,10 +328,10 @@ const q = (n, e) => {
328
328
  };
329
329
  }
330
330
  });
331
- const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), O = q(fe), ge = {
331
+ const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), $ = q(fe), ge = {
332
332
  key: 0,
333
333
  class: "exit-main-page-maximize"
334
- }, ve = /* @__PURE__ */ h({
334
+ }, me = /* @__PURE__ */ y({
335
335
  __name: "CloseIcon",
336
336
  props: {
337
337
  showBg: {
@@ -344,15 +344,15 @@ const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), O = q(fe),
344
344
  }
345
345
  },
346
346
  setup(n) {
347
- return (e, o) => (l(), d("div", null, [
348
- n.showBg && n.fullscreen ? (l(), d("div", ge, [
349
- D(y(O), {
347
+ return (e, o) => (l(), p("div", null, [
348
+ n.showBg && n.fullscreen ? (l(), p("div", ge, [
349
+ D(w($), {
350
350
  name: "iksvg_guanbidanchuang",
351
351
  title: "关闭",
352
352
  size: 20,
353
353
  error: ""
354
354
  })
355
- ])) : (l(), _(y(O), {
355
+ ])) : (l(), k(w($), {
356
356
  key: 1,
357
357
  error: "",
358
358
  name: "iksvg_guanbidanchuang",
@@ -362,7 +362,7 @@ const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), O = q(fe),
362
362
  ]));
363
363
  }
364
364
  });
365
- const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { class: "base-header" }, ye = /* @__PURE__ */ h({
365
+ const ve = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), he = { class: "base-header" }, ye = /* @__PURE__ */ y({
366
366
  __name: "IkBaseDialog",
367
367
  props: /* @__PURE__ */ H({
368
368
  title: { default: "" },
@@ -385,45 +385,45 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
385
385
  setup(n) {
386
386
  const e = n, o = W(n, "modelValue"), r = x(e.fullscreen), t = () => {
387
387
  r.value = !r.value;
388
- }, i = h({
388
+ }, i = y({
389
389
  setup() {
390
- return () => X(me, {
390
+ return () => X(ve, {
391
391
  showBg: e.showCloseBg,
392
392
  fullscreen: e.fullscreen
393
393
  });
394
394
  }
395
395
  });
396
396
  return (a, u) => {
397
- const p = z("el-dialog");
398
- return l(), _(p, Y({
397
+ const f = z("el-dialog");
398
+ return l(), k(f, Y({
399
399
  modelValue: o.value,
400
400
  "onUpdate:modelValue": u[0] || (u[0] = (s) => o.value = s)
401
401
  }, a.$attrs, {
402
- "close-icon": y(i),
402
+ "close-icon": w(i),
403
403
  class: `ik-base-dialog ${a.noHeader ? "no-header" : ""} ${a.noFooter ? "no-footer" : ""}`,
404
404
  fullscreen: r.value,
405
405
  "modal-class": "baseDialog"
406
406
  }), G({
407
- icon: m(() => [
407
+ icon: h(() => [
408
408
  C(a.$slots, "title", {}, () => [
409
409
  B(
410
- $(a.title),
410
+ O(a.title),
411
411
  1
412
412
  /* TEXT */
413
413
  )
414
414
  ])
415
415
  ]),
416
- header: m(() => [
416
+ header: h(() => [
417
417
  I("div", he, [
418
418
  C(a.$slots, "header", {}, () => [
419
419
  B(
420
- $(a.title),
420
+ O(a.title),
421
421
  1
422
422
  /* TEXT */
423
423
  )
424
424
  ])
425
425
  ]),
426
- a.$attrs.showClose ? (l(), _(y(O), {
426
+ a.$attrs.showClose ? (l(), k(w($), {
427
427
  key: 0,
428
428
  onClick: t,
429
429
  name: r.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
@@ -431,7 +431,7 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
431
431
  title: r.value ? "退出全屏" : "全屏"
432
432
  }, null, 8, ["name", "title"])) : S("v-if", !0)
433
433
  ]),
434
- default: m(() => [
434
+ default: h(() => [
435
435
  C(a.$slots, "default")
436
436
  ]),
437
437
  _: 2
@@ -439,7 +439,7 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
439
439
  }, [
440
440
  a.$slots.footer ? {
441
441
  name: "footer",
442
- fn: m(() => [
442
+ fn: h(() => [
443
443
  C(a.$slots, "footer")
444
444
  ]),
445
445
  key: "0"
@@ -463,7 +463,7 @@ function _e(n, e, o, r) {
463
463
  a(g);
464
464
  }
465
465
  }
466
- function p(c) {
466
+ function f(c) {
467
467
  try {
468
468
  s(r.throw(c));
469
469
  } catch (g) {
@@ -471,7 +471,7 @@ function _e(n, e, o, r) {
471
471
  }
472
472
  }
473
473
  function s(c) {
474
- c.done ? i(c.value) : t(c.value).then(u, p);
474
+ c.done ? i(c.value) : t(c.value).then(u, f);
475
475
  }
476
476
  s((r = r.apply(n, e || [])).next());
477
477
  });
@@ -487,10 +487,10 @@ function ke(n, e) {
487
487
  }), a;
488
488
  function u(s) {
489
489
  return function(c) {
490
- return p([s, c]);
490
+ return f([s, c]);
491
491
  };
492
492
  }
493
- function p(s) {
493
+ function f(s) {
494
494
  if (r)
495
495
  throw new TypeError("Generator is already executing.");
496
496
  for (; a && (a = 0, s[0] && (o = 0)), o; )
@@ -551,8 +551,8 @@ var be = function(n, e) {
551
551
  var i = document.getElementById(e);
552
552
  if (i)
553
553
  var a = setInterval(function() {
554
- var p = i.getAttribute("loading");
555
- if (!p) {
554
+ var f = i.getAttribute("loading");
555
+ if (!f) {
556
556
  if (clearInterval(a), window.DocsAPI)
557
557
  return r(null);
558
558
  var s = U(e, n, r, t);
@@ -563,8 +563,8 @@ var be = function(n, e) {
563
563
  var u = U(e, n, r, t);
564
564
  document.body.appendChild(u);
565
565
  }
566
- } catch (p) {
567
- console.error(p);
566
+ } catch (f) {
567
+ console.error(f);
568
568
  }
569
569
  })];
570
570
  });
@@ -576,7 +576,7 @@ var be = function(n, e) {
576
576
  }, t.onerror = function(i) {
577
577
  t.removeAttribute("loading"), r(i);
578
578
  }, t.setAttribute("loading", ""), t;
579
- }, T = h({
579
+ }, T = y({
580
580
  name: "DocumentEditor",
581
581
  props: {
582
582
  id: {
@@ -747,11 +747,11 @@ var be = function(n, e) {
747
747
  });
748
748
  const Re = ["id"];
749
749
  function Se(n, e, o, r, t, i) {
750
- return l(), d("div", { id: n.id }, null, 8, Re);
750
+ return l(), p("div", { id: n.id }, null, 8, Re);
751
751
  }
752
752
  T.render = Se;
753
753
  T.__file = "src/components/DocumentEditor.vue";
754
- const Ce = /* @__PURE__ */ h({
754
+ const Ce = /* @__PURE__ */ y({
755
755
  __name: "IkOnlyOffice",
756
756
  props: {
757
757
  // 文件服务器的服务的地址
@@ -775,17 +775,18 @@ const Ce = /* @__PURE__ */ h({
775
775
  const e = n, o = x({
776
776
  width: "100%",
777
777
  height: "100%",
778
- ...e.configOptions || {}
778
+ ...e.configOptions || {},
779
+ ...e.configOptions
779
780
  }), r = () => {
780
781
  console.info("文档加载完成", e.configOptions);
781
782
  };
782
- return (t, i) => (l(), d(
783
+ return (t, i) => (l(), p(
783
784
  "div",
784
785
  {
785
786
  style: v({ height: e.officeHeight })
786
787
  },
787
788
  [
788
- D(y(T), {
789
+ D(w(T), {
789
790
  id: `${(/* @__PURE__ */ new Date()).getTime()}`,
790
791
  ref: "editorRef",
791
792
  "document-server-url": n.documentServerUrl,
@@ -798,7 +799,7 @@ const Ce = /* @__PURE__ */ h({
798
799
  ));
799
800
  }
800
801
  });
801
- const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie), De = /* @__PURE__ */ h({
802
+ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = q(Ie), De = /* @__PURE__ */ y({
802
803
  __name: "IkPreviewFileDialog",
803
804
  props: /* @__PURE__ */ H({
804
805
  file: {
@@ -846,9 +847,9 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
846
847
  office: !1,
847
848
  video: !1
848
849
  }), u = (s) => {
849
- var c, g, k, b, R, A, P;
850
+ var c, g, b, R, m, A, P;
850
851
  try {
851
- const f = ((c = s == null ? void 0 : s.response) == null ? void 0 : c.data) || s, j = f[r.value.url] || (f == null ? void 0 : f.id) || f.attachmentId, E = (g = f[r.value.suffix] || f.attachmentSuffix) == null ? void 0 : g.toLowerCase(), N = f[r.value.name] || (f == null ? void 0 : f.attachmentName);
852
+ const d = ((c = s == null ? void 0 : s.response) == null ? void 0 : c.data) || s, j = d[r.value.url] || (d == null ? void 0 : d.id) || d.attachmentId, E = (g = d[r.value.suffix] || d.attachmentSuffix) == null ? void 0 : g.toLowerCase(), N = d[r.value.name] || (d == null ? void 0 : d.attachmentName) || (d == null ? void 0 : d.originName);
852
853
  if (i.value = {
853
854
  ...s,
854
855
  name: s[r.value.name],
@@ -856,13 +857,13 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
856
857
  }, s && ne(s, r.value) === "image") {
857
858
  a.image = !0;
858
859
  return;
859
- } else if ((((k = e.onlyOfficeConfig) == null ? void 0 : k.accept) || e.onlyOfficeAccept).includes(E)) {
860
+ } else if ((((b = e.onlyOfficeConfig) == null ? void 0 : b.accept) || e.onlyOfficeAccept).includes(E)) {
860
861
  a.office = !0, t.value = {
861
862
  ...e.onlyOfficeConfig,
862
863
  editorConfig: {
863
- ...((b = e.onlyOfficeConfig) == null ? void 0 : b.editorConfig) || {},
864
+ ...((R = e.onlyOfficeConfig) == null ? void 0 : R.editorConfig) || {},
864
865
  customization: {
865
- ...((A = (R = e.onlyOfficeConfig) == null ? void 0 : R.editorConfig) == null ? void 0 : A.customization) || {},
866
+ ...((A = (m = e.onlyOfficeConfig) == null ? void 0 : m.editorConfig) == null ? void 0 : A.customization) || {},
866
867
  review: {
867
868
  reviewDisplay: "final"
868
869
  }
@@ -879,8 +880,8 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
879
880
  };
880
881
  return;
881
882
  }
882
- } catch (f) {
883
- console.info("预览错误: ", f);
883
+ } catch (d) {
884
+ console.info("预览错误: ", d);
884
885
  }
885
886
  };
886
887
  J([o, e.file], ([s, c]) => {
@@ -888,28 +889,28 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
888
889
  u(e.file);
889
890
  });
890
891
  });
891
- const p = () => {
892
+ const f = () => {
892
893
  o.value = !1, a.office = !1, a.image = !1, a.video = !1;
893
894
  };
894
895
  return (s, c) => {
895
- var k, b;
896
+ var b, R;
896
897
  const g = z("el-image-viewer");
897
- return o.value ? (l(), d(
898
+ return o.value ? (l(), p(
898
899
  Z,
899
900
  { key: 0 },
900
901
  [
901
- (k = i.value) != null && k.url && a.image ? (l(), _(g, {
902
+ (b = i.value) != null && b.url && a.image ? (l(), k(g, {
902
903
  key: 0,
903
- onClose: c[0] || (c[0] = (R) => {
904
+ onClose: c[0] || (c[0] = (m) => {
904
905
  i.value = null, a.image = !1;
905
906
  }),
906
907
  ref: "previewImgRef",
907
- "url-list": [(b = i.value) == null ? void 0 : b.url]
908
+ "url-list": [(R = i.value) == null ? void 0 : R.url]
908
909
  }, null, 8, ["url-list"])) : S("v-if", !0),
909
910
  S(" 文档类 "),
910
- D(y(we), {
911
+ D(w(we), {
911
912
  modelValue: a.office,
912
- "onUpdate:modelValue": c[1] || (c[1] = (R) => a.office = R),
913
+ "onUpdate:modelValue": c[1] || (c[1] = (m) => a.office = m),
913
914
  draggable: "",
914
915
  "no-footer": "",
915
916
  "no-header": "",
@@ -919,16 +920,18 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
919
920
  "close-on-click-modal": "",
920
921
  "close-on-press-escape": !1,
921
922
  "append-to-body": "",
922
- onClose: p,
923
+ onClose: f,
923
924
  "modal-class": "ik-only-preview-dialog"
924
925
  }, {
925
- default: m(() => [
926
- D(y(ze), {
927
- "config-options": t.value,
928
- "document-server-url": n.onlyOfficeConfig.serverUrl || n.onlyofficeServer,
929
- mode: "view"
930
- }, null, 8, ["config-options", "document-server-url"])
931
- ]),
926
+ default: h(() => {
927
+ var m;
928
+ return [
929
+ D(w(ze), {
930
+ "config-options": t.value,
931
+ "document-server-url": ((m = n.onlyOfficeConfig) == null ? void 0 : m.serverUrl) || n.onlyofficeServer
932
+ }, null, 8, ["config-options", "document-server-url"])
933
+ ];
934
+ }),
932
935
  _: 1
933
936
  /* STABLE */
934
937
  }, 8, ["modelValue"])
@@ -1 +1 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,C){"use strict";const w=(o,t)=>{if(o.install=i=>{for(const l of[o,...Object.values(t??{})])i.component(l.name,l)},t)for(const[i,l]of Object.entries(t))o[i]=l;return o},S=(o,t)=>t?t.startsWith("http")?t:`${o||location.origin}${t}`:"",k=(o,t)=>{const i=o.__vccOpts||o;for(const[l,n]of t)i[l]=n;return i},D=(o,t)=>{var s,a,d,p;const i=(s=o==null?void 0:o.response)!=null&&s.data?B((d=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:d.suffix):((p=o.raw)==null?void 0:p.type)||B(o[t.suffix]),l=i==null?void 0:i.toLowerCase(),n={sheet:"excel",excel:"excel",zip:"zip","application/x-compressed":"zip",image:"image",video:"video",audio:"audio",pdf:"pdf",text:"txt",txt:"txt",word:"word",ppt:"ppt",exe:"exe",json:"json"};for(let r in n)if(typeof l=="string"&&(l.includes(r)||l===r))return n[r];return"unknown"},q={".doc":"word",".docx":"word",".docxf":"word",".docm":"word",".dot":"word",".dotm":"word",".dotx":"word",".epub":"word",".fodt":"word",".htm":"word",".html":"word",".mht":"word",".odt":"word",".ott":"word",".rtf":"word",".djvu":"word",".oxps":"word",".oform":"word",".fb2":"word",".xml":"word",".xps":"word",".csv":"excel",".xls":"excel",".xlsx":"excel",".fods":"excel",".ods":"excel",".ots":"excel",".xlsb":"excel",".xlsm":"excel",".xlt":"excel",".xltm":"excel",".xltx":"excel",".fodp":"ppt",".odp":"ppt",".otp":"ppt",".pot":"ppt",".potm":"ppt",".potx":"ppt",".pps":"ppt",".ppsm":"ppt",".ppsx":"ppt",".ppt":"ppt",".pptm":"ppt",".pptx":"ppt",".zip":"zip",".rar":"zip",".7z":"zip",".apz":"zip",".ar":"zip",".bz":"zip",".car":"zip",".dar":"zip",".cpgz":"zip",".f":"zip",".ha":"zip",".hbc":"zip",".hbc2":"zip",".hbe":"zip",".hpk":"zip",".hyp":"zip",".png":"image",".jpg":"image",".jpeg":"image",".bmp":"image",".gif":"image",".webp":"image",".psd":"image",".svg":"image",".tiff":"image",".avi":"video",".wmv":"video",".mpeg":"video",".mp4":"video",".mpm4v":"video",".mov":"video",".asf":"video",".flv":"video",".f4v":"video",".rmvb":"video",".rm":"video",".3gp":"video",".vob":"video",".txt":"txt",".pdf":"pdf"},B=o=>{const t=o==null?void 0:o.toLocaleLowerCase(),i=t!=null&&t.startsWith(".")?t:`.${t}`;return i&&q[i]||"unknow"},V=o=>{let t="",i=["doc","docx"],l=["xls","xlsx"],n=["ppt","pptx"],s=["pdf"];return i.includes(o)&&(t="word"),l.includes(o)&&(t="cell"),n.includes(o)&&(t="slide"),s.includes(o)&&(t="text-pdf"),t},F={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$=["xlink:href"],T=["src"],A={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},M=["xlink:href"],P=["src"],j=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{default:"icon"}},setup(o){const t=o,i=e.computed(()=>{var n,s,a;return/^http?:\/\//.test(t.name)?"img":/i-[^:]+:[^:]+/.test(t.name)?"unocss":(n=t.name)!=null&&n.startsWith("iksig")?"iksig":(s=t.name)!=null&&s.includes(":")?"iconify":(a=t.name)!=null&&a.startsWith("iksvg")?"svg":"i"}),l=e.computed(()=>{const n=[];if(t.flip)switch(t.flip){case"horizontal":n.push("rotateY(180deg)");break;case"vertical":n.push("rotateX(180deg)");break;case"both":n.push("rotateX(180deg)"),n.push("rotateY(180deg)");break}t.rotate&&n.push(`rotate(${t.rotate%360}deg)`);const s={...t.color&&{color:t.color},...t.size&&{fontSize:typeof t.size=="number"?`${t.size}px`:t.size},...n.length&&{transform:n.join(" ")},padding:t.showBg||t.bg?t.padding:0,...t.color&&i.value!=="iksig"?{"--ik-color-icon-dark":t.color,"--ik-color-icon-light":t.colorLight||C.ikColor.setOpacity(t.color,t.opacity)}:{}};return t.width&&(s.width=s.height=typeof t.width=="number"?`${t.width}px`:t.width),s});return(n,s)=>{const a=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-button");return n.tableIconType==="icon"?(e.openBlock(),e.createElementBlock("span",F,[n.notip||!n.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active,disabled:n.disabled}]),style:e.normalizeStyle(l.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(l.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,$)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,T)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(l.value)},null,6))],6)):(e.openBlock(),e.createBlock(a,{key:1,content:n.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active}]),style:e.normalizeStyle(l.value)},[i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(l.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",A,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,M)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,P)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(l.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(d,{key:1,type:["warning","error"].includes(n.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["type"]))}}}),oe="",v=w(k(j,[["__scopeId","data-v-7d95dbf5"]])),N={key:0,class:"exit-main-page-maximize"},L=e.defineComponent({__name:"CloseIcon",props:{showBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(o){return(t,i)=>(e.openBlock(),e.createElementBlock("div",null,[o.showBg&&o.fullscreen?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(v),{name:"iksvg_guanbidanchuang",title:"关闭",size:20,error:""})])):(e.openBlock(),e.createBlock(e.unref(v),{key:1,error:"",name:"iksvg_guanbidanchuang",title:"关闭",size:20}))]))}}),se="",U=k(L,[["__scopeId","data-v-79f49df8"]]),H={class:"base-header"},W=e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},noHeader:{type:Boolean},noFooter:{type:Boolean},showCloseBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1,noHeader:!1,noFooter:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,i=e.useModel(o,"modelValue"),l=e.ref(t.fullscreen),n=()=>{l.value=!l.value},s=e.defineComponent({setup(){return()=>e.h(U,{showBg:t.showCloseBg,fullscreen:t.fullscreen})}});return(a,d)=>{const p=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(p,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=r=>i.value=r)},a.$attrs,{"close-icon":e.unref(s),class:`ik-base-dialog ${a.noHeader?"no-header":""} ${a.noFooter?"no-footer":""}`,fullscreen:l.value,"modal-class":"baseDialog"}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),header:e.withCtx(()=>[e.createElementVNode("div",H,[e.renderSlot(a.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),a.$attrs.showClose?(e.openBlock(),e.createBlock(e.unref(v),{key:0,onClick:n,name:l.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:l.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[a.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","close-icon","class","fullscreen"])}}}),le="",K=w(W);function X(o,t,i,l){function n(s){return s instanceof i?s:new i(function(a){a(s)})}return new(i||(i=Promise))(function(s,a){function d(c){try{r(l.next(c))}catch(m){a(m)}}function p(c){try{r(l.throw(c))}catch(m){a(m)}}function r(c){c.done?s(c.value):n(c.value).then(d,p)}r((l=l.apply(o,t||[])).next())})}function Y(o,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},l,n,s,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(r){return function(c){return p([r,c])}}function p(r){if(l)throw new TypeError("Generator is already executing.");for(;a&&(a=0,r[0]&&(i=0)),i;)try{if(l=1,n&&(s=r[0]&2?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[r[0]&2,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){i.label=r[1];break}if(r[0]===6&&i.label<s[1]){i.label=s[1],s=r;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(r);break}s[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(o,i)}catch(c){r=[6,c],n=0}finally{l=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var G=function(o,t){return X(void 0,void 0,void 0,function(){return Y(this,function(i){return[2,new Promise(function(l,n){try{if(window.DocsAPI)return l(null);var s=document.getElementById(t);if(s)var a=setInterval(function(){var p=s.getAttribute("loading");if(!p){if(clearInterval(a),window.DocsAPI)return l(null);var r=R(t,o,l,n);s.remove(),document.body.appendChild(r)}},500);else{var d=R(t,o,l,n);document.body.appendChild(d)}}catch(p){console.error(p)}})]})})},R=function(o,t,i,l){var n=document.createElement("script");return n.id=o,n.type="text/javascript",n.src=t,n.async=!0,n.onload=function(){n.removeAttribute("loading"),i(null)},n.onerror=function(s){n.removeAttribute("loading"),l(s)},n.setAttribute("loading",""),n},_=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var o=this,t=this.documentServerUrl;t.endsWith("/")||(t+="/");var i="".concat(t,"web-apps/apps/api/documents/api.js");G(i,"onlyoffice-api-script").then(function(){return o.onLoad()}).catch(function(){o.onError(-2)})},unmounted:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0)},watch:{config:{handler:function(o,t){this.onChangeProps()},deep:!0},document_fileType:function(o,t){this.onChangeProps()},document_title:function(o,t){this.onChangeProps()},documentType:function(o,t){this.onChangeProps()},editorConfig_lang:function(o,t){this.onChangeProps()},height:function(o,t){this.onChangeProps()},type:function(o,t){this.onChangeProps()},width:function(o,t){this.onChangeProps()}},methods:{onLoad:function(){var o,t;try{var i=this.id||"";if(window.DocsAPI||this.onError(-3),!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[i]){console.log("Skip loading. Instance already exists",i);return}!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances||(window.DocEditor={instances:{}});var l=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),n=window.DocsAPI.DocEditor(i,l);window.DocEditor.instances[i]=n}catch(s){console.error(s),this.onError(-1)}},onError:function(o){var t;switch(o){case-2:t="Error load DocsAPI from "+this.documentServerUrl;break;case-3:t="DocsAPI is not defined";break;default:t="Unknown error loading component",o=-1}typeof this.onLoadComponentError>"u"?console.error(t):this.onLoadComponentError(o,t)},onAppReady:function(){var o=this.id||"";this.events_onAppReady(window.DocEditor.instances[o])},onChangeProps:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const J=["id"];function Q(o,t,i,l,n,s){return e.openBlock(),e.createElementBlock("div",{id:o.id},null,8,J)}_.render=Q,_.__file="src/components/DocumentEditor.vue";const Z=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(o){const t=o,i=e.ref({width:"100%",height:"100%",...t.configOptions||{}}),l=()=>{console.info("文档加载完成",t.configOptions)};return(n,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:t.officeHeight})},[e.createVNode(e.unref(_),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":o.documentServerUrl,config:i.value,events_onDocumentReady:l},null,8,["id","document-server-url","config"])],4))}}),re="",ee=w(k(Z,[["__scopeId","data-v-fe959cd8"]])),te=e.defineComponent({__name:"IkPreviewFileDialog",props:e.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(o){const t=o,i=e.useModel(o,"show"),l=e.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...t.field})),n=e.ref(null),s=e.ref(null),a=e.reactive({image:!1,office:!1,video:!1}),d=r=>{var c,m,g,h,y,E,x;try{const u=((c=r==null?void 0:r.response)==null?void 0:c.data)||r,I=u[l.value.url]||(u==null?void 0:u.id)||u.attachmentId,b=(m=u[l.value.suffix]||u.attachmentSuffix)==null?void 0:m.toLowerCase(),ne=u[l.value.name]||(u==null?void 0:u.attachmentName);if(s.value={...r,name:r[l.value.name],url:S(t.loadUrl,I)},r&&D(r,l.value)==="image"){a.image=!0;return}else if((((g=t.onlyOfficeConfig)==null?void 0:g.accept)||t.onlyOfficeAccept).includes(b)){a.office=!0,n.value={...t.onlyOfficeConfig,editorConfig:{...((h=t.onlyOfficeConfig)==null?void 0:h.editorConfig)||{},customization:{...((E=(y=t.onlyOfficeConfig)==null?void 0:y.editorConfig)==null?void 0:E.customization)||{},review:{reviewDisplay:"final"}}},document:{key:C.buildUUID(),title:ne,url:S(t.loadUrl,I),fileType:b,...((x=t.onlyOfficeConfig)==null?void 0:x.document)||{}},documentType:V(b)};return}}catch(u){console.info("预览错误: ",u)}};e.watch([i,t.file],([r,c])=>{r&&e.nextTick(()=>{d(t.file)})});const p=()=>{i.value=!1,a.office=!1,a.image=!1,a.video=!1};return(r,c)=>{var g,h;const m=e.resolveComponent("el-image-viewer");return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(g=s.value)!=null&&g.url&&a.image?(e.openBlock(),e.createBlock(m,{key:0,onClose:c[0]||(c[0]=y=>{s.value=null,a.image=!1}),ref:"previewImgRef","url-list":[(h=s.value)==null?void 0:h.url]},null,8,["url-list"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 文档类 "),e.createVNode(e.unref(K),{modelValue:a.office,"onUpdate:modelValue":c[1]||(c[1]=y=>a.office=y),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:p,"modal-class":"ik-only-preview-dialog"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee),{"config-options":n.value,"document-server-url":o.onlyOfficeConfig.serverUrl||o.onlyofficeServer,mode:"view"},null,8,["config-options","document-server-url"])]),_:1},8,["modelValue"])],64)):e.createCommentVNode("v-if",!0)}}}),ce="",z=w(te);f.IkPreviewFileDialog=z,f.default=z,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,C){"use strict";const w=(o,t)=>{if(o.install=i=>{for(const r of[o,...Object.values(t??{})])i.component(r.name,r)},t)for(const[i,r]of Object.entries(t))o[i]=r;return o},S=(o,t)=>t?t.startsWith("http")?t:`${o||location.origin}${t}`:"",k=(o,t)=>{const i=o.__vccOpts||o;for(const[r,n]of t)i[r]=n;return i},D=(o,t)=>{var s,a,d,u;const i=(s=o==null?void 0:o.response)!=null&&s.data?B((d=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:d.suffix):((u=o.raw)==null?void 0:u.type)||B(o[t.suffix]),r=i==null?void 0:i.toLowerCase(),n={sheet:"excel",excel:"excel",zip:"zip","application/x-compressed":"zip",image:"image",video:"video",audio:"audio",pdf:"pdf",text:"txt",txt:"txt",word:"word",ppt:"ppt",exe:"exe",json:"json"};for(let l in n)if(typeof r=="string"&&(r.includes(l)||r===l))return n[l];return"unknown"},q={".doc":"word",".docx":"word",".docxf":"word",".docm":"word",".dot":"word",".dotm":"word",".dotx":"word",".epub":"word",".fodt":"word",".htm":"word",".html":"word",".mht":"word",".odt":"word",".ott":"word",".rtf":"word",".djvu":"word",".oxps":"word",".oform":"word",".fb2":"word",".xml":"word",".xps":"word",".csv":"excel",".xls":"excel",".xlsx":"excel",".fods":"excel",".ods":"excel",".ots":"excel",".xlsb":"excel",".xlsm":"excel",".xlt":"excel",".xltm":"excel",".xltx":"excel",".fodp":"ppt",".odp":"ppt",".otp":"ppt",".pot":"ppt",".potm":"ppt",".potx":"ppt",".pps":"ppt",".ppsm":"ppt",".ppsx":"ppt",".ppt":"ppt",".pptm":"ppt",".pptx":"ppt",".zip":"zip",".rar":"zip",".7z":"zip",".apz":"zip",".ar":"zip",".bz":"zip",".car":"zip",".dar":"zip",".cpgz":"zip",".f":"zip",".ha":"zip",".hbc":"zip",".hbc2":"zip",".hbe":"zip",".hpk":"zip",".hyp":"zip",".png":"image",".jpg":"image",".jpeg":"image",".bmp":"image",".gif":"image",".webp":"image",".psd":"image",".svg":"image",".tiff":"image",".avi":"video",".wmv":"video",".mpeg":"video",".mp4":"video",".mpm4v":"video",".mov":"video",".asf":"video",".flv":"video",".f4v":"video",".rmvb":"video",".rm":"video",".3gp":"video",".vob":"video",".txt":"txt",".pdf":"pdf"},B=o=>{const t=o==null?void 0:o.toLocaleLowerCase(),i=t!=null&&t.startsWith(".")?t:`.${t}`;return i&&q[i]||"unknow"},V=o=>{let t="",i=["doc","docx"],r=["xls","xlsx"],n=["ppt","pptx"],s=["pdf"];return i.includes(o)&&(t="word"),r.includes(o)&&(t="cell"),n.includes(o)&&(t="slide"),s.includes(o)&&(t="text-pdf"),t},F={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$=["xlink:href"],T=["src"],A={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},M=["xlink:href"],P=["src"],j=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{default:"icon"}},setup(o){const t=o,i=e.computed(()=>{var n,s,a;return/^http?:\/\//.test(t.name)?"img":/i-[^:]+:[^:]+/.test(t.name)?"unocss":(n=t.name)!=null&&n.startsWith("iksig")?"iksig":(s=t.name)!=null&&s.includes(":")?"iconify":(a=t.name)!=null&&a.startsWith("iksvg")?"svg":"i"}),r=e.computed(()=>{const n=[];if(t.flip)switch(t.flip){case"horizontal":n.push("rotateY(180deg)");break;case"vertical":n.push("rotateX(180deg)");break;case"both":n.push("rotateX(180deg)"),n.push("rotateY(180deg)");break}t.rotate&&n.push(`rotate(${t.rotate%360}deg)`);const s={...t.color&&{color:t.color},...t.size&&{fontSize:typeof t.size=="number"?`${t.size}px`:t.size},...n.length&&{transform:n.join(" ")},padding:t.showBg||t.bg?t.padding:0,...t.color&&i.value!=="iksig"?{"--ik-color-icon-dark":t.color,"--ik-color-icon-light":t.colorLight||C.ikColor.setOpacity(t.color,t.opacity)}:{}};return t.width&&(s.width=s.height=typeof t.width=="number"?`${t.width}px`:t.width),s});return(n,s)=>{const a=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-button");return n.tableIconType==="icon"?(e.openBlock(),e.createElementBlock("span",F,[n.notip||!n.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active,disabled:n.disabled}]),style:e.normalizeStyle(r.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(r.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,$)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,T)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(r.value)},null,6))],6)):(e.openBlock(),e.createBlock(a,{key:1,content:n.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active}]),style:e.normalizeStyle(r.value)},[i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(r.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",A,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,M)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,P)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(r.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(d,{key:1,type:["warning","error"].includes(n.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["type"]))}}}),oe="",v=w(k(j,[["__scopeId","data-v-7d95dbf5"]])),N={key:0,class:"exit-main-page-maximize"},L=e.defineComponent({__name:"CloseIcon",props:{showBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(o){return(t,i)=>(e.openBlock(),e.createElementBlock("div",null,[o.showBg&&o.fullscreen?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(v),{name:"iksvg_guanbidanchuang",title:"关闭",size:20,error:""})])):(e.openBlock(),e.createBlock(e.unref(v),{key:1,error:"",name:"iksvg_guanbidanchuang",title:"关闭",size:20}))]))}}),se="",U=k(L,[["__scopeId","data-v-79f49df8"]]),H={class:"base-header"},W=e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},noHeader:{type:Boolean},noFooter:{type:Boolean},showCloseBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1,noHeader:!1,noFooter:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,i=e.useModel(o,"modelValue"),r=e.ref(t.fullscreen),n=()=>{r.value=!r.value},s=e.defineComponent({setup(){return()=>e.h(U,{showBg:t.showCloseBg,fullscreen:t.fullscreen})}});return(a,d)=>{const u=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(u,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=l=>i.value=l)},a.$attrs,{"close-icon":e.unref(s),class:`ik-base-dialog ${a.noHeader?"no-header":""} ${a.noFooter?"no-footer":""}`,fullscreen:r.value,"modal-class":"baseDialog"}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),header:e.withCtx(()=>[e.createElementVNode("div",H,[e.renderSlot(a.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),a.$attrs.showClose?(e.openBlock(),e.createBlock(e.unref(v),{key:0,onClick:n,name:r.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:r.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[a.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","close-icon","class","fullscreen"])}}}),re="",K=w(W);function X(o,t,i,r){function n(s){return s instanceof i?s:new i(function(a){a(s)})}return new(i||(i=Promise))(function(s,a){function d(c){try{l(r.next(c))}catch(m){a(m)}}function u(c){try{l(r.throw(c))}catch(m){a(m)}}function l(c){c.done?s(c.value):n(c.value).then(d,u)}l((r=r.apply(o,t||[])).next())})}function Y(o,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(s=l[0]&2?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){i.label=l[1];break}if(l[0]===6&&i.label<s[1]){i.label=s[1],s=l;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(l);break}s[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(o,i)}catch(c){l=[6,c],n=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var G=function(o,t){return X(void 0,void 0,void 0,function(){return Y(this,function(i){return[2,new Promise(function(r,n){try{if(window.DocsAPI)return r(null);var s=document.getElementById(t);if(s)var a=setInterval(function(){var u=s.getAttribute("loading");if(!u){if(clearInterval(a),window.DocsAPI)return r(null);var l=R(t,o,r,n);s.remove(),document.body.appendChild(l)}},500);else{var d=R(t,o,r,n);document.body.appendChild(d)}}catch(u){console.error(u)}})]})})},R=function(o,t,i,r){var n=document.createElement("script");return n.id=o,n.type="text/javascript",n.src=t,n.async=!0,n.onload=function(){n.removeAttribute("loading"),i(null)},n.onerror=function(s){n.removeAttribute("loading"),r(s)},n.setAttribute("loading",""),n},_=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var o=this,t=this.documentServerUrl;t.endsWith("/")||(t+="/");var i="".concat(t,"web-apps/apps/api/documents/api.js");G(i,"onlyoffice-api-script").then(function(){return o.onLoad()}).catch(function(){o.onError(-2)})},unmounted:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0)},watch:{config:{handler:function(o,t){this.onChangeProps()},deep:!0},document_fileType:function(o,t){this.onChangeProps()},document_title:function(o,t){this.onChangeProps()},documentType:function(o,t){this.onChangeProps()},editorConfig_lang:function(o,t){this.onChangeProps()},height:function(o,t){this.onChangeProps()},type:function(o,t){this.onChangeProps()},width:function(o,t){this.onChangeProps()}},methods:{onLoad:function(){var o,t;try{var i=this.id||"";if(window.DocsAPI||this.onError(-3),!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[i]){console.log("Skip loading. Instance already exists",i);return}!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances||(window.DocEditor={instances:{}});var r=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),n=window.DocsAPI.DocEditor(i,r);window.DocEditor.instances[i]=n}catch(s){console.error(s),this.onError(-1)}},onError:function(o){var t;switch(o){case-2:t="Error load DocsAPI from "+this.documentServerUrl;break;case-3:t="DocsAPI is not defined";break;default:t="Unknown error loading component",o=-1}typeof this.onLoadComponentError>"u"?console.error(t):this.onLoadComponentError(o,t)},onAppReady:function(){var o=this.id||"";this.events_onAppReady(window.DocEditor.instances[o])},onChangeProps:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const J=["id"];function Q(o,t,i,r,n,s){return e.openBlock(),e.createElementBlock("div",{id:o.id},null,8,J)}_.render=Q,_.__file="src/components/DocumentEditor.vue";const Z=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(o){const t=o,i=e.ref({width:"100%",height:"100%",...t.configOptions||{},...t.configOptions}),r=()=>{console.info("文档加载完成",t.configOptions)};return(n,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:t.officeHeight})},[e.createVNode(e.unref(_),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":o.documentServerUrl,config:i.value,events_onDocumentReady:r},null,8,["id","document-server-url","config"])],4))}}),le="",ee=w(k(Z,[["__scopeId","data-v-98d51ef9"]])),te=e.defineComponent({__name:"IkPreviewFileDialog",props:e.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(o){const t=o,i=e.useModel(o,"show"),r=e.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...t.field})),n=e.ref(null),s=e.ref(null),a=e.reactive({image:!1,office:!1,video:!1}),d=l=>{var c,m,h,y,g,E,x;try{const p=((c=l==null?void 0:l.response)==null?void 0:c.data)||l,I=p[r.value.url]||(p==null?void 0:p.id)||p.attachmentId,b=(m=p[r.value.suffix]||p.attachmentSuffix)==null?void 0:m.toLowerCase(),ne=p[r.value.name]||(p==null?void 0:p.attachmentName)||(p==null?void 0:p.originName);if(s.value={...l,name:l[r.value.name],url:S(t.loadUrl,I)},l&&D(l,r.value)==="image"){a.image=!0;return}else if((((h=t.onlyOfficeConfig)==null?void 0:h.accept)||t.onlyOfficeAccept).includes(b)){a.office=!0,n.value={...t.onlyOfficeConfig,editorConfig:{...((y=t.onlyOfficeConfig)==null?void 0:y.editorConfig)||{},customization:{...((E=(g=t.onlyOfficeConfig)==null?void 0:g.editorConfig)==null?void 0:E.customization)||{},review:{reviewDisplay:"final"}}},document:{key:C.buildUUID(),title:ne,url:S(t.loadUrl,I),fileType:b,...((x=t.onlyOfficeConfig)==null?void 0:x.document)||{}},documentType:V(b)};return}}catch(p){console.info("预览错误: ",p)}};e.watch([i,t.file],([l,c])=>{l&&e.nextTick(()=>{d(t.file)})});const u=()=>{i.value=!1,a.office=!1,a.image=!1,a.video=!1};return(l,c)=>{var h,y;const m=e.resolveComponent("el-image-viewer");return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(h=s.value)!=null&&h.url&&a.image?(e.openBlock(),e.createBlock(m,{key:0,onClose:c[0]||(c[0]=g=>{s.value=null,a.image=!1}),ref:"previewImgRef","url-list":[(y=s.value)==null?void 0:y.url]},null,8,["url-list"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 文档类 "),e.createVNode(e.unref(K),{modelValue:a.office,"onUpdate:modelValue":c[1]||(c[1]=g=>a.office=g),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:u,"modal-class":"ik-only-preview-dialog"},{default:e.withCtx(()=>{var g;return[e.createVNode(e.unref(ee),{"config-options":n.value,"document-server-url":((g=o.onlyOfficeConfig)==null?void 0:g.serverUrl)||o.onlyofficeServer},null,8,["config-options","document-server-url"])]}),_:1},8,["modelValue"])],64)):e.createCommentVNode("v-if",!0)}}}),ce="",z=w(te);f.IkPreviewFileDialog=z,f.default=z,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});