@amsom-habitat/cresol 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cresol.js CHANGED
@@ -1,46 +1,65 @@
1
1
  import { AmsomModal as e, AmsomOverlay as t } from "@amsom-habitat/ui";
2
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, guardReactiveProps as d, inject as f, mergeProps as p, normalizeClass as m, normalizeProps as h, openBlock as g, provide as _, reactive as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toHandlers as ee, toRef as w, unref as T, vShow as te, withCtx as E, withDirectives as D } from "vue";
3
- import { AmsomNavTabsHorizontal as ne } from "@amsom-habitat/nav-tabs";
4
- import re from "@amsom-habitat/horizontal-stepper";
5
- import { AmsomAutocomplete as O } from "@amsom-habitat/amsom-autocomplete";
6
- import ie from "@amsom-habitat/axios-overlay";
7
- import k from "@amsom-habitat/user-manager";
8
- import { library as ae } from "@fortawesome/fontawesome-svg-core";
9
- import { AmsomTextarea as oe } from "@amsom-habitat/amsom-textarea";
10
- import { AmsomUploadFile as se } from "@amsom-habitat/file-manager";
2
+ import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, guardReactiveProps as d, inject as f, mergeProps as p, normalizeClass as m, normalizeProps as h, openBlock as g, provide as _, reactive as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toHandlers as ee, toRef as w, unref as T, vShow as te, withCtx as E, withDirectives as ne } from "vue";
3
+ import { AmsomNavTabsHorizontal as re } from "@amsom-habitat/nav-tabs";
4
+ import ie from "@amsom-habitat/horizontal-stepper";
5
+ import { AmsomAutocomplete as D } from "@amsom-habitat/amsom-autocomplete";
6
+ import ae from "@amsom-habitat/axios-overlay";
7
+ import O from "@amsom-habitat/user-manager";
8
+ import { library as oe } from "@fortawesome/fontawesome-svg-core";
9
+ import { AmsomTextarea as se } from "@amsom-habitat/amsom-textarea";
10
+ import { AmsomUploadFile as ce } from "@amsom-habitat/file-manager";
11
11
  //#region src/utils/provenanceContact.js
