@beam3_dev/api_module 0.0.47 → 0.0.49

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/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as b } from "luxon";
3
3
  import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
- function j() {
4
+ function R() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -67,9 +67,9 @@ async function re(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let n = b.now().year;
70
- const s = e, i = [], c = (a) => {
71
- for (let r in a)
72
- i.push({ date: r, comment: a[r] });
70
+ const s = e, i = [], r = (a) => {
71
+ for (let c in a)
72
+ i.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function ce(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((c) => c.json()).then((c) => {
84
+ r(c);
85
+ }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of i)
90
+ for (let c of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === b.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: b.fromISO(r.date).toISODate(),
96
- end: b.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + c.comment,
95
+ start: b.fromISO(c.date).toISODate(),
96
+ end: b.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
102
102
  }
103
103
  async function de(e, t, n = !0) {
104
104
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -145,14 +145,14 @@ async function fe(e, t = void 0, n = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: n,
153
153
  user: s,
154
154
  appsConfiguration: i,
155
- appConf: c
155
+ appConf: r
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
@@ -169,15 +169,15 @@ function ge(e, t, n) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, o, a) {
173
- const r = JSON.parse(c), d = r.data.map((l) => {
172
+ onComplete(r, o, a) {
173
+ const c = JSON.parse(r), d = c.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, r);
177
+ t && t(d, c);
178
178
  },
179
- onFailure(c, o) {
180
- const a = c;
179
+ onFailure(r, o) {
180
+ const a = r;
181
181
  a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
182
182
  }
183
183
  });
@@ -185,25 +185,25 @@ function ge(e, t, n) {
185
185
  function he(e, t = void 0, n = void 0) {
186
186
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  f(s, {
188
- onComplete(i, c, o) {
188
+ onComplete(i, r, o) {
189
189
  const a = JSON.parse(i);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(i, c) {
192
+ onFailure(i, r) {
193
193
  const o = i;
194
- o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
194
+ o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, n = void 0, s = void 0) {
199
199
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  f(i, {
201
- onComplete(c, o, a) {
202
- const r = JSON.parse(c);
203
- n && n(r);
201
+ onComplete(r, o, a) {
202
+ const c = JSON.parse(r);
203
+ n && n(c);
204
204
  },
205
- onFailure(c, o) {
206
- const a = c;
205
+ onFailure(r, o) {
206
+ const a = r;
207
207
  a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
208
208
  }
209
209
  });
@@ -213,14 +213,14 @@ const U = {
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, n = void 0, s = void 0) {
216
- const { space: i, currentUser: c } = e, a = `${i}${{
216
+ const { space: i, currentUser: r } = e, a = `${i}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, r = {
218
+ }.URIUGr}`, c = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
@@ -230,7 +230,7 @@ function _e(e, t, n = void 0, s = void 0) {
230
230
  f(a, {
231
231
  method: "POST",
232
232
  headers: U,
233
- data: JSON.stringify(r),
233
+ data: JSON.stringify(c),
234
234
  onComplete(d) {
235
235
  n && n(JSON.parse(d));
236
236
  },
@@ -242,7 +242,7 @@ function _e(e, t, n = void 0, s = void 0) {
242
242
  });
243
243
  }
244
244
  function ye(e, t, n = void 0, s = void 0) {
245
- const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
245
+ const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -260,13 +260,13 @@ function ye(e, t, n = void 0, s = void 0) {
260
260
  }
261
261
  });
262
262
  }
263
- function J(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
263
+ function E(e, t = void 0, n = void 0) {
264
+ const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${o}${a}`;
267
+ }, d = `${r}${o}${a}`;
268
268
  f(d, {
269
- OPTsH: r,
269
+ OPTsH: c,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -288,7 +288,7 @@ function we(e, t = void 0, n = void 0) {
288
288
  const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
289
  if (i && Object.keys(i).length > 0) {
290
290
  const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
291
- u.iam = S, u.UG = m, u.iamMember = h, J(
291
+ u.iam = S, u.UG = m, u.iamMember = h, E(
292
292
  e,
293
293
  (_) => {
294
294
  u.rules = _, t && t(u);
@@ -314,7 +314,7 @@ function Te(e, t) {
314
314
  });
315
315
  }
316
316
  function Ce(e, t, n, s = void 0, i = void 0) {
317
- const { space: c, tenant: o } = e, a = {
317
+ const { space: r, tenant: o } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
@@ -322,7 +322,7 @@ function Ce(e, t, n, s = void 0, i = void 0) {
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
324
  OPTsTenant: `tenant=dstenant:${o}`
325
- }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
325
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
326
326
  f(d, {
327
327
  headers: U,
328
328
  method: "PATCH",
@@ -337,7 +337,7 @@ function Ce(e, t, n, s = void 0, i = void 0) {
337
337
  });
338
338
  }
339
339
  function Oe(e, t, n, s = void 0, i = void 0) {
340
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
340
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
343
343
  headers: U,
@@ -369,15 +369,15 @@ function Ne(e, t, n = void 0, s = void 0) {
369
369
  }
370
370
  });
371
371
  }
372
- async function E(e, t = void 0, n = void 0, s = void 0) {
372
+ async function J(e, t = void 0, n = void 0, s = void 0) {
373
373
  const i = e.space;
374
374
  if (t === void 0) {
375
375
  console.log("Le paramètre docid est obligatoire");
376
376
  return;
377
377
  }
378
- const c = i + `/resources/v1/modeler/documents/${t}`;
379
- f(c, {
380
- onComplete(o, a, r) {
378
+ const r = i + `/resources/v1/modeler/documents/${t}`;
379
+ f(r, {
380
+ onComplete(o, a, c) {
381
381
  const d = JSON.parse(o);
382
382
  n && n(d);
383
383
  },
@@ -390,7 +390,7 @@ function k(e, t = void 0, n = void 0) {
390
390
  if (e.objID && e.objID !== "") {
391
391
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
392
392
  f(s, {
393
- onComplete(i, c, o) {
393
+ onComplete(i, r, o) {
394
394
  const a = JSON.parse(i);
395
395
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
396
396
  },
@@ -405,48 +405,44 @@ function C(e, t = void 0, n = void 0) {
405
405
  if (e.space) {
406
406
  const s = e.space + "/resources/v1/application/CSRF";
407
407
  f(s, {
408
- onComplete(i, c, o) {
408
+ onComplete(i, r, o) {
409
409
  const a = JSON.parse(i);
410
- t && t(a.csrf.value);
410
+ console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
411
411
  },
412
- onFailure(i, c, o) {
413
- n && n({ response: i, headers: c, xhr: o });
412
+ onFailure(i, r, o) {
413
+ n && n({ response: i, headers: r, xhr: o });
414
414
  }
415
415
  });
416
416
  } else
417
417
  n && n("ERROR : url du 3DSpace non défini.");
418
418
  }
419
- function D(e, t, n = void 0, s = void 0) {
420
- let i = e.space + `/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
419
+ function D(e, t = void 0, n = void 0) {
420
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
421
421
  k(
422
422
  e,
423
- (c) => {
424
- f(i, {
423
+ (i) => {
424
+ console.log("onComplete / ☠️ info => ", i), i.csrf.value === e.token && f(s, {
425
425
  method: "PUT",
426
426
  headers: {
427
- ENO_CSRF_TOKEN: e.token
427
+ ENO_CSRF_TOKEN: i.csrf.value === e.token ? i.csrf.value : e.token
428
428
  },
429
- onComplete(o) {
430
- let a = JSON.parse(o);
431
- if (a.success === !0)
432
- try {
433
- const r = a.data[0].dataelements.ticketURL;
434
- n && n(r);
435
- } catch (r) {
436
- s && s(r);
437
- }
429
+ onComplete(r) {
430
+ let o = JSON.parse(r);
431
+ console.log("_3DSpace_file_url() / ☠️ info => ", o);
432
+ const a = o.data[0].dataelements.ticketURL;
433
+ e.ticket = a, t && t(a);
438
434
  },
439
- onFailure(o, a) {
440
- console.log("☠️ error => ", o, a), s && s(o, a);
435
+ onFailure(r, o) {
436
+ console.log("☠️ error => ", r, o), n && n(r, o);
441
437
  }
442
438
  });
443
439
  },
444
- s
440
+ n
445
441
  );
446
442
  }
447
443
  function be(e, t, n, s = void 0, i = void 0) {
448
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
449
- n || (n = e.token), f(c, {
444
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
445
+ n || (n = e.token), f(r, {
450
446
  method: "PUT",
451
447
  headers: {
452
448
  ENO_CSRF_TOKEN: n
@@ -455,10 +451,10 @@ function be(e, t, n, s = void 0, i = void 0) {
455
451
  let a = JSON.parse(o);
456
452
  if (console.log("☠️ info => ", a), a.success === !0)
457
453
  try {
458
- const r = a.data[0].dataelements.ticketURL;
459
- s && s(r);
460
- } catch (r) {
461
- i && i(r);
454
+ const c = a.data[0].dataelements.ticketURL;
455
+ s && s(c);
456
+ } catch (c) {
457
+ i && i(c);
462
458
  }
463
459
  },
464
460
  onFailure(o) {
@@ -466,7 +462,7 @@ function be(e, t, n, s = void 0, i = void 0) {
466
462
  }
467
463
  });
468
464
  }
469
- function G(e, t, n, s, i, c = void 0, o = void 0) {
465
+ function G(e, t, n, s, i, r = void 0, o = void 0) {
470
466
  k(
471
467
  e,
472
468
  t,
@@ -478,18 +474,18 @@ function G(e, t, n, s, i, c = void 0, o = void 0) {
478
474
  s,
479
475
  i,
480
476
  a.csrf.value,
481
- c,
477
+ r,
482
478
  o
483
479
  );
484
480
  }
485
481
  );
486
482
  }
487
- function K(e, t, n, s, i, c, o = void 0, a = void 0) {
488
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
489
- f(r, {
483
+ function K(e, t, n, s, i, r, o = void 0, a = void 0) {
484
+ const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
485
+ f(c, {
490
486
  method: "PUT",
491
487
  headers: {
492
- ENO_CSRF_TOKEN: c
488
+ ENO_CSRF_TOKEN: r
493
489
  },
494
490
  onComplete(d, l, p) {
495
491
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
@@ -499,7 +495,7 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
499
495
  let S = "temp_" + Date.now(), _ = {
500
496
  method: "PUT",
501
497
  headers: {
502
- ENO_CSRF_TOKEN: c
498
+ ENO_CSRF_TOKEN: r
503
499
  },
504
500
  data: JSON.stringify({
505
501
  data: [
@@ -539,12 +535,12 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
539
535
  }
540
536
  });
541
537
  }
542
- async function ke(e, t, n, s, i = void 0, c = void 0) {
543
- const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
538
+ async function ke(e, t, n, s, i = void 0, r = void 0) {
539
+ const o = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
544
540
  type: "text/plain"
545
541
  }), p = {
546
542
  url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
547
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
543
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
548
544
  };
549
545
  if (!o && o !== "") {
550
546
  console.log("le store._3DSpace est vide");
@@ -562,7 +558,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
562
558
  method: "POST",
563
559
  data: d,
564
560
  onComplete(T) {
565
- if (r !== "" && a !== "") {
561
+ if (c !== "" && a !== "") {
566
562
  const F = {
567
563
  method: "POST",
568
564
  headers: {
@@ -589,7 +585,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
589
585
  }
590
586
  ]
591
587
  },
592
- tempId: j()
588
+ tempId: R()
593
589
  }
594
590
  ]
595
591
  }),
@@ -598,7 +594,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
598
594
  onComplete: _,
599
595
  onFailure: y
600
596
  };
601
- r !== "" && f(p.url_Post, F);
597
+ c !== "" && f(p.url_Post, F);
602
598
  } else
603
599
  console.warn("le store est vide");
604
600
  },
@@ -609,21 +605,21 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
609
605
  }
610
606
  function y(T, F) {
611
607
  console.log("Erreur -- response ", T, `
612
- headers `, F), c && c(T);
608
+ headers `, F), r && r(T);
613
609
  }
614
610
  f(h.ticketURL, S);
615
611
  }
616
612
  });
617
613
  }
618
- function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
614
+ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
619
615
  const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
620
616
  f(o, {
621
617
  method: "GET",
622
618
  onComplete(a) {
623
- const r = JSON.parse(a);
619
+ const c = JSON.parse(a);
624
620
  let d = "", l, p, u;
625
621
  if (t) {
626
- let m = r.collabspaces.find((g) => g.title === t);
622
+ let m = c.collabspaces.find((g) => g.title === t);
627
623
  if (m) {
628
624
  l = t;
629
625
  let g = m.couples;
@@ -639,7 +635,7 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
639
635
  let _ = g.filter(
640
636
  (y) => y.role.name === h
641
637
  );
642
- _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : c(_);
638
+ _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : r(_);
643
639
  }
644
640
  });
645
641
  }) : g.forEach((h) => {
@@ -649,12 +645,12 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
649
645
  let S = g.filter(
650
646
  (_) => _.role.name === n
651
647
  );
652
- S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
648
+ S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : r(S);
653
649
  }
654
650
  }));
655
651
  }
656
652
  }
657
- l && p && u ? (d = u + "." + p + "." + l, i(d)) : r.preferredcredentials ? (d = r.preferredcredentials.role.name + "." + r.preferredcredentials.organization.title + "." + r.preferredcredentials.collabspace.title, i(d)) : c && (d = u + "." + p + "." + l, c(d));
653
+ l && p && u ? (d = u + "." + p + "." + l, i(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, i(d)) : r && (d = u + "." + p + "." + l, r(d));
658
654
  },
659
655
  onFailure(a) {
660
656
  console.log("Erreur de récupération du contexte de sécurité. => ", a);
@@ -671,9 +667,8 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
671
667
  try {
672
668
  console.log("_3DSpace_download_doc / credentials", e), D(
673
669
  e,
674
- i,
675
- (c) => {
676
- f(c, {
670
+ (r) => {
671
+ f(r, {
677
672
  headers: {
678
673
  ENO_CSRF_TOKEN: e.token
679
674
  },
@@ -681,24 +676,24 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
681
676
  const a = JSON.parse(o);
682
677
  t && t(a);
683
678
  },
684
- onFailure(o, a, r) {
685
- n && (console.log("error http", o), n({ error: o, headers: a, xhr: r }));
679
+ onFailure(o, a, c) {
680
+ n && (console.log("error http", o), n({ error: o, headers: a, xhr: c }));
686
681
  }
687
682
  });
688
683
  },
689
- (c) => {
690
- n && n(c), console.log("*_3dspace_download_doc / error file URL *", c);
684
+ (r) => {
685
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
691
686
  }
692
687
  );
693
- } catch (c) {
694
- console.log("*_3dspace_download_doc / error file URL *", c);
688
+ } catch (r) {
689
+ console.log("*_3dspace_download_doc / error file URL *", r);
695
690
  }
696
691
  }
697
692
  async function W(e, t, n = void 0, s = void 0) {
698
693
  let i = [];
699
694
  for (let a = 0; a < t.length; a += 80) {
700
- const r = t.slice(a, a + 80);
701
- i.push(r);
695
+ const c = t.slice(a, a + 80);
696
+ i.push(c);
702
697
  }
703
698
  const o = (a) => {
704
699
  X(
@@ -707,18 +702,18 @@ async function W(e, t, n = void 0, s = void 0) {
707
702
  () => {
708
703
  a++, a < i.length && o(a);
709
704
  },
710
- (r) => {
711
- n && n(r);
705
+ (c) => {
706
+ n && n(c);
712
707
  }
713
708
  );
714
709
  };
715
710
  o(0);
716
711
  }
717
712
  function X(e, t, n = void 0, s = void 0, i = void 0) {
718
- const c = [];
719
- t.forEach((r) => {
720
- c.push({
721
- id: r
713
+ const r = [];
714
+ t.forEach((c) => {
715
+ r.push({
716
+ id: c
722
717
  });
723
718
  });
724
719
  let o = JSON.stringify({
@@ -726,16 +721,16 @@ function X(e, t, n = void 0, s = void 0, i = void 0) {
726
721
  name: "ENO_CSRF_TOKEN",
727
722
  value: e.token
728
723
  },
729
- data: c
724
+ data: r
730
725
  });
731
726
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
732
727
  f(a, {
733
728
  method: "PUT",
734
729
  data: o,
735
730
  type: "json",
736
- onComplete(r) {
737
- const d = r.data;
738
- r.success === !0 && (n && n(), d.forEach((l) => {
731
+ onComplete(c) {
732
+ const d = c.data;
733
+ c.success === !0 && (n && n(), d.forEach((l) => {
739
734
  try {
740
735
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
741
736
  f(u, {
@@ -755,15 +750,15 @@ function X(e, t, n = void 0, s = void 0, i = void 0) {
755
750
  }
756
751
  }));
757
752
  },
758
- onFailure(r) {
759
- console.log(r), i && i(r);
753
+ onFailure(c) {
754
+ console.log(c), i && i(c);
760
755
  }
761
756
  });
762
757
  }
763
758
  function Fe(e, t, n = void 0, s = void 0) {
764
759
  return new Promise((i) => {
765
760
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
766
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
761
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
767
762
  N(
768
763
  e.space,
769
764
  "ESPACE COMMUN",
@@ -797,12 +792,12 @@ function Fe(e, t, n = void 0, s = void 0) {
797
792
  s && s(a);
798
793
  }
799
794
  };
800
- f(c, o);
795
+ f(r, o);
801
796
  }
802
797
  });
803
798
  }
804
799
  function Ue(e, t, n, s = void 0, i = void 0) {
805
- return new Promise((c) => {
800
+ return new Promise((r) => {
806
801
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
807
802
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
808
803
  N(
@@ -810,9 +805,9 @@ function Ue(e, t, n, s = void 0, i = void 0) {
810
805
  "ESPACE COMMUN",
811
806
  ["VPLMProjectLeader", "VPLMCreator"],
812
807
  void 0,
813
- (r) => e.ctx = r,
814
- (r) => {
815
- console.log("onError =>", r);
808
+ (c) => e.ctx = c,
809
+ (c) => {
810
+ console.log("onError =>", c);
816
811
  }
817
812
  );
818
813
  let a = {
@@ -832,11 +827,11 @@ function Ue(e, t, n, s = void 0, i = void 0) {
832
827
  ]
833
828
  }),
834
829
  type: "json",
835
- onComplete(r) {
836
- s && s(r);
830
+ onComplete(c) {
831
+ s && s(c);
837
832
  },
838
- onFailure(r) {
839
- i && i(r);
833
+ onFailure(c) {
834
+ i && i(c);
840
835
  }
841
836
  };
842
837
  f(o, a);
@@ -846,7 +841,7 @@ function Ue(e, t, n, s = void 0, i = void 0) {
846
841
  function De(e, t, n = void 0, s = void 0) {
847
842
  return new Promise((i) => {
848
843
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
849
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
844
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
850
845
  N(
851
846
  e.space,
852
847
  "ESPACE COMMUN",
@@ -880,14 +875,14 @@ function De(e, t, n = void 0, s = void 0) {
880
875
  s && s(a);
881
876
  }
882
877
  };
883
- f(c, o);
878
+ f(r, o);
884
879
  }
885
880
  });
886
881
  }
887
882
  function $e(e, t, n = void 0, s = void 0) {
888
883
  return new Promise((i) => {
889
884
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
890
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
885
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
891
886
  N(
892
887
  e.space,
893
888
  "ESPACE COMMUN",
@@ -927,12 +922,12 @@ function $e(e, t, n = void 0, s = void 0) {
927
922
  s && s(a);
928
923
  }
929
924
  };
930
- f(c, o);
925
+ f(r, o);
931
926
  }
932
927
  });
933
928
  }
934
- function Re(e, t, n, s = void 0, i = void 0) {
935
- return new Promise((c) => {
929
+ function je(e, t, n, s = void 0, i = void 0) {
930
+ return new Promise((r) => {
936
931
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
937
932
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
938
933
  N(
@@ -940,9 +935,9 @@ function Re(e, t, n, s = void 0, i = void 0) {
940
935
  "ESPACE COMMUN",
941
936
  ["VPLMProjectLeader", "VPLMCreator"],
942
937
  void 0,
943
- (r) => e.ctx = r,
944
- (r) => {
945
- console.log("onError =>", r);
938
+ (c) => e.ctx = c,
939
+ (c) => {
940
+ console.log("onError =>", c);
946
941
  }
947
942
  );
948
943
  let a = {
@@ -967,11 +962,11 @@ function Re(e, t, n, s = void 0, i = void 0) {
967
962
  notificationTimeout: 600
968
963
  }),
969
964
  type: "json",
970
- onComplete(r) {
971
- s && s(r);
965
+ onComplete(c) {
966
+ s && s(c);
972
967
  },
973
- onFailure(r) {
974
- i && i(r);
968
+ onFailure(c) {
969
+ i && i(c);
975
970
  }
976
971
  };
977
972
  f(o, a);
@@ -985,12 +980,12 @@ async function Ae(e, t, n) {
985
980
  onComplete(i) {
986
981
  i = JSON.parse(i), t && t(i.csrf);
987
982
  },
988
- onFailure(i, c, o) {
989
- n && n({ error: i, headers: c, xhr: o });
983
+ onFailure(i, r, o) {
984
+ n && n({ error: i, headers: r, xhr: o });
990
985
  }
991
986
  });
992
987
  }
993
- function je(e, t = void 0, n = void 0) {
988
+ function Re(e, t = void 0, n = void 0) {
994
989
  const s = {
995
990
  base: `${e.space}`,
996
991
  uri: "/resources/bps/cspaces",
@@ -1002,12 +997,12 @@ function je(e, t = void 0, n = void 0) {
1002
997
  Accept: "application/json,text/javascript,*/*",
1003
998
  "Content-Type": "application/ds-json"
1004
999
  },
1005
- onComplete(c, o) {
1006
- const a = JSON.parse(c);
1000
+ onComplete(r, o) {
1001
+ const a = JSON.parse(r);
1007
1002
  t && t(a, o);
1008
1003
  },
1009
- onFailure(c, o, a) {
1010
- n && n({ response: c, headers: o, xhr: a });
1004
+ onFailure(r, o, a) {
1005
+ n && n({ response: r, headers: o, xhr: a });
1011
1006
  }
1012
1007
  });
1013
1008
  }
@@ -1018,44 +1013,41 @@ function Ie(e, t, n, s) {
1018
1013
  (i) => {
1019
1014
  f(i, {
1020
1015
  header: { ENO_CSRF_TOKEN: e.token },
1021
- onComplete: (c) => {
1022
- n && n(c);
1016
+ onComplete: (r) => {
1017
+ n && n(r);
1023
1018
  },
1024
- onFailure: (c) => {
1025
- console.log("error http", c), s && s(c);
1019
+ onFailure: (r) => {
1020
+ console.log("error http", r), s && s(r);
1026
1021
  }
1027
1022
  });
1028
- },
1029
- (i) => {
1030
- console.log("error file URL", i), s && s(i);
1031
1023
  }
1032
1024
  );
1033
1025
  }
1034
1026
  async function ve(e, t, n = void 0, s = void 0) {
1035
1027
  return new Promise((i) => {
1036
- D(e.space, t, (c) => {
1037
- f(c, {
1038
- onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1039
- onFailure: (o, a, r) => {
1040
- s && s(o, a, r), console.log(o, a?.errormsg);
1028
+ D(e.space, t, (r) => {
1029
+ f(r, {
1030
+ onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1031
+ onFailure: (o, a, c) => {
1032
+ s && s(o, a, c), console.log(o, a?.errormsg);
1041
1033
  }
1042
1034
  });
1043
1035
  });
1044
1036
  });
1045
1037
  }
1046
1038
  function xe(e, t, n, s = void 0, i = void 0) {
1047
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1039
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1048
1040
  k(
1049
1041
  e,
1050
1042
  n,
1051
1043
  (o) => {
1052
- const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1044
+ const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1053
1045
  G(
1054
1046
  e,
1055
1047
  n,
1056
1048
  a,
1057
- c,
1058
1049
  r,
1050
+ c,
1059
1051
  (d) => {
1060
1052
  s && s(d);
1061
1053
  },
@@ -1069,7 +1061,7 @@ function xe(e, t, n, s = void 0, i = void 0) {
1069
1061
  let v, x;
1070
1062
  const $ = [];
1071
1063
  async function Pe(e, t = void 0, n = void 0) {
1072
- e.objID && e.objID !== "" ? k(
1064
+ e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
1073
1065
  e,
1074
1066
  (s) => {
1075
1067
  t && t(s);
@@ -1077,7 +1069,7 @@ async function Pe(e, t = void 0, n = void 0) {
1077
1069
  (s) => {
1078
1070
  n && n(s);
1079
1071
  }
1080
- ) : e.objID === null && C(
1072
+ )) : (e.objID === null || e.objID === "") && C(
1081
1073
  e,
1082
1074
  (s) => {
1083
1075
  t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
@@ -1094,11 +1086,11 @@ async function Me(e, t = void 0, n = void 0) {
1094
1086
  const i = {};
1095
1087
  i.obj = s, V(
1096
1088
  e,
1097
- (c) => {
1098
- i.datas = c, t && t(i);
1089
+ (r) => {
1090
+ i.datas = r, t && t(i);
1099
1091
  },
1100
- (c) => {
1101
- n && n(c);
1092
+ (r) => {
1093
+ n && n(r);
1102
1094
  }
1103
1095
  );
1104
1096
  },
@@ -1109,12 +1101,12 @@ async function Me(e, t = void 0, n = void 0) {
1109
1101
  }
1110
1102
  function V(e, t = void 0, n = void 0) {
1111
1103
  const s = [];
1112
- e.objIds.forEach((i, c) => {
1104
+ e.objIds.forEach((i, r) => {
1113
1105
  I(
1114
1106
  e,
1115
1107
  i.objId,
1116
1108
  (o) => {
1117
- s.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, x)), c === e.objIds.length - 1 && t && t(s);
1109
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, x)), r === e.objIds.length - 1 && t && t(s);
1118
1110
  },
1119
1111
  (o) => {
1120
1112
  n && n(o);
@@ -1127,8 +1119,8 @@ function B(e, t, n = void 0, s = void 0) {
1127
1119
  e,
1128
1120
  v,
1129
1121
  (i) => {
1130
- const c = [...t];
1131
- c.find((o) => o.objectID === i.objectId).data = i.data, x = c, $.push(i.data), n && n($);
1122
+ const r = [...t];
1123
+ r.find((o) => o.objectID === i.objectId).data = i.data, x = r, $.push(i.data), n && n($);
1132
1124
  },
1133
1125
  (i) => {
1134
1126
  s && (s(i), console.log(i));
@@ -1156,10 +1148,10 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1156
1148
  tag: "testTag"
1157
1149
  };
1158
1150
  function Le(e, t, n = void 0, s = void 0) {
1159
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1151
+ const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1160
1152
  uri: "/resources/6w/tags",
1161
1153
  otpCTX: "SecurityContext=preferred",
1162
- optTenant: `tenant=${c}`
1154
+ optTenant: `tenant=${r}`
1163
1155
  }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1164
1156
  tag: [
1165
1157
  {
@@ -1170,7 +1162,7 @@ function Le(e, t, n = void 0, s = void 0) {
1170
1162
  ],
1171
1163
  predicate: P[a],
1172
1164
  object: {
1173
- literal: r
1165
+ literal: c
1174
1166
  }
1175
1167
  }
1176
1168
  ]
@@ -1186,7 +1178,7 @@ function Le(e, t, n = void 0, s = void 0) {
1186
1178
  JSON.parse(u);
1187
1179
  const m = {};
1188
1180
  setTimeout(() => {
1189
- E(
1181
+ J(
1190
1182
  e,
1191
1183
  o,
1192
1184
  (g) => {
@@ -1217,17 +1209,17 @@ function Le(e, t, n = void 0, s = void 0) {
1217
1209
  }
1218
1210
  function q(e, t, n = void 0, s = void 0) {
1219
1211
  console.log("obj ", t);
1220
- const i = t.info.name, c = {
1212
+ const i = t.info.name, r = {
1221
1213
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1222
1214
  uri: "/federated/search"
1223
- }, o = `${c.baseUrl}${c.uri}`, a = {
1215
+ }, o = `${r.baseUrl}${r.uri}`, a = {
1224
1216
  "Content-Type": "application/json",
1225
1217
  Accept: "application/json,text/javascript,*/*"
1226
- }, r = j(), d = {
1218
+ }, c = R(), d = {
1227
1219
  with_indexing_date: !0,
1228
1220
  with_synthesis: !0,
1229
1221
  with_nls: !1,
1230
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1222
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1231
1223
  locale: "fr",
1232
1224
  select_predicate: [
1233
1225
  "ds6w:label",
@@ -1298,12 +1290,12 @@ function q(e, t, n = void 0, s = void 0) {
1298
1290
  }
1299
1291
  });
1300
1292
  }
1301
- function Je(e, t, n = void 0, s = void 0) {
1302
- const { objId: i, pred: c, tag: o } = t, a = {
1293
+ function Ee(e, t, n = void 0, s = void 0) {
1294
+ const { objId: i, pred: r, tag: o } = t, a = {
1303
1295
  uri: "/resources/6w/tags",
1304
1296
  otpCTX: "SecurityContext=preferred",
1305
1297
  optTenant: `tenant=${e.tenant}`
1306
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1298
+ }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1307
1299
  tag: [
1308
1300
  {
1309
1301
  subject: [
@@ -1311,14 +1303,14 @@ function Je(e, t, n = void 0, s = void 0) {
1311
1303
  uri: `pid://${i}`
1312
1304
  }
1313
1305
  ],
1314
- predicate: P[c],
1306
+ predicate: P[r],
1315
1307
  object: {
1316
1308
  literal: o
1317
1309
  }
1318
1310
  }
1319
1311
  ]
1320
1312
  };
1321
- f(r, {
1313
+ f(c, {
1322
1314
  method: "DELETE",
1323
1315
  data: JSON.stringify(d),
1324
1316
  headers: {
@@ -1334,20 +1326,20 @@ function Je(e, t, n = void 0, s = void 0) {
1334
1326
  }
1335
1327
  });
1336
1328
  }
1337
- function Ee(e, t = "", n = void 0, s = void 0) {
1329
+ function Je(e, t = "", n = void 0, s = void 0) {
1338
1330
  const { space: i } = e;
1339
1331
  if (t === "")
1340
1332
  return;
1341
- const c = {
1333
+ const r = {
1342
1334
  uri: "/enovia/resources/v1/modeler/documents"
1343
1335
  }, o = {
1344
1336
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1345
1337
  Accept: "application/json,text/javascript,*/*"
1346
- }, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1338
+ }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1347
1339
  f(a, {
1348
1340
  method: "POST",
1349
1341
  headers: o,
1350
- data: r,
1342
+ data: c,
1351
1343
  onComplete(d) {
1352
1344
  n && n(JSON.parse(d));
1353
1345
  },
@@ -1360,7 +1352,7 @@ function Ee(e, t = "", n = void 0, s = void 0) {
1360
1352
  async function w(e, t = void 0, n = void 0) {
1361
1353
  const s = e.space + "/api/index/tk";
1362
1354
  return f(s, {
1363
- onComplete(i, c, o) {
1355
+ onComplete(i, r, o) {
1364
1356
  const a = JSON.parse(i);
1365
1357
  if (t)
1366
1358
  return t(a), e.token = a?.result?.ServerToken;
@@ -1381,11 +1373,11 @@ function Ge(e, t = void 0, n = void 0) {
1381
1373
  start: 0
1382
1374
  }
1383
1375
  };
1384
- w(e, (c) => {
1376
+ w(e, (r) => {
1385
1377
  f(s, {
1386
1378
  method: "POST",
1387
1379
  headers: {
1388
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1380
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1389
1381
  "Content-type": "application/json;charset=UTF-8",
1390
1382
  Accept: "application/json"
1391
1383
  },
@@ -1410,19 +1402,19 @@ function Ke(e, t = void 0, n = void 0) {
1410
1402
  maxNbOfCommonElements: "5"
1411
1403
  }
1412
1404
  };
1413
- w(e, (c) => {
1405
+ w(e, (r) => {
1414
1406
  f(s, {
1415
1407
  method: "POST",
1416
1408
  headers: {
1417
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1409
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1418
1410
  "Content-type": "application/json;charset=UTF-8",
1419
1411
  Accept: "application/json"
1420
1412
  },
1421
1413
  data: JSON.stringify(i),
1422
1414
  type: "json",
1423
1415
  onComplete(o, a) {
1424
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1425
- t && t(r, o);
1416
+ const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1417
+ t && t(c, o);
1426
1418
  },
1427
1419
  onFailure(o, a) {
1428
1420
  n && n(o, a);
@@ -1436,14 +1428,14 @@ function We(e, t = void 0, n = void 0) {
1436
1428
  uri: "/api/community/listmycommunities",
1437
1429
  limit: `/limit/${e.limit ? e.limit : 128}`,
1438
1430
  page: `/page/${e.page ? e.page : "1"}`
1439
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1431
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1440
1432
  w(e, (o) => {
1441
1433
  f(i, {
1442
1434
  method: "GET",
1443
1435
  headers: {
1444
1436
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1445
1437
  },
1446
- onComplete(a, r, d) {
1438
+ onComplete(a, c, d) {
1447
1439
  const p = JSON.parse(a).result;
1448
1440
  let u = 0;
1449
1441
  p.forEach((m) => {
@@ -1459,21 +1451,21 @@ function We(e, t = void 0, n = void 0) {
1459
1451
  e,
1460
1452
  m.id,
1461
1453
  (h) => {
1462
- u++, g.members = h, c.push(g), u === p.length && t && t(c);
1454
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1463
1455
  },
1464
1456
  (h) => n(h)
1465
1457
  );
1466
1458
  });
1467
1459
  },
1468
- onFailure(a, r) {
1460
+ onFailure(a, c) {
1469
1461
  const d = a;
1470
- d.status = r.status, d.response = r.errormsg, n && n(d);
1462
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1471
1463
  }
1472
1464
  });
1473
1465
  });
1474
1466
  }
1475
1467
  function Q(e, t, n, s) {
1476
- const i = `${e.space}/api/community/listmembers`, c = {
1468
+ const i = `${e.space}/api/community/listmembers`, r = {
1477
1469
  params: {
1478
1470
  page: e.page ? e.page : 1,
1479
1471
  limit: e.limit ? e.limit : 50,
@@ -1488,14 +1480,14 @@ function Q(e, t, n, s) {
1488
1480
  Accept: "application/json",
1489
1481
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1490
1482
  },
1491
- data: JSON.stringify(c),
1483
+ data: JSON.stringify(r),
1492
1484
  type: "json",
1493
- onComplete(a, r, d) {
1485
+ onComplete(a, c, d) {
1494
1486
  n && n(a);
1495
1487
  },
1496
- onFailure(a, r) {
1488
+ onFailure(a, c) {
1497
1489
  const d = a;
1498
- d.status = r.status, d.response = r.errormsg, s && s(d);
1490
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1499
1491
  }
1500
1492
  });
1501
1493
  });
@@ -1504,31 +1496,31 @@ function Xe(e, t = void 0, n = void 0) {
1504
1496
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1505
1497
  e.commu_id || (e.commu_id = s);
1506
1498
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1507
- w(e, (c) => {
1499
+ w(e, (r) => {
1508
1500
  f(i, {
1509
1501
  method: "GET",
1510
1502
  headers: {
1511
1503
  "Content-type": "application/json;charset=UTF-8",
1512
1504
  Accept: "application/json",
1513
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1505
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1514
1506
  },
1515
1507
  onComplete(o) {
1516
1508
  const a = JSON.parse(o);
1517
1509
  t && t(a);
1518
1510
  },
1519
1511
  onFailure(o, a) {
1520
- const r = o;
1521
- r.status = a.status, r.response = a.errormsg, n && n(r);
1512
+ const c = o;
1513
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1522
1514
  }
1523
1515
  });
1524
1516
  });
1525
1517
  }
1526
1518
  function Ve(e, t, n = void 0, s = void 0) {
1527
- const { listAllContacts: i, currentUser: c } = e;
1519
+ const { listAllContacts: i, currentUser: r } = e;
1528
1520
  console.log("__listAllContacts", i.hits);
1529
1521
  const o = `${e.space}/api/directmessages`, a = {
1530
- users: [c.login].concat(t.receipt)
1531
- }, r = {
1522
+ users: [r.login].concat(t.receipt)
1523
+ }, c = {
1532
1524
  id_msg: "",
1533
1525
  senderId: e.currentUser.login,
1534
1526
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1538,10 +1530,10 @@ function Ve(e, t, n = void 0, s = void 0) {
1538
1530
  Z(
1539
1531
  a.users,
1540
1532
  (l) => {
1541
- l !== void 0 && (r.id_msg = l.id, d = !0, R(e, r));
1533
+ l !== void 0 && (c.id_msg = l.id, d = !0, j(e, c));
1542
1534
  },
1543
1535
  (l) => {
1544
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1536
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1545
1537
  }
1546
1538
  ), d === !1 && setTimeout(() => {
1547
1539
  d === !1 && w(e, (l) => {
@@ -1556,7 +1548,7 @@ function Ve(e, t, n = void 0, s = void 0) {
1556
1548
  type: "json",
1557
1549
  onComplete(p, u, m) {
1558
1550
  const g = p;
1559
- g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), r.id_msg = g.result.id, R(e, r);
1551
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, j(e, c);
1560
1552
  },
1561
1553
  onFailure(p, u, m) {
1562
1554
  const g = p;
@@ -1568,19 +1560,19 @@ function Ve(e, t, n = void 0, s = void 0) {
1568
1560
  }
1569
1561
  function Z(e, t, n, s) {
1570
1562
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1571
- w(e, (c) => {
1563
+ w(e, (r) => {
1572
1564
  f(i, {
1573
1565
  method: "GET",
1574
1566
  headers: {
1575
1567
  Accept: "application/json,text/javascript,*/*",
1576
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1568
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1577
1569
  },
1578
1570
  onComplete(o) {
1579
- const a = JSON.parse(o), r = [];
1571
+ const a = JSON.parse(o), c = [];
1580
1572
  a.result.forEach((p) => {
1581
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1573
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1582
1574
  });
1583
- const d = t.sort(), l = r.find((p) => {
1575
+ const d = t.sort(), l = c.find((p) => {
1584
1576
  const u = [];
1585
1577
  return p.users.forEach((m) => {
1586
1578
  u.push(m.login);
@@ -1595,13 +1587,13 @@ function Z(e, t, n, s) {
1595
1587
  });
1596
1588
  });
1597
1589
  }
1598
- function R(e, t, n = void 0, s = void 0) {
1590
+ function j(e, t, n = void 0, s = void 0) {
1599
1591
  const i = {
1600
1592
  base: e.space,
1601
1593
  uri: "/api/community",
1602
1594
  id_msg: `${t.id_msg}`,
1603
1595
  endUri: "/instantmessages"
1604
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1596
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1605
1597
  author: { login: t.senderId, displayName: t.senderName },
1606
1598
  accessState: null,
1607
1599
  commentUri: null,
@@ -1611,8 +1603,8 @@ function R(e, t, n = void 0, s = void 0) {
1611
1603
  parentCommentUri: null,
1612
1604
  richMessage: t.msg
1613
1605
  };
1614
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1615
- f(c, {
1606
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1607
+ f(r, {
1616
1608
  method: "POST",
1617
1609
  headers: {
1618
1610
  "Content-Type": "application/json",
@@ -1621,12 +1613,12 @@ function R(e, t, n = void 0, s = void 0) {
1621
1613
  },
1622
1614
  data: JSON.stringify(o),
1623
1615
  type: "json",
1624
- onComplete(r, d, l) {
1625
- const p = r;
1616
+ onComplete(c, d, l) {
1617
+ const p = c;
1626
1618
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1627
1619
  },
1628
- onFailure(r, d) {
1629
- const l = r;
1620
+ onFailure(c, d) {
1621
+ const l = c;
1630
1622
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1631
1623
  }
1632
1624
  });
@@ -1650,15 +1642,15 @@ const te = {
1650
1642
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1651
1643
  };
1652
1644
  function Be(e, t, n = void 0, s = void 0) {
1653
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1654
- (r) => r.id === t.community_id
1645
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1646
+ (c) => c.id === t.community_id
1655
1647
  ), o = e.swymCommunities.find(
1656
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1648
+ (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1657
1649
  ), a = {
1658
1650
  params: {
1659
1651
  title: t.title,
1660
1652
  // String, le nom de l'affaire
1661
- community_id: c?.id !== void 0 ? c.id : o.id,
1653
+ community_id: r?.id !== void 0 ? r.id : o.id,
1662
1654
  // String, l'id de la communauté
1663
1655
  message: ne(t.text_html),
1664
1656
  // STRING => le contenue du message doit être au format HTML
@@ -1666,11 +1658,11 @@ function Be(e, t, n = void 0, s = void 0) {
1666
1658
  // 1 publier, 0 non publier
1667
1659
  }
1668
1660
  };
1669
- w(e, (r) => {
1661
+ w(e, (c) => {
1670
1662
  const d = {
1671
1663
  "Content-type": "application/json;charset=UTF-8",
1672
1664
  Accept: "application/json",
1673
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1665
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1674
1666
  };
1675
1667
  f(i, {
1676
1668
  method: "POST",
@@ -1689,7 +1681,7 @@ function Be(e, t, n = void 0, s = void 0) {
1689
1681
  });
1690
1682
  }
1691
1683
  function Ye(e, t, n = void 0, s = void 0) {
1692
- const i = `${e.space}/api/idea/delete`, c = {
1684
+ const i = `${e.space}/api/idea/delete`, r = {
1693
1685
  params: {
1694
1686
  community_id: t.community_id,
1695
1687
  ideationIds: [t.idee_id]
@@ -1703,14 +1695,14 @@ function Ye(e, t, n = void 0, s = void 0) {
1703
1695
  Accept: "application/json",
1704
1696
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1705
1697
  },
1706
- data: JSON.stringify(c),
1698
+ data: JSON.stringify(r),
1707
1699
  type: "json",
1708
- onComplete(a, r, d) {
1700
+ onComplete(a, c, d) {
1709
1701
  n && n(a);
1710
1702
  },
1711
- onFailure(a, r, d) {
1703
+ onFailure(a, c, d) {
1712
1704
  const l = a;
1713
- l.status = r.status, l.response = r.errormsg, s && s(l);
1705
+ l.status = c.status, l.response = c.errormsg, s && s(l);
1714
1706
  }
1715
1707
  });
1716
1708
  });
@@ -1718,13 +1710,13 @@ function Ye(e, t, n = void 0, s = void 0) {
1718
1710
  function He(e, t = "", n = void 0, s = void 0) {
1719
1711
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1720
1712
  t === "" && (t = i);
1721
- const c = `${e.space}/api/idea/get`, o = {
1713
+ const r = `${e.space}/api/idea/get`, o = {
1722
1714
  params: {
1723
1715
  id: t
1724
1716
  }
1725
1717
  };
1726
1718
  w(e, (a) => {
1727
- f(c, {
1719
+ f(r, {
1728
1720
  method: "POST",
1729
1721
  headers: {
1730
1722
  "Content-type": "application/json;charset=UTF-8",
@@ -1733,12 +1725,12 @@ function He(e, t = "", n = void 0, s = void 0) {
1733
1725
  },
1734
1726
  data: JSON.stringify(o),
1735
1727
  type: "json",
1736
- onComplete(r) {
1737
- const d = r;
1728
+ onComplete(c) {
1729
+ const d = c;
1738
1730
  d.msg = d.result.message, n && n(d);
1739
1731
  },
1740
- onFailure(r) {
1741
- const d = r;
1732
+ onFailure(c) {
1733
+ const d = c;
1742
1734
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1743
1735
  }
1744
1736
  });
@@ -1749,20 +1741,20 @@ function ze(e, t = te, n = void 0, s = void 0) {
1749
1741
  uri: "/api/idea/list",
1750
1742
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1751
1743
  limit: `/limit/${t.limit ? t.limit : 10}`
1752
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1744
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1753
1745
  w(e, (o) => {
1754
- f(c, {
1746
+ f(r, {
1755
1747
  method: "GET",
1756
1748
  headers: {
1757
1749
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1758
1750
  },
1759
1751
  onComplete(a) {
1760
- const r = JSON.parse(a);
1761
- n && n(r);
1752
+ const c = JSON.parse(a);
1753
+ n && n(c);
1762
1754
  },
1763
- onFailure(a, r) {
1755
+ onFailure(a, c) {
1764
1756
  const d = a;
1765
- d.status = r.status, d.response = r.errormsg, s && s(d);
1757
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1766
1758
  }
1767
1759
  });
1768
1760
  });
@@ -1850,12 +1842,12 @@ function qe(e, t = void 0, n = void 0) {
1850
1842
  f(s, {
1851
1843
  method: "GET",
1852
1844
  headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1853
- onComplete(c, o, a) {
1854
- const r = JSON.parse(c);
1855
- t && t(r.result);
1845
+ onComplete(r, o, a) {
1846
+ const c = JSON.parse(r);
1847
+ t && t(c.result);
1856
1848
  },
1857
- onFailure(c, o, a) {
1858
- n && n({ response: c, headers: o, xhr: a });
1849
+ onFailure(r, o, a) {
1850
+ n && n({ response: r, headers: o, xhr: a });
1859
1851
  }
1860
1852
  });
1861
1853
  },
@@ -1866,11 +1858,11 @@ function Qe(e, t, n = void 0, s = void 0) {
1866
1858
  const i = e.space + "/api/user/find/login/" + t;
1867
1859
  w(
1868
1860
  e,
1869
- (c) => {
1861
+ (r) => {
1870
1862
  f(i, {
1871
1863
  method: "GET",
1872
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1873
- onComplete(o, a, r) {
1864
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1865
+ onComplete(o, a, c) {
1874
1866
  const d = JSON.parse(o);
1875
1867
  n && n(d);
1876
1868
  },
@@ -1887,7 +1879,7 @@ function Ze(e) {
1887
1879
  return console.log(t), t;
1888
1880
  }
1889
1881
  export {
1890
- j as UUID,
1882
+ R as UUID,
1891
1883
  ke as _3DSpace_Create_Doc,
1892
1884
  C as _3DSpace_csrf,
1893
1885
  I as _3DSpace_download_doc,
@@ -1897,10 +1889,10 @@ export {
1897
1889
  D as _3DSpace_file_url,
1898
1890
  be as _3DSpace_file_url_csr,
1899
1891
  k as _3DSpace_get_csrf,
1900
- E as _3DSpace_get_docInfo,
1892
+ J as _3DSpace_get_docInfo,
1901
1893
  X as _3DSpace_get_downloadTicket_multidoc,
1902
1894
  N as _3DSpace_get_securityContexts,
1903
- Re as _3DSpace_lifecycle_changeRevision,
1895
+ je as _3DSpace_lifecycle_changeRevision,
1904
1896
  Ue as _3DSpace_lifecycle_changeState,
1905
1897
  De as _3DSpace_lifecycle_getGraph,
1906
1898
  $e as _3DSpace_lifecycle_getNextRevision,
@@ -1919,7 +1911,7 @@ export {
1919
1911
  Qe as _3DSwym_get_findUser,
1920
1912
  w as _3DSwym_get_version,
1921
1913
  Be as _3DSwym_postIdea,
1922
- R as _3DSwym_sendMessageData,
1914
+ j as _3DSwym_sendMessageData,
1923
1915
  Se as _AppMngt_get_info_user,
1924
1916
  he as _AppMngt_get_users,
1925
1917
  me as _getPlateformInfos,
@@ -1935,7 +1927,7 @@ export {
1935
1927
  B as dataMixing,
1936
1928
  Te as deleteUserGroups,
1937
1929
  re as findAdresse,
1938
- je as getAllContextSecurity,
1930
+ Re as getAllContextSecurity,
1939
1931
  Ae as getCSRFToken,
1940
1932
  oe as getCommunes,
1941
1933
  ye as getComplementUG,
@@ -1944,15 +1936,15 @@ export {
1944
1936
  Me as getDatasByTenant,
1945
1937
  V as getDatasFrom3DSpace,
1946
1938
  ve as getDownloadDocument,
1947
- Ee as getInfoDocTags,
1939
+ Je as getInfoDocTags,
1948
1940
  we as getUserGroupsList,
1949
- J as getUsersGroupRules,
1941
+ E as getUsersGroupRules,
1950
1942
  Pe as get_3DSpace_csrf,
1951
1943
  Ce as patchUserGroups,
1952
1944
  Oe as patchUserGroupsControl,
1953
1945
  xe as pushDataIn3DSpace,
1954
1946
  Ne as readUserGroupControl,
1955
- Je as removeTagToDoc,
1947
+ Ee as removeTagToDoc,
1956
1948
  Ze as sayHello,
1957
1949
  de as updateEvent
1958
1950
  };