@beam3_dev/api_module 0.0.63 → 0.0.64

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 N } from "luxon";
3
- import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
- function A() {
3
+ import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
+ function R() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -67,7 +67,7 @@ async function re(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let n = N.now().year;
70
- const s = e, o = [], i = (a) => {
70
+ const s = e, o = [], r = (a) => {
71
71
  for (let c in a)
72
72
  o.push({ date: c, comment: a[c] });
73
73
  };
@@ -81,7 +81,7 @@ async function ce(e, t = L) {
81
81
  }
82
82
  }
83
83
  ).then((c) => c.json()).then((c) => {
84
- i(c);
84
+ r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
@@ -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((o) => o.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((o, i) => o.start - i.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((o, r) => o.start - r.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -118,7 +118,7 @@ function pe(e, t = void 0) {
118
118
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
119
  let s;
120
120
  s === void 0 && (s = n.createProxy({
121
- widgetId: R.id,
121
+ widgetId: A.id,
122
122
  filteringMode: "WithFilteringServices"
123
123
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
@@ -132,7 +132,7 @@ async function fe(e, t = void 0, n = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (s) => {
135
- (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
136
136
  s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
@@ -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(), o = t.getAllApplicationConfigurations(), i = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), o = 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: o,
155
- appConf: i
155
+ appConf: r
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
@@ -169,42 +169,42 @@ function ge(e, t, n) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(i, r, a) {
173
- const c = JSON.parse(i), d = c.data.map((l) => {
172
+ onComplete(r, i, 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
177
  t && t(d, c);
178
178
  },
179
- onFailure(i, r) {
180
- const a = i;
181
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
179
+ onFailure(r, i) {
180
+ const a = r;
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
187
  f(s, {
188
- onComplete(o, i, r) {
188
+ onComplete(o, r, i) {
189
189
  const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(o, i) {
193
- const r = o;
194
- r.msg = i.errormsg, r.errCode = i.errorcode, n && n(r);
192
+ onFailure(o, r) {
193
+ const i = o;
194
+ i.msg = r.errormsg, i.errCode = r.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
200
  f(o, {
201
- onComplete(i, r, a) {
202
- const c = JSON.parse(i);
201
+ onComplete(r, i, a) {
202
+ const c = JSON.parse(r);
203
203
  n && n(c);
204
204
  },
205
- onFailure(i, r) {
206
- const a = i;
207
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
205
+ onFailure(r, i) {
206
+ const a = r;
207
+ a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
@@ -213,14 +213,14 @@ const F = {
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, n = void 0, s = void 0) {
216
- const { space: o, currentUser: i } = e, a = `${o}${{
216
+ const { space: o, currentUser: r } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
218
  }.URIUGr}`, c = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [i.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
@@ -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: o, tenant: i } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${i}`, d = `${r}${a}${c}`;
245
+ const { space: o, tenant: r } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${i}${a}${c}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,10 +261,10 @@ function ye(e, t, n = void 0, s = void 0) {
261
261
  });
262
262
  }
263
263
  function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: o } = e, i = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
264
+ const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${i}${r}${a}`;
267
+ }, d = `${r}${i}${a}`;
268
268
  f(d, {
269
269
  OPTsH: c,
270
270
  onComplete(l) {
@@ -314,15 +314,15 @@ function Te(e, t) {
314
314
  });
315
315
  }
316
316
  function Ce(e, t, n, s = void 0, o = void 0) {
317
- const { space: i, tenant: r } = e, a = {
317
+ const { space: r, 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
- }, c = n, d = `${i}${a.URIUGr}/${t}`, l = JSON.stringify(c);
324
+ OPTsTenant: `tenant=dstenant:${i}`
325
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
326
326
  f(d, {
327
327
  headers: F,
328
328
  method: "PATCH",
@@ -337,7 +337,7 @@ function Ce(e, t, n, s = void 0, o = void 0) {
337
337
  });
338
338
  }
339
339
  function Oe(e, t, n, s = void 0, o = void 0) {
340
- const { space: i } = e, a = `${i}/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: F,
@@ -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
+ f(i, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -369,39 +369,33 @@ function be(e, t, n = void 0, s = void 0) {
369
369
  }
370
370
  });
371
371
  }
372
- const J = async (e, t, n) => {
373
- if (!e.space)
374
- return;
375
- const s = `${e.space}/resources/v1/application/CSRF`;
376
- try {
377
- return response = await f(
378
- s,
379
- (o) => {
380
- const i = JSON.parse(o);
381
- return console.log("getCSRFToken() / response => ", i), t?.(i.csrf), i;
372
+ async function J(e, t, n) {
373
+ if (e.space) {
374
+ const s = `${e.space}/resources/v1/application/CSRF`;
375
+ f(s, {
376
+ onComplete(o) {
377
+ o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
382
378
  },
383
- (o) => {
384
- n?.({ error, headers, xhr });
379
+ onFailure(o, r, i) {
380
+ n && n({ error: o, headers: r, xhr: i });
385
381
  }
386
- );
387
- } catch (o) {
388
- n?.("erreur", o);
382
+ });
389
383
  }
390
- };
384
+ }
391
385
  async function G(e, t = void 0, n = void 0, s = void 0) {
392
386
  const o = e.space;
393
387
  if (t === void 0) {
394
388
  console.log("Le paramètre docid est obligatoire");
395
389
  return;
396
390
  }
397
- const i = o + `/resources/v1/modeler/documents/${t}`;
398
- f(i, {
399
- onComplete(r, a, c) {
400
- const d = JSON.parse(r);
391
+ const r = o + `/resources/v1/modeler/documents/${t}`;
392
+ f(r, {
393
+ onComplete(i, a, c) {
394
+ const d = JSON.parse(i);
401
395
  n && n(d);
402
396
  },
403
- onFailure(r) {
404
- s && s(r);
397
+ onFailure(i) {
398
+ s && s(i);
405
399
  }
406
400
  });
407
401
  }
@@ -409,7 +403,7 @@ function k(e, t = void 0, n = void 0) {
409
403
  if (e.objID && e.objID !== "") {
410
404
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
411
405
  console.log("_3DSpace_get_csrf / url", s), f(s, {
412
- onComplete(o, i, r) {
406
+ onComplete(o, r, i) {
413
407
  const a = JSON.parse(o);
414
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
415
409
  },
@@ -432,12 +426,12 @@ function C(e, t = void 0, n = void 0) {
432
426
  if (e.space) {
433
427
  const s = e.space + "/resources/v1/application/CSRF";
434
428
  f(s, {
435
- onComplete(o, i, r) {
429
+ onComplete(o, r, i) {
436
430
  const a = JSON.parse(o);
437
431
  console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
438
432
  },
439
- onFailure(o, i, r) {
440
- n && n({ response: o, headers: i, xhr: r });
433
+ onFailure(o, r, i) {
434
+ n && n({ response: o, headers: r, xhr: i });
441
435
  }
442
436
  });
443
437
  } else
@@ -457,12 +451,12 @@ function U(e, t = void 0, n = void 0) {
457
451
  headers: {
458
452
  ENO_CSRF_TOKEN: e.token
459
453
  },
460
- onComplete(i) {
461
- const a = JSON.parse(i).data[0].dataelements.ticketURL;
454
+ onComplete(r) {
455
+ const a = JSON.parse(r).data[0].dataelements.ticketURL;
462
456
  console.log("le ticket est dans la callback"), t && t(a);
463
457
  },
464
- onFailure(i, r) {
465
- console.warn("☠️ error => ", i, r), n && n(i, r);
458
+ onFailure(r, i) {
459
+ console.warn("☠️ error => ", r, i), n && n(r, i);
466
460
  }
467
461
  });
468
462
  },
@@ -472,14 +466,14 @@ function U(e, t = void 0, n = void 0) {
472
466
  );
473
467
  }
474
468
  function Ne(e, t, n, s = void 0, o = void 0) {
475
- const i = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
476
- n || (n = e.token), f(i, {
469
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
+ n || (n = e.token), f(r, {
477
471
  method: "PUT",
478
472
  headers: {
479
473
  ENO_CSRF_TOKEN: n
480
474
  },
481
- onComplete(r) {
482
- let a = JSON.parse(r);
475
+ onComplete(i) {
476
+ let a = JSON.parse(i);
483
477
  if (console.log("☠️ info => ", a), a.success === !0)
484
478
  try {
485
479
  const c = a.data[0].dataelements.ticketURL;
@@ -488,12 +482,12 @@ function Ne(e, t, n, s = void 0, o = void 0) {
488
482
  o && o(c);
489
483
  }
490
484
  },
491
- onFailure(r) {
492
- o && o(r);
485
+ onFailure(i) {
486
+ o && o(i);
493
487
  }
494
488
  });
495
489
  }
496
- function K(e, t, n, s, o, i = void 0, r = void 0) {
490
+ function K(e, t, n, s, o, r = void 0, i = void 0) {
497
491
  k(
498
492
  e,
499
493
  t,
@@ -505,18 +499,18 @@ function K(e, t, n, s, o, i = void 0, r = void 0) {
505
499
  s,
506
500
  o,
507
501
  a.csrf.value,
508
- i,
509
- r
502
+ r,
503
+ i
510
504
  );
511
505
  }
512
506
  );
513
507
  }
514
- function W(e, t, n, s, o, i, r = void 0, a = void 0) {
508
+ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
515
509
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
516
510
  f(c, {
517
511
  method: "PUT",
518
512
  headers: {
519
- ENO_CSRF_TOKEN: i
513
+ ENO_CSRF_TOKEN: r
520
514
  },
521
515
  onComplete(d, l, p) {
522
516
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
@@ -526,7 +520,7 @@ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
526
520
  let S = "temp_" + Date.now(), _ = {
527
521
  method: "PUT",
528
522
  headers: {
529
- ENO_CSRF_TOKEN: i
523
+ ENO_CSRF_TOKEN: r
530
524
  },
531
525
  data: JSON.stringify({
532
526
  data: [
@@ -550,7 +544,7 @@ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
550
544
  }),
551
545
  type: "json",
552
546
  onComplete(y) {
553
- r && r(y);
547
+ i && i(y);
554
548
  },
555
549
  onFailure(y) {
556
550
  a && a(y);
@@ -566,14 +560,14 @@ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
566
560
  }
567
561
  });
568
562
  }
569
- async function ke(e, t, n, s, o = void 0, i = void 0) {
570
- const r = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
563
+ async function ke(e, t, n, s, o = void 0, r = void 0) {
564
+ const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
571
565
  type: "text/plain"
572
566
  }), p = {
573
- url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
574
- url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
567
+ url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
568
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
575
569
  };
576
- if (!r && r !== "") {
570
+ if (!i && i !== "") {
577
571
  console.log("le store._3DSpace est vide");
578
572
  return;
579
573
  }
@@ -616,7 +610,7 @@ async function ke(e, t, n, s, o = void 0, i = void 0) {
616
610
  }
617
611
  ]
618
612
  },
619
- tempId: A()
613
+ tempId: R()
620
614
  }
621
615
  ]
622
616
  }),
@@ -636,15 +630,15 @@ async function ke(e, t, n, s, o = void 0, i = void 0) {
636
630
  }
637
631
  function y(T, D) {
638
632
  console.log("Erreur -- response ", T, `
639
- headers `, D), i && i(T);
633
+ headers `, D), r && r(T);
640
634
  }
641
635
  f(h.ticketURL, S);
642
636
  }
643
637
  });
644
638
  }
645
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
646
- const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
647
- f(r, {
639
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
640
+ const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
641
+ f(i, {
648
642
  method: "GET",
649
643
  onComplete(a) {
650
644
  const c = JSON.parse(a);
@@ -666,7 +660,7 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
666
660
  let _ = g.filter(
667
661
  (y) => y.role.name === h
668
662
  );
669
- _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : i(_);
663
+ _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : r(_);
670
664
  }
671
665
  });
672
666
  }) : g.forEach((h) => {
@@ -676,12 +670,12 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
676
670
  let S = g.filter(
677
671
  (_) => _.role.name === n
678
672
  );
679
- S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : i(S);
673
+ S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : r(S);
680
674
  }
681
675
  }));
682
676
  }
683
677
  }
684
- l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : i && (d = u + "." + p + "." + l, i(d));
678
+ l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : r && (d = u + "." + p + "." + l, r(d));
685
679
  },
686
680
  onFailure(a) {
687
681
  console.log("Erreur de récupération du contexte de sécurité. => ", a);
@@ -696,32 +690,32 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
696
690
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
697
691
  ), (e.token === "" || !e.token) && (console.log("je récupère un nouveau token"), J(
698
692
  e,
699
- (i) => {
700
- e.token = i;
693
+ (r) => {
694
+ e.token = r;
701
695
  },
702
- (i) => {
703
- console.log("☠️ error => ", i);
696
+ (r) => {
697
+ console.log("☠️ error => ", r);
704
698
  }
705
699
  ), console.warn(
706
700
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
707
701
  )), console.log("_3DSpace_download_doc / credentials", e), U(
708
702
  e,
709
- (i) => {
710
- f(i, {
703
+ (r) => {
704
+ f(r, {
711
705
  headers: {
712
706
  ENO_CSRF_TOKEN: e.token
713
707
  },
714
- onComplete(r) {
715
- const a = JSON.parse(r);
708
+ onComplete(i) {
709
+ const a = JSON.parse(i);
716
710
  console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
717
711
  },
718
- onFailure(r, a, c) {
719
- n && (console.log("error http", r), n({ error: r, headers: a, xhr: c }));
712
+ onFailure(i, a, c) {
713
+ n && (console.log("error http", i), n({ error: i, headers: a, xhr: c }));
720
714
  }
721
715
  });
722
716
  },
723
- (i) => {
724
- n && n(i), console.log("*_3dspace_download_doc / error file URL *", i);
717
+ (r) => {
718
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
725
719
  }
726
720
  );
727
721
  }
@@ -731,38 +725,38 @@ async function X(e, t, n = void 0, s = void 0) {
731
725
  const c = t.slice(a, a + 80);
732
726
  o.push(c);
733
727
  }
734
- const r = (a) => {
728
+ const i = (a) => {
735
729
  V(
736
730
  e,
737
731
  o[a],
738
732
  () => {
739
- a++, a < o.length && r(a);
733
+ a++, a < o.length && i(a);
740
734
  },
741
735
  (c) => {
742
736
  n && n(c);
743
737
  }
744
738
  );
745
739
  };
746
- r(0);
740
+ i(0);
747
741
  }
748
742
  function V(e, t, n = void 0, s = void 0, o = void 0) {
749
- const i = [];
743
+ const r = [];
750
744
  t.forEach((c) => {
751
- i.push({
745
+ r.push({
752
746
  id: c
753
747
  });
754
748
  });
755
- let r = JSON.stringify({
749
+ let i = JSON.stringify({
756
750
  csrf: {
757
751
  name: "ENO_CSRF_TOKEN",
758
752
  value: e.token
759
753
  },
760
- data: i
754
+ data: r
761
755
  });
762
756
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
763
757
  f(a, {
764
758
  method: "PUT",
765
- data: r,
759
+ data: i,
766
760
  type: "json",
767
761
  onComplete(c) {
768
762
  const d = c.data;
@@ -794,7 +788,7 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
794
788
  function De(e, t, n = void 0, s = void 0) {
795
789
  return new Promise((o) => {
796
790
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
797
- const i = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
791
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
798
792
  b(
799
793
  e.space,
800
794
  "ESPACE COMMUN",
@@ -805,7 +799,7 @@ function De(e, t, n = void 0, s = void 0) {
805
799
  console.log("onError =>", a);
806
800
  }
807
801
  );
808
- let r = {
802
+ let i = {
809
803
  method: "POST",
810
804
  headers: {
811
805
  SecurityContext: "ctx::" + e.ctx,
@@ -828,14 +822,14 @@ function De(e, t, n = void 0, s = void 0) {
828
822
  s && s(a);
829
823
  }
830
824
  };
831
- f(i, r);
825
+ f(r, i);
832
826
  }
833
827
  });
834
828
  }
835
829
  function Fe(e, t, n, s = void 0, o = void 0) {
836
- return new Promise((i) => {
830
+ return new Promise((r) => {
837
831
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
838
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
832
+ const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
839
833
  b(
840
834
  e.space,
841
835
  "ESPACE COMMUN",
@@ -870,14 +864,14 @@ function Fe(e, t, n, s = void 0, o = void 0) {
870
864
  o && o(c);
871
865
  }
872
866
  };
873
- f(r, a);
867
+ f(i, a);
874
868
  }
875
869
  });
876
870
  }
877
871
  function Ue(e, t, n = void 0, s = void 0) {
878
872
  return new Promise((o) => {
879
873
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
880
- const i = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
874
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
881
875
  b(
882
876
  e.space,
883
877
  "ESPACE COMMUN",
@@ -888,7 +882,7 @@ function Ue(e, t, n = void 0, s = void 0) {
888
882
  console.log("onError =>", a);
889
883
  }
890
884
  );
891
- let r = {
885
+ let i = {
892
886
  method: "POST",
893
887
  headers: {
894
888
  securitycontext: "ctx::" + e.ctx,
@@ -911,14 +905,14 @@ function Ue(e, t, n = void 0, s = void 0) {
911
905
  s && s(a);
912
906
  }
913
907
  };
914
- f(i, r);
908
+ f(r, i);
915
909
  }
916
910
  });
917
911
  }
918
912
  function $e(e, t, n = void 0, s = void 0) {
919
913
  return new Promise((o) => {
920
914
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
921
- const i = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
915
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
922
916
  b(
923
917
  e.space,
924
918
  "ESPACE COMMUN",
@@ -929,7 +923,7 @@ function $e(e, t, n = void 0, s = void 0) {
929
923
  console.log("onError =>", a);
930
924
  }
931
925
  );
932
- let r = {
926
+ let i = {
933
927
  method: "POST",
934
928
  headers: {
935
929
  SecurityContext: "ctx::" + e.ctx,
@@ -958,14 +952,14 @@ function $e(e, t, n = void 0, s = void 0) {
958
952
  s && s(a);
959
953
  }
960
954
  };
961
- f(i, r);
955
+ f(r, i);
962
956
  }
963
957
  });
964
958
  }
965
959
  function je(e, t, n, s = void 0, o = void 0) {
966
- return new Promise((i) => {
960
+ return new Promise((r) => {
967
961
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
968
- const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
962
+ const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
969
963
  b(
970
964
  e.space,
971
965
  "ESPACE COMMUN",
@@ -1005,12 +999,12 @@ function je(e, t, n, s = void 0, o = void 0) {
1005
999
  o && o(c);
1006
1000
  }
1007
1001
  };
1008
- f(r, a);
1002
+ f(i, a);
1009
1003
  }
1010
1004
  });
1011
1005
  }
1012
1006
  //!SECTION
1013
- function Re(e, t = void 0, n = void 0) {
1007
+ function Ae(e, t = void 0, n = void 0) {
1014
1008
  const s = {
1015
1009
  base: `${e.space}`,
1016
1010
  uri: "/resources/bps/cspaces",
@@ -1022,27 +1016,27 @@ function Re(e, t = void 0, n = void 0) {
1022
1016
  Accept: "application/json,text/javascript,*/*",
1023
1017
  "Content-Type": "application/ds-json"
1024
1018
  },
1025
- onComplete(i, r) {
1026
- const a = JSON.parse(i);
1027
- t && t(a, r);
1019
+ onComplete(r, i) {
1020
+ const a = JSON.parse(r);
1021
+ t && t(a, i);
1028
1022
  },
1029
- onFailure(i, r, a) {
1030
- n && n({ response: i, headers: r, xhr: a });
1023
+ onFailure(r, i, a) {
1024
+ n && n({ response: r, headers: i, xhr: a });
1031
1025
  }
1032
1026
  });
1033
1027
  }
1034
- function Ae(e, t, n, s) {
1028
+ function Re(e, t, n, s) {
1035
1029
  U(
1036
1030
  e.space,
1037
1031
  t,
1038
1032
  (o) => {
1039
1033
  f(o, {
1040
1034
  header: { ENO_CSRF_TOKEN: e.token },
1041
- onComplete: (i) => {
1042
- n && n(i);
1035
+ onComplete: (r) => {
1036
+ n && n(r);
1043
1037
  },
1044
- onFailure: (i) => {
1045
- console.log("error http", i), s && s(i);
1038
+ onFailure: (r) => {
1039
+ console.log("error http", r), s && s(r);
1046
1040
  }
1047
1041
  });
1048
1042
  }
@@ -1050,28 +1044,28 @@ function Ae(e, t, n, s) {
1050
1044
  }
1051
1045
  async function Ie(e, t, n = void 0, s = void 0) {
1052
1046
  return new Promise((o) => {
1053
- U(e, t, (i) => {
1054
- f(i, {
1055
- onComplete: (r, a, c) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, c), o),
1056
- onFailure: (r, a, c) => {
1057
- s && s(r, a, c), console.log(r, a?.errormsg);
1047
+ U(e, t, (r) => {
1048
+ f(r, {
1049
+ onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
1050
+ onFailure: (i, a, c) => {
1051
+ s && s(i, a, c), console.log(i, a?.errormsg);
1058
1052
  }
1059
1053
  });
1060
1054
  });
1061
1055
  });
1062
1056
  }
1063
1057
  function ve(e, t, n, s = void 0, o = void 0) {
1064
- const i = new Blob([JSON.stringify(t)], { type: "text/plain" });
1058
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1065
1059
  k(
1066
1060
  e,
1067
1061
  n,
1068
- (r) => {
1069
- const a = r.data[0].relateddata.files[0].id, c = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1062
+ (i) => {
1063
+ const a = i.data[0].relateddata.files[0].id, c = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1070
1064
  K(
1071
1065
  e,
1072
1066
  n,
1073
1067
  a,
1074
- i,
1068
+ r,
1075
1069
  c,
1076
1070
  (d) => {
1077
1071
  s && s(d);
@@ -1118,15 +1112,15 @@ async function Pe(e, t = void 0, n = void 0) {
1118
1112
  }
1119
1113
  function Me(e, t = void 0, n = void 0) {
1120
1114
  const s = [];
1121
- e.objIds.forEach((o, i) => {
1115
+ e.objIds.forEach((o, r) => {
1122
1116
  I(
1123
1117
  e,
1124
1118
  o.objId,
1125
- (r) => {
1126
- s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, x)), i === e.objIds.length - 1 && t && t(s);
1119
+ (i) => {
1120
+ s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID), B(e, x)), r === e.objIds.length - 1 && t && t(s);
1127
1121
  },
1128
- (r) => {
1129
- n && n(r);
1122
+ (i) => {
1123
+ n && n(i);
1130
1124
  }
1131
1125
  );
1132
1126
  });
@@ -1136,8 +1130,8 @@ function B(e, t, n = void 0, s = void 0) {
1136
1130
  e,
1137
1131
  v,
1138
1132
  (o) => {
1139
- const i = [...t];
1140
- i.find((r) => r.objectID === o.objectId).data = o.data, x = i, $.push(o.data), n && n($);
1133
+ const r = [...t];
1134
+ r.find((i) => i.objectID === o.objectId).data = o.data, x = r, $.push(o.data), n && n($);
1141
1135
  },
1142
1136
  (o) => {
1143
1137
  s && (s(o), console.log(o));
@@ -1165,16 +1159,16 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1165
1159
  tag: "testTag"
1166
1160
  };
1167
1161
  function Le(e, t, n = void 0, s = void 0) {
1168
- const { space: o, tenant: i } = e, { objId: r, pred: a, tag: c } = t, d = {
1162
+ const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
1169
1163
  uri: "/resources/6w/tags",
1170
1164
  otpCTX: "SecurityContext=preferred",
1171
- optTenant: `tenant=${i}`
1165
+ optTenant: `tenant=${r}`
1172
1166
  }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1173
1167
  tag: [
1174
1168
  {
1175
1169
  subject: [
1176
1170
  {
1177
- uri: `pid://${r}`
1171
+ uri: `pid://${i}`
1178
1172
  }
1179
1173
  ],
1180
1174
  predicate: P[a],
@@ -1197,7 +1191,7 @@ function Le(e, t, n = void 0, s = void 0) {
1197
1191
  setTimeout(() => {
1198
1192
  G(
1199
1193
  e,
1200
- r,
1194
+ i,
1201
1195
  (g) => {
1202
1196
  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;
1203
1197
  m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
@@ -1226,13 +1220,13 @@ function Le(e, t, n = void 0, s = void 0) {
1226
1220
  }
1227
1221
  function q(e, t, n = void 0, s = void 0) {
1228
1222
  console.log("obj ", t);
1229
- const o = t.info.name, i = {
1223
+ const o = t.info.name, r = {
1230
1224
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1231
1225
  uri: "/federated/search"
1232
- }, r = `${i.baseUrl}${i.uri}`, a = {
1226
+ }, i = `${r.baseUrl}${r.uri}`, a = {
1233
1227
  "Content-Type": "application/json",
1234
1228
  Accept: "application/json,text/javascript,*/*"
1235
- }, c = A(), d = {
1229
+ }, c = R(), d = {
1236
1230
  with_indexing_date: !0,
1237
1231
  with_synthesis: !0,
1238
1232
  with_nls: !1,
@@ -1293,7 +1287,7 @@ function q(e, t, n = void 0, s = void 0) {
1293
1287
  }
1294
1288
  }
1295
1289
  };
1296
- console.log("dataPattern => ", d), f(r, {
1290
+ console.log("dataPattern => ", d), f(i, {
1297
1291
  method: "POST",
1298
1292
  headers: a,
1299
1293
  data: JSON.stringify(d),
@@ -1308,7 +1302,7 @@ function q(e, t, n = void 0, s = void 0) {
1308
1302
  });
1309
1303
  }
1310
1304
  function Ee(e, t, n = void 0, s = void 0) {
1311
- const { objId: o, pred: i, tag: r } = t, a = {
1305
+ const { objId: o, pred: r, tag: i } = t, a = {
1312
1306
  uri: "/resources/6w/tags",
1313
1307
  otpCTX: "SecurityContext=preferred",
1314
1308
  optTenant: `tenant=${e.tenant}`
@@ -1320,9 +1314,9 @@ function Ee(e, t, n = void 0, s = void 0) {
1320
1314
  uri: `pid://${o}`
1321
1315
  }
1322
1316
  ],
1323
- predicate: P[i],
1317
+ predicate: P[r],
1324
1318
  object: {
1325
- literal: r
1319
+ literal: i
1326
1320
  }
1327
1321
  }
1328
1322
  ]
@@ -1347,15 +1341,15 @@ function Je(e, t = "", n = void 0, s = void 0) {
1347
1341
  const { space: o } = e;
1348
1342
  if (t === "")
1349
1343
  return;
1350
- const i = {
1344
+ const r = {
1351
1345
  uri: "/resources/v1/modeler/documents"
1352
- }, r = {
1346
+ }, i = {
1353
1347
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1354
1348
  Accept: "application/json,text/javascript,*/*"
1355
- }, a = `${o}${i.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}`;
1349
+ }, a = `${o}${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}`;
1356
1350
  f(a, {
1357
1351
  method: "POST",
1358
- headers: r,
1352
+ headers: i,
1359
1353
  data: c,
1360
1354
  onComplete(d) {
1361
1355
  n && n(JSON.parse(d));
@@ -1369,7 +1363,7 @@ function Je(e, t = "", n = void 0, s = void 0) {
1369
1363
  async function w(e, t = void 0, n = void 0) {
1370
1364
  const s = e.space + "/api/index/tk";
1371
1365
  return f(s, {
1372
- onComplete(o, i, r) {
1366
+ onComplete(o, r, i) {
1373
1367
  const a = JSON.parse(o);
1374
1368
  if (t)
1375
1369
  return t(a), e.token = a?.result?.ServerToken;
@@ -1390,21 +1384,21 @@ function Ge(e, t = void 0, n = void 0) {
1390
1384
  start: 0
1391
1385
  }
1392
1386
  };
1393
- w(e, (i) => {
1387
+ w(e, (r) => {
1394
1388
  f(s, {
1395
1389
  method: "POST",
1396
1390
  headers: {
1397
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
1391
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1398
1392
  "Content-type": "application/json;charset=UTF-8",
1399
1393
  Accept: "application/json"
1400
1394
  },
1401
1395
  data: JSON.stringify(o),
1402
1396
  type: "json",
1403
- onComplete(r, a) {
1404
- t && t(r, a);
1397
+ onComplete(i, a) {
1398
+ t && t(i, a);
1405
1399
  },
1406
- onFailure(r, a) {
1407
- n && n(r, a);
1400
+ onFailure(i, a) {
1401
+ n && n(i, a);
1408
1402
  }
1409
1403
  });
1410
1404
  });
@@ -1419,22 +1413,22 @@ function Ke(e, t = void 0, n = void 0) {
1419
1413
  maxNbOfCommonElements: "5"
1420
1414
  }
1421
1415
  };
1422
- w(e, (i) => {
1416
+ w(e, (r) => {
1423
1417
  f(s, {
1424
1418
  method: "POST",
1425
1419
  headers: {
1426
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
1420
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1427
1421
  "Content-type": "application/json;charset=UTF-8",
1428
1422
  Accept: "application/json"
1429
1423
  },
1430
1424
  data: JSON.stringify(o),
1431
1425
  type: "json",
1432
- onComplete(r, a) {
1433
- const c = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1434
- t && t(c, r);
1426
+ onComplete(i, a) {
1427
+ const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1428
+ t && t(c, i);
1435
1429
  },
1436
- onFailure(r, a) {
1437
- n && n(r, a);
1430
+ onFailure(i, a) {
1431
+ n && n(i, a);
1438
1432
  }
1439
1433
  });
1440
1434
  });
@@ -1445,12 +1439,12 @@ function We(e, t = void 0, n = void 0) {
1445
1439
  uri: "/api/community/listmycommunities",
1446
1440
  limit: `/limit/${e.limit ? e.limit : 128}`,
1447
1441
  page: `/page/${e.page ? e.page : "1"}`
1448
- }, o = `${s.base}${s.uri}${s.limit}${s.page}`, i = [];
1449
- w(e, (r) => {
1442
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1443
+ w(e, (i) => {
1450
1444
  f(o, {
1451
1445
  method: "GET",
1452
1446
  headers: {
1453
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1447
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1454
1448
  },
1455
1449
  onComplete(a, c, d) {
1456
1450
  const p = JSON.parse(a).result;
@@ -1468,7 +1462,7 @@ function We(e, t = void 0, n = void 0) {
1468
1462
  e,
1469
1463
  m.id,
1470
1464
  (h) => {
1471
- u++, g.members = h, i.push(g), u === p.length && t && t(i);
1465
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1472
1466
  },
1473
1467
  (h) => n(h)
1474
1468
  );
@@ -1482,22 +1476,22 @@ function We(e, t = void 0, n = void 0) {
1482
1476
  });
1483
1477
  }
1484
1478
  function Q(e, t, n, s) {
1485
- const o = `${e.space}/api/community/listmembers`, i = {
1479
+ const o = `${e.space}/api/community/listmembers`, r = {
1486
1480
  params: {
1487
1481
  page: e.page ? e.page : 1,
1488
1482
  limit: e.limit ? e.limit : 50,
1489
1483
  community_id: t
1490
1484
  }
1491
1485
  };
1492
- w(e, (r) => {
1486
+ w(e, (i) => {
1493
1487
  f(o, {
1494
1488
  method: "POST",
1495
1489
  headers: {
1496
1490
  "Content-type": "application/json;charset=UTF-8",
1497
1491
  Accept: "application/json",
1498
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1492
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1499
1493
  },
1500
- data: JSON.stringify(i),
1494
+ data: JSON.stringify(r),
1501
1495
  type: "json",
1502
1496
  onComplete(a, c, d) {
1503
1497
  n && n(a);
@@ -1513,30 +1507,30 @@ function Xe(e, t = void 0, n = void 0) {
1513
1507
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1514
1508
  e.commu_id || (e.commu_id = s);
1515
1509
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1516
- w(e, (i) => {
1510
+ w(e, (r) => {
1517
1511
  f(o, {
1518
1512
  method: "GET",
1519
1513
  headers: {
1520
1514
  "Content-type": "application/json;charset=UTF-8",
1521
1515
  Accept: "application/json",
1522
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1516
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1523
1517
  },
1524
- onComplete(r) {
1525
- const a = JSON.parse(r);
1518
+ onComplete(i) {
1519
+ const a = JSON.parse(i);
1526
1520
  t && t(a);
1527
1521
  },
1528
- onFailure(r, a) {
1529
- const c = r;
1522
+ onFailure(i, a) {
1523
+ const c = i;
1530
1524
  c.status = a.status, c.response = a.errormsg, n && n(c);
1531
1525
  }
1532
1526
  });
1533
1527
  });
1534
1528
  }
1535
1529
  function Ve(e, t, n = void 0, s = void 0) {
1536
- const { listAllContacts: o, currentUser: i } = e;
1530
+ const { listAllContacts: o, currentUser: r } = e;
1537
1531
  console.log("__listAllContacts", o.hits);
1538
- const r = `${e.space}/api/directmessages`, a = {
1539
- users: [i.login].concat(t.receipt)
1532
+ const i = `${e.space}/api/directmessages`, a = {
1533
+ users: [r.login].concat(t.receipt)
1540
1534
  }, c = {
1541
1535
  id_msg: "",
1542
1536
  senderId: e.currentUser.login,
@@ -1554,7 +1548,7 @@ function Ve(e, t, n = void 0, s = void 0) {
1554
1548
  }
1555
1549
  ), d === !1 && setTimeout(() => {
1556
1550
  d === !1 && w(e, (l) => {
1557
- f(r, {
1551
+ f(i, {
1558
1552
  method: "POST",
1559
1553
  headers: {
1560
1554
  "Content-Type": "application/json",
@@ -1577,15 +1571,15 @@ function Ve(e, t, n = void 0, s = void 0) {
1577
1571
  }
1578
1572
  function Z(e, t, n, s) {
1579
1573
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1580
- w(e, (i) => {
1574
+ w(e, (r) => {
1581
1575
  f(o, {
1582
1576
  method: "GET",
1583
1577
  headers: {
1584
1578
  Accept: "application/json,text/javascript,*/*",
1585
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1579
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1586
1580
  },
1587
- onComplete(r) {
1588
- const a = JSON.parse(r), c = [];
1581
+ onComplete(i) {
1582
+ const a = JSON.parse(i), c = [];
1589
1583
  a.result.forEach((p) => {
1590
1584
  p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1591
1585
  });
@@ -1597,8 +1591,8 @@ function Z(e, t, n, s) {
1597
1591
  });
1598
1592
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1599
1593
  },
1600
- onFailure(r) {
1601
- const a = r;
1594
+ onFailure(i) {
1595
+ const a = i;
1602
1596
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1603
1597
  }
1604
1598
  });
@@ -1610,7 +1604,7 @@ function j(e, t, n = void 0, s = void 0) {
1610
1604
  uri: "/api/community",
1611
1605
  id_msg: `${t.id_msg}`,
1612
1606
  endUri: "/instantmessages"
1613
- }, i = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
1607
+ }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1614
1608
  author: { login: t.senderId, displayName: t.senderName },
1615
1609
  accessState: null,
1616
1610
  commentUri: null,
@@ -1620,15 +1614,15 @@ function j(e, t, n = void 0, s = void 0) {
1620
1614
  parentCommentUri: null,
1621
1615
  richMessage: t.msg
1622
1616
  };
1623
- console.log("_3dSwym_sendDirectMessageData url ", i), w(e, (a) => {
1624
- f(i, {
1617
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1618
+ f(r, {
1625
1619
  method: "POST",
1626
1620
  headers: {
1627
1621
  "Content-Type": "application/json",
1628
1622
  Accept: "application/json",
1629
1623
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1630
1624
  },
1631
- data: JSON.stringify(r),
1625
+ data: JSON.stringify(i),
1632
1626
  type: "json",
1633
1627
  onComplete(c, d, l) {
1634
1628
  const p = c;
@@ -1659,15 +1653,15 @@ const te = {
1659
1653
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1660
1654
  };
1661
1655
  function Be(e, t, n = void 0, s = void 0) {
1662
- const o = `${e.space}/api/idea/add`, i = e.swymCommunities.find(
1656
+ const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1663
1657
  (c) => c.id === t.community_id
1664
- ), r = e.swymCommunities.find(
1658
+ ), i = e.swymCommunities.find(
1665
1659
  (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1666
1660
  ), a = {
1667
1661
  params: {
1668
1662
  title: t.title,
1669
1663
  // String, le nom de l'affaire
1670
- community_id: i?.id !== void 0 ? i.id : r.id,
1664
+ community_id: r?.id !== void 0 ? r.id : i.id,
1671
1665
  // String, l'id de la communauté
1672
1666
  message: ne(t.text_html),
1673
1667
  // STRING => le contenue du message doit être au format HTML
@@ -1698,21 +1692,21 @@ function Be(e, t, n = void 0, s = void 0) {
1698
1692
  });
1699
1693
  }
1700
1694
  function Ye(e, t, n = void 0, s = void 0) {
1701
- const o = `${e.space}/api/idea/delete`, i = {
1695
+ const o = `${e.space}/api/idea/delete`, r = {
1702
1696
  params: {
1703
1697
  community_id: t.community_id,
1704
1698
  ideationIds: [t.idee_id]
1705
1699
  }
1706
1700
  };
1707
- w(e, (r) => {
1701
+ w(e, (i) => {
1708
1702
  f(o, {
1709
1703
  method: "POST",
1710
1704
  headers: {
1711
1705
  "Content-type": "application/json;charset=UTF-8",
1712
1706
  Accept: "application/json",
1713
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1707
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1714
1708
  },
1715
- data: JSON.stringify(i),
1709
+ data: JSON.stringify(r),
1716
1710
  type: "json",
1717
1711
  onComplete(a, c, d) {
1718
1712
  n && n(a);
@@ -1727,20 +1721,20 @@ function Ye(e, t, n = void 0, s = void 0) {
1727
1721
  function He(e, t = "", n = void 0, s = void 0) {
1728
1722
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1729
1723
  t === "" && (t = o);
1730
- const i = `${e.space}/api/idea/get`, r = {
1724
+ const r = `${e.space}/api/idea/get`, i = {
1731
1725
  params: {
1732
1726
  id: t
1733
1727
  }
1734
1728
  };
1735
1729
  w(e, (a) => {
1736
- f(i, {
1730
+ f(r, {
1737
1731
  method: "POST",
1738
1732
  headers: {
1739
1733
  "Content-type": "application/json;charset=UTF-8",
1740
1734
  Accept: "application/json",
1741
1735
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1742
1736
  },
1743
- data: JSON.stringify(r),
1737
+ data: JSON.stringify(i),
1744
1738
  type: "json",
1745
1739
  onComplete(c) {
1746
1740
  const d = c;
@@ -1758,12 +1752,12 @@ function ze(e, t = te, n = void 0, s = void 0) {
1758
1752
  uri: "/api/idea/list",
1759
1753
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1760
1754
  limit: `/limit/${t.limit ? t.limit : 10}`
1761
- }, i = `${e.space}${o.uri}${o.comId}${o.limit}`;
1762
- w(e, (r) => {
1763
- f(i, {
1755
+ }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1756
+ w(e, (i) => {
1757
+ f(r, {
1764
1758
  method: "GET",
1765
1759
  headers: {
1766
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1760
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1767
1761
  },
1768
1762
  onComplete(a) {
1769
1763
  const c = JSON.parse(a);
@@ -1859,12 +1853,12 @@ function qe(e, t = void 0, n = void 0) {
1859
1853
  headers: {
1860
1854
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1861
1855
  },
1862
- onComplete(i, r, a) {
1863
- const c = JSON.parse(i);
1856
+ onComplete(r, i, a) {
1857
+ const c = JSON.parse(r);
1864
1858
  t && t(c.result);
1865
1859
  },
1866
- onFailure(i, r, a) {
1867
- const c = { erreur: JSON.parse(i), headers: r, xhr: a };
1860
+ onFailure(r, i, a) {
1861
+ const c = { erreur: JSON.parse(r), headers: i, xhr: a };
1868
1862
  n && n(c);
1869
1863
  }
1870
1864
  });
@@ -1874,16 +1868,16 @@ function Qe(e, t, n = void 0, s = void 0) {
1874
1868
  const o = e.space + "/api/user/find/login/" + t;
1875
1869
  w(
1876
1870
  e,
1877
- (i) => {
1871
+ (r) => {
1878
1872
  f(o, {
1879
1873
  method: "GET",
1880
- headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1881
- onComplete(r, a, c) {
1882
- const d = JSON.parse(r);
1874
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1875
+ onComplete(i, a, c) {
1876
+ const d = JSON.parse(i);
1883
1877
  n && n(d);
1884
1878
  },
1885
- onFailure(r) {
1886
- s && s(r);
1879
+ onFailure(i) {
1880
+ s && s(i);
1887
1881
  }
1888
1882
  });
1889
1883
  },
@@ -1895,7 +1889,7 @@ function Ze(e) {
1895
1889
  return console.log(t), t;
1896
1890
  }
1897
1891
  export {
1898
- A as UUID,
1892
+ R as UUID,
1899
1893
  ke as _3DSpace_Create_Doc,
1900
1894
  C as _3DSpace_csrf,
1901
1895
  I as _3DSpace_download_doc,
@@ -1943,11 +1937,11 @@ export {
1943
1937
  B as dataMixing,
1944
1938
  Te as deleteUserGroups,
1945
1939
  re as findAdresse,
1946
- Re as getAllContextSecurity,
1940
+ Ae as getAllContextSecurity,
1947
1941
  J as getCSRFToken,
1948
1942
  ie as getCommunes,
1949
1943
  ye as getComplementUG,
1950
- Ae as getDataFrom3DSpace,
1944
+ Re as getDataFrom3DSpace,
1951
1945
  ce as getDataFromGouvFr,
1952
1946
  Pe as getDatasByTenant,
1953
1947
  Me as getDatasFrom3DSpace,