@beam3_dev/api_module 0.0.76 → 0.0.78

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
@@ -68,8 +68,8 @@ async function re(e, t = void 0, n = void 0) {
68
68
  async function ce(e, t = L) {
69
69
  let n = N.now().year;
70
70
  const s = e, o = [], c = (a) => {
71
- for (let i in a)
72
- o.push({ date: i, comment: a[i] });
71
+ for (let r in a)
72
+ o.push({ date: r, comment: a[r] });
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((i) => i.json()).then((i) => {
84
- c(i);
85
- }).catch((i) => console.error("Erreur : " + i));
83
+ ).then((r) => r.json()).then((r) => {
84
+ c(r);
85
+ }).catch((r) => console.error("Erreur : " + r));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let i of o)
90
+ for (let r of o)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
92
+ (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + i.comment,
95
- start: N.fromISO(i.date).toISODate(),
96
- end: N.fromISO(i.date).toISODate(),
94
+ name: "Férié : " + r.comment,
95
+ start: N.fromISO(r.date).toISODate(),
96
+ end: N.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -104,7 +104,7 @@ async function de(e, t, n = !0) {
104
104
  const s = e.events.findIndex((o) => o.uuid === t.uuid);
105
105
  return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, c) => o.start - c.start), e;
106
106
  }
107
- function f(e, t) {
107
+ function m(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
109
109
  n.authenticatedRequest(e, t);
110
110
  });
@@ -163,48 +163,48 @@ function ge(e, t, n) {
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
165
  }, o = `${s.base}${s.uri}${s.option}`;
