@beam3_dev/api_module 0.0.91 → 0.0.92

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
3
  import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
- function I() {
4
+ function R() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -67,9 +67,9 @@ async function re(e, t = void 0, s = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let s = N.now().year;
70
- const n = e, i = [], c = (a) => {
71
- for (let r in a)
72
- i.push({ date: r, comment: a[r] });
70
+ const n = e, i = [], r = (a) => {
71
+ for (let o in a)
72
+ i.push({ date: o, comment: a[o] });
73
73
  };
74
74
  for (let a = s; a <= s + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function ce(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((o) => o.json()).then((o) => {
84
+ r(o);
85
+ }).catch((o) => console.error("Erreur : " + o));
86
86
  return (() => {
87
87
  const a = n.length === 0 ? {
88
88
  events: []
89
89
  } : n;
90
- for (let r of i)
90
+ for (let o of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === N.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: N.fromISO(r.date).toISODate(),
96
- end: N.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + o.comment,
95
+ start: N.fromISO(o.date).toISODate(),
96
+ end: N.fromISO(o.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
102
102
  }
103
103
  async function de(e, t, s = !0) {
104
104
  const n = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
105
+ return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
107
  function m(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (s) => {
@@ -145,14 +145,14 @@ async function fe(e, t = void 0, s = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
148
+ const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: s,
153
153
  user: n,
154
154
  appsConfiguration: i,
155
- appConf: c
155
+ appConf: r
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
@@ -169,42 +169,42 @@ function ge(e, t, s) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, o, a) {
173
- const r = JSON.parse(c), d = r.data.map((l) => {
172
+ onComplete(r, c, a) {
173
+ const o = JSON.parse(r), d = o.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, r);
177
+ t && t(d, o);
178
178
  },
179
- onFailure(c, o) {
180
- const a = c;
181
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
179
+ onFailure(r, c) {
180
+ const a = r;
181
+ a.msg = c.errormsg, a.errCode = c.errorcode, s && s(a);
182
182
  }
183
183
  });
184
184
  }
185
185
  function he(e, t = void 0, s = void 0) {
186
186
  let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  m(n, {
188
- onComplete(i, c, o) {
188
+ onComplete(i, r, c) {
189
189
  const a = JSON.parse(i);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(i, c) {
193
- const o = i;
194
- o.msg = c.errormsg, o.errCode = c.errorcode, s && s(o);
192
+ onFailure(i, r) {
193
+ const c = i;
194
+ c.msg = r.errormsg, c.errCode = r.errorcode, s && s(c);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, s = void 0, n = void 0) {
199
199
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  m(i, {
201
- onComplete(c, o, a) {
202
- const r = JSON.parse(c);
203
- s && s(r);
201
+ onComplete(r, c, a) {
202
+ const o = JSON.parse(r);
203
+ s && s(o);
204
204
  },
205
- onFailure(c, o) {
206
- const a = c;
207
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
205
+ onFailure(r, c) {
206
+ const a = r;
207
+ a.msg = c.errormsg, a.errCode = c.errorcode, n && n(a);
208
208
  }
209
209
  });
210
210
  }
@@ -213,14 +213,14 @@ const D = {
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, s = void 0, n = void 0) {
216
- const { space: i, currentUser: c } = e, a = `${i}${{
216
+ const { space: i, currentUser: r } = e, a = `${i}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, r = {
218
+ }.URIUGr}`, o = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
@@ -230,7 +230,7 @@ function _e(e, t, s = void 0, n = void 0) {
230
230
  m(a, {
231
231
  method: "POST",
232
232
  headers: D,
233
- data: JSON.stringify(r),
233
+ data: JSON.stringify(o),
234
234
  onComplete(d) {
235
235
  s && s(JSON.parse(d));
236
236
  },
@@ -242,7 +242,7 @@ function _e(e, t, s = void 0, n = void 0) {
242
242
  });
243
243
  }
244
244
  function ye(e, t, s = void 0, n = void 0) {
245
- const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
245
+ const { space: i, tenant: r } = e, c = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${o}`;
246
246
  m(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,12 +261,12 @@ function ye(e, t, s = void 0, n = void 0) {
261
261
  });
262
262
  }
263
263
  function J(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: i } = e, c = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
264
+ const { space: n, tenant: i } = e, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, o = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${o}${a}`;
267
+ }, d = `${r}${c}${a}`;
268
268
  m(d, {
269
- OPTsH: r,
269
+ OPTsH: o,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -314,15 +314,15 @@ function Ce(e, t) {
314
314
  });
315
315
  }
316
316
  function Te(e, t, s, n = void 0, i = void 0) {
317
- const { space: c, tenant: o } = e, a = {
317
+ const { space: r, tenant: c } = 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:${o}`
325
- }, r = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
324
+ OPTsTenant: `tenant=dstenant:${c}`
325
+ }, o = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(o);
326
326
  m(d, {
327
327
  headers: D,
328
328
  method: "PATCH",
@@ -337,7 +337,7 @@ function Te(e, t, s, n = void 0, i = void 0) {
337
337
  });
338
338
  }
339
339
  function Oe(e, t, s, n = void 0, i = void 0) {
340
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
340
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  m(a, {
342
342
  method: "PATCH",
343
343
  headers: D,
@@ -352,8 +352,8 @@ function Oe(e, t, s, n = void 0, i = void 0) {
352
352
  });
353
353
  }
354
354
  function Ne(e, t, s = void 0, n = void 0) {
355
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- m(o, {
355
+ const { space: i } = e, c = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ m(c, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -376,8 +376,8 @@ async function E(e, t, s) {
376
376
  onComplete(i) {
377
377
  i = JSON.parse(i), t && t(i.csrf);
378
378
  },
379
- onFailure(i, c, o) {
380
- s && s({ error: i, headers: c, xhr: o });
379
+ onFailure(i, r, c) {
380
+ s && s({ error: i, headers: r, xhr: c });
381
381
  }
382
382
  });
383
383
  }
@@ -388,14 +388,14 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
388
388
  console.log("Le paramètre docid est obligatoire");
389
389
  return;
390
390
  }
391
- const c = i + `/resources/v1/modeler/documents/${t}`;
392
- m(c, {
393
- onComplete(o, a, r) {
394
- const d = JSON.parse(o);
391
+ const r = i + `/resources/v1/modeler/documents/${t}`;
392
+ m(r, {
393
+ onComplete(c, a, o) {
394
+ const d = JSON.parse(c);
395
395
  s && s(d);
396
396
  },
397
- onFailure(o) {
398
- n && n(o);
397
+ onFailure(c) {
398
+ n && n(c);
399
399
  }
400
400
  });
401
401
  }
@@ -403,7 +403,7 @@ function k(e, t = void 0, s = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
404
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
405
  m(n, {
406
- onComplete(i, c, o) {
406
+ onComplete(i, r, c) {
407
407
  const a = JSON.parse(i);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
@@ -426,15 +426,15 @@ function T(e, t = void 0, s = void 0) {
426
426
  if (e.space) {
427
427
  const n = e.space + "/resources/v1/application/CSRF";
428
428
  m(n, {
429
- onComplete(i, c, o) {
429
+ onComplete(i, r, c) {
430
430
  const a = JSON.parse(i);
431
431
  t && t(a.csrf.value);
432
432
  },
433
- onFailure(i, c, o) {
433
+ onFailure(i, r, c) {
434
434
  s && s({
435
435
  response: i,
436
- headers: c,
437
- xhr: o
436
+ headers: r,
437
+ xhr: c
438
438
  });
439
439
  }
440
440
  });
@@ -451,12 +451,12 @@ function A(e, t = void 0, s = void 0) {
451
451
  headers: {
452
452
  ENO_CSRF_TOKEN: e.token
453
453
  },
454
- onComplete(c) {
455
- const a = JSON.parse(c).data[0].dataelements.ticketURL;
454
+ onComplete(r) {
455
+ const a = JSON.parse(r).data[0].dataelements.ticketURL;
456
456
  t && t(a);
457
457
  },
458
- onFailure(c, o) {
459
- console.warn("☠️ error => ", c, o), s && s(c, o);
458
+ onFailure(r, c) {
459
+ console.warn("☠️ error => ", r, c), s && s(r, c);
460
460
  }
461
461
  });
462
462
  },
@@ -466,28 +466,28 @@ function A(e, t = void 0, s = void 0) {
466
466
  );
467
467
  }
468
468
  function be(e, t, s, n = void 0, i = void 0) {
469
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- s || (s = e.token), m(c, {
469
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
+ s || (s = e.token), m(r, {
471
471
  method: "PUT",
472
472
  headers: {
473
473
  ENO_CSRF_TOKEN: s
474
474
  },
475
- onComplete(o) {
476
- let a = JSON.parse(o);
475
+ onComplete(c) {
476
+ let a = JSON.parse(c);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
- const r = a.data[0].dataelements.ticketURL;
480
- n && n(r);
481
- } catch (r) {
482
- i && i(r);
479
+ const o = a.data[0].dataelements.ticketURL;
480
+ n && n(o);
481
+ } catch (o) {
482
+ i && i(o);
483
483
  }
484
484
  },
485
- onFailure(o) {
486
- i && i(o);
485
+ onFailure(c) {
486
+ i && i(c);
487
487
  }
488
488
  });
489
489
  }
490
- function K(e, t, s, n, i, c = void 0, o = void 0) {
490
+ function K(e, t, s, n, i, r = void 0, c = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -499,18 +499,18 @@ function K(e, t, s, n, i, c = void 0, o = void 0) {
499
499
  n,
500
500
  i,
501
501
  a.csrf.value,
502
- c,
503
- o
502
+ r,
503
+ c
504
504
  );
505
505
  }
506
506
  );
507
507
  }
508
- function X(e, t, s, n, i, c, o = void 0, a = void 0) {
509
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- m(r, {
508
+ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
509
+ const o = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ m(o, {
511
511
  method: "PUT",
512
512
  headers: {
513
- ENO_CSRF_TOKEN: c
513
+ ENO_CSRF_TOKEN: r
514
514
  },
515
515
  onComplete(d, l, p) {
516
516
  const u = JSON.parse(d).data[0].dataelements, f = new FormData();
@@ -520,7 +520,7 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
520
520
  let S = "temp_" + Date.now(), _ = {
521
521
  method: "PUT",
522
522
  headers: {
523
- ENO_CSRF_TOKEN: c
523
+ ENO_CSRF_TOKEN: r
524
524
  },
525
525
  data: JSON.stringify({
526
526
  data: [{
@@ -540,7 +540,7 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
540
540
  }),
541
541
  type: "json",
542
542
  onComplete(y) {
543
- o && o(y);
543
+ c && c(y);
544
544
  },
545
545
  onFailure(y) {
546
546
  a && a(y);
@@ -556,14 +556,14 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
556
556
  }
557
557
  });
558
558
  }
559
- async function ke(e, t, s, n, i = void 0, c = void 0) {
560
- const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
559
+ async function ke(e, t, s, n, i = void 0, r = void 0) {
560
+ const c = e.space, a = e.token, o = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
561
  type: "text/plain"
562
562
  }), p = {
563
- url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
563
+ url_Ticket: `${c}/resources/v1/modeler/documents/files/CheckinTicket`,
564
+ url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`
565
565
  };
566
- if (!o && o !== "") {
566
+ if (!c && c !== "") {
567
567
  console.log("le store._3DSpace est vide");
568
568
  return;
569
569
  }
@@ -579,7 +579,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
579
579
  method: "POST",
580
580
  data: d,
581
581
  onComplete(C) {
582
- if (r !== "" && a !== "") {
582
+ if (o !== "" && a !== "") {
583
583
  const F = {
584
584
  method: "POST",
585
585
  headers: {
@@ -603,7 +603,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
603
603
  }
604
604
  }]
605
605
  },
606
- tempId: I()
606
+ tempId: R()
607
607
  }]
608
608
  }),
609
609
  type: "json",
@@ -611,7 +611,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
611
611
  onComplete: _,
612
612
  onFailure: y
613
613
  };
614
- r !== "" && m(p.url_Post, F);
614
+ o !== "" && m(p.url_Post, F);
615
615
  } else
616
616
  console.warn("le store est vide");
617
617
  },
@@ -622,18 +622,18 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
622
622
  }
623
623
  function y(C, F) {
624
624
  console.log("Erreur -- response ", C, `
625
- headers `, F), c && c(C);
625
+ headers `, F), r && r(C);
626
626
  }
627
627
  m(h.ticketURL, S);
628
628
  }
629
629
  });
630
630
  }
631
- function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1) {
631
+ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1) {
632
632
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
633
  m(a, {
634
634
  method: "GET",
635
- onComplete(r) {
636
- const d = JSON.parse(r);
635
+ onComplete(o) {
636
+ const d = JSON.parse(o);
637
637
  let l = "", p, u, f;
638
638
  if (t) {
639
639
  let g = d.collabspaces.find((h) => h.title === t);
@@ -652,7 +652,7 @@ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1
652
652
  let y = h.filter(
653
653
  (C) => C.role.name === S
654
654
  );
655
- y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
655
+ y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : r(y);
656
656
  }
657
657
  });
658
658
  }) : h.forEach((S) => {
@@ -662,22 +662,22 @@ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1
662
662
  let _ = h.filter(
663
663
  (y) => y.role.name === s
664
664
  );
665
- _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
665
+ _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : r(_);
666
666
  }
667
667
  }));
668
668
  }
669
669
  }
670
- p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = f + "." + u + "." + p, c(l));
670
+ p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = f + "." + u + "." + p, r(l));
671
671
  },
672
- onFailure(r, d) {
672
+ onFailure(o, d) {
673
673
  console.log("Erreur de récupération du contexte de sécurité. => ", {
674
- err: r,
674
+ err: o,
675
675
  headers: d
676
676
  });
677
677
  }
678
678
  });
679
679
  }
680
- async function R(e, t = void 0, s = void 0) {
680
+ async function v(e, t = void 0, s = void 0) {
681
681
  return (!e.objID || e.objID === "") && console.warn(
682
682
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
683
683
  ), (e.space === "" || !e.space) && console.warn(
@@ -695,36 +695,36 @@ async function R(e, t = void 0, s = void 0) {
695
695
  )), new Promise((n, i) => {
696
696
  A(
697
697
  e,
698
- (c) => {
699
- m(c, {
698
+ (r) => {
699
+ m(r, {
700
700
  headers: {
701
701
  "Content-Type": "application/json",
702
702
  Accept: "application/json"
703
703
  },
704
704
  onComplete(a) {
705
- let r;
705
+ let o;
706
706
  try {
707
- r = JSON.parse(a);
707
+ o = JSON.parse(a);
708
708
  } catch {
709
- r = a;
709
+ o = a;
710
710
  }
711
- t && t(r), n(r);
711
+ t && t(o), n(o);
712
712
  },
713
- onFailure(a, r, d) {
713
+ onFailure(a, o, d) {
714
714
  s && (console.log("error http", a), s({
715
715
  msg: JSON.parse(a),
716
- headers: r,
716
+ headers: o,
717
717
  xhr: d
718
718
  }), i({
719
719
  msg: JSON.parse(a),
720
- headers: r,
720
+ headers: o,
721
721
  xhr: d
722
722
  }));
723
723
  }
724
724
  });
725
725
  },
726
- (c) => {
727
- s && s(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
726
+ (r) => {
727
+ s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
728
728
  }
729
729
  );
730
730
  });
@@ -733,47 +733,47 @@ async function W(e, t, s = void 0, n = void 0) {
733
733
  let i = [];
734
734
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
735
  for (let a = 0; a < t.length; a += 80) {
736
- const r = t.slice(a, a + 80);
737
- i.push(r);
736
+ const o = t.slice(a, a + 80);
737
+ i.push(o);
738
738
  }
739
- const o = (a) => {
739
+ const c = (a) => {
740
740
  V(
741
741
  e,
742
742
  i[a],
743
743
  () => {
744
- a++, a < i.length && o(a);
744
+ a++, a < i.length && c(a);
745
745
  },
746
- (r) => {
747
- s && s(r);
746
+ (o) => {
747
+ s && s(o);
748
748
  }
749
749
  );
750
750
  };
751
- o(0);
751
+ c(0);
752
752
  } else
753
753
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
754
  }
755
755
  function V(e, t, s = void 0, n = void 0, i = void 0) {
756
- const c = [];
757
- t.forEach((r) => {
758
- c.push({
759
- id: r
756
+ const r = [];
757
+ t.forEach((o) => {
758
+ r.push({
759
+ id: o
760
760
  });
761
761
  });
762
- let o = JSON.stringify({
762
+ let c = JSON.stringify({
763
763
  csrf: {
764
764
  name: "ENO_CSRF_TOKEN",
765
765
  value: e.token
766
766
  },
767
- data: c
767
+ data: r
768
768
  });
769
769
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
770
770
  m(a, {
771
771
  method: "PUT",
772
- data: o,
772
+ data: c,
773
773
  type: "json",
774
- onComplete(r) {
775
- const d = r.data;
776
- r.success === !0 && (s && s(), d.forEach((l) => {
774
+ onComplete(o) {
775
+ const d = o.data;
776
+ o.success === !0 && (s && s(), d.forEach((l) => {
777
777
  try {
778
778
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
779
779
  m(u, {
@@ -793,15 +793,15 @@ function V(e, t, s = void 0, n = void 0, i = void 0) {
793
793
  }
794
794
  }));
795
795
  },
796
- onFailure(r) {
797
- console.log(r), i && i(r);
796
+ onFailure(o) {
797
+ console.log(o), i && i(o);
798
798
  }
799
799
  });
800
800
  }
801
801
  function Fe(e, t, s = void 0, n = void 0) {
802
802
  return new Promise((i) => {
803
803
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
804
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
804
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
805
  b(
806
806
  e.space,
807
807
  "ESPACE COMMUN",
@@ -812,7 +812,7 @@ function Fe(e, t, s = void 0, n = void 0) {
812
812
  console.log("onError =>", a);
813
813
  }
814
814
  );
815
- let o = {
815
+ let c = {
816
816
  method: "POST",
817
817
  headers: {
818
818
  SecurityContext: "ctx::" + e.ctx,
@@ -833,22 +833,22 @@ function Fe(e, t, s = void 0, n = void 0) {
833
833
  n && n(a);
834
834
  }
835
835
  };
836
- m(c, o);
836
+ m(r, c);
837
837
  }
838
838
  });
839
839
  }
840
840
  function De(e, t, s, n = void 0, i = void 0) {
841
- return new Promise((c) => {
841
+ return new Promise((r) => {
842
842
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
843
- const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
843
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
844
  b(
845
845
  e.space,
846
846
  "ESPACE COMMUN",
847
847
  ["VPLMProjectLeader", "VPLMCreator"],
848
848
  void 0,
849
- (r) => e.ctx = r,
850
- (r) => {
851
- console.log("onError =>", r);
849
+ (o) => e.ctx = o,
850
+ (o) => {
851
+ console.log("onError =>", o);
852
852
  }
853
853
  );
854
854
  let a = {
@@ -866,21 +866,21 @@ function De(e, t, s, n = void 0, i = void 0) {
866
866
  }]
867
867
  }),
868
868
  type: "json",
869
- onComplete(r) {
870
- n && n(r);
869
+ onComplete(o) {
870
+ n && n(o);
871
871
  },
872
- onFailure(r) {
873
- i && i(r);
872
+ onFailure(o) {
873
+ i && i(o);
874
874
  }
875
875
  };
876
- m(o, a);
876
+ m(c, a);
877
877
  }
878
878
  });
879
879
  }
880
880
  function Ae(e, t, s = void 0, n = void 0) {
881
881
  return new Promise((i) => {
882
882
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
883
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
883
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
884
  b(
885
885
  e.space,
886
886
  "ESPACE COMMUN",
@@ -891,7 +891,7 @@ function Ae(e, t, s = void 0, n = void 0) {
891
891
  console.log("onError =>", a);
892
892
  }
893
893
  );
894
- let o = {
894
+ let c = {
895
895
  method: "POST",
896
896
  headers: {
897
897
  securitycontext: "ctx::" + e.ctx,
@@ -912,14 +912,14 @@ function Ae(e, t, s = void 0, n = void 0) {
912
912
  n && n(a);
913
913
  }
914
914
  };
915
- m(c, o);
915
+ m(r, c);
916
916
  }
917
917
  });
918
918
  }
919
919
  function $e(e, t, s = void 0, n = void 0) {
920
920
  return new Promise((i) => {
921
921
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
922
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
922
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
923
  b(
924
924
  e.space,
925
925
  "ESPACE COMMUN",
@@ -930,7 +930,7 @@ function $e(e, t, s = void 0, n = void 0) {
930
930
  console.log("onError =>", a);
931
931
  }
932
932
  );
933
- let o = {
933
+ let c = {
934
934
  method: "POST",
935
935
  headers: {
936
936
  SecurityContext: "ctx::" + e.ctx,
@@ -957,22 +957,22 @@ function $e(e, t, s = void 0, n = void 0) {
957
957
  n && n(a);
958
958
  }
959
959
  };
960
- m(c, o);
960
+ m(r, c);
961
961
  }
962
962
  });
963
963
  }
964
964
  function Ue(e, t, s, n = void 0, i = void 0) {
965
- return new Promise((c) => {
965
+ return new Promise((r) => {
966
966
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
967
- const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
967
+ const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
968
  b(
969
969
  e.space,
970
970
  "ESPACE COMMUN",
971
971
  ["VPLMProjectLeader", "VPLMCreator"],
972
972
  void 0,
973
- (r) => e.ctx = r,
974
- (r) => {
975
- console.log("onError =>", r);
973
+ (o) => e.ctx = o,
974
+ (o) => {
975
+ console.log("onError =>", o);
976
976
  }
977
977
  );
978
978
  let a = {
@@ -995,28 +995,30 @@ function Ue(e, t, s, n = void 0, i = void 0) {
995
995
  notificationTimeout: 600
996
996
  }),
997
997
  type: "json",
998
- onComplete(r) {
999
- n && n(r);
998
+ onComplete(o) {
999
+ n && n(o);
1000
1000
  },
1001
- onFailure(r) {
1002
- i && i(r);
1001
+ onFailure(o) {
1002
+ i && i(o);
1003
1003
  }
1004
1004
  };
1005
- m(o, a);
1005
+ m(c, a);
1006
1006
  }
1007
1007
  });
1008
1008
  }
1009
1009
  function je(e, t, s = void 0, n = void 0) {
1010
1010
  return new Promise((i) => {
1011
1011
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1012
- const c = N.now().ts;
1013
- `${e.space}`, m(`https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e._platformId}`, {
1014
- onComplete(o) {
1015
- if (Array.isArray(JSON.parse(o))) {
1016
- const a = JSON.parse(o);
1017
- console.log("serviceId=3dsearch", a);
1018
- const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e._platformId}&timestamp=${c}`;
1019
- m(r, {
1012
+ const r = N.now().ts;
1013
+ `${e.space}`;
1014
+ const c = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1015
+ m(c, {
1016
+ onComplete(a) {
1017
+ if (Array.isArray(JSON.parse(a))) {
1018
+ const o = JSON.parse(a);
1019
+ console.log("serviceId=3dsearch", o);
1020
+ const d = `${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e.tenant}&timestamp=${r}`;
1021
+ m(d, {
1020
1022
  method: "POST",
1021
1023
  headers: {
1022
1024
  Accept: "application/json",
@@ -1025,7 +1027,7 @@ function je(e, t, s = void 0, n = void 0) {
1025
1027
  data: JSON.stringify({
1026
1028
  with_indexing_date: !0,
1027
1029
  with_nls: !1,
1028
- label: `yus-${c}`,
1030
+ label: `yus-${r}`,
1029
1031
  locale: "en",
1030
1032
  select_predicate: [
1031
1033
  "ds6w:label",
@@ -1051,17 +1053,17 @@ function je(e, t, s = void 0, n = void 0) {
1051
1053
  tenant: e._platformId
1052
1054
  }),
1053
1055
  type: "json",
1054
- onComplete(d) {
1055
- s && s(d);
1056
+ onComplete(l) {
1057
+ s && s(l);
1056
1058
  },
1057
- onFailure(d) {
1058
- n && n(d);
1059
+ onFailure(l) {
1060
+ n && n(l);
1059
1061
  }
1060
1062
  });
1061
1063
  }
1062
1064
  },
1063
- onFailure(o) {
1064
- n && n(o);
1065
+ onFailure(a) {
1066
+ n && n(a);
1065
1067
  }
1066
1068
  }), JSON.stringify({
1067
1069
  csrf: {
@@ -1084,7 +1086,7 @@ function je(e, t, s = void 0, n = void 0) {
1084
1086
  });
1085
1087
  }
1086
1088
  //!SECTION
1087
- function Ie(e, t = void 0, s = void 0) {
1089
+ function Re(e, t = void 0, s = void 0) {
1088
1090
  const n = {
1089
1091
  base: `${e.space}`,
1090
1092
  uri: "/resources/bps/cspaces",
@@ -1096,57 +1098,57 @@ function Ie(e, t = void 0, s = void 0) {
1096
1098
  Accept: "application/json,text/javascript,*/*",
1097
1099
  "Content-Type": "application/ds-json"
1098
1100
  },
1099
- onComplete(c, o) {
1100
- const a = JSON.parse(c);
1101
- t && t(a, o);
1101
+ onComplete(r, c) {
1102
+ const a = JSON.parse(r);
1103
+ t && t(a, c);
1102
1104
  },
1103
- onFailure(c, o, a) {
1104
- s && s({ response: c, headers: o, xhr: a });
1105
+ onFailure(r, c, a) {
1106
+ s && s({ response: r, headers: c, xhr: a });
1105
1107
  }
1106
1108
  });
1107
1109
  }
1108
- function Re(e, t, s, n) {
1110
+ function ve(e, t, s, n) {
1109
1111
  A(
1110
1112
  e.space,
1111
1113
  t,
1112
1114
  (i) => {
1113
1115
  m(i, {
1114
1116
  header: { ENO_CSRF_TOKEN: e.token },
1115
- onComplete: (c) => {
1116
- s && s(c);
1117
+ onComplete: (r) => {
1118
+ s && s(r);
1117
1119
  },
1118
- onFailure: (c) => {
1119
- console.log("error http", c), n && n(c);
1120
+ onFailure: (r) => {
1121
+ console.log("error http", r), n && n(r);
1120
1122
  }
1121
1123
  });
1122
1124
  }
1123
1125
  );
1124
1126
  }
1125
- async function ve(e, t, s = void 0, n = void 0) {
1127
+ async function Ie(e, t, s = void 0, n = void 0) {
1126
1128
  return new Promise((i) => {
1127
- A(e, t, (c) => {
1128
- m(c, {
1129
- onComplete: (o, a, r) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, r), i),
1130
- onFailure: (o, a, r) => {
1131
- n && n(o, a, r), console.log(o, a?.errormsg);
1129
+ A(e, t, (r) => {
1130
+ m(r, {
1131
+ onComplete: (c, a, o) => (i(JSON.parse(c)), s && s(JSON.parse(c), a, o), i),
1132
+ onFailure: (c, a, o) => {
1133
+ n && n(c, a, o), console.log(c, a?.errormsg);
1132
1134
  }
1133
1135
  });
1134
1136
  });
1135
1137
  });
1136
1138
  }
1137
1139
  function Pe(e, t, s, n = void 0, i = void 0) {
1138
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1140
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1139
1141
  k(
1140
1142
  e,
1141
1143
  s,
1142
- (o) => {
1143
- const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1144
+ (c) => {
1145
+ const a = c.data[0].relateddata.files[0].id, o = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
1144
1146
  K(
1145
1147
  e,
1146
1148
  s,
1147
1149
  a,
1148
- c,
1149
1150
  r,
1151
+ o,
1150
1152
  (d) => {
1151
1153
  n && n(d);
1152
1154
  },
@@ -1157,7 +1159,7 @@ function Pe(e, t, s, n = void 0, i = void 0) {
1157
1159
  }
1158
1160
  );
1159
1161
  }
1160
- let v, P;
1162
+ let I, P;
1161
1163
  const $ = [];
1162
1164
  async function xe(e, t = void 0, s = void 0) {
1163
1165
  e.objID && e.objID !== "" ? k(
@@ -1179,7 +1181,7 @@ async function xe(e, t = void 0, s = void 0) {
1179
1181
  );
1180
1182
  }
1181
1183
  async function Me(e, t = void 0, s = void 0) {
1182
- console.log("getDatasByTenant (getDocuments)", e), await R(
1184
+ console.log("getDatasByTenant (getDocuments)", e), await v(
1183
1185
  e,
1184
1186
  (n) => {
1185
1187
  const i = {};
@@ -1196,12 +1198,12 @@ function Le(e, t = void 0, s = void 0) {
1196
1198
  console.warn("la liste est vide ou n'est pas un tableau");
1197
1199
  return;
1198
1200
  }
1199
- e.objIds.forEach((i, c) => {
1200
- R(
1201
+ e.objIds.forEach((i, r) => {
1202
+ v(
1201
1203
  e,
1202
1204
  i.objID,
1203
- (o) => {
1204
- n.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1205
+ (c) => {
1206
+ n.push({ [i.name]: c }), i.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), B(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1205
1207
  }
1206
1208
  );
1207
1209
  });
@@ -1209,10 +1211,10 @@ function Le(e, t = void 0, s = void 0) {
1209
1211
  function B(e, t, s = void 0, n = void 0) {
1210
1212
  W(
1211
1213
  e,
1212
- v,
1214
+ I,
1213
1215
  (i) => {
1214
- const c = [...t];
1215
- c.find((o) => o.objectID === i.objectId).data = i.data, P = c, $.push(i.data), s && s($);
1216
+ const r = [...t];
1217
+ r.find((c) => c.objectID === i.objectId).data = i.data, P = r, $.push(i.data), s && s($);
1216
1218
  },
1217
1219
  (i) => {
1218
1220
  n && (n(i), console.log(i));
@@ -1240,21 +1242,21 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
1240
1242
  tag: "testTag"
1241
1243
  };
1242
1244
  function Je(e, t, s = void 0, n = void 0) {
1243
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1245
+ const { space: i, tenant: r } = e, { objId: c, pred: a, tag: o } = t, d = {
1244
1246
  uri: "/resources/6w/tags",
1245
1247
  otpCTX: "SecurityContext=preferred",
1246
- optTenant: `tenant=${c}`
1248
+ optTenant: `tenant=${r}`
1247
1249
  }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1248
1250
  tag: [
1249
1251
  {
1250
1252
  subject: [
1251
1253
  {
1252
- uri: `pid://${o}`
1254
+ uri: `pid://${c}`
1253
1255
  }
1254
1256
  ],
1255
1257
  predicate: x[a],
1256
1258
  object: {
1257
- literal: r
1259
+ literal: o
1258
1260
  }
1259
1261
  }
1260
1262
  ]
@@ -1272,7 +1274,7 @@ function Je(e, t, s = void 0, n = void 0) {
1272
1274
  setTimeout(() => {
1273
1275
  G(
1274
1276
  e,
1275
- o,
1277
+ c,
1276
1278
  (g) => {
1277
1279
  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;
1278
1280
  f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, z(
@@ -1301,17 +1303,17 @@ function Je(e, t, s = void 0, n = void 0) {
1301
1303
  }
1302
1304
  function z(e, t, s = void 0, n = void 0) {
1303
1305
  console.log("obj ", t);
1304
- const i = t.info.name, c = {
1306
+ const i = t.info.name, r = {
1305
1307
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1306
1308
  uri: "/federated/search"
1307
- }, o = `${c.baseUrl}${c.uri}`, a = {
1309
+ }, c = `${r.baseUrl}${r.uri}`, a = {
1308
1310
  "Content-Type": "application/json",
1309
1311
  Accept: "application/json,text/javascript,*/*"
1310
- }, r = I(), d = {
1312
+ }, o = R(), d = {
1311
1313
  with_indexing_date: !0,
1312
1314
  with_synthesis: !0,
1313
1315
  with_nls: !1,
1314
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1316
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,
1315
1317
  locale: "fr",
1316
1318
  select_predicate: [
1317
1319
  "ds6w:label",
@@ -1368,7 +1370,7 @@ function z(e, t, s = void 0, n = void 0) {
1368
1370
  }
1369
1371
  }
1370
1372
  };
1371
- console.log("dataPattern => ", d), m(o, {
1373
+ console.log("dataPattern => ", d), m(c, {
1372
1374
  method: "POST",
1373
1375
  headers: a,
1374
1376
  data: JSON.stringify(d),
@@ -1383,11 +1385,11 @@ function z(e, t, s = void 0, n = void 0) {
1383
1385
  });
1384
1386
  }
1385
1387
  function Ee(e, t, s = void 0, n = void 0) {
1386
- const { objId: i, pred: c, tag: o } = t, a = {
1388
+ const { objId: i, pred: r, tag: c } = t, a = {
1387
1389
  uri: "/resources/6w/tags",
1388
1390
  otpCTX: "SecurityContext=preferred",
1389
1391
  optTenant: `tenant=${e.tenant}`
1390
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1392
+ }, o = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1391
1393
  tag: [
1392
1394
  {
1393
1395
  subject: [
@@ -1395,14 +1397,14 @@ function Ee(e, t, s = void 0, n = void 0) {
1395
1397
  uri: `pid://${i}`
1396
1398
  }
1397
1399
  ],
1398
- predicate: x[c],
1400
+ predicate: x[r],
1399
1401
  object: {
1400
- literal: o
1402
+ literal: c
1401
1403
  }
1402
1404
  }
1403
1405
  ]
1404
1406
  };
1405
- m(r, {
1407
+ m(o, {
1406
1408
  method: "DELETE",
1407
1409
  data: JSON.stringify(d),
1408
1410
  headers: {
@@ -1422,16 +1424,16 @@ function Ge(e, t = "", s = void 0, n = void 0) {
1422
1424
  const { space: i } = e;
1423
1425
  if (t === "")
1424
1426
  return;
1425
- const c = {
1427
+ const r = {
1426
1428
  uri: "/resources/v1/modeler/documents"
1427
- }, o = {
1429
+ }, c = {
1428
1430
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1429
1431
  Accept: "application/json,text/javascript,*/*"
1430
- }, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1432
+ }, a = `${i}${r.uri}`, o = `$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}`;
1431
1433
  m(a, {
1432
1434
  method: "POST",
1433
- headers: o,
1434
- data: r,
1435
+ headers: c,
1436
+ data: o,
1435
1437
  onComplete(d) {
1436
1438
  s && s(JSON.parse(d));
1437
1439
  },
@@ -1444,7 +1446,7 @@ function Ge(e, t = "", s = void 0, n = void 0) {
1444
1446
  async function w(e, t = void 0, s = void 0) {
1445
1447
  const n = e.space + "/api/index/tk";
1446
1448
  return m(n, {
1447
- onComplete(i, c, o) {
1449
+ onComplete(i, r, c) {
1448
1450
  const a = JSON.parse(i);
1449
1451
  if (t)
1450
1452
  return t(a), e.token = a?.result?.ServerToken;
@@ -1465,21 +1467,21 @@ function Ke(e, t = void 0, s = void 0) {
1465
1467
  start: 0
1466
1468
  }
1467
1469
  };
1468
- w(e, (c) => {
1470
+ w(e, (r) => {
1469
1471
  m(n, {
1470
1472
  method: "POST",
1471
1473
  headers: {
1472
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1474
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1473
1475
  "Content-type": "application/json;charset=UTF-8",
1474
1476
  Accept: "application/json"
1475
1477
  },
1476
1478
  data: JSON.stringify(i),
1477
1479
  type: "json",
1478
- onComplete(o, a) {
1479
- t && t(o, a);
1480
+ onComplete(c, a) {
1481
+ t && t(c, a);
1480
1482
  },
1481
- onFailure(o, a) {
1482
- s && s(o, a);
1483
+ onFailure(c, a) {
1484
+ s && s(c, a);
1483
1485
  }
1484
1486
  });
1485
1487
  });
@@ -1494,22 +1496,22 @@ function Xe(e, t = void 0, s = void 0) {
1494
1496
  maxNbOfCommonElements: "5"
1495
1497
  }
1496
1498
  };
1497
- w(e, (c) => {
1499
+ w(e, (r) => {
1498
1500
  m(n, {
1499
1501
  method: "POST",
1500
1502
  headers: {
1501
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1503
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1502
1504
  "Content-type": "application/json;charset=UTF-8",
1503
1505
  Accept: "application/json"
1504
1506
  },
1505
1507
  data: JSON.stringify(i),
1506
1508
  type: "json",
1507
- onComplete(o, a) {
1508
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1509
- t && t(r, o);
1509
+ onComplete(c, a) {
1510
+ const o = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1511
+ t && t(o, c);
1510
1512
  },
1511
- onFailure(o, a) {
1512
- s && s(o, a);
1513
+ onFailure(c, a) {
1514
+ s && s(c, a);
1513
1515
  }
1514
1516
  });
1515
1517
  });
@@ -1520,14 +1522,14 @@ function We(e, t = void 0, s = void 0) {
1520
1522
  uri: "/api/community/listmycommunities",
1521
1523
  limit: `/limit/${e.limit ? e.limit : 128}`,
1522
1524
  page: `/page/${e.page ? e.page : "1"}`
1523
- }, i = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1524
- w(e, (o) => {
1525
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1526
+ w(e, (c) => {
1525
1527
  m(i, {
1526
1528
  method: "GET",
1527
1529
  headers: {
1528
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1530
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1529
1531
  },
1530
- onComplete(a, r, d) {
1532
+ onComplete(a, o, d) {
1531
1533
  const p = JSON.parse(a).result;
1532
1534
  let u = 0;
1533
1535
  p.forEach((f) => {
@@ -1543,43 +1545,43 @@ function We(e, t = void 0, s = void 0) {
1543
1545
  e,
1544
1546
  f.id,
1545
1547
  (h) => {
1546
- u++, g.members = h, c.push(g), u === p.length && t && t(c);
1548
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1547
1549
  },
1548
1550
  (h) => s(h)
1549
1551
  );
1550
1552
  });
1551
1553
  },
1552
- onFailure(a, r) {
1554
+ onFailure(a, o) {
1553
1555
  const d = a;
1554
- d.status = r.status, d.response = r.errormsg, s && s(d);
1556
+ d.status = o.status, d.response = o.errormsg, s && s(d);
1555
1557
  }
1556
1558
  });
1557
1559
  });
1558
1560
  }
1559
1561
  function Q(e, t, s, n) {
1560
- const i = `${e.space}/api/community/listmembers`, c = {
1562
+ const i = `${e.space}/api/community/listmembers`, r = {
1561
1563
  params: {
1562
1564
  page: e.page ? e.page : 1,
1563
1565
  limit: e.limit ? e.limit : 50,
1564
1566
  community_id: t
1565
1567
  }
1566
1568
  };
1567
- w(e, (o) => {
1569
+ w(e, (c) => {
1568
1570
  m(i, {
1569
1571
  method: "POST",
1570
1572
  headers: {
1571
1573
  "Content-type": "application/json;charset=UTF-8",
1572
1574
  Accept: "application/json",
1573
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1575
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1574
1576
  },
1575
- data: JSON.stringify(c),
1577
+ data: JSON.stringify(r),
1576
1578
  type: "json",
1577
- onComplete(a, r, d) {
1579
+ onComplete(a, o, d) {
1578
1580
  s && s(a);
1579
1581
  },
1580
- onFailure(a, r) {
1582
+ onFailure(a, o) {
1581
1583
  const d = a;
1582
- d.status = r.status, d.response = r.errormsg, n && n(d);
1584
+ d.status = o.status, d.response = o.errormsg, n && n(d);
1583
1585
  }
1584
1586
  });
1585
1587
  });
@@ -1588,31 +1590,31 @@ function Ve(e, t = void 0, s = void 0) {
1588
1590
  const n = "YXdA5x4DSUKtlAi2wmnyTA";
1589
1591
  e.commu_id || (e.commu_id = n);
1590
1592
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1591
- w(e, (c) => {
1593
+ w(e, (r) => {
1592
1594
  m(i, {
1593
1595
  method: "GET",
1594
1596
  headers: {
1595
1597
  "Content-type": "application/json;charset=UTF-8",
1596
1598
  Accept: "application/json",
1597
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1599
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1598
1600
  },
1599
- onComplete(o) {
1600
- const a = JSON.parse(o);
1601
+ onComplete(c) {
1602
+ const a = JSON.parse(c);
1601
1603
  t && t(a);
1602
1604
  },
1603
- onFailure(o, a) {
1604
- const r = o;
1605
- r.status = a.status, r.response = a.errormsg, s && s(r);
1605
+ onFailure(c, a) {
1606
+ const o = c;
1607
+ o.status = a.status, o.response = a.errormsg, s && s(o);
1606
1608
  }
1607
1609
  });
1608
1610
  });
1609
1611
  }
1610
1612
  function Be(e, t, s = void 0, n = void 0) {
1611
- const { listAllContacts: i, currentUser: c } = e;
1613
+ const { listAllContacts: i, currentUser: r } = e;
1612
1614
  console.log("__listAllContacts", i.hits);
1613
- const o = `${e.space}/api/directmessages`, a = {
1614
- users: [c.login].concat(t.receipt)
1615
- }, r = {
1615
+ const c = `${e.space}/api/directmessages`, a = {
1616
+ users: [r.login].concat(t.receipt)
1617
+ }, o = {
1616
1618
  id_msg: "",
1617
1619
  senderId: e.currentUser.login,
1618
1620
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1622,14 +1624,14 @@ function Be(e, t, s = void 0, n = void 0) {
1622
1624
  Z(
1623
1625
  a.users,
1624
1626
  (l) => {
1625
- l !== void 0 && (r.id_msg = l.id, d = !0, U(e, r));
1627
+ l !== void 0 && (o.id_msg = l.id, d = !0, U(e, o));
1626
1628
  },
1627
1629
  (l) => {
1628
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), r.id_msg = "";
1630
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), o.id_msg = "";
1629
1631
  }
1630
1632
  ), d === !1 && setTimeout(() => {
1631
1633
  d === !1 && w(e, (l) => {
1632
- m(o, {
1634
+ m(c, {
1633
1635
  method: "POST",
1634
1636
  headers: {
1635
1637
  "Content-Type": "application/json",
@@ -1640,7 +1642,7 @@ function Be(e, t, s = void 0, n = void 0) {
1640
1642
  type: "json",
1641
1643
  onComplete(p, u, f) {
1642
1644
  const g = p;
1643
- g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), r.id_msg = g.result.id, U(e, r);
1645
+ g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), o.id_msg = g.result.id, U(e, o);
1644
1646
  },
1645
1647
  onFailure(p, u, f) {
1646
1648
  const g = p;
@@ -1652,19 +1654,19 @@ function Be(e, t, s = void 0, n = void 0) {
1652
1654
  }
1653
1655
  function Z(e, t, s, n) {
1654
1656
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1655
- w(e, (c) => {
1657
+ w(e, (r) => {
1656
1658
  m(i, {
1657
1659
  method: "GET",
1658
1660
  headers: {
1659
1661
  Accept: "application/json,text/javascript,*/*",
1660
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1662
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1661
1663
  },
1662
- onComplete(o) {
1663
- const a = JSON.parse(o), r = [];
1664
+ onComplete(c) {
1665
+ const a = JSON.parse(c), o = [];
1664
1666
  a.result.forEach((p) => {
1665
- p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
1667
+ p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && o.push(p);
1666
1668
  });
1667
- const d = t.sort(), l = r.find((p) => {
1669
+ const d = t.sort(), l = o.find((p) => {
1668
1670
  const u = [];
1669
1671
  return p.users.forEach((f) => {
1670
1672
  u.push(f.login);
@@ -1672,8 +1674,8 @@ function Z(e, t, s, n) {
1672
1674
  });
1673
1675
  s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1674
1676
  },
1675
- onFailure(o) {
1676
- const a = o;
1677
+ onFailure(c) {
1678
+ const a = c;
1677
1679
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1678
1680
  }
1679
1681
  });
@@ -1685,7 +1687,7 @@ function U(e, t, s = void 0, n = void 0) {
1685
1687
  uri: "/api/community",
1686
1688
  id_msg: `${t.id_msg}`,
1687
1689
  endUri: "/instantmessages"
1688
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1690
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, c = {
1689
1691
  author: { login: t.senderId, displayName: t.senderName },
1690
1692
  accessState: null,
1691
1693
  commentUri: null,
@@ -1695,22 +1697,22 @@ function U(e, t, s = void 0, n = void 0) {
1695
1697
  parentCommentUri: null,
1696
1698
  richMessage: t.msg
1697
1699
  };
1698
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1699
- m(c, {
1700
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1701
+ m(r, {
1700
1702
  method: "POST",
1701
1703
  headers: {
1702
1704
  "Content-Type": "application/json",
1703
1705
  Accept: "application/json",
1704
1706
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1705
1707
  },
1706
- data: JSON.stringify(o),
1708
+ data: JSON.stringify(c),
1707
1709
  type: "json",
1708
- onComplete(r, d, l) {
1709
- const p = r;
1710
+ onComplete(o, d, l) {
1711
+ const p = o;
1710
1712
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1711
1713
  },
1712
- onFailure(r, d) {
1713
- const l = r;
1714
+ onFailure(o, d) {
1715
+ const l = o;
1714
1716
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1715
1717
  }
1716
1718
  });
@@ -1734,15 +1736,15 @@ const te = {
1734
1736
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1735
1737
  };
1736
1738
  function Ye(e, t, s = void 0, n = void 0) {
1737
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1738
- (r) => r.id === t.community_id
1739
- ), o = e.swymCommunities.find(
1740
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1739
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1740
+ (o) => o.id === t.community_id
1741
+ ), c = e.swymCommunities.find(
1742
+ (o) => o.title.toLowerCase() === t.community_title.toLowerCase()
1741
1743
  ), a = {
1742
1744
  params: {
1743
1745
  title: t.title,
1744
1746
  // String, le nom de l'affaire
1745
- community_id: c?.id !== void 0 ? c.id : o.id,
1747
+ community_id: r?.id !== void 0 ? r.id : c.id,
1746
1748
  // String, l'id de la communauté
1747
1749
  message: ne(t.text_html),
1748
1750
  // STRING => le contenue du message doit être au format HTML
@@ -1750,11 +1752,11 @@ function Ye(e, t, s = void 0, n = void 0) {
1750
1752
  // 1 publier, 0 non publier
1751
1753
  }
1752
1754
  };
1753
- w(e, (r) => {
1755
+ w(e, (o) => {
1754
1756
  const d = {
1755
1757
  "Content-type": "application/json;charset=UTF-8",
1756
1758
  Accept: "application/json",
1757
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1759
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1758
1760
  };
1759
1761
  m(i, {
1760
1762
  method: "POST",
@@ -1773,28 +1775,28 @@ function Ye(e, t, s = void 0, n = void 0) {
1773
1775
  });
1774
1776
  }
1775
1777
  function qe(e, t, s = void 0, n = void 0) {
1776
- const i = `${e.space}/api/idea/delete`, c = {
1778
+ const i = `${e.space}/api/idea/delete`, r = {
1777
1779
  params: {
1778
1780
  community_id: t.community_id,
1779
1781
  ideationIds: [t.idee_id]
1780
1782
  }
1781
1783
  };
1782
- w(e, (o) => {
1784
+ w(e, (c) => {
1783
1785
  m(i, {
1784
1786
  method: "POST",
1785
1787
  headers: {
1786
1788
  "Content-type": "application/json;charset=UTF-8",
1787
1789
  Accept: "application/json",
1788
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1790
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1789
1791
  },
1790
- data: JSON.stringify(c),
1792
+ data: JSON.stringify(r),
1791
1793
  type: "json",
1792
- onComplete(a, r, d) {
1794
+ onComplete(a, o, d) {
1793
1795
  s && s(a);
1794
1796
  },
1795
- onFailure(a, r, d) {
1797
+ onFailure(a, o, d) {
1796
1798
  const l = a;
1797
- l.status = r.status, l.response = r.errormsg, n && n(l);
1799
+ l.status = o.status, l.response = o.errormsg, n && n(l);
1798
1800
  }
1799
1801
  });
1800
1802
  });
@@ -1802,27 +1804,27 @@ function qe(e, t, s = void 0, n = void 0) {
1802
1804
  function He(e, t = "", s = void 0, n = void 0) {
1803
1805
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1804
1806
  t === "" && (t = i);
1805
- const c = `${e.space}/api/idea/get`, o = {
1807
+ const r = `${e.space}/api/idea/get`, c = {
1806
1808
  params: {
1807
1809
  id: t
1808
1810
  }
1809
1811
  };
1810
1812
  w(e, (a) => {
1811
- m(c, {
1813
+ m(r, {
1812
1814
  method: "POST",
1813
1815
  headers: {
1814
1816
  "Content-type": "application/json;charset=UTF-8",
1815
1817
  Accept: "application/json",
1816
1818
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1817
1819
  },
1818
- data: JSON.stringify(o),
1820
+ data: JSON.stringify(c),
1819
1821
  type: "json",
1820
- onComplete(r) {
1821
- const d = r;
1822
+ onComplete(o) {
1823
+ const d = o;
1822
1824
  d.msg = d.result.message, s && s(d);
1823
1825
  },
1824
- onFailure(r) {
1825
- const d = r;
1826
+ onFailure(o) {
1827
+ const d = o;
1826
1828
  d.status = headers.status, d.response = headers.errormsg, n && n(d);
1827
1829
  }
1828
1830
  });
@@ -1833,20 +1835,20 @@ function ze(e, t = te, s = void 0, n = void 0) {
1833
1835
  uri: "/api/idea/list",
1834
1836
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1835
1837
  limit: `/limit/${t.limit ? t.limit : 10}`
1836
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1837
- w(e, (o) => {
1838
- m(c, {
1838
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1839
+ w(e, (c) => {
1840
+ m(r, {
1839
1841
  method: "GET",
1840
1842
  headers: {
1841
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1843
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1842
1844
  },
1843
1845
  onComplete(a) {
1844
- const r = JSON.parse(a);
1845
- s && s(r);
1846
+ const o = JSON.parse(a);
1847
+ s && s(o);
1846
1848
  },
1847
- onFailure(a, r) {
1849
+ onFailure(a, o) {
1848
1850
  const d = a;
1849
- d.status = r.status, d.response = r.errormsg, n && n(d);
1851
+ d.status = o.status, d.response = o.errormsg, n && n(d);
1850
1852
  }
1851
1853
  });
1852
1854
  });
@@ -1934,13 +1936,13 @@ function Qe(e, t = void 0, s = void 0) {
1934
1936
  headers: {
1935
1937
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1936
1938
  },
1937
- onComplete(c, o, a) {
1938
- const r = JSON.parse(c);
1939
- t && t(r.result);
1939
+ onComplete(r, c, a) {
1940
+ const o = JSON.parse(r);
1941
+ t && t(o.result);
1940
1942
  },
1941
- onFailure(c, o, a) {
1942
- const r = { erreur: JSON.parse(c), headers: o, xhr: a };
1943
- s && s(r);
1943
+ onFailure(r, c, a) {
1944
+ const o = { erreur: JSON.parse(r), headers: c, xhr: a };
1945
+ s && s(o);
1944
1946
  }
1945
1947
  });
1946
1948
  });
@@ -1949,16 +1951,16 @@ function Ze(e, t, s = void 0, n = void 0) {
1949
1951
  const i = e.space + "/api/user/find/login/" + t;
1950
1952
  w(
1951
1953
  e,
1952
- (c) => {
1954
+ (r) => {
1953
1955
  m(i, {
1954
1956
  method: "GET",
1955
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1956
- onComplete(o, a, r) {
1957
- const d = JSON.parse(o);
1957
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1958
+ onComplete(c, a, o) {
1959
+ const d = JSON.parse(c);
1958
1960
  s && s(d);
1959
1961
  },
1960
- onFailure(o) {
1961
- n && n(o);
1962
+ onFailure(c) {
1963
+ n && n(c);
1962
1964
  }
1963
1965
  });
1964
1966
  },
@@ -1970,11 +1972,11 @@ function et(e) {
1970
1972
  return console.log(t), t;
1971
1973
  }
1972
1974
  export {
1973
- I as UUID,
1975
+ R as UUID,
1974
1976
  ke as _3DSpace_Create_Doc,
1975
1977
  je as _3DSpace_bookmark_addSubsciptions,
1976
1978
  T as _3DSpace_csrf,
1977
- R as _3DSpace_download_doc,
1979
+ v as _3DSpace_download_doc,
1978
1980
  W as _3DSpace_download_multidoc,
1979
1981
  K as _3DSpace_file_update,
1980
1982
  X as _3DSpace_file_update_csr,
@@ -2019,15 +2021,15 @@ export {
2019
2021
  B as dataMixing,
2020
2022
  Ce as deleteUserGroups,
2021
2023
  re as findAdresse,
2022
- Ie as getAllContextSecurity,
2024
+ Re as getAllContextSecurity,
2023
2025
  E as getCSRFToken,
2024
2026
  oe as getCommunes,
2025
2027
  ye as getComplementUG,
2026
- Re as getDataFrom3DSpace,
2028
+ ve as getDataFrom3DSpace,
2027
2029
  ce as getDataFromGouvFr,
2028
2030
  Me as getDatasByTenant,
2029
2031
  Le as getDatasFrom3DSpace,
2030
- ve as getDownloadDocument,
2032
+ Ie as getDownloadDocument,
2031
2033
  Ge as getInfoDocTags,
2032
2034
  we as getUserGroupsList,
2033
2035
  J as getUsersGroupRules,