12
- var ce = [
13
- {
14
- id: "T",
15
- libelle: "Téléphone",
16
- icon: "phone"
17
- },
18
- {
19
- id: "M",
20
- libelle: "Email",
21
- icon: "envelope"
22
- },
23
- {
24
- id: "G",
25
- libelle: "Gardien",
26
- icon: "user-shield"
12
+ var k = {
13
+ T: "phone",
14
+ M: "envelope",
15
+ G: "user-shield",
16
+ V: "building",
17
+ IP: "exclamation-triangle",
18
+ C: "envelope-open"
19
+ }, le = "comment-dots", ue = (e) => k[e] ?? "comment-dots", de = Object.keys(k), fe = "T", A = {
20
+ locataire: {
21
+ libelle: "Locataire",
22
+ icon: "house-user",
23
+ couleur: "primary"
27
24
  },
28
- {
29
- id: "V",
30
- libelle: "Visite au siège",
31
- icon: "building"
25
+ demandeur: {
26
+ libelle: "Demandeur",
27
+ icon: "hourglass-half",
28
+ couleur: "info"
32
29
  },
33
- {
34
- id: "IP",
35
- libelle: "Incident de permanence",
36
- icon: "exclamation-triangle"
30
+ tiers: {
31
+ libelle: "Tiers",
32
+ icon: "user-tie",
33
+ couleur: "warning"
37
34
  },
38
- {
39
- id: "C",
40
- libelle: "Courrier",
41
- icon: "envelope-open"
35
+ autre: {
36
+ libelle: "Autre",
37
+ icon: "user",
38
+ couleur: "secondary"
39
+ },
40
+ fournisseur: {
41
+ libelle: "Fournisseur",
42
+ icon: "truck",
43
+ couleur: "success"
44
+ },
45
+ personnel: {
46
+ libelle: "Personnel",
47
+ icon: "id-badge",
48
+ couleur: "dark"
49
+ },
50
+ inconnu: {
51
+ libelle: "Inconnu",
52
+ icon: "circle-question",
53
+ couleur: "danger"
42
54
  }
43
- ], le = "T", ue = Symbol("cresol:draft"), A = () => ({
55
+ }, pe = ["L", "P"], j = {
56
+ ...Object.fromEntries(pe.map((e) => [e, "locataire"])),
57
+ D: "demandeur",
58
+ T: "tiers",
59
+ U: "autre",
60
+ F: "fournisseur",
61
+ E: "personnel"
62
+ }, M = Object.keys(j), me = (e) => [...new Set(e.map((e) => j[e]))], N = (e) => e ? A[e.categorie] ? e.categorie : j[e.type] ?? "inconnu" : null, he = (e) => A[N(e)] ?? null, ge = Symbol("cresol:draft"), P = () => ({
44
63
  idCommune: null,
45
64
  commune: null,
46
65
  idEntree: null,
@@ -55,7 +74,7 @@ var ce = [
55
74
  typeContratActuel: null,
56
75
  idContratActuel: null,
57
76
  occupantActuel: null
58
- }), j = () => ({
77
+ }), F = () => ({
59
78
  idMotif: null,
60
79
  idCategorie: null,
61
80
  idType: null,
@@ -73,7 +92,7 @@ var ce = [
73
92
  dateFaits: null,
74
93
  dateFaitsOverride: !1,
75
94
  fichier: null
76
- }), M = [
95
+ }), I = [
77
96
  "reclamant",
78
97
  "provenance",
79
98
  "motif",
@@ -82,23 +101,19 @@ var ce = [
82
101
  "dateFaits",
83
102
  "responsable",
84
103
  "fichier"
85
- ], de = [
86
- "D",
87
- "U",
88
- "T"
89
- ], N = (e = "T") => ({
104
+ ], L = (e = "T") => ({
90
105
  reclamant: {
91
106
  type: null,
92
107
  id: null
93
108
  },
94
109
  provenance: e,
95
110
  lignes: [{
96
- ...j(),
111
+ ...F(),
97
112
  cibleMode: "contrat",
98
- patrimoine: A(),
113
+ patrimoine: P(),
99
114
  description: ""
100
115
  }]
101
- }), fe = (e) => e?.id ?? e ?? null, pe = (e) => {
116
+ }), _e = (e) => e?.id ?? e ?? null, ve = (e) => {
102
117
  if (!e) return "Cible non définie";
103
118
  let t = [
104
119
  e.commune,
@@ -106,17 +121,17 @@ var ce = [
106
121
  e.libelleModule
107
122
  ].filter(Boolean);
108
123
  return e.etage != null && !e.libelleModule && t.push(`Étage ${e.etage}`), t.length ? t.join(" — ") : "Cible non définie";
109
- }, me = (e) => !!e && (e.idModule != null || e.idEntree != null), he = (e, t) => e.cibleMode === "demande" || !e.cibleOverride && e.patrimoine == null ? !0 : e.cibleMode === "contrat" ? !!(e.contratReclamant && t || e.contratCible) && e.patrimoine?.idModule != null : e.modulePrecis ? e.patrimoine?.idModule != null : me(e.patrimoine), ge = (e, t) => e.description == null ? !t : e.description.trim().length > 0, _e = (e = {}) => {
124
+ }, ye = (e) => !!e && (e.idModule != null || e.idEntree != null), be = (e, t) => e.cibleMode === "demande" || !e.cibleOverride && e.patrimoine == null ? !0 : e.cibleMode === "contrat" ? !!(e.contratReclamant && t || e.contratCible) && e.patrimoine?.idModule != null : e.modulePrecis ? e.patrimoine?.idModule != null : ye(e.patrimoine), xe = (e, t) => e.description == null ? !t : e.description.trim().length > 0, Se = (e = {}) => {
110
125
  let t = {
111
- ...j(),
126
+ ...F(),
112
127
  ...e
113
128
  };
114
129
  return e.patrimoine && (t.patrimoine = {
115
- ...A(),
130
+ ...P(),
116
131
  ...e.patrimoine
117
132
  }), t;
118
- }, ve = (e) => {
119
- let t = N();
133
+ }, Ce = (e) => {
134
+ let t = L();
120
135
  if (!e) return t;
121
136
  let n = Array.isArray(e.lignes) && e.lignes.length ? e.lignes : null;
122
137
  return {
@@ -129,21 +144,21 @@ var ce = [
129
144
  provenance: e.provenance ?? t.provenance,
130
145
  lignes: n ? n.map((e, n) => n === 0 ? {
131
146
  ...t.lignes[0],
132
- ..._e(e)
133
- } : _e(e)) : t.lignes
147
+ ...Se(e)
148
+ } : Se(e)) : t.lignes
134
149
  };
135
150
  };
136
- function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly: i = y(!1) } = {}) {
137
- let a = v(N()), o = r(() => {
151
+ function we({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly: i = y(!1) } = {}) {
152
+ let a = v(L()), o = r(() => {
138
153
  let e = T(i);
139
- return e === !0 ? M : Array.isArray(e) ? e : [];
154
+ return e === !0 ? I : Array.isArray(e) ? e : [];
140
155
  }), s = (e) => o.value.includes(e), c = r(() => a.lignes[0]), l = r(() => a.lignes.slice(1)), u = r(() => T(e) ?? []), d = y(null), f = (e, t) => e.type === t.type && String(e.id) === String(t.id), p = r(() => {
141
156
  let e = d.value;
142
157
  return !e || u.value.some((t) => f(t, e)) ? u.value : [...u.value, e];
143
158
  }), m = r(() => p.value.find((e) => f(e, a.reclamant)) ?? p.value[0] ?? null), h = r(() => {
144
159
  let e = T(t) ?? [], r = T(n);
145
160
  return (r == null ? null : e.find((e) => String(e.idModule) === String(r))) ?? e.find((e) => e.estModulePrincipal) ?? e[0] ?? null;
146
- }), g = r(() => !!m.value && !de.includes(m.value.type)), _ = {
161
+ }), g = r(() => !!m.value && pe.includes(m.value.type)), _ = {
147
162
  draft: a,
148
163
  lignePrincipale: c,
149
164
  lignesAssociees: l,
@@ -152,11 +167,11 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
152
167
  reclamantSelectionne: m,
153
168
  moduleReclamantPrincipal: h,
154
169
  reclamantEstContrat: g,
155
- ciblesValid: r(() => a.lignes.every((e) => he(e, g.value))),
156
- detailsValid: r(() => a.lignes.every((e, t) => ge(e, t === 0))),
170
+ ciblesValid: r(() => a.lignes.every((e) => be(e, g.value))),
171
+ detailsValid: r(() => a.lignes.every((e, t) => xe(e, t === 0))),
157
172
  isReadonly: s,
158
173
  reset(e = null) {
159
- let t = ve(e);
174
+ let t = Ce(e);
160
175
  Object.assign(a, t), a.lignes = t.lignes;
161
176
  },
162
177
  setProvenance(e) {
@@ -178,7 +193,7 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
178
193
  id: t ?? null
179
194
  }, s("cible")) return;
180
195
  let n = a.lignes[0];
181
- e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = g.value ? "contrat" : "patrimoine", n.contratReclamant = g.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine = A(), _.prefillCiblePrincipale());
196
+ e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = g.value ? "contrat" : "patrimoine", n.contratReclamant = g.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine = P(), _.prefillCiblePrincipale());
182
197
  },
183
198
  prefillCiblePrincipale() {
184
199
  if (s("cible")) return;
@@ -210,7 +225,7 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
210
225
  toggleLigneAssociee(e, t = {}) {
211
226
  let n = a.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
212
227
  n === -1 ? a.lignes.push({
213
- ...j(),
228
+ ...F(),
214
229
  idMotif: e,
215
230
  ...t
216
231
  }) : a.lignes.splice(n, 1);
@@ -220,7 +235,7 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
220
235
  },
221
236
  setCibleMode(e, t) {
222
237
  let n = a.lignes[e];
223
- n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && g.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??= A());
238
+ n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && g.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??= P());
224
239
  },
225
240
  setModulePrecis(e, t) {
226
241
  let n = a.lignes[e];
@@ -309,7 +324,7 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
309
324
  motif: e.idMotif,
310
325
  description: i,
311
326
  dateFaits: o,
312
- responsable: fe(e.responsable)
327
+ responsable: _e(e.responsable)
313
328
  };
314
329
  if (r.cibleMode === "demande") return {
315
330
  ...c,
@@ -342,7 +357,7 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
342
357
  cibleResume(e) {
343
358
  let t = a.lignes[0], n = e !== t && !e.cibleOverride ? t : e;
344
359
  if (n.cibleMode === "demande") return "La demande";
345
- let r = pe(n.patrimoine);
360
+ let r = ve(n.patrimoine);
346
361
  if (n.cibleMode === "patrimoine" && !n.modulePrecis) return `Parties communes — ${r}`;
347
362
  if (n.cibleMode !== "contrat") return r;
348
363
  let i = "Contrat non défini";
@@ -368,29 +383,29 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
368
383
  };
369
384
  return v(_);
370
385
  }
371
- function be(e) {
372
- return _(ue, e), e;
386
+ function Te(e) {
387
+ return _(ge, e), e;
373
388
  }
374
- function P() {
375
- let e = f(ue, null);
389
+ function R() {
390
+ let e = f(ge, null);
376
391
  if (!e) throw Error("useSollicitationDraft() hors de <creer-sollicitation-form>");
377
392
  return e;
378
393
  }
379
394
  //#endregion
380
395
  //#region \0plugin-vue:export-helper
381
- var F = (e, t) => {
396
+ var z = (e, t) => {
382
397
  let n = e.__vccOpts || e;
383
398
  for (let [e, r] of t) n[e] = r;
384
399
  return n;
385
- }, xe = {
400
+ }, Ee = {
386
401
  name: "AsideBlock",
387
- components: { AmsomNavTabsHorizontal: ne },
402
+ components: { AmsomNavTabsHorizontal: re },
388
403
  props: { nbSimilaires: {
389
404
  type: Number,
390
405
  default: 0
391
406
  } },
392
407
  setup() {
393
- return { draft: P() };
408
+ return { draft: R() };
394
409
  },
395
410
  data() {
396
411
  return { activeTab: null };
@@ -426,11 +441,11 @@ var F = (e, t) => {
426
441
  e.some((e) => e.id === this.activeTab) || (this.activeTab = e[0]?.id ?? null);
427
442
  }
428
443
  } }
429
- }, Se = {
444
+ }, De = {
430
445
  key: 0,
431
446
  class: "badge bg-danger ms-1"
432
- }, Ce = { style: { "min-height": "320px" } }, we = { key: 0 }, Te = { key: 1 };
433
- function Ee(e, t, n, r, c, l) {
447
+ }, Oe = { style: { "min-height": "320px" } }, ke = { key: 0 }, Ae = { key: 1 };
448
+ function je(e, t, n, r, c, l) {
434
449
  let f = S("font-awesome-icon"), p = S("amsom-nav-tabs-horizontal");
435
450
  return l.tabs.length ? (g(), i(p, {
436
451
  key: 0,
@@ -443,27 +458,27 @@ function Ee(e, t, n, r, c, l) {
443
458
  libelle: E(({ item: e }) => [
444
459
  u(f, { icon: e.icon }, null, 8, ["icon"]),
445
460
  s("span", null, C(e.label), 1),
446
- e.id === "similarite" && n.nbSimilaires > 0 ? (g(), o("span", Se, C(n.nbSimilaires), 1)) : a("", !0)
461
+ e.id === "similarite" && n.nbSimilaires > 0 ? (g(), o("span", De, C(n.nbSimilaires), 1)) : a("", !0)
447
462
  ]),
448
- content: E(() => [s("div", Ce, [e.$slots.similaires ? D((g(), o("div", we, [x(e.$slots, "similaires", h(d(l.scope)))], 512)), [[te, c.activeTab === "similarite"]]) : a("", !0), e.$slots.evenements ? D((g(), o("div", Te, [x(e.$slots, "evenements")], 512)), [[te, c.activeTab === "evenements"]]) : a("", !0)])]),
463
+ content: E(() => [s("div", Oe, [e.$slots.similaires ? ne((g(), o("div", ke, [x(e.$slots, "similaires", h(d(l.scope)))], 512)), [[te, c.activeTab === "similarite"]]) : a("", !0), e.$slots.evenements ? ne((g(), o("div", Ae, [x(e.$slots, "evenements")], 512)), [[te, c.activeTab === "evenements"]]) : a("", !0)])]),
449
464
  _: 3
450
465
  }, 8, ["modelValue", "items"])) : a("", !0);
451
466
  }
452
- var De = /*#__PURE__*/ F(xe, [["render", Ee]]), Oe = {
467
+ var Me = /*#__PURE__*/ z(Ee, [["render", je]]), Ne = {
453
468
  baseUrl: "",
454
- getToken: () => k.getToken(),
455
- setToken: (e) => k.setToken(e),
456
- logout: () => k.logout(),
457
- goToLoginPage: () => k.goToLoginPage()
469
+ getToken: () => O.getToken(),
470
+ setToken: (e) => O.setToken(e),
471
+ logout: () => O.logout(),
472
+ goToLoginPage: () => O.goToLoginPage()
458
473
  };
459
- function ke(e = {}) {
460
- Object.assign(Oe, e);
474
+ function Pe(e = {}) {
475
+ Object.assign(Ne, e);
461
476
  }
462
- var I = () => Oe;
477
+ var B = () => Ne;
463
478
  //#endregion
464
479
  //#region src/api/transport/axiosOverlayConnector.js
465
- function Ae(e, t = {}) {
466
- let n = I(), r = {
480
+ function Fe(e, t = {}) {
481
+ let n = B(), r = {
467
482
  getToken: () => n.getToken?.() ?? null,
468
483
  setToken: (e) => n.setToken?.(e),
469
484
  logout: () => n.logout?.(),
@@ -485,69 +500,74 @@ function Ae(e, t = {}) {
485
500
  }, t.functions.errorsHandlers = {
486
501
  ...r.errorsHandlers,
487
502
  ...t.functions.errorsHandlers ?? {}
488
- }, ie(e, t);
503
+ }, ae(e, t);
489
504
  }
490
505
  //#endregion
491
506
  //#region src/api/transport/httpClient.js
492
- var je = (e, t) => {
493
- let n = t || I().baseUrl;
507
+ var Ie = (e, t) => {
508
+ let n = t || B().baseUrl;
494
509
  if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
495
510
  return `${n}${e}`;
496
- }, Me = (e = {}) => {
511
+ }, Le = (e = {}) => {
497
512
  let t = new URLSearchParams();
498
513
  Object.entries(e).forEach(([e, n]) => {
499
514
  n != null && n !== "" && t.append(e, typeof n == "object" ? JSON.stringify(n) : n);
500
515
  });
501
516
  let n = t.toString();
502
517
  return n ? `?${n}` : "";
503
- }, Ne = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => Ae({
504
- url: je(`${t}${Me(n)}`, a),
518
+ }, Re = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => Fe({
519
+ url: Ie(`${t}${Le(n)}`, a),
505
520
  method: e,
506
521
  ...r === void 0 ? {} : { data: r },
507
522
  ...i ? { signal: i } : {}
508
- }, o), L = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => Ne({
523
+ }, o), V = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => Re({
509
524
  method: "GET",
510
525
  path: e,
511
526
  params: t,
512
527
  signal: n,
513
528
  baseUrl: i
514
- }, r).then((e) => e.data), Pe = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => Ne({
529
+ }, r).then((e) => e.data), ze = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => Re({
515
530
  method: "POST",
516
531
  path: e,
517
532
  params: n,
518
533
  data: t,
519
534
  signal: r,
520
535
  baseUrl: a
521
- }, i).then((e) => e.data), Fe = { mustBeAuthenticated: !1 }, R = (e, { signal: t, baseUrl: n } = {}) => L(e, {
536
+ }, i).then((e) => e.data), Be = { mustBeAuthenticated: !1 }, H = (e, { signal: t, baseUrl: n } = {}) => V(e, {
522
537
  signal: t,
523
538
  baseUrl: n,
524
- overlay: Fe
525
- }), Ie = (e) => R("/v2/sollicitation/motifs", e), Le = (e) => R("/v2/sollicitation/categories", e), Re = (e) => R("/v2/sollicitation/types", e), ze = (e) => R("/v2/sollicitation/natures", e), Be = (e) => R("/v2/sollicitation/etats", e), Ve = ({ signal: e, baseUrl: t } = {}) => L("/collaborateurs", {
539
+ overlay: Be
540
+ }), Ve = (e) => H("/v2/sollicitation/motifs", e), He = (e) => H("/v2/sollicitation/categories", e), Ue = (e) => H("/v2/sollicitation/types", e), We = (e) => H("/v2/sollicitation/natures", e), Ge = (e) => H("/v2/sollicitation/etats", e), Ke = ({ signal: e, baseUrl: t } = {}) => V("/v2/sollicitation/provenances", {
541
+ params: { estDesactive: !1 },
542
+ signal: e,
543
+ baseUrl: t,
544
+ overlay: Be
545
+ }), qe = ({ signal: e, baseUrl: t } = {}) => V("/collaborateurs", {
526
546
  params: { actif: !0 },
527
547
  signal: e,
528
548
  baseUrl: t
529
- }), He = async ({ signal: e, baseUrl: t } = {}) => (await L("/v2/patrimoine/communes", {
549
+ }), Je = async ({ signal: e, baseUrl: t } = {}) => (await V("/v2/patrimoine/communes", {
530
550
  signal: e,
531
551
  baseUrl: t
532
552
  }) ?? []).map((e) => ({
533
553
  idCommune: e.id,
534
554
  commune: e.libelle
535
- })), Ue = (e, { signal: t, baseUrl: n } = {}) => L("/v2/patrimoine/entrees", {
555
+ })), Ye = (e, { signal: t, baseUrl: n } = {}) => V("/v2/patrimoine/entrees", {
536
556
  params: { idCommune: e },
537
557
  signal: t,
538
558
  baseUrl: n
539
- }), We = (e, { signal: t, baseUrl: n } = {}) => L("/v2/patrimoine/modules", {
559
+ }), Xe = (e, { signal: t, baseUrl: n } = {}) => V("/v2/patrimoine/modules", {
540
560
  params: { codeProgramme: e },
541
561
  signal: t,
542
562
  baseUrl: n
543
- }), Ge = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => L("/v2/patrimoine/contrat_modules", {
563
+ }), Ze = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => V("/v2/patrimoine/contrat_modules", {
544
564
  params: {
545
565
  idContrat: e,
546
566
  typeContrat: t
547
567
  },
548
568
  signal: n,
549
569
  baseUrl: r
550
- }), Ke = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => L("/v2/sollicitation/responsables", {
570
+ }), Qe = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => V("/v2/sollicitation/responsables", {
551
571
  params: {
552
572
  motif: e,
553
573
  categorie: t,
@@ -556,11 +576,11 @@ var je = (e, t) => {
556
576
  },
557
577
  signal: i,
558
578
  baseUrl: a
559
- }), qe = (e, { signal: t, baseUrl: n } = {}) => L("/v2/patrimoine/contrat_module_rechercher", {
579
+ }), $e = (e, { signal: t, baseUrl: n } = {}) => V("/v2/patrimoine/contrat_module_rechercher", {
560
580
  params: { recherche: e },
561
581
  signal: t,
562
582
  baseUrl: n
563
- }), Je = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => L("/v2/cresol/reclamant_rechercher", {
583
+ }), et = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => V("/v2/cresol/reclamant_rechercher", {
564
584
  params: {
565
585
  categorie: e,
566
586
  recherche: t
@@ -570,36 +590,37 @@ var je = (e, t) => {
570
590
  });
571
591
  //#endregion
572
592
  //#region src/utils/apiError.js
573
- function z(e) {
593
+ function U(e) {
574
594
  let t = e?.response?.data;
575
595
  return t?.error ? t.error : t?.errorList ? t.errorList.map((e) => e.message).join(", ") : e?.response?.status === 500 ? "Erreur interne" : e?.response?.status === 401 ? "Non autorisé à faire cette action" : "Erreur";
576
596
  }
577
- var B = (e) => e?.name === "AbortError" || e?.name === "CanceledError", V = Symbol("cresol:data"), Ye = () => ({
597
+ var tt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", nt = Symbol("cresol:data"), rt = () => ({
578
598
  motifs: null,
579
599
  categories: null,
580
600
  types: null,
581
601
  natures: null,
582
602
  etats: null,
603
+ provenances: null,
583
604
  collaborateurs: null,
584
605
  communes: null,
585
606
  adressesByCommune: {},
586
607
  modulesByProgramme: {},
587
608
  modulesByContrat: {},
588
609
  responsablesByMotif: {}
589
- }), H = /* @__PURE__ */ new Map(), Xe = (e) => (H.has(e) || H.set(e, v(Ye())), H.get(e)), U = /* @__PURE__ */ new Map();
590
- function Ze() {
591
- H.clear(), U.clear();
610
+ }), W = /* @__PURE__ */ new Map(), it = (e) => (W.has(e) || W.set(e, v(rt())), W.get(e)), G = /* @__PURE__ */ new Map();
611
+ function at() {
612
+ W.clear(), G.clear();
592
613
  }
593
- var W = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, G = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
594
- function Qe({ onError: e, baseUrl: t } = {}) {
595
- let n = y(0), i = () => ({ baseUrl: T(t) || null }), a = () => T(t) || I().baseUrl || "", o = () => Xe(a()), s = (t, r) => {
614
+ var K = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, q = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
615
+ function ot({ onError: e, baseUrl: t } = {}) {
616
+ let n = y(0), i = () => ({ baseUrl: T(t) || null }), a = () => T(t) || B().baseUrl || "", o = () => it(a()), s = (t, r) => {
596
617
  let i = `${a()}|${t}`;
597
- if (U.has(i)) return U.get(i);
618
+ if (G.has(i)) return G.get(i);
598
619
  n.value += 1;
599
- let o = Promise.resolve().then(r).catch((t) => (B(t) || e?.(z(t)), null)).finally(() => {
600
- --n.value, U.delete(i);
620
+ let o = Promise.resolve().then(r).catch((t) => (tt(t) || e?.(U(t)), null)).finally(() => {
621
+ --n.value, G.delete(i);
601
622
  });
602
- return U.set(i, o), o;
623
+ return G.set(i, o), o;
603
624
  }, c = (e, t) => o()[e]?.length ? Promise.resolve(o()[e]) : s(`referentiel:${e}`, async () => (o()[e] = await t(i()), o()[e])), l = {
604
625
  get cache() {
605
626
  return o();
@@ -608,26 +629,27 @@ function Qe({ onError: e, baseUrl: t } = {}) {
608
629
  isLoading: r(() => n.value > 0),
609
630
  loadNomenclature() {
610
631
  return Promise.all([
611
- c("motifs", Ie),
612
- c("categories", Le),
613
- c("types", Re),
614
- c("natures", ze),
615
- c("etats", Be)
632
+ c("motifs", Ve),
633
+ c("categories", He),
634
+ c("types", Ue),
635
+ c("natures", We),
636
+ c("etats", Ge)
616
637
  ]);
617
638
  },
618
- loadCollaborateurs: () => c("collaborateurs", Ve),
639
+ loadCollaborateurs: () => c("collaborateurs", qe),
640
+ loadProvenances: () => c("provenances", Ke),
619
641
  loadCommunes() {
620
- return o().communes?.length ? Promise.resolve(o().communes) : s("communes", async () => (o().communes = await He(i()), o().communes));
642
+ return o().communes?.length ? Promise.resolve(o().communes) : s("communes", async () => (o().communes = await Je(i()), o().communes));
621
643
  },
622
644
  loadAdresses(e) {
623
645
  return e == null ? Promise.resolve([]) : o().adressesByCommune[e] ? Promise.resolve(o().adressesByCommune[e]) : s(`adresses:${e}`, async () => {
624
- let t = await Ue(e, i());
646
+ let t = await Ye(e, i());
625
647
  return o().adressesByCommune[e] = t ?? [], t;
626
648
  });
627
649
  },
628
650
  loadModulesOfProgramme(e) {
629
651
  return e == null ? Promise.resolve([]) : o().modulesByProgramme[e] ? Promise.resolve(o().modulesByProgramme[e]) : s(`modules:${e}`, async () => {
630
- let t = await We(e, i());
652
+ let t = await Xe(e, i());
631
653
  return o().modulesByProgramme[e] = t ?? [], t;
632
654
  });
633
655
  },
@@ -635,7 +657,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
635
657
  if (e == null) return Promise.resolve([]);
636
658
  let n = `${t ?? ""}|${e}`;
637
659
  return o().modulesByContrat[n] ? Promise.resolve(o().modulesByContrat[n]) : s(`contratModules:${n}`, async () => {
638
- let r = await Ge({
660
+ let r = await Ze({
639
661
  idContrat: e,
640
662
  typeContrat: t
641
663
  }, i());
@@ -645,7 +667,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
645
667
  async searchContrats(e, { signal: t } = {}) {
646
668
  let n = (e ?? "").trim();
647
669
  if (!n) return [];
648
- let r = await qe(n, {
670
+ let r = await $e(n, {
649
671
  ...i(),
650
672
  signal: t
651
673
  }), a = /* @__PURE__ */ new Map();
@@ -658,6 +680,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
658
680
  adresse: e.adresse ?? null,
659
681
  commune: e.commune ?? null,
660
682
  estSorti: !!e.estContratSorti,
683
+ dateSortie: e.dateSortieContrat ?? null,
661
684
  nbModules: e.nbModulesContrat ?? 1
662
685
  });
663
686
  }
@@ -666,7 +689,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
666
689
  async searchReclamants(e, t, { signal: n } = {}) {
667
690
  let r = (t ?? "").trim();
668
691
  if (!r) return [];
669
- let a = await Je({
692
+ let a = await et({
670
693
  categorie: e,
671
694
  recherche: r
672
695
  }, {
@@ -681,6 +704,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
681
704
  categorie: t.categorie?.toLowerCase() ?? e,
682
705
  libelleReclamant: t.libelleReclamant,
683
706
  adresse: t.adresse,
707
+ idModule: t.idModule,
684
708
  estActif: !1,
685
709
  individus: []
686
710
  });
@@ -688,19 +712,20 @@ function Qe({ onError: e, baseUrl: t } = {}) {
688
712
  r.estActif ||= !!t.estActif, r.individus.push(t);
689
713
  }
690
714
  return [...o.values()].sort((e, t) => Number(t.estActif) - Number(e.estActif)).map((e) => {
691
- let t = e.individus.map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", "), n = {
692
- locataire: `${e.libelleReclamant || t} — Contrat ${e.type}/${e.id}`,
693
- demandeur: `${t} — ${e.libelleReclamant}`
715
+ let t = e.individus.map((e) => e.dateSortie), n = t.every((e) => e != null) ? Math.max(...t) : null, r = e.individus.map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", "), i = {
716
+ locataire: `${e.libelleReclamant || r} — Contrat ${e.type}/${e.id}`,
717
+ demandeur: `${r} — ${e.libelleReclamant}`
694
718
  }[e.categorie];
695
719
  return {
696
720
  ...e,
697
- libelle: n ?? e.libelleReclamant
721
+ dateSortie: n,
722
+ libelle: i ?? e.libelleReclamant
698
723
  };
699
724
  });
700
725
  },
701
726
  loadResponsables({ motif: e, categorie: t, type: n, nature: r }) {
702
727
  return e == null ? Promise.resolve([]) : o().responsablesByMotif[e] ? Promise.resolve(o().responsablesByMotif[e]) : s(`responsables:${e}`, async () => {
703
- let a = await Ke({
728
+ let a = await Qe({
704
729
  motif: e,
705
730
  categorie: t,
706
731
  type: n,
@@ -724,51 +749,97 @@ function Qe({ onError: e, baseUrl: t } = {}) {
724
749
  libelle: l.libelleResponsable
725
750
  };
726
751
  },
727
- motifLibelle: (e) => W(o().motifs, "id", e),
728
- categorieLibelle: (e) => W(o().categories, "id", e),
729
- typeLibelle: (e) => W(o().types, "id", e),
730
- natureLibelle: (e) => W(o().natures, "id", e),
731
- etatLibelle: (e) => W(o().etats, "code", e),
732
- motifIcon: (e) => G(o().motifs, "id", e),
733
- categorieIcon: (e) => G(o().categories, "id", e),
734
- typeIcon: (e) => G(o().types, "id", e),
735
- natureIcon: (e) => G(o().natures, "id", e)
752
+ motifLibelle: (e) => K(o().motifs, "id", e),
753
+ categorieLibelle: (e) => K(o().categories, "id", e),
754
+ typeLibelle: (e) => K(o().types, "id", e),
755
+ natureLibelle: (e) => K(o().natures, "id", e),
756
+ etatLibelle: (e) => K(o().etats, "code", e),
757
+ motifIcon: (e) => q(o().motifs, "id", e),
758
+ categorieIcon: (e) => q(o().categories, "id", e),
759
+ typeIcon: (e) => q(o().types, "id", e),
760
+ natureIcon: (e) => q(o().natures, "id", e)
736
761
  };
737
762
  return v(l);
738
763
  }
739
- function $e(e) {
740
- return _(V, e), e;
764
+ function st(e) {
765
+ return _(nt, e), e;
741
766
  }
742
- function K() {
743
- let e = f(V, null);
767
+ function J() {
768
+ let e = f(nt, null);
744
769
  if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
745
770
  return e;
746
771
  }
747
772
  //#endregion
748
773
  //#region src/utils/fontAwesomeIcons.js
749
- var et = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
750
- async function tt(e) {
774
+ var ct = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
775
+ async function Y(e) {
751
776
  let t = await import("@fortawesome/free-solid-svg-icons");
752
777
  [...new Set(e.filter(Boolean))].forEach((e) => {
753
- let n = t[et(e)];
754
- n && ae.add(n);
778
+ let n = t[ct(e)];
779
+ n && oe.add(n);
755
780
  });
756
781
  }
757
782
  //#endregion
758
- //#region src/components/ReclamantRechercheBlock.vue
759
- var q = [
783
+ //#region src/utils/date.js
784
+ function lt(e) {
785
+ return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
786
+ }
787
+ function ut(e) {
788
+ return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
789
+ }
790
+ function X(e) {
791
+ return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
792
+ }
793
+ //#endregion
794
+ //#region src/composables/useCresolContext.js
795
+ var dt = Symbol("cresol:options"), ft = (e) => _(dt, e), Z = () => f(dt, {}), pt = y(!1);
796
+ Y(Object.values(A).map((e) => e.icon)).then(() => {
797
+ pt.value = !0;
798
+ });
799
+ var mt = {
800
+ name: "ReclamantTypeBadgeComponent",
801
+ props: {
802
+ reclamant: {
803
+ type: Object,
804
+ default: null
805
+ },
806
+ iconOnly: {
807
+ type: Boolean,
808
+ default: !1
809
+ }
810
+ },
811
+ setup() {
812
+ return { iconsReady: pt };
813
+ },
814
+ computed: { type() {
815
+ return he(this.reclamant);
816
+ } }
817
+ }, ht = ["title"], gt = { key: 1 };
818
+ function _t(e, t, n, r, s, c) {
819
+ let l = S("font-awesome-icon");
820
+ return c.type ? (g(), o("span", {
821
+ key: 0,
822
+ class: m(["badge d-inline-flex align-items-center gap-1 border flex-shrink-0", `bg-${c.type.couleur}-subtle text-${c.type.couleur}-emphasis border-${c.type.couleur}-subtle`]),
823
+ title: c.type.libelle
824
+ }, [r.iconsReady ? (g(), i(l, {
825
+ key: 0,
826
+ icon: c.type.icon,
827
+ "fixed-width": ""
828
+ }, null, 8, ["icon"])) : a("", !0), n.iconOnly ? a("", !0) : (g(), o("span", gt, C(c.type.libelle), 1))], 10, ht)) : a("", !0);
829
+ }
830
+ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
760
831
  {
761
832
  key: "locataire",
762
833
  label: "Locataire",
763
- icon: "house-user",
834
+ icon: A.locataire.icon,
764
835
  recherche: "Rechercher un locataire",
765
836
  aucun: "Aucun locataire trouvé.",
766
- placeholder: "Nom, prénom, n° de contrat, adresse, téléphone ou mail…"
837
+ placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
767
838
  },
768
839
  {
769
840
  key: "demandeur",
770
841
  label: "Demandeur",
771
- icon: "hourglass-half",
842
+ icon: A.demandeur.icon,
772
843
  recherche: "Rechercher un demandeur",
773
844
  aucun: "Aucun demandeur trouvé.",
774
845
  placeholder: "Nom, prénom, n° de demande ou unique, téléphone ou mail…"
@@ -776,7 +847,7 @@ var q = [
776
847
  {
777
848
  key: "tiers",
778
849
  label: "Tiers",
779
- icon: "user-tie",
850
+ icon: A.tiers.icon,
780
851
  recherche: "Rechercher un tiers",
781
852
  aucun: "Aucun tiers trouvé.",
782
853
  placeholder: "Raison sociale, adresse, téléphone ou mail…"
@@ -784,58 +855,80 @@ var q = [
784
855
  {
785
856
  key: "autre",
786
857
  label: "Autre",
787
- icon: "user",
858
+ icon: A.autre.icon,
788
859
  recherche: "Rechercher un individu « Autre »",
789
860
  aucun: "Aucun individu « Autre » trouvé.",
790
861
  placeholder: "Nom, prénom, adresse, téléphone ou mail…"
791
862
  },
863
+ {
864
+ key: "fournisseur",
865
+ label: "Fournisseur",
866
+ icon: A.fournisseur.icon,
867
+ recherche: "Rechercher un fournisseur",
868
+ aucun: "Aucun fournisseur trouvé.",
869
+ placeholder: "Raison sociale, adresse, téléphone ou mail…"
870
+ },
871
+ {
872
+ key: "personnel",
873
+ label: "Personnel",
874
+ icon: A.personnel.icon,
875
+ recherche: "Rechercher un collaborateur",
876
+ aucun: "Aucun collaborateur trouvé.",
877
+ placeholder: "Nom, prénom, téléphone ou mail…"
878
+ },
792
879
  {
793
880
  key: "tout",
794
881
  label: "Tout",
795
882
  icon: "magnifying-glass",
796
883
  recherche: "Rechercher parmi tous les réclamants",
797
884
  aucun: "Aucun réclamant trouvé.",
798
- placeholder: "Nom, prénom, n° de contrat ou de demande, adresse, téléphone ou mail…"
885
+ placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
799
886
  }
800
- ], nt = {
887
+ ], yt = {
801
888
  signataire: "Signataire",
802
889
  occupant: "Occupant",
803
890
  demandeur: "Demandeur"
804
- }, J = (e) => e ? e.categorie ? e.categorie : {
805
- D: "demandeur",
806
- T: "tiers",
807
- U: "autre"
808
- }[e.type] ?? "locataire" : null, rt = {
891
+ }, bt = {
809
892
  name: "ReclamantRechercheBlock",
810
- components: { AmsomAutocomplete: O },
893
+ components: {
894
+ AmsomAutocomplete: D,
895
+ ReclamantTypeBadgeComponent: vt
896
+ },
811
897
  setup() {
812
898
  return {
813
- draft: P(),
814
- data: K()
899
+ draft: R(),
900
+ data: J(),
901
+ options: Z()
815
902
  };
816
903
  },
817
904
  data() {
818
905
  return {
819
906
  iconsReady: !1,
820
- categorie: J(this.draft.reclamantSelectionne) ?? "locataire",
907
+ categorie: null,
821
908
  trouves: [],
822
909
  rechercheEnCours: !1,
823
910
  rechercheFaite: !1
824
911
  };
825
912
  },
826
913
  computed: {
914
+ typesAutorises() {
915
+ return this.options.typesReclamant ?? M;
916
+ },
917
+ autorisees() {
918
+ return me(this.typesAutorises);
919
+ },
827
920
  categories() {
828
- return q;
921
+ return Q.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
829
922
  },
830
923
  categorieCourante() {
831
- return q.find((e) => e.key === this.categorie);
924
+ return Q.find((e) => e.key === this.categorie);
832
925
  },
833
926
  selectionne() {
834
927
  return this.draft.reclamantSelectionne;
835
928
  },
836
929
  selectedTrouve: {
837
930
  get() {
838
- return this.categorie === "tout" || J(this.selectionne) === this.categorie ? this.selectionne : null;
931
+ return this.categorie === "tout" || this.categorieOf(this.selectionne) === this.categorie ? this.selectionne : null;
839
932
  },
840
933
  set(e) {
841
934
  this.select(e);
@@ -843,14 +936,14 @@ var q = [
843
936
  }
844
937
  },
845
938
  async created() {
846
- await tt(q.map((e) => e.icon)), this.iconsReady = !0;
939
+ this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await Y(Q.map((e) => e.icon)), this.iconsReady = !0;
847
940
  },
848
941
  beforeUnmount() {
849
942
  clearTimeout(this.rechercheTimeout), this.controller?.abort();
850
943
  },
851
944
  methods: {
852
945
  select(e) {
853
- e && (this.draft.selectReclamant(e), this.categorie !== "tout" && (this.categorie = J(e)));
946
+ e && (this.draft.selectReclamant(e), this.categorie !== "tout" && (this.categorie = this.categorieOf(e) ?? this.categorie));
854
947
  },
855
948
  setCategorie(e) {
856
949
  e !== this.categorie && (this.categorie = e, clearTimeout(this.rechercheTimeout), this.controller?.abort(), this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1);
@@ -860,8 +953,8 @@ var q = [
860
953
  },
861
954
  rechercher(e) {
862
955
  let t = (e ?? "").trim();
863
- t.length < 2 ? (this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1) : (this.controller?.abort(), this.controller = new AbortController(), this.rechercheEnCours = !0, this.data.searchReclamants(this.categorie, t, { signal: this.controller.signal }).then((e) => {
864
- this.trouves = e ?? [], this.rechercheFaite = !0, this.rechercheEnCours = !1;
956
+ t.length < 2 ? (this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1) : (this.controller?.abort(), this.controller = new AbortController(), this.rechercheEnCours = !0, this.data.searchReclamants(this.categorie === "tout" ? this.autorisees.join(",") : this.categorie, t, { signal: this.controller.signal }).then((e) => {
957
+ this.trouves = (e ?? []).filter((e) => this.typesAutorises.includes(e.type)), this.rechercheFaite = !0, this.rechercheEnCours = !1;
865
958
  }).catch(() => {
866
959
  this.rechercheEnCours = !1;
867
960
  }));
@@ -869,51 +962,54 @@ var q = [
869
962
  cleReclamant(e) {
870
963
  return e ? `${e.type}|${e.id}` : null;
871
964
  },
872
- categorieOf: J,
873
- iconOf(e) {
874
- return q.find((t) => t.key === J(e))?.icon ?? "user";
965
+ categorieOf(e) {
966
+ let t = N(e);
967
+ return this.autorisees.includes(t) ? t : null;
968
+ },
969
+ sortiLibelle(e) {
970
+ return e?.dateSortie == null ? "sorti" : `sorti le ${X(e.dateSortie)}`;
875
971
  },
876
972
  nomsOf(e) {
877
973
  return (e?.individus ?? []).map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", ");
878
974
  },
879
975
  titreOf(e) {
880
976
  if (!e?.individus) return e?.libelle ?? "";
881
- let t = J(e);
977
+ let t = this.categorieOf(e);
882
978
  return t === "locataire" ? e.libelleReclamant || this.nomsOf(e) : t === "demandeur" ? this.nomsOf(e) : e.libelleReclamant;
883
979
  },
884
980
  referenceOf(e) {
885
981
  if (!e?.individus) return "";
886
- let t = J(e);
887
- return t === "locataire" ? `Contrat ${e.type}/${e.id}` : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : "Tiers";
982
+ let t = this.categorieOf(e);
983
+ return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : he(e).libelle;
888
984
  },
889
985
  detailOf(e) {
890
986
  let t = e?.individus ?? [];
891
- if (["tiers", "autre"].includes(J(e))) {
987
+ if (!["locataire", "demandeur"].includes(N(e))) {
892
988
  let e = t[0];
893
989
  return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
894
990
  }
895
- return t.map((e) => {
896
- let t = [e.nom, e.prenom].filter(Boolean).join(" ");
897
- return nt[e.role] ? `${t} (${nt[e.role].toLowerCase()})` : t;
991
+ return t.map((t) => {
992
+ let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${X(t.dateSortie)}` : null, i = [yt[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
993
+ return i ? `${n} (${i})` : n;
898
994
  }).join(", ");
899
995
  }
900
996
  }
901
- }, it = {
997
+ }, xt = {
902
998
  key: 0,
903
999
  class: "d-flex flex-column gap-3"
904
- }, at = { class: "d-flex flex-wrap gap-2" }, ot = ["onClick"], st = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, ct = { class: "min-w-0" }, lt = {
1000
+ }, St = { class: "d-flex flex-wrap gap-2" }, Ct = ["onClick"], wt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Tt = { class: "min-w-0" }, Et = {
905
1001
  key: 0,
906
1002
  class: "badge bg-warning-subtle text-warning-emphasis ms-1"
907
- }, ut = { class: "text-muted d-block text-truncate" }, dt = { key: 0 }, ft = {
1003
+ }, Dt = { class: "text-muted d-block text-truncate" }, Ot = { key: 0 }, kt = {
908
1004
  key: 0,
909
1005
  class: "text-muted d-block text-truncate"
910
- }, pt = {
1006
+ }, At = {
911
1007
  key: 0,
912
1008
  class: "text-muted"
913
1009
  };
914
- function mt(e, t, r, c, d, f) {
915
- let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
916
- return d.iconsReady ? (g(), o("div", it, [s("div", null, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le réclamant est… ", -1), s("div", at, [(g(!0), o(n, null, b(f.categories, (e) => (g(), o("button", {
1010
+ function jt(e, t, r, c, d, f) {
1011
+ let p = S("font-awesome-icon"), h = S("reclamant-type-badge-component"), _ = S("amsom-autocomplete");
1012
+ return d.iconsReady ? (g(), o("div", xt, [s("div", null, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le réclamant est… ", -1), s("div", St, [(g(!0), o(n, null, b(f.categories, (e) => (g(), o("button", {
917
1013
  key: e.key,
918
1014
  type: "button",
919
1015
  class: m(["btn btn-sm d-inline-flex align-items-center gap-2", d.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
@@ -921,9 +1017,9 @@ function mt(e, t, r, c, d, f) {
921
1017
  }, [u(p, {
922
1018
  icon: e.icon,
923
1019
  "fixed-width": ""
924
- }, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10, ot))), 128))])]), s("div", null, [
925
- s("label", st, C(f.categorieCourante.recherche), 1),
926
- (g(), i(h, {
1020
+ }, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10, Ct))), 128))])]), s("div", null, [
1021
+ s("label", wt, C(f.categorieCourante.recherche), 1),
1022
+ (g(), i(_, {
927
1023
  key: d.categorie,
928
1024
  modelValue: f.selectedTrouve,
929
1025
  "onUpdate:modelValue": t[0] ||= (e) => f.selectedTrouve = e,
@@ -938,10 +1034,18 @@ function mt(e, t, r, c, d, f) {
938
1034
  "debounce-delay": 0,
939
1035
  onSearch: f.rechercherPlusTard
940
1036
  }, {
941
- options: E((e) => [s("div", ct, [
942
- s("div", { class: m(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [l(C(f.titreOf(e)) + " ", 1), e?.estActif ? a("", !0) : (g(), o("span", lt, C(f.categorieOf(e) === "demandeur" ? "inactive" : "sorti"), 1))], 2),
943
- s("small", ut, [l(C(f.referenceOf(e)) + " ", 1), e?.adresse ? (g(), o("span", dt, " — " + C(e.adresse), 1)) : a("", !0)]),
944
- f.detailOf(e) ? (g(), o("small", ft, C(f.detailOf(e)), 1)) : a("", !0)
1037
+ options: E((e) => [s("div", Tt, [
1038
+ s("div", { class: m(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
1039
+ u(h, {
1040
+ reclamant: e,
1041
+ "icon-only": "",
1042
+ class: "me-1"
1043
+ }, null, 8, ["reclamant"]),
1044
+ l(" " + C(f.titreOf(e)) + " ", 1),
1045
+ e?.estActif ? a("", !0) : (g(), o("span", Et, C(f.categorieOf(e) === "demandeur" ? "inactive" : f.sortiLibelle(e)), 1))
1046
+ ], 2),
1047
+ s("small", Dt, [l(C(f.referenceOf(e)) + " ", 1), e?.adresse ? (g(), o("span", Ot, " — " + C(e.adresse), 1)) : a("", !0)]),
1048
+ f.detailOf(e) ? (g(), o("small", kt, C(f.detailOf(e)), 1)) : a("", !0)
945
1049
  ])]),
946
1050
  _: 1
947
1051
  }, 8, [
@@ -954,89 +1058,110 @@ function mt(e, t, r, c, d, f) {
954
1058
  "placeholder",
955
1059
  "onSearch"
956
1060
  ])),
957
- d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small", pt, C(f.categorieCourante.aucun), 1)) : a("", !0)
1061
+ d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small", At, C(f.categorieCourante.aucun), 1)) : a("", !0)
958
1062
  ])])) : a("", !0);
959
1063
  }
960
- var ht = /*#__PURE__*/ F(rt, [["render", mt]]), gt = {
1064
+ var Mt = /*#__PURE__*/ z(bt, [["render", jt]]), Nt = {
961
1065
  name: "ProvenanceSelecteurBlock",
962
1066
  setup() {
963
- return { draft: P() };
1067
+ return {
1068
+ draft: R(),
1069
+ data: J(),
1070
+ options: Z()
1071
+ };
1072
+ },
1073
+ data() {
1074
+ return { iconsReady: !1 };
964
1075
  },
965
1076
  computed: {
966
1077
  provenances() {
967
- return ce;
1078
+ return this.options.provenances;
1079
+ },
1080
+ loaded() {
1081
+ return this.data.cache.provenances != null;
968
1082
  },
969
1083
  selected() {
970
1084
  return this.draft.draft.provenance;
971
1085
  },
1086
+ libelleFige() {
1087
+ return this.data.cache.provenances?.find((e) => e.id === this.selected)?.libelle ?? this.selected ?? "—";
1088
+ },
972
1089
  provenanceChoisie() {
973
1090
  return this.provenances.find((e) => e.id === this.selected) ?? null;
974
1091
  }
975
- }
976
- }, _t = {
1092
+ },
1093
+ async created() {
1094
+ await Y([...Object.values(k), le]), this.iconsReady = !0;
1095
+ },
1096
+ methods: { iconOf: ue }
1097
+ }, Pt = {
977
1098
  key: 0,
978
1099
  class: "fs-7 text-muted"
979
- }, vt = { class: "fw-medium" }, yt = { key: 1 }, bt = { class: "d-flex flex-wrap gap-2" }, xt = ["onClick"], St = {
1100
+ }, Ft = { class: "fw-medium" }, It = { key: 1 }, Lt = { class: "d-flex flex-wrap gap-2" }, Rt = ["onClick"], zt = {
980
1101
  key: 0,
981
1102
  class: "fs-7 text-danger mt-1"
982
1103
  };
983
- function Ct(e, t, r, c, d, f) {
984
- let p = S("font-awesome-icon");
985
- return c.draft.isReadonly("provenance") ? (g(), o("div", _t, [t[0] ||= l(" Provenance du contact : ", -1), s("span", vt, [f.provenanceChoisie?.icon ? (g(), i(p, {
1104
+ function Bt(e, t, r, c, u, d) {
1105
+ let f = S("font-awesome-icon");
1106
+ return c.draft.isReadonly("provenance") ? (g(), o("div", Pt, [t[0] ||= l(" Provenance du contact : ", -1), s("span", Ft, [u.iconsReady && d.selected ? (g(), i(f, {
986
1107
  key: 0,
987
- icon: f.provenanceChoisie.icon,
1108
+ icon: d.iconOf(d.selected),
988
1109
  "fixed-width": ""
989
- }, null, 8, ["icon"])) : a("", !0), l(" " + C(f.provenanceChoisie?.libelle ?? "—"), 1)])])) : (g(), o("div", yt, [
1110
+ }, null, 8, ["icon"])) : a("", !0), l(" " + C(d.libelleFige), 1)])])) : (g(), o("div", It, [
990
1111
  t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, [l(" Provenance du contact "), s("span", { class: "text-danger" }, "*")], -1),
991
- s("div", bt, [(g(!0), o(n, null, b(f.provenances, (e) => (g(), o("button", {
1112
+ s("div", Lt, [(g(!0), o(n, null, b(d.provenances, (e) => (g(), o("button", {
992
1113
  key: e.id,
993
1114
  type: "button",
994
- class: m(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === f.selected ? "btn-primary" : "btn-outline-primary"]),
1115
+ class: m(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === d.selected ? "btn-primary" : "btn-outline-primary"]),
995
1116
  onClick: (t) => c.draft.setProvenance(e.id)
996
- }, [u(p, {
1117
+ }, [u.iconsReady ? (g(), i(f, {
1118
+ key: 0,
997
1119
  icon: e.icon,
998
1120
  "fixed-width": ""
999
- }, null, 8, ["icon"]), s("span", null, C(e.libelle), 1)], 10, xt))), 128))]),
1000
- f.selected ? a("", !0) : (g(), o("div", St, " Sélectionnez par quel canal la sollicitation vous est parvenue. "))
1121
+ }, null, 8, ["icon"])) : a("", !0), s("span", null, C(e.libelle), 1)], 10, Rt))), 128))]),
1122
+ d.loaded && !d.provenanceChoisie ? (g(), o("div", zt, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : a("", !0)
1001
1123
  ]));
1002
1124
  }
1003
- var wt = /*#__PURE__*/ F(gt, [["render", Ct]]), Tt = {
1125
+ var Vt = /*#__PURE__*/ z(Nt, [["render", Bt]]), Ht = {
1004
1126
  name: "EtapeReclamantBlock",
1005
1127
  components: {
1006
- ReclamantRechercheBlock: ht,
1007
- ProvenanceSelecteurBlock: wt
1128
+ ReclamantRechercheBlock: Mt,
1129
+ ProvenanceSelecteurBlock: Vt
1008
1130
  },
1009
1131
  props: { premiere: {
1010
1132
  type: Boolean,
1011
1133
  default: !1
1012
1134
  } },
1013
1135
  setup() {
1014
- return { draft: P() };
1136
+ return { draft: R() };
1015
1137
  }
1016
- }, Et = { class: "d-flex flex-column gap-3" }, Dt = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
1017
- function Ot(e, t, n, r, c, d) {
1138
+ }, Ut = { class: "d-flex flex-column gap-3" }, Wt = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
1139
+ function Gt(e, t, n, r, c, d) {
1018
1140
  let f = S("provenance-selecteur-block"), p = S("font-awesome-icon"), m = S("reclamant-recherche-block");
1019
- return g(), o("div", Et, [n.premiere ? (g(), i(f, { key: 0 })) : a("", !0), x(e.$slots, "reclamant", {
1141
+ return g(), o("div", Ut, [n.premiere ? (g(), i(f, { key: 0 })) : a("", !0), x(e.$slots, "reclamant", {
1020
1142
  reclamant: r.draft.reclamantSelectionne,
1021
1143
  select: r.draft.selectReclamant
1022
- }, () => [s("div", Dt, [u(p, {
1144
+ }, () => [s("div", Wt, [u(p, {
1023
1145
  icon: "user",
1024
1146
  class: "text-primary me-2"
1025
1147
  }), t[0] ||= l(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), u(m)])]);
1026
1148
  }
1027
- var kt = /*#__PURE__*/ F(Tt, [["render", Ot]]), At = Symbol("cresol:options"), jt = (e) => _(At, e), Y = () => f(At, {});
1149
+ var Kt = /*#__PURE__*/ z(Ht, [["render", Gt]]);
1028
1150
  //#endregion
1029
1151
  //#region src/utils/text.js
1030
- function X(e, t = !0) {
1152
+ function $(e, t = !0) {
1031
1153
  if (!e) return null;
1032
1154
  let n = e.toString().normalize("NFD").replace(/[̀-ͯ]/g, "");
1033
1155
  return t ? n.toLowerCase() : n;
1034
1156
  }
1035
1157
  //#endregion
1036
1158
  //#region src/components/ReclamantSelecteurBlock.vue
1037
- var Mt = {
1159
+ var qt = {
1038
1160
  name: "ReclamantSelecteurBlock",
1039
- components: { AmsomAutocomplete: O },
1161
+ components: {
1162
+ AmsomAutocomplete: D,
1163
+ ReclamantTypeBadgeComponent: vt
1164
+ },
1040
1165
  props: {
1041
1166
  mode: {
1042
1167
  type: String,
@@ -1049,8 +1174,8 @@ var Mt = {
1049
1174
  },
1050
1175
  setup() {
1051
1176
  return {
1052
- draft: P(),
1053
- options: Y()
1177
+ draft: R(),
1178
+ options: Z()
1054
1179
  };
1055
1180
  },
1056
1181
  computed: {
@@ -1076,41 +1201,48 @@ var Mt = {
1076
1201
  this.draft.selectReclamant(e);
1077
1202
  },
1078
1203
  filterReclamants({ search: e, items: t }) {
1079
- let n = (X(e) ?? "").trim();
1080
- return n ? t.filter((e) => (X(e?.libelle) ?? "").includes(n)) : t;
1204
+ let n = ($(e) ?? "").trim();
1205
+ return n ? t.filter((e) => ($(e?.libelle) ?? "").includes(n)) : t;
1081
1206
  }
1082
1207
  }
1083
- }, Nt = {
1208
+ }, Jt = {
1084
1209
  key: 0,
1085
1210
  class: "fs-7 text-muted"
1086
- }, Pt = { class: "fw-medium" }, Ft = {
1211
+ }, Yt = { class: "fw-medium" }, Xt = {
1087
1212
  key: 0,
1088
1213
  class: "btn-group btn-group-sm",
1089
1214
  role: "group"
1090
- }, It = ["onClick"], Lt = ["value"], Rt = ["value"];
1091
- function zt(e, t, r, a, c, u) {
1092
- let d = S("amsom-autocomplete");
1093
- return u.estFige ? (g(), o("div", Nt, [t[2] ||= l(" Réclamant : ", -1), s("span", Pt, C(u.reclamantSelectionne?.libelle), 1)])) : (g(), o("div", {
1215
+ }, Zt = ["onClick"], Qt = ["value"], $t = ["value"];
1216
+ function en(e, t, r, a, c, d) {
1217
+ let f = S("reclamant-type-badge-component"), p = S("amsom-autocomplete");
1218
+ return d.estFige ? (g(), o("div", Jt, [t[2] ||= l(" Réclamant : ", -1), s("span", Yt, C(d.reclamantSelectionne?.libelle), 1)])) : (g(), o("div", {
1094
1219
  key: 1,
1095
1220
  class: m(r.inline ? "d-flex align-items-center justify-content-between gap-2 border-bottom pb-2" : "d-flex flex-column gap-1")
1096
- }, [t[3] ||= s("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), u.presentation === "switch" ? (g(), o("div", Ft, [(g(!0), o(n, null, b(u.reclamants, (e, t) => (g(), o("button", {
1221
+ }, [t[3] ||= s("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), d.presentation === "switch" ? (g(), o("div", Xt, [(g(!0), o(n, null, b(d.reclamants, (e, t) => (g(), o("button", {
1097
1222
  key: t,
1098
1223
  type: "button",
1099
- class: m(["btn btn-sm py-0", e === u.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
1100
- onClick: (t) => u.select(e)
1101
- }, C(e.libelle), 11, It))), 128))])) : u.presentation === "autocomplete" ? (g(), i(d, {
1224
+ class: m(["btn btn-sm py-0", e === d.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
1225
+ onClick: (t) => d.select(e)
1226
+ }, C(e.libelle), 11, Zt))), 128))])) : d.presentation === "autocomplete" ? (g(), i(p, {
1102
1227
  key: 1,
1103
- "model-value": u.reclamantSelectionne,
1104
- items: u.reclamants,
1105
- "get-id": u.reclamantId,
1228
+ "model-value": d.reclamantSelectionne,
1229
+ items: d.reclamants,
1230
+ "get-id": d.reclamantId,
1106
1231
  "get-input-libelle": (e) => e?.libelle ?? "",
1107
- "filtering-function": u.filterReclamants,
1232
+ "filtering-function": d.filterReclamants,
1108
1233
  placeholder: "Rechercher un réclamant…",
1109
1234
  "input-size": "sm",
1110
1235
  "hide-choices": "",
1111
1236
  class: m(r.inline ? "" : "w-100"),
1112
- "onUpdate:modelValue": t[0] ||= (e) => u.select(e)
1113
- }, null, 8, [
1237
+ "onUpdate:modelValue": t[0] ||= (e) => d.select(e)
1238
+ }, {
1239
+ options: E((e) => [u(f, {
1240
+ reclamant: e,
1241
+ "icon-only": "",
1242
+ class: "me-1"
1243
+ }, null, 8, ["reclamant"]), l(" " + C(e?.libelle), 1)]),
1244
+ _: 1
1245
+ }, 8, [
1114
1246
  "model-value",
1115
1247
  "items",
1116
1248
  "get-id",
@@ -1120,22 +1252,22 @@ function zt(e, t, r, a, c, u) {
1120
1252
  ])) : (g(), o("select", {
1121
1253
  key: 2,
1122
1254
  class: m(["form-select form-select-sm", r.inline ? "w-auto" : ""]),
1123
- value: u.reclamants.indexOf(u.reclamantSelectionne),
1124
- onChange: t[1] ||= (e) => u.select(u.reclamants[e.target.value])
1125
- }, [(g(!0), o(n, null, b(u.reclamants, (e, t) => (g(), o("option", {
1255
+ value: d.reclamants.indexOf(d.reclamantSelectionne),
1256
+ onChange: t[1] ||= (e) => d.select(d.reclamants[e.target.value])
1257
+ }, [(g(!0), o(n, null, b(d.reclamants, (e, t) => (g(), o("option", {
1126
1258
  key: t,
1127
1259
  value: t
1128
- }, C(e.libelle), 9, Rt))), 128))], 42, Lt))], 2));
1260
+ }, C(e.libelle), 9, $t))), 128))], 42, Qt))], 2));
1129
1261
  }
1130
1262
  //#endregion
1131
1263
  //#region src/components/EtapeCategorieBlock.vue
1132
- var Bt = {
1264
+ var tn = {
1133
1265
  name: "EtapeCategorieBlock",
1134
1266
  components: {
1135
1267
  AmsomOverlay: t,
1136
- AmsomAutocomplete: O,
1137
- ReclamantSelecteurBlock: /* @__PURE__ */ F(Mt, [["render", zt]]),
1138
- ProvenanceSelecteurBlock: wt
1268
+ AmsomAutocomplete: D,
1269
+ ReclamantSelecteurBlock: /* @__PURE__ */ z(qt, [["render", en]]),
1270
+ ProvenanceSelecteurBlock: Vt
1139
1271
  },
1140
1272
  props: { premiere: {
1141
1273
  type: Boolean,
@@ -1143,9 +1275,9 @@ var Bt = {
1143
1275
  } },
1144
1276
  setup() {
1145
1277
  return {
1146
- draft: P(),
1147
- data: K(),
1148
- options: Y()
1278
+ draft: R(),
1279
+ data: J(),
1280
+ options: Z()
1149
1281
  };
1150
1282
  },
1151
1283
  data() {
@@ -1262,7 +1394,7 @@ var Bt = {
1262
1394
  });
1263
1395
  },
1264
1396
  registerIcons() {
1265
- return tt([
1397
+ return Y([
1266
1398
  ...this.data.cache.categories ?? [],
1267
1399
  ...this.data.cache.types ?? [],
1268
1400
  ...this.data.cache.natures ?? [],
@@ -1270,11 +1402,11 @@ var Bt = {
1270
1402
  ].map((e) => e.icon));
1271
1403
  },
1272
1404
  filterMotifs({ search: e, items: t }) {
1273
- let n = (X(e) ?? "").trim();
1405
+ let n = ($(e) ?? "").trim();
1274
1406
  if (!n) return t;
1275
1407
  let r = n.split(/\s+/);
1276
1408
  return t.filter((e) => {
1277
- let t = X(`${e.libelle} ${e.categorie} ${e.type} ${e.nature}`) ?? "";
1409
+ let t = $(`${e.libelle} ${e.categorie} ${e.type} ${e.nature}`) ?? "";
1278
1410
  return r.every((e) => t.includes(e));
1279
1411
  });
1280
1412
  },
@@ -1297,40 +1429,40 @@ var Bt = {
1297
1429
  return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
1298
1430
  }
1299
1431
  }
1300
- }, Vt = {
1432
+ }, nn = {
1301
1433
  key: 0,
1302
1434
  class: "d-flex flex-column gap-3"
1303
- }, Ht = { key: 2 }, Ut = { class: "d-flex flex-wrap align-items-center gap-2" }, Wt = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, Gt = { key: 3 }, Kt = { class: "d-flex align-items-center gap-2" }, qt = { class: "min-w-0" }, Jt = { class: "fw-medium text-truncate" }, Yt = { class: "text-muted d-block text-truncate" }, Xt = {
1435
+ }, rn = { key: 2 }, an = { class: "d-flex flex-wrap align-items-center gap-2" }, on = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, sn = { key: 3 }, cn = { class: "d-flex align-items-center gap-2" }, ln = { class: "min-w-0" }, un = { class: "fw-medium text-truncate" }, dn = { class: "text-muted d-block text-truncate" }, fn = {
1304
1436
  key: 4,
1305
1437
  class: "d-flex align-items-center gap-2 text-muted fs-7"
1306
- }, Zt = {
1438
+ }, pn = {
1307
1439
  key: 5,
1308
1440
  class: "d-flex flex-wrap align-items-center gap-2"
1309
- }, Qt = ["onClick"], $t = { key: 6 }, en = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, tn = { class: "row justify-content-around g-3" }, nn = ["title", "onClick"], rn = { class: "fs-7 mt-1 lh-sm" }, an = {
1441
+ }, mn = ["onClick"], hn = { key: 6 }, gn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, _n = { class: "row justify-content-around g-3" }, vn = ["title", "onClick"], yn = { class: "fs-7 mt-1 lh-sm" }, bn = {
1310
1442
  key: 0,
1311
1443
  class: "col-12 text-muted fs-7"
1312
- }, on = [
1444
+ }, xn = [
1313
1445
  "id",
1314
1446
  "checked",
1315
1447
  "disabled",
1316
1448
  "onChange"
1317
- ], sn = ["for"];
1318
- function cn(e, t, r, c, d, f) {
1449
+ ], Sn = ["for"];
1450
+ function Cn(e, t, r, c, d, f) {
1319
1451
  let p = S("provenance-selecteur-block"), m = S("reclamant-selecteur-block"), h = S("font-awesome-icon"), _ = S("amsom-autocomplete"), v = S("amsom-overlay");
1320
1452
  return g(), i(v, { loading: c.data.isLoading && !c.data.cache.motifs || !d.iconsReady }, {
1321
- default: E(() => [d.iconsReady ? (g(), o("div", Vt, [
1453
+ default: E(() => [d.iconsReady ? (g(), o("div", nn, [
1322
1454
  r.premiere ? (g(), i(p, { key: 0 })) : a("", !0),
1323
1455
  c.options.reclamantMode === "step" ? a("", !0) : (g(), i(m, { key: 1 })),
1324
- f.motifFige && f.selectionChain.length ? (g(), o("div", Ht, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), s("div", Ut, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
1456
+ f.motifFige && f.selectionChain.length ? (g(), o("div", rn, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), s("div", an, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
1325
1457
  key: 0,
1326
1458
  icon: "fa-solid fa-chevron-right",
1327
1459
  class: "text-muted fs-7"
1328
- })) : a("", !0), s("span", Wt, [e.icon ? (g(), i(h, {
1460
+ })) : a("", !0), s("span", on, [e.icon ? (g(), i(h, {
1329
1461
  key: 0,
1330
1462
  icon: e.icon,
1331
1463
  "fixed-width": ""
1332
1464
  }, null, 8, ["icon"])) : a("", !0), l(" " + C(e.libelle), 1)])], 64))), 128))])])) : a("", !0),
1333
- f.motifFige ? a("", !0) : (g(), o("div", Gt, [t[2] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), u(_, {
1465
+ f.motifFige ? a("", !0) : (g(), o("div", sn, [t[2] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), u(_, {
1334
1466
  modelValue: f.motifRecherche,
1335
1467
  "onUpdate:modelValue": t[0] ||= (e) => f.motifRecherche = e,
1336
1468
  items: f.allowedMotifs,
@@ -1342,12 +1474,12 @@ function cn(e, t, r, c, d, f) {
1342
1474
  "input-size": "sm",
1343
1475
  "hide-choices": ""
1344
1476
  }, {
1345
- options: E((e) => [s("div", Kt, [e?.icon ? (g(), i(h, {
1477
+ options: E((e) => [s("div", cn, [e?.icon ? (g(), i(h, {
1346
1478
  key: 0,
1347
1479
  icon: e.icon,
1348
1480
  class: "text-primary",
1349
1481
  "fixed-width": ""
1350
- }, null, 8, ["icon"])) : a("", !0), s("div", qt, [s("div", Jt, C(e?.libelle), 1), s("small", Yt, C(e?.categorie) + " › " + C(e?.type) + " › " + C(e?.nature), 1)])])]),
1482
+ }, null, 8, ["icon"])) : a("", !0), s("div", ln, [s("div", un, C(e?.libelle), 1), s("small", dn, C(e?.categorie) + " › " + C(e?.type) + " › " + C(e?.nature), 1)])])]),
1351
1483
  _: 1
1352
1484
  }, 8, [
1353
1485
  "modelValue",
@@ -1357,12 +1489,12 @@ function cn(e, t, r, c, d, f) {
1357
1489
  "get-input-libelle-from-id",
1358
1490
  "filtering-function"
1359
1491
  ])])),
1360
- f.motifFige ? a("", !0) : (g(), o("div", Xt, [...t[3] ||= [
1492
+ f.motifFige ? a("", !0) : (g(), o("div", fn, [...t[3] ||= [
1361
1493
  s("hr", { class: "flex-grow-1 my-0" }, null, -1),
1362
1494
  s("span", null, "ou sélection guidée", -1),
1363
1495
  s("hr", { class: "flex-grow-1 my-0" }, null, -1)
1364
1496
  ]])),
1365
- !f.motifFige && f.selectionChain.length ? (g(), o("div", Zt, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
1497
+ !f.motifFige && f.selectionChain.length ? (g(), o("div", pn, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
1366
1498
  key: 0,
1367
1499
  icon: "fa-solid fa-chevron-right",
1368
1500
  class: "text-muted fs-7"
@@ -1381,8 +1513,8 @@ function cn(e, t, r, c, d, f) {
1381
1513
  icon: "fa-solid fa-xmark",
1382
1514
  class: "fs-7 opacity-75"
1383
1515
  })
1384
- ], 8, Qt)], 64))), 128))])) : a("", !0),
1385
- !f.motifFige && f.currentLevel ? (g(), o("div", $t, [s("label", en, C(f.currentLevel.title), 1), s("div", tn, [(g(!0), o(n, null, b(f.currentLevel.options, (e) => (g(), o("div", {
1516
+ ], 8, mn)], 64))), 128))])) : a("", !0),
1517
+ !f.motifFige && f.currentLevel ? (g(), o("div", hn, [s("label", gn, C(f.currentLevel.title), 1), s("div", _n, [(g(!0), o(n, null, b(f.currentLevel.options, (e) => (g(), o("div", {
1386
1518
  key: e.id,
1387
1519
  class: "col-3 text-center"
1388
1520
  }, [s("button", {
@@ -1394,7 +1526,7 @@ function cn(e, t, r, c, d, f) {
1394
1526
  key: 0,
1395
1527
  icon: e.icon,
1396
1528
  size: "lg"
1397
- }, null, 8, ["icon"])) : a("", !0)], 8, nn), s("div", rn, C(e.libelle), 1)]))), 128)), f.currentLevel.options.length ? a("", !0) : (g(), o("div", an, " Aucun choix disponible "))])])) : a("", !0),
1529
+ }, null, 8, ["icon"])) : a("", !0)], 8, vn), s("div", yn, C(e.libelle), 1)]))), 128)), f.currentLevel.options.length ? a("", !0) : (g(), o("div", bn, " Aucun choix disponible "))])])) : a("", !0),
1398
1530
  f.motifsAssocies.length ? (g(), o(n, { key: 7 }, [t[4] ||= s("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
1399
1531
  s("hr", { class: "flex-grow-1 my-0" }),
1400
1532
  s("span", null, "Autres motifs liés"),
@@ -1409,15 +1541,15 @@ function cn(e, t, r, c, d, f) {
1409
1541
  checked: f.isActive(e.idMotif),
1410
1542
  disabled: f.motifFige,
1411
1543
  onChange: (t) => f.toggleMotifAssocie(e)
1412
- }, null, 40, on), s("label", {
1544
+ }, null, 40, xn), s("label", {
1413
1545
  class: "form-check-label fs-7",
1414
1546
  for: `assoc-${e.idMotif}`
1415
- }, C(e.libelle) + " ? ", 9, sn)]))), 128))], 64)) : a("", !0)
1547
+ }, C(e.libelle) + " ? ", 9, Sn)]))), 128))], 64)) : a("", !0)
1416
1548
  ])) : a("", !0)]),
1417
1549
  _: 1
1418
1550
  }, 8, ["loading"]);
1419
1551
  }
1420
- var ln = /*#__PURE__*/ F(Bt, [["render", cn]]), un = {
1552
+ var wn = /*#__PURE__*/ z(tn, [["render", Cn]]), Tn = {
1421
1553
  B: "briefcase",
1422
1554
  M: "store",
1423
1555
  W: "dungeon",
@@ -1427,17 +1559,17 @@ var ln = /*#__PURE__*/ F(Bt, [["render", cn]]), un = {
1427
1559
  S: "square-parking",
1428
1560
  V: "hands-holding"
1429
1561
  };
1430
- function dn(e, t = !1, n = "circle-question") {
1431
- return e === "L" ? t ? "building" : "house" : un[e] ?? n;
1562
+ function En(e, t = !1, n = "circle-question") {
1563
+ return e === "L" ? t ? "building" : "house" : Tn[e] ?? n;
1432
1564
  }
1433
- function fn(e) {
1565
+ function Dn(e) {
1434
1566
  return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
1435
1567
  }
1436
1568
  //#endregion
1437
1569
  //#region src/components/CiblePickerBlock.vue
1438
- var pn = 0, mn = {
1570
+ var On = 0, kn = {
1439
1571
  name: "CiblePickerBlock",
1440
- components: { AmsomAutocomplete: O },
1572
+ components: { AmsomAutocomplete: D },
1441
1573
  props: {
1442
1574
  patrimoine: {
1443
1575
  type: Object,
@@ -1488,11 +1620,11 @@ var pn = 0, mn = {
1488
1620
  "set-module-precis"
1489
1621
  ],
1490
1622
  setup() {
1491
- return { data: K() };
1623
+ return { data: J() };
1492
1624
  },
1493
1625
  data() {
1494
1626
  return {
1495
- uid: ++pn,
1627
+ uid: ++On,
1496
1628
  rechercheContrat: "",
1497
1629
  contratsTrouves: [],
1498
1630
  rechercheEnCours: !1,
@@ -1639,6 +1771,7 @@ var pn = 0, mn = {
1639
1771
  clearTimeout(this.rechercheTimeout), this.controller?.abort();
1640
1772
  },
1641
1773
  methods: {
1774
+ formatDate: X,
1642
1775
  rechercherPlusTard(e) {
1643
1776
  clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercherContrat(e), 400);
1644
1777
  },
@@ -1658,16 +1791,16 @@ var pn = 0, mn = {
1658
1791
  },
1659
1792
  filterOn(e) {
1660
1793
  return ({ search: t, items: n }) => {
1661
- let r = (X(t) ?? "").trim();
1662
- return r ? n.filter((t) => (X(t?.[e]) ?? "").includes(r)) : n;
1794
+ let r = ($(t) ?? "").trim();
1795
+ return r ? n.filter((t) => ($(t?.[e]) ?? "").includes(r)) : n;
1663
1796
  };
1664
1797
  },
1665
1798
  filterModules({ search: e, items: t }) {
1666
- let n = (X(e) ?? "").trim();
1667
- return n ? t.filter((e) => (X(this.moduleInputLibelle(e)) ?? "").includes(n) || (X(e?._autreLibelle) ?? "").includes(n)) : t;
1799
+ let n = ($(e) ?? "").trim();
1800
+ return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || ($(this.moduleInputLibelle(e)) ?? "").includes(n) || ($(e?._autreLibelle) ?? "").includes(n)) : t;
1668
1801
  },
1669
- getCategorieModuleIcon: dn,
1670
- categorieLibelle: fn,
1802
+ getCategorieModuleIcon: En,
1803
+ categorieLibelle: Dn,
1671
1804
  moduleLibelle(e) {
1672
1805
  return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
1673
1806
  },
@@ -1679,43 +1812,43 @@ var pn = 0, mn = {
1679
1812
  return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
1680
1813
  }
1681
1814
  }
1682
- }, hn = { class: "d-flex flex-column gap-3" }, gn = {
1815
+ }, An = { class: "d-flex flex-column gap-3" }, jn = {
1683
1816
  class: "btn-group w-100",
1684
1817
  role: "group"
1685
- }, _n = ["onClick"], vn = { class: "text-muted d-block mt-1" }, yn = {
1818
+ }, Mn = ["onClick"], Nn = { class: "text-muted d-block mt-1" }, Pn = {
1686
1819
  key: 0,
1687
1820
  class: "form-check"
1688
- }, bn = ["id", "checked"], xn = ["for"], Sn = { key: 1 }, Cn = { class: "min-w-0" }, wn = { class: "fw-medium text-truncate text-capitalize" }, Tn = { class: "d-flex flex-wrap align-items-center gap-1" }, En = { class: "text-muted" }, Dn = {
1821
+ }, Fn = ["id", "checked"], In = ["for"], Ln = { key: 1 }, Rn = { class: "min-w-0" }, zn = { class: "fw-medium text-truncate text-capitalize" }, Bn = { class: "d-flex flex-wrap align-items-center gap-1" }, Vn = { class: "text-muted" }, Hn = {
1689
1822
  key: 0,
1690
1823
  class: "badge bg-info"
1691
- }, On = {
1824
+ }, Un = {
1692
1825
  key: 1,
1693
1826
  class: "badge bg-warning"
1694
- }, kn = {
1827
+ }, Wn = {
1695
1828
  key: 0,
1696
1829
  class: "text-muted d-block text-truncate"
1697
- }, An = { key: 1 }, jn = { class: "row g-2" }, Mn = ["aria-pressed", "onClick"], Nn = { class: "min-w-0" }, Pn = { class: "d-block fw-semibold fs-6" }, Fn = { class: "d-block text-muted" }, In = {
1830
+ }, Gn = { key: 1 }, Kn = { class: "row g-2" }, qn = ["aria-pressed", "onClick"], Jn = { class: "min-w-0" }, Yn = { class: "d-block fw-semibold fs-6" }, Xn = { class: "d-block text-muted" }, Zn = {
1698
1831
  key: 2,
1699
1832
  class: "row g-3"
1700
- }, Ln = { class: "min-w-0" }, Rn = { class: "fw-medium text-truncate" }, zn = { class: "text-muted d-block text-truncate" }, Bn = ["value"], Vn = ["value"], Hn = ["value"], Un = {
1833
+ }, Qn = { class: "min-w-0" }, $n = { class: "fw-medium text-truncate" }, er = { class: "text-muted d-block text-truncate" }, tr = ["value"], nr = ["value"], rr = ["value"], ir = {
1701
1834
  key: 0,
1702
1835
  class: "col-12 col-md-6"
1703
- }, Wn = { class: "d-flex flex-wrap align-items-center gap-1" }, Gn = ["title"], Kn = { class: "text-muted" }, qn = {
1836
+ }, ar = { class: "d-flex flex-wrap align-items-center gap-1" }, or = ["title"], sr = { class: "text-muted" }, cr = {
1704
1837
  key: 1,
1705
1838
  class: "d-block text-truncate"
1706
- }, Jn = {
1839
+ }, lr = {
1707
1840
  key: 2,
1708
1841
  class: "text-muted d-block"
1709
- }, Yn = {
1842
+ }, ur = {
1710
1843
  key: 0,
1711
1844
  class: "mt-2 d-flex flex-column gap-2"
1712
- }, Xn = { class: "form-check mb-0 ms-3" }, Zn = ["id", "checked"], Qn = ["for"];
1713
- function $n(e, t, r, c, d, f) {
1845
+ }, dr = { class: "form-check mb-0 ms-3" }, fr = ["id", "checked"], pr = ["for"];
1846
+ function mr(e, t, r, c, d, f) {
1714
1847
  let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
1715
- return g(), o("div", hn, [
1848
+ return g(), o("div", An, [
1716
1849
  s("div", null, [
1717
1850
  t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
1718
- s("div", gn, [(g(!0), o(n, null, b(f.availableModes, (t) => (g(), o("button", {
1851
+ s("div", jn, [(g(!0), o(n, null, b(f.availableModes, (t) => (g(), o("button", {
1719
1852
  key: t.key,
1720
1853
  type: "button",
1721
1854
  class: m(["btn btn-sm", r.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
@@ -1723,19 +1856,19 @@ function $n(e, t, r, c, d, f) {
1723
1856
  }, [u(p, {
1724
1857
  icon: t.icon,
1725
1858
  class: "me-1"
1726
- }, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10, _n))), 128))]),
1727
- s("small", vn, C(f.currentMode?.aide), 1)
1859
+ }, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10, Mn))), 128))]),
1860
+ s("small", Nn, C(f.currentMode?.aide), 1)
1728
1861
  ]),
1729
- r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div", yn, [s("input", {
1862
+ r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div", Pn, [s("input", {
1730
1863
  id: `contrat-reclamant-${d.uid}`,
1731
1864
  class: "form-check-input",
1732
1865
  type: "checkbox",
1733
1866
  checked: r.contratReclamant,
1734
1867
  onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
1735
- }, null, 40, bn), s("label", {
1868
+ }, null, 40, Fn), s("label", {
1736
1869
  class: "form-check-label fs-7",
1737
1870
  for: `contrat-reclamant-${d.uid}`
1738
- }, " Contrat du réclamant ", 8, xn)])) : a("", !0), r.contratReclamant ? a("", !0) : (g(), o("div", Sn, [t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), u(h, {
1871
+ }, " Contrat du réclamant ", 8, In)])) : a("", !0), r.contratReclamant ? a("", !0) : (g(), o("div", Ln, [t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), u(h, {
1739
1872
  modelValue: f.selectedContrat,
1740
1873
  "onUpdate:modelValue": t[1] ||= (e) => f.selectedContrat = e,
1741
1874
  items: d.contratsTrouves,
@@ -1749,14 +1882,14 @@ function $n(e, t, r, c, d, f) {
1749
1882
  "debounce-delay": 0,
1750
1883
  onSearch: f.rechercherPlusTard
1751
1884
  }, {
1752
- options: E((e) => [s("div", Cn, [
1753
- s("div", wn, C(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
1754
- s("div", Tn, [
1755
- s("small", En, "N° " + C(e?.typeContrat) + "/" + C(e?.idContrat), 1),
1756
- e?.nbModules > 1 ? (g(), o("span", Dn, C(e.nbModules) + " modules", 1)) : a("", !0),
1757
- e?.estSorti ? (g(), o("span", On, "Sorti")) : a("", !0)
1885
+ options: E((e) => [s("div", Rn, [
1886
+ s("div", zn, C(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
1887
+ s("div", Bn, [
1888
+ s("small", Vn, "N° " + C(e?.typeContrat) + "/" + C(e?.idContrat), 1),
1889
+ e?.nbModules > 1 ? (g(), o("span", Hn, C(e.nbModules) + " modules", 1)) : a("", !0),
1890
+ e?.estSorti ? (g(), o("span", Un, C(e.dateSortie ? `Sorti le ${f.formatDate(e.dateSortie)}` : "Sorti"), 1)) : a("", !0)
1758
1891
  ]),
1759
- f.contratAdresse(e) ? (g(), o("small", kn, C(f.contratAdresse(e)), 1)) : a("", !0)
1892
+ f.contratAdresse(e) ? (g(), o("small", Wn, C(f.contratAdresse(e)), 1)) : a("", !0)
1760
1893
  ])]),
1761
1894
  _: 1
1762
1895
  }, 8, [
@@ -1768,7 +1901,7 @@ function $n(e, t, r, c, d, f) {
1768
1901
  "get-input-libelle",
1769
1902
  "onSearch"
1770
1903
  ])]))], 64)) : a("", !0),
1771
- r.cibleMode === "patrimoine" ? (g(), o("div", An, [t[9] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), s("div", jn, [(g(!0), o(n, null, b(f.portees, (t) => (g(), o("div", {
1904
+ r.cibleMode === "patrimoine" ? (g(), o("div", Gn, [t[9] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), s("div", Kn, [(g(!0), o(n, null, b(f.portees, (t) => (g(), o("div", {
1772
1905
  key: t.titre,
1773
1906
  class: "col-12 col-md-6"
1774
1907
  }, [s("button", {
@@ -1780,8 +1913,8 @@ function $n(e, t, r, c, d, f) {
1780
1913
  icon: t.icon,
1781
1914
  class: "fs-4",
1782
1915
  "fixed-width": ""
1783
- }, null, 8, ["icon"]), s("span", Nn, [s("span", Pn, C(t.titre), 1), s("small", Fn, C(t.aide), 1)])], 10, Mn)]))), 128))])])) : a("", !0),
1784
- r.cibleMode === "contrat" || r.cibleMode === "patrimoine" ? (g(), o("div", In, [s("div", { class: m(["col-12 d-flex flex-column gap-3", { "col-md-6": f.afficheModule }]) }, [r.cibleMode === "patrimoine" ? (g(), o(n, { key: 0 }, [
1916
+ }, null, 8, ["icon"]), s("span", Jn, [s("span", Yn, C(t.titre), 1), s("small", Xn, C(t.aide), 1)])], 10, qn)]))), 128))])])) : a("", !0),
1917
+ r.cibleMode === "contrat" || r.cibleMode === "patrimoine" ? (g(), o("div", Zn, [s("div", { class: m(["col-12 d-flex flex-column gap-3", { "col-md-6": f.afficheModule }]) }, [r.cibleMode === "patrimoine" ? (g(), o(n, { key: 0 }, [
1785
1918
  s("div", null, [t[10] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), u(h, {
1786
1919
  modelValue: f.selectedCommune,
1787
1920
  "onUpdate:modelValue": t[2] ||= (e) => f.selectedCommune = e,
@@ -1811,7 +1944,7 @@ function $n(e, t, r, c, d, f) {
1811
1944
  "input-size": "sm",
1812
1945
  "hide-choices": ""
1813
1946
  }, {
1814
- options: E((e) => [s("div", Ln, [s("div", Rn, C(e?.entree), 1), s("small", zn, C(e?.commune) + " — Programme " + C(e?.codeProgramme), 1)])]),
1947
+ options: E((e) => [s("div", Qn, [s("div", $n, C(e?.entree), 1), s("small", er, C(e?.commune) + " — Programme " + C(e?.codeProgramme), 1)])]),
1815
1948
  _: 1
1816
1949
  }, 8, [
1817
1950
  "modelValue",
@@ -1843,18 +1976,18 @@ function $n(e, t, r, c, d, f) {
1843
1976
  class: "form-control form-control-sm",
1844
1977
  disabled: "",
1845
1978
  value: r.patrimoine.commune ?? "—"
1846
- }, null, 8, Bn)]),
1979
+ }, null, 8, tr)]),
1847
1980
  s("div", null, [t[14] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), s("input", {
1848
1981
  class: "form-control form-control-sm",
1849
1982
  disabled: "",
1850
1983
  value: r.patrimoine.entree ?? "—"
1851
- }, null, 8, Vn)]),
1984
+ }, null, 8, nr)]),
1852
1985
  s("div", null, [t[15] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), s("input", {
1853
1986
  class: "form-control form-control-sm",
1854
1987
  disabled: "",
1855
1988
  value: r.patrimoine.etage ?? "—"
1856
- }, null, 8, Hn)])
1857
- ], 64))], 2), f.afficheModule ? (g(), o("div", Un, [
1989
+ }, null, 8, rr)])
1990
+ ], 64))], 2), f.afficheModule ? (g(), o("div", ir, [
1858
1991
  t[16] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
1859
1992
  u(h, {
1860
1993
  modelValue: f.selectedModule,
@@ -1876,12 +2009,12 @@ function $n(e, t, r, c, d, f) {
1876
2009
  title: "Autre adresse ou étage du même programme"
1877
2010
  })) : a("", !0),
1878
2011
  s("div", { class: m(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", f.isExit(e) ? "text-decoration-line-through" : ""]]) }, C(f.moduleLibelle(e)), 3),
1879
- s("div", Wn, [f.categorieLibelle(e) ? (g(), o("span", {
2012
+ s("div", ar, [f.categorieLibelle(e) ? (g(), o("span", {
1880
2013
  key: 0,
1881
2014
  class: "badge bg-info",
1882
2015
  title: e?.categorieModule
1883
- }, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, Gn)) : a("", !0), s("small", Kn, "N° " + C(e?.idModule), 1)]),
1884
- e?._autreLibelle ? (g(), o("small", qn, C(e._autreLibelle), 1)) : e?.etage == null ? a("", !0) : (g(), o("small", Jn, " Étage " + C(e.etage), 1))
2016
+ }, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, or)) : a("", !0), s("small", sr, "N° " + C(e?.idModule), 1)]),
2017
+ e?._autreLibelle ? (g(), o("small", cr, C(e._autreLibelle), 1)) : e?.etage == null ? a("", !0) : (g(), o("small", lr, " Étage " + C(e.etage), 1))
1885
2018
  ], 2)]),
1886
2019
  _: 1
1887
2020
  }, 8, [
@@ -1892,35 +2025,35 @@ function $n(e, t, r, c, d, f) {
1892
2025
  "filtering-function",
1893
2026
  "disabled"
1894
2027
  ]),
1895
- r.locataireActuelOption ? (g(), o("div", Yn, [s("div", { class: m(["alert d-flex align-items-start gap-2 py-2 px-3 mt-2 mb-0 fs-7", r.locataireActuelOption.reprendre ? "alert-warning" : "alert-secondary border"]) }, [u(p, {
2028
+ r.locataireActuelOption ? (g(), o("div", ur, [s("div", { class: m(["alert d-flex align-items-start gap-2 py-2 px-3 mt-2 mb-0 fs-7", r.locataireActuelOption.reprendre ? "alert-warning" : "alert-secondary border"]) }, [u(p, {
1896
2029
  icon: "circle-info",
1897
2030
  class: "mt-1"
1898
- }), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div", Xn, [s("input", {
2031
+ }), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div", dr, [s("input", {
1899
2032
  id: `locataire-actuel-${d.uid}`,
1900
2033
  class: "form-check-input",
1901
2034
  type: "checkbox",
1902
2035
  checked: r.locataireActuelOption.reprendre,
1903
2036
  onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
1904
- }, null, 40, Zn), s("label", {
2037
+ }, null, 40, fr), s("label", {
1905
2038
  class: "form-check-label fs-7",
1906
2039
  for: `locataire-actuel-${d.uid}`
1907
- }, " Rattacher au locataire actuel du module ", 8, Qn)])])) : a("", !0)
2040
+ }, " Rattacher au locataire actuel du module ", 8, pr)])])) : a("", !0)
1908
2041
  ])) : a("", !0)])) : a("", !0)
1909
2042
  ]);
1910
2043
  }
1911
2044
  //#endregion
1912
2045
  //#region src/components/EtapeCibleBlock.vue
1913
- var er = {
2046
+ var hr = {
1914
2047
  name: "EtapeCibleBlock",
1915
2048
  components: {
1916
2049
  AmsomOverlay: t,
1917
- CiblePickerBlock: /* @__PURE__ */ F(mn, [["render", $n]])
2050
+ CiblePickerBlock: /* @__PURE__ */ z(kn, [["render", mr]])
1918
2051
  },
1919
2052
  setup() {
1920
2053
  return {
1921
- draft: P(),
1922
- data: K(),
1923
- options: Y()
2054
+ draft: R(),
2055
+ data: J(),
2056
+ options: Z()
1924
2057
  };
1925
2058
  },
1926
2059
  computed: {
@@ -2020,32 +2153,32 @@ var er = {
2020
2153
  e === "contrat" ? this.draft.prefillFromModule(t, this.mainModule) : this.mainModule && (this.draft.prefillFromModule(t, this.mainModule), this.mainModule.idCommune != null && await this.data.loadAdresses(this.mainModule.idCommune), this.mainModule.codeProgramme != null && await this.data.loadModulesOfProgramme(this.mainModule.codeProgramme));
2021
2154
  }
2022
2155
  }
2023
- }, tr = { class: "d-flex flex-column gap-3" }, nr = {
2156
+ }, gr = { class: "d-flex flex-column gap-3" }, _r = {
2024
2157
  key: 0,
2025
2158
  class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
2026
- }, rr = { class: "fs-7" }, ir = {
2159
+ }, vr = { class: "fs-7" }, yr = {
2027
2160
  key: 1,
2028
2161
  class: "d-flex flex-column gap-1"
2029
- }, ar = {
2162
+ }, br = {
2030
2163
  key: 0,
2031
2164
  class: "text-muted me-1"
2032
- }, or = { class: "d-flex align-items-center gap-2" }, sr = { class: "fw-medium fs-7" }, cr = { class: "form-check form-switch mb-0" }, lr = [
2165
+ }, xr = { class: "d-flex align-items-center gap-2" }, Sr = { class: "fw-medium fs-7" }, Cr = { class: "form-check form-switch mb-0" }, wr = [
2033
2166
  "id",
2034
2167
  "checked",
2035
2168
  "onChange"
2036
- ], ur = ["for"], dr = {
2169
+ ], Tr = ["for"], Er = {
2037
2170
  key: 0,
2038
2171
  class: "mt-2"
2039
2172
  };
2040
- function fr(e, t, r, c, d, f) {
2173
+ function Dr(e, t, r, c, d, f) {
2041
2174
  let m = S("font-awesome-icon"), h = S("cible-picker-block"), _ = S("amsom-overlay");
2042
2175
  return g(), i(_, { loading: c.data.isLoading }, {
2043
- default: E(() => [s("div", tr, [
2044
- f.motifLibelle ? (g(), o("div", nr, [u(m, {
2176
+ default: E(() => [s("div", gr, [
2177
+ f.motifLibelle ? (g(), o("div", _r, [u(m, {
2045
2178
  icon: "tag",
2046
2179
  class: "text-primary"
2047
- }), s("span", rr, [t[9] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), l(C(f.motifLibelle), 1)])])) : a("", !0),
2048
- f.cibleFigee ? (g(), o("div", ir, [(g(!0), o(n, null, b(c.draft.draft.lignes, (e, t) => (g(), o("span", {
2180
+ }), s("span", vr, [t[9] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), l(C(f.motifLibelle), 1)])])) : a("", !0),
2181
+ f.cibleFigee ? (g(), o("div", yr, [(g(!0), o(n, null, b(c.draft.draft.lignes, (e, t) => (g(), o("span", {
2049
2182
  key: t,
2050
2183
  class: "fs-7"
2051
2184
  }, [
@@ -2053,7 +2186,7 @@ function fr(e, t, r, c, d, f) {
2053
2186
  icon: "location-dot",
2054
2187
  class: "text-primary me-2"
2055
2188
  }),
2056
- f.lignesAssociees.length ? (g(), o("span", ar, C(t === 0 ? f.motifLibelle : e.libelle) + " : ", 1)) : a("", !0),
2189
+ f.lignesAssociees.length ? (g(), o("span", br, C(t === 0 ? f.motifLibelle : e.libelle) + " : ", 1)) : a("", !0),
2057
2190
  l(" " + C(c.draft.cibleResume(e)), 1)
2058
2191
  ]))), 128))])) : (g(), i(h, p({ key: 2 }, f.pickerProps(f.lignePrincipale), {
2059
2192
  onChangeMode: t[0] ||= (e) => f.onChangeMode(e),
@@ -2073,16 +2206,16 @@ function fr(e, t, r, c, d, f) {
2073
2206
  ], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, t) => (g(), o("div", {
2074
2207
  key: e.idMotif,
2075
2208
  class: "border rounded p-2"
2076
- }, [s("div", or, [s("span", sr, C(e.libelle), 1), s("div", cr, [s("input", {
2209
+ }, [s("div", xr, [s("span", Sr, C(e.libelle), 1), s("div", Cr, [s("input", {
2077
2210
  id: `memecible-${e.idMotif}`,
2078
2211
  class: "form-check-input",
2079
2212
  type: "checkbox",
2080
2213
  checked: !e.patrimoine,
2081
2214
  onChange: (e) => c.draft.toggleCibleOverride(t + 1)
2082
- }, null, 40, lr), s("label", {
2215
+ }, null, 40, wr), s("label", {
2083
2216
  class: "form-check-label fs-7",
2084
2217
  for: `memecible-${e.idMotif}`
2085
- }, " Même cible que la ligne principale ", 8, ur)])]), e.patrimoine ? (g(), o("div", dr, [u(h, p({ ref_for: !0 }, f.pickerProps(e), {
2218
+ }, " Même cible que la ligne principale ", 8, Tr)])]), e.patrimoine ? (g(), o("div", Er, [u(h, p({ ref_for: !0 }, f.pickerProps(e), {
2086
2219
  onChangeMode: (e) => f.onChangeMode(e, t + 1),
2087
2220
  onSelectCommune: (e) => f.onSelectCommune(e, t + 1),
2088
2221
  onSelectAdresse: (e) => f.onSelectAdresse(e, t + 1),
@@ -2107,9 +2240,9 @@ function fr(e, t, r, c, d, f) {
2107
2240
  _: 1
2108
2241
  }, 8, ["loading"]);
2109
2242
  }
2110
- var pr = /*#__PURE__*/ F(er, [["render", fr]]), mr = {
2243
+ var Or = /*#__PURE__*/ z(hr, [["render", Dr]]), kr = {
2111
2244
  name: "LigneDocumentBlock",
2112
- components: { AmsomUploadFile: se },
2245
+ components: { AmsomUploadFile: ce },
2113
2246
  props: {
2114
2247
  index: {
2115
2248
  type: Number,
@@ -2126,7 +2259,7 @@ var pr = /*#__PURE__*/ F(er, [["render", fr]]), mr = {
2126
2259
  },
2127
2260
  emits: ["update"]
2128
2261
  };
2129
- function hr(e, t, n, r, i, a) {
2262
+ function Ar(e, t, n, r, i, a) {
2130
2263
  let c = S("amsom-upload-file");
2131
2264
  return g(), o("div", null, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Document", -1), u(c, {
2132
2265
  "model-value": n.fichier,
@@ -2142,23 +2275,12 @@ function hr(e, t, n, r, i, a) {
2142
2275
  "read-only"
2143
2276
  ])]);
2144
2277
  }
2145
- var gr = /*#__PURE__*/ F(mr, [["render", hr]]);
2146
- //#endregion
2147
- //#region src/utils/date.js
2148
- function _r(e) {
2149
- return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
2150
- }
2151
- function vr(e) {
2152
- return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
2153
- }
2154
- //#endregion
2155
- //#region src/components/LigneDetailBlock.vue
2156
- var yr = 4e3, br = {
2278
+ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
2157
2279
  name: "LigneDetailBlock",
2158
2280
  components: {
2159
- AmsomAutocomplete: O,
2160
- AmsomTextarea: oe,
2161
- LigneDocumentBlock: gr
2281
+ AmsomAutocomplete: D,
2282
+ AmsomTextarea: se,
2283
+ LigneDocumentBlock: jr
2162
2284
  },
2163
2285
  props: { index: {
2164
2286
  type: Number,
@@ -2166,12 +2288,12 @@ var yr = 4e3, br = {
2166
2288
  } },
2167
2289
  setup() {
2168
2290
  return {
2169
- draft: P(),
2170
- data: K()
2291
+ draft: R(),
2292
+ data: J()
2171
2293
  };
2172
2294
  },
2173
2295
  computed: {
2174
- descriptionMaxLength: () => yr,
2296
+ descriptionMaxLength: () => Mr,
2175
2297
  isPrincipale() {
2176
2298
  return this.index === 0;
2177
2299
  },
@@ -2189,64 +2311,64 @@ var yr = 4e3, br = {
2189
2311
  }
2190
2312
  },
2191
2313
  methods: {
2192
- timestampToDateInput: _r,
2193
- dateInputToTimestamp: vr,
2314
+ timestampToDateInput: lt,
2315
+ dateInputToTimestamp: ut,
2194
2316
  responsableLibelle(e) {
2195
2317
  let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
2196
2318
  return t ? `${t.prenom} ${t.nom}` : "";
2197
2319
  },
2198
2320
  filterCollaborateurs({ search: e, items: t }) {
2199
- let n = (X(e) ?? "").trim();
2200
- return n ? t.filter((e) => (X(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
2321
+ let n = ($(e) ?? "").trim();
2322
+ return n ? t.filter((e) => ($(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
2201
2323
  }
2202
2324
  }
2203
- }, xr = { class: "d-flex flex-column gap-2" }, Sr = { class: "d-flex align-items-center gap-2 mb-1" }, Cr = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, wr = {
2325
+ }, Pr = { class: "d-flex flex-column gap-2" }, Fr = { class: "d-flex align-items-center gap-2 mb-1" }, Ir = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, Lr = {
2204
2326
  key: 0,
2205
2327
  class: "ms-1 text-danger"
2206
- }, Tr = {
2328
+ }, Rr = {
2207
2329
  key: 0,
2208
2330
  class: "form-check form-switch mb-0"
2209
- }, Er = [
2331
+ }, zr = [
2210
2332
  "id",
2211
2333
  "checked",
2212
2334
  "disabled"
2213
- ], Dr = ["for"], Or = {
2335
+ ], Br = ["for"], Vr = {
2214
2336
  key: 1,
2215
2337
  class: "text-muted d-block",
2216
2338
  style: { "white-space": "pre-line" }
2217
- }, kr = { class: "row g-3" }, Ar = { class: "col-6" }, jr = { class: "d-flex align-items-center gap-2 mb-1" }, Mr = {
2339
+ }, Hr = { class: "row g-3" }, Ur = { class: "col-6" }, Wr = { class: "d-flex align-items-center gap-2 mb-1" }, Gr = {
2218
2340
  key: 0,
2219
2341
  class: "form-check form-switch mb-0"
2220
- }, Nr = [
2342
+ }, Kr = [
2221
2343
  "id",
2222
2344
  "checked",
2223
2345
  "disabled"
2224
- ], Pr = ["for"], Fr = ["value"], Ir = {
2346
+ ], qr = ["for"], Jr = ["value"], Yr = {
2225
2347
  key: 1,
2226
2348
  class: "text-muted d-block"
2227
- }, Lr = {
2349
+ }, Xr = {
2228
2350
  key: 0,
2229
2351
  class: "text-muted d-block"
2230
- }, Rr = { class: "min-w-0" }, zr = { class: "fw-medium text-truncate" }, Br = {
2352
+ }, Zr = { class: "min-w-0" }, Qr = { class: "fw-medium text-truncate" }, $r = {
2231
2353
  key: 0,
2232
2354
  class: "text-muted d-block"
2233
- }, Vr = {
2355
+ }, ei = {
2234
2356
  key: 2,
2235
2357
  class: "text-muted"
2236
- }, Hr = { class: "col-12 col-md-6" };
2237
- function Ur(e, t, n, r, c, d) {
2358
+ }, ti = { class: "col-12 col-md-6" };
2359
+ function ni(e, t, n, r, c, d) {
2238
2360
  let f = S("amsom-textarea"), p = S("amsom-autocomplete"), m = S("ligne-document-block");
2239
- return g(), o("div", xr, [s("div", null, [s("div", Sr, [s("label", Cr, [t[6] ||= l(" Description", -1), d.isPrincipale ? (g(), o("span", wr, "*")) : a("", !0)]), d.isPrincipale ? a("", !0) : (g(), o("div", Tr, [s("input", {
2361
+ return g(), o("div", Pr, [s("div", null, [s("div", Fr, [s("label", Ir, [t[6] ||= l(" Description", -1), d.isPrincipale ? (g(), o("span", Lr, "*")) : a("", !0)]), d.isPrincipale ? a("", !0) : (g(), o("div", Rr, [s("input", {
2240
2362
  id: `memedetail-${d.ligne.idMotif}`,
2241
2363
  class: "form-check-input",
2242
2364
  type: "checkbox",
2243
2365
  checked: d.ligne.description == null,
2244
2366
  disabled: r.draft.isReadonly("description"),
2245
2367
  onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
2246
- }, null, 40, Er), s("label", {
2368
+ }, null, 40, zr), s("label", {
2247
2369
  class: "form-check-label fs-7",
2248
2370
  for: `memedetail-${d.ligne.idMotif}`
2249
- }, " Même description ", 8, Dr)]))]), !r.draft.isReadonly("description") && (d.isPrincipale || d.ligne.description != null) ? (g(), i(f, {
2371
+ }, " Même description ", 8, Br)]))]), !r.draft.isReadonly("description") && (d.isPrincipale || d.ligne.description != null) ? (g(), i(f, {
2250
2372
  key: 0,
2251
2373
  "model-value": d.ligne.description,
2252
2374
  "input-size": "sm",
@@ -2259,25 +2381,25 @@ function Ur(e, t, n, r, c, d) {
2259
2381
  "rows",
2260
2382
  "maxlength",
2261
2383
  "placeholder"
2262
- ])) : (g(), o("small", Or, C((d.ligne.description ?? d.lignePrincipale.description) || "—"), 1))]), s("div", kr, [s("div", Ar, [s("div", null, [s("div", jr, [t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), d.isPrincipale ? a("", !0) : (g(), o("div", Mr, [s("input", {
2384
+ ])) : (g(), o("small", Vr, C((d.ligne.description ?? d.lignePrincipale.description) || "—"), 1))]), s("div", Hr, [s("div", Ur, [s("div", null, [s("div", Wr, [t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), d.isPrincipale ? a("", !0) : (g(), o("div", Gr, [s("input", {
2263
2385
  id: `memedate-${d.ligne.idMotif}`,
2264
2386
  class: "form-check-input",
2265
2387
  type: "checkbox",
2266
2388
  checked: !d.ligne.dateFaitsOverride,
2267
2389
  disabled: r.draft.isReadonly("dateFaits"),
2268
2390
  onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
2269
- }, null, 40, Nr), s("label", {
2391
+ }, null, 40, Kr), s("label", {
2270
2392
  class: "form-check-label fs-7",
2271
2393
  for: `memedate-${d.ligne.idMotif}`
2272
- }, " Même date ", 8, Pr)]))]), !r.draft.isReadonly("dateFaits") && (d.isPrincipale || d.ligne.dateFaitsOverride) ? (g(), o("input", {
2394
+ }, " Même date ", 8, qr)]))]), !r.draft.isReadonly("dateFaits") && (d.isPrincipale || d.ligne.dateFaitsOverride) ? (g(), o("input", {
2273
2395
  key: 0,
2274
2396
  value: d.timestampToDateInput(d.ligne.dateFaits),
2275
2397
  type: "date",
2276
2398
  class: "form-control form-control-sm",
2277
2399
  onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, d.dateInputToTimestamp(e.target.value))
2278
- }, null, 40, Fr)) : (g(), o("small", Ir, C(d.timestampToDateInput(d.dateFaits) || "—"), 1))]), s("div", null, [
2400
+ }, null, 40, Jr)) : (g(), o("small", Yr, C(d.timestampToDateInput(d.dateFaits) || "—"), 1))]), s("div", null, [
2279
2401
  t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
2280
- r.draft.isReadonly("responsable") ? (g(), o("small", Lr, C(d.responsableLibelle(d.ligne.responsable) || "Déterminé automatiquement"), 1)) : (g(), i(p, {
2402
+ r.draft.isReadonly("responsable") ? (g(), o("small", Xr, C(d.responsableLibelle(d.ligne.responsable) || "Déterminé automatiquement"), 1)) : (g(), i(p, {
2281
2403
  key: 1,
2282
2404
  "model-value": d.ligne.responsable,
2283
2405
  items: d.collaborateurs,
@@ -2289,7 +2411,7 @@ function Ur(e, t, n, r, c, d) {
2289
2411
  "hide-choices": "",
2290
2412
  "onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
2291
2413
  }, {
2292
- options: E((e) => [s("div", Rr, [s("div", zr, C(e?.prenom) + " " + C(e?.nom), 1), e?.service ? (g(), o("small", Br, C(e.service), 1)) : a("", !0)])]),
2414
+ options: E((e) => [s("div", Zr, [s("div", Qr, C(e?.prenom) + " " + C(e?.nom), 1), e?.service ? (g(), o("small", $r, C(e.service), 1)) : a("", !0)])]),
2293
2415
  _: 1
2294
2416
  }, 8, [
2295
2417
  "model-value",
@@ -2298,8 +2420,8 @@ function Ur(e, t, n, r, c, d) {
2298
2420
  "get-input-libelle",
2299
2421
  "filtering-function"
2300
2422
  ])),
2301
- d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small", Vr, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : a("", !0)
2302
- ])]), s("div", Hr, [u(m, {
2423
+ d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small", ei, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : a("", !0)
2424
+ ])]), s("div", ti, [u(m, {
2303
2425
  index: n.index,
2304
2426
  fichier: d.ligne.fichier,
2305
2427
  readonly: r.draft.isReadonly("fichier"),
@@ -2312,16 +2434,16 @@ function Ur(e, t, n, r, c, d) {
2312
2434
  }
2313
2435
  //#endregion
2314
2436
  //#region src/components/EtapeDetailsBlock.vue
2315
- var Wr = {
2437
+ var ri = {
2316
2438
  name: "EtapeDetailsBlock",
2317
2439
  components: {
2318
2440
  AmsomOverlay: t,
2319
- LigneDetailBlock: /* @__PURE__ */ F(br, [["render", Ur]])
2441
+ LigneDetailBlock: /* @__PURE__ */ z(Nr, [["render", ni]])
2320
2442
  },
2321
2443
  setup() {
2322
2444
  return {
2323
- draft: P(),
2324
- data: K()
2445
+ draft: R(),
2446
+ data: J()
2325
2447
  };
2326
2448
  },
2327
2449
  computed: {
@@ -2372,22 +2494,22 @@ var Wr = {
2372
2494
  }
2373
2495
  }
2374
2496
  }
2375
- }, Gr = { class: "d-flex flex-column gap-3" }, Kr = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, qr = {
2497
+ }, ii = { class: "d-flex flex-column gap-3" }, ai = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, oi = {
2376
2498
  key: 0,
2377
2499
  class: "fs-7"
2378
- }, Jr = { class: "fs-7" }, Yr = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, Xr = { class: "fs-7" }, Zr = { class: "fs-7" };
2379
- function Qr(e, t, r, c, d, f) {
2500
+ }, si = { class: "fs-7" }, ci = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, li = { class: "fs-7" }, ui = { class: "fs-7" };
2501
+ function di(e, t, r, c, d, f) {
2380
2502
  let p = S("font-awesome-icon"), m = S("ligne-detail-block"), h = S("amsom-overlay");
2381
2503
  return g(), i(h, { loading: c.data.isLoading && !c.data.cache.collaborateurs }, {
2382
- default: E(() => [s("div", Gr, [
2383
- s("div", Kr, [f.motifLibelle ? (g(), o("span", qr, [
2504
+ default: E(() => [s("div", ii, [
2505
+ s("div", ai, [f.motifLibelle ? (g(), o("span", oi, [
2384
2506
  u(p, {
2385
2507
  icon: "tag",
2386
2508
  class: "text-primary me-2"
2387
2509
  }),
2388
2510
  t[0] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
2389
2511
  l(C(f.motifLibelle), 1)
2390
- ])) : a("", !0), s("span", Jr, [
2512
+ ])) : a("", !0), s("span", si, [
2391
2513
  u(p, {
2392
2514
  icon: "location-dot",
2393
2515
  class: "text-primary me-2"
@@ -2403,14 +2525,14 @@ function Qr(e, t, r, c, d, f) {
2403
2525
  ], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, n) => (g(), o("div", {
2404
2526
  key: e.idMotif,
2405
2527
  class: "border rounded p-2 d-flex flex-column gap-2"
2406
- }, [s("div", Yr, [s("span", Xr, [
2528
+ }, [s("div", ci, [s("span", li, [
2407
2529
  u(p, {
2408
2530
  icon: "tag",
2409
2531
  class: "text-primary me-2"
2410
2532
  }),
2411
2533
  t[2] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
2412
2534
  l(" " + C(e.libelle), 1)
2413
- ]), s("span", Zr, [
2535
+ ]), s("span", ui, [
2414
2536
  u(p, {
2415
2537
  icon: "location-dot",
2416
2538
  class: "text-primary me-2"
@@ -2424,15 +2546,15 @@ function Qr(e, t, r, c, d, f) {
2424
2546
  }
2425
2547
  //#endregion
2426
2548
  //#region src/components/StepperBlock.vue
2427
- var $r = {
2549
+ var fi = {
2428
2550
  name: "StepperBlock",
2429
2551
  components: {
2430
- AmsomHorizontalStepper: re,
2552
+ AmsomHorizontalStepper: ie,
2431
2553
  AmsomOverlay: t,
2432
- EtapeReclamantBlock: kt,
2433
- EtapeCategorieBlock: ln,
2434
- EtapeCibleBlock: pr,
2435
- EtapeDetailsBlock: /* @__PURE__ */ F(Wr, [["render", Qr]])
2554
+ EtapeReclamantBlock: Kt,
2555
+ EtapeCategorieBlock: wn,
2556
+ EtapeCibleBlock: Or,
2557
+ EtapeDetailsBlock: /* @__PURE__ */ z(ri, [["render", di]])
2436
2558
  },
2437
2559
  props: {
2438
2560
  step: {
@@ -2451,9 +2573,9 @@ var $r = {
2451
2573
  ],
2452
2574
  setup() {
2453
2575
  return {
2454
- draft: P(),
2455
- data: K(),
2456
- options: Y()
2576
+ draft: R(),
2577
+ data: J(),
2578
+ options: Z()
2457
2579
  };
2458
2580
  },
2459
2581
  computed: {
@@ -2491,11 +2613,14 @@ var $r = {
2491
2613
  let e = this.lignePrincipale.idMotif;
2492
2614
  return e ? this.data.cache.motifs?.find((t) => t.id === e)?.aide ?? null : null;
2493
2615
  },
2616
+ provenanceValid() {
2617
+ return this.options.provenances.some((e) => e.id === this.draft.draft.provenance);
2618
+ },
2494
2619
  canGoNext() {
2495
2620
  return this.gatePassed(this.currentKey);
2496
2621
  },
2497
2622
  canCreer() {
2498
- return !!this.lignePrincipale.idMotif && !!this.draft.draft.provenance && this.draft.ciblesValid && this.draft.detailsValid && this.draft.reclamantSelectionne != null;
2623
+ return !!this.lignePrincipale.idMotif && this.provenanceValid && this.draft.ciblesValid && this.draft.detailsValid && this.draft.reclamantSelectionne != null;
2499
2624
  },
2500
2625
  stepperSteps() {
2501
2626
  return this.steps.map((e, t) => {
@@ -2524,7 +2649,7 @@ var $r = {
2524
2649
  } },
2525
2650
  methods: {
2526
2651
  gatePassed(e) {
2527
- return e === "reclamant" ? this.draft.reclamantSelectionne != null && !!this.draft.draft.provenance : e === "categorie" ? !!this.lignePrincipale.idMotif && !!this.draft.draft.provenance : e !== "cible" || this.draft.ciblesValid;
2652
+ return e === "reclamant" ? this.draft.reclamantSelectionne != null && this.provenanceValid : e === "categorie" ? !!this.lignePrincipale.idMotif && this.provenanceValid : e !== "cible" || this.draft.ciblesValid;
2528
2653
  },
2529
2654
  onStepClick(e) {
2530
2655
  e < this.step && this.$emit("update:step", e);
@@ -2544,25 +2669,25 @@ var $r = {
2544
2669
  }));
2545
2670
  }
2546
2671
  }
2547
- }, ei = { class: "d-flex flex-column gap-3" }, ti = {
2672
+ }, pi = { class: "d-flex flex-column gap-3" }, mi = {
2548
2673
  key: 0,
2549
2674
  class: "w-100 fs-6 fw-medium my-3 alert alert-info",
2550
2675
  style: { "white-space": "pre-line" }
2551
- }, ni = { style: { "min-height": "260px" } }, ri = { class: "d-flex justify-content-between" }, ii = { key: 1 }, ai = ["disabled"], oi = ["disabled"];
2552
- function si(e, t, n, r, f, p) {
2676
+ }, hi = { style: { "min-height": "260px" } }, gi = { class: "d-flex justify-content-between" }, _i = { key: 1 }, vi = ["disabled"], yi = ["disabled"];
2677
+ function bi(e, t, n, r, f, p) {
2553
2678
  let m = S("amsom-horizontal-stepper"), _ = S("font-awesome-icon"), v = S("etape-reclamant-block"), y = S("etape-categorie-block"), b = S("etape-cible-block"), ee = S("etape-details-block"), w = S("amsom-overlay");
2554
2679
  return g(), i(w, { loading: n.creating }, {
2555
- default: E(() => [s("div", ei, [
2680
+ default: E(() => [s("div", pi, [
2556
2681
  u(m, {
2557
2682
  steps: p.stepperSteps,
2558
2683
  size: "md",
2559
2684
  onStepClick: p.onStepClick
2560
2685
  }, null, 8, ["steps", "onStepClick"]),
2561
- p.aideMotif ? (g(), o("div", ti, [u(_, {
2686
+ p.aideMotif ? (g(), o("div", mi, [u(_, {
2562
2687
  icon: "circle-info",
2563
2688
  class: "text-info-emphasis me-2"
2564
2689
  }), s("span", null, C(p.aideMotif), 1)])) : a("", !0),
2565
- s("div", ni, [p.currentKey === "reclamant" ? (g(), i(v, {
2690
+ s("div", hi, [p.currentKey === "reclamant" ? (g(), i(v, {
2566
2691
  key: 0,
2567
2692
  premiere: n.step === 1
2568
2693
  }, c({ _: 2 }, [e.$slots.reclamant ? {
@@ -2573,14 +2698,14 @@ function si(e, t, n, r, f, p) {
2573
2698
  key: 1,
2574
2699
  premiere: n.step === 1
2575
2700
  }, null, 8, ["premiere"])) : p.currentKey === "cible" ? (g(), i(b, { key: 2 })) : p.currentKey === "details" ? (g(), i(ee, { key: 3 })) : a("", !0)]),
2576
- s("div", ri, [n.step > 1 ? (g(), o("button", {
2701
+ s("div", gi, [n.step > 1 ? (g(), o("button", {
2577
2702
  key: 0,
2578
2703
  class: "btn btn-sm btn-outline-secondary",
2579
2704
  onClick: t[0] ||= (...e) => p.goPrevious && p.goPrevious(...e)
2580
2705
  }, [u(_, {
2581
2706
  icon: "chevron-left",
2582
2707
  class: "me-1"
2583
- }), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span", ii)), n.step < p.steps.length ? (g(), o("button", {
2708
+ }), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span", _i)), n.step < p.steps.length ? (g(), o("button", {
2584
2709
  key: 2,
2585
2710
  class: "btn btn-sm btn-primary",
2586
2711
  disabled: !p.canGoNext,
@@ -2588,7 +2713,7 @@ function si(e, t, n, r, f, p) {
2588
2713
  }, [t[4] ||= l(" Suivant ", -1), u(_, {
2589
2714
  icon: "chevron-right",
2590
2715
  class: "ms-1"
2591
- })], 8, ai)) : (g(), o("button", {
2716
+ })], 8, vi)) : (g(), o("button", {
2592
2717
  key: 3,
2593
2718
  class: "btn btn-sm btn-success",
2594
2719
  disabled: !p.canCreer || n.creating,
@@ -2596,21 +2721,21 @@ function si(e, t, n, r, f, p) {
2596
2721
  }, [u(_, {
2597
2722
  icon: "check",
2598
2723
  class: "me-1"
2599
- }), t[5] ||= l(" Créer la sollicitation ", -1)], 8, oi))])
2724
+ }), t[5] ||= l(" Créer la sollicitation ", -1)], 8, yi))])
2600
2725
  ])]),
2601
2726
  _: 3
2602
2727
  }, 8, ["loading"]);
2603
2728
  }
2604
- var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n } = {}) => Pe("/v2/cresol/creer_sollicitation", e, {
2729
+ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n } = {}) => ze("/v2/cresol/creer_sollicitation", e, {
2605
2730
  signal: t,
2606
2731
  baseUrl: n
2607
- }), ui = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => Pe("/v2/cresol/upload_sollicitation_ged", {
2732
+ }), Ci = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => ze("/v2/cresol/upload_sollicitation_ged", {
2608
2733
  idSollicitation: e,
2609
2734
  pj: t
2610
2735
  }, {
2611
2736
  signal: n,
2612
2737
  baseUrl: r
2613
- }), Z = {
2738
+ }), wi = {
2614
2739
  modelValue: {
2615
2740
  type: Object,
2616
2741
  default: null
@@ -2629,10 +2754,28 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2629
2754
  "step"
2630
2755
  ].includes(e)
2631
2756
  },
2757
+ typesReclamant: {
2758
+ type: Array,
2759
+ default: null,
2760
+ validator: (e) => e.every((e) => M.includes(e))
2761
+ },
2762
+ typesReclamantExclus: {
2763
+ type: Array,
2764
+ default: () => [],
2765
+ validator: (e) => e.every((e) => M.includes(e))
2766
+ },
2767
+ provenances: {
2768
+ type: Array,
2769
+ default: () => [...de]
2770
+ },
2771
+ provenancesExclues: {
2772
+ type: Array,
2773
+ default: () => []
2774
+ },
2632
2775
  readonly: {
2633
2776
  type: [Boolean, Array],
2634
2777
  default: !1,
2635
- validator: (e) => typeof e == "boolean" || e.every((e) => M.includes(e))
2778
+ validator: (e) => typeof e == "boolean" || e.every((e) => I.includes(e))
2636
2779
  },
2637
2780
  modules: {
2638
2781
  type: Array,
@@ -2658,7 +2801,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2658
2801
  type: String,
2659
2802
  default: null
2660
2803
  }
2661
- }, di = Object.keys(Z), Q = [
2804
+ }, Ti = Object.keys(wi), Ei = [
2662
2805
  "update:modelValue",
2663
2806
  "reclamantChange",
2664
2807
  "motifChange",
@@ -2667,27 +2810,38 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2667
2810
  "created",
2668
2811
  "createError",
2669
2812
  "error"
2670
- ], fi = {
2813
+ ], Di = {
2671
2814
  name: "CreerSollicitationForm",
2672
2815
  components: {
2673
- AsideBlock: De,
2674
- StepperBlock: ci
2816
+ AsideBlock: Me,
2817
+ StepperBlock: xi
2675
2818
  },
2676
- props: { ...Z },
2677
- emits: [...Q],
2819
+ props: { ...wi },
2820
+ emits: [...Ei],
2678
2821
  setup(e, { emit: t }) {
2679
- let n = (e) => t("error", e), i = { baseUrl: w(e, "baseUrl") }, a = $e(Qe({
2822
+ let n = (e) => t("error", e), i = { baseUrl: w(e, "baseUrl") }, a = st(ot({
2680
2823
  onError: n,
2681
2824
  ...i
2682
- })), o = y(null), s = r(() => o.value ?? e.modules ?? []), c = be(ye({
2825
+ })), o = y(null), s = r(() => o.value ?? e.modules ?? []), c = Te(we({
2683
2826
  reclamants: r(() => e.reclamantMode === "step" ? [] : e.reclamants),
2684
2827
  modules: s,
2685
2828
  idModulePrefere: w(e, "idModule"),
2686
2829
  readonly: w(e, "readonly")
2687
2830
  }));
2688
- return jt(v({
2831
+ return ft(v({
2689
2832
  nomenclatureFilter: w(e, "nomenclatureFilter"),
2690
2833
  reclamantMode: w(e, "reclamantMode"),
2834
+ typesReclamant: r(() => (e.typesReclamant ?? M).filter((t) => !e.typesReclamantExclus.includes(t))),
2835
+ provenances: r(() => {
2836
+ let t = a.cache.provenances ?? [];
2837
+ return (e.provenances ?? t.map((e) => e.id)).filter((t) => !e.provenancesExclues.includes(t)).flatMap((e) => {
2838
+ let n = t.find((t) => t.id === e);
2839
+ return n ? [{
2840
+ ...n,
2841
+ icon: ue(e)
2842
+ }] : [];
2843
+ });
2844
+ }),
2691
2845
  modulesReclamant: s,
2692
2846
  ...i
2693
2847
  })), {
@@ -2729,7 +2883,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2729
2883
  let e = this.draft.reclamantSelectionne;
2730
2884
  this.$watch("draft.reclamantSelectionne", async (t) => {
2731
2885
  this.$emit("reclamantChange", t), await this.chargerModulesReclamant(t, e) && this.draft.syncReclamant();
2732
- }), this.$watch(() => JSON.stringify(this.motifChoisi), () => this.$emit("motifChange", this.motifChoisi)), this.data.loadNomenclature(), await this.chargerModulesReclamant(e, e) && this.draft.prefillCiblePrincipale();
2886
+ }), this.$watch(() => JSON.stringify(this.motifChoisi), () => this.$emit("motifChange", this.motifChoisi)), this.data.loadNomenclature(), this.data.loadProvenances(), await this.chargerModulesReclamant(e, e) && this.draft.prefillCiblePrincipale();
2733
2887
  },
2734
2888
  methods: {
2735
2889
  async chargerModulesReclamant(e, t) {
@@ -2749,10 +2903,10 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2749
2903
  if (!await this.autoriserCreation(e)) return;
2750
2904
  let t;
2751
2905
  try {
2752
- t = await li(e, this.requestOptions) ?? [];
2906
+ t = await Si(e, this.requestOptions) ?? [];
2753
2907
  } catch (t) {
2754
- if (B(t)) return;
2755
- let n = z(t);
2908
+ if (tt(t)) return;
2909
+ let n = U(t);
2756
2910
  this.$emit("createError", {
2757
2911
  error: t,
2758
2912
  message: n,
@@ -2802,7 +2956,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2802
2956
  message: t
2803
2957
  };
2804
2958
  };
2805
- return a?.id ? ui({
2959
+ return a?.id ? Ci({
2806
2960
  idSollicitation: a.id,
2807
2961
  pj: {
2808
2962
  name: n.name,
@@ -2813,18 +2967,18 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
2813
2967
  ...o,
2814
2968
  ok: !0,
2815
2969
  message: null
2816
- })).catch((e) => s(z(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
2970
+ })).catch((e) => s(U(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
2817
2971
  });
2818
2972
  return Promise.all(n);
2819
2973
  }
2820
2974
  }
2821
- }, pi = { class: "row g-3" }, mi = {
2975
+ }, Oi = { class: "row g-3" }, ki = {
2822
2976
  key: 0,
2823
2977
  class: "col-12 col-lg-4"
2824
2978
  };
2825
- function hi(e, t, n, r, i, l) {
2979
+ function Ai(e, t, n, r, i, l) {
2826
2980
  let f = S("aside-block"), p = S("stepper-block");
2827
- return g(), o("div", pi, [e.aside ? (g(), o("div", mi, [x(e.$slots, "aside", {}, () => [u(f, { "nb-similaires": e.nbSimilaires }, c({ _: 2 }, [e.$slots["aside-similaires"] ? {
2981
+ return g(), o("div", Oi, [e.aside ? (g(), o("div", ki, [x(e.$slots, "aside", {}, () => [u(f, { "nb-similaires": e.nbSimilaires }, c({ _: 2 }, [e.$slots["aside-similaires"] ? {
2828
2982
  name: "similaires",
2829
2983
  fn: E((t) => [x(e.$slots, "aside-similaires", h(d(t)))]),
2830
2984
  key: "0"
@@ -2848,14 +3002,14 @@ function hi(e, t, n, r, i, l) {
2848
3002
  "onSubmit"
2849
3003
  ])], 2)]);
2850
3004
  }
2851
- var $ = /*#__PURE__*/ F(fi, [["render", hi]]), gi = {
3005
+ var ji = /*#__PURE__*/ z(Di, [["render", Ai]]), Mi = {
2852
3006
  name: "CreerSollicitationModal",
2853
3007
  components: {
2854
3008
  AmsomModal: e,
2855
- CreerSollicitationForm: $
3009
+ CreerSollicitationForm: ji
2856
3010
  },
2857
3011
  props: {
2858
- ...Z,
3012
+ ...wi,
2859
3013
  titre: {
2860
3014
  type: String,
2861
3015
  default: "Nouvelle sollicitation"
@@ -2865,36 +3019,36 @@ var $ = /*#__PURE__*/ F(fi, [["render", hi]]), gi = {
2865
3019
  default: !0
2866
3020
  }
2867
3021
  },
2868
- emits: [...Q, "close"],
3022
+ emits: [...Ei, "close"],
2869
3023
  computed: {
2870
3024
  formProps() {
2871
- return Object.fromEntries(di.map((e) => [e, this[e]]));
3025
+ return Object.fromEntries(Ti.map((e) => [e, this[e]]));
2872
3026
  },
2873
3027
  formListeners() {
2874
- return Object.fromEntries(Q.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
3028
+ return Object.fromEntries(Ei.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
2875
3029
  }
2876
3030
  },
2877
3031
  methods: { onCreated(...e) {
2878
3032
  this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
2879
3033
  } }
2880
- }, _i = { class: "fw-medium fs-5" };
2881
- function vi(e, t, n, r, a, o) {
3034
+ }, Ni = { class: "fw-medium fs-5" };
3035
+ function Pi(e, t, n, r, a, o) {
2882
3036
  let l = S("creer-sollicitation-form"), f = S("amsom-modal");
2883
3037
  return g(), i(f, {
2884
3038
  "close-option": "",
2885
3039
  size: "xl",
2886
3040
  onClose: t[0] ||= (t) => e.$emit("close")
2887
3041
  }, {
2888
- default: E(() => [s("span", _i, C(n.titre), 1), u(l, p({ class: "pt-3" }, o.formProps, ee(o.formListeners), { onCreated: o.onCreated }), c({ _: 2 }, [b(e.$slots, (t, n) => ({
3042
+ default: E(() => [s("span", Ni, C(n.titre), 1), u(l, p({ class: "pt-3" }, o.formProps, ee(o.formListeners), { onCreated: o.onCreated }), c({ _: 2 }, [b(e.$slots, (t, n) => ({
2889
3043
  name: n,
2890
3044
  fn: E((t) => [x(e.$slots, n, h(d(t ?? {})))])
2891
3045
  }))]), 1040, ["onCreated"])]),
2892
3046
  _: 3
2893
3047
  });
2894
3048
  }
2895
- var yi = /*#__PURE__*/ F(gi, [["render", vi]]), bi = {
2896
- CreerSollicitationModal: yi,
2897
- CreerSollicitationForm: $
3049
+ var Fi = /*#__PURE__*/ z(Mi, [["render", Pi]]), Ii = {
3050
+ CreerSollicitationModal: Fi,
3051
+ CreerSollicitationForm: ji
2898
3052
  };
2899
3053
  //#endregion
2900
- export { $ as CreerSollicitationForm, yi as CreerSollicitationModal, le as DEFAULT_PROVENANCE_CONTACT, ce as PROVENANCES_CONTACT, M as READONLY_FIELDS, ke as configureCresol, bi as default, N as getDefaultDraft, j as getDefaultLigne, A as getDefaultPatrimoine, Ze as resetCresolCache };
3054
+ export { ji as CreerSollicitationForm, Fi as CreerSollicitationModal, fe as DEFAULT_PROVENANCE_CONTACT, de as PROVENANCES_CONTACT_DEFAUT, k as PROVENANCE_CONTACT_ICONS, I as READONLY_FIELDS, Pe as configureCresol, Ii as default, L as getDefaultDraft, F as getDefaultLigne, P as getDefaultPatrimoine, at as resetCresolCache };