166
- f(o, {
166
+ m(o, {
167
167
  method: "GET",
168
168
  headers: {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, r, a) {
173
- const i = JSON.parse(c), d = i.data.map((l) => {
172
+ onComplete(c, i, a) {
173
+ const r = JSON.parse(c), d = r.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, i);
177
+ t && t(d, r);
178
178
  },
179
- onFailure(c, r) {
179
+ onFailure(c, i) {
180
180
  const a = c;
181
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
181
+ a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
182
182
  }
183
183
  });
184
184
  }
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
- f(s, {
188
- onComplete(o, c, r) {
187
+ m(s, {
188
+ onComplete(o, c, i) {
189
189
  const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
192
  onFailure(o, c) {
193
- const r = o;
194
- r.msg = c.errormsg, r.errCode = c.errorcode, n && n(r);
193
+ const i = o;
194
+ i.msg = c.errormsg, i.errCode = c.errorcode, n && n(i);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, n = void 0, s = void 0) {
199
199
  let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
- f(o, {
201
- onComplete(c, r, a) {
202
- const i = JSON.parse(c);
203
- n && n(i);
200
+ m(o, {
201
+ onComplete(c, i, a) {
202
+ const r = JSON.parse(c);
203
+ n && n(r);
204
204
  },
205
- onFailure(c, r) {
205
+ onFailure(c, i) {
206
206
  const a = c;
207
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
207
+ a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
@@ -215,7 +215,7 @@ const F = {
215
215
  function _e(e, t, n = void 0, s = void 0) {
216
216
  const { space: o, currentUser: c } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, i = {
218
+ }.URIUGr}`, r = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
@@ -227,10 +227,10 @@ function _e(e, t, n = void 0, s = void 0) {
227
227
  }
228
228
  ]
229
229
  };
230
- f(a, {
230
+ m(a, {
231
231
  method: "POST",
232
232
  headers: F,
233
- data: JSON.stringify(i),
233
+ data: JSON.stringify(r),
234
234
  onComplete(d) {
235
235
  n && n(JSON.parse(d));
236
236
  },
@@ -242,8 +242,8 @@ 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: o, tenant: c } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${i}`;
246
- f(d, {
245
+ const { space: o, tenant: c } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${i}${a}${r}`;
246
+ m(d, {
247
247
  opts: {
248
248
  method: "GET",
249
249
  headers: {
@@ -254,19 +254,19 @@ function ye(e, t, n = void 0, s = void 0) {
254
254
  onComplete(u) {
255
255
  n && n(JSON.parse(u));
256
256
  },
257
- onFailure(u, m) {
257
+ onFailure(u, f) {
258
258
  const g = u;
259
- g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
259
+ g.msg = f.errormsg, g.errCode = f.errorcode, s && s(g);
260
260
  }
261
261
  });
262
262
  }
263
263
  function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: o } = e, c = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
264
+ const { space: s, tenant: o } = e, c = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, r = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${r}${a}`;
268
- f(d, {
269
- OPTsH: i,
267
+ }, d = `${c}${i}${a}`;
268
+ m(d, {
269
+ OPTsH: r,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -282,13 +282,13 @@ function we(e, t = void 0, n = void 0) {
282
282
  Accept: "application/json,text/javascript,*/*"
283
283
  } };
284
284
  try {
285
- f(a, {
285
+ m(a, {
286
286
  opts: d,
287
287
  onComplete(l) {
288
- const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
288
+ const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
289
  if (o && Object.keys(o).length > 0) {
290
- const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
291
- u.iam = S, u.UG = m, u.iamMember = h, E(
290
+ const g = f.filter((_) => _.owner === o.email), h = f.filter((_) => _.members.includes(o.email)), S = g.concat(h);
291
+ u.iam = S, u.UG = f, u.iamMember = h, E(
292
292
  e,
293
293
  (_) => {
294
294
  u.rules = _, t && t(u);
@@ -309,21 +309,21 @@ function we(e, t = void 0, n = void 0) {
309
309
  }
310
310
  function Te(e, t) {
311
311
  const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
- f(o, {
312
+ m(o, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
316
  function Ce(e, t, n, s = void 0, o = void 0) {
317
- const { space: c, tenant: r } = e, a = {
317
+ const { space: c, tenant: i } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${r}`
325
- }, i = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
326
- f(d, {
324
+ OPTsTenant: `tenant=dstenant:${i}`
325
+ }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
326
+ m(d, {
327
327
  headers: F,
328
328
  method: "PATCH",
329
329
  data: l,
@@ -338,7 +338,7 @@ function Ce(e, t, n, s = void 0, o = void 0) {
338
338
  }
339
339
  function Oe(e, t, n, s = void 0, o = void 0) {
340
340
  const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
- f(a, {
341
+ m(a, {
342
342
  method: "PATCH",
343
343
  headers: F,
344
344
  data: JSON.stringify(n),
@@ -352,8 +352,8 @@ function Oe(e, t, n, s = void 0, o = void 0) {
352
352
  });
353
353
  }
354
354
  function be(e, t, n = void 0, s = void 0) {
355
- const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- f(r, {
355
+ const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ m(i, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -372,12 +372,12 @@ function be(e, t, n = void 0, s = void 0) {
372
372
  async function J(e, t, n) {
373
373
  if (e.space) {
374
374
  const s = `${e.space}/resources/v1/application/CSRF`;
375
- f(s, {
375
+ m(s, {
376
376
  onComplete(o) {
377
377
  o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
378
378
  },
379
- onFailure(o, c, r) {
380
- n && n({ error: o, headers: c, xhr: r });
379
+ onFailure(o, c, i) {
380
+ n && n({ error: o, headers: c, xhr: i });
381
381
  }
382
382
  });
383
383
  }
@@ -389,21 +389,21 @@ async function G(e, t = void 0, n = void 0, s = void 0) {
389
389
  return;
390
390
  }
391
391
  const c = o + `/resources/v1/modeler/documents/${t}`;
392
- f(c, {
393
- onComplete(r, a, i) {
394
- const d = JSON.parse(r);
392
+ m(c, {
393
+ onComplete(i, a, r) {
394
+ const d = JSON.parse(i);
395
395
  n && n(d);
396
396
  },
397
- onFailure(r) {
398
- s && s(r);
397
+ onFailure(i) {
398
+ s && s(i);
399
399
  }
400
400
  });
401
401
  }
402
402
  function k(e, t = void 0, n = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
404
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- f(s, {
406
- onComplete(o, c, r) {
405
+ m(s, {
406
+ onComplete(o, c, i) {
407
407
  const a = JSON.parse(o);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
@@ -425,16 +425,16 @@ function k(e, t = void 0, n = void 0) {
425
425
  function C(e, t = void 0, n = void 0) {
426
426
  if (e.space) {
427
427
  const s = e.space + "/resources/v1/application/CSRF";
428
- f(s, {
429
- onComplete(o, c, r) {
428
+ m(s, {
429
+ onComplete(o, c, i) {
430
430
  const a = JSON.parse(o);
431
431
  t && t(a.csrf.value);
432
432
  },
433
- onFailure(o, c, r) {
433
+ onFailure(o, c, i) {
434
434
  n && n({
435
435
  response: o,
436
436
  headers: c,
437
- xhr: r
437
+ xhr: i
438
438
  });
439
439
  }
440
440
  });
@@ -446,7 +446,7 @@ function U(e, t = void 0, n = void 0) {
446
446
  k(
447
447
  e,
448
448
  (o) => {
449
- f(s, {
449
+ m(s, {
450
450
  method: "PUT",
451
451
  headers: {
452
452
  ENO_CSRF_TOKEN: e.token
@@ -455,8 +455,8 @@ function U(e, t = void 0, n = void 0) {
455
455
  const a = JSON.parse(c).data[0].dataelements.ticketURL;
456
456
  t && t(a);
457
457
  },
458
- onFailure(c, r) {
459
- console.warn("☠️ error => ", c, r), n && n(c, r);
458
+ onFailure(c, i) {
459
+ console.warn("☠️ error => ", c, i), n && n(c, i);
460
460
  }
461
461
  });
462
462
  },
@@ -467,27 +467,27 @@ function U(e, t = void 0, n = void 0) {
467
467
  }
468
468
  function Ne(e, t, n, s = void 0, o = void 0) {
469
469
  const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- n || (n = e.token), f(c, {
470
+ n || (n = e.token), m(c, {
471
471
  method: "PUT",
472
472
  headers: {
473
473
  ENO_CSRF_TOKEN: n
474
474
  },
475
- onComplete(r) {
476
- let a = JSON.parse(r);
475
+ onComplete(i) {
476
+ let a = JSON.parse(i);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
- const i = a.data[0].dataelements.ticketURL;
480
- s && s(i);
481
- } catch (i) {
482
- o && o(i);
479
+ const r = a.data[0].dataelements.ticketURL;
480
+ s && s(r);
481
+ } catch (r) {
482
+ o && o(r);
483
483
  }
484
484
  },
485
- onFailure(r) {
486
- o && o(r);
485
+ onFailure(i) {
486
+ o && o(i);
487
487
  }
488
488
  });
489
489
  }
490
- function K(e, t, n, s, o, c = void 0, r = void 0) {
490
+ function K(e, t, n, s, o, c = void 0, i = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -500,23 +500,23 @@ function K(e, t, n, s, o, c = void 0, r = void 0) {
500
500
  o,
501
501
  a.csrf.value,
502
502
  c,
503
- r
503
+ i
504
504
  );
505
505
  }
506
506
  );
507
507
  }
508
- function W(e, t, n, s, o, c, r = void 0, a = void 0) {
509
- const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- f(i, {
508
+ function W(e, t, n, s, o, c, i = void 0, a = void 0) {
509
+ const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ m(r, {
511
511
  method: "PUT",
512
512
  headers: {
513
513
  ENO_CSRF_TOKEN: c
514
514
  },
515
515
  onComplete(d, l, p) {
516
- const u = JSON.parse(d).data[0].dataelements, m = new FormData();
517
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
516
+ const u = JSON.parse(d).data[0].dataelements, f = new FormData();
517
+ f.append("__fcs__jobTicket", u.ticket), f.append("file_0", s, o);
518
518
  const g = {};
519
- g.method = "POST", g.data = m, g.onComplete = function(h) {
519
+ g.method = "POST", g.data = f, g.onComplete = function(h) {
520
520
  let S = "temp_" + Date.now(), _ = {
521
521
  method: "PUT",
522
522
  headers: {
@@ -540,46 +540,46 @@ function W(e, t, n, s, o, c, r = void 0, a = void 0) {
540
540
  }),
541
541
  type: "json",
542
542
  onComplete(y) {
543
- r && r(y);
543
+ i && i(y);
544
544
  },
545
545
  onFailure(y) {
546
546
  a && a(y);
547
547
  }
548
548
  };
549
- f(
549
+ m(
550
550
  e.space + "/resources/v1/modeler/documents",
551
551
  _
552
552
  );
553
553
  }, g.onFailure = function(h) {
554
554
  a && a(h);
555
- }, g.timeout = 0, f(u.ticketURL, g);
555
+ }, g.timeout = 0, m(u.ticketURL, g);
556
556
  }
557
557
  });
558
558
  }
559
559
  async function ke(e, t, n, s, o = void 0, c = void 0) {
560
- const r = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
560
+ const i = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
561
  type: "text/plain"
562
562
  }), p = {
563
- url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
563
+ url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
564
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
565
565
  };
566
- if (!r && r !== "") {
566
+ if (!i && i !== "") {
567
567
  console.log("le store._3DSpace est vide");
568
568
  return;
569
569
  }
570
- f(p.url_Ticket, {
570
+ m(p.url_Ticket, {
571
571
  method: "PUT",
572
572
  headers: {
573
573
  ENO_CSRF_TOKEN: a.value
574
574
  },
575
- onComplete(u, m, g) {
575
+ onComplete(u, f, g) {
576
576
  const h = JSON.parse(u).data[0].dataelements;
577
577
  d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
578
578
  const S = {
579
579
  method: "POST",
580
580
  data: d,
581
581
  onComplete(T) {
582
- if (i !== "" && a !== "") {
582
+ if (r !== "" && a !== "") {
583
583
  const D = {
584
584
  method: "POST",
585
585
  headers: {
@@ -611,7 +611,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
611
611
  onComplete: _,
612
612
  onFailure: y
613
613
  };
614
- i !== "" && f(p.url_Post, D);
614
+ r !== "" && m(p.url_Post, D);
615
615
  } else
616
616
  console.warn("le store est vide");
617
617
  },
@@ -624,53 +624,53 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
624
624
  console.log("Erreur -- response ", T, `
625
625
  headers `, D), c && c(T);
626
626
  }
627
- f(h.ticketURL, S);
627
+ m(h.ticketURL, S);
628
628
  }
629
629
  });
630
630
  }
631
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
632
- const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
- f(r, {
631
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1) {
632
+ const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
+ m(a, {
634
634
  method: "GET",
635
- onComplete(a) {
636
- const i = JSON.parse(a);
637
- let d = "", l, p, u;
635
+ onComplete(r) {
636
+ const d = JSON.parse(r);
637
+ let l = "", p, u, f;
638
638
  if (t) {
639
- let m = i.collabspaces.find((g) => g.title === t);
640
- if (m) {
641
- l = t;
642
- let g = m.couples;
643
- g = g.filter(
644
- (h, S, _) => S === _.findIndex(
645
- (y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
639
+ let g = d.collabspaces.find((h) => h.title === t);
640
+ if (g) {
641
+ p = t;
642
+ let h = g.couples;
643
+ h = h.filter(
644
+ (S, _, y) => _ === y.findIndex(
645
+ (T) => T.organization.pid === S.organization.pid && T.role.pid === S.role.pid
646
646
  )
647
- ), n && (Array.isArray(n) ? n.forEach((h) => {
648
- u || g.forEach((S) => {
649
- if (h === S.role.name && s === S.organization.title)
650
- u = h, p = s;
651
- else if (h === S.role.name) {
652
- let _ = g.filter(
653
- (y) => y.role.name === h
647
+ ), n && (Array.isArray(n) ? n.forEach((S) => {
648
+ f || h.forEach((_) => {
649
+ if (S === _.role.name && s === _.organization.title)
650
+ f = S, u = s;
651
+ else if (S === _.role.name) {
652
+ let y = h.filter(
653
+ (T) => T.role.name === S
654
654
  );
655
- _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : c(_);
655
+ y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
656
656
  }
657
657
  });
658
- }) : g.forEach((h) => {
659
- if (n === h.role.name && s === h.organization.title)
660
- u = n, p = s;
661
- else if (n === h.role.name) {
662
- let S = g.filter(
663
- (_) => _.role.name === n
658
+ }) : h.forEach((S) => {
659
+ if (n === S.role.name && s === S.organization.title)
660
+ f = n, u = s;
661
+ else if (n === S.role.name) {
662
+ let _ = h.filter(
663
+ (y) => y.role.name === n
664
664
  );
665
- S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
665
+ _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
666
666
  }
667
667
  }));
668
668
  }
669
669
  }
670
- l && p && u ? (d = u + "." + p + "." + l, o(d)) : i.preferredcredentials ? (d = i.preferredcredentials.role.name + "." + i.preferredcredentials.organization.title + "." + i.preferredcredentials.collabspace.title, o(d)) : c && (d = u + "." + p + "." + l, c(d));
670
+ p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
671
671
  },
672
- onFailure(a) {
673
- console.log("Erreur de récupération du contexte de sécurité. => ", a);
672
+ onFailure(r) {
673
+ console.log("Erreur de récupération du contexte de sécurité. => ", r);
674
674
  }
675
675
  });
676
676
  }
@@ -692,36 +692,36 @@ async function R(e, t = void 0, n = void 0) {
692
692
  )), new Promise((o, c) => {
693
693
  U(
694
694
  e,
695
- (r) => {
696
- f(r, {
695
+ (i) => {
696
+ m(i, {
697
697
  headers: {
698
698
  "Content-Type": "application/json",
699
699
  Accept: "application/json"
700
700
  },
701
- onComplete(i) {
701
+ onComplete(r) {
702
702
  let d;
703
703
  try {
704
- d = JSON.parse(i);
704
+ d = JSON.parse(r);
705
705
  } catch {
706
- d = i;
706
+ d = r;
707
707
  }
708
708
  return result = d, t && t(d), result;
709
709
  },
710
- onFailure(i, d, l) {
711
- n && (console.log("error http", i), n({
712
- msg: JSON.parse(i),
710
+ onFailure(r, d, l) {
711
+ n && (console.log("error http", r), n({
712
+ msg: JSON.parse(r),
713
713
  headers: d,
714
714
  xhr: l
715
715
  }), c({
716
- msg: JSON.parse(i),
716
+ msg: JSON.parse(r),
717
717
  headers: d,
718
718
  xhr: l
719
719
  }));
720
720
  }
721
721
  });
722
722
  },
723
- (r) => {
724
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), c(r);
723
+ (i) => {
724
+ n && n(i), console.log("*_3dspace_download_doc / error file URL *", i), c(i);
725
725
  }
726
726
  );
727
727
  });
@@ -729,31 +729,31 @@ async function R(e, t = void 0, n = void 0) {
729
729
  async function X(e, t, n = void 0, s = void 0) {
730
730
  let o = [];
731
731
  for (let a = 0; a < t.length; a += 80) {
732
- const i = t.slice(a, a + 80);
733
- o.push(i);
732
+ const r = t.slice(a, a + 80);
733
+ o.push(r);
734
734
  }
735
- const r = (a) => {
735
+ const i = (a) => {
736
736
  V(
737
737
  e,
738
738
  o[a],
739
739
  () => {
740
- a++, a < o.length && r(a);
740
+ a++, a < o.length && i(a);
741
741
  },
742
- (i) => {
743
- n && n(i);
742
+ (r) => {
743
+ n && n(r);
744
744
  }
745
745
  );
746
746
  };
747
- r(0);
747
+ i(0);
748
748
  }
749
749
  function V(e, t, n = void 0, s = void 0, o = void 0) {
750
750
  const c = [];
751
- t.forEach((i) => {
751
+ t.forEach((r) => {
752
752
  c.push({
753
- id: i
753
+ id: r
754
754
  });
755
755
  });
756
- let r = JSON.stringify({
756
+ let i = JSON.stringify({
757
757
  csrf: {
758
758
  name: "ENO_CSRF_TOKEN",
759
759
  value: e.token
@@ -761,25 +761,25 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
761
761
  data: c
762
762
  });
763
763
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
764
- f(a, {
764
+ m(a, {
765
765
  method: "PUT",
766
- data: r,
766
+ data: i,
767
767
  type: "json",
768
- onComplete(i) {
769
- const d = i.data;
770
- i.success === !0 && (n && n(), d.forEach((l) => {
768
+ onComplete(r) {
769
+ const d = r.data;
770
+ r.success === !0 && (n && n(), d.forEach((l) => {
771
771
  try {
772
772
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
773
- f(u, {
774
- onComplete: (m) => {
773
+ m(u, {
774
+ onComplete: (f) => {
775
775
  s && s({
776
776
  objectId: l.id,
777
777
  fileName: p,
778
- data: JSON.parse(m)
778
+ data: JSON.parse(f)
779
779
  });
780
780
  },
781
- onFailure: (m) => {
782
- console.log("error http", m);
781
+ onFailure: (f) => {
782
+ console.log("error http", f);
783
783
  }
784
784
  });
785
785
  } catch (p) {
@@ -787,8 +787,8 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
787
787
  }
788
788
  }));
789
789
  },
790
- onFailure(i) {
791
- console.log(i), o && o(i);
790
+ onFailure(r) {
791
+ console.log(r), o && o(r);
792
792
  }
793
793
  });
794
794
  }
@@ -806,7 +806,7 @@ function De(e, t, n = void 0, s = void 0) {
806
806
  console.log("onError =>", a);
807
807
  }
808
808
  );
809
- let r = {
809
+ let i = {
810
810
  method: "POST",
811
811
  headers: {
812
812
  SecurityContext: "ctx::" + e.ctx,
@@ -827,22 +827,22 @@ function De(e, t, n = void 0, s = void 0) {
827
827
  s && s(a);
828
828
  }
829
829
  };
830
- f(c, r);
830
+ m(c, i);
831
831
  }
832
832
  });
833
833
  }
834
834
  function Fe(e, t, n, s = void 0, o = void 0) {
835
835
  return new Promise((c) => {
836
836
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
837
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
837
+ const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
838
838
  b(
839
839
  e.space,
840
840
  "ESPACE COMMUN",
841
841
  ["VPLMProjectLeader", "VPLMCreator"],
842
842
  void 0,
843
- (i) => e.ctx = i,
844
- (i) => {
845
- console.log("onError =>", i);
843
+ (r) => e.ctx = r,
844
+ (r) => {
845
+ console.log("onError =>", r);
846
846
  }
847
847
  );
848
848
  let a = {
@@ -860,14 +860,14 @@ function Fe(e, t, n, s = void 0, o = void 0) {
860
860
  }]
861
861
  }),
862
862
  type: "json",
863
- onComplete(i) {
864
- s && s(i);
863
+ onComplete(r) {
864
+ s && s(r);
865
865
  },
866
- onFailure(i) {
867
- o && o(i);
866
+ onFailure(r) {
867
+ o && o(r);
868
868
  }
869
869
  };
870
- f(r, a);
870
+ m(i, a);
871
871
  }
872
872
  });
873
873
  }
@@ -885,7 +885,7 @@ function Ue(e, t, n = void 0, s = void 0) {
885
885
  console.log("onError =>", a);
886
886
  }
887
887
  );
888
- let r = {
888
+ let i = {
889
889
  method: "POST",
890
890
  headers: {
891
891
  securitycontext: "ctx::" + e.ctx,
@@ -906,7 +906,7 @@ function Ue(e, t, n = void 0, s = void 0) {
906
906
  s && s(a);
907
907
  }
908
908
  };
909
- f(c, r);
909
+ m(c, i);
910
910
  }
911
911
  });
912
912
  }
@@ -924,7 +924,7 @@ function je(e, t, n = void 0, s = void 0) {
924
924
  console.log("onError =>", a);
925
925
  }
926
926
  );
927
- let r = {
927
+ let i = {
928
928
  method: "POST",
929
929
  headers: {
930
930
  SecurityContext: "ctx::" + e.ctx,
@@ -951,22 +951,22 @@ function je(e, t, n = void 0, s = void 0) {
951
951
  s && s(a);
952
952
  }
953
953
  };
954
- f(c, r);
954
+ m(c, i);
955
955
  }
956
956
  });
957
957
  }
958
958
  function $e(e, t, n, s = void 0, o = void 0) {
959
959
  return new Promise((c) => {
960
960
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
961
- const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
961
+ const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
962
962
  b(
963
963
  e.space,
964
964
  "ESPACE COMMUN",
965
965
  ["VPLMProjectLeader", "VPLMCreator"],
966
966
  void 0,
967
- (i) => e.ctx = i,
968
- (i) => {
969
- console.log("onError =>", i);
967
+ (r) => e.ctx = r,
968
+ (r) => {
969
+ console.log("onError =>", r);
970
970
  }
971
971
  );
972
972
  let a = {
@@ -989,14 +989,14 @@ function $e(e, t, n, s = void 0, o = void 0) {
989
989
  notificationTimeout: 600
990
990
  }),
991
991
  type: "json",
992
- onComplete(i) {
993
- s && s(i);
992
+ onComplete(r) {
993
+ s && s(r);
994
994
  },
995
- onFailure(i) {
996
- o && o(i);
995
+ onFailure(r) {
996
+ o && o(r);
997
997
  }
998
998
  };
999
- f(r, a);
999
+ m(i, a);
1000
1000
  }
1001
1001
  });
1002
1002
  }
@@ -1007,18 +1007,18 @@ function Ae(e, t = void 0, n = void 0) {
1007
1007
  uri: "/resources/bps/cspaces",
1008
1008
  optTenant: `tenant=${e.tenant}`
1009
1009
  }, o = `${s.base}${s.uri}?${s.optTenant}`;
1010
- f(o, {
1010
+ m(o, {
1011
1011
  method: "GET",
1012
1012
  headers: {
1013
1013
  Accept: "application/json,text/javascript,*/*",
1014
1014
  "Content-Type": "application/ds-json"
1015
1015
  },
1016
- onComplete(c, r) {
1016
+ onComplete(c, i) {
1017
1017
  const a = JSON.parse(c);
1018
- t && t(a, r);
1018
+ t && t(a, i);
1019
1019
  },
1020
- onFailure(c, r, a) {
1021
- n && n({ response: c, headers: r, xhr: a });
1020
+ onFailure(c, i, a) {
1021
+ n && n({ response: c, headers: i, xhr: a });
1022
1022
  }
1023
1023
  });
1024
1024
  }
@@ -1027,7 +1027,7 @@ function Ie(e, t, n, s) {
1027
1027
  e.space,
1028
1028
  t,
1029
1029
  (o) => {
1030
- f(o, {
1030
+ m(o, {
1031
1031
  header: { ENO_CSRF_TOKEN: e.token },
1032
1032
  onComplete: (c) => {
1033
1033
  n && n(c);
@@ -1042,10 +1042,10 @@ function Ie(e, t, n, s) {
1042
1042
  async function Re(e, t, n = void 0, s = void 0) {
1043
1043
  return new Promise((o) => {
1044
1044
  U(e, t, (c) => {
1045
- f(c, {
1046
- onComplete: (r, a, i) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, i), o),
1047
- onFailure: (r, a, i) => {
1048
- s && s(r, a, i), console.log(r, a?.errormsg);
1045
+ m(c, {
1046
+ onComplete: (i, a, r) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, r), o),
1047
+ onFailure: (i, a, r) => {
1048
+ s && s(i, a, r), console.log(i, a?.errormsg);
1049
1049
  }
1050
1050
  });
1051
1051
  });
@@ -1056,14 +1056,14 @@ function ve(e, t, n, s = void 0, o = void 0) {
1056
1056
  k(
1057
1057
  e,
1058
1058
  n,
1059
- (r) => {
1060
- const a = r.data[0].relateddata.files[0].id, i = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1059
+ (i) => {
1060
+ const a = i.data[0].relateddata.files[0].id, r = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1061
1061
  K(
1062
1062
  e,
1063
1063
  n,
1064
1064
  a,
1065
1065
  c,
1066
- i,
1066
+ r,
1067
1067
  (d) => {
1068
1068
  s && s(d);
1069
1069
  },
@@ -1117,8 +1117,8 @@ function Me(e, t = void 0, n = void 0) {
1117
1117
  R(
1118
1118
  e,
1119
1119
  o.objID,
1120
- (r) => {
1121
- s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1120
+ (i) => {
1121
+ s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1122
1122
  }
1123
1123
  );
1124
1124
  });
@@ -1129,7 +1129,7 @@ function B(e, t, n = void 0, s = void 0) {
1129
1129
  v,
1130
1130
  (o) => {
1131
1131
  const c = [...t];
1132
- c.find((r) => r.objectID === o.objectId).data = o.data, P = c, j.push(o.data), n && n(j);
1132
+ c.find((i) => i.objectID === o.objectId).data = o.data, P = c, j.push(o.data), n && n(j);
1133
1133
  },
1134
1134
  (o) => {
1135
1135
  s && (s(o), console.log(o));
@@ -1157,7 +1157,7 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1157
1157
  tag: "testTag"
1158
1158
  };
1159
1159
  function Le(e, t, n = void 0, s = void 0) {
1160
- const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
1160
+ const { space: o, tenant: c } = e, { objId: i, pred: a, tag: r } = t, d = {
1161
1161
  uri: "/resources/6w/tags",
1162
1162
  otpCTX: "SecurityContext=preferred",
1163
1163
  optTenant: `tenant=${c}`
@@ -1166,17 +1166,17 @@ function Le(e, t, n = void 0, s = void 0) {
1166
1166
  {
1167
1167
  subject: [
1168
1168
  {
1169
- uri: `pid://${r}`
1169
+ uri: `pid://${i}`
1170
1170
  }
1171
1171
  ],
1172
1172
  predicate: x[a],
1173
1173
  object: {
1174
- literal: i
1174
+ literal: r
1175
1175
  }
1176
1176
  }
1177
1177
  ]
1178
1178
  };
1179
- f(l, {
1179
+ m(l, {
1180
1180
  method: "PUT",
1181
1181
  headers: {
1182
1182
  "Content-Type": "application/json",
@@ -1185,14 +1185,14 @@ function Le(e, t, n = void 0, s = void 0) {
1185
1185
  data: JSON.stringify(p),
1186
1186
  onComplete(u) {
1187
1187
  JSON.parse(u);
1188
- const m = {};
1188
+ const f = {};
1189
1189
  setTimeout(() => {
1190
1190
  G(
1191
1191
  e,
1192
- r,
1192
+ i,
1193
1193
  (g) => {
1194
1194
  const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1195
- m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
1195
+ f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, q(
1196
1196
  e,
1197
1197
  t,
1198
1198
  (y) => {
@@ -1210,9 +1210,9 @@ function Le(e, t, n = void 0, s = void 0) {
1210
1210
  );
1211
1211
  }, 2e3);
1212
1212
  },
1213
- onFailure(u, m) {
1213
+ onFailure(u, f) {
1214
1214
  const g = u;
1215
- g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1215
+ g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1216
1216
  }
1217
1217
  });
1218
1218
  }
@@ -1221,14 +1221,14 @@ function q(e, t, n = void 0, s = void 0) {
1221
1221
  const o = t.info.name, c = {
1222
1222
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1223
1223
  uri: "/federated/search"
1224
- }, r = `${c.baseUrl}${c.uri}`, a = {
1224
+ }, i = `${c.baseUrl}${c.uri}`, a = {
1225
1225
  "Content-Type": "application/json",
1226
1226
  Accept: "application/json,text/javascript,*/*"
1227
- }, i = I(), d = {
1227
+ }, r = I(), d = {
1228
1228
  with_indexing_date: !0,
1229
1229
  with_synthesis: !0,
1230
1230
  with_nls: !1,
1231
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
1231
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1232
1232
  locale: "fr",
1233
1233
  select_predicate: [
1234
1234
  "ds6w:label",
@@ -1285,7 +1285,7 @@ function q(e, t, n = void 0, s = void 0) {
1285
1285
  }
1286
1286
  }
1287
1287
  };
1288
- console.log("dataPattern => ", d), f(r, {
1288
+ console.log("dataPattern => ", d), m(i, {
1289
1289
  method: "POST",
1290
1290
  headers: a,
1291
1291
  data: JSON.stringify(d),
@@ -1300,11 +1300,11 @@ function q(e, t, n = void 0, s = void 0) {
1300
1300
  });
1301
1301
  }
1302
1302
  function Ee(e, t, n = void 0, s = void 0) {
1303
- const { objId: o, pred: c, tag: r } = t, a = {
1303
+ const { objId: o, pred: c, tag: i } = t, a = {
1304
1304
  uri: "/resources/6w/tags",
1305
1305
  otpCTX: "SecurityContext=preferred",
1306
1306
  optTenant: `tenant=${e.tenant}`
1307
- }, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1307
+ }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1308
1308
  tag: [
1309
1309
  {
1310
1310
  subject: [
@@ -1314,12 +1314,12 @@ function Ee(e, t, n = void 0, s = void 0) {
1314
1314
  ],
1315
1315
  predicate: x[c],
1316
1316
  object: {
1317
- literal: r
1317
+ literal: i
1318
1318
  }
1319
1319
  }
1320
1320
  ]
1321
1321
  };
1322
- f(i, {
1322
+ m(r, {
1323
1323
  method: "DELETE",
1324
1324
  data: JSON.stringify(d),
1325
1325
  headers: {
@@ -1341,14 +1341,14 @@ function Je(e, t = "", n = void 0, s = void 0) {
1341
1341
  return;
1342
1342
  const c = {
1343
1343
  uri: "/resources/v1/modeler/documents"
1344
- }, r = {
1344
+ }, i = {
1345
1345
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1346
1346
  Accept: "application/json,text/javascript,*/*"
1347
- }, a = `${o}${c.uri}`, i = `$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}`;
1348
- f(a, {
1347
+ }, a = `${o}${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}`;
1348
+ m(a, {
1349
1349
  method: "POST",
1350
- headers: r,
1351
- data: i,
1350
+ headers: i,
1351
+ data: r,
1352
1352
  onComplete(d) {
1353
1353
  n && n(JSON.parse(d));
1354
1354
  },
@@ -1360,8 +1360,8 @@ function Je(e, t = "", n = void 0, s = void 0) {
1360
1360
  }
1361
1361
  async function w(e, t = void 0, n = void 0) {
1362
1362
  const s = e.space + "/api/index/tk";
1363
- return f(s, {
1364
- onComplete(o, c, r) {
1363
+ return m(s, {
1364
+ onComplete(o, c, i) {
1365
1365
  const a = JSON.parse(o);
1366
1366
  if (t)
1367
1367
  return t(a), e.token = a?.result?.ServerToken;
@@ -1383,7 +1383,7 @@ function Ge(e, t = void 0, n = void 0) {
1383
1383
  }
1384
1384
  };
1385
1385
  w(e, (c) => {
1386
- f(s, {
1386
+ m(s, {
1387
1387
  method: "POST",
1388
1388
  headers: {
1389
1389
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
@@ -1392,11 +1392,11 @@ function Ge(e, t = void 0, n = void 0) {
1392
1392
  },
1393
1393
  data: JSON.stringify(o),
1394
1394
  type: "json",
1395
- onComplete(r, a) {
1396
- t && t(r, a);
1395
+ onComplete(i, a) {
1396
+ t && t(i, a);
1397
1397
  },
1398
- onFailure(r, a) {
1399
- n && n(r, a);
1398
+ onFailure(i, a) {
1399
+ n && n(i, a);
1400
1400
  }
1401
1401
  });
1402
1402
  });
@@ -1412,7 +1412,7 @@ function Ke(e, t = void 0, n = void 0) {
1412
1412
  }
1413
1413
  };
1414
1414
  w(e, (c) => {
1415
- f(s, {
1415
+ m(s, {
1416
1416
  method: "POST",
1417
1417
  headers: {
1418
1418
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
@@ -1421,12 +1421,12 @@ function Ke(e, t = void 0, n = void 0) {
1421
1421
  },
1422
1422
  data: JSON.stringify(o),
1423
1423
  type: "json",
1424
- onComplete(r, a) {
1425
- const i = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1426
- t && t(i, r);
1424
+ onComplete(i, a) {
1425
+ const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1426
+ t && t(r, i);
1427
1427
  },
1428
- onFailure(r, a) {
1429
- n && n(r, a);
1428
+ onFailure(i, a) {
1429
+ n && n(i, a);
1430
1430
  }
1431
1431
  });
1432
1432
  });
@@ -1438,27 +1438,27 @@ function We(e, t = void 0, n = void 0) {
1438
1438
  limit: `/limit/${e.limit ? e.limit : 128}`,
1439
1439
  page: `/page/${e.page ? e.page : "1"}`
1440
1440
  }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1441
- w(e, (r) => {
1442
- f(o, {
1441
+ w(e, (i) => {
1442
+ m(o, {
1443
1443
  method: "GET",
1444
1444
  headers: {
1445
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1445
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1446
1446
  },
1447
- onComplete(a, i, d) {
1447
+ onComplete(a, r, d) {
1448
1448
  const p = JSON.parse(a).result;
1449
1449
  let u = 0;
1450
- p.forEach((m) => {
1450
+ p.forEach((f) => {
1451
1451
  const g = {
1452
- description: m.description,
1453
- id: m.id,
1454
- title: m.title,
1455
- owner: m.owner,
1456
- role: m.role,
1457
- access: m.access
1452
+ description: f.description,
1453
+ id: f.id,
1454
+ title: f.title,
1455
+ owner: f.owner,
1456
+ role: f.role,
1457
+ access: f.access
1458
1458
  };
1459
1459
  Q(
1460
1460
  e,
1461
- m.id,
1461
+ f.id,
1462
1462
  (h) => {
1463
1463
  u++, g.members = h, c.push(g), u === p.length && t && t(c);
1464
1464
  },
@@ -1466,9 +1466,9 @@ function We(e, t = void 0, n = void 0) {
1466
1466
  );
1467
1467
  });
1468
1468
  },
1469
- onFailure(a, i) {
1469
+ onFailure(a, r) {
1470
1470
  const d = a;
1471
- d.status = i.status, d.response = i.errormsg, n && n(d);
1471
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1472
1472
  }
1473
1473
  });
1474
1474
  });
@@ -1481,22 +1481,22 @@ function Q(e, t, n, s) {
1481
1481
  community_id: t
1482
1482
  }
1483
1483
  };
1484
- w(e, (r) => {
1485
- f(o, {
1484
+ w(e, (i) => {
1485
+ m(o, {
1486
1486
  method: "POST",
1487
1487
  headers: {
1488
1488
  "Content-type": "application/json;charset=UTF-8",
1489
1489
  Accept: "application/json",
1490
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1490
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1491
1491
  },
1492
1492
  data: JSON.stringify(c),
1493
1493
  type: "json",
1494
- onComplete(a, i, d) {
1494
+ onComplete(a, r, d) {
1495
1495
  n && n(a);
1496
1496
  },
1497
- onFailure(a, i) {
1497
+ onFailure(a, r) {
1498
1498
  const d = a;
1499
- d.status = i.status, d.response = i.errormsg, s && s(d);
1499
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1500
1500
  }
1501
1501
  });
1502
1502
  });
@@ -1506,20 +1506,20 @@ function Xe(e, t = void 0, n = void 0) {
1506
1506
  e.commu_id || (e.commu_id = s);
1507
1507
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1508
1508
  w(e, (c) => {
1509
- f(o, {
1509
+ m(o, {
1510
1510
  method: "GET",
1511
1511
  headers: {
1512
1512
  "Content-type": "application/json;charset=UTF-8",
1513
1513
  Accept: "application/json",
1514
1514
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1515
1515
  },
1516
- onComplete(r) {
1517
- const a = JSON.parse(r);
1516
+ onComplete(i) {
1517
+ const a = JSON.parse(i);
1518
1518
  t && t(a);
1519
1519
  },
1520
- onFailure(r, a) {
1521
- const i = r;
1522
- i.status = a.status, i.response = a.errormsg, n && n(i);
1520
+ onFailure(i, a) {
1521
+ const r = i;
1522
+ r.status = a.status, r.response = a.errormsg, n && n(r);
1523
1523
  }
1524
1524
  });
1525
1525
  });
@@ -1527,9 +1527,9 @@ function Xe(e, t = void 0, n = void 0) {
1527
1527
  function Ve(e, t, n = void 0, s = void 0) {
1528
1528
  const { listAllContacts: o, currentUser: c } = e;
1529
1529
  console.log("__listAllContacts", o.hits);
1530
- const r = `${e.space}/api/directmessages`, a = {
1530
+ const i = `${e.space}/api/directmessages`, a = {
1531
1531
  users: [c.login].concat(t.receipt)
1532
- }, i = {
1532
+ }, r = {
1533
1533
  id_msg: "",
1534
1534
  senderId: e.currentUser.login,
1535
1535
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1539,14 +1539,14 @@ function Ve(e, t, n = void 0, s = void 0) {
1539
1539
  Z(
1540
1540
  a.users,
1541
1541
  (l) => {
1542
- l !== void 0 && (i.id_msg = l.id, d = !0, $(e, i));
1542
+ l !== void 0 && (r.id_msg = l.id, d = !0, $(e, r));
1543
1543
  },
1544
1544
  (l) => {
1545
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), i.id_msg = "";
1545
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1546
1546
  }
1547
1547
  ), d === !1 && setTimeout(() => {
1548
1548
  d === !1 && w(e, (l) => {
1549
- f(r, {
1549
+ m(i, {
1550
1550
  method: "POST",
1551
1551
  headers: {
1552
1552
  "Content-Type": "application/json",
@@ -1555,11 +1555,11 @@ function Ve(e, t, n = void 0, s = void 0) {
1555
1555
  },
1556
1556
  data: JSON.stringify(a),
1557
1557
  type: "json",
1558
- onComplete(p, u, m) {
1558
+ onComplete(p, u, f) {
1559
1559
  const g = p;
1560
- g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), i.id_msg = g.result.id, $(e, i);
1560
+ g.reponse = JSON.parse(f.response), g.status = f.status, n && n(g), r.id_msg = g.result.id, $(e, r);
1561
1561
  },
1562
- onFailure(p, u, m) {
1562
+ onFailure(p, u, f) {
1563
1563
  const g = p;
1564
1564
  g.msg = u.errormsg, g.status = u.status, s && s(g);
1565
1565
  }
@@ -1570,27 +1570,27 @@ function Ve(e, t, n = void 0, s = void 0) {
1570
1570
  function Z(e, t, n, s) {
1571
1571
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1572
1572
  w(e, (c) => {
1573
- f(o, {
1573
+ m(o, {
1574
1574
  method: "GET",
1575
1575
  headers: {
1576
1576
  Accept: "application/json,text/javascript,*/*",
1577
1577
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1578
1578
  },
1579
- onComplete(r) {
1580
- const a = JSON.parse(r), i = [];
1579
+ onComplete(i) {
1580
+ const a = JSON.parse(i), r = [];
1581
1581
  a.result.forEach((p) => {
1582
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && i.push(p);
1582
+ p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
1583
1583
  });
1584
- const d = t.sort(), l = i.find((p) => {
1584
+ const d = t.sort(), l = r.find((p) => {
1585
1585
  const u = [];
1586
- return p.users.forEach((m) => {
1587
- u.push(m.login);
1586
+ return p.users.forEach((f) => {
1587
+ u.push(f.login);
1588
1588
  }), JSON.stringify(u) === JSON.stringify(d);
1589
1589
  });
1590
1590
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1591
1591
  },
1592
- onFailure(r) {
1593
- const a = r;
1592
+ onFailure(i) {
1593
+ const a = i;
1594
1594
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1595
1595
  }
1596
1596
  });
@@ -1602,7 +1602,7 @@ function $(e, t, n = void 0, s = void 0) {
1602
1602
  uri: "/api/community",
1603
1603
  id_msg: `${t.id_msg}`,
1604
1604
  endUri: "/instantmessages"
1605
- }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
1605
+ }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1606
1606
  author: { login: t.senderId, displayName: t.senderName },
1607
1607
  accessState: null,
1608
1608
  commentUri: null,
@@ -1613,21 +1613,21 @@ function $(e, t, n = void 0, s = void 0) {
1613
1613
  richMessage: t.msg
1614
1614
  };
1615
1615
  console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1616
- f(c, {
1616
+ m(c, {
1617
1617
  method: "POST",
1618
1618
  headers: {
1619
1619
  "Content-Type": "application/json",
1620
1620
  Accept: "application/json",
1621
1621
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1622
1622
  },
1623
- data: JSON.stringify(r),
1623
+ data: JSON.stringify(i),
1624
1624
  type: "json",
1625
- onComplete(i, d, l) {
1626
- const p = i;
1625
+ onComplete(r, d, l) {
1626
+ const p = r;
1627
1627
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1628
1628
  },
1629
- onFailure(i, d) {
1630
- const l = i;
1629
+ onFailure(r, d) {
1630
+ const l = r;
1631
1631
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1632
1632
  }
1633
1633
  });
@@ -1652,14 +1652,14 @@ const te = {
1652
1652
  };
1653
1653
  function Be(e, t, n = void 0, s = void 0) {
1654
1654
  const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1655
- (i) => i.id === t.community_id
1656
- ), r = e.swymCommunities.find(
1657
- (i) => i.title.toLowerCase() === t.community_title.toLowerCase()
1655
+ (r) => r.id === t.community_id
1656
+ ), i = e.swymCommunities.find(
1657
+ (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1658
1658
  ), a = {
1659
1659
  params: {
1660
1660
  title: t.title,
1661
1661
  // String, le nom de l'affaire
1662
- community_id: c?.id !== void 0 ? c.id : r.id,
1662
+ community_id: c?.id !== void 0 ? c.id : i.id,
1663
1663
  // String, l'id de la communauté
1664
1664
  message: ne(t.text_html),
1665
1665
  // STRING => le contenue du message doit être au format HTML
@@ -1667,24 +1667,24 @@ function Be(e, t, n = void 0, s = void 0) {
1667
1667
  // 1 publier, 0 non publier
1668
1668
  }
1669
1669
  };
1670
- w(e, (i) => {
1670
+ w(e, (r) => {
1671
1671
  const d = {
1672
1672
  "Content-type": "application/json;charset=UTF-8",
1673
1673
  Accept: "application/json",
1674
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1674
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1675
1675
  };
1676
- f(o, {
1676
+ m(o, {
1677
1677
  method: "POST",
1678
1678
  headers: d,
1679
1679
  data: JSON.stringify(a),
1680
1680
  type: "json",
1681
1681
  onComplete(l, p, u) {
1682
- const m = JSON.parse(l);
1683
- m.status = u.status, m.response = u.response, n && n(m);
1682
+ const f = JSON.parse(l);
1683
+ f.status = u.status, f.response = u.response, n && n(f);
1684
1684
  },
1685
1685
  onFailure(l, p, u) {
1686
- const m = l;
1687
- m.status = p.status, m.response = p.errormsg, s && s(m);
1686
+ const f = l;
1687
+ f.status = p.status, f.response = p.errormsg, s && s(f);
1688
1688
  }
1689
1689
  });
1690
1690
  });
@@ -1696,22 +1696,22 @@ function Ye(e, t, n = void 0, s = void 0) {
1696
1696
  ideationIds: [t.idee_id]
1697
1697
  }
1698
1698
  };
1699
- w(e, (r) => {
1700
- f(o, {
1699
+ w(e, (i) => {
1700
+ m(o, {
1701
1701
  method: "POST",
1702
1702
  headers: {
1703
1703
  "Content-type": "application/json;charset=UTF-8",
1704
1704
  Accept: "application/json",
1705
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1705
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1706
1706
  },
1707
1707
  data: JSON.stringify(c),
1708
1708
  type: "json",
1709
- onComplete(a, i, d) {
1709
+ onComplete(a, r, d) {
1710
1710
  n && n(a);
1711
1711
  },
1712
- onFailure(a, i, d) {
1712
+ onFailure(a, r, d) {
1713
1713
  const l = a;
1714
- l.status = i.status, l.response = i.errormsg, s && s(l);
1714
+ l.status = r.status, l.response = r.errormsg, s && s(l);
1715
1715
  }
1716
1716
  });
1717
1717
  });
@@ -1719,27 +1719,27 @@ function Ye(e, t, n = void 0, s = void 0) {
1719
1719
  function He(e, t = "", n = void 0, s = void 0) {
1720
1720
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1721
1721
  t === "" && (t = o);
1722
- const c = `${e.space}/api/idea/get`, r = {
1722
+ const c = `${e.space}/api/idea/get`, i = {
1723
1723
  params: {
1724
1724
  id: t
1725
1725
  }
1726
1726
  };
1727
1727
  w(e, (a) => {
1728
- f(c, {
1728
+ m(c, {
1729
1729
  method: "POST",
1730
1730
  headers: {
1731
1731
  "Content-type": "application/json;charset=UTF-8",
1732
1732
  Accept: "application/json",
1733
1733
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1734
1734
  },
1735
- data: JSON.stringify(r),
1735
+ data: JSON.stringify(i),
1736
1736
  type: "json",
1737
- onComplete(i) {
1738
- const d = i;
1737
+ onComplete(r) {
1738
+ const d = r;
1739
1739
  d.msg = d.result.message, n && n(d);
1740
1740
  },
1741
- onFailure(i) {
1742
- const d = i;
1741
+ onFailure(r) {
1742
+ const d = r;
1743
1743
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1744
1744
  }
1745
1745
  });
@@ -1751,19 +1751,19 @@ function ze(e, t = te, n = void 0, s = void 0) {
1751
1751
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1752
1752
  limit: `/limit/${t.limit ? t.limit : 10}`
1753
1753
  }, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
1754
- w(e, (r) => {
1755
- f(c, {
1754
+ w(e, (i) => {
1755
+ m(c, {
1756
1756
  method: "GET",
1757
1757
  headers: {
1758
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1758
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1759
1759
  },
1760
1760
  onComplete(a) {
1761
- const i = JSON.parse(a);
1762
- n && n(i);
1761
+ const r = JSON.parse(a);
1762
+ n && n(r);
1763
1763
  },
1764
- onFailure(a, i) {
1764
+ onFailure(a, r) {
1765
1765
  const d = a;
1766
- d.status = i.status, d.response = i.errormsg, s && s(d);
1766
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1767
1767
  }
1768
1768
  });
1769
1769
  });
@@ -1846,18 +1846,18 @@ function ne(e) {
1846
1846
  function qe(e, t = void 0, n = void 0) {
1847
1847
  const s = e.space + "/api/user/getcurrent/";
1848
1848
  w(e, (o) => {
1849
- f(s, {
1849
+ m(s, {
1850
1850
  method: "GET",
1851
1851
  headers: {
1852
1852
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1853
1853
  },
1854
- onComplete(c, r, a) {
1855
- const i = JSON.parse(c);
1856
- t && t(i.result);
1854
+ onComplete(c, i, a) {
1855
+ const r = JSON.parse(c);
1856
+ t && t(r.result);
1857
1857
  },
1858
- onFailure(c, r, a) {
1859
- const i = { erreur: JSON.parse(c), headers: r, xhr: a };
1860
- n && n(i);
1858
+ onFailure(c, i, a) {
1859
+ const r = { erreur: JSON.parse(c), headers: i, xhr: a };
1860
+ n && n(r);
1861
1861
  }
1862
1862
  });
1863
1863
  });
@@ -1867,15 +1867,15 @@ function Qe(e, t, n = void 0, s = void 0) {
1867
1867
  w(
1868
1868
  e,
1869
1869
  (c) => {
1870
- f(o, {
1870
+ m(o, {
1871
1871
  method: "GET",
1872
1872
  headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1873
- onComplete(r, a, i) {
1874
- const d = JSON.parse(r);
1873
+ onComplete(i, a, r) {
1874
+ const d = JSON.parse(i);
1875
1875
  n && n(d);
1876
1876
  },
1877
- onFailure(r) {
1878
- s && s(r);
1877
+ onFailure(i) {
1878
+ s && s(i);
1879
1879
  }
1880
1880
  });
1881
1881
  },
@@ -1924,7 +1924,7 @@ export {
1924
1924
  he as _AppMngt_get_users,
1925
1925
  me as _getPlateformInfos,
1926
1926
  fe as _getPlatformServices,
1927
- f as _httpCallAuthenticated,
1927
+ m as _httpCallAuthenticated,
1928
1928
  le as _setDraggable,
1929
1929
  ue as _setDroppable,
1930
1930
  pe as _setupTagger,