@wisemen/wise-crm-web 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/ActivityIcon-DNdtN-M_.js +19 -0
  2. package/dist/AppSkeletonLoader-Dq6pKznm.js +1112 -0
  3. package/dist/AttachmentIcon-BLUd7LaN.js +19 -0
  4. package/dist/BoldIcon-WRYUWz15.js +16 -0
  5. package/dist/BookIcon-Bb3r5y_J.js +19 -0
  6. package/dist/BuildingIcon-DFutRg8d.js +19 -0
  7. package/dist/BuildingsIcon-BVHy6yoa.js +19 -0
  8. package/dist/BulletListIcon-BhOXLSBa.js +16 -0
  9. package/dist/BusinessDetailSidebarProvider-a6VeNUii.js +2946 -0
  10. package/dist/BusinessDetailView-Dz3wDSx5.js +24 -0
  11. package/dist/ChevronDownIcon-BmyTSPND.js +19 -0
  12. package/dist/ClockIcon-BYfZAvIE.js +23 -0
  13. package/dist/ClockPlusIcon-BcNi0Y9I.js +23 -0
  14. package/dist/CopyIcon-2eV8MRv_.js +19 -0
  15. package/dist/CrmDetailHeaderCard-BkA0Z-Cu.js +2523 -0
  16. package/dist/CrmDetailView-BhZEQqUH.js +67 -0
  17. package/dist/DealCommunicationTabView-Drp9MEPu.js +140 -0
  18. package/dist/DealDetailView-DWLudchX.js +1049 -0
  19. package/dist/DealExternalAttachment-B6l0gDqF.js +179 -0
  20. package/dist/DealIcon-BwUWYDxo.js +19 -0
  21. package/dist/DealSendMailDialog-Dqei4933.js +1566 -0
  22. package/dist/DownloadCloudIcon-BSrLGGrY.js +19 -0
  23. package/dist/EditWithLineIcon-BKYDPJOY.js +19 -0
  24. package/dist/Error-za-wClcU.js +13302 -0
  25. package/dist/FileIcon-DL1e1tAu.js +19 -0
  26. package/dist/FilterLinesIcon-DgVMySAE.js +22 -0
  27. package/dist/H1Icon-B6NEsEbj.js +17 -0
  28. package/dist/H2Icon-CNof5Ohu.js +17 -0
  29. package/dist/H3Icon-B2F2Tb6r.js +17 -0
  30. package/dist/HashIcon-C_XttKfW.js +19 -0
  31. package/dist/HomeFilledIcon-DtZ2eXxt.js +16 -0
  32. package/dist/IndividualDetailSidebarProvider-jjRoK1Av.js +609 -0
  33. package/dist/IndividualDetailView-BqIRHn-0.js +24 -0
  34. package/dist/ItalicIcon-DqBns3yy.js +17 -0
  35. package/dist/LayersTreeIcon-DZZCSCY9.js +23 -0
  36. package/dist/LinkBrokenIcon-BNBpWSi7.js +19 -0
  37. package/dist/LinkExternalIcon-B7SHeB1_.js +19 -0
  38. package/dist/LinkIcon-8bCrZEv9.js +17 -0
  39. package/dist/LocationPinIcon-UySRqSfG.js +19 -0
  40. package/dist/MailIcon-BT7gSIZb.js +19 -0
  41. package/dist/MobilePhoneIcon-_KQGnCSS.js +19 -0
  42. package/dist/NumberedListIcon-B-JVTSAe.js +17 -0
  43. package/dist/PhoneIcon-DGGW_MNR.js +19 -0
  44. package/dist/RefreshIcon-D1QWfdPD.js +19 -0
  45. package/dist/SendIcon-BtJ-NCec.js +19 -0
  46. package/dist/SettingsIcon-CWFwJelS.js +25 -0
  47. package/dist/StarOutlineIcon-C-ELTCDQ.js +19 -0
  48. package/dist/StarYellowIcon-7wuNWaQO.js +19 -0
  49. package/dist/ThreeDotsIcon-C56RWk-0.js +32 -0
  50. package/dist/TimeLineMarkerIcon-DLmPwfs6.js +18 -0
  51. package/dist/TrashIcon-o4PWmcYe.js +20 -0
  52. package/dist/UploadCloudIcon-D2tWB0NP.js +19 -0
  53. package/dist/UserCircleIcon-DiDajcIH.js +23 -0
  54. package/dist/UserIcon-Bv1eF7ln.js +22 -0
  55. package/dist/VerticalDotsIcon-YcD73UqY.js +20 -0
  56. package/dist/WalletIcon-CUh92U5K.js +19 -0
  57. package/dist/_plugin-vue_export-helper-D3hKq4w_.js +8 -0
  58. package/dist/client-9P6xe_5g.js +4188 -0
  59. package/dist/index.js +5598 -28
  60. package/dist/style.css +2 -1
  61. package/dist/testing.js +366 -386
  62. package/dist/uuid.util-DpiDKVoj.js +11 -0
  63. package/package.json +17 -17
  64. package/dist/ActivityIcon-xJAmguCr.js +0 -21
  65. package/dist/AttachmentIcon-BE5eNDu2.js +0 -21
  66. package/dist/BoldIcon-gIpFueAk.js +0 -18
  67. package/dist/BookIcon-BcJ7URa7.js +0 -21
  68. package/dist/BuildingIcon-Dg6uZKp9.js +0 -21
  69. package/dist/BuildingsIcon-BFPEpeVP.js +0 -21
  70. package/dist/BulletListIcon-CjJGF99S.js +0 -18
  71. package/dist/BusinessDetailView-Cq7_ziCe.js +0 -27
  72. package/dist/ChevronDownIcon-CsDbkAjy.js +0 -21
  73. package/dist/ClockIcon-DmkNAIk7.js +0 -32
  74. package/dist/ClockPlusIcon-DeHgqDF1.js +0 -32
  75. package/dist/CopyIcon-BsUjyueq.js +0 -21
  76. package/dist/CrmDetailView.vue_vue_type_script_setup_true_lang-Db5HsgF9.js +0 -102
  77. package/dist/DealCommunicationTabView-CQ9vUi3p.js +0 -207
  78. package/dist/DealDetailView-t_v7MuZA.js +0 -1329
  79. package/dist/DealIcon-BJzNx1o6.js +0 -21
  80. package/dist/DownloadCloudIcon-DNPJTdVt.js +0 -21
  81. package/dist/EditWithLineIcon-BXkQTlXs.js +0 -21
  82. package/dist/FileIcon-DSQi3VUb.js +0 -21
  83. package/dist/FilterLinesIcon-YkTZirYE.js +0 -24
  84. package/dist/H1Icon-DsvWrDD0.js +0 -19
  85. package/dist/H2Icon-8xYiqSmR.js +0 -19
  86. package/dist/H3Icon-BdH22r8A.js +0 -19
  87. package/dist/HashIcon-DNclSYC-.js +0 -21
  88. package/dist/HomeFilledIcon-my0TzA9q.js +0 -18
  89. package/dist/IndividualDetailView-CjgKD__T.js +0 -27
  90. package/dist/ItalicIcon-Be9twusP.js +0 -19
  91. package/dist/LayersTreeIcon-DcK6WtJe.js +0 -32
  92. package/dist/LinkBrokenIcon-9wgVs__d.js +0 -21
  93. package/dist/LinkExternalIcon--XtB6wEj.js +0 -21
  94. package/dist/LinkIcon-BzYeqJaA.js +0 -19
  95. package/dist/LocationPinIcon-CSBPPRHC.js +0 -21
  96. package/dist/MailIcon-BgkBOes6.js +0 -21
  97. package/dist/MobilePhoneIcon-BgB_oAAr.js +0 -21
  98. package/dist/NumberedListIcon-Bf4a8S_g.js +0 -19
  99. package/dist/PhoneIcon-BKgg0ufh.js +0 -21
  100. package/dist/RefreshIcon-GJ03jEFx.js +0 -21
  101. package/dist/SendIcon-0ygrHbYx.js +0 -21
  102. package/dist/SettingsIcon-BRNQD8GX.js +0 -28
  103. package/dist/StarOutlineIcon-Gxm2X9hf.js +0 -21
  104. package/dist/StarYellowIcon-BZfRhUd6.js +0 -21
  105. package/dist/ThreeDotsIcon-cBE_pGvU.js +0 -32
  106. package/dist/TimeLineMarkerIcon-j4hDQteY.js +0 -20
  107. package/dist/TrashIcon-BynOxtIY.js +0 -22
  108. package/dist/UploadCloudIcon-BgcrXv_v.js +0 -21
  109. package/dist/UserCircleIcon-Bc1eahfh.js +0 -32
  110. package/dist/UserIcon-CCK-3lX3.js +0 -24
  111. package/dist/VerticalDotsIcon-C5gK8Zmi.js +0 -22
  112. package/dist/WalletIcon-DjqurEH2.js +0 -21
  113. package/dist/index-Cb2tNFVq.js +0 -24606
  114. package/dist/uuid.util-1167NMVR.js +0 -6562
