handy-uploader 2.0.2 → 2.0.3

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.
@@ -1,69 +1,76 @@
1
- import { defineComponent as te, computed as ie, resolveComponent as f, openBlock as c, createElementBlock as V, createVNode as r, toDisplayString as x, reactive as ge, watch as I, onMounted as xe, withCtx as o, Fragment as R, renderList as Z, createBlock as h, unref as se, createTextVNode as _, createElementVNode as P, mergeProps as ee, createCommentVNode as z, withDirectives as ve, vShow as he, nextTick as Fe, withModifiers as De, ref as ae, onBeforeMount as Ce, onDeactivated as ze } from "vue";
2
- const ne = /* @__PURE__ */ te({
3
- __name: "SelectFileIconType",
4
- props: {
5
- fileFormat: {},
6
- size: { default: 30 }
7
- },
8
- setup(a) {
9
- const n = a, e = ie(() => ({
10
- pdf: { icon: "mdi-file-pdf-outline", color: "red darken-1" },
11
- doc: { icon: "mdi-file-word-outline", color: "blue darken-1" },
12
- docx: { icon: "mdi-file-word-outline", color: "blue darken-1" },
13
- odt: { icon: "mdi-file-word-outline", color: "blue darken-1" },
14
- jpg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
15
- jpeg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
16
- png: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
17
- tif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
18
- bmp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
19
- xls: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
20
- xlsx: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
21
- ppt: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
22
- pptx: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
23
- pptm: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
24
- mp4: { icon: "mdi-file-video-outline", color: "red lighten-1" },
25
- mov: { icon: "mdi-file-video-outline", color: "red lighten-1" },
26
- flv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
27
- wmv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
28
- avi: { icon: "mdi-file-video-outline", color: "red lighten-1" },
29
- dwg: { icon: "mdi-file-cad", color: "indigo lighten-2" },
30
- zip: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
31
- rar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
32
- "7-zip": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
33
- txt: { icon: "mdi-script-text-outline", color: "light-green darken-3" }
34
- })[n.fileFormat] || {
35
- icon: "mdi-file-question-outline",
36
- color: "indigo lighten-1"
37
- });
38
- return (t, p) => {
39
- const D = f("v-icon");
40
- return c(), V("div", null, [
41
- r(D, {
42
- size: n.size,
43
- color: e.value.color,
44
- textContent: x(e.value.icon)
45
- }, null, 8, ["size", "color", "textContent"])
46
- ]);
47
- };
48
- }
49
- });
50
- function de(a) {
51
- const n = a / 1024, e = n / 1024;
1
+ import { defineComponent as ee, computed as le, resolveComponent as g, createElementBlock as V, openBlock as m, createVNode as r, withCtx as a, createTextVNode as w, toDisplayString as x, reactive as _e, watch as E, onMounted as ze, Fragment as O, renderList as X, createBlock as b, createElementVNode as A, unref as Z, createCommentVNode as B, mergeProps as Y, withDirectives as xe, vShow as we, nextTick as Te, ref as ae, onBeforeMount as $e, onDeactivated as Le } from "vue";
2
+ function ce(o) {
3
+ const i = o / 1024, e = i / 1024;
52
4
  return e >= 1 ? {
53
5
  text: `${e.toFixed(2)} MB`,
54
6
  color: e > 10 ? "red" : e > 5 ? "orange" : "green"
55
7
  } : {
56
- text: `${n.toFixed(2)} KB`,
57
- color: n > 1e3 ? "orange" : "green"
8
+ text: `${i.toFixed(2)} KB`,
9
+ color: i > 1e3 ? "orange" : "green"
58
10
  };
59
11
  }
60
- function re(a, n) {
12
+ function re(o, i) {
61
13
  var t;
62
- const e = ((t = a.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
63
- return ["jpg", "jpeg", "png", "gif", "bmp", "svg", "webp", "tiff"].includes(e) || n != null && n.startsWith("image/") ? "image" : ["pdf", "doc", "docx", "txt", "rtf", "odt"].includes(e) ? "document" : ["xls", "xlsx", "csv", "ods"].includes(e) ? "spreadsheet" : ["ppt", "pptx", "odp"].includes(e) ? "presentation" : ["zip", "rar", "7z", "tar", "gz"].includes(e) ? "archive" : ["mp4", "avi", "mov", "wmv", "flv", "webm"].includes(e) ? "video" : ["mp3", "wav", "flac", "aac", "ogg"].includes(e) ? "audio" : "file";
14
+ const e = ((t = o.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
15
+ return ["jpg", "jpeg", "png", "gif", "bmp", "svg", "webp", "tiff"].includes(e) || i != null && i.startsWith("image/") ? "image" : ["pdf", "doc", "docx", "txt", "rtf", "odt"].includes(e) ? "document" : ["xls", "xlsx", "csv", "ods"].includes(e) ? "spreadsheet" : ["ppt", "pptx", "odp"].includes(e) ? "presentation" : ["zip", "rar", "7z", "tar", "gz"].includes(e) ? "archive" : ["mp4", "avi", "mov", "wmv", "flv", "webm"].includes(e) ? "video" : ["mp3", "wav", "flac", "aac", "ogg"].includes(e) ? "audio" : "unknown";
64
16
  }
65
- function Te(a, n) {
66
- const e = re(a, n), t = {
17
+ const de = {
18
+ // PDF
19
+ pdf: { icon: "mdi-file-pdf-box", color: "red darken-1" },
20
+ // Word Documents
21
+ doc: { icon: "mdi-file-word-outline", color: "blue darken-1" },
22
+ docx: { icon: "mdi-file-word-outline", color: "blue darken-1" },
23
+ odt: { icon: "mdi-file-word-outline", color: "blue darken-1" },
24
+ // Images
25
+ jpg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
26
+ jpeg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
27
+ png: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
28
+ gif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
29
+ bmp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
30
+ tif: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
31
+ tiff: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
32
+ svg: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
33
+ webp: { icon: "mdi-file-image-outline", color: "deep-purple darken-1" },
34
+ // Excel/Spreadsheets
35
+ xls: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
36
+ xlsx: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
37
+ csv: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
38
+ ods: { icon: "mdi-file-excel-outline", color: "teal darken-1" },
39
+ // PowerPoint/Presentations
40
+ ppt: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
41
+ pptx: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
42
+ pptm: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
43
+ odp: { icon: "mdi-file-powerpoint-outline", color: "orange darken-3" },
44
+ // Videos
45
+ mp4: { icon: "mdi-file-video-outline", color: "red lighten-1" },
46
+ mov: { icon: "mdi-file-video-outline", color: "red lighten-1" },
47
+ flv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
48
+ wmv: { icon: "mdi-file-video-outline", color: "red lighten-1" },
49
+ avi: { icon: "mdi-file-video-outline", color: "red lighten-1" },
50
+ webm: { icon: "mdi-file-video-outline", color: "red lighten-1" },
51
+ // Audio
52
+ mp3: { icon: "mdi-file-music-outline", color: "purple darken-1" },
53
+ wav: { icon: "mdi-file-music-outline", color: "purple darken-1" },
54
+ flac: { icon: "mdi-file-music-outline", color: "purple darken-1" },
55
+ aac: { icon: "mdi-file-music-outline", color: "purple darken-1" },
56
+ ogg: { icon: "mdi-file-music-outline", color: "purple darken-1" },
57
+ // CAD
58
+ dwg: { icon: "mdi-file-cad", color: "indigo lighten-2" },
59
+ // Archives
60
+ zip: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
61
+ rar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
62
+ "7z": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
63
+ "7-zip": { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
64
+ tar: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
65
+ gz: { icon: "mdi-folder-zip-outline", color: "lime lighten-1" },
66
+ // Text files
67
+ txt: { icon: "mdi-script-text-outline", color: "light-green darken-3" },
68
+ rtf: { icon: "mdi-script-text-outline", color: "light-green darken-3" },
69
+ // Unknown/Default file type
70
+ unknown: { icon: "mdi-file-question-outline", color: "grey darken-1" }
71
+ };
72
+ function kt(o, i) {
73
+ const e = re(o, i), t = {
67
74
  image: { icon: "mdi-file-image", color: "blue" },
68
75
  document: { icon: "mdi-file-document", color: "red" },
69
76
  spreadsheet: { icon: "mdi-file-excel", color: "green" },
@@ -71,22 +78,34 @@ function Te(a, n) {
71
78
  archive: { icon: "mdi-folder-zip", color: "purple" },
72
79
  video: { icon: "mdi-file-video", color: "pink" },
73
80
  audio: { icon: "mdi-file-music", color: "teal" },
74
- file: { icon: "mdi-file", color: "grey" }
81
+ file: { icon: "mdi-file", color: "grey" },
82
+ unknown: { icon: "mdi-file-question-outline", color: "grey darken-1" }
75
83
  };
76
- return t[e] || t.file;
84
+ return t[e] || t.unknown;
85
+ }
86
+ function ue(o) {
87
+ var e;
88
+ const i = (e = o.split(".").pop()) == null ? void 0 : e.toLowerCase();
89
+ return i && de[i] || de.unknown;
90
+ }
91
+ function me(o) {
92
+ return ue(o).icon;
77
93
  }
78
- function be(a, n) {
79
- return re(a, n) === "image";
94
+ function fe(o) {
95
+ return ue(o).color;
80
96
  }
81
- function Ae(a, n) {
82
- return a <= n;
97
+ function pe(o, i) {
98
+ return re(o, i) === "image";
83
99
  }
84
- function Le(a, n) {
85
- return a < n;
100
+ function Ve(o, i) {
101
+ return o <= i;
86
102
  }
87
- function _e(a) {
103
+ function Be(o, i) {
104
+ return o < i;
105
+ }
106
+ function Fe(o) {
88
107
  var t;
89
- const n = ((t = a.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
108
+ const i = ((t = o.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
90
109
  return {
91
110
  // Image types
92
111
  jpg: "image/jpeg",
@@ -113,55 +132,86 @@ function _e(a) {
113
132
  // Archive types
114
133
  zip: "application/zip",
115
134
  rar: "application/x-rar-compressed"
116
- }[n] || "application/octet-stream";
135
+ }[i] || "application/octet-stream";
117
136
  }
118
- function Ve(a, n) {
119
- const e = a.replace(/^data:image\/[a-zA-Z]+;base64,/, "");
120
- return `data:${n.startsWith("image/") ? n : `image/${n}`};base64,${e}`;
137
+ function Se(o, i) {
138
+ if (!o || !i)
139
+ return console.warn("constructImageDataUrl: missing base64 or format", { hasBase64: !!o, format: i }), "";
140
+ const e = o.replace(/^data:[^;]+;base64,/, "");
141
+ return `data:${i.startsWith("image/") ? i : `image/${i}`};base64,${e}`;
121
142
  }
122
- function $e(a, n = 0.8, e = 1920, t = 1080) {
123
- return new Promise((p, D) => {
124
- const L = document.createElement("canvas"), v = L.getContext("2d"), g = new Image();
125
- g.onload = () => {
126
- let { width: y, height: w } = g;
127
- if (y > e || w > t) {
128
- const T = Math.min(e / y, t / w);
129
- y *= T, w *= T;
143
+ function Ie(o, i = 0.8, e = 1920, t = 1080) {
144
+ return new Promise((c, T) => {
145
+ const L = document.createElement("canvas"), k = L.getContext("2d"), C = new Image();
146
+ C.onload = () => {
147
+ let { width: h, height: D } = C;
148
+ if (h > e || D > t) {
149
+ const U = Math.min(e / h, t / D);
150
+ h *= U, D *= U;
130
151
  }
131
- L.width = y, L.height = w, v == null || v.drawImage(g, 0, 0, y, w);
132
- const $ = L.toDataURL("image/jpeg", n);
133
- p($);
134
- }, g.onerror = () => D(new Error("Failed to load image for compression"));
135
- const U = new FileReader();
136
- U.onload = (y) => {
137
- var w;
138
- g.src = (w = y.target) == null ? void 0 : w.result;
139
- }, U.onerror = () => D(new Error("Failed to read file")), U.readAsDataURL(a);
152
+ L.width = h, L.height = D, k == null || k.drawImage(C, 0, 0, h, D);
153
+ const $ = L.toDataURL("image/jpeg", i);
154
+ c($);
155
+ }, C.onerror = () => T(new Error("Failed to load image for compression"));
156
+ const _ = new FileReader();
157
+ _.onload = (h) => {
158
+ var D;
159
+ C.src = (D = h.target) == null ? void 0 : D.result;
160
+ }, _.onerror = () => T(new Error("Failed to read file")), _.readAsDataURL(o);
140
161
  });
141
162
  }
142
- function fe(a) {
143
- return new Promise((n, e) => {
163
+ function ye(o) {
164
+ return new Promise((i, e) => {
144
165
  const t = new FileReader();
145
166
  t.onload = () => {
146
- const p = t.result, D = p.split(",")[1] || p;
147
- n(D);
148
- }, t.onerror = () => e(new Error("Failed to read file")), t.readAsDataURL(a);
167
+ const c = t.result, T = c.split(",")[1] || c;
168
+ i(T);
169
+ }, t.onerror = () => e(new Error("Failed to read file")), t.readAsDataURL(o);
149
170
  });
150
171
  }
151
- const Se = {
172
+ const ie = /* @__PURE__ */ ee({
173
+ __name: "SelectFileIconType",
174
+ props: {
175
+ fileFormat: {},
176
+ size: { default: 30 }
177
+ },
178
+ setup(o) {
179
+ const i = o, e = le(() => {
180
+ const t = `file.${i.fileFormat}`;
181
+ return ue(t);
182
+ });
183
+ return (t, c) => {
184
+ const T = g("v-icon");
185
+ return m(), V("div", null, [
186
+ r(T, {
187
+ size: i.size,
188
+ color: e.value.color
189
+ }, {
190
+ default: a(() => [
191
+ w(x(e.value.icon), 1)
192
+ ]),
193
+ _: 1
194
+ }, 8, ["size", "color"])
195
+ ]);
196
+ };
197
+ }
198
+ }), Ue = {
199
+ key: 0,
200
+ style: { height: "200px", display: "flex", "align-items": "center", "justify-content": "center", "background-color": "#f5f5f5", overflow: "hidden" }
201
+ }, Ee = ["src", "onError"], Pe = {
152
202
  key: 1,
153
203
  style: { height: "200px", "background-color": "#f5f5f5", position: "relative", overflow: "hidden", display: "flex", "align-items": "center", "justify-content": "center" }
154
- }, Be = ["src", "onError"], Ue = {
204
+ }, Me = ["src", "onError"], je = {
155
205
  key: 1,
156
206
  style: { width: "100%", height: "100%", background: "#e0e0e0", display: "flex", "align-items": "center", "justify-content": "center" }
157
- }, Ee = {
207
+ }, He = {
158
208
  class: "d-flex justify-center align-center",
159
209
  style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", background: "rgba(0,0,0,0.7)", "border-radius": "50%", width: "60px", height: "60px", cursor: "pointer" }
160
- }, Ie = {
210
+ }, Ne = {
161
211
  key: 2,
162
212
  class: "d-flex justify-center align-center",
163
213
  style: { height: "200px", "background-color": "#f5f5f5" }
164
- }, Me = { class: "BYekan" }, Pe = { class: "BYekan" }, je = { key: 0 }, ue = /* @__PURE__ */ te({
214
+ }, Re = { class: "BYekan" }, Oe = { class: "BYekan" }, We = { key: 0 }, ge = /* @__PURE__ */ ee({
165
215
  __name: "ThumbnailUploader",
166
216
  props: {
167
217
  lang: { default: "en" },
@@ -178,212 +228,230 @@ const Se = {
178
228
  tile: { type: Boolean, default: !1 }
179
229
  },
180
230
  emits: ["openDeleteDialog", "openEditDocumentDialog"],
181
- setup(a, { emit: n }) {
182
- const e = a, t = n, p = (l) => {
183
- const i = re(l) === "video";
184
- return console.log("🎥 Checking if video file:", l, "result:", i, "fileType:", re(l)), i;
185
- }, D = (l) => Ve(l.base64, l.format), L = (l) => {
186
- var i;
231
+ setup(o, { emit: i }) {
232
+ const e = (n) => {
233
+ const l = pe(n);
234
+ return console.log("🔍 isImageFile check:", n, "", l), l;
235
+ }, t = o, c = i, T = (n) => {
236
+ const l = re(n) === "video";
237
+ return console.log("🎥 Checking if video file:", n, "result:", l, "fileType:", re(n)), l;
238
+ }, L = (n) => {
239
+ var p;
240
+ if (!n.base64 || !n.format)
241
+ return console.error("❌ Missing base64 or format for:", n.name, { base64: !!n.base64, format: n.format }), "";
242
+ const l = Se(n.base64, n.format);
243
+ return console.log("🖼️ Image source for:", n.name, {
244
+ format: n.format,
245
+ base64Length: ((p = n.base64) == null ? void 0 : p.length) || 0,
246
+ srcLength: l.length,
247
+ srcPreview: l.substring(0, 100) + "..."
248
+ }), l;
249
+ }, k = (n) => {
250
+ var l;
187
251
  console.error("Image failed to load:", {
188
- name: l.name,
189
- format: l.format,
190
- base64Length: ((i = l.base64) == null ? void 0 : i.length) || 0
252
+ name: n.name,
253
+ format: n.format,
254
+ base64Length: ((l = n.base64) == null ? void 0 : l.length) || 0
191
255
  });
192
- }, v = ge(/* @__PURE__ */ new Map()), g = (l) => (console.log("🎬 Starting video thumbnail generation for:", l.name), new Promise((i, u) => {
193
- var G;
194
- const m = document.createElement("video"), k = document.createElement("canvas"), S = k.getContext("2d");
195
- if (!S) {
196
- console.error("❌ Canvas context not available"), u(new Error("Canvas context not available"));
256
+ }, C = _e(/* @__PURE__ */ new Map()), _ = (n) => (console.log("🎬 Starting video thumbnail generation for:", n.name), new Promise((l, p) => {
257
+ var W;
258
+ const s = document.createElement("video"), F = document.createElement("canvas"), y = F.getContext("2d");
259
+ if (!y) {
260
+ console.error("❌ Canvas context not available"), p(new Error("Canvas context not available"));
197
261
  return;
198
262
  }
199
- m.crossOrigin = "anonymous", m.preload = "metadata", m.muted = !0, m.onloadedmetadata = () => {
263
+ s.crossOrigin = "anonymous", s.preload = "metadata", s.muted = !0, s.onloadedmetadata = () => {
200
264
  if (console.log("📹 Video metadata loaded:", {
201
- duration: m.duration,
202
- width: m.videoWidth,
203
- height: m.videoHeight,
204
- readyState: m.readyState,
205
- networkState: m.networkState
206
- }), m.duration === 0 || isNaN(m.duration)) {
207
- console.error("❌ Invalid video duration:", m.duration);
208
- const K = U(l);
209
- y.delete(K), u(new Error("Invalid video duration"));
265
+ duration: s.duration,
266
+ width: s.videoWidth,
267
+ height: s.videoHeight,
268
+ readyState: s.readyState,
269
+ networkState: s.networkState
270
+ }), s.duration === 0 || isNaN(s.duration)) {
271
+ console.error("❌ Invalid video duration:", s.duration);
272
+ const K = h(n);
273
+ D.delete(K), p(new Error("Invalid video duration"));
210
274
  return;
211
275
  }
212
- if (m.videoWidth === 0 || m.videoHeight === 0) {
213
- console.error("❌ Invalid video dimensions:", m.videoWidth, "x", m.videoHeight);
214
- const K = U(l);
215
- y.delete(K), u(new Error("Invalid video dimensions"));
276
+ if (s.videoWidth === 0 || s.videoHeight === 0) {
277
+ console.error("❌ Invalid video dimensions:", s.videoWidth, "x", s.videoHeight);
278
+ const K = h(n);
279
+ D.delete(K), p(new Error("Invalid video dimensions"));
216
280
  return;
217
281
  }
218
- k.width = m.videoWidth, k.height = m.videoHeight;
219
- const E = Math.min(1, m.duration * 0.1);
220
- console.log("⏰ Seeking to time:", E, "of total duration:", m.duration), m.currentTime = E;
221
- }, m.onseeked = () => {
222
- console.log("🎯 Video seeked successfully to:", m.currentTime);
282
+ F.width = s.videoWidth, F.height = s.videoHeight;
283
+ const N = Math.min(1, s.duration * 0.1);
284
+ console.log("⏰ Seeking to time:", N, "of total duration:", s.duration), s.currentTime = N;
285
+ }, s.onseeked = () => {
286
+ console.log("🎯 Video seeked successfully to:", s.currentTime);
223
287
  try {
224
288
  console.log("🖼️ Canvas setup:", {
225
- width: k.width,
226
- height: k.height,
227
- videoCurrentTime: m.currentTime,
228
- videoReadyState: m.readyState
229
- }), S.drawImage(m, 0, 0, k.width, k.height);
230
- const K = S.getImageData(0, 0, k.width, k.height).data.some((Y) => Y !== 0);
289
+ width: F.width,
290
+ height: F.height,
291
+ videoCurrentTime: s.currentTime,
292
+ videoReadyState: s.readyState
293
+ }), y.drawImage(s, 0, 0, F.width, F.height);
294
+ const K = y.getImageData(0, 0, F.width, F.height).data.some((te) => te !== 0);
231
295
  console.log("🎨 Canvas content check:", K ? "Has content" : "Empty/transparent");
232
- const A = k.toDataURL("image/jpeg", 0.8);
296
+ const G = F.toDataURL("image/jpeg", 0.8);
233
297
  console.log("✅ Generated thumbnail:", {
234
- dataUrlLength: A.length,
235
- startsWithData: A.startsWith("data:image/jpeg"),
236
- preview: A.substring(0, 50) + "..."
237
- }), i(A);
238
- } catch (E) {
239
- console.error("❌ Error during thumbnail generation:", E), u(E);
298
+ dataUrlLength: G.length,
299
+ startsWithData: G.startsWith("data:image/jpeg"),
300
+ preview: G.substring(0, 50) + "..."
301
+ }), l(G);
302
+ } catch (N) {
303
+ console.error("❌ Error during thumbnail generation:", N), p(N);
240
304
  }
241
- }, m.onabort = () => {
242
- console.warn("⚠️ Video loading aborted"), u(new Error("Video loading aborted"));
243
- }, m.onstalled = () => {
305
+ }, s.onabort = () => {
306
+ console.warn("⚠️ Video loading aborted"), p(new Error("Video loading aborted"));
307
+ }, s.onstalled = () => {
244
308
  console.warn("⚠️ Video loading stalled");
245
- }, m.onerror = (E) => {
246
- console.error("❌ Video failed to load for thumbnail generation:", E), u(new Error("Video failed to load for thumbnail generation"));
247
- }, m.onloadstart = () => {
309
+ }, s.onerror = (N) => {
310
+ console.error("❌ Video failed to load for thumbnail generation:", N), p(new Error("Video failed to load for thumbnail generation"));
311
+ }, s.onloadstart = () => {
248
312
  console.log("🔄 Video load started");
249
- }, m.oncanplay = () => {
313
+ }, s.oncanplay = () => {
250
314
  console.log("▶️ Video can play");
251
315
  };
252
- const F = ((G = l.base64) == null ? void 0 : G.replace(/^data:[^;]+;base64,/, "")) || "";
253
- let B;
254
- l.format.startsWith("video/") ? B = l.format : (B = _e(l.name), B.startsWith("video/") || (B = `video/${l.format}`));
255
- const M = `data:${B};base64,${F}`;
316
+ const S = ((W = n.base64) == null ? void 0 : W.replace(/^data:[^;]+;base64,/, "")) || "";
317
+ let I;
318
+ n.format.startsWith("video/") ? I = n.format : (I = Fe(n.name), I.startsWith("video/") || (I = `video/${n.format}`));
319
+ const J = `data:${I};base64,${S}`;
256
320
  console.log("🔗 Setting video source:", {
257
- fileName: l.name,
258
- format: l.format,
259
- mimeType: B,
260
- base64Length: F.length,
261
- videoSrcLength: M.length
262
- }), m.src = M;
263
- })), U = (l) => {
264
- var i;
265
- return `${l.name}_${(i = l.base64) == null ? void 0 : i.substring(0, 50)}`;
321
+ fileName: n.name,
322
+ format: n.format,
323
+ mimeType: I,
324
+ base64Length: S.length,
325
+ videoSrcLength: J.length
326
+ }), s.src = J;
327
+ })), h = (n) => {
328
+ var l;
329
+ return `${n.name}_${(l = n.base64) == null ? void 0 : l.substring(0, 50)}`;
266
330
  };
267
- ie(() => (console.log("🔄 Video thumbnails computed updated:", Array.from(v.keys())), v));
268
- const y = /* @__PURE__ */ new Set(), w = (l) => {
269
- const i = U(l);
270
- if (console.log("🔍 Getting video thumbnail for:", l.name, "cache key:", i), v.has(i))
271
- return console.log("💾 Returning cached thumbnail for:", l.name), v.get(i);
272
- if (y.has(i)) {
273
- console.log("⏳ Thumbnail already being generated for:", l.name);
331
+ le(() => (console.log("🔄 Video thumbnails computed updated:", Array.from(C.keys())), C));
332
+ const D = /* @__PURE__ */ new Set(), $ = (n) => {
333
+ const l = h(n);
334
+ if (console.log("🔍 Getting video thumbnail for:", n.name, "cache key:", l), C.has(l))
335
+ return console.log("💾 Returning cached thumbnail for:", n.name), C.get(l);
336
+ if (D.has(l)) {
337
+ console.log("⏳ Thumbnail already being generated for:", n.name);
274
338
  return;
275
339
  }
276
- console.log("🚀 No cached thumbnail, generating new one for:", l.name), y.add(i), g(l).then((u) => {
277
- console.log("✅ Thumbnail generated and cached for:", l.name), v.set(i, u), y.delete(i), Fe(() => {
278
- console.log("🔄 UI update triggered for:", l.name);
340
+ console.log("🚀 No cached thumbnail, generating new one for:", n.name), D.add(l), _(n).then((p) => {
341
+ console.log("✅ Thumbnail generated and cached for:", n.name), C.set(l, p), D.delete(l), Te(() => {
342
+ console.log("🔄 UI update triggered for:", n.name);
279
343
  });
280
- }).catch((u) => {
281
- console.error("❌ Failed to generate video thumbnail for:", l.name, u), y.delete(i);
344
+ }).catch((p) => {
345
+ console.error("❌ Failed to generate video thumbnail for:", n.name, p), D.delete(l);
282
346
  });
283
- }, $ = (l) => {
347
+ }, U = (n) => {
284
348
  console.error("Video thumbnail failed to load:", {
285
- name: l.name,
286
- format: l.format
349
+ name: n.name,
350
+ format: n.format
287
351
  });
288
- const i = U(l);
289
- v.delete(i);
290
- }, T = (l) => Te(l), j = (l) => l.tags.length > 0 || !!l.description, H = (l) => {
291
- l.showDetailState = !l.showDetailState;
292
- }, O = (l, i) => {
293
- t("openDeleteDialog", l, i);
294
- }, d = (l, i) => {
295
- t("openEditDocumentDialog", l, i);
296
- }, s = () => {
297
- console.log("🎯 Generating thumbnails for videos, total attachments:", e.documentAttachment.length);
298
- const l = e.documentAttachment.filter((i) => p(i.file.name));
299
- console.log("📹 Found video attachments:", l.length, l.map((i) => i.file.name)), l.forEach((i) => {
300
- console.log("🎬 Processing video:", i.file.name), w(i.file);
352
+ const l = h(n);
353
+ C.delete(l);
354
+ }, j = (n) => ({
355
+ icon: me(n),
356
+ color: fe(n)
357
+ }), P = (n) => n.tags.length > 0 || !!n.description, H = (n) => {
358
+ n.showDetailState = !n.showDetailState;
359
+ }, u = (n, l) => {
360
+ c("openDeleteDialog", n, l);
361
+ }, f = (n, l) => {
362
+ c("openEditDocumentDialog", n, l);
363
+ }, d = () => {
364
+ console.log("🎯 Generating thumbnails for videos, total attachments:", t.documentAttachment.length);
365
+ const n = t.documentAttachment.filter((l) => T(l.file.name));
366
+ console.log("📹 Found video attachments:", n.length, n.map((l) => l.file.name)), n.forEach((l) => {
367
+ console.log("🎬 Processing video:", l.file.name), $(l.file);
301
368
  });
302
369
  };
303
- return I(() => e.documentAttachment, s, { immediate: !0 }), xe(s), (l, i) => {
304
- const u = f("v-img"), m = f("v-icon"), k = f("v-card-subtitle"), S = f("v-chip"), F = f("v-divider"), B = f("v-btn"), M = f("v-tooltip"), G = f("v-spacer"), E = f("v-card-actions"), K = f("v-chip-group"), A = f("v-card-text"), Y = f("v-expand-transition"), q = f("v-card"), J = f("v-col"), oe = f("v-row");
305
- return c(), V("div", null, [
370
+ return E(() => t.documentAttachment, d, { immediate: !0 }), ze(d), (n, l) => {
371
+ const p = g("v-icon"), s = g("v-card-subtitle"), F = g("v-chip"), y = g("v-divider"), S = g("v-btn"), I = g("v-tooltip"), J = g("v-spacer"), W = g("v-card-actions"), N = g("v-chip-group"), K = g("v-card-text"), G = g("v-expand-transition"), te = g("v-card"), se = g("v-col"), oe = g("v-row");
372
+ return m(), V("div", null, [
306
373
  r(oe, null, {
307
- default: o(() => [
308
- (c(!0), V(R, null, Z(l.documentAttachment, (C, Q) => (c(), h(J, {
374
+ default: a(() => [
375
+ (m(!0), V(O, null, X(o.documentAttachment, (z, Q) => (m(), b(se, {
309
376
  key: `attachment-${Q}`,
310
377
  cols: "12",
311
- md: l.cols,
378
+ md: o.cols,
312
379
  xs: "12"
313
380
  }, {
314
- default: o(() => [
315
- r(q, {
316
- shaped: l.shaped,
317
- outlined: l.outlined,
318
- raised: l.raised,
319
- tile: l.tile,
381
+ default: a(() => [
382
+ r(te, {
383
+ shaped: o.shaped,
384
+ outlined: o.outlined,
385
+ raised: o.raised,
386
+ tile: o.tile,
320
387
  class: "mx-auto",
321
388
  "max-width": "344"
322
389
  }, {
323
- default: o(() => [
324
- se(be)(C.file.name) ? (c(), h(u, {
325
- key: 0,
326
- src: D(C.file),
327
- height: "200px",
328
- onError: (W) => L(C.file)
329
- }, null, 8, ["src", "onError"])) : p(C.file.name) ? (c(), V("div", Se, [
330
- w(C.file) ? (c(), V("img", {
390
+ default: a(() => [
391
+ e(z.file.name) ? (m(), V("div", Ue, [
392
+ A("img", {
393
+ src: L(z.file),
394
+ style: { "max-width": "100%", "max-height": "100%", "object-fit": "contain" },
395
+ onError: (R) => k(z.file)
396
+ }, null, 40, Ee)
397
+ ])) : T(z.file.name) ? (m(), V("div", Pe, [
398
+ $(z.file) ? (m(), V("img", {
331
399
  key: 0,
332
- src: w(C.file),
400
+ src: $(z.file),
333
401
  style: { width: "100%", height: "100%", "object-fit": "cover" },
334
- onError: (W) => $(C.file)
335
- }, null, 40, Be)) : (c(), V("div", Ue, [
336
- r(m, {
402
+ onError: (R) => U(z.file)
403
+ }, null, 40, Me)) : (m(), V("div", je, [
404
+ r(p, {
337
405
  size: "60",
338
406
  color: "grey"
339
407
  }, {
340
- default: o(() => i[0] || (i[0] = [
341
- _("mdi-video")
342
- ])),
408
+ default: a(() => [...l[0] || (l[0] = [
409
+ w("mdi-video", -1)
410
+ ])]),
343
411
  _: 1
344
412
  })
345
413
  ])),
346
- P("div", Ee, [
347
- r(m, {
414
+ A("div", He, [
415
+ r(p, {
348
416
  color: "white",
349
417
  size: "30"
350
418
  }, {
351
- default: o(() => i[1] || (i[1] = [
352
- _("mdi-play")
353
- ])),
419
+ default: a(() => [...l[1] || (l[1] = [
420
+ w("mdi-play", -1)
421
+ ])]),
354
422
  _: 1
355
423
  })
356
424
  ])
357
- ])) : (c(), V("div", Ie, [
358
- r(m, {
425
+ ])) : (m(), V("div", Ne, [
426
+ r(p, {
359
427
  size: "120",
360
- color: T(C.file.name).color
428
+ color: j(z.file.name).color
361
429
  }, {
362
- default: o(() => [
363
- _(x(T(C.file.name).icon), 1)
430
+ default: a(() => [
431
+ w(x(j(z.file.name).icon), 1)
364
432
  ]),
365
433
  _: 2
366
434
  }, 1032, ["color"])
367
435
  ])),
368
- r(k, { class: "text-truncate py-2" }, {
369
- default: o(() => [
370
- _(x(C.file.name), 1)
436
+ r(s, { class: "text-truncate py-2" }, {
437
+ default: a(() => [
438
+ w(x(z.file.name), 1)
371
439
  ]),
372
440
  _: 2
373
441
  }, 1024),
374
- r(k, { class: "pt-2 pb-3" }, {
375
- default: o(() => [
376
- r(S, {
377
- color: se(de)(C.file.size).color,
442
+ r(s, { class: "pt-2 pb-3" }, {
443
+ default: a(() => [
444
+ r(F, {
445
+ color: Z(ce)(z.file.size).color,
378
446
  label: "",
379
447
  "text-color": "white"
380
448
  }, {
381
- default: o(() => [
382
- _(x(se(de)(C.file.size).text) + " ", 1),
383
- r(m, { right: "" }, {
384
- default: o(() => i[2] || (i[2] = [
385
- _("mdi-harddisk")
386
- ])),
449
+ default: a(() => [
450
+ w(x(Z(ce)(z.file.size).text) + " ", 1),
451
+ r(p, { right: "" }, {
452
+ default: a(() => [...l[2] || (l[2] = [
453
+ w("mdi-harddisk", -1)
454
+ ])]),
387
455
  _: 1
388
456
  })
389
457
  ]),
@@ -392,115 +460,113 @@ const Se = {
392
460
  ]),
393
461
  _: 2
394
462
  }, 1024),
395
- r(F, { class: "mx-4" }),
396
- r(E, { style: { padding: "0" } }, {
397
- default: o(() => [
398
- r(M, { right: "" }, {
399
- activator: o(({ props: W }) => [
400
- l.deletePermission ? (c(), h(B, ee({
463
+ r(y, { class: "mx-4" }),
464
+ r(W, { style: { padding: "0" } }, {
465
+ default: a(() => [
466
+ r(I, { right: "" }, {
467
+ activator: a(({ props: R }) => [
468
+ o.deletePermission ? (m(), b(S, Y({
401
469
  key: 0,
402
470
  text: "",
403
- fab: "",
404
- ref_for: !0
405
- }, W, {
406
- onClick: (le) => O(Q, "")
471
+ fab: ""
472
+ }, { ref_for: !0 }, R, {
473
+ onClick: (ne) => u(Q, "")
407
474
  }), {
408
- default: o(() => [
409
- r(m, { color: "red" }, {
410
- default: o(() => i[3] || (i[3] = [
411
- _("mdi-trash-can-outline")
412
- ])),
475
+ default: a(() => [
476
+ r(p, { color: "red" }, {
477
+ default: a(() => [...l[3] || (l[3] = [
478
+ w("mdi-trash-can-outline", -1)
479
+ ])]),
413
480
  _: 1
414
481
  })
415
482
  ]),
416
- _: 2
417
- }, 1040, ["onClick"])) : z("", !0)
483
+ _: 1
484
+ }, 16, ["onClick"])) : B("", !0)
418
485
  ]),
419
- default: o(() => [
420
- P("span", Me, x(l.selectedLang[l.lang].delete), 1)
486
+ default: a(() => [
487
+ A("span", Re, x(o.selectedLang[o.lang].delete), 1)
421
488
  ]),
422
489
  _: 2
423
490
  }, 1024),
424
- r(M, { right: "" }, {
425
- activator: o(({ props: W }) => [
426
- l.editPermission ? (c(), h(B, ee({
491
+ r(I, { right: "" }, {
492
+ activator: a(({ props: R }) => [
493
+ o.editPermission ? (m(), b(S, Y({
427
494
  key: 0,
428
495
  text: "",
429
- fab: "",
430
- ref_for: !0
431
- }, W, {
432
- onClick: (le) => d(C, Q)
496
+ fab: ""
497
+ }, { ref_for: !0 }, R, {
498
+ onClick: (ne) => f(z, Q)
433
499
  }), {
434
- default: o(() => [
435
- r(m, { color: "green" }, {
436
- default: o(() => i[4] || (i[4] = [
437
- _("mdi-pencil-outline")
438
- ])),
500
+ default: a(() => [
501
+ r(p, { color: "green" }, {
502
+ default: a(() => [...l[4] || (l[4] = [
503
+ w("mdi-pencil-outline", -1)
504
+ ])]),
439
505
  _: 1
440
506
  })
441
507
  ]),
442
- _: 2
443
- }, 1040, ["onClick"])) : z("", !0)
508
+ _: 1
509
+ }, 16, ["onClick"])) : B("", !0)
444
510
  ]),
445
- default: o(() => [
446
- P("span", Pe, x(l.selectedLang[l.lang].edit), 1)
511
+ default: a(() => [
512
+ A("span", Oe, x(o.selectedLang[o.lang].edit), 1)
447
513
  ]),
448
514
  _: 2
449
515
  }, 1024),
450
- r(G),
451
- j(C.file) ? (c(), h(B, {
516
+ r(J),
517
+ P(z.file) ? (m(), b(S, {
452
518
  key: 0,
453
519
  icon: "",
454
- onClick: (W) => H(C.file)
520
+ onClick: (R) => H(z.file)
455
521
  }, {
456
- default: o(() => [
457
- r(m, null, {
458
- default: o(() => [
459
- _(x(C.file.showDetailState ? "mdi-chevron-up" : "mdi-chevron-down"), 1)
522
+ default: a(() => [
523
+ r(p, null, {
524
+ default: a(() => [
525
+ w(x(z.file.showDetailState ? "mdi-chevron-up" : "mdi-chevron-down"), 1)
460
526
  ]),
461
527
  _: 2
462
528
  }, 1024)
463
529
  ]),
464
530
  _: 2
465
- }, 1032, ["onClick"])) : z("", !0)
531
+ }, 1032, ["onClick"])) : B("", !0)
466
532
  ]),
467
533
  _: 2
468
534
  }, 1024),
469
- r(Y, null, {
470
- default: o(() => [
471
- j(C.file) ? ve((c(), V("div", je, [
472
- r(F),
473
- C.file.tags.length ? (c(), h(K, {
535
+ r(G, null, {
536
+ default: a(() => [
537
+ P(z.file) ? xe((m(), V("div", We, [
538
+ r(y),
539
+ z.file.tags.length ? (m(), b(N, {
474
540
  key: 0,
475
541
  multiple: "",
476
542
  "active-class": "primary--text",
477
543
  class: "pa-2"
478
544
  }, {
479
- default: o(() => [
480
- (c(!0), V(R, null, Z(C.file.tags, (W, le) => (c(), h(S, {
481
- key: `tag-${le}`,
545
+ default: a(() => [
546
+ (m(!0), V(O, null, X(z.file.tags, (R, ne) => (m(), b(F, {
547
+ key: `tag-${ne}`,
482
548
  class: "ma-1"
483
549
  }, {
484
- default: o(() => [
485
- _(x(W), 1)
550
+ default: a(() => [
551
+ w(x(R), 1)
486
552
  ]),
487
553
  _: 2
488
554
  }, 1024))), 128))
489
555
  ]),
490
556
  _: 2
491
- }, 1024)) : z("", !0),
492
- C.file.description ? (c(), h(A, {
557
+ }, 1024)) : B("", !0),
558
+ z.file.description ? (m(), b(K, {
493
559
  key: 1,
494
560
  class: "text-justify"
495
561
  }, {
496
- default: o(() => [
497
- _(x(C.file.description), 1)
562
+ default: a(() => [
563
+ w(x(z.file.description), 1)
498
564
  ]),
499
565
  _: 2
500
- }, 1024)) : z("", !0)
566
+ }, 1024)) : B("", !0)
501
567
  ], 512)), [
502
- [he, C.file.showDetailState]
503
- ]) : z("", !0)
568
+ [we, z.file.showDetailState]
569
+ ]) : B("", !0)
504
570
  ]),
505
571
  _: 2
506
572
  }, 1024)
@@ -516,10 +582,16 @@ const Se = {
516
582
  ]);
517
583
  };
518
584
  }
519
- }), Ne = {
520
- key: 0,
521
- class: "text-left"
522
- }, He = { class: "text-left" }, Re = { class: "text-left" }, We = { class: "text-left" }, Oe = { key: 0 }, Ke = { class: "BYekan" }, ce = /* @__PURE__ */ te({
585
+ }), Ke = {
586
+ class: "text-left",
587
+ style: { width: "80px" }
588
+ }, qe = { class: "text-center" }, Ge = {
589
+ class: "text-left",
590
+ style: { width: "120px" }
591
+ }, Ye = {
592
+ class: "text-left",
593
+ style: { width: "120px" }
594
+ }, Xe = { class: "text-center pa-3" }, Je = { class: "text-left pa-3" }, Qe = { class: "text-left pa-3" }, Ze = { class: "text-center pa-2" }, et = { class: "d-flex justify-center ga-1" }, tt = /* @__PURE__ */ ee({
523
595
  __name: "TableUploader",
524
596
  props: {
525
597
  documentAttachment: {},
@@ -534,275 +606,174 @@ const Se = {
534
606
  selectedLang: {}
535
607
  },
536
608
  emits: ["openDeleteDialog", "openEditDocumentDialog"],
537
- setup(a, { emit: n }) {
538
- const e = a, t = n, p = (v) => {
539
- var g;
540
- return v && ((g = v.split(".").pop()) == null ? void 0 : g.toLowerCase()) || "";
541
- }, D = (v, g) => {
542
- t("openDeleteDialog", v, g);
543
- }, L = (v, g) => {
544
- t("openEditDocumentDialog", v, g);
609
+ setup(o, { emit: i }) {
610
+ const e = o, t = i, c = (_) => _ ? pe(_) : !1, T = (_) => {
611
+ const h = _ / 1e3, D = h / 1024;
612
+ return D >= 1 ? `${D.toFixed(1)} MB` : `${h.toFixed(1)} KB`;
613
+ }, L = (_) => {
614
+ const h = _ / 1024e3;
615
+ return h < 1 ? "success" : h < 5 ? "warning" : "error";
616
+ }, k = (_, h) => {
617
+ t("openDeleteDialog", _, h);
618
+ }, C = (_, h) => {
619
+ t("openEditDocumentDialog", _, h);
545
620
  };
546
- return (v, g) => {
547
- const U = f("v-img"), y = f("v-icon"), w = f("v-chip"), $ = f("v-card-subtitle"), T = f("v-btn"), j = f("v-tooltip"), H = f("v-simple-table"), O = f("v-col"), d = f("v-row");
548
- return c(), V("div", null, [
549
- r(d, null, {
550
- default: o(() => [
551
- r(O, {
552
- cols: "12",
553
- lg: "12",
554
- md: "12",
555
- xs: "12"
556
- }, {
557
- default: o(() => [
621
+ return (_, h) => {
622
+ const D = g("v-img"), $ = g("v-icon"), U = g("v-tooltip"), j = g("v-chip"), P = g("v-btn"), H = g("v-table"), u = g("v-col"), f = g("v-row");
623
+ return m(), V("div", null, [
624
+ r(f, null, {
625
+ default: a(() => [
626
+ r(u, { cols: "12" }, {
627
+ default: a(() => [
558
628
  r(H, {
559
629
  "fixed-header": e.tableFixedHeader,
560
- height: e.tableHeight + "px"
630
+ height: e.tableHeight + "px",
631
+ class: "elevation-1"
561
632
  }, {
562
- default: o(() => [
563
- P("thead", null, [
564
- P("tr", null, [
565
- e.tableThumbColumn ? (c(), V("th", Ne, x(e.selectedLang[v.lang].table.thumb), 1)) : z("", !0),
566
- P("th", He, x(e.selectedLang[v.lang].table.name), 1),
567
- P("th", Re, x(e.selectedLang[v.lang].table.size), 1),
568
- P("th", We, x(e.selectedLang[v.lang].table.action.action), 1)
633
+ default: a(() => [
634
+ A("thead", null, [
635
+ A("tr", null, [
636
+ A("th", Ke, x(e.selectedLang[o.lang].table.thumb), 1),
637
+ A("th", qe, x(e.selectedLang[o.lang].table.name), 1),
638
+ A("th", Ge, x(e.selectedLang[o.lang].table.size), 1),
639
+ A("th", Ye, x(e.selectedLang[o.lang].table.action.action), 1)
569
640
  ])
570
641
  ]),
571
- P("tbody", null, [
572
- (c(!0), V(R, null, Z(e.documentAttachment, (s, l) => {
573
- var i;
574
- return c(), V("tr", {
575
- key: `attachment-${l}`
576
- }, [
577
- e.tableThumbColumn ? (c(), V("td", Oe, [
578
- s.file.name && ["jpg", "jpeg", "png", "tif", "bmp"].includes(
579
- ((i = s.file.name.split(".").pop()) == null ? void 0 : i.toLowerCase()) || ""
580
- ) ? (c(), V(R, { key: 0 }, [
581
- e.thumb ? (c(), h(U, {
582
- key: 0,
583
- style: { margin: "10px" },
584
- src: "data:" + s.file.format + "," + s.file.base64,
585
- height: "50px",
586
- width: "50px"
587
- }, null, 8, ["src"])) : (c(), h(y, {
588
- key: 1,
589
- style: { "margin-left": "10px" },
590
- size: "50",
591
- "file-word-outline": "",
592
- color: "deep-purple darken-1"
593
- }, {
594
- default: o(() => g[0] || (g[0] = [
595
- _("mdi-file-image-outline")
596
- ])),
597
- _: 1
598
- }))
599
- ], 64)) : (c(), V(R, { key: 1 }, [
600
- p(s.file.name) === "pdf" ? (c(), h(y, {
601
- key: 0,
602
- style: { "margin-left": "10px" },
603
- size: "50",
604
- "file-word-outline": "",
605
- color: "red darken-1"
606
- }, {
607
- default: o(() => g[1] || (g[1] = [
608
- _("mdi-file-pdf-outline")
609
- ])),
610
- _: 1
611
- })) : ["doc", "docx", "odt"].includes(p(s.file.name)) ? (c(), h(y, {
612
- key: 1,
613
- style: { "margin-left": "10px" },
614
- size: "50",
615
- "file-word-outline": "",
616
- color: "blue darken-1"
617
- }, {
618
- default: o(() => g[2] || (g[2] = [
619
- _("mdi-file-word-outline")
620
- ])),
621
- _: 1
622
- })) : ["xls", "xlsx"].includes(p(s.file.name)) ? (c(), h(y, {
623
- key: 2,
624
- style: { "margin-left": "10px" },
625
- size: "50",
626
- "file-word-outline": "",
627
- color: "teal darken-1"
628
- }, {
629
- default: o(() => g[3] || (g[3] = [
630
- _("mdi-file-excel-outline")
631
- ])),
632
- _: 1
633
- })) : ["pptx", "pptm", "ppt"].includes(p(s.file.name)) ? (c(), h(y, {
634
- key: 3,
635
- style: { "margin-left": "10px" },
636
- size: "50",
637
- "file-word-outline": "",
638
- color: "orange darken-3"
639
- }, {
640
- default: o(() => g[4] || (g[4] = [
641
- _("mdi-file-powerpoint-outline")
642
- ])),
643
- _: 1
644
- })) : ["mp4", "mov", "flv", "wmv", "avi"].includes(p(s.file.name)) ? (c(), h(y, {
645
- key: 4,
646
- style: { "margin-left": "10px" },
647
- size: "50",
648
- "file-word-outline": "",
649
- color: "red lighten-1"
650
- }, {
651
- default: o(() => g[5] || (g[5] = [
652
- _("mdi-file-video-outline")
653
- ])),
654
- _: 1
655
- })) : p(s.file.name) === "dwg" ? (c(), h(y, {
656
- key: 5,
657
- style: { "margin-left": "10px" },
658
- size: "50",
659
- "file-word-outline": "",
660
- color: "indigo lighten-2"
661
- }, {
662
- default: o(() => g[6] || (g[6] = [
663
- _("mdi-file-cad")
664
- ])),
665
- _: 1
666
- })) : ["zip", "rar", "7-zip"].includes(p(s.file.name)) ? (c(), h(y, {
667
- key: 6,
668
- size: "120",
669
- "file-word-outline": "",
670
- color: "lime lighten-1"
671
- }, {
672
- default: o(() => g[7] || (g[7] = [
673
- _("mdi-folder-zip-outline")
674
- ])),
675
- _: 1
676
- })) : p(s.file.name) === "txt" ? (c(), h(y, {
677
- key: 7,
678
- style: { "margin-left": "10px" },
679
- size: "50",
680
- "file-word-outline": "",
681
- color: "light-green darken-3"
682
- }, {
683
- default: o(() => g[8] || (g[8] = [
684
- _("mdi-script-text-outline")
685
- ])),
686
- _: 1
687
- })) : (c(), h(y, {
688
- key: 8,
689
- "x-large": "",
690
- "file-word-outline": "",
691
- color: "indigo lighten-1"
692
- }, {
693
- default: o(() => g[9] || (g[9] = [
694
- _("mdi-file-question-outline")
695
- ])),
696
- _: 1
697
- }))
698
- ], 64))
699
- ])) : z("", !0),
700
- P("td", null, x(s.file.name), 1),
701
- P("td", null, [
702
- Number((s.file.size / 1e3).toFixed(1)) < 1024 ? (c(), h($, {
642
+ A("tbody", null, [
643
+ (m(!0), V(O, null, X(e.documentAttachment, (d, n) => (m(), V("tr", {
644
+ key: `attachment-${n}`,
645
+ class: "table-row"
646
+ }, [
647
+ A("td", Xe, [
648
+ r(U, { location: "top" }, {
649
+ activator: a(({ props: l }) => [
650
+ A("div", Y({
651
+ class: "d-flex justify-center align-center",
652
+ style: { height: "60px", width: "60px" }
653
+ }, { ref_for: !0 }, l), [
654
+ c(d.file.name) ? (m(), V(O, { key: 0 }, [
655
+ e.thumb && d.file.base64 ? (m(), b(D, {
656
+ key: 0,
657
+ style: { height: "40px", width: "40px" },
658
+ src: "data:" + d.file.format + ";base64," + d.file.base64,
659
+ height: "40",
660
+ width: "40",
661
+ class: "rounded",
662
+ contain: ""
663
+ }, null, 8, ["src"])) : (m(), b($, {
664
+ key: 1,
665
+ size: "40",
666
+ color: "deep-purple"
667
+ }, {
668
+ default: a(() => [...h[0] || (h[0] = [
669
+ w(" mdi-file-image-outline ", -1)
670
+ ])]),
671
+ _: 1
672
+ }))
673
+ ], 64)) : (m(), b($, {
674
+ key: 1,
675
+ icon: Z(me)(d.file.name),
676
+ color: Z(fe)(d.file.name),
677
+ size: "40"
678
+ }, null, 8, ["icon", "color"]))
679
+ ], 16)
680
+ ]),
681
+ default: a(() => [
682
+ A("span", null, x(d.file.name), 1)
683
+ ]),
684
+ _: 2
685
+ }, 1024)
686
+ ]),
687
+ A("td", Je, [
688
+ r(U, { location: "top" }, {
689
+ activator: a(({ props: l }) => [
690
+ A("span", Y({ ref_for: !0 }, l), x((() => {
691
+ const p = d.file.name.split(".").pop(), s = d.file.name.slice(0, d.file.name.lastIndexOf("."));
692
+ return `${s.length > 10 ? s.slice(0, 10) + "..." : s}.${p}`;
693
+ })()), 17)
694
+ ]),
695
+ default: a(() => [
696
+ A("span", null, x(d.file.name), 1)
697
+ ]),
698
+ _: 2
699
+ }, 1024)
700
+ ]),
701
+ A("td", Qe, [
702
+ r(j, {
703
+ color: L(d.file.size),
704
+ variant: "tonal",
705
+ size: "small",
706
+ class: "text-caption"
707
+ }, {
708
+ default: a(() => [
709
+ w(x(T(d.file.size)), 1)
710
+ ]),
711
+ _: 2
712
+ }, 1032, ["color"])
713
+ ]),
714
+ A("td", Ze, [
715
+ A("div", et, [
716
+ o.editPermission ? (m(), b(U, {
703
717
  key: 0,
704
- class: "mt2"
718
+ location: "top"
705
719
  }, {
706
- default: o(() => [
707
- r(w, {
708
- color: "teal lighten-2",
709
- label: "",
710
- "text-color": "white"
711
- }, {
712
- default: o(() => [
713
- _(x(Number((s.file.size / 1e3).toFixed(1)) + v.selectedLang[v.lang].size.kb) + " ", 1),
714
- r(y, { right: "" }, {
715
- default: o(() => g[10] || (g[10] = [
716
- _("mdi-harddisk")
717
- ])),
718
- _: 1
719
- })
720
- ]),
721
- _: 2
722
- }, 1024)
723
- ]),
724
- _: 2
725
- }, 1024)) : z("", !0),
726
- Number((s.file.size / 1e3).toFixed(1)) > 1024 ? (c(), h($, { key: 1 }, {
727
- default: o(() => [
728
- r(w, {
729
- color: "teal lighten-2",
730
- label: "",
731
- "text-color": "white"
732
- }, {
733
- default: o(() => [
734
- _(x(Number(
735
- (s.file.size / 1e3 / 1024).toFixed(1)
736
- ) + v.selectedLang[v.lang].size.mb) + " ", 1),
737
- r(y, { right: "" }, {
738
- default: o(() => g[11] || (g[11] = [
739
- _("mdi-harddisk")
740
- ])),
741
- _: 1
742
- })
743
- ]),
744
- _: 2
745
- }, 1024)
746
- ]),
747
- _: 2
748
- }, 1024)) : z("", !0)
749
- ]),
750
- P("td", null, [
751
- r(j, { top: "" }, {
752
- activator: o(({ props: u }) => [
753
- v.deletePermission ? (c(), h(T, ee({
754
- key: 0,
720
+ activator: a(({ props: l }) => [
721
+ r(P, Y({
755
722
  icon: "",
756
- color: "red",
757
- ref_for: !0
758
- }, u, {
759
- onClick: (m) => D(l, "")
723
+ size: "small",
724
+ color: "success",
725
+ variant: "text"
726
+ }, { ref_for: !0 }, l, {
727
+ onClick: (p) => C(d, n)
760
728
  }), {
761
- default: o(() => [
762
- r(y, null, {
763
- default: o(() => g[12] || (g[12] = [
764
- _("mdi-delete")
765
- ])),
729
+ default: a(() => [
730
+ r($, { size: "18" }, {
731
+ default: a(() => [...h[1] || (h[1] = [
732
+ w("mdi-pencil-outline", -1)
733
+ ])]),
766
734
  _: 1
767
735
  })
768
736
  ]),
769
- _: 2
770
- }, 1040, ["onClick"])) : z("", !0)
737
+ _: 1
738
+ }, 16, ["onClick"])
771
739
  ]),
772
- default: o(() => [
773
- P("span", null, x(v.selectedLang[v.lang].table.action.deleteTooltip), 1)
740
+ default: a(() => [
741
+ A("span", null, x(o.selectedLang[o.lang].edit), 1)
774
742
  ]),
775
743
  _: 2
776
- }, 1024),
777
- r(j, { top: "" }, {
778
- activator: o(({ props: u }) => [
779
- v.editPermission ? (c(), h(T, ee({
780
- key: 0,
781
- text: "",
782
- fab: "",
783
- ref_for: !0
784
- }, u, {
785
- onClick: (m) => L(s, l)
744
+ }, 1024)) : B("", !0),
745
+ o.deletePermission ? (m(), b(U, {
746
+ key: 1,
747
+ location: "top"
748
+ }, {
749
+ activator: a(({ props: l }) => [
750
+ r(P, Y({
751
+ icon: "",
752
+ size: "small",
753
+ color: "error",
754
+ variant: "text"
755
+ }, { ref_for: !0 }, l, {
756
+ onClick: (p) => k(n, "")
786
757
  }), {
787
- default: o(() => [
788
- r(y, { color: "green" }, {
789
- default: o(() => g[13] || (g[13] = [
790
- _("mdi-pencil-outline")
791
- ])),
758
+ default: a(() => [
759
+ r($, { size: "18" }, {
760
+ default: a(() => [...h[2] || (h[2] = [
761
+ w("mdi-delete", -1)
762
+ ])]),
792
763
  _: 1
793
764
  })
794
765
  ]),
795
- _: 2
796
- }, 1040, ["onClick"])) : z("", !0)
766
+ _: 1
767
+ }, 16, ["onClick"])
797
768
  ]),
798
- default: o(() => [
799
- P("span", Ke, x(v.selectedLang[v.lang].edit), 1)
769
+ default: a(() => [
770
+ A("span", null, x(o.selectedLang[o.lang].table.action.deleteTooltip), 1)
800
771
  ]),
801
772
  _: 2
802
- }, 1024)
773
+ }, 1024)) : B("", !0)
803
774
  ])
804
- ]);
805
- }), 128))
775
+ ])
776
+ ]))), 128))
806
777
  ])
807
778
  ]),
808
779
  _: 1
@@ -816,7 +787,30 @@ const Se = {
816
787
  ]);
817
788
  };
818
789
  }
819
- }), me = /* @__PURE__ */ te({
790
+ }), ke = (o, i) => {
791
+ const e = o.__vccOpts || o;
792
+ for (const [t, c] of i)
793
+ e[t] = c;
794
+ return e;
795
+ }, he = /* @__PURE__ */ ke(tt, [["__scopeId", "data-v-d05b814b"]]), ot = {
796
+ class: "d-flex align-center pa-3",
797
+ style: { height: "100%" }
798
+ }, nt = {
799
+ class: "flex-grow-1 pr-4",
800
+ style: { "max-width": "60%" }
801
+ }, lt = {
802
+ class: "text-subtitle-1 font-weight-medium mb-2",
803
+ style: { overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap", "max-width": "100%" }
804
+ }, it = {
805
+ class: "flex-shrink-0",
806
+ style: { "min-width": "80px" }
807
+ }, at = {
808
+ key: 0,
809
+ class: "thumbnail-container"
810
+ }, rt = {
811
+ key: 1,
812
+ class: "d-flex align-center justify-center"
813
+ }, st = { class: "d-flex gap-2 pb-1" }, dt = /* @__PURE__ */ ee({
820
814
  __name: "SimpleUploader",
821
815
  props: {
822
816
  documentAttachment: {},
@@ -833,270 +827,177 @@ const Se = {
833
827
  selectedLang: {}
834
828
  },
835
829
  emits: ["setCardTheme", "openDeleteDialog", "openEditDocumentDialog"],
836
- setup(a, { emit: n }) {
837
- const e = a, t = n, p = (y) => {
838
- const w = y / 1e3;
839
- return w < 1024 ? `${w.toFixed(1)} ${e.selectedLang[e.lang].size.kb}` : `${(w / 1024).toFixed(1)} ${e.selectedLang[e.lang].size.mb}`;
840
- }, D = (y) => {
841
- var w;
842
- return ["jpg", "jpeg", "png", "tif", "bmp"].includes(((w = y.split(".").pop()) == null ? void 0 : w.toLowerCase()) || "");
843
- }, L = (y) => {
844
- var T;
845
- const w = (T = y.split(".").pop()) == null ? void 0 : T.toLowerCase();
846
- return w && {
847
- pdf: "mdi-file-pdf-outline",
848
- doc: "mdi-file-word-outline",
849
- docx: "mdi-file-word-outline",
850
- odt: "mdi-file-word-outline",
851
- jpg: "mdi-file-image-outline",
852
- jpeg: "mdi-file-image-outline",
853
- png: "mdi-file-image-outline",
854
- tif: "mdi-file-image-outline",
855
- bmp: "mdi-file-image-outline",
856
- xls: "mdi-file-excel-outline",
857
- xlsx: "mdi-file-excel-outline",
858
- pptx: "mdi-file-powerpoint-outline",
859
- pptm: "mdi-file-powerpoint-outline",
860
- ppt: "mdi-file-powerpoint-outline",
861
- mp4: "mdi-file-video-outline",
862
- mov: "mdi-file-video-outline",
863
- flv: "mdi-file-video-outline",
864
- wmv: "mdi-file-video-outline",
865
- avi: "mdi-file-video-outline",
866
- dwg: "mdi-file-cad",
867
- zip: "mdi-folder-zip-outline",
868
- rar: "mdi-folder-zip-outline",
869
- "7-zip": "mdi-folder-zip-outline",
870
- txt: "mdi-script-text-outline"
871
- }[w] || "mdi-file-question-outline";
872
- }, v = (y) => {
873
- var T;
874
- const w = (T = y.split(".").pop()) == null ? void 0 : T.toLowerCase();
875
- return w && {
876
- pdf: "red darken-1",
877
- doc: "blue darken-1",
878
- docx: "blue darken-1",
879
- odt: "blue darken-1",
880
- jpg: "deep-purple darken-1",
881
- jpeg: "deep-purple darken-1",
882
- png: "deep-purple darken-1",
883
- tif: "deep-purple darken-1",
884
- bmp: "deep-purple darken-1",
885
- xls: "teal darken-1",
886
- xlsx: "teal darken-1",
887
- pptx: "orange darken-3",
888
- pptm: "orange darken-3",
889
- ppt: "orange darken-3",
890
- mp4: "red lighten-1",
891
- mov: "red lighten-1",
892
- flv: "red lighten-1",
893
- wmv: "red lighten-1",
894
- avi: "red lighten-1",
895
- dwg: "indigo lighten-2",
896
- zip: "lime lighten-1",
897
- rar: "lime lighten-1",
898
- "7-zip": "lime lighten-1",
899
- txt: "light-green darken-3"
900
- }[w] || "indigo lighten-1";
901
- }, g = (y, w) => t("openDeleteDialog", y, w), U = (y, w) => t("openEditDocumentDialog", y, w);
902
- return (y, w) => {
903
- const $ = f("v-list-item-subtitle"), T = f("v-icon"), j = f("v-chip"), H = f("v-list-item-content"), O = f("v-img"), d = f("v-avatar"), s = f("v-list-item-title"), l = f("v-list-item"), i = f("v-divider"), u = f("v-btn"), m = f("v-tooltip"), k = f("v-spacer"), S = f("v-card-actions"), F = f("v-chip-group"), B = f("v-card-text"), M = f("v-expand-transition"), G = f("v-card"), E = f("v-col"), K = f("v-row");
904
- return c(), V("div", null, [
905
- r(K, null, {
906
- default: o(() => [
907
- (c(!0), V(R, null, Z(e.documentAttachment, (A, Y) => (c(), h(E, {
908
- key: `attachment-${Y}`,
830
+ setup(o, { emit: i }) {
831
+ const e = o, t = i, c = (_) => {
832
+ const h = _ / 1e3;
833
+ return h < 1024 ? `${h.toFixed(1)} ${e.selectedLang[e.lang].size.kb}` : `${(h / 1024).toFixed(1)} ${e.selectedLang[e.lang].size.mb}`;
834
+ }, T = (_) => {
835
+ var h;
836
+ return ["jpg", "jpeg", "png", "tif", "bmp"].includes(((h = _.split(".").pop()) == null ? void 0 : h.toLowerCase()) || "");
837
+ }, L = (_) => _.base64 ? _.base64.startsWith("data:") ? _.base64 : `data:${_.format};base64,${_.base64}` : "", k = (_, h) => t("openDeleteDialog", _, h), C = (_, h) => t("openEditDocumentDialog", _, h);
838
+ return (_, h) => {
839
+ const D = g("v-icon"), $ = g("v-chip"), U = g("v-img"), j = g("v-divider"), P = g("v-btn"), H = g("v-tooltip"), u = g("v-chip-group"), f = g("v-card-text"), d = g("v-expand-transition"), n = g("v-card"), l = g("v-col"), p = g("v-row");
840
+ return m(), V("div", null, [
841
+ r(p, null, {
842
+ default: a(() => [
843
+ (m(!0), V(O, null, X(e.documentAttachment, (s, F) => (m(), b(l, {
844
+ key: `attachment-${F}`,
909
845
  cols: "12",
910
- md: e.cols,
911
- xs: "12"
846
+ sm: "6",
847
+ md: "4",
848
+ lg: "3"
912
849
  }, {
913
- default: o(() => [
914
- r(G, {
850
+ default: a(() => [
851
+ r(n, {
852
+ class: "file-card",
915
853
  shaped: e.shaped,
916
854
  outlined: e.outlined,
917
855
  raised: e.raised,
918
- tile: e.tile
856
+ tile: e.tile,
857
+ height: "180"
919
858
  }, {
920
- default: o(() => [
921
- r(l, { "three-line": "" }, {
922
- default: o(() => [
923
- r(H, null, {
924
- default: o(() => [
925
- r($, { color: "blue-grey darken-3" }, {
926
- default: o(() => [
927
- _(x(A.file.name), 1)
928
- ]),
929
- _: 2
930
- }, 1024),
931
- r($, null, {
932
- default: o(() => [
933
- r(j, {
934
- color: "teal lighten-2",
935
- label: "",
936
- "text-color": "white"
937
- }, {
938
- default: o(() => [
939
- _(x(p(A.file.size)) + " ", 1),
940
- r(T, { right: "" }, {
941
- default: o(() => w[0] || (w[0] = [
942
- _("mdi-harddisk")
943
- ])),
944
- _: 1
945
- })
946
- ]),
947
- _: 2
948
- }, 1024)
949
- ]),
950
- _: 2
951
- }, 1024)
952
- ]),
953
- _: 2
954
- }, 1024),
955
- r(l, null, {
956
- prepend: o(() => [
957
- r(d, {
958
- size: "80",
959
- color: "blue-grey lighten-5"
859
+ default: a(() => [
860
+ A("div", ot, [
861
+ A("div", nt, [
862
+ A("div", lt, x(s.file.name), 1),
863
+ r($, {
864
+ color: "teal",
865
+ variant: "flat",
866
+ size: "small",
867
+ class: "text-white mb-2"
868
+ }, {
869
+ default: a(() => [
870
+ r(D, {
871
+ start: "",
872
+ size: "16"
960
873
  }, {
961
- default: o(() => [
962
- D(A.file.name) && e.thumb ? (c(), h(O, {
963
- key: 0,
964
- src: "data:" + A.file.format + "," + A.file.base64
965
- }, null, 8, ["src"])) : (c(), h(T, {
966
- key: 1,
967
- color: v(A.file.name),
968
- size: "50"
969
- }, {
970
- default: o(() => [
971
- _(x(L(A.file.name)), 1)
972
- ]),
973
- _: 2
974
- }, 1032, ["color"]))
975
- ]),
976
- _: 2
977
- }, 1024)
978
- ]),
979
- default: o(() => [
980
- r(s, null, {
981
- default: o(() => w[1] || (w[1] = [
982
- _("File Title Here")
983
- ])),
874
+ default: a(() => [...h[0] || (h[0] = [
875
+ w("mdi-harddisk", -1)
876
+ ])]),
984
877
  _: 1
985
- })
878
+ }),
879
+ w(" " + x(c(s.file.size)), 1)
986
880
  ]),
987
881
  _: 2
988
882
  }, 1024)
989
883
  ]),
990
- _: 2
991
- }, 1024),
992
- r(i, { class: "mx-4" }),
993
- r(S, { style: { padding: "0" } }, {
994
- default: o(() => [
995
- r(m, { right: "" }, {
996
- activator: o(({ props: q }) => [
997
- e.deletePermission ? (c(), h(u, ee({
998
- key: 0,
999
- text: "",
1000
- fab: "",
1001
- ref_for: !0
1002
- }, q, {
1003
- onClick: (J) => g(Y, "")
1004
- }), {
1005
- default: o(() => [
1006
- r(T, { color: "red" }, {
1007
- default: o(() => w[2] || (w[2] = [
1008
- _("mdi-trash-can-outline")
1009
- ])),
1010
- _: 1
1011
- })
1012
- ]),
1013
- _: 2
1014
- }, 1040, ["onClick"])) : z("", !0)
1015
- ]),
1016
- default: o(() => [
1017
- P("span", null, x(e.selectedLang[y.lang].delete), 1)
1018
- ]),
1019
- _: 2
1020
- }, 1024),
1021
- r(m, { right: "" }, {
1022
- activator: o(({ props: q }) => [
1023
- e.editPermission ? (c(), h(u, ee({
1024
- key: 0,
1025
- text: "",
1026
- fab: "",
1027
- ref_for: !0
1028
- }, q, {
1029
- onClick: (J) => U(A, Y)
1030
- }), {
1031
- default: o(() => [
1032
- r(T, { color: "green" }, {
1033
- default: o(() => w[3] || (w[3] = [
1034
- _("mdi-pencil-outline")
1035
- ])),
1036
- _: 1
1037
- })
1038
- ]),
1039
- _: 2
1040
- }, 1040, ["onClick"])) : z("", !0)
1041
- ]),
1042
- default: o(() => [
1043
- P("span", null, x(e.selectedLang[y.lang].edit), 1)
1044
- ]),
1045
- _: 2
1046
- }, 1024),
1047
- r(k),
1048
- A.file.tags.length > 0 || A.file.description ? (c(), h(u, {
1049
- key: 0,
1050
- icon: "",
1051
- onClick: De((q) => A.file.showDetailState = !A.file.showDetailState, ["prevent"])
1052
- }, {
1053
- default: o(() => [
1054
- r(T, null, {
1055
- default: o(() => [
1056
- _(x(A.file.showDetailState ? "mdi-chevron-up" : "mdi-chevron-down"), 1)
1057
- ]),
1058
- _: 2
1059
- }, 1024)
1060
- ]),
1061
- _: 2
1062
- }, 1032, ["onClick"])) : z("", !0)
1063
- ]),
1064
- _: 2
1065
- }, 1024),
1066
- r(M, null, {
1067
- default: o(() => [
1068
- ve(P("div", null, [
1069
- r(i),
1070
- A.file.tags.length ? (c(), h(F, {
884
+ A("div", it, [
885
+ T(s.file.name) && e.thumb ? (m(), V("div", at, [
886
+ r(U, {
887
+ src: L(s.file),
888
+ height: "80",
889
+ width: "80",
890
+ cover: "",
891
+ class: "rounded"
892
+ }, null, 8, ["src"])
893
+ ])) : (m(), V("div", rt, [
894
+ r(D, {
895
+ color: Z(fe)(s.file.name),
896
+ size: "60"
897
+ }, {
898
+ default: a(() => [
899
+ w(x(Z(me)(s.file.name)), 1)
900
+ ]),
901
+ _: 2
902
+ }, 1032, ["color"])
903
+ ]))
904
+ ])
905
+ ]),
906
+ r(j, { class: "my-2" }),
907
+ A("div", st, [
908
+ r(H, { bottom: "" }, {
909
+ activator: a(({ props: y }) => [
910
+ e.deletePermission ? (m(), b(P, Y({
911
+ key: 0,
912
+ icon: "",
913
+ variant: "text",
914
+ size: "small"
915
+ }, { ref_for: !0 }, y, {
916
+ onClick: (S) => k(F, "")
917
+ }), {
918
+ default: a(() => [
919
+ r(D, {
920
+ color: "red",
921
+ size: "20"
922
+ }, {
923
+ default: a(() => [...h[1] || (h[1] = [
924
+ w("mdi-delete-outline", -1)
925
+ ])]),
926
+ _: 1
927
+ })
928
+ ]),
929
+ _: 1
930
+ }, 16, ["onClick"])) : B("", !0)
931
+ ]),
932
+ default: a(() => [
933
+ A("span", null, x(e.selectedLang[o.lang].delete), 1)
934
+ ]),
935
+ _: 2
936
+ }, 1024),
937
+ r(H, { bottom: "" }, {
938
+ activator: a(({ props: y }) => [
939
+ e.editPermission ? (m(), b(P, Y({
940
+ key: 0,
941
+ icon: "",
942
+ variant: "text",
943
+ size: "small"
944
+ }, { ref_for: !0 }, y, {
945
+ onClick: (S) => C(s, F)
946
+ }), {
947
+ default: a(() => [
948
+ r(D, {
949
+ color: "green",
950
+ size: "20"
951
+ }, {
952
+ default: a(() => [...h[2] || (h[2] = [
953
+ w("mdi-pencil-outline", -1)
954
+ ])]),
955
+ _: 1
956
+ })
957
+ ]),
958
+ _: 1
959
+ }, 16, ["onClick"])) : B("", !0)
960
+ ]),
961
+ default: a(() => [
962
+ A("span", null, x(e.selectedLang[o.lang].edit), 1)
963
+ ]),
964
+ _: 2
965
+ }, 1024)
966
+ ]),
967
+ r(d, null, {
968
+ default: a(() => [
969
+ xe(A("div", null, [
970
+ r(j),
971
+ s.file.tags.length ? (m(), b(u, {
1071
972
  key: 0,
1072
973
  multiple: "",
1073
974
  "active-class": "primary--text",
1074
975
  style: { padding: "8px" }
1075
976
  }, {
1076
- default: o(() => [
1077
- (c(!0), V(R, null, Z(A.file.tags, (q, J) => (c(), h(j, {
1078
- key: `tag-${J}`,
977
+ default: a(() => [
978
+ (m(!0), V(O, null, X(s.file.tags, (y, S) => (m(), b($, {
979
+ key: `tag-${S}`,
1079
980
  style: { margin: "5px" }
1080
981
  }, {
1081
- default: o(() => [
1082
- _(x(q), 1)
982
+ default: a(() => [
983
+ w(x(y), 1)
1083
984
  ]),
1084
985
  _: 2
1085
986
  }, 1024))), 128))
1086
987
  ]),
1087
988
  _: 2
1088
- }, 1024)) : z("", !0),
1089
- A.file.description ? (c(), h(B, {
989
+ }, 1024)) : B("", !0),
990
+ s.file.description ? (m(), b(f, {
1090
991
  key: 1,
1091
992
  style: { "text-align": "justify" }
1092
993
  }, {
1093
- default: o(() => [
1094
- _(x(A.file.description), 1)
994
+ default: a(() => [
995
+ w(x(s.file.description), 1)
1095
996
  ]),
1096
997
  _: 2
1097
- }, 1024)) : z("", !0)
998
+ }, 1024)) : B("", !0)
1098
999
  ], 512), [
1099
- [he, A.file.showDetailState]
1000
+ [we, s.file.showDetailState]
1100
1001
  ])
1101
1002
  ]),
1102
1003
  _: 2
@@ -1106,14 +1007,14 @@ const Se = {
1106
1007
  }, 1032, ["shaped", "outlined", "raised", "tile"])
1107
1008
  ]),
1108
1009
  _: 2
1109
- }, 1032, ["md"]))), 128))
1010
+ }, 1024))), 128))
1110
1011
  ]),
1111
1012
  _: 1
1112
1013
  })
1113
1014
  ]);
1114
1015
  };
1115
1016
  }
1116
- }), pe = /* @__PURE__ */ te({
1017
+ }), ve = /* @__PURE__ */ ke(dt, [["__scopeId", "data-v-f7000da4"]]), be = /* @__PURE__ */ ee({
1117
1018
  __name: "InsertButton",
1118
1019
  props: {
1119
1020
  documentAttachment: {},
@@ -1124,61 +1025,61 @@ const Se = {
1124
1025
  selectedLang: {}
1125
1026
  },
1126
1027
  emits: ["openInputDocumentModal"],
1127
- setup(a, { emit: n }) {
1128
- const e = n, t = a, p = () => {
1028
+ setup(o, { emit: i }) {
1029
+ const e = i, t = o, c = () => {
1129
1030
  e("openInputDocumentModal");
1130
1031
  };
1131
- return (D, L) => {
1132
- const v = f("v-btn"), g = f("v-badge");
1133
- return c(), V("div", null, [
1134
- t.badgeCounter ? (c(), V(R, { key: 0 }, [
1135
- t.documentAttachment.length > 0 ? (c(), h(g, {
1032
+ return (T, L) => {
1033
+ const k = g("v-btn"), C = g("v-badge");
1034
+ return m(), V("div", null, [
1035
+ t.badgeCounter ? (m(), V(O, { key: 0 }, [
1036
+ t.documentAttachment.length > 0 ? (m(), b(C, {
1136
1037
  key: 0,
1137
1038
  bordered: "",
1138
1039
  color: t.documentAttachment.length === t.maxFileCount ? "error" : "success",
1139
1040
  overlap: "",
1140
- content: D.documentAttachment.length
1041
+ content: o.documentAttachment.length
1141
1042
  }, {
1142
- default: o(() => [
1143
- r(v, {
1043
+ default: a(() => [
1044
+ r(k, {
1144
1045
  color: t.btnColor,
1145
- onClick: p,
1046
+ onClick: c,
1146
1047
  class: "mb-4"
1147
1048
  }, {
1148
- default: o(() => [
1149
- _(x(t.selectedLang[D.lang].insertFile), 1)
1049
+ default: a(() => [
1050
+ w(x(t.selectedLang[o.lang].insertFile), 1)
1150
1051
  ]),
1151
1052
  _: 1
1152
1053
  }, 8, ["color"])
1153
1054
  ]),
1154
1055
  _: 1
1155
- }, 8, ["color", "content"])) : (c(), h(v, {
1056
+ }, 8, ["color", "content"])) : (m(), b(k, {
1156
1057
  key: 1,
1157
1058
  color: t.btnColor,
1158
- onClick: p,
1059
+ onClick: c,
1159
1060
  class: "mb-4"
1160
1061
  }, {
1161
- default: o(() => [
1162
- _(x(t.selectedLang[D.lang].insertFile), 1)
1062
+ default: a(() => [
1063
+ w(x(t.selectedLang[o.lang].insertFile), 1)
1163
1064
  ]),
1164
1065
  _: 1
1165
1066
  }, 8, ["color"]))
1166
- ], 64)) : z("", !0),
1167
- t.badgeCounter ? z("", !0) : (c(), h(v, {
1067
+ ], 64)) : B("", !0),
1068
+ t.badgeCounter ? B("", !0) : (m(), b(k, {
1168
1069
  key: 1,
1169
- color: D.btnColor,
1170
- onClick: p,
1070
+ color: o.btnColor,
1071
+ onClick: c,
1171
1072
  class: "mb-4"
1172
1073
  }, {
1173
- default: o(() => [
1174
- _(x(t.selectedLang[D.lang].insertFile), 1)
1074
+ default: a(() => [
1075
+ w(x(t.selectedLang[o.lang].insertFile), 1)
1175
1076
  ]),
1176
1077
  _: 1
1177
1078
  }, 8, ["color"]))
1178
1079
  ]);
1179
1080
  };
1180
1081
  }
1181
- }), qe = {
1082
+ }), ct = {
1182
1083
  en: {
1183
1084
  insertFile: "Insert File",
1184
1085
  insertNewFile: "Insert New File",
@@ -1326,39 +1227,39 @@ const Se = {
1326
1227
  fileTags: "علامات الملف"
1327
1228
  }
1328
1229
  };
1329
- function rt(a, n = {}) {
1230
+ function Dt(o, i = {}) {
1330
1231
  const {
1331
1232
  maxFileSize: e = 5 * 1024 * 1024,
1332
1233
  // 5MB default
1333
1234
  maxFileCount: t = 10,
1334
- imageCompressor: p = !1,
1335
- imageCompressLevel: D = 0.8,
1235
+ imageCompressor: c = !1,
1236
+ imageCompressLevel: T = 0.8,
1336
1237
  fileAccept: L = "*"
1337
- } = n, v = ae(!1), g = ae({
1238
+ } = i, k = ae(!1), C = ae({
1338
1239
  show: !1,
1339
1240
  text: "",
1340
1241
  color: "success"
1341
- }), U = ie(() => a.value.length), y = ie(() => U.value < t), w = ie(
1342
- () => a.value.reduce((l, i) => l + i.file.size, 0)
1242
+ }), _ = le(() => o.value.length), h = le(() => _.value < t), D = le(
1243
+ () => o.value.reduce((d, n) => d + n.file.size, 0)
1343
1244
  );
1344
- function $(l, i = "success") {
1345
- g.value = { show: !0, text: l, color: i };
1245
+ function $(d, n = "success") {
1246
+ C.value = { show: !0, text: d, color: n };
1346
1247
  }
1347
- function T(l) {
1348
- var i;
1349
- if (!Ae(l.size, e))
1248
+ function U(d) {
1249
+ var n;
1250
+ if (!Ve(d.size, e))
1350
1251
  return {
1351
1252
  valid: !1,
1352
1253
  error: `File size exceeds maximum allowed size of ${(e / 1048576).toFixed(1)}MB`
1353
1254
  };
1354
- if (!Le(U.value, t))
1255
+ if (!Be(_.value, t))
1355
1256
  return {
1356
1257
  valid: !1,
1357
1258
  error: `Maximum file count of ${t} reached`
1358
1259
  };
1359
1260
  if (L !== "*") {
1360
- const u = L.split(",").map((F) => F.trim()), m = `.${(i = l.name.split(".").pop()) == null ? void 0 : i.toLowerCase()}`, k = l.type;
1361
- if (!u.some((F) => F.startsWith(".") ? F === m : F.includes("/*") ? k.startsWith(F.replace("/*", "")) : F === k))
1261
+ const l = L.split(",").map((y) => y.trim()), p = `.${(n = d.name.split(".").pop()) == null ? void 0 : n.toLowerCase()}`, s = d.type;
1262
+ if (!l.some((y) => y.startsWith(".") ? y === p : y.includes("/*") ? s.startsWith(y.replace("/*", "")) : y === s))
1362
1263
  return {
1363
1264
  valid: !1,
1364
1265
  error: `File type not accepted. Allowed types: ${L}`
@@ -1366,287 +1267,287 @@ function rt(a, n = {}) {
1366
1267
  }
1367
1268
  return { valid: !0 };
1368
1269
  }
1369
- async function j(l) {
1370
- let i;
1371
- if (p && be(l.name, l.type))
1270
+ async function j(d) {
1271
+ let n;
1272
+ if (c && pe(d.name, d.type))
1372
1273
  try {
1373
- i = (await $e(l, D)).split(",")[1];
1374
- } catch (k) {
1375
- console.warn("Image compression failed, using original file:", k), i = await fe(l);
1274
+ n = (await Ie(d, T)).split(",")[1];
1275
+ } catch (s) {
1276
+ console.warn("Image compression failed, using original file:", s), n = await ye(d);
1376
1277
  }
1377
1278
  else
1378
- i = await fe(l);
1379
- const u = de(l.size), m = _e(l.name);
1279
+ n = await ye(d);
1280
+ const l = ce(d.size), p = Fe(d.name);
1380
1281
  return {
1381
- base64: i,
1382
- size: u.text,
1383
- name: l.name,
1282
+ base64: n,
1283
+ size: l.text,
1284
+ name: d.name,
1384
1285
  tags: [],
1385
1286
  description: "",
1386
1287
  showDetailState: !1,
1387
- format: m
1288
+ format: p
1388
1289
  };
1389
1290
  }
1390
- async function H(l) {
1391
- if (v.value) return !1;
1392
- v.value = !0;
1393
- const i = Array.from(l), u = [];
1394
- for (const m of i) {
1395
- const k = T(m);
1396
- k.valid ? u.push(m) : $(k.error, "error");
1291
+ async function P(d) {
1292
+ if (k.value) return !1;
1293
+ k.value = !0;
1294
+ const n = Array.from(d), l = [];
1295
+ for (const p of n) {
1296
+ const s = U(p);
1297
+ s.valid ? l.push(p) : $(s.error, "error");
1397
1298
  }
1398
- if (u.length === 0)
1399
- return v.value = !1, !1;
1299
+ if (l.length === 0)
1300
+ return k.value = !1, !1;
1400
1301
  try {
1401
- const k = (await Promise.all(
1402
- u.map((F) => j(F))
1403
- )).map((F) => {
1404
- var B;
1302
+ const s = (await Promise.all(
1303
+ l.map((y) => j(y))
1304
+ )).map((y) => {
1305
+ var S;
1405
1306
  return {
1406
1307
  file: {
1407
- name: F.name,
1408
- format: F.format,
1409
- base64: F.base64,
1410
- size: ((B = u.find((M) => M.name === F.name)) == null ? void 0 : B.size) || 0,
1411
- tags: F.tags,
1412
- description: F.description,
1413
- showDetailState: F.showDetailState
1308
+ name: y.name,
1309
+ format: y.format,
1310
+ base64: y.base64,
1311
+ size: ((S = l.find((I) => I.name === y.name)) == null ? void 0 : S.size) || 0,
1312
+ tags: y.tags,
1313
+ description: y.description,
1314
+ showDetailState: y.showDetailState
1414
1315
  }
1415
1316
  };
1416
1317
  });
1417
- a.value.push(...k);
1418
- const S = u.length === 1 ? `File "${u[0].name}" uploaded successfully` : `${u.length} files uploaded successfully`;
1419
- return $(S, "success"), !0;
1420
- } catch (m) {
1421
- return console.error("File upload error:", m), $("Failed to upload files. Please try again.", "error"), !1;
1318
+ o.value.push(...s);
1319
+ const F = l.length === 1 ? `File "${l[0].name}" uploaded successfully` : `${l.length} files uploaded successfully`;
1320
+ return $(F, "success"), !0;
1321
+ } catch (p) {
1322
+ return console.error("File upload error:", p), $("Failed to upload files. Please try again.", "error"), !1;
1422
1323
  } finally {
1423
- v.value = !1;
1324
+ k.value = !1;
1424
1325
  }
1425
1326
  }
1426
- function O(l) {
1427
- if (l >= 0 && l < a.value.length) {
1428
- const i = a.value[l];
1429
- return a.value.splice(l, 1), $(`File "${i.file.name}" removed`, "warning"), !0;
1327
+ function H(d) {
1328
+ if (d >= 0 && d < o.value.length) {
1329
+ const n = o.value[d];
1330
+ return o.value.splice(d, 1), $(`File "${n.file.name}" removed`, "warning"), !0;
1430
1331
  }
1431
1332
  return !1;
1432
1333
  }
1433
- function d(l, i) {
1434
- if (l >= 0 && l < a.value.length) {
1435
- const u = a.value[l].file;
1436
- return Object.assign(u, i), $("File updated successfully", "success"), !0;
1334
+ function u(d, n) {
1335
+ if (d >= 0 && d < o.value.length) {
1336
+ const l = o.value[d].file;
1337
+ return Object.assign(l, n), $("File updated successfully", "success"), !0;
1437
1338
  }
1438
1339
  return !1;
1439
1340
  }
1440
- function s() {
1441
- const l = a.value.length;
1442
- a.value.splice(0), $(`${l} files cleared`, "warning");
1341
+ function f() {
1342
+ const d = o.value.length;
1343
+ o.value.splice(0), $(`${d} files cleared`, "warning");
1443
1344
  }
1444
1345
  return {
1445
1346
  // State
1446
- isUploading: v,
1447
- snackbar: g,
1347
+ isUploading: k,
1348
+ snackbar: C,
1448
1349
  // Computed
1449
- fileCount: U,
1450
- canAddMoreFiles: y,
1451
- totalSize: w,
1350
+ fileCount: _,
1351
+ canAddMoreFiles: h,
1352
+ totalSize: D,
1452
1353
  // Methods
1453
- uploadFiles: H,
1454
- removeFile: O,
1455
- updateFileMetadata: d,
1456
- clearAllFiles: s,
1457
- validateFile: T,
1354
+ uploadFiles: P,
1355
+ removeFile: H,
1356
+ updateFileMetadata: u,
1357
+ clearAllFiles: f,
1358
+ validateFile: U,
1458
1359
  showSnackbar: $
1459
1360
  };
1460
1361
  }
1461
- function st(a = {}) {
1362
+ function Ct(o = {}) {
1462
1363
  const {
1463
- maxErrors: n = 10,
1364
+ maxErrors: i = 10,
1464
1365
  autoRemoveTimeout: e = 5e3,
1465
1366
  logToConsole: t = !0
1466
- } = a, p = ae([]), D = ae(!1);
1367
+ } = o, c = ae([]), T = ae(!1);
1467
1368
  function L() {
1468
1369
  return `error_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
1469
1370
  }
1470
- function v(i, u = "error", m, k) {
1471
- const S = {
1371
+ function k(n, l = "error", p, s) {
1372
+ const F = {
1472
1373
  id: L(),
1473
- message: i,
1474
- type: u,
1374
+ message: n,
1375
+ type: l,
1475
1376
  timestamp: /* @__PURE__ */ new Date(),
1476
- context: m,
1477
- action: k
1377
+ context: p,
1378
+ action: s
1478
1379
  };
1479
- return t && (u === "error" ? console.error : u === "warning" ? console.warn : u === "info" ? console.info : console.log)(`[${u.toUpperCase()}] ${i}`, m || ""), p.value.unshift(S), p.value.length > n && (p.value = p.value.slice(0, n)), e > 0 && setTimeout(() => {
1480
- g(S.id);
1481
- }, e), S.id;
1380
+ return t && (l === "error" ? console.error : l === "warning" ? console.warn : l === "info" ? console.info : console.log)(`[${l.toUpperCase()}] ${n}`, p || ""), c.value.unshift(F), c.value.length > i && (c.value = c.value.slice(0, i)), e > 0 && setTimeout(() => {
1381
+ C(F.id);
1382
+ }, e), F.id;
1482
1383
  }
1483
- function g(i) {
1484
- const u = p.value.findIndex((m) => m.id === i);
1485
- return u !== -1 ? (p.value.splice(u, 1), !0) : !1;
1384
+ function C(n) {
1385
+ const l = c.value.findIndex((p) => p.id === n);
1386
+ return l !== -1 ? (c.value.splice(l, 1), !0) : !1;
1486
1387
  }
1487
- function U() {
1488
- p.value = [];
1388
+ function _() {
1389
+ c.value = [];
1489
1390
  }
1490
- function y(i) {
1491
- p.value = p.value.filter((u) => u.type !== i);
1391
+ function h(n) {
1392
+ c.value = c.value.filter((l) => l.type !== n);
1492
1393
  }
1493
- async function w(i, u, m) {
1494
- D.value = !0;
1394
+ async function D(n, l, p) {
1395
+ T.value = !0;
1495
1396
  try {
1496
- return await i();
1497
- } catch (k) {
1498
- const S = u || (k instanceof Error ? k.message : "An unexpected error occurred");
1499
- return v(S, "error", {
1500
- ...m,
1501
- originalError: k instanceof Error ? k.message : String(k)
1397
+ return await n();
1398
+ } catch (s) {
1399
+ const F = l || (s instanceof Error ? s.message : "An unexpected error occurred");
1400
+ return k(F, "error", {
1401
+ ...p,
1402
+ originalError: s instanceof Error ? s.message : String(s)
1502
1403
  }), null;
1503
1404
  } finally {
1504
- D.value = !1;
1405
+ T.value = !1;
1505
1406
  }
1506
1407
  }
1507
- function $(i, u, m) {
1508
- return i || v(u, "error", m), i;
1408
+ function $(n, l, p) {
1409
+ return n || k(l, "error", p), n;
1509
1410
  }
1510
- function T(i, u) {
1511
- return v(i, "success", u);
1411
+ function U(n, l) {
1412
+ return k(n, "success", l);
1512
1413
  }
1513
- function j(i, u) {
1514
- return v(i, "warning", u);
1414
+ function j(n, l) {
1415
+ return k(n, "warning", l);
1515
1416
  }
1516
- function H(i, u) {
1517
- return v(i, "info", u);
1417
+ function P(n, l) {
1418
+ return k(n, "info", l);
1518
1419
  }
1519
- function O(i) {
1520
- return p.value.filter((u) => u.type === i);
1420
+ function H(n) {
1421
+ return c.value.filter((l) => l.type === n);
1521
1422
  }
1522
- function d() {
1523
- return p.value[0] || null;
1423
+ function u() {
1424
+ return c.value[0] || null;
1524
1425
  }
1525
- function s(i) {
1526
- return i ? p.value.some((u) => u.type === i) : p.value.length > 0;
1426
+ function f(n) {
1427
+ return n ? c.value.some((l) => l.type === n) : c.value.length > 0;
1527
1428
  }
1528
- const l = {
1529
- fileSizeExceeded: (i, u) => v(
1530
- `File "${i}" exceeds maximum size of ${(u / (1024 * 1024)).toFixed(1)}MB`,
1429
+ const d = {
1430
+ fileSizeExceeded: (n, l) => k(
1431
+ `File "${n}" exceeds maximum size of ${(l / (1024 * 1024)).toFixed(1)}MB`,
1531
1432
  "error",
1532
- { fileName: i, maxSize: u, category: "file-upload" }
1433
+ { fileName: n, maxSize: l, category: "file-upload" }
1533
1434
  ),
1534
- fileCountExceeded: (i) => v(
1535
- `Maximum file count of ${i} reached`,
1435
+ fileCountExceeded: (n) => k(
1436
+ `Maximum file count of ${n} reached`,
1536
1437
  "error",
1537
- { maxCount: i, category: "file-upload" }
1438
+ { maxCount: n, category: "file-upload" }
1538
1439
  ),
1539
- invalidFileType: (i, u) => v(
1540
- `File "${i}" type not allowed. Accepted types: ${u}`,
1440
+ invalidFileType: (n, l) => k(
1441
+ `File "${n}" type not allowed. Accepted types: ${l}`,
1541
1442
  "error",
1542
- { fileName: i, allowedTypes: u, category: "file-upload" }
1443
+ { fileName: n, allowedTypes: l, category: "file-upload" }
1543
1444
  ),
1544
- uploadFailed: (i, u) => v(
1545
- `Failed to upload "${i}"${u ? `: ${u}` : ""}`,
1445
+ uploadFailed: (n, l) => k(
1446
+ `Failed to upload "${n}"${l ? `: ${l}` : ""}`,
1546
1447
  "error",
1547
- { fileName: i, reason: u, category: "file-upload" }
1448
+ { fileName: n, reason: l, category: "file-upload" }
1548
1449
  ),
1549
- compressionFailed: (i) => v(
1550
- `Image compression failed for "${i}", using original file`,
1450
+ compressionFailed: (n) => k(
1451
+ `Image compression failed for "${n}", using original file`,
1551
1452
  "warning",
1552
- { fileName: i, category: "file-upload" }
1453
+ { fileName: n, category: "file-upload" }
1553
1454
  )
1554
1455
  };
1555
1456
  return {
1556
1457
  // State
1557
- errors: p,
1558
- isLoading: D,
1458
+ errors: c,
1459
+ isLoading: T,
1559
1460
  // Methods
1560
- addError: v,
1561
- removeError: g,
1562
- clearErrors: U,
1563
- clearErrorsByType: y,
1564
- handleAsync: w,
1461
+ addError: k,
1462
+ removeError: C,
1463
+ clearErrors: _,
1464
+ clearErrorsByType: h,
1465
+ handleAsync: D,
1565
1466
  validate: $,
1566
- showSuccess: T,
1467
+ showSuccess: U,
1567
1468
  showWarning: j,
1568
- showInfo: H,
1569
- getErrorsByType: O,
1570
- getLatestError: d,
1571
- hasErrors: s,
1469
+ showInfo: P,
1470
+ getErrorsByType: H,
1471
+ getLatestError: u,
1472
+ hasErrors: f,
1572
1473
  // File upload specific
1573
- fileUploadErrors: l
1474
+ fileUploadErrors: d
1574
1475
  };
1575
1476
  }
1576
- function Ge(a) {
1577
- const n = ["simple", "thumbnail", "table"], e = { isValid: !0, errors: [], warnings: [] };
1578
- return typeof a != "string" ? (e.isValid = !1, e.errors.push("File uploader type must be a string")) : n.includes(a) || (e.isValid = !1, e.errors.push(`File uploader type must be one of: ${n.join(", ")}`)), e;
1477
+ function ut(o) {
1478
+ const i = ["simple", "thumbnail", "table"], e = { isValid: !0, errors: [], warnings: [] };
1479
+ return typeof o != "string" ? (e.isValid = !1, e.errors.push("File uploader type must be a string")) : i.includes(o) || (e.isValid = !1, e.errors.push(`File uploader type must be one of: ${i.join(", ")}`)), e;
1579
1480
  }
1580
- function Ye(a) {
1581
- const n = ["default", "outlined", "shaped", "raised", "tile"], e = { isValid: !0, errors: [], warnings: [] };
1582
- return a !== void 0 && typeof a != "string" ? (e.isValid = !1, e.errors.push("Card type must be a string")) : a && !n.includes(a) && (e.isValid = !1, e.errors.push(`Card type must be one of: ${n.join(", ")}`)), e;
1481
+ function mt(o) {
1482
+ const i = ["default", "outlined", "shaped", "raised", "tile"], e = { isValid: !0, errors: [], warnings: [] };
1483
+ return o !== void 0 && typeof o != "string" ? (e.isValid = !1, e.errors.push("Card type must be a string")) : o && !i.includes(o) && (e.isValid = !1, e.errors.push(`Card type must be one of: ${i.join(", ")}`)), e;
1583
1484
  }
1584
- function Xe(a) {
1585
- const n = ["en", "fa", "fr", "ch", "ar"], e = { isValid: !0, errors: [], warnings: [] };
1586
- return typeof a != "string" ? (e.isValid = !1, e.errors.push("Language code must be a string")) : n.includes(a) || (e.isValid = !1, e.errors.push(`Language code must be one of: ${n.join(", ")}`)), e;
1485
+ function ft(o) {
1486
+ const i = ["en", "fa", "fr", "ch", "ar"], e = { isValid: !0, errors: [], warnings: [] };
1487
+ return typeof o != "string" ? (e.isValid = !1, e.errors.push("Language code must be a string")) : i.includes(o) || (e.isValid = !1, e.errors.push(`Language code must be one of: ${i.join(", ")}`)), e;
1587
1488
  }
1588
- function Ze(a) {
1589
- const n = { isValid: !0, errors: [], warnings: [] };
1590
- return typeof a != "number" ? (n.isValid = !1, n.errors.push("File size must be a number")) : a <= 0 ? (n.isValid = !1, n.errors.push("File size must be greater than 0")) : a > 100 * 1024 * 1024 && n.warnings.push("File size limit is very large (>100MB), consider reducing for better performance"), n;
1489
+ function pt(o) {
1490
+ const i = { isValid: !0, errors: [], warnings: [] };
1491
+ return typeof o != "number" ? (i.isValid = !1, i.errors.push("File size must be a number")) : o <= 0 ? (i.isValid = !1, i.errors.push("File size must be greater than 0")) : o > 100 * 1024 * 1024 && i.warnings.push("File size limit is very large (>100MB), consider reducing for better performance"), i;
1591
1492
  }
1592
- function Je(a) {
1593
- const n = { isValid: !0, errors: [], warnings: [] };
1594
- return typeof a != "number" ? (n.isValid = !1, n.errors.push("File count must be a number")) : a < 0 ? (n.isValid = !1, n.errors.push("File count cannot be negative")) : a > 100 && n.warnings.push("File count limit is very high (>100), consider reducing for better performance"), n;
1493
+ function gt(o) {
1494
+ const i = { isValid: !0, errors: [], warnings: [] };
1495
+ return typeof o != "number" ? (i.isValid = !1, i.errors.push("File count must be a number")) : o < 0 ? (i.isValid = !1, i.errors.push("File count cannot be negative")) : o > 100 && i.warnings.push("File count limit is very high (>100), consider reducing for better performance"), i;
1595
1496
  }
1596
- function Qe(a) {
1597
- const n = { isValid: !0, errors: [], warnings: [] };
1598
- return typeof a != "number" ? (n.isValid = !1, n.errors.push("Compression level must be a number")) : a < 0 || a > 1 ? (n.isValid = !1, n.errors.push("Compression level must be between 0 and 1")) : a < 0.1 ? n.warnings.push("Very low compression level may result in poor image quality") : a > 0.9 && n.warnings.push("Very high compression level may not reduce file size significantly"), n;
1497
+ function ht(o) {
1498
+ const i = { isValid: !0, errors: [], warnings: [] };
1499
+ return typeof o != "number" ? (i.isValid = !1, i.errors.push("Compression level must be a number")) : o < 0 || o > 1 ? (i.isValid = !1, i.errors.push("Compression level must be between 0 and 1")) : o < 0.1 ? i.warnings.push("Very low compression level may result in poor image quality") : o > 0.9 && i.warnings.push("Very high compression level may not reduce file size significantly"), i;
1599
1500
  }
1600
- function et(a) {
1601
- const n = { isValid: !0, errors: [], warnings: [] };
1602
- return a !== void 0 && typeof a != "string" ? (n.isValid = !1, n.errors.push("File accept pattern must be a string")) : a && a.trim() === "" && n.warnings.push("Empty file accept pattern will accept all files"), n;
1501
+ function vt(o) {
1502
+ const i = { isValid: !0, errors: [], warnings: [] };
1503
+ return o !== void 0 && typeof o != "string" ? (i.isValid = !1, i.errors.push("File accept pattern must be a string")) : o && o.trim() === "" && i.warnings.push("Empty file accept pattern will accept all files"), i;
1603
1504
  }
1604
- function tt(a) {
1605
- const n = { isValid: !0, errors: [], warnings: [] };
1606
- return typeof a != "number" ? (n.isValid = !1, n.errors.push("Columns count must be a number")) : (a < 1 || a > 12) && (n.isValid = !1, n.errors.push("Columns count must be between 1 and 12")), n;
1505
+ function bt(o) {
1506
+ const i = { isValid: !0, errors: [], warnings: [] };
1507
+ return typeof o != "number" ? (i.isValid = !1, i.errors.push("Columns count must be a number")) : (o < 1 || o > 12) && (i.isValid = !1, i.errors.push("Columns count must be between 1 and 12")), i;
1607
1508
  }
1608
- function ot(a) {
1609
- const n = { isValid: !0, errors: [], warnings: [] };
1610
- return a !== void 0 && typeof a != "number" ? (n.isValid = !1, n.errors.push("Table height must be a number")) : a && a < 100 ? n.warnings.push("Table height is very small (<100px), content may not be visible") : a && a > 1e3 && n.warnings.push("Table height is very large (>1000px), consider reducing for better UX"), n;
1509
+ function yt(o) {
1510
+ const i = { isValid: !0, errors: [], warnings: [] };
1511
+ return o !== void 0 && typeof o != "number" ? (i.isValid = !1, i.errors.push("Table height must be a number")) : o && o < 100 ? i.warnings.push("Table height is very small (<100px), content may not be visible") : o && o > 1e3 && i.warnings.push("Table height is very large (>1000px), consider reducing for better UX"), i;
1611
1512
  }
1612
- function lt(a) {
1613
- const n = { isValid: !0, errors: [], warnings: [] };
1614
- return Array.isArray(a) ? (a.forEach((e, t) => {
1513
+ function _t(o) {
1514
+ const i = { isValid: !0, errors: [], warnings: [] };
1515
+ return Array.isArray(o) ? (o.forEach((e, t) => {
1615
1516
  if (!e || typeof e != "object") {
1616
- n.errors.push(`Attachment at index ${t} must be an object`);
1517
+ i.errors.push(`Attachment at index ${t} must be an object`);
1617
1518
  return;
1618
1519
  }
1619
1520
  if (!e.file || typeof e.file != "object") {
1620
- n.errors.push(`Attachment at index ${t} must have a file property`);
1521
+ i.errors.push(`Attachment at index ${t} must have a file property`);
1621
1522
  return;
1622
1523
  }
1623
- const p = e.file;
1524
+ const c = e.file;
1624
1525
  ["name", "format", "base64", "size"].forEach((L) => {
1625
- L in p || n.errors.push(`File at index ${t} is missing required field: ${L}`);
1626
- }), p.name && typeof p.name != "string" && n.errors.push(`File name at index ${t} must be a string`), p.format && typeof p.format != "string" && n.errors.push(`File format at index ${t} must be a string`), p.base64 && typeof p.base64 != "string" && n.errors.push(`File base64 at index ${t} must be a string`), p.size && typeof p.size != "number" && n.errors.push(`File size at index ${t} must be a number`), p.tags && !Array.isArray(p.tags) && n.errors.push(`File tags at index ${t} must be an array`);
1627
- }), n.errors.length > 0 && (n.isValid = !1), n) : (n.isValid = !1, n.errors.push("Document attachment must be an array"), n);
1526
+ L in c || i.errors.push(`File at index ${t} is missing required field: ${L}`);
1527
+ }), c.name && typeof c.name != "string" && i.errors.push(`File name at index ${t} must be a string`), c.format && typeof c.format != "string" && i.errors.push(`File format at index ${t} must be a string`), c.base64 && typeof c.base64 != "string" && i.errors.push(`File base64 at index ${t} must be a string`), c.size && typeof c.size != "number" && i.errors.push(`File size at index ${t} must be a number`), c.tags && !Array.isArray(c.tags) && i.errors.push(`File tags at index ${t} must be an array`);
1528
+ }), i.errors.length > 0 && (i.isValid = !1), i) : (i.isValid = !1, i.errors.push("Document attachment must be an array"), i);
1628
1529
  }
1629
- function it(a) {
1630
- const n = { isValid: !0, errors: [], warnings: [] };
1530
+ function xt(o) {
1531
+ const i = { isValid: !0, errors: [], warnings: [] };
1631
1532
  return [
1632
- { key: "fileUploaderType", validator: Ge },
1633
- { key: "cardType", validator: Ye },
1634
- { key: "lang", validator: Xe },
1635
- { key: "maxFileSize", validator: Ze },
1636
- { key: "maxFileCount", validator: Je },
1637
- { key: "imageCompressLevel", validator: Qe },
1638
- { key: "fileAccept", validator: et },
1639
- { key: "cols", validator: tt },
1640
- { key: "tableHeight", validator: ot },
1641
- { key: "documentAttachment", validator: lt }
1642
- ].forEach(({ key: t, validator: p }) => {
1643
- if (t in a) {
1644
- const D = p(a[t]);
1645
- n.errors.push(...D.errors.map((L) => `${t}: ${L}`)), n.warnings.push(...D.warnings.map((L) => `${t}: ${L}`)), D.isValid || (n.isValid = !1);
1533
+ { key: "fileUploaderType", validator: ut },
1534
+ { key: "cardType", validator: mt },
1535
+ { key: "lang", validator: ft },
1536
+ { key: "maxFileSize", validator: pt },
1537
+ { key: "maxFileCount", validator: gt },
1538
+ { key: "imageCompressLevel", validator: ht },
1539
+ { key: "fileAccept", validator: vt },
1540
+ { key: "cols", validator: bt },
1541
+ { key: "tableHeight", validator: yt },
1542
+ { key: "documentAttachment", validator: _t }
1543
+ ].forEach(({ key: t, validator: c }) => {
1544
+ if (t in o) {
1545
+ const T = c(o[t]);
1546
+ i.errors.push(...T.errors.map((L) => `${t}: ${L}`)), i.warnings.push(...T.warnings.map((L) => `${t}: ${L}`)), T.isValid || (i.isValid = !1);
1646
1547
  }
1647
- }), n;
1548
+ }), i;
1648
1549
  }
1649
- const ye = /* @__PURE__ */ te({
1550
+ const De = /* @__PURE__ */ ee({
1650
1551
  __name: "handyUploader",
1651
1552
  props: {
1652
1553
  documentAttachment: {},
@@ -1696,13 +1597,13 @@ const ye = /* @__PURE__ */ te({
1696
1597
  "updateLang",
1697
1598
  "updateDocumentAttachment"
1698
1599
  ],
1699
- setup(a, { emit: n }) {
1700
- const e = a;
1600
+ setup(o, { emit: i }) {
1601
+ const e = o;
1701
1602
  if (process.env.NODE_ENV === "development") {
1702
- const d = it(e);
1703
- d.isValid || console.error("HandyUploader prop validation failed:", d.errors), d.warnings.length > 0 && console.warn("HandyUploader prop validation warnings:", d.warnings);
1603
+ const u = xt(e);
1604
+ u.isValid || console.error("HandyUploader prop validation failed:", u.errors), u.warnings.length > 0 && console.warn("HandyUploader prop validation warnings:", u.warnings);
1704
1605
  }
1705
- const t = ge({
1606
+ const t = _e({
1706
1607
  insertDocumentDialog: !1,
1707
1608
  editDocumentDialog: !1,
1708
1609
  deleteDocumentDialog: !1,
@@ -1727,181 +1628,181 @@ const ye = /* @__PURE__ */ te({
1727
1628
  selectedLang: {},
1728
1629
  beforeInsertAttachments: {},
1729
1630
  attachmentIndex: 0
1730
- }), p = n;
1731
- Ce(() => {
1732
- L(), t.registryDocFile = e.documentAttachment, e.rtlSupport && v(), g();
1733
- }), I(
1631
+ }), c = i;
1632
+ $e(() => {
1633
+ L(), t.registryDocFile = e.documentAttachment, e.rtlSupport && k(), C();
1634
+ }), E(
1734
1635
  () => t.tempAttachment,
1735
- (d) => {
1736
- d && d.length > 0 ? j(d) : t.tempAttachmentChanged = [];
1636
+ (u) => {
1637
+ u && u.length > 0 ? j(u) : t.tempAttachmentChanged = [];
1737
1638
  }
1738
- ), I(() => e.cardType, (d) => {
1739
- p("updateCardType", d), g();
1740
- }), I(() => e.badgeCounter, (d) => {
1741
- p("updateBadgeCounter", d);
1742
- }), I(() => e.maxFileCount, (d) => {
1743
- p("updateMaxFileCount", d);
1744
- }), I(() => e.maxFileSize, (d) => {
1745
- p("updateMaxFileSize", d);
1746
- }), I(() => e.maxFileSize, (d) => {
1747
- p("updateMaxFileSize", d);
1748
- }), I(() => e.imageCompressor, (d) => {
1749
- p("updateImageCompressor", d);
1750
- }), I(() => e.imageCompressLevel, (d) => {
1751
- p("updateImageCompressLevel", d);
1752
- }), I(() => e.fileAccept, (d) => {
1753
- p("updateFileAccept", d);
1754
- }), I(() => e.thumb, (d) => {
1755
- p("updateThumb", d);
1756
- }), I(() => e.changeFileName, (d) => {
1757
- p("updateChangeFileName", d);
1758
- }), I(() => e.addFileDescription, (d) => {
1759
- p("updateAddFileDescription", d);
1760
- }), I(() => e.addFileTag, (d) => {
1761
- p("updateAddFileDescription", d);
1762
- }), I(() => e.tableThumbColumn, (d) => {
1763
- p("updateTableThumbColumn", d);
1764
- }), I(() => e.tableFixedHeader, (d) => {
1765
- p("updateTableFixedHeader", d);
1766
- }), I(() => e.tableHeight, (d) => {
1767
- p("updateTableHeight", d);
1768
- }), I(() => e.lang, (d) => {
1769
- p("updateLang", d);
1770
- }), ze(() => {
1639
+ ), E(() => e.cardType, (u) => {
1640
+ c("updateCardType", u), C();
1641
+ }), E(() => e.badgeCounter, (u) => {
1642
+ c("updateBadgeCounter", u);
1643
+ }), E(() => e.maxFileCount, (u) => {
1644
+ c("updateMaxFileCount", u);
1645
+ }), E(() => e.maxFileSize, (u) => {
1646
+ c("updateMaxFileSize", u);
1647
+ }), E(() => e.maxFileSize, (u) => {
1648
+ c("updateMaxFileSize", u);
1649
+ }), E(() => e.imageCompressor, (u) => {
1650
+ c("updateImageCompressor", u);
1651
+ }), E(() => e.imageCompressLevel, (u) => {
1652
+ c("updateImageCompressLevel", u);
1653
+ }), E(() => e.fileAccept, (u) => {
1654
+ c("updateFileAccept", u);
1655
+ }), E(() => e.thumb, (u) => {
1656
+ c("updateThumb", u);
1657
+ }), E(() => e.changeFileName, (u) => {
1658
+ c("updateChangeFileName", u);
1659
+ }), E(() => e.addFileDescription, (u) => {
1660
+ c("updateAddFileDescription", u);
1661
+ }), E(() => e.addFileTag, (u) => {
1662
+ c("updateAddFileDescription", u);
1663
+ }), E(() => e.tableThumbColumn, (u) => {
1664
+ c("updateTableThumbColumn", u);
1665
+ }), E(() => e.tableFixedHeader, (u) => {
1666
+ c("updateTableFixedHeader", u);
1667
+ }), E(() => e.tableHeight, (u) => {
1668
+ c("updateTableHeight", u);
1669
+ }), E(() => e.lang, (u) => {
1670
+ c("updateLang", u);
1671
+ }), Le(() => {
1771
1672
  t.registryDocFile = [];
1772
1673
  });
1773
- const D = () => {
1674
+ const T = () => {
1774
1675
  t.btnLoader = !1, t.tempAttachment = [], t.insertDocumentDialog = !0;
1775
1676
  }, L = () => {
1776
- e.customLang !== null ? t.selectedLang = e.customLang : t.selectedLang = qe;
1777
- }, v = () => {
1778
- }, g = () => {
1779
- const s = {
1677
+ e.customLang !== null ? t.selectedLang = e.customLang : t.selectedLang = ct;
1678
+ }, k = () => {
1679
+ }, C = () => {
1680
+ const f = {
1780
1681
  default: { outlined: !1, raised: !1, shaped: !1, tile: !1 },
1781
1682
  outlined: { outlined: !0, raised: !1, shaped: !1, tile: !1 },
1782
1683
  shaped: { outlined: !1, raised: !1, shaped: !0, tile: !1 },
1783
1684
  raised: { outlined: !1, raised: !0, shaped: !1, tile: !1 },
1784
1685
  tile: { outlined: !1, raised: !1, shaped: !1, tile: !0 }
1785
1686
  }[e.cardType || "default"];
1786
- t.outlined = s.outlined, t.raised = s.raised, t.shaped = s.shaped, t.tile = s.tile;
1787
- }, U = (d) => {
1788
- let s = new FileReader();
1789
- return new Promise(function(l) {
1790
- s.onloadend = () => {
1791
- l(s.result);
1792
- }, s.readAsDataURL(d);
1687
+ t.outlined = f.outlined, t.raised = f.raised, t.shaped = f.shaped, t.tile = f.tile;
1688
+ }, _ = (u) => {
1689
+ const f = new FileReader();
1690
+ return new Promise(function(d) {
1691
+ f.onloadend = () => {
1692
+ d(f.result);
1693
+ }, f.readAsDataURL(u);
1793
1694
  });
1794
- }, y = async () => {
1695
+ }, h = async () => {
1795
1696
  t.btnLoader = !0;
1796
- const d = (s, l) => {
1797
- t.fileUploaderSnackText = s, t.fileUploaderSnackBarAlertColor = l, t.fileUploaderSnackBarAlert = !0;
1697
+ const u = (f, d) => {
1698
+ t.fileUploaderSnackText = f, t.fileUploaderSnackBarAlertColor = d, t.fileUploaderSnackBarAlert = !0;
1798
1699
  };
1799
- for (const [s, l] of t.tempAttachmentChanged.entries()) {
1700
+ for (const [f, d] of t.tempAttachmentChanged.entries()) {
1800
1701
  if (e.documentAttachment.length >= e.maxFileCount) {
1801
- d(
1702
+ u(
1802
1703
  `${t.selectedLang[e.lang].maxFileCountAlert} ${e.maxFileCount}`,
1803
1704
  "red"
1804
1705
  );
1805
1706
  break;
1806
1707
  }
1807
- if (l.file.size / 1e3 > e.maxFileSize) {
1808
- d(
1708
+ if (d.file.size / 1e3 > e.maxFileSize) {
1709
+ u(
1809
1710
  `${t.selectedLang[e.lang].maxFileSizeAlert} ${Math.round(e.maxFileSize / 1024)} ${t.selectedLang[e.lang].size.mb}`,
1810
1711
  "red"
1811
1712
  );
1812
1713
  continue;
1813
1714
  }
1814
- let i = {}, u = {};
1815
- const m = l.file, k = m.format;
1816
- let S = !1, F = "", B = m.base64;
1817
- e.imageCompressor && ["image/png", "image/jpg", "image/jpeg", "image/webp"].includes(k) && (S = !0, F = await w(`data:${k};base64,${B}`), B = F.split(",")[1]);
1715
+ let n = {};
1716
+ const l = {}, p = d.file, s = p.format;
1717
+ let F = !1, y = "", S = p.base64;
1718
+ e.imageCompressor && ["image/png", "image/jpg", "image/jpeg", "image/webp"].includes(s) && (F = !0, y = await D(`data:${s};base64,${S}`), S = y.split(",")[1]);
1818
1719
  try {
1819
- const M = B.replace(/\s/g, "");
1820
- i = {
1821
- base64: M,
1822
- size: S ? (atob(M).length / 1024).toFixed(1) : m.size.toString(),
1823
- name: `${m.name}.${m.format}`,
1824
- tags: m.tags || [],
1825
- description: m.description || "",
1720
+ const I = S.replace(/\s/g, "");
1721
+ n = {
1722
+ base64: I,
1723
+ size: F ? (atob(I).length / 1024).toFixed(1) : p.size.toString(),
1724
+ name: `${p.name}.${p.format}`,
1725
+ tags: p.tags || [],
1726
+ description: p.description || "",
1826
1727
  showDetailState: !1,
1827
- format: k
1828
- }, u.file = i, t.registryDocFile.push(u), p("updateDocumentAttachment", t.registryDocFile);
1829
- } catch (M) {
1830
- console.error("Error processing Base64 string:", M), d("File could not be processed due to an invalid format.", "red");
1728
+ format: s
1729
+ }, l.file = n, t.registryDocFile.push(l), c("updateDocumentAttachment", t.registryDocFile);
1730
+ } catch (I) {
1731
+ console.error("Error processing Base64 string:", I), u("File could not be processed due to an invalid format.", "red");
1831
1732
  continue;
1832
1733
  }
1833
1734
  }
1834
1735
  t.documentAttachmentAPI = [], t.tempAttachmentChanged = [], t.insertDocumentDialog = !1, t.btnLoader = !1;
1835
- }, w = (d) => {
1836
- const s = document.createElement("canvas"), l = document.createElement("img");
1837
- return new Promise((i, u) => {
1838
- let m = e.imageCompressLevel;
1839
- l.onload = function() {
1840
- let k = l.width, S = l.height;
1841
- s.width = k, s.height = S;
1842
- const F = s.getContext("2d");
1843
- F == null || F.drawImage(l, 0, 0, k, S), i(s.toDataURL("image/jpeg", m));
1844
- }, l.onerror = function(k) {
1845
- u(k);
1846
- }, l.src = d;
1736
+ }, D = (u) => {
1737
+ const f = document.createElement("canvas"), d = document.createElement("img");
1738
+ return new Promise((n, l) => {
1739
+ const p = e.imageCompressLevel;
1740
+ d.onload = function() {
1741
+ const s = d.width, F = d.height;
1742
+ f.width = s, f.height = F;
1743
+ const y = f.getContext("2d");
1744
+ y == null || y.drawImage(d, 0, 0, s, F), n(f.toDataURL("image/jpeg", p));
1745
+ }, d.onerror = function(s) {
1746
+ l(s);
1747
+ }, d.src = u;
1847
1748
  });
1848
- }, $ = (d, s) => {
1849
- t.btnLoader = !1, t.selectedIndex = d, t.selectedId = s, t.deleteDocumentDialog = !0;
1850
- }, T = () => {
1851
- t.registryDocFile.splice(t.selectedIndex, 1), p("updateDocumentAttachment", t.registryDocFile), t.deleteDocumentDialog = !1;
1852
- }, j = async (d) => {
1853
- for (let s of d) {
1854
- let l = "";
1749
+ }, $ = (u, f) => {
1750
+ t.btnLoader = !1, t.selectedIndex = u, t.selectedId = f, t.deleteDocumentDialog = !0;
1751
+ }, U = () => {
1752
+ t.registryDocFile.splice(t.selectedIndex, 1), c("updateDocumentAttachment", t.registryDocFile), t.deleteDocumentDialog = !1;
1753
+ }, j = async (u) => {
1754
+ for (const f of u) {
1755
+ let d = "";
1855
1756
  try {
1856
- l = await U(s);
1857
- } catch (m) {
1858
- console.log(m);
1757
+ d = await _(f);
1758
+ } catch (p) {
1759
+ console.log(p);
1859
1760
  continue;
1860
1761
  }
1861
- let u = { file: {
1862
- name: s.name.split(".")[0],
1863
- format: s.name.substr(s.name.lastIndexOf(".") + 1),
1864
- base64: l.split(",")[1],
1762
+ const l = { file: {
1763
+ name: f.name.split(".")[0],
1764
+ format: f.name.substr(f.name.lastIndexOf(".") + 1),
1765
+ base64: d.split(",")[1],
1865
1766
  // Remove data:mime;base64, prefix
1866
- size: s.size,
1767
+ size: f.size,
1867
1768
  tags: [],
1868
1769
  description: null,
1869
1770
  showDetailState: !1
1870
1771
  } };
1871
- t.tempAttachmentChanged.push(u);
1772
+ t.tempAttachmentChanged.push(l);
1872
1773
  }
1873
- }, H = (d, s) => {
1874
- t.btnLoader = !1, t.attachmentIndex = s, t.editDocumentDialog = !0, t.tempAttachmentChanged = [d];
1875
- }, O = () => {
1876
- const d = [...e.documentAttachment];
1877
- d.splice(
1774
+ }, P = (u, f) => {
1775
+ t.btnLoader = !1, t.attachmentIndex = f, t.editDocumentDialog = !0, t.tempAttachmentChanged = [u];
1776
+ }, H = () => {
1777
+ const u = [...e.documentAttachment];
1778
+ u.splice(
1878
1779
  t.attachmentIndex,
1879
1780
  1,
1880
1781
  t.tempAttachmentChanged[0]
1881
- ), p("updateDocumentAttachment", d), t.editDocumentDialog = !1;
1782
+ ), c("updateDocumentAttachment", u), t.editDocumentDialog = !1;
1882
1783
  };
1883
- return (d, s) => {
1884
- const l = f("v-col"), i = f("v-row"), u = f("v-icon"), m = f("v-card-title"), k = f("v-file-input"), S = f("v-expansion-panel-title"), F = f("v-text-field"), B = f("v-textarea"), M = f("v-autocomplete"), G = f("v-img"), E = f("v-card"), K = f("v-expansion-panel-text"), A = f("v-expansion-panel"), Y = f("v-expansion-panels"), q = f("v-list-item-title"), J = f("v-list-item"), oe = f("v-card-text"), C = f("v-btn"), Q = f("v-card-actions"), W = f("v-dialog"), le = f("v-snackbar"), we = f("v-spacer"), ke = f("v-container");
1885
- return c(), h(ke, null, {
1886
- default: o(() => [
1887
- r(i, null, {
1888
- default: o(() => [
1889
- r(l, {
1784
+ return (u, f) => {
1785
+ const d = g("v-col"), n = g("v-row"), l = g("v-icon"), p = g("v-card-title"), s = g("v-file-input"), F = g("v-expansion-panel-title"), y = g("v-text-field"), S = g("v-textarea"), I = g("v-autocomplete"), J = g("v-img"), W = g("v-card"), N = g("v-expansion-panel-text"), K = g("v-expansion-panel"), G = g("v-expansion-panels"), te = g("v-list-item-title"), se = g("v-list-item"), oe = g("v-card-text"), z = g("v-btn"), Q = g("v-card-actions"), R = g("v-dialog"), ne = g("v-snackbar"), Ce = g("v-spacer"), Ae = g("v-container");
1786
+ return m(), b(Ae, null, {
1787
+ default: a(() => [
1788
+ r(n, null, {
1789
+ default: a(() => [
1790
+ r(d, {
1890
1791
  cols: "12",
1891
1792
  md: "12",
1892
1793
  xs: "12"
1893
1794
  }, {
1894
- default: o(() => [
1895
- r(pe, {
1795
+ default: a(() => [
1796
+ r(be, {
1896
1797
  documentAttachment: e.documentAttachment,
1897
1798
  selectedLang: t.selectedLang,
1898
1799
  lang: e.lang,
1899
1800
  badgeCounter: e.badgeCounter,
1900
1801
  btnColor: e.btnColor,
1901
1802
  maxFileCount: e.maxFileCount,
1902
- onOpenInputDocumentModal: D
1803
+ onOpenInputDocumentModal: T
1903
1804
  }, null, 8, ["documentAttachment", "selectedLang", "lang", "badgeCounter", "btnColor", "maxFileCount"]),
1904
- e.fileUploaderType === "simple" ? (c(), h(me, {
1805
+ e.fileUploaderType === "simple" ? (m(), b(ve, {
1905
1806
  key: 0,
1906
1807
  documentAttachment: e.documentAttachment,
1907
1808
  cols: e.cols,
@@ -1915,11 +1816,11 @@ const ye = /* @__PURE__ */ te({
1915
1816
  deletePermission: e.deletePermission,
1916
1817
  editPermission: e.editPermission,
1917
1818
  selectedLang: t.selectedLang,
1918
- onSetCardTheme: g,
1819
+ onSetCardTheme: C,
1919
1820
  onOpenDeleteDialog: $,
1920
- onOpenEditDocumentDialog: H
1921
- }, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : z("", !0),
1922
- e.fileUploaderType === "thumbnail" ? (c(), h(ue, {
1821
+ onOpenEditDocumentDialog: P
1822
+ }, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : B("", !0),
1823
+ e.fileUploaderType === "thumbnail" ? (m(), b(ge, {
1923
1824
  key: 1,
1924
1825
  documentAttachment: e.documentAttachment,
1925
1826
  cols: e.cols,
@@ -1933,11 +1834,11 @@ const ye = /* @__PURE__ */ te({
1933
1834
  deletePermission: e.deletePermission,
1934
1835
  editPermission: e.editPermission,
1935
1836
  selectedLang: t.selectedLang,
1936
- onSetCardTheme: g,
1937
- onOpenDeleteDialog: s[0] || (s[0] = (b, X) => $(b, X)),
1938
- onOpenEditDocumentDialog: s[1] || (s[1] = (b, X) => H(b, X))
1939
- }, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : z("", !0),
1940
- e.fileUploaderType === "table" ? (c(), h(ce, {
1837
+ onSetCardTheme: C,
1838
+ onOpenDeleteDialog: f[0] || (f[0] = (v, q) => $(v, q)),
1839
+ onOpenEditDocumentDialog: f[1] || (f[1] = (v, q) => P(v, q))
1840
+ }, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "cardType", "deletePermission", "editPermission", "selectedLang"])) : B("", !0),
1841
+ e.fileUploaderType === "table" ? (m(), b(he, {
1941
1842
  key: 2,
1942
1843
  documentAttachment: e.documentAttachment,
1943
1844
  cols: e.cols,
@@ -1954,131 +1855,131 @@ const ye = /* @__PURE__ */ te({
1954
1855
  deletePermission: e.deletePermission,
1955
1856
  editPermission: e.editPermission,
1956
1857
  selectedLang: t.selectedLang,
1957
- onSetCardTheme: g,
1858
+ onSetCardTheme: C,
1958
1859
  onOpenDeleteDialog: $,
1959
- onOpenEditDocumentDialog: H
1960
- }, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "tableThumbColumn", "tableFixedHeader", "tableHeight", "cardType", "deletePermission", "editPermission", "selectedLang"])) : z("", !0)
1860
+ onOpenEditDocumentDialog: P
1861
+ }, null, 8, ["documentAttachment", "cols", "thumb", "outlined", "raised", "shaped", "tile", "lang", "tableThumbColumn", "tableFixedHeader", "tableHeight", "cardType", "deletePermission", "editPermission", "selectedLang"])) : B("", !0)
1961
1862
  ]),
1962
1863
  _: 1
1963
1864
  })
1964
1865
  ]),
1965
1866
  _: 1
1966
1867
  }),
1967
- r(i, { justify: "center" }, {
1968
- default: o(() => [
1969
- r(W, {
1868
+ r(n, { justify: "center" }, {
1869
+ default: a(() => [
1870
+ r(R, {
1970
1871
  modelValue: t.insertDocumentDialog,
1971
- "onUpdate:modelValue": s[5] || (s[5] = (b) => t.insertDocumentDialog = b),
1872
+ "onUpdate:modelValue": f[5] || (f[5] = (v) => t.insertDocumentDialog = v),
1972
1873
  scrollable: !1,
1973
1874
  persistent: "",
1974
1875
  width: "50%"
1975
1876
  }, {
1976
- default: o(() => [
1977
- r(E, null, {
1978
- default: o(() => [
1979
- r(m, null, {
1980
- default: o(() => [
1981
- r(u, {
1982
- onClick: s[2] || (s[2] = (b) => t.insertDocumentDialog = !1)
1877
+ default: a(() => [
1878
+ r(W, null, {
1879
+ default: a(() => [
1880
+ r(p, null, {
1881
+ default: a(() => [
1882
+ r(l, {
1883
+ onClick: f[2] || (f[2] = (v) => t.insertDocumentDialog = !1)
1983
1884
  }, {
1984
- default: o(() => s[12] || (s[12] = [
1985
- _("mdi-close")
1986
- ])),
1885
+ default: a(() => [...f[12] || (f[12] = [
1886
+ w("mdi-close", -1)
1887
+ ])]),
1987
1888
  _: 1
1988
1889
  })
1989
1890
  ]),
1990
1891
  _: 1
1991
1892
  }),
1992
1893
  r(oe, null, {
1993
- default: o(() => [
1994
- t.tempAttachment.length === 0 ? (c(), V(R, { key: 0 }, [
1995
- e.fileAccept !== "" ? (c(), h(k, {
1894
+ default: a(() => [
1895
+ t.tempAttachment.length === 0 ? (m(), V(O, { key: 0 }, [
1896
+ e.fileAccept !== "" ? (m(), b(s, {
1996
1897
  key: 0,
1997
1898
  multiple: "",
1998
1899
  accept: e.fileAccept,
1999
1900
  chip: "",
2000
1901
  modelValue: t.tempAttachment,
2001
- "onUpdate:modelValue": s[3] || (s[3] = (b) => t.tempAttachment = b),
2002
- label: t.selectedLang[d.lang].insertNewFile
2003
- }, null, 8, ["accept", "modelValue", "label"])) : (c(), h(k, {
1902
+ "onUpdate:modelValue": f[3] || (f[3] = (v) => t.tempAttachment = v),
1903
+ label: t.selectedLang[o.lang].insertNewFile
1904
+ }, null, 8, ["accept", "modelValue", "label"])) : (m(), b(s, {
2004
1905
  key: 1,
2005
1906
  multiple: "",
2006
1907
  modelValue: t.tempAttachment,
2007
- "onUpdate:modelValue": s[4] || (s[4] = (b) => t.tempAttachment = b),
2008
- label: t.selectedLang[d.lang].insertNewFile
1908
+ "onUpdate:modelValue": f[4] || (f[4] = (v) => t.tempAttachment = v),
1909
+ label: t.selectedLang[o.lang].insertNewFile
2009
1910
  }, null, 8, ["modelValue", "label"]))
2010
- ], 64)) : (c(), V(R, { key: 1 }, [
2011
- e.addFileTag || e.addFileDescription || e.changeFileName ? (c(), h(Y, { key: 0 }, {
2012
- default: o(() => [
2013
- (c(!0), V(R, null, Z(t.tempAttachmentChanged, (b, X) => (c(), h(A, {
2014
- key: `attachment-${X}`
1911
+ ], 64)) : (m(), V(O, { key: 1 }, [
1912
+ e.addFileTag || e.addFileDescription || e.changeFileName ? (m(), b(G, { key: 0 }, {
1913
+ default: a(() => [
1914
+ (m(!0), V(O, null, X(t.tempAttachmentChanged, (v, q) => (m(), b(K, {
1915
+ key: `attachment-${q}`
2015
1916
  }, {
2016
- default: o(() => [
2017
- r(S, null, {
2018
- default: o(() => [
2019
- _(x(b.file.name), 1)
1917
+ default: a(() => [
1918
+ r(F, null, {
1919
+ default: a(() => [
1920
+ w(x(v.file.name), 1)
2020
1921
  ]),
2021
1922
  _: 2
2022
1923
  }, 1024),
2023
- r(K, null, {
2024
- default: o(() => [
2025
- r(i, {
1924
+ r(N, null, {
1925
+ default: a(() => [
1926
+ r(n, {
2026
1927
  align: "center",
2027
1928
  justify: "center"
2028
1929
  }, {
2029
- default: o(() => [
2030
- r(l, {
1930
+ default: a(() => [
1931
+ r(d, {
2031
1932
  cols: "12",
2032
1933
  lg: "9",
2033
1934
  md: "9",
2034
1935
  xs: "12"
2035
1936
  }, {
2036
- default: o(() => [
2037
- e.changeFileName ? (c(), h(F, {
1937
+ default: a(() => [
1938
+ e.changeFileName ? (m(), b(y, {
2038
1939
  key: 0,
2039
- label: t.selectedLang[d.lang].fileName,
2040
- modelValue: b.file.name,
2041
- "onUpdate:modelValue": (N) => b.file.name = N
2042
- }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : z("", !0),
2043
- e.addFileDescription ? (c(), h(B, {
1940
+ label: t.selectedLang[o.lang].fileName,
1941
+ modelValue: v.file.name,
1942
+ "onUpdate:modelValue": (M) => v.file.name = M
1943
+ }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
1944
+ e.addFileDescription ? (m(), b(S, {
2044
1945
  key: 1,
2045
- label: t.selectedLang[d.lang].fileDescription,
1946
+ label: t.selectedLang[o.lang].fileDescription,
2046
1947
  "auto-grow": "",
2047
1948
  "row-height": "1",
2048
- modelValue: b.file.description,
2049
- "onUpdate:modelValue": (N) => b.file.description = N
2050
- }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : z("", !0),
2051
- e.addFileTag ? (c(), h(M, {
1949
+ modelValue: v.file.description,
1950
+ "onUpdate:modelValue": (M) => v.file.description = M
1951
+ }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
1952
+ e.addFileTag ? (m(), b(I, {
2052
1953
  key: 2,
2053
- modelValue: b.file.tags,
2054
- "onUpdate:modelValue": (N) => b.file.tags = N,
1954
+ modelValue: v.file.tags,
1955
+ "onUpdate:modelValue": (M) => v.file.tags = M,
2055
1956
  items: e.tags,
2056
1957
  dense: "",
2057
1958
  chips: "",
2058
- label: t.selectedLang[d.lang].fileTags,
1959
+ label: t.selectedLang[o.lang].fileTags,
2059
1960
  multiple: ""
2060
- }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) : z("", !0)
1961
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) : B("", !0)
2061
1962
  ]),
2062
1963
  _: 2
2063
1964
  }, 1024),
2064
- r(l, {
1965
+ r(d, {
2065
1966
  align: "center",
2066
1967
  cols: "12",
2067
1968
  lg: "3",
2068
1969
  md: "3",
2069
1970
  xs: "12"
2070
1971
  }, {
2071
- default: o(() => [
2072
- b.file.format === "jpg" || b.file.format === "jpeg" || b.file.format === "png" || b.file.format === "tif" || b.file.format === "bmp" ? (c(), h(E, { key: 0 }, {
2073
- default: o(() => [
2074
- r(G, {
2075
- src: "data:" + b.file.format + ";base64," + b.file.base64
1972
+ default: a(() => [
1973
+ v.file.format === "jpg" || v.file.format === "jpeg" || v.file.format === "png" || v.file.format === "tif" || v.file.format === "bmp" ? (m(), b(W, { key: 0 }, {
1974
+ default: a(() => [
1975
+ r(J, {
1976
+ src: "data:" + v.file.format + ";base64," + v.file.base64
2076
1977
  }, null, 8, ["src"])
2077
1978
  ]),
2078
1979
  _: 2
2079
- }, 1024)) : (c(), h(ne, {
1980
+ }, 1024)) : (m(), b(ie, {
2080
1981
  key: 1,
2081
- "file-format": b.file.format,
1982
+ "file-format": v.file.format,
2082
1983
  size: 60
2083
1984
  }, null, 8, ["file-format"]))
2084
1985
  ]),
@@ -2095,24 +1996,24 @@ const ye = /* @__PURE__ */ te({
2095
1996
  }, 1024))), 128))
2096
1997
  ]),
2097
1998
  _: 1
2098
- })) : (c(), h(E, {
1999
+ })) : (m(), b(W, {
2099
2000
  key: 1,
2100
2001
  class: "mx-auto",
2101
2002
  tile: ""
2102
2003
  }, {
2103
- default: o(() => [
2104
- (c(!0), V(R, null, Z(t.tempAttachmentChanged, (b, X) => (c(), h(J, {
2105
- key: `attachment-${X}`,
2004
+ default: a(() => [
2005
+ (m(!0), V(O, null, X(t.tempAttachmentChanged, (v, q) => (m(), b(se, {
2006
+ key: `attachment-${q}`,
2106
2007
  style: { "border-bottom": "1px solid #E0E0E0" }
2107
2008
  }, {
2108
- default: o(() => [
2109
- r(q, null, {
2110
- default: o(() => [
2111
- r(ne, {
2112
- "file-format": b.file.format,
2009
+ default: a(() => [
2010
+ r(te, null, {
2011
+ default: a(() => [
2012
+ r(ie, {
2013
+ "file-format": v.file.format,
2113
2014
  size: 24
2114
2015
  }, null, 8, ["file-format"]),
2115
- _(" " + x(b.file.name) + "." + x(b.file.format), 1)
2016
+ w(" " + x(v.file.name) + "." + x(v.file.format), 1)
2116
2017
  ]),
2117
2018
  _: 2
2118
2019
  }, 1024)
@@ -2127,15 +2028,15 @@ const ye = /* @__PURE__ */ te({
2127
2028
  _: 1
2128
2029
  }),
2129
2030
  r(Q, null, {
2130
- default: o(() => [
2131
- r(C, {
2031
+ default: a(() => [
2032
+ r(z, {
2132
2033
  disabled: t.tempAttachment == null || t.btnLoader,
2133
2034
  loading: t.btnLoader,
2134
2035
  color: e.btnColor,
2135
- onClick: y
2036
+ onClick: h
2136
2037
  }, {
2137
- default: o(() => [
2138
- _(x(t.selectedLang[d.lang].add), 1)
2038
+ default: a(() => [
2039
+ w(x(t.selectedLang[o.lang].add), 1)
2139
2040
  ]),
2140
2041
  _: 1
2141
2042
  }, 8, ["disabled", "loading", "color"])
@@ -2151,96 +2052,96 @@ const ye = /* @__PURE__ */ te({
2151
2052
  ]),
2152
2053
  _: 1
2153
2054
  }),
2154
- r(i, { justify: "center" }, {
2155
- default: o(() => [
2156
- r(W, {
2055
+ r(n, { justify: "center" }, {
2056
+ default: a(() => [
2057
+ r(R, {
2157
2058
  modelValue: t.editDocumentDialog,
2158
- "onUpdate:modelValue": s[7] || (s[7] = (b) => t.editDocumentDialog = b),
2059
+ "onUpdate:modelValue": f[7] || (f[7] = (v) => t.editDocumentDialog = v),
2159
2060
  scrollable: !1,
2160
2061
  persistent: "",
2161
2062
  width: "50%"
2162
2063
  }, {
2163
- default: o(() => [
2164
- r(E, null, {
2165
- default: o(() => [
2166
- r(m, null, {
2167
- default: o(() => [
2168
- r(u, {
2169
- onClick: s[6] || (s[6] = (b) => t.editDocumentDialog = !1)
2064
+ default: a(() => [
2065
+ r(W, null, {
2066
+ default: a(() => [
2067
+ r(p, null, {
2068
+ default: a(() => [
2069
+ r(l, {
2070
+ onClick: f[6] || (f[6] = (v) => t.editDocumentDialog = !1)
2170
2071
  }, {
2171
- default: o(() => s[13] || (s[13] = [
2172
- _("mdi-close")
2173
- ])),
2072
+ default: a(() => [...f[13] || (f[13] = [
2073
+ w("mdi-close", -1)
2074
+ ])]),
2174
2075
  _: 1
2175
2076
  })
2176
2077
  ]),
2177
2078
  _: 1
2178
2079
  }),
2179
- (c(!0), V(R, null, Z(t.tempAttachmentChanged, (b, X) => (c(), h(oe, {
2180
- key: `attachment-${X}`
2080
+ (m(!0), V(O, null, X(t.tempAttachmentChanged, (v, q) => (m(), b(oe, {
2081
+ key: `attachment-${q}`
2181
2082
  }, {
2182
- default: o(() => [
2183
- r(i, {
2083
+ default: a(() => [
2084
+ r(n, {
2184
2085
  align: "center",
2185
2086
  justify: "center"
2186
2087
  }, {
2187
- default: o(() => [
2188
- r(l, {
2088
+ default: a(() => [
2089
+ r(d, {
2189
2090
  cols: "12",
2190
2091
  lg: "9",
2191
2092
  md: "9",
2192
2093
  xs: "12"
2193
2094
  }, {
2194
- default: o(() => [
2195
- e.changeFileName ? (c(), h(F, {
2095
+ default: a(() => [
2096
+ e.changeFileName ? (m(), b(y, {
2196
2097
  key: 0,
2197
- label: t.selectedLang[d.lang].fileName,
2198
- modelValue: b.file.name,
2199
- "onUpdate:modelValue": (N) => b.file.name = N
2200
- }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : z("", !0),
2201
- e.addFileDescription ? (c(), h(B, {
2098
+ label: t.selectedLang[o.lang].fileName,
2099
+ modelValue: v.file.name,
2100
+ "onUpdate:modelValue": (M) => v.file.name = M
2101
+ }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
2102
+ e.addFileDescription ? (m(), b(S, {
2202
2103
  key: 1,
2203
- label: t.selectedLang[d.lang].fileDescription,
2104
+ label: t.selectedLang[o.lang].fileDescription,
2204
2105
  "auto-grow": "",
2205
2106
  "row-height": "1",
2206
- modelValue: b.file.description,
2207
- "onUpdate:modelValue": (N) => b.file.description = N
2208
- }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : z("", !0),
2209
- e.addFileTag ? (c(), h(M, {
2107
+ modelValue: v.file.description,
2108
+ "onUpdate:modelValue": (M) => v.file.description = M
2109
+ }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : B("", !0),
2110
+ e.addFileTag ? (m(), b(I, {
2210
2111
  key: 2,
2211
- modelValue: b.file.tags,
2212
- "onUpdate:modelValue": (N) => b.file.tags = N,
2112
+ modelValue: v.file.tags,
2113
+ "onUpdate:modelValue": (M) => v.file.tags = M,
2213
2114
  items: e.tags,
2214
2115
  dense: "",
2215
2116
  chips: "",
2216
- label: t.selectedLang[d.lang].fileTags,
2117
+ label: t.selectedLang[o.lang].fileTags,
2217
2118
  multiple: ""
2218
- }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) : z("", !0)
2119
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "items", "label"])) : B("", !0)
2219
2120
  ]),
2220
2121
  _: 2
2221
2122
  }, 1024),
2222
- r(l, {
2123
+ r(d, {
2223
2124
  align: "center",
2224
2125
  cols: "12",
2225
2126
  lg: "3",
2226
2127
  md: "3",
2227
2128
  xs: "12"
2228
2129
  }, {
2229
- default: o(() => {
2230
- var N;
2130
+ default: a(() => {
2131
+ var M;
2231
2132
  return [
2232
- b.file.name && ["jpg", "jpeg", "png", "tif", "bmp"].includes(
2233
- ((N = b.file.name.split(".").pop()) == null ? void 0 : N.toLowerCase()) || ""
2234
- ) ? (c(), h(E, { key: 0 }, {
2235
- default: o(() => [
2236
- r(G, {
2237
- src: "data:" + b.file.format + ";base64," + b.file.base64
2133
+ v.file.name && ["jpg", "jpeg", "png", "tif", "bmp"].includes(
2134
+ ((M = v.file.name.split(".").pop()) == null ? void 0 : M.toLowerCase()) || ""
2135
+ ) ? (m(), b(W, { key: 0 }, {
2136
+ default: a(() => [
2137
+ r(J, {
2138
+ src: "data:" + v.file.format + ";base64," + v.file.base64
2238
2139
  }, null, 8, ["src"])
2239
2140
  ]),
2240
2141
  _: 2
2241
- }, 1024)) : (c(), h(ne, {
2142
+ }, 1024)) : (m(), b(ie, {
2242
2143
  key: 1,
2243
- "file-format": b.file.format,
2144
+ "file-format": v.file.format,
2244
2145
  size: 60
2245
2146
  }, null, 8, ["file-format"]))
2246
2147
  ];
@@ -2254,15 +2155,15 @@ const ye = /* @__PURE__ */ te({
2254
2155
  _: 2
2255
2156
  }, 1024))), 128)),
2256
2157
  r(Q, null, {
2257
- default: o(() => [
2258
- r(C, {
2158
+ default: a(() => [
2159
+ r(z, {
2259
2160
  disabled: t.tempAttachment === null || t.btnLoader,
2260
2161
  loading: t.btnLoader,
2261
2162
  color: e.btnColor,
2262
- onClick: O
2163
+ onClick: H
2263
2164
  }, {
2264
- default: o(() => [
2265
- _(x(t.selectedLang[d.lang].edit), 1)
2165
+ default: a(() => [
2166
+ w(x(t.selectedLang[o.lang].edit), 1)
2266
2167
  ]),
2267
2168
  _: 1
2268
2169
  }, 8, ["disabled", "loading", "color"])
@@ -2278,26 +2179,26 @@ const ye = /* @__PURE__ */ te({
2278
2179
  ]),
2279
2180
  _: 1
2280
2181
  }),
2281
- r(le, {
2182
+ r(ne, {
2282
2183
  modelValue: t.fileUploaderSnackBarAlert,
2283
- "onUpdate:modelValue": s[9] || (s[9] = (b) => t.fileUploaderSnackBarAlert = b),
2184
+ "onUpdate:modelValue": f[9] || (f[9] = (v) => t.fileUploaderSnackBarAlert = v),
2284
2185
  right: "",
2285
2186
  bottom: "",
2286
2187
  color: t.fileUploaderSnackBarAlertColor,
2287
2188
  timeout: 3e3
2288
2189
  }, {
2289
- default: o(() => [
2290
- _(x(t.fileUploaderSnackText) + " ", 1),
2291
- r(C, {
2190
+ default: a(() => [
2191
+ w(x(t.fileUploaderSnackText) + " ", 1),
2192
+ r(z, {
2292
2193
  color: "white",
2293
2194
  text: "",
2294
- onClick: s[8] || (s[8] = (b) => t.fileUploaderSnackBarAlert = !1)
2195
+ onClick: f[8] || (f[8] = (v) => t.fileUploaderSnackBarAlert = !1)
2295
2196
  }, {
2296
- default: o(() => [
2297
- r(u, null, {
2298
- default: o(() => s[14] || (s[14] = [
2299
- _("mdi-close")
2300
- ])),
2197
+ default: a(() => [
2198
+ r(l, null, {
2199
+ default: a(() => [...f[14] || (f[14] = [
2200
+ w("mdi-close", -1)
2201
+ ])]),
2301
2202
  _: 1
2302
2203
  })
2303
2204
  ]),
@@ -2306,50 +2207,50 @@ const ye = /* @__PURE__ */ te({
2306
2207
  ]),
2307
2208
  _: 1
2308
2209
  }, 8, ["modelValue", "color"]),
2309
- r(i, { justify: "center" }, {
2310
- default: o(() => [
2311
- r(W, {
2210
+ r(n, { justify: "center" }, {
2211
+ default: a(() => [
2212
+ r(R, {
2312
2213
  modelValue: t.deleteDocumentDialog,
2313
- "onUpdate:modelValue": s[11] || (s[11] = (b) => t.deleteDocumentDialog = b),
2214
+ "onUpdate:modelValue": f[11] || (f[11] = (v) => t.deleteDocumentDialog = v),
2314
2215
  persistent: "",
2315
2216
  width: "30%"
2316
2217
  }, {
2317
- default: o(() => [
2318
- r(E, null, {
2319
- default: o(() => [
2320
- r(m, null, {
2321
- default: o(() => [
2322
- r(u, { color: "red" })
2218
+ default: a(() => [
2219
+ r(W, null, {
2220
+ default: a(() => [
2221
+ r(p, null, {
2222
+ default: a(() => [
2223
+ r(l, { color: "red" })
2323
2224
  ]),
2324
2225
  _: 1
2325
2226
  }),
2326
2227
  r(oe, null, {
2327
- default: o(() => [
2328
- _(x(t.selectedLang[d.lang].deleteDialog.message), 1)
2228
+ default: a(() => [
2229
+ w(x(t.selectedLang[o.lang].deleteDialog.message), 1)
2329
2230
  ]),
2330
2231
  _: 1
2331
2232
  }),
2332
2233
  r(Q, null, {
2333
- default: o(() => [
2334
- r(we),
2335
- r(C, {
2234
+ default: a(() => [
2235
+ r(Ce),
2236
+ r(z, {
2336
2237
  color: "green darken-1",
2337
2238
  text: "",
2338
- onClick: s[10] || (s[10] = (b) => t.deleteDocumentDialog = !1)
2239
+ onClick: f[10] || (f[10] = (v) => t.deleteDocumentDialog = !1)
2339
2240
  }, {
2340
- default: o(() => [
2341
- _(x(t.selectedLang[d.lang].deleteDialog.cancel), 1)
2241
+ default: a(() => [
2242
+ w(x(t.selectedLang[o.lang].deleteDialog.cancel), 1)
2342
2243
  ]),
2343
2244
  _: 1
2344
2245
  }),
2345
- r(C, {
2246
+ r(z, {
2346
2247
  color: "primary",
2347
2248
  disabled: t.btnLoader,
2348
2249
  loading: t.btnLoader,
2349
- onClick: T
2250
+ onClick: U
2350
2251
  }, {
2351
- default: o(() => [
2352
- _(x(t.selectedLang[d.lang].delete), 1)
2252
+ default: a(() => [
2253
+ w(x(t.selectedLang[o.lang].delete), 1)
2353
2254
  ]),
2354
2255
  _: 1
2355
2256
  }, 8, ["disabled", "loading"])
@@ -2370,38 +2271,38 @@ const ye = /* @__PURE__ */ te({
2370
2271
  });
2371
2272
  };
2372
2273
  }
2373
- }), dt = {
2374
- ThumbnailUploader: ue,
2375
- TableUploader: ce,
2376
- SimpleUploader: me,
2377
- HandyUploader: ye,
2378
- InsertButton: pe,
2379
- SelectFileIconType: ne
2274
+ }), At = {
2275
+ ThumbnailUploader: ge,
2276
+ TableUploader: he,
2277
+ SimpleUploader: ve,
2278
+ HandyUploader: De,
2279
+ InsertButton: be,
2280
+ SelectFileIconType: ie
2380
2281
  };
2381
- function nt(a) {
2382
- a.component("ThumbnailUploader", ue), a.component("TableUploader", ce), a.component("SimpleUploader", me), a.component("HandyUploader", ye), a.component("InsertButton", pe), a.component("SelectFileIconType", ne);
2282
+ function wt(o) {
2283
+ o.component("ThumbnailUploader", ge), o.component("TableUploader", he), o.component("SimpleUploader", ve), o.component("HandyUploader", De), o.component("InsertButton", be), o.component("SelectFileIconType", ie);
2383
2284
  }
2384
- typeof window < "u" && window.Vue && nt(window.Vue);
2285
+ typeof window < "u" && window.Vue && wt(window.Vue);
2385
2286
  export {
2386
- ye as HandyUploader,
2387
- pe as InsertButton,
2388
- ne as SelectFileIconType,
2389
- me as SimpleUploader,
2390
- ce as TableUploader,
2391
- ue as ThumbnailUploader,
2392
- $e as compressImage,
2393
- Ve as constructImageDataUrl,
2394
- dt as default,
2395
- fe as fileToBase64,
2396
- de as formatFileSize,
2397
- Te as getFileIcon,
2287
+ De as HandyUploader,
2288
+ be as InsertButton,
2289
+ ie as SelectFileIconType,
2290
+ ve as SimpleUploader,
2291
+ he as TableUploader,
2292
+ ge as ThumbnailUploader,
2293
+ Ie as compressImage,
2294
+ Se as constructImageDataUrl,
2295
+ At as default,
2296
+ ye as fileToBase64,
2297
+ ce as formatFileSize,
2298
+ kt as getFileIcon,
2398
2299
  re as getFileType,
2399
- _e as getMimeTypeFromExtension,
2400
- nt as install,
2401
- be as isImageFile,
2402
- qe as languageData,
2403
- st as useErrorHandler,
2404
- rt as useFileUpload,
2405
- Le as validateFileCount,
2406
- Ae as validateFileSize
2300
+ Fe as getMimeTypeFromExtension,
2301
+ wt as install,
2302
+ pe as isImageFile,
2303
+ ct as languageData,
2304
+ Ct as useErrorHandler,
2305
+ Dt as useFileUpload,
2306
+ Be as validateFileCount,
2307
+ Ve as validateFileSize
2407
2308
  };