@@ -0,0 +1,1566 @@
1
+ import { G as e, H as t, J as n, K as r, L as i, V as a, Y as o, Z as s, at as c, p as l, q as u, z as d } from "./Error-za-wClcU.js";
2
+ import { a as f, l as p, s as m, t as ee, u as te } from "./AppSkeletonLoader-Dq6pKznm.js";
3
+ import { A as h, D as ne, E as re, H as ie, S as ae, U as oe, W as se, _ as ce, at as le, b as ue, et as de, f as fe, h as pe, i as me, m as he, nt as ge, r as _e, t as ve, tt as ye, ut as be, vt as xe } from "./client-9P6xe_5g.js";
4
+ import { t as Se } from "./_plugin-vue_export-helper-D3hKq4w_.js";
5
+ import { a as Ce, i as we, n as g, o as Te, r as Ee, t as De } from "./DealExternalAttachment-B6l0gDqF.js";
6
+ import _, { z as v } from "zod";
7
+ import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createTextVNode as T, createVNode as E, defineComponent as D, mergeModels as O, mergeProps as k, normalizeClass as A, onBeforeUnmount as Oe, onMounted as j, openBlock as M, ref as N, renderList as P, renderSlot as F, toDisplayString as I, unref as L, useAttrs as ke, useId as R, useModel as z, useTemplateRef as Ae, watch as je, withCtx as B } from "vue";
8
+ import { useI18n as V } from "vue-i18n";
9
+ import { FileUploadStatus as H, PaginationParamsBuilder as Me, VcButton as U, VcDialog as W, VcDialogCloseButton as Ne, VcDialogContent as Pe, VcDialogDescription as Fe, VcDialogTitle as Ie, VcFileUploadDropzone as Le, VcFileUploadItem as Re, VcFileUploadItemRemove as ze, VcFileUploadItemReplace as Be, VcFileUploadRoot as Ve, VcFileUploadTrigger as He, VcFormField as G, VcFormFieldLabel as K, VcIcon as q, VcIconButton as J, VcKeyboardShortcut as Ue, VcSpinner as We, VcTextField as Ge, VcTooltipArrow as Ke, VcTooltipContent as qe, VcTooltipInnerContent as Je, VcTooltipPortal as Ye, VcTooltipRoot as Xe, VcTooltipTrigger as Ze, useDialog as Qe, useToast as $e } from "@wisemen/vue-core-components";
10
+ import { useElementSize as et } from "@vueuse/core";
11
+ import { useForm as tt } from "formango";
12
+ import { AnimatePresence as Y, Motion as X, MotionConfig as nt, motion as rt } from "motion-v";
13
+ import { ListboxContent as it, ListboxItem as at, ListboxRoot as ot, Primitive as st, TagsInputInput as ct, TagsInputItem as lt, TagsInputItemDelete as ut, TagsInputItemText as dt, TagsInputRoot as ft } from "reka-ui";
14
+ import pt from "@tiptap/extension-link";
15
+ import { StarterKit as mt } from "@tiptap/starter-kit";
16
+ import { EditorContent as ht, useEditor as gt } from "@tiptap/vue-3";
17
+ //#endregion
18
+ //#region src/components/app/tags-input-field/AppTagsInputField.vue
19
+ var _t = /* @__PURE__ */ D({
20
+ __name: "AppTagsInputField",
21
+ props: /* @__PURE__ */ O({
22
+ isDisabled: { type: Boolean },
23
+ isRequired: { type: Boolean },
24
+ isTouched: { type: Boolean },
25
+ errorMessage: {},
26
+ label: {},
27
+ placeholder: {}
28
+ }, {
29
+ modelValue: { required: !0 },
30
+ modelModifiers: {}
31
+ }),
32
+ emits: /* @__PURE__ */ O(["blur"], ["update:modelValue"]),
33
+ setup(e, { emit: t }) {
34
+ let n = e, r = t, i = z(e, "modelValue"), a = R();
35
+ return (e, t) => (M(), x(L(G), {
36
+ "is-touched": n.isTouched,
37
+ hint: null,
38
+ label: n.label,
39
+ "input-id": L(a),
40
+ "error-message": n.errorMessage,
41
+ "is-required": n.isRequired,
42
+ for: `tags-input-${L(a)}`,
43
+ class: "!mt-0 w-full"
44
+ }, {
45
+ label: B(() => [F(e.$slots, "label")]),
46
+ default: B(() => [E(L(ft), {
47
+ id: `tags-input-${n.placeholder}`,
48
+ modelValue: i.value,
49
+ "onUpdate:modelValue": t[1] ||= (e) => i.value = e,
50
+ "add-on-blur": !0,
51
+ "add-on-paste": !0,
52
+ delimiter: ";",
53
+ class: "gap-sm border-secondary bg-primary px-sm py-xxs flex max-h-50 min-h-10 w-full flex-wrap items-center overflow-y-auto rounded-md border"
54
+ }, {
55
+ default: B(() => [(M(!0), C(y, null, P(i.value, (e) => (M(), x(L(lt), {
56
+ key: e,
57
+ value: e,
58
+ class: "gap-xs border-primary px-xs text-secondary my-[0.18rem] flex items-center justify-center rounded-sm border text-xs aria-[current=true]:bg-brand-500"
59
+ }, {
60
+ default: B(() => [E(L(dt), { class: "pl-sm text-xs" }), E(L(ut), { class: "group p-xs rounded-full bg-transparent" }, {
61
+ default: B(() => [E(L(q), {
62
+ icon: "close",
63
+ class: "size-3 duration-200 group-hover:scale-110"
64
+ })]),
65
+ _: 1
66
+ })]),
67
+ _: 1
68
+ }, 8, ["value"]))), 128)), E(L(ct), {
69
+ placeholder: n.placeholder,
70
+ class: "px-sm h-8 flex-1 rounded-full bg-transparent text-sm placeholder:text-placeholder focus:outline-none",
71
+ onBlur: t[0] ||= (e) => r("blur")
72
+ }, null, 8, ["placeholder"])]),
73
+ _: 1
74
+ }, 8, ["id", "modelValue"])]),
75
+ _: 3
76
+ }, 8, [
77
+ "is-touched",
78
+ "label",
79
+ "input-id",
80
+ "error-message",
81
+ "is-required",
82
+ "for"
83
+ ]));
84
+ }
85
+ }), vt = {}, yt = { class: "flex size-full items-center justify-center" };
86
+ function bt(e, t) {
87
+ return M(), C("div", yt, [F(e.$slots, "default")]);
88
+ }
89
+ var xt = /* @__PURE__ */ Se(vt, [["render", bt]]), St = /* @__PURE__ */ D({
90
+ __name: "AnimateHeight",
91
+ setup(e) {
92
+ let t = N(null), { height: n } = et(t), r = N(!1);
93
+ return j(() => {
94
+ setTimeout(() => {
95
+ r.value = !0;
96
+ }, 50);
97
+ }), (e, i) => (M(), x(L(X), {
98
+ animate: { height: L(n) },
99
+ transition: {
100
+ bounce: 0,
101
+ duration: r.value ? .3 : 0,
102
+ type: "spring"
103
+ },
104
+ tabindex: "-1",
105
+ class: "relative overflow-clip"
106
+ }, {
107
+ default: B(() => [w("div", {
108
+ ref_key: "el",
109
+ ref: t
110
+ }, [F(e.$slots, "default")], 512)]),
111
+ _: 3
112
+ }, 8, ["animate", "transition"]));
113
+ }
114
+ }), Ct = class {
115
+ static fromDto(e) {
116
+ return {
117
+ uuid: e.uuid,
118
+ color: e.color,
119
+ config: {
120
+ maxDaysInColumnBeforeHighlight: e.config.maxDaysInColumnBeforeHighlight,
121
+ onlyShowLeadInColumn: e.config.onlyShowLeadInColumn
122
+ },
123
+ displayName: e.displayName,
124
+ position: e.position
125
+ };
126
+ }
127
+ }, wt = class {
128
+ static fromDto(e) {
129
+ return {
130
+ uuid: e.uuid,
131
+ toColumnUuid: e.toColumnUuid,
132
+ toColumnColor: e.toColumnColor,
133
+ toColumnDisplayName: e.toColumnDisplayName,
134
+ toColumnKey: e.toColumnKey,
135
+ triggers: e.triggers.map((e) => ({
136
+ uuid: e.uuid,
137
+ config: e.config,
138
+ triggerType: e.triggerType
139
+ }))
140
+ };
141
+ }
142
+ }, Tt = class {
143
+ static async getAllColumns() {
144
+ return (await pe()).data.items.map(Ct.fromDto);
145
+ }
146
+ static async getTransitions(e, t) {
147
+ return (await he({
148
+ query: { triggerTypes: t },
149
+ path: { boardColumnUuid: e }
150
+ })).data.items.map(wt.fromDto);
151
+ }
152
+ }, Et = class {
153
+ static fromDto(e) {
154
+ return {
155
+ uuid: e.uuid,
156
+ email: e.email,
157
+ firstName: e.firstName,
158
+ lastName: e.lastName,
159
+ roles: e.roles.map((e) => ({
160
+ uuid: e.uuid,
161
+ name: e.name
162
+ }))
163
+ };
164
+ }
165
+ }, Dt = class {
166
+ static async getAll(e) {
167
+ let t = await le({ query: e });
168
+ return {
169
+ data: t.data.items.map(Et.fromDto),
170
+ meta: t.data.meta
171
+ };
172
+ }
173
+ };
174
+ //#endregion
175
+ //#region src/api/queries/user/userIndex.query.ts
176
+ function Ot(e) {
177
+ return i({
178
+ queryFn: (t) => Dt.getAll({
179
+ pagination: t,
180
+ search: e.params.search?.value
181
+ }),
182
+ queryKey: { userIndex: { params: e.params } }
183
+ });
184
+ }
185
+ //#endregion
186
+ //#region src/components/button-tooltip/ButtonTooltip.vue?vue&type=script&setup=true&lang.ts
187
+ var kt = {
188
+ key: 0,
189
+ class: "text-secondary max-w-xs text-center text-xs"
190
+ }, Z = /* @__PURE__ */ D({
191
+ __name: "ButtonTooltip",
192
+ props: {
193
+ isDisabled: {
194
+ type: Boolean,
195
+ default: !1
196
+ },
197
+ keyboardKeys: { default: null },
198
+ label: { default: null },
199
+ side: { default: null }
200
+ },
201
+ setup(e) {
202
+ let t = e;
203
+ return (e, n) => (M(), x(L(Xe), {
204
+ "delay-duration": 400,
205
+ "is-popover-arrow-hidden": !0,
206
+ "disable-hoverable-content": !0,
207
+ "popover-side": t.side ?? void 0,
208
+ "is-disabled": t.isDisabled
209
+ }, {
210
+ default: B(() => [E(L(Ze), null, {
211
+ default: B(() => [F(e.$slots, "default")]),
212
+ _: 3
213
+ }), E(L(Ye), null, {
214
+ default: B(() => [E(L(qe), null, {
215
+ default: B(() => [E(L(X), {
216
+ initial: {
217
+ opacity: 0,
218
+ filter: "blur(2px)"
219
+ },
220
+ animate: {
221
+ opacity: 1,
222
+ filter: "blur(0)"
223
+ },
224
+ exit: {
225
+ opacity: 0,
226
+ filter: "blur(2px)"
227
+ },
228
+ transition: { duration: .2 }
229
+ }, {
230
+ default: B(() => [E(L(Je), null, {
231
+ default: B(() => [E(f, {
232
+ gap: "sm",
233
+ class: "p-xs"
234
+ }, {
235
+ default: B(() => [t.label === null ? S("", !0) : (M(), C("span", kt, I(t.label), 1)), t.keyboardKeys === null ? S("", !0) : (M(), x(L(Ue), {
236
+ key: 1,
237
+ "keyboard-keys": t.keyboardKeys
238
+ }, null, 8, ["keyboard-keys"]))]),
239
+ _: 1
240
+ })]),
241
+ _: 1
242
+ }), E(L(Ke))]),
243
+ _: 1
244
+ })]),
245
+ _: 1
246
+ })]),
247
+ _: 1
248
+ })]),
249
+ _: 3
250
+ }, 8, ["popover-side", "is-disabled"]));
251
+ }
252
+ }), At = /* @__PURE__ */ D({
253
+ inheritAttrs: !1,
254
+ __name: "TruncateText",
255
+ props: {
256
+ as: { default: "span" },
257
+ label: {}
258
+ },
259
+ setup(e) {
260
+ let t = e, n = ke(), r = Ae("primitiveRef"), i = N(!1), a = null;
261
+ function o(e) {
262
+ i.value = e.scrollWidth > e.clientWidth;
263
+ }
264
+ return j(() => {
265
+ let e = r.value?.$el ?? null;
266
+ e !== null && (o(e), a = new ResizeObserver(() => {
267
+ o(e);
268
+ }), a.observe(e));
269
+ }), Oe(() => {
270
+ a?.disconnect();
271
+ }), (e, a) => (M(), x(Z, {
272
+ "is-disabled": !i.value,
273
+ label: t.label
274
+ }, {
275
+ default: B(() => [E(L(st), k({
276
+ ref_key: "primitiveRef",
277
+ ref: r,
278
+ as: t.as,
279
+ class: "max-w-full truncate"
280
+ }, L(n)), {
281
+ default: B(() => [T(I(t.label), 1)]),
282
+ _: 1
283
+ }, 16, ["as"])]),
284
+ _: 1
285
+ }, 8, ["is-disabled", "label"]));
286
+ }
287
+ }), jt = class {
288
+ static fromDto(e) {
289
+ return {
290
+ contactPersonUuid: e.contactPersonUuid,
291
+ dealUuid: e.dealUuid,
292
+ isPrimary: e.isPrimary,
293
+ email: e.email,
294
+ firstName: e.firstName,
295
+ lastName: e.lastName,
296
+ mobilePhone: e.mobilePhone,
297
+ phone: e.phone
298
+ };
299
+ }
300
+ }, Mt = class {
301
+ static toDto(e) {
302
+ return {
303
+ email: c.trimOrNull(e.email),
304
+ firstName: e.firstName,
305
+ lastName: e.lastName,
306
+ mobilePhone: e.mobilePhone,
307
+ phone: e.phone
308
+ };
309
+ }
310
+ }, Nt = class {
311
+ static toDto(e) {
312
+ return {
313
+ clientId: {
314
+ uuid: e.clientId.uuid,
315
+ type: e.clientId.type
316
+ },
317
+ dealOwnerUuid: null,
318
+ name: e.name,
319
+ dealLanguage: e.dealLanguage,
320
+ dealSource: e.dealSource
321
+ };
322
+ }
323
+ }, Q = class {
324
+ static toFullName(e) {
325
+ return `${e.firstName} ${e.lastName}`;
326
+ }
327
+ }, Pt = class {
328
+ static fromDto(e) {
329
+ return {
330
+ uuid: e.uuid,
331
+ createdAt: m.fromDto(e.createdAt),
332
+ updatedAt: e.updatedAt,
333
+ name: e.name,
334
+ boardColumn: {
335
+ uuid: e.boardColumn.uuid,
336
+ color: e.boardColumn.color,
337
+ displayName: e.boardColumn.displayName
338
+ },
339
+ client: e.client,
340
+ contactPersons: e.contactPersons.map((e) => ({
341
+ uuid: e.uuid,
342
+ isPrimary: e.isPrimary,
343
+ email: e.email,
344
+ firstName: e.firstName,
345
+ lastName: e.lastName,
346
+ mobilePhone: e.mobilePhone,
347
+ phone: e.phone
348
+ })),
349
+ createdBy: {
350
+ uuid: e.createdBy.uuid,
351
+ name: Q.toFullName({
352
+ firstName: e.createdBy.firstName ?? "",
353
+ lastName: e.createdBy.lastName ?? ""
354
+ })
355
+ },
356
+ dealLanguage: e.dealLanguage,
357
+ dealSource: e.dealSource,
358
+ owner: e.owner ? {
359
+ uuid: e.owner.uuid,
360
+ name: Q.toFullName({
361
+ firstName: e.owner.firstName ?? "",
362
+ lastName: e.owner.lastName ?? ""
363
+ })
364
+ } : null
365
+ };
366
+ }
367
+ }, Ft = class {
368
+ static fromDto(e) {
369
+ return {
370
+ uuid: e.uuid,
371
+ createdAt: m.fromDto(e.createdAt),
372
+ name: e.name,
373
+ boardColumn: e.boardColumn,
374
+ client: e.client,
375
+ createdBy: {
376
+ uuid: e.createdBy.uuid,
377
+ name: Q.toFullName({
378
+ firstName: e.createdBy.firstName ?? "",
379
+ lastName: e.createdBy.lastName ?? ""
380
+ })
381
+ },
382
+ dealLanguage: e.dealLanguage,
383
+ dealSource: e.dealSource,
384
+ owner: e.owner ? {
385
+ uuid: e.owner.uuid,
386
+ name: Q.toFullName({
387
+ firstName: e.owner.firstName ?? "",
388
+ lastName: e.owner.lastName ?? ""
389
+ })
390
+ } : null
391
+ };
392
+ }
393
+ }, It = class {
394
+ static toDto(e) {
395
+ return {
396
+ filter: {
397
+ boardColumnUuids: e.filters.boardColumnUuid,
398
+ dealOwnerUuids: e.filters.dealOwnerUuids
399
+ },
400
+ pagination: e.pagination
401
+ };
402
+ }
403
+ }, Lt = class {
404
+ static toDto(e) {
405
+ return {
406
+ dealOwnerUuid: e.dealOwner?.uuid ?? void 0,
407
+ name: e?.name ?? void 0,
408
+ dealLanguage: e?.dealLanguage ?? void 0,
409
+ dealSource: e?.dealSource ?? void 0
410
+ };
411
+ }
412
+ }, Rt = class {
413
+ static async create(e) {
414
+ return (await _e({ body: Nt.toDto(e) })).data.uuid;
415
+ }
416
+ static async createContactPerson() {}
417
+ static async getAll(e) {
418
+ let t = await se({ query: It.toDto(e) });
419
+ return {
420
+ data: t.data.items.map(Ft.fromDto),
421
+ meta: t.data.meta
422
+ };
423
+ }
424
+ static async getBySearchTerm(e) {
425
+ let t = await se({ query: new Me().withLimit(5).withSearch(e).build() });
426
+ return {
427
+ data: t.data.items.map(Ft.fromDto),
428
+ meta: t.data.meta
429
+ };
430
+ }
431
+ static async getByUuid(e) {
432
+ let t = await oe({ path: { dealUuid: e } });
433
+ return Pt.fromDto(t.data);
434
+ }
435
+ static async getContactPerson(e, t) {
436
+ let n = await ie({ path: {
437
+ contactPersonUuid: t,
438
+ dealUuid: e
439
+ } });
440
+ return jt.fromDto(n.data);
441
+ }
442
+ static async linkContactPerson(e, t, n) {
443
+ await fe({
444
+ body: {
445
+ contactPersonUuid: t,
446
+ email: c.trimOrNull(n.email),
447
+ mobilePhone: n.mobilePhone,
448
+ phone: n.phone
449
+ },
450
+ path: { dealUuid: e }
451
+ });
452
+ }
453
+ static async setPrimaryContactPerson(e, t) {
454
+ await ce({ path: {
455
+ contactPersonUuid: t,
456
+ dealUuid: e
457
+ } });
458
+ }
459
+ static async transition(e, t) {
460
+ await ue({
461
+ body: { boardColumnUuid: t },
462
+ path: { dealUuid: e }
463
+ });
464
+ }
465
+ static async unlinkContactPerson(e, t) {
466
+ await ae({
467
+ body: { contactPersonUuid: t },
468
+ path: { dealUuid: e }
469
+ });
470
+ }
471
+ static async update(e, t) {
472
+ await ne({
473
+ body: Lt.toDto(t),
474
+ path: { dealUuid: e }
475
+ });
476
+ }
477
+ static async updateContactPerson(e, t, n) {
478
+ await re({
479
+ body: Mt.toDto(n),
480
+ path: {
481
+ contactPersonUuid: t,
482
+ dealUuid: e
483
+ }
484
+ });
485
+ }
486
+ };
487
+ v.enum(xe);
488
+ var zt = class {
489
+ static i18nKeys = s({
490
+ "de-DE": "wise_crm.language.de",
491
+ "en-US": "wise_crm.language.en",
492
+ "fr-BE": "wise_crm.language.fr",
493
+ "nl-BE": "wise_crm.language.nl"
494
+ });
495
+ static getI18nKey(e) {
496
+ return this.i18nKeys.get(e);
497
+ }
498
+ }, Bt = class {
499
+ static i18nKeys = s({
500
+ mail: "wise_crm.enum.source.mail",
501
+ phone: "wise_crm.enum.source.phone",
502
+ tender: "wise_crm.enum.source.tender",
503
+ website: "wise_crm.enum.source.website"
504
+ });
505
+ static getI18nKey(e) {
506
+ return this.i18nKeys.get(e);
507
+ }
508
+ }, Vt = class {
509
+ static fromDto(e) {
510
+ return {
511
+ uuid: e.uuid,
512
+ createdAt: m.fromDto(e.createdAt),
513
+ updatedAt: m.fromDto(e.updatedAt),
514
+ defaultBCC: e.defaultBCC,
515
+ defaultCC: e.defaultCC,
516
+ displayName: e.displayName,
517
+ key: e.key,
518
+ locales: e.locales.map((e) => ({
519
+ uuid: e.uuid,
520
+ createdAt: m.fromDto(e.createdAt),
521
+ updatedAt: m.fromDto(e.updatedAt),
522
+ attachments: e.attachments.map(Te.fromDto),
523
+ language: e.language,
524
+ message: e.message,
525
+ subject: e.subject
526
+ }))
527
+ };
528
+ }
529
+ }, Ht = class {
530
+ static fromDto(e) {
531
+ return {
532
+ uuid: e.uuid,
533
+ createdAt: m.fromDto(e.createdAt),
534
+ updatedAt: m.fromDto(e.updatedAt),
535
+ name: e.name
536
+ };
537
+ }
538
+ }, Ut = class {
539
+ static toDto(e) {
540
+ return { pagination: e.pagination };
541
+ }
542
+ }, Wt = class {
543
+ static toDto(e) {
544
+ return {
545
+ defaultBCC: e.defaultBCC,
546
+ defaultCC: e.defaultCC,
547
+ locales: e.locales.map((e) => ({
548
+ attachments: e.attachments.map((e) => e.uuid),
549
+ language: e.language,
550
+ message: e.message,
551
+ replyTo: e.replyTo,
552
+ subject: e.subject
553
+ }))
554
+ };
555
+ }
556
+ }, Gt = class {
557
+ static async getAll(e) {
558
+ let t = await ge({ query: Ut.toDto(e) });
559
+ return {
560
+ data: t.data.items.map(Ht.fromDto),
561
+ meta: t.data.meta
562
+ };
563
+ }
564
+ static async getByKey(e) {
565
+ let t = await de({ path: { mailTemplateKey: e } });
566
+ return Vt.fromDto(t.data);
567
+ }
568
+ static async getByUuid(e) {
569
+ let t = await ye({ path: { mailTemplateUuid: e } });
570
+ return Vt.fromDto(t.data);
571
+ }
572
+ static async update(e, t) {
573
+ await h({
574
+ body: Wt.toDto(t),
575
+ path: { mailTemplateUuid: e }
576
+ });
577
+ }
578
+ };
579
+ //#endregion
580
+ //#region src/api/queries/mail-template/mailTemplateDetail.query.ts
581
+ function Kt(e) {
582
+ return p({
583
+ queryFn: () => Gt.getByUuid(e.value),
584
+ queryKey: { mailTemplateDetail: { mailTemplateUuid: e } }
585
+ });
586
+ }
587
+ function qt(e) {
588
+ return p({
589
+ queryFn: () => Gt.getByKey(e.value),
590
+ queryKey: { mailTemplateDetailByKey: { mailTemplateKey: e } }
591
+ });
592
+ }
593
+ //#endregion
594
+ //#region src/components/app/rich-text-field/AppRichTextFieldLinkDialog.vue?vue&type=script&setup=true&lang.ts
595
+ var Jt = { class: "p-xl w-96 max-w-full" }, Yt = /* @__PURE__ */ D({
596
+ __name: "AppRichTextFieldLinkDialog",
597
+ emits: ["close", "confirm"],
598
+ setup(e, { emit: i }) {
599
+ let o = i, s = V(), c = tt({
600
+ schema: v.object({ url: v.string().url() }),
601
+ onSubmit: (e) => {
602
+ o("confirm", e.url);
603
+ }
604
+ }), l = c.register("url");
605
+ function f() {
606
+ o("close");
607
+ }
608
+ return (e, i) => (M(), x(L(W), { onClose: f }, {
609
+ default: B(() => [w("div", Jt, [E(d, {
610
+ title: L(s).t("rich_text.link_dialog.title"),
611
+ icon: "link"
612
+ }, {
613
+ "closse-button": B(() => [E(L(Ne))]),
614
+ _: 1
615
+ }, 8, ["title"]), E(t, { form: L(c) }, {
616
+ default: B(() => [E(L(Ge), k({ label: L(s).t("rich_text.link_dialog.url") }, L(a)(L(l))), null, 16, ["label"]), E(r, null, {
617
+ default: B(() => [E(n, { label: L(s).t("shared.cancel") }, null, 8, ["label"]), E(u, {
618
+ label: L(s).t("shared.confirm"),
619
+ onClick: i[0] ||= (e) => L(c).submit()
620
+ }, null, 8, ["label"])]),
621
+ _: 1
622
+ })]),
623
+ _: 1
624
+ }, 8, ["form"])])]),
625
+ _: 1
626
+ }));
627
+ }
628
+ }), Xt = ["id"], Zt = { class: "p-sm h-full" }, Qt = /* @__PURE__ */ D({
629
+ __name: "AppRichTextField",
630
+ props: /* @__PURE__ */ O({
631
+ isDisabled: {
632
+ type: Boolean,
633
+ default: !1
634
+ },
635
+ isRequired: {
636
+ type: Boolean,
637
+ default: !1
638
+ },
639
+ isTouched: {
640
+ type: Boolean,
641
+ default: !1
642
+ },
643
+ errorMessage: { default: null },
644
+ errors: {},
645
+ label: {}
646
+ }, {
647
+ modelValue: { required: !0 },
648
+ modelModifiers: {}
649
+ }),
650
+ emits: /* @__PURE__ */ O(["blur"], ["update:modelValue"]),
651
+ setup(e, { emit: t }) {
652
+ let n = e, r = t, i = z(e, "modelValue"), a = R(), o = gt({
653
+ content: i.value,
654
+ editorProps: { attributes: { class: "bg-primary text-primary p-2xl prose prose-sm w-full max-w-none text-secondary outline-none focus-visible:ring-2 ring-offset-1 ring-fg-brand-secondary rounded-sm min-h-[15rem] h-full" } },
655
+ extensions: [mt, pt.configure({ defaultProtocol: "https" })],
656
+ onBlur() {
657
+ r("blur");
658
+ },
659
+ onUpdate({ editor: e }) {
660
+ i.value = e.getHTML();
661
+ }
662
+ }), s = Qe(Yt), c = b(() => [
663
+ {
664
+ id: "bold",
665
+ icon: "bold",
666
+ onClick: () => void o.value?.chain().focus().toggleBold().run()
667
+ },
668
+ {
669
+ id: "italic",
670
+ icon: "italic",
671
+ onClick: () => void o.value?.chain().focus().toggleItalic().run()
672
+ },
673
+ {
674
+ id: "heading",
675
+ isActiveOptions: { level: 1 },
676
+ icon: "h1Icon",
677
+ onClick: () => void o.value?.chain().focus().toggleHeading({ level: 1 }).run()
678
+ },
679
+ {
680
+ id: "heading",
681
+ isActiveOptions: { level: 2 },
682
+ icon: "h2Icon",
683
+ onClick: () => void o.value?.chain().focus().toggleHeading({ level: 2 }).run()
684
+ },
685
+ {
686
+ id: "heading",
687
+ isActiveOptions: { level: 3 },
688
+ icon: "h3Icon",
689
+ onClick: () => void o.value?.chain().focus().toggleHeading({ level: 3 }).run()
690
+ },
691
+ {
692
+ id: "link",
693
+ icon: "link",
694
+ onClick: () => {
695
+ s.open({ onConfirm: (e) => {
696
+ o.value?.chain().focus().extendMarkRange("link").setLink({ href: e }).run(), s.close();
697
+ } });
698
+ }
699
+ },
700
+ {
701
+ id: "bulletList",
702
+ icon: "bulletList",
703
+ onClick: () => void o.value?.chain().focus().toggleBulletList().run()
704
+ },
705
+ {
706
+ id: "orderedList",
707
+ icon: "numberedList",
708
+ onClick: () => void o.value?.chain().focus().toggleOrderedList().run()
709
+ }
710
+ ]);
711
+ return je(i, (e) => {
712
+ e !== o.value?.getHTML() && ((e === null || e === "") && o.value?.commands.clearContent(), o.value?.commands.setContent(e || ""));
713
+ }), (e, t) => (M(), x(L(G), {
714
+ for: L(a),
715
+ "is-touched": n.isTouched,
716
+ "error-message": n.errorMessage,
717
+ hint: null,
718
+ label: n.label,
719
+ "is-required": n.isRequired,
720
+ class: "h-full"
721
+ }, {
722
+ label: B(() => [F(e.$slots, "label")]),
723
+ default: B(() => [w("div", {
724
+ id: L(a),
725
+ class: A([{
726
+ "border-error-subtle": n.errorMessage !== null && n.isTouched,
727
+ "border-secondary": !(n.errorMessage !== null && n.isTouched)
728
+ }, "bg-primary flex flex-col overflow-hidden rounded-lg border"])
729
+ }, [E(L(ot), { orientation: "horizontal" }, {
730
+ default: B(() => [E(L(it), { class: "gap-sm p-sm border-secondary flex border-b" }, {
731
+ default: B(() => [(M(!0), C(y, null, P(c.value, (e, t) => (M(), x(L(at), {
732
+ key: t,
733
+ value: t,
734
+ class: A([{
735
+ "bg-tertiary text-primary": L(o)?.isActive(e.id, e.isActiveOptions),
736
+ "text-quaternary": !L(o)?.isActive(e.id, e.isActiveOptions)
737
+ }, "rounded-md"]),
738
+ "as-child": !0
739
+ }, {
740
+ default: B(() => [E(l, { onClick: () => e.onClick() }, {
741
+ default: B(() => [E(L(q), {
742
+ icon: e.icon,
743
+ class: "text-primary size-8"
744
+ }, null, 8, ["icon"])]),
745
+ _: 2
746
+ }, 1032, ["onClick"])]),
747
+ _: 2
748
+ }, 1032, ["value", "class"]))), 128))]),
749
+ _: 1
750
+ })]),
751
+ _: 1
752
+ }), w("div", Zt, [E(L(ht), {
753
+ modelValue: i.value,
754
+ "onUpdate:modelValue": t[0] ||= (e) => i.value = e,
755
+ editor: L(o),
756
+ class: "h-full"
757
+ }, null, 8, ["modelValue", "editor"])])], 10, Xt)]),
758
+ _: 3
759
+ }, 8, [
760
+ "for",
761
+ "is-touched",
762
+ "error-message",
763
+ "label",
764
+ "is-required"
765
+ ]));
766
+ }
767
+ }), $t = class {
768
+ static async confirmUpload(e, t) {
769
+ await ve({
770
+ body: { blurHash: t },
771
+ path: { file: e }
772
+ });
773
+ }
774
+ static async getFileInfo(e, t) {
775
+ let n = await me({ body: {
776
+ name: e,
777
+ mimeType: t
778
+ } });
779
+ return {
780
+ uuid: n.data.uuid,
781
+ uploadUrl: n.data.uploadUrl
782
+ };
783
+ }
784
+ }, en = { class: "text-brand-secondary text-sm font-medium" }, tn = /* @__PURE__ */ D({
785
+ __name: "FormFileUploadDropzoneOverlay",
786
+ props: {
787
+ isHoveringOverDropzone: { type: Boolean },
788
+ isHoveringOverPage: { type: Boolean }
789
+ },
790
+ setup(e) {
791
+ let t = e, n = V();
792
+ return (e, r) => (M(), x(L(Y), null, {
793
+ default: B(() => [t.isHoveringOverPage ? (M(), x(L(X), {
794
+ key: 0,
795
+ class: A([{ "animate-pulse": !t.isHoveringOverDropzone }, "border-brand-500/50 pointer-events-none absolute inset-0 z-10 overflow-hidden rounded-xl border-[1.5px] border-dashed"]),
796
+ initial: { opacity: 0 },
797
+ animate: { opacity: 1 },
798
+ exit: { opacity: 0 }
799
+ }, {
800
+ default: B(() => [E(L(Y), null, {
801
+ default: B(() => [t.isHoveringOverDropzone ? (M(), x(L(X), {
802
+ key: 0,
803
+ initial: {
804
+ opacity: 0,
805
+ scale: 1.01
806
+ },
807
+ animate: {
808
+ opacity: 1,
809
+ scale: 1
810
+ },
811
+ exit: {
812
+ opacity: 0,
813
+ scale: 1.01
814
+ },
815
+ class: "bg-brand-primary/90 absolute inset-0"
816
+ }, {
817
+ default: B(() => [E(xt, null, {
818
+ default: B(() => [w("p", en, I(L(n).t("component.file_upload.dropzone.drop_files")), 1)]),
819
+ _: 1
820
+ })]),
821
+ _: 1
822
+ })) : S("", !0)]),
823
+ _: 1
824
+ })]),
825
+ _: 1
826
+ }, 8, ["class"])) : S("", !0)]),
827
+ _: 1
828
+ }));
829
+ }
830
+ }), nn = {
831
+ width: "100%",
832
+ height: "100%",
833
+ viewBox: "0 0 12 12",
834
+ fill: "none",
835
+ xmlns: "http://www.w3.org/2000/svg",
836
+ "aria-hidden": "true"
837
+ }, rn = /* @__PURE__ */ D({
838
+ __name: "FormFileUploadSuccessCheckmark",
839
+ setup(e) {
840
+ let t = {
841
+ hidden: {
842
+ opacity: 0,
843
+ pathLength: 0
844
+ },
845
+ visible: {
846
+ opacity: 1,
847
+ pathLength: 1,
848
+ transition: {
849
+ opacity: { duration: .01 },
850
+ pathLength: {
851
+ bounce: 0,
852
+ duration: .5,
853
+ type: "spring"
854
+ }
855
+ }
856
+ }
857
+ };
858
+ return (e, n) => (M(), C("svg", nn, [E(L(rt).path, {
859
+ variants: t,
860
+ tabindex: "-1",
861
+ initial: "hidden",
862
+ d: "M2 6L4.5 8.5L10 3",
863
+ stroke: "currentColor",
864
+ "stroke-width": "1.5",
865
+ "stroke-linecap": "round",
866
+ "stroke-linejoin": "round",
867
+ animate: "visible",
868
+ exit: "hidden"
869
+ })]));
870
+ }
871
+ }), an = /* @__PURE__ */ D({
872
+ __name: "FormFileUploadItemRight",
873
+ props: {
874
+ isMultiple: { type: Boolean },
875
+ item: {}
876
+ },
877
+ setup(e) {
878
+ let t = e, n = N(!1);
879
+ function r(e) {
880
+ e.url !== null && we.download(e.url, e.name);
881
+ }
882
+ return je(() => t.item.status, (e) => {
883
+ e === H.SUCCESS && (n.value = !0, setTimeout(() => {
884
+ n.value = !1;
885
+ }, 2e3));
886
+ }), (e, i) => (M(), x(L(Y), { mode: "popLayout" }, {
887
+ default: B(() => [n.value ? (M(), x(L(X), {
888
+ key: 0,
889
+ variants: {
890
+ hidden: {
891
+ opacity: 0,
892
+ scale: .95
893
+ },
894
+ visible: {
895
+ opacity: 1,
896
+ scale: 1
897
+ }
898
+ },
899
+ initial: "hidden",
900
+ animate: "visible",
901
+ exit: "hidden",
902
+ class: "flex size-8 items-center justify-center"
903
+ }, {
904
+ default: B(() => [E(rn, { class: "text-disabled size-4" })]),
905
+ _: 1
906
+ })) : t.item.status === L(H).SUCCESS ? (M(), x(L(X), {
907
+ key: 1,
908
+ initial: {
909
+ opacity: 0,
910
+ scale: .95
911
+ },
912
+ animate: {
913
+ opacity: 1,
914
+ scale: 1
915
+ }
916
+ }, {
917
+ default: B(() => [E(Ce, null, {
918
+ default: B(() => [E(f, { gap: "none" }, {
919
+ default: B(() => [
920
+ E(Z, { label: "Replace" }, {
921
+ default: B(() => [E(L(Be), null, {
922
+ default: B(() => [E(L(J), {
923
+ "class-config": { root: "hover:!bg-tertiary" },
924
+ icon: "refresh",
925
+ label: "Replace",
926
+ variant: "tertiary"
927
+ })]),
928
+ _: 1
929
+ })]),
930
+ _: 1
931
+ }),
932
+ E(Z, { label: "Download" }, {
933
+ default: B(() => [t.item.url === null ? S("", !0) : (M(), x(L(J), {
934
+ key: 0,
935
+ "class-config": { root: "hover:!bg-tertiary" },
936
+ icon: "downloadCloud",
937
+ label: "Download",
938
+ variant: "tertiary",
939
+ onClick: i[0] ||= (e) => r(t.item)
940
+ }))]),
941
+ _: 1
942
+ }),
943
+ E(Z, { label: "Remove" }, {
944
+ default: B(() => [E(L(ze), null, {
945
+ default: B(() => [E(L(J), {
946
+ icon: "trash",
947
+ label: "Remove",
948
+ variant: "destructive-tertiary"
949
+ })]),
950
+ _: 1
951
+ })]),
952
+ _: 1
953
+ })
954
+ ]),
955
+ _: 1
956
+ })]),
957
+ _: 1
958
+ })]),
959
+ _: 1
960
+ })) : t.item.status === L(H).PENDING || t.item.status === L(H).UPLOADING ? (M(), x(L(X), {
961
+ key: 2,
962
+ initial: { opacity: 0 },
963
+ animate: { opacity: 1 },
964
+ exit: {
965
+ opacity: 0,
966
+ scale: .95
967
+ },
968
+ class: "flex size-8 items-center justify-center"
969
+ }, {
970
+ default: B(() => [E(L(We), { class: "text-tertiary size-4" })]),
971
+ _: 1
972
+ })) : S("", !0)]),
973
+ _: 1
974
+ }));
975
+ }
976
+ }), on = /* @__PURE__ */ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".split(""), $ = (e) => {
977
+ let t = 0;
978
+ for (let n = 0; n < e.length; n++) {
979
+ let r = e[n], i = on.indexOf(r);
980
+ t = t * 83 + i;
981
+ }
982
+ return t;
983
+ }, sn = (e) => {
984
+ let t = e / 255;
985
+ return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
986
+ }, cn = (e) => {
987
+ let t = Math.max(0, Math.min(1, e));
988
+ return Math.trunc(t <= .0031308 ? t * 12.92 * 255 + .5 : (1.055 * t ** .4166666666666667 - .055) * 255 + .5);
989
+ }, ln = (e) => e < 0 ? -1 : 1, un = (e, t) => ln(e) * Math.abs(e) ** +t, dn = class extends Error {
990
+ constructor(e) {
991
+ super(e), this.name = "ValidationError", this.message = e;
992
+ }
993
+ }, fn = (e) => {
994
+ if (!e || e.length < 6) throw new dn("The blurhash string must be at least 6 characters");
995
+ let t = $(e[0]), n = Math.floor(t / 9) + 1, r = t % 9 + 1;
996
+ if (e.length !== 4 + 2 * r * n) throw new dn(`blurhash length mismatch: length is ${e.length} but it should be ${4 + 2 * r * n}`);
997
+ }, pn = (e) => {
998
+ let t = e >> 16, n = e >> 8 & 255, r = e & 255;
999
+ return [
1000
+ sn(t),
1001
+ sn(n),
1002
+ sn(r)
1003
+ ];
1004
+ }, mn = (e, t) => {
1005
+ let n = Math.floor(e / 361), r = Math.floor(e / 19) % 19, i = e % 19;
1006
+ return [
1007
+ un((n - 9) / 9, 2) * t,
1008
+ un((r - 9) / 9, 2) * t,
1009
+ un((i - 9) / 9, 2) * t
1010
+ ];
1011
+ }, hn = (e, t, n, r) => {
1012
+ fn(e), r |= 1;
1013
+ let i = $(e[0]), a = Math.floor(i / 9) + 1, o = i % 9 + 1, s = ($(e[1]) + 1) / 166, c = Array(o * a);
1014
+ for (let t = 0; t < c.length; t++) t === 0 ? c[t] = pn($(e.substring(2, 6))) : c[t] = mn($(e.substring(4 + t * 2, 6 + t * 2)), s * r);
1015
+ let l = t * 4, u = new Uint8ClampedArray(l * n);
1016
+ for (let e = 0; e < n; e++) for (let r = 0; r < t; r++) {
1017
+ let i = 0, s = 0, d = 0;
1018
+ for (let l = 0; l < a; l++) for (let a = 0; a < o; a++) {
1019
+ let u = Math.cos(Math.PI * r * a / t) * Math.cos(Math.PI * e * l / n), f = c[a + l * o];
1020
+ i += f[0] * u, s += f[1] * u, d += f[2] * u;
1021
+ }
1022
+ let f = cn(i), p = cn(s), m = cn(d);
1023
+ u[4 * r + 0 + e * l] = f, u[4 * r + 1 + e * l] = p, u[4 * r + 2 + e * l] = m, u[4 * r + 3 + e * l] = 255;
1024
+ }
1025
+ return u;
1026
+ }, gn = /* @__PURE__ */ D({
1027
+ __name: "ImageBlurhash",
1028
+ props: { blurhash: {} },
1029
+ setup(e) {
1030
+ let t = e, n = N(null);
1031
+ function r(e, t) {
1032
+ let { height: n, width: r } = t, i = hn(e, r, n), a = t.getContext("2d"), o = a.createImageData(r, n);
1033
+ o.data.set(i), a.putImageData(o, 0, 0);
1034
+ }
1035
+ function i() {
1036
+ n.value !== null && r(t.blurhash, n.value);
1037
+ }
1038
+ return j(() => {
1039
+ i();
1040
+ }), (e, t) => (M(), C("canvas", {
1041
+ ref_key: "canvasRef",
1042
+ ref: n,
1043
+ width: "100%",
1044
+ height: "100%"
1045
+ }, null, 512));
1046
+ }
1047
+ }), _n = { class: "sr-only" }, vn = { class: "p-lg absolute top-0 left-0 z-1 flex w-full justify-end" }, yn = ["src", "alt"], bn = /* @__PURE__ */ D({
1048
+ __name: "ImageDialog",
1049
+ props: {
1050
+ imageId: {},
1051
+ fit: {},
1052
+ imageAlt: {},
1053
+ imageUrl: {}
1054
+ },
1055
+ setup(e) {
1056
+ let t = e;
1057
+ return (e, n) => (M(), x(L(W), {
1058
+ "is-close-button-hidden": !0,
1059
+ size: "xl"
1060
+ }, {
1061
+ default: B(() => [
1062
+ E(L(Ie), null, {
1063
+ default: B(() => [...n[0] ||= [w("h1", { class: "sr-only" }, " Image ", -1)]]),
1064
+ _: 1
1065
+ }),
1066
+ E(L(Fe), null, {
1067
+ default: B(() => [w("p", _n, I(t.imageAlt), 1)]),
1068
+ _: 1
1069
+ }),
1070
+ w("div", vn, [E(L(Ne), null, {
1071
+ default: B(() => [E(L(J), {
1072
+ "class-config": { root: "bg-primary/50 backdrop-blur-md text-primary border-none shadow-none" },
1073
+ icon: "close",
1074
+ label: "close",
1075
+ variant: "primary"
1076
+ })]),
1077
+ _: 1
1078
+ })]),
1079
+ w("img", {
1080
+ src: t.imageUrl,
1081
+ alt: t.imageAlt,
1082
+ exit: { opacity: 1 },
1083
+ class: "size-full object-contain"
1084
+ }, null, 8, yn)
1085
+ ]),
1086
+ _: 1
1087
+ }));
1088
+ }
1089
+ }), xn = { class: "relative isolate overflow-hidden" }, Sn = ["disabled"], Cn = { class: "sr-only" }, wn = ["src", "alt"], Tn = /* @__PURE__ */ D({
1090
+ __name: "Image",
1091
+ props: {
1092
+ isZoomEnabled: {
1093
+ type: Boolean,
1094
+ default: !1
1095
+ },
1096
+ alt: {},
1097
+ blurhash: { default: null },
1098
+ fit: {},
1099
+ src: {}
1100
+ },
1101
+ setup(e) {
1102
+ let t = e, n = R(), r = Qe(bn), i = N(!0);
1103
+ function a() {
1104
+ i.value = !1;
1105
+ }
1106
+ function o() {
1107
+ r.open({
1108
+ imageId: n,
1109
+ fit: t.fit,
1110
+ imageAlt: t.alt,
1111
+ imageUrl: t.src
1112
+ });
1113
+ }
1114
+ return (e, n) => (M(), C("div", xn, [E(L(Y), { initial: !1 }, {
1115
+ default: B(() => [i.value ? (M(), x(L(X), {
1116
+ key: 0,
1117
+ exit: { opacity: 0 },
1118
+ transition: { duration: .2 },
1119
+ class: "absolute inset-0 z-1"
1120
+ }, {
1121
+ default: B(() => [t.blurhash === null ? S("", !0) : (M(), x(gn, {
1122
+ key: 0,
1123
+ blurhash: t.blurhash
1124
+ }, null, 8, ["blurhash"]))]),
1125
+ _: 1
1126
+ })) : S("", !0), w("button", k(L(r).triggerProps.value, {
1127
+ class: [{ "pointer-events-none": !t.isZoomEnabled }, "block size-full cursor-pointer outline-none"],
1128
+ disabled: !t.isZoomEnabled,
1129
+ variant: "unstyled",
1130
+ type: "button",
1131
+ onClick: o
1132
+ }), [w("span", Cn, " Zoom image " + I(t.alt), 1), w("img", {
1133
+ src: t.src,
1134
+ alt: t.alt,
1135
+ class: A([{
1136
+ "object-cover": t.fit === "cover",
1137
+ "object-contain": t.fit === "contain"
1138
+ }, "size-full"]),
1139
+ onLoad: a
1140
+ }, null, 42, wn)], 16, Sn)]),
1141
+ _: 1
1142
+ })]));
1143
+ }
1144
+ }), En = { class: "group bg-secondary px-lg py-md max-w-full overflow-hidden rounded-xl" }, Dn = {
1145
+ key: 1,
1146
+ "aria-hidden": !0,
1147
+ class: "flex size-8 items-center justify-center"
1148
+ }, On = { class: "relative" }, kn = { class: "text-primary-on-brand absolute bottom-0.5 left-1/2 z-89 -translate-x-1/2 text-[0.625rem] font-medium" }, An = { class: "flex items-center justify-between overflow-hidden" }, jn = { class: "flex flex-col overflow-hidden" }, Mn = { class: "text-tertiary text-xs" }, Nn = { class: "bg-quaternary h-0.75 w-28 shrink-0 rounded-full" }, Pn = /* @__PURE__ */ D({
1149
+ __name: "FormFileUploadItem",
1150
+ props: {
1151
+ isMultiple: { type: Boolean },
1152
+ item: {}
1153
+ },
1154
+ setup(e) {
1155
+ let t = e;
1156
+ return (e, n) => (M(), x(L(Re), { item: t.item }, {
1157
+ default: B(() => [w("li", En, [E(f, { justify: "between" }, {
1158
+ default: B(() => [E(f, {
1159
+ gap: "lg",
1160
+ class: "overflow-hidden"
1161
+ }, {
1162
+ default: B(() => [t.item.url !== null && t.item.mimeType.startsWith("image/") ? (M(), x(Tn, {
1163
+ key: 0,
1164
+ "is-zoom-enabled": !0,
1165
+ alt: t.item.name,
1166
+ src: t.item.url,
1167
+ blurhash: t.item.status === L(H).SUCCESS ? t.item.blurHash : null,
1168
+ class: "size-8 shrink-0 rounded-md",
1169
+ fit: "cover"
1170
+ }, null, 8, [
1171
+ "alt",
1172
+ "src",
1173
+ "blurhash"
1174
+ ])) : (M(), C("div", Dn, [w("div", On, [E(L(q), {
1175
+ icon: "file",
1176
+ class: "text-brand-500 size-8"
1177
+ }), w("div", kn, I(L(we).mimeTypeToExtension(t.item.mimeType)), 1)])])), w("div", An, [w("div", jn, [E(At, {
1178
+ label: t.item.name,
1179
+ class: "text-primary truncate text-sm"
1180
+ }, null, 8, ["label"]), E(f, null, {
1181
+ default: B(() => [w("span", Mn, I(t.item.mimeType), 1), E(L(Y), { initial: !1 }, {
1182
+ default: B(() => [t.item.status === L(H).UPLOADING || t.item.status === L(H).PENDING ? (M(), x(L(X), {
1183
+ key: 0,
1184
+ exit: { opacity: 0 },
1185
+ "as-child": !0
1186
+ }, {
1187
+ default: B(() => [w("div", Nn, [E(L(X), {
1188
+ animate: { width: t.item.status === L(H).UPLOADING ? `${t.item.progress}%` : "0%" },
1189
+ initial: { width: "0%" },
1190
+ class: "bg-brand-solid h-full rounded-full"
1191
+ }, null, 8, ["animate"])])]),
1192
+ _: 1
1193
+ })) : S("", !0)]),
1194
+ _: 1
1195
+ })]),
1196
+ _: 1
1197
+ })])])]),
1198
+ _: 1
1199
+ }), E(an, {
1200
+ "is-multiple": t.isMultiple,
1201
+ item: t.item
1202
+ }, null, 8, ["is-multiple", "item"])]),
1203
+ _: 1
1204
+ })])]),
1205
+ _: 1
1206
+ }, 8, ["item"]));
1207
+ }
1208
+ }), Fn = v.object({
1209
+ uuid: v.string(),
1210
+ name: v.string(),
1211
+ blurHash: v.string().nullable(),
1212
+ mimeType: v.string(),
1213
+ order: v.number(),
1214
+ url: v.string().nullable()
1215
+ });
1216
+ //#endregion
1217
+ //#region src/api/queries/deal/dealDetail.query.ts
1218
+ function In(e) {
1219
+ return p({
1220
+ queryFn: () => Rt.getByUuid(e.value),
1221
+ queryKey: { dealDetail: { dealUuid: e } }
1222
+ });
1223
+ }
1224
+ //#endregion
1225
+ //#region src/api/mutations/mail/mailCreate.mutation.ts
1226
+ function Ln() {
1227
+ return te({
1228
+ queryFn: async ({ body: e, params: t }) => {
1229
+ await Ee.create(e, t.externalAttachments);
1230
+ },
1231
+ queryKeysToInvalidate: {
1232
+ dealDetail: { dealUuid: (e) => e.dealUuid },
1233
+ mailIndex: {}
1234
+ }
1235
+ });
1236
+ }
1237
+ //#endregion
1238
+ //#region src/deal/components/DealSendMailFormAttachmentField.vue?vue&type=script&setup=true&lang.ts
1239
+ var Rn = { class: "w-full overflow-hidden" }, zn = { class: "gap-md flex flex-col justify-start" }, Bn = { class: "relative" }, Vn = { class: "overflow-hidden" }, Hn = { class: "gap-sm py-md flex overflow-x-auto" }, Un = /* @__PURE__ */ D({
1240
+ __name: "DealSendMailFormAttachmentField",
1241
+ props: /* @__PURE__ */ O({
1242
+ id: { default: null },
1243
+ isRequired: {
1244
+ type: Boolean,
1245
+ default: !1
1246
+ },
1247
+ isTouched: {
1248
+ type: Boolean,
1249
+ default: !1
1250
+ },
1251
+ accept: {},
1252
+ errorMessage: { default: null },
1253
+ externalAttachments: { default: () => [] },
1254
+ hint: { default: null },
1255
+ label: { default: null }
1256
+ }, {
1257
+ modelValue: { required: !0 },
1258
+ modelModifiers: {}
1259
+ }),
1260
+ emits: ["update:modelValue"],
1261
+ setup(e) {
1262
+ let t = e, n = z(e, "modelValue"), r = $e(), i = V(), a = R(), o = b(() => Array.isArray(n.value));
1263
+ function s(e) {
1264
+ r.error({
1265
+ title: o.value ? i.t("component.file_upload.error.multiple_files_rejected") : i.t("component.file_upload.error.single_file_rejected"),
1266
+ description: e.map((e) => e.name).join(", ")
1267
+ });
1268
+ }
1269
+ return (e, r) => (M(), C("div", Rn, [E(L(Ve), {
1270
+ modelValue: n.value,
1271
+ "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
1272
+ accept: t.accept,
1273
+ "get-file-info": L($t).getFileInfo,
1274
+ "confirm-upload": L($t).confirmUpload,
1275
+ onFilesRejected: s
1276
+ }, {
1277
+ default: B(({ items: e }) => [E(L(nt), { transition: {
1278
+ duration: .3,
1279
+ type: "spring",
1280
+ bounce: 0
1281
+ } }, {
1282
+ default: B(() => [w("div", zn, [E(L(He), null, {
1283
+ default: B(() => [E(L(U), {
1284
+ class: "w-fit",
1285
+ "icon-left": "attachment",
1286
+ variant: "secondary"
1287
+ }, {
1288
+ default: B(() => [T(I(L(i).t("wise_crm.deal.send_mail.attachment_field.add_attachment")), 1)]),
1289
+ _: 1
1290
+ })]),
1291
+ _: 1
1292
+ }), e.length > 0 || t.externalAttachments.length > 0 ? (M(), x(L(Le), { key: 0 }, {
1293
+ default: B(({ isHoveringOverPage: n, isHoveringOverDropzone: r }) => [E(L(G), {
1294
+ for: L(a),
1295
+ hint: t.hint,
1296
+ "error-message": t.errorMessage,
1297
+ "is-required": t.isRequired,
1298
+ "is-touched": t.isTouched,
1299
+ label: L(i).t("wise_crm.deal.send_mail.attachment_field.mail_attachments_label")
1300
+ }, {
1301
+ label: B(() => [E(L(K), { class: "sr-only" })]),
1302
+ default: B(() => [w("div", Bn, [E(tn, {
1303
+ "is-hovering-over-page": n,
1304
+ "is-hovering-over-dropzone": r
1305
+ }, null, 8, ["is-hovering-over-page", "is-hovering-over-dropzone"]), E(St, null, {
1306
+ default: B(() => [E(L(Y), {
1307
+ initial: !1,
1308
+ mode: "popLayout"
1309
+ }, {
1310
+ default: B(() => [w("div", Vn, [w("ul", Hn, [(M(!0), C(y, null, P(t.externalAttachments, (e) => (M(), x(De, {
1311
+ key: e.uuid,
1312
+ attachment: e
1313
+ }, null, 8, ["attachment"]))), 128)), (M(!0), C(y, null, P(e, (e) => (M(), C("div", {
1314
+ key: e.key,
1315
+ class: "w-90"
1316
+ }, [E(Pn, {
1317
+ item: e,
1318
+ "is-multiple": o.value
1319
+ }, null, 8, ["item", "is-multiple"])]))), 128))])])]),
1320
+ _: 2
1321
+ }, 1024)]),
1322
+ _: 2
1323
+ }, 1024)])]),
1324
+ _: 2
1325
+ }, 1032, [
1326
+ "for",
1327
+ "hint",
1328
+ "error-message",
1329
+ "is-required",
1330
+ "is-touched",
1331
+ "label"
1332
+ ])]),
1333
+ _: 2
1334
+ }, 1024)) : S("", !0)])]),
1335
+ _: 2
1336
+ }, 1024)]),
1337
+ _: 1
1338
+ }, 8, [
1339
+ "modelValue",
1340
+ "accept",
1341
+ "get-file-info",
1342
+ "confirm-upload"
1343
+ ])]));
1344
+ }
1345
+ }), Wn = { class: "gap-md text-tertiary flex items-center" }, Gn = {
1346
+ key: 0,
1347
+ class: "gap-xs flex items-center"
1348
+ }, Kn = { class: "text-xs" }, qn = /* @__PURE__ */ D({
1349
+ __name: "DealSendMailFormFooter",
1350
+ props: {
1351
+ isGeneratingPdf: {
1352
+ type: Boolean,
1353
+ default: !1
1354
+ },
1355
+ isSubmitting: {
1356
+ type: Boolean,
1357
+ default: !1
1358
+ }
1359
+ },
1360
+ emits: ["cancel"],
1361
+ setup(t, { emit: n }) {
1362
+ let r = t, i = n, a = V();
1363
+ function o() {
1364
+ i("cancel");
1365
+ }
1366
+ return (n, i) => (M(), x(e, { class: "pt-lg gap-md border-secondary flex justify-between border-t" }, {
1367
+ default: B(() => [E(L(U), {
1368
+ variant: "secondary",
1369
+ size: "lg",
1370
+ onClick: o
1371
+ }, {
1372
+ default: B(() => [T(I(L(a).t("wise_crm.form.cancel")), 1)]),
1373
+ _: 1
1374
+ }), w("div", Wn, [t.isGeneratingPdf ? (M(), C("div", Gn, [E(L(We), { class: "size-3" }), w("span", Kn, I(L(a).t("wise_crm.deal.send_mail.pdf_generating")), 1)])) : S("", !0), E(L(U), {
1375
+ "is-loading": r.isSubmitting,
1376
+ "is-disabled": t.isGeneratingPdf,
1377
+ size: "lg",
1378
+ type: "submit"
1379
+ }, {
1380
+ default: B(() => [T(I(L(a).t("wise_crm.form.send")), 1)]),
1381
+ _: 1
1382
+ }, 8, ["is-loading", "is-disabled"])])]),
1383
+ _: 1
1384
+ }));
1385
+ }
1386
+ }), Jn = _.uuid().brand("MailTemplateUuid"), Yn = _.object({
1387
+ clientId: _.object({
1388
+ uuid: _.uuid(),
1389
+ type: _.enum(be)
1390
+ }),
1391
+ dealUuid: _.uuid(),
1392
+ mailTemplateUuid: Jn,
1393
+ attachments: Fn.array(),
1394
+ bcc: _.array(_.email()).nullable(),
1395
+ cc: _.array(_.email()).nullable(),
1396
+ from: _.email().nullable(),
1397
+ replyTo: _.email().nullable(),
1398
+ subject: _.string().min(1),
1399
+ text: _.string().min(1),
1400
+ to: _.array(_.email()).min(1)
1401
+ }), Xn = { class: "flex-1 overflow-y-auto" }, Zn = /* @__PURE__ */ D({
1402
+ __name: "DealSendMailForm",
1403
+ props: {
1404
+ dealUuid: {},
1405
+ isGeneratingPdf: { type: Boolean },
1406
+ client: {},
1407
+ dealLanguage: {},
1408
+ defaultSenderEmails: {},
1409
+ externalAttachments: { default: () => [] },
1410
+ template: {}
1411
+ },
1412
+ emits: ["close"],
1413
+ setup(e, { emit: n }) {
1414
+ let r = e, i = n, s = V(), c = o(), l = Ln(), u = b(() => r.template.locales.findIndex((e) => e.language === r.dealLanguage)), d = tt({
1415
+ initialState: {
1416
+ clientId: {
1417
+ uuid: r.client.uuid,
1418
+ type: r.client.type
1419
+ },
1420
+ dealUuid: r.dealUuid,
1421
+ mailTemplateUuid: r.template.uuid,
1422
+ attachments: [...r.template.locales[u.value]?.attachments.map(Te.toForm) ?? []],
1423
+ bcc: r.template.defaultBCC,
1424
+ cc: r.template.defaultCC,
1425
+ from: null,
1426
+ replyTo: null,
1427
+ subject: r.template.locales[u.value]?.subject ?? null,
1428
+ text: r.template.locales[u.value]?.message ?? null,
1429
+ to: r.defaultSenderEmails ?? []
1430
+ },
1431
+ schema: Yn,
1432
+ onSubmit: async (e) => {
1433
+ try {
1434
+ await l.execute({
1435
+ body: e,
1436
+ params: {
1437
+ dealUuid: r.dealUuid,
1438
+ externalAttachments: r.externalAttachments
1439
+ }
1440
+ }), h();
1441
+ } catch (e) {
1442
+ c.show(e);
1443
+ }
1444
+ }
1445
+ });
1446
+ d.register("bcc"), d.register("cc"), d.register("replyTo"), d.register("from"), d.register("dealUuid", r.dealUuid), d.register("clientId", r.client);
1447
+ let p = d.register("subject"), m = d.register("to"), ee = d.register("attachments", []), te = d.register("text");
1448
+ function h() {
1449
+ i("close");
1450
+ }
1451
+ return (e, n) => (M(), x(t, {
1452
+ form: L(d),
1453
+ class: "flex h-full flex-col"
1454
+ }, {
1455
+ default: B(() => [w("div", Xn, [
1456
+ E(g, { class: "pr-6xl" }, {
1457
+ default: B(() => [E(L(Ge), k(L(a)(L(p)), {
1458
+ "class-config": {
1459
+ input: "text-xl",
1460
+ root: "border-none shadow-none text-md"
1461
+ },
1462
+ placeholder: L(s).t("wise_crm.deal.send_mail_form.subject_placeholder")
1463
+ }), null, 16, ["placeholder"])]),
1464
+ _: 1
1465
+ }),
1466
+ E(g, null, {
1467
+ default: B(() => [E(f, null, {
1468
+ default: B(() => [E(_t, k(L(a)(L(m)), {
1469
+ label: L(s).t("wise_crm.deal.send_mail_form.to_label"),
1470
+ placeholder: L(s).t("wise_crm.deal.send_mail_form.email_placeholder")
1471
+ }), {
1472
+ label: B(() => [E(L(K), { class: "sr-only" })]),
1473
+ _: 1
1474
+ }, 16, ["label", "placeholder"])]),
1475
+ _: 1
1476
+ })]),
1477
+ _: 1
1478
+ }),
1479
+ E(g, null, {
1480
+ default: B(() => [E(Un, k({ "external-attachments": r.externalAttachments }, L(a)(L(ee)), { accept: ["application/pdf", "image/*"] }), null, 16, ["external-attachments"])]),
1481
+ _: 1
1482
+ }),
1483
+ E(g, { class: "flex-1 border-b-0" }, {
1484
+ default: B(() => [E(Qt, k(L(a)(L(te)), { label: L(s).t("wise_crm.deal.send_mail_form.message_label") }), {
1485
+ label: B(() => [E(L(K), { class: "sr-only" })]),
1486
+ _: 1
1487
+ }, 16, ["label"])]),
1488
+ _: 1
1489
+ })
1490
+ ]), E(qn, {
1491
+ "is-generating-pdf": r.isGeneratingPdf,
1492
+ "is-submitting": L(d).isSubmitting.value,
1493
+ onCancel: h
1494
+ }, null, 8, ["is-generating-pdf", "is-submitting"])]),
1495
+ _: 1
1496
+ }, 8, ["form"]));
1497
+ }
1498
+ }), Qn = {
1499
+ key: 0,
1500
+ class: "p-xl"
1501
+ }, $n = /* @__PURE__ */ D({
1502
+ __name: "DealSendMailDialog",
1503
+ props: {
1504
+ dealUuid: {},
1505
+ client: {},
1506
+ defaultSenderEmails: {},
1507
+ externalAttachments: { default: () => [] },
1508
+ generatePdfFile: {},
1509
+ templateKey: {}
1510
+ },
1511
+ emits: ["close"],
1512
+ setup(e, { emit: t }) {
1513
+ let n = e, r = t, i = o(), a = N(n.generatePdfFile !== void 0), s = N(null), c = b(() => s.value === null ? n.externalAttachments : [...n.externalAttachments, s.value]), l = In(b(() => n.dealUuid)), u = b(() => l.data.value?.dealLanguage ?? xe.NL_BE), d = qt(b(() => n.templateKey));
1514
+ function p() {
1515
+ r("close");
1516
+ }
1517
+ async function m() {
1518
+ if (n.generatePdfFile !== void 0) try {
1519
+ s.value = await n.generatePdfFile;
1520
+ } catch (e) {
1521
+ i.show(e);
1522
+ } finally {
1523
+ a.value = !1;
1524
+ }
1525
+ }
1526
+ return j(async () => {
1527
+ await m();
1528
+ }), (e, t) => (M(), x(L(W), {
1529
+ "class-config": { closeButton: { root: "bg-primary" } },
1530
+ class: "h-200 max-h-[90vh] w-280 max-w-[90vw]",
1531
+ onClose: p
1532
+ }, {
1533
+ default: B(() => [E(L(Pe), { class: "h-full w-full border" }, {
1534
+ default: B(() => [L(d).isLoading.value ? (M(), C("div", Qn, [E(f, {
1535
+ direction: "col",
1536
+ class: "h-full"
1537
+ }, {
1538
+ default: B(() => [E(ee, { class: "h-40 w-full" }), E(ee, { class: "mt-xl w-full flex-1" })]),
1539
+ _: 1
1540
+ })])) : L(d).data.value !== null && L(l).data.value !== null ? (M(), x(Zn, {
1541
+ key: 1,
1542
+ "default-sender-emails": L(l).data.value.contactPersons.map((e) => e.email).filter((e) => e !== null),
1543
+ "deal-language": u.value,
1544
+ template: L(d).data.value,
1545
+ client: n.client,
1546
+ "deal-uuid": n.dealUuid,
1547
+ "external-attachments": c.value,
1548
+ "is-generating-pdf": a.value,
1549
+ onClose: p
1550
+ }, null, 8, [
1551
+ "default-sender-emails",
1552
+ "deal-language",
1553
+ "template",
1554
+ "client",
1555
+ "deal-uuid",
1556
+ "external-attachments",
1557
+ "is-generating-pdf"
1558
+ ])) : S("", !0)]),
1559
+ _: 1
1560
+ })]),
1561
+ _: 1
1562
+ }));
1563
+ }
1564
+ });
1565
+ //#endregion
1566
+ export { St as _, tn as a, Kt as c, zt as d, Rt as f, Tt as g, Ot as h, Pn as i, Gt as l, Z as m, In as n, $t as o, At as p, Fn as r, Qt as s, $n as t, Bt as u, xt as v, _t as y };