@beam3_dev/api_module 0.0.105 → 0.0.107

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
@@ -44,10 +44,10 @@ async function ce(e, t = void 0, n = void 0) {
44
44
  Accept: "application/json"
45
45
  }
46
46
  }
47
- ).then((o) => o.json()).then((o) => {
48
- t && t(o);
49
- }).catch((o) => {
50
- n && n(o), console.error("Erreur : " + o);
47
+ ).then((i) => i.json()).then((i) => {
48
+ t && t(i);
49
+ }).catch((i) => {
50
+ n && n(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
53
  async function de(e, t = void 0, n = void 0) {
@@ -67,9 +67,9 @@ async function de(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function le(e, t = L) {
69
69
  let n = N.now().year;
70
- const s = e, o = [], r = (a) => {
70
+ const s = e, i = [], r = (a) => {
71
71
  for (let c in a)
72
- o.push({ date: c, comment: a[c] });
72
+ i.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -87,7 +87,7 @@ async function le(e, t = L) {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let c of o)
90
+ for (let c of i)
91
91
  a.events.findIndex(
92
92
  (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
@@ -101,8 +101,8 @@ async function le(e, t = L) {
101
101
  })();
102
102
  }
103
103
  async function pe(e, t, n = !0) {
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, r) => o.start - r.start), e;
104
+ const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -150,13 +150,13 @@ async function ge(e, t = void 0, n = void 0) {
150
150
  function J() {
151
151
  let e = {};
152
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
154
154
  "com.3ds.wp.passport.cors"
155
155
  );
156
156
  e = {
157
157
  tenant: n,
158
158
  user: s,
159
- appsConfiguration: o,
159
+ appsConfiguration: i,
160
160
  appConf: r
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
@@ -165,17 +165,18 @@ function E(e, t = void 0, n = void 0) {
165
165
  if (e.tenant) {
166
166
  const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
167
  f(s, {
168
- onComplete(o) {
169
- const r = JSON.parse(o);
170
- if (console.log("_getServiceUrl", r), r && "platforms" in r) {
171
- const i = r.platforms.find((a) => {
168
+ onComplete(i) {
169
+ console.log("_getServiceUrl", i);
170
+ const r = typeof i == "string" ? JSON.parse(i) : i;
171
+ if (r && "platforms" in r) {
172
+ const o = r.platforms.find((a) => {
172
173
  a.id, e.tenant.toUpperCase();
173
174
  });
174
- t && t(i);
175
+ t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
175
176
  }
176
177
  },
177
- onFailure(o) {
178
- n && n(o);
178
+ onFailure(i) {
179
+ n && n(i);
179
180
  }
180
181
  });
181
182
  }
@@ -184,15 +185,15 @@ function he(e, t = void 0, n = void 0) {
184
185
  if (e.tenant) {
185
186
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
186
187
  f(s, {
187
- onComplete(o) {
188
- const r = JSON.parse(o);
188
+ onComplete(i) {
189
+ const r = JSON.parse(i);
189
190
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
190
- const i = `${r[0].services[0].url}`;
191
- t && t(i);
191
+ const o = `${r[0].services[0].url}`;
192
+ t && t(o);
192
193
  }
193
194
  },
194
- onFailure(o) {
195
- n && n(o);
195
+ onFailure(i) {
196
+ n && n(i);
196
197
  }
197
198
  });
198
199
  }
@@ -203,58 +204,58 @@ function Se(e, t, n) {
203
204
  uri: "/resources/AppsMngt/api/custom/applications",
204
205
  option: `?filter=${e.tenant}`
205
206
  // facultatif
206
- }, o = `${s.base}${s.uri}${s.option}`;
207
- f(o, {
207
+ }, i = `${s.base}${s.uri}${s.option}`;
208
+ f(i, {
208
209
  method: "GET",
209
210
  headers: {
210
211
  "Content-Type": "application/json",
211
212
  Accept: "application/json"
212
213
  },
213
- onComplete(r, i, a) {
214
+ onComplete(r, o, a) {
214
215
  const c = JSON.parse(r), d = c.data.map((l) => {
215
216
  const p = l.attributes.name, u = l.id;
216
217
  return { name: p, id: u };
217
218
  });
218
219
  t && t(d, c);
219
220
  },
220
- onFailure(r, i) {
221
+ onFailure(r, o) {
221
222
  const a = r;
222
- a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
223
+ a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
223
224
  }
224
225
  });
225
226
  }
226
227
  function _e(e, t = void 0, n = void 0) {
227
228
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
228
229
  f(s, {
229
- onComplete(o, r, i) {
230
- const a = JSON.parse(o);
230
+ onComplete(i, r, o) {
231
+ const a = JSON.parse(i);
231
232
  console.log("_AppMngt_get_users => ", a), t && t(a);
232
233
  },
233
- onFailure(o, r) {
234
- const i = o;
235
- i.msg = r.errormsg, i.errCode = r.errorcode, n && n(i);
234
+ onFailure(i, r) {
235
+ const o = i;
236
+ o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
236
237
  }
237
238
  });
238
239
  }
239
240
  function ye(e, t, n = void 0, s = void 0) {
240
- let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
241
- f(o, {
242
- onComplete(r, i, a) {
241
+ let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
+ f(i, {
243
+ onComplete(r, o, a) {
243
244
  const c = JSON.parse(r);
244
245
  n && n(c);
245
246
  },
246
- onFailure(r, i) {
247
+ onFailure(r, o) {
247
248
  const a = r;
248
- a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
249
+ a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
249
250
  }
250
251
  });
251
252
  }
252
- const v = {
253
+ const F = {
253
254
  "Content-Type": "application/json",
254
255
  Accept: "application/json,text/javascript,*/*"
255
256
  };
256
257
  function we(e, t, n = void 0, s = void 0) {
257
- const { space: o, currentUser: r } = e, a = `${o}${{
258
+ const { space: i, currentUser: r } = e, a = `${i}${{
258
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
259
260
  }.URIUGr}`, c = {
260
261
  groups: [
@@ -270,7 +271,7 @@ function we(e, t, n = void 0, s = void 0) {
270
271
  };
271
272
  f(a, {
272
273
  method: "POST",
273
- headers: v,
274
+ headers: F,
274
275
  data: JSON.stringify(c),
275
276
  onComplete(d) {
276
277
  n && n(JSON.parse(d));
@@ -283,7 +284,7 @@ function we(e, t, n = void 0, s = void 0) {
283
284
  });
284
285
  }
285
286
  function Ce(e, t, n = void 0, s = void 0) {
286
- 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}`;
287
+ const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
287
288
  f(d, {
288
289
  opts: {
289
290
  method: "GET",
@@ -302,10 +303,10 @@ function Ce(e, t, n = void 0, s = void 0) {
302
303
  });
303
304
  }
304
305
  function G(e, t = void 0, n = void 0) {
305
- const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
306
+ const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
306
307
  method: "GET",
307
308
  Accept: "application/json,*/*,test/javascript"
308
- }, d = `${r}${i}${a}`;
309
+ }, d = `${r}${o}${a}`;
309
310
  f(d, {
310
311
  OPTsH: c,
311
312
  onComplete(l) {
@@ -318,7 +319,7 @@ function G(e, t = void 0, n = void 0) {
318
319
  });
319
320
  }
320
321
  function Te(e, t = void 0, n = void 0) {
321
- const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
322
+ const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
322
323
  "Content-Type": "application/json",
323
324
  Accept: "application/json,text/javascript,*/*"
324
325
  } };
@@ -327,8 +328,8 @@ function Te(e, t = void 0, n = void 0) {
327
328
  opts: d,
328
329
  onComplete(l) {
329
330
  const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
330
- if (o && Object.keys(o).length > 0) {
331
- const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
331
+ if (i && Object.keys(i).length > 0) {
332
+ const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
332
333
  u.iam = S, u.UG = m, u.iamMember = h, G(
333
334
  e,
334
335
  (_) => {
@@ -349,23 +350,23 @@ function Te(e, t = void 0, n = void 0) {
349
350
  }
350
351
  }
351
352
  function Oe(e, t) {
352
- const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
353
- f(o, {
353
+ const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
+ f(i, {
354
355
  method: "DELETE"
355
356
  });
356
357
  }
357
- function be(e, t, n, s = void 0, o = void 0) {
358
- const { space: r, tenant: i } = e, a = {
358
+ function be(e, t, n, s = void 0, i = void 0) {
359
+ const { space: r, tenant: o } = e, a = {
359
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
360
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
361
362
  nextURICh: "/characteristics",
362
363
  nextURIGr: "/group",
363
364
  nexURImem: "/members",
364
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
365
- OPTsTenant: `tenant=dstenant:${i}`
366
+ OPTsTenant: `tenant=dstenant:${o}`
366
367
  }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
367
368
  f(d, {
368
- headers: v,
369
+ headers: F,
369
370
  method: "PATCH",
370
371
  data: l,
371
372
  type: "json",
@@ -373,28 +374,28 @@ function be(e, t, n, s = void 0, o = void 0) {
373
374
  s && s(p);
374
375
  },
375
376
  onFailure(p) {
376
- o && o(p);
377
+ i && i(p);
377
378
  }
378
379
  });
379
380
  }
380
- function Ne(e, t, n, s = void 0, o = void 0) {
381
+ function Ne(e, t, n, s = void 0, i = void 0) {
381
382
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
382
383
  f(a, {
383
384
  method: "PATCH",
384
- headers: v,
385
+ headers: F,
385
386
  data: JSON.stringify(n),
386
387
  type: "json",
387
388
  onComplete(d) {
388
389
  s && s(d);
389
390
  },
390
391
  onFailure(d) {
391
- o && o(d);
392
+ i && i(d);
392
393
  }
393
394
  });
394
395
  }
395
396
  function ke(e, t, n = void 0, s = void 0) {
396
- const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
397
- f(i, {
397
+ const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
+ f(o, {
398
399
  opts: {
399
400
  method: "GET",
400
401
  headers: {
@@ -414,29 +415,29 @@ async function K(e, t, n) {
414
415
  if (e.space) {
415
416
  const s = `${e.space}/resources/v1/application/CSRF`;
416
417
  f(s, {
417
- onComplete(o) {
418
- o = JSON.parse(o), t && t(o.csrf);
418
+ onComplete(i) {
419
+ i = JSON.parse(i), t && t(i.csrf);
419
420
  },
420
- onFailure(o, r, i) {
421
- n && n({ error: o, headers: r, xhr: i });
421
+ onFailure(i, r, o) {
422
+ n && n({ error: i, headers: r, xhr: o });
422
423
  }
423
424
  });
424
425
  }
425
426
  }
426
427
  async function X(e, t = void 0, n = void 0, s = void 0) {
427
- const o = e.space;
428
+ const i = e.space;
428
429
  if (t === void 0) {
429
430
  console.log("Le paramètre docid est obligatoire");
430
431
  return;
431
432
  }
432
- const r = o + `/resources/v1/modeler/documents/${t}`;
433
+ const r = i + `/resources/v1/modeler/documents/${t}`;
433
434
  f(r, {
434
- onComplete(i, a, c) {
435
- const d = JSON.parse(i);
435
+ onComplete(o, a, c) {
436
+ const d = JSON.parse(o);
436
437
  n && n(d);
437
438
  },
438
- onFailure(i) {
439
- s && s(i);
439
+ onFailure(o) {
440
+ s && s(o);
440
441
  }
441
442
  });
442
443
  }
@@ -444,12 +445,12 @@ function k(e, t = void 0, n = void 0) {
444
445
  if (e.objID && e.objID !== "") {
445
446
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
446
447
  f(s, {
447
- onComplete(o, r, i) {
448
- const a = JSON.parse(o);
448
+ onComplete(i, r, o) {
449
+ const a = JSON.parse(i);
449
450
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
450
451
  },
451
- onFailure(o) {
452
- n && n(o);
452
+ onFailure(i) {
453
+ n && n(i);
453
454
  }
454
455
  });
455
456
  } else
@@ -467,15 +468,15 @@ function T(e, t = void 0, n = void 0) {
467
468
  if (e.space) {
468
469
  const s = e.space + "/resources/v1/application/CSRF";
469
470
  f(s, {
470
- onComplete(o, r, i) {
471
- const a = JSON.parse(o);
471
+ onComplete(i, r, o) {
472
+ const a = JSON.parse(i);
472
473
  t && t(a.csrf.value);
473
474
  },
474
- onFailure(o, r, i) {
475
+ onFailure(i, r, o) {
475
476
  n && n({
476
- response: o,
477
+ response: i,
477
478
  headers: r,
478
- xhr: i
479
+ xhr: o
479
480
  });
480
481
  }
481
482
  });
@@ -486,7 +487,7 @@ function A(e, t = void 0, n = void 0) {
486
487
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
487
488
  k(
488
489
  e,
489
- (o) => {
490
+ (i) => {
490
491
  f(s, {
491
492
  method: "PUT",
492
493
  headers: {
@@ -496,39 +497,39 @@ function A(e, t = void 0, n = void 0) {
496
497
  const a = JSON.parse(r).data[0].dataelements.ticketURL;
497
498
  t && t(a);
498
499
  },
499
- onFailure(r, i) {
500
- console.warn("☠️ error => ", r, i), n && n(r, i);
500
+ onFailure(r, o) {
501
+ console.warn("☠️ error => ", r, o), n && n(r, o);
501
502
  }
502
503
  });
503
504
  },
504
- (o) => {
505
- console.warn("_3DSpace_get_ticket / error => ", o), n && n(o);
505
+ (i) => {
506
+ console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
506
507
  }
507
508
  );
508
509
  }
509
- function Fe(e, t, n, s = void 0, o = void 0) {
510
+ function ve(e, t, n, s = void 0, i = void 0) {
510
511
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
511
512
  n || (n = e.token), f(r, {
512
513
  method: "PUT",
513
514
  headers: {
514
515
  ENO_CSRF_TOKEN: n
515
516
  },
516
- onComplete(i) {
517
- let a = JSON.parse(i);
517
+ onComplete(o) {
518
+ let a = JSON.parse(o);
518
519
  if (console.log("☠️ info => ", a), a.success === !0)
519
520
  try {
520
521
  const c = a.data[0].dataelements.ticketURL;
521
522
  s && s(c);
522
523
  } catch (c) {
523
- o && o(c);
524
+ i && i(c);
524
525
  }
525
526
  },
526
- onFailure(i) {
527
- o && o(i);
527
+ onFailure(o) {
528
+ i && i(o);
528
529
  }
529
530
  });
530
531
  }
531
- function V(e, t, n, s, o, r = void 0, i = void 0) {
532
+ function V(e, t, n, s, i, r = void 0, o = void 0) {
532
533
  k(
533
534
  e,
534
535
  t,
@@ -538,15 +539,15 @@ function V(e, t, n, s, o, r = void 0, i = void 0) {
538
539
  t,
539
540
  n,
540
541
  s,
541
- o,
542
+ i,
542
543
  a.csrf.value,
543
544
  r,
544
- i
545
+ o
545
546
  );
546
547
  }
547
548
  );
548
549
  }
549
- function W(e, t, n, s, o, r, i = void 0, a = void 0) {
550
+ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
550
551
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
551
552
  f(c, {
552
553
  method: "PUT",
@@ -555,7 +556,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
555
556
  },
556
557
  onComplete(d, l, p) {
557
558
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
558
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
559
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, i);
559
560
  const g = {};
560
561
  g.method = "POST", g.data = m, g.onComplete = function(h) {
561
562
  let S = "temp_" + Date.now(), _ = {
@@ -570,7 +571,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
570
571
  files: [{
571
572
  id: n,
572
573
  dataelements: {
573
- title: o,
574
+ title: i,
574
575
  receipt: h
575
576
  },
576
577
  updateAction: "REVISE"
@@ -581,7 +582,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
581
582
  }),
582
583
  type: "json",
583
584
  onComplete(y) {
584
- i && i(y);
585
+ o && o(y);
585
586
  },
586
587
  onFailure(y) {
587
588
  a && a(y);
@@ -597,14 +598,14 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
597
598
  }
598
599
  });
599
600
  }
600
- async function ve(e, t, n, s, o = void 0, r = void 0) {
601
- const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
601
+ async function Fe(e, t, n, s, i = void 0, r = void 0) {
602
+ const o = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
602
603
  type: "text/plain"
603
604
  }), p = {
604
- url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
605
- url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
605
+ url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
606
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
606
607
  };
607
- if (!i && i !== "") {
608
+ if (!o && o !== "") {
608
609
  console.log("le store._3DSpace est vide");
609
610
  return;
610
611
  }
@@ -621,7 +622,7 @@ async function ve(e, t, n, s, o = void 0, r = void 0) {
621
622
  data: d,
622
623
  onComplete(C) {
623
624
  if (c !== "" && a !== "") {
624
- const F = {
625
+ const v = {
625
626
  method: "POST",
626
627
  headers: {
627
628
  ENO_CSRF_TOKEN: a,
@@ -652,24 +653,24 @@ async function ve(e, t, n, s, o = void 0, r = void 0) {
652
653
  onComplete: _,
653
654
  onFailure: y
654
655
  };
655
- c !== "" && f(p.url_Post, F);
656
+ c !== "" && f(p.url_Post, v);
656
657
  } else
657
658
  console.warn("le store est vide");
658
659
  },
659
660
  onFailure: y
660
661
  };
661
662
  function _(C) {
662
- console.log("Success -- response ", C.data[0]), o && o(C);
663
+ console.log("Success -- response ", C.data[0]), i && i(C);
663
664
  }
664
- function y(C, F) {
665
+ function y(C, v) {
665
666
  console.log("Erreur -- response ", C, `
666
- headers `, F), r && r(C);
667
+ headers `, v), r && r(C);
667
668
  }
668
669
  f(h.ticketURL, S);
669
670
  }
670
671
  });
671
672
  }
672
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0, i = !1) {
673
+ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
673
674
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
674
675
  f(a, {
675
676
  method: "GET",
@@ -708,7 +709,7 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0, i = !1
708
709
  }));
709
710
  }
710
711
  }
711
- p && u && m ? (l = m + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = m + "." + u + "." + p, r(l));
712
+ p && u && m ? (l = m + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = m + "." + u + "." + p, r(l));
712
713
  },
713
714
  onFailure(c, d) {
714
715
  console.log("Erreur de récupération du contexte de sécurité. => ", {
@@ -733,7 +734,7 @@ async function I(e, t = void 0, n = void 0) {
733
734
  }
734
735
  ), console.warn(
735
736
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
736
- )), new Promise((s, o) => {
737
+ )), new Promise((s, i) => {
737
738
  A(
738
739
  e,
739
740
  (r) => {
@@ -756,7 +757,7 @@ async function I(e, t = void 0, n = void 0) {
756
757
  msg: JSON.parse(a),
757
758
  headers: c,
758
759
  xhr: d
759
- }), o({
760
+ }), i({
760
761
  msg: JSON.parse(a),
761
762
  headers: c,
762
763
  xhr: d
@@ -765,42 +766,42 @@ async function I(e, t = void 0, n = void 0) {
765
766
  });
766
767
  },
767
768
  (r) => {
768
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
769
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
769
770
  }
770
771
  );
771
772
  });
772
773
  }
773
774
  async function B(e, t, n = void 0, s = void 0) {
774
- let o = [];
775
+ let i = [];
775
776
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
776
777
  for (let a = 0; a < t.length; a += 80) {
777
778
  const c = t.slice(a, a + 80);
778
- o.push(c);
779
+ i.push(c);
779
780
  }
780
- const i = (a) => {
781
+ const o = (a) => {
781
782
  Y(
782
783
  e,
783
- o[a],
784
+ i[a],
784
785
  () => {
785
- a++, a < o.length && i(a);
786
+ a++, a < i.length && o(a);
786
787
  },
787
788
  (c) => {
788
789
  n && n(c);
789
790
  }
790
791
  );
791
792
  };
792
- i(0);
793
+ o(0);
793
794
  } else
794
795
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
795
796
  }
796
- function Y(e, t, n = void 0, s = void 0, o = void 0) {
797
+ function Y(e, t, n = void 0, s = void 0, i = void 0) {
797
798
  const r = [];
798
799
  t.forEach((c) => {
799
800
  r.push({
800
801
  id: c
801
802
  });
802
803
  });
803
- let i = JSON.stringify({
804
+ let o = JSON.stringify({
804
805
  csrf: {
805
806
  name: "ENO_CSRF_TOKEN",
806
807
  value: e.token
@@ -810,7 +811,7 @@ function Y(e, t, n = void 0, s = void 0, o = void 0) {
810
811
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
811
812
  f(a, {
812
813
  method: "PUT",
813
- data: i,
814
+ data: o,
814
815
  type: "json",
815
816
  onComplete(c) {
816
817
  const d = c.data;
@@ -830,17 +831,17 @@ function Y(e, t, n = void 0, s = void 0, o = void 0) {
830
831
  }
831
832
  });
832
833
  } catch (p) {
833
- console.log(p), o && o(p);
834
+ console.log(p), i && i(p);
834
835
  }
835
836
  }));
836
837
  },
837
838
  onFailure(c) {
838
- console.log(c), o && o(c);
839
+ console.log(c), i && i(c);
839
840
  }
840
841
  });
841
842
  }
842
843
  function Ae(e, t, n = void 0, s = void 0) {
843
- return new Promise((o) => {
844
+ return new Promise((i) => {
844
845
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
845
846
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
846
847
  b(
@@ -853,7 +854,7 @@ function Ae(e, t, n = void 0, s = void 0) {
853
854
  console.log("onError =>", a);
854
855
  }
855
856
  );
856
- let i = {
857
+ let o = {
857
858
  method: "POST",
858
859
  headers: {
859
860
  SecurityContext: "ctx::" + e.ctx,
@@ -874,14 +875,14 @@ function Ae(e, t, n = void 0, s = void 0) {
874
875
  s && s(a);
875
876
  }
876
877
  };
877
- f(r, i);
878
+ f(r, o);
878
879
  }
879
880
  });
880
881
  }
881
- function $e(e, t, n, s = void 0, o = void 0) {
882
+ function $e(e, t, n, s = void 0, i = void 0) {
882
883
  return new Promise((r) => {
883
884
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
884
- const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
885
+ const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
885
886
  b(
886
887
  e.space,
887
888
  "ESPACE COMMUN",
@@ -911,15 +912,15 @@ function $e(e, t, n, s = void 0, o = void 0) {
911
912
  s && s(c);
912
913
  },
913
914
  onFailure(c) {
914
- o && o(c);
915
+ i && i(c);
915
916
  }
916
917
  };
917
- f(i, a);
918
+ f(o, a);
918
919
  }
919
920
  });
920
921
  }
921
922
  function De(e, t, n = void 0, s = void 0) {
922
- return new Promise((o) => {
923
+ return new Promise((i) => {
923
924
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
924
925
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
925
926
  b(
@@ -932,7 +933,7 @@ function De(e, t, n = void 0, s = void 0) {
932
933
  console.log("onError =>", a);
933
934
  }
934
935
  );
935
- let i = {
936
+ let o = {
936
937
  method: "POST",
937
938
  headers: {
938
939
  securitycontext: "ctx::" + e.ctx,
@@ -953,12 +954,12 @@ function De(e, t, n = void 0, s = void 0) {
953
954
  s && s(a);
954
955
  }
955
956
  };
956
- f(r, i);
957
+ f(r, o);
957
958
  }
958
959
  });
959
960
  }
960
961
  function Ue(e, t, n = void 0, s = void 0) {
961
- return new Promise((o) => {
962
+ return new Promise((i) => {
962
963
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
963
964
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
964
965
  b(
@@ -971,7 +972,7 @@ function Ue(e, t, n = void 0, s = void 0) {
971
972
  console.log("onError =>", a);
972
973
  }
973
974
  );
974
- let i = {
975
+ let o = {
975
976
  method: "POST",
976
977
  headers: {
977
978
  SecurityContext: "ctx::" + e.ctx,
@@ -998,14 +999,14 @@ function Ue(e, t, n = void 0, s = void 0) {
998
999
  s && s(a);
999
1000
  }
1000
1001
  };
1001
- f(r, i);
1002
+ f(r, o);
1002
1003
  }
1003
1004
  });
1004
1005
  }
1005
- function je(e, t, n, s = void 0, o = void 0) {
1006
+ function je(e, t, n, s = void 0, i = void 0) {
1006
1007
  return new Promise((r) => {
1007
1008
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1008
- const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1009
+ const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1009
1010
  b(
1010
1011
  e.space,
1011
1012
  "ESPACE COMMUN",
@@ -1040,15 +1041,15 @@ function je(e, t, n, s = void 0, o = void 0) {
1040
1041
  s && s(c);
1041
1042
  },
1042
1043
  onFailure(c) {
1043
- o && o(c);
1044
+ i && i(c);
1044
1045
  }
1045
1046
  };
1046
- f(i, a);
1047
+ f(o, a);
1047
1048
  }
1048
1049
  });
1049
1050
  }
1050
- function Ie(e, t, n, s, o = void 0, r = void 0) {
1051
- return console.log("credentials", e), new Promise((i) => {
1051
+ function Ie(e, t, n, s, i = void 0, r = void 0) {
1052
+ return console.log("credentials", e), new Promise((o) => {
1052
1053
  `${e.space}`, JSON.stringify({
1053
1054
  csrf: {
1054
1055
  name: "ENO_CSRF_TOKEN",
@@ -1074,19 +1075,19 @@ function Re(e, t = void 0, n = void 0) {
1074
1075
  base: `${e.space}`,
1075
1076
  uri: "/resources/bps/cspaces",
1076
1077
  optTenant: `tenant=${e.tenant}`
1077
- }, o = `${s.base}${s.uri}?${s.optTenant}`;
1078
- f(o, {
1078
+ }, i = `${s.base}${s.uri}?${s.optTenant}`;
1079
+ f(i, {
1079
1080
  method: "GET",
1080
1081
  headers: {
1081
1082
  Accept: "application/json,text/javascript,*/*",
1082
1083
  "Content-Type": "application/ds-json"
1083
1084
  },
1084
- onComplete(r, i) {
1085
+ onComplete(r, o) {
1085
1086
  const a = JSON.parse(r);
1086
- t && t(a, i);
1087
+ t && t(a, o);
1087
1088
  },
1088
- onFailure(r, i, a) {
1089
- n && n({ response: r, headers: i, xhr: a });
1089
+ onFailure(r, o, a) {
1090
+ n && n({ response: r, headers: o, xhr: a });
1090
1091
  }
1091
1092
  });
1092
1093
  }
@@ -1094,8 +1095,8 @@ function Pe(e, t, n, s) {
1094
1095
  A(
1095
1096
  e.space,
1096
1097
  t,
1097
- (o) => {
1098
- f(o, {
1098
+ (i) => {
1099
+ f(i, {
1099
1100
  header: { ENO_CSRF_TOKEN: e.token },
1100
1101
  onComplete: (r) => {
1101
1102
  n && n(r);
@@ -1108,24 +1109,24 @@ function Pe(e, t, n, s) {
1108
1109
  );
1109
1110
  }
1110
1111
  async function xe(e, t, n = void 0, s = void 0) {
1111
- return new Promise((o) => {
1112
+ return new Promise((i) => {
1112
1113
  A(e, t, (r) => {
1113
1114
  f(r, {
1114
- onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
1115
- onFailure: (i, a, c) => {
1116
- s && s(i, a, c), console.log(i, a?.errormsg);
1115
+ onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1116
+ onFailure: (o, a, c) => {
1117
+ s && s(o, a, c), console.log(o, a?.errormsg);
1117
1118
  }
1118
1119
  });
1119
1120
  });
1120
1121
  });
1121
1122
  }
1122
- function Me(e, t, n, s = void 0, o = void 0) {
1123
+ function Me(e, t, n, s = void 0, i = void 0) {
1123
1124
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1124
1125
  k(
1125
1126
  e,
1126
1127
  n,
1127
- (i) => {
1128
- 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;
1128
+ (o) => {
1129
+ const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1129
1130
  V(
1130
1131
  e,
1131
1132
  n,
@@ -1136,7 +1137,7 @@ function Me(e, t, n, s = void 0, o = void 0) {
1136
1137
  s && s(d);
1137
1138
  },
1138
1139
  (d) => {
1139
- o && o(d);
1140
+ i && i(d);
1140
1141
  }
1141
1142
  );
1142
1143
  }
@@ -1167,8 +1168,8 @@ async function Je(e, t = void 0, n = void 0) {
1167
1168
  console.log("getDatasByTenant (getDocuments)", e), await I(
1168
1169
  e,
1169
1170
  (s) => {
1170
- const o = {};
1171
- o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1171
+ const i = {};
1172
+ i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1172
1173
  },
1173
1174
  (s) => {
1174
1175
  n && n?.(s);
@@ -1181,12 +1182,12 @@ function Ee(e, t = void 0, n = void 0) {
1181
1182
  console.warn("la liste est vide ou n'est pas un tableau");
1182
1183
  return;
1183
1184
  }
1184
- e.objIds.forEach((o, r) => {
1185
+ e.objIds.forEach((i, r) => {
1185
1186
  I(
1186
1187
  e,
1187
- o.objID,
1188
- (i) => {
1189
- s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1188
+ i.objID,
1189
+ (o) => {
1190
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1190
1191
  }
1191
1192
  );
1192
1193
  });
@@ -1195,12 +1196,12 @@ function q(e, t, n = void 0, s = void 0) {
1195
1196
  B(
1196
1197
  e,
1197
1198
  R,
1198
- (o) => {
1199
+ (i) => {
1199
1200
  const r = [...t];
1200
- r.find((i) => i.objectID === o.objectId).data = o.data, P = r, $.push(o.data), n && n($);
1201
+ r.find((o) => o.objectID === i.objectId).data = i.data, P = r, $.push(i.data), n && n($);
1201
1202
  },
1202
- (o) => {
1203
- s && (s(o), console.log(o));
1203
+ (i) => {
1204
+ s && (s(i), console.log(i));
1204
1205
  }
1205
1206
  );
1206
1207
  }
@@ -1225,16 +1226,16 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1225
1226
  tag: "testTag"
1226
1227
  };
1227
1228
  function Ge(e, t, n = void 0, s = void 0) {
1228
- const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
1229
+ const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1229
1230
  uri: "/resources/6w/tags",
1230
1231
  otpCTX: "SecurityContext=preferred",
1231
1232
  optTenant: `tenant=${r}`
1232
- }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1233
+ }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1233
1234
  tag: [
1234
1235
  {
1235
1236
  subject: [
1236
1237
  {
1237
- uri: `pid://${i}`
1238
+ uri: `pid://${o}`
1238
1239
  }
1239
1240
  ],
1240
1241
  predicate: x[a],
@@ -1257,7 +1258,7 @@ function Ge(e, t, n = void 0, s = void 0) {
1257
1258
  setTimeout(() => {
1258
1259
  X(
1259
1260
  e,
1260
- i,
1261
+ o,
1261
1262
  (g) => {
1262
1263
  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;
1263
1264
  m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, Z(
@@ -1286,10 +1287,10 @@ function Ge(e, t, n = void 0, s = void 0) {
1286
1287
  }
1287
1288
  function Z(e, t, n = void 0, s = void 0) {
1288
1289
  console.log("obj ", t);
1289
- const o = t.info.name, r = {
1290
+ const i = t.info.name, r = {
1290
1291
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1291
1292
  uri: "/federated/search"
1292
- }, i = `${r.baseUrl}${r.uri}`, a = {
1293
+ }, o = `${r.baseUrl}${r.uri}`, a = {
1293
1294
  "Content-Type": "application/json",
1294
1295
  Accept: "application/json,text/javascript,*/*"
1295
1296
  }, c = j(), d = {
@@ -1324,7 +1325,7 @@ function Z(e, t, n = void 0, s = void 0) {
1324
1325
  ],
1325
1326
  with_synthesis_hierarchical: !0,
1326
1327
  select_file: ["icon", "thumbnail_2d"],
1327
- query: o,
1328
+ query: i,
1328
1329
  specific_source_parameter: {
1329
1330
  "3dspace": {
1330
1331
  additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
@@ -1353,7 +1354,7 @@ function Z(e, t, n = void 0, s = void 0) {
1353
1354
  }
1354
1355
  }
1355
1356
  };
1356
- console.log("dataPattern => ", d), f(i, {
1357
+ console.log("dataPattern => ", d), f(o, {
1357
1358
  method: "POST",
1358
1359
  headers: a,
1359
1360
  data: JSON.stringify(d),
@@ -1368,7 +1369,7 @@ function Z(e, t, n = void 0, s = void 0) {
1368
1369
  });
1369
1370
  }
1370
1371
  function Ke(e, t, n = void 0, s = void 0) {
1371
- const { objId: o, pred: r, tag: i } = t, a = {
1372
+ const { objId: i, pred: r, tag: o } = t, a = {
1372
1373
  uri: "/resources/6w/tags",
1373
1374
  otpCTX: "SecurityContext=preferred",
1374
1375
  optTenant: `tenant=${e.tenant}`
@@ -1377,12 +1378,12 @@ function Ke(e, t, n = void 0, s = void 0) {
1377
1378
  {
1378
1379
  subject: [
1379
1380
  {
1380
- uri: `pid://${o}`
1381
+ uri: `pid://${i}`
1381
1382
  }
1382
1383
  ],
1383
1384
  predicate: x[r],
1384
1385
  object: {
1385
- literal: i
1386
+ literal: o
1386
1387
  }
1387
1388
  }
1388
1389
  ]
@@ -1404,18 +1405,18 @@ function Ke(e, t, n = void 0, s = void 0) {
1404
1405
  });
1405
1406
  }
1406
1407
  function Xe(e, t = "", n = void 0, s = void 0) {
1407
- const { space: o } = e;
1408
+ const { space: i } = e;
1408
1409
  if (t === "")
1409
1410
  return;
1410
1411
  const r = {
1411
1412
  uri: "/resources/v1/modeler/documents"
1412
- }, i = {
1413
+ }, o = {
1413
1414
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1414
1415
  Accept: "application/json,text/javascript,*/*"
1415
- }, 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}`;
1416
+ }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1416
1417
  f(a, {
1417
1418
  method: "POST",
1418
- headers: i,
1419
+ headers: o,
1419
1420
  data: c,
1420
1421
  onComplete(d) {
1421
1422
  n && n(JSON.parse(d));
@@ -1429,18 +1430,18 @@ function Xe(e, t = "", n = void 0, s = void 0) {
1429
1430
  async function w(e, t = void 0, n = void 0) {
1430
1431
  const s = e.space + "/api/index/tk";
1431
1432
  return f(s, {
1432
- onComplete(o, r, i) {
1433
- const a = JSON.parse(o);
1433
+ onComplete(i, r, o) {
1434
+ const a = JSON.parse(i);
1434
1435
  if (t)
1435
1436
  return t(a), e.token = a?.result?.ServerToken;
1436
1437
  },
1437
- onFailure(o) {
1438
- n && n(o);
1438
+ onFailure(i) {
1439
+ n && n(i);
1439
1440
  }
1440
1441
  });
1441
1442
  }
1442
1443
  function Ve(e, t = void 0, n = void 0) {
1443
- const s = `${e.space}/api/exalead/whatsnew`, o = {
1444
+ const s = `${e.space}/api/exalead/whatsnew`, i = {
1444
1445
  params: {
1445
1446
  community_id: null,
1446
1447
  hash_key: null,
@@ -1458,19 +1459,19 @@ function Ve(e, t = void 0, n = void 0) {
1458
1459
  "Content-type": "application/json;charset=UTF-8",
1459
1460
  Accept: "application/json"
1460
1461
  },
1461
- data: JSON.stringify(o),
1462
+ data: JSON.stringify(i),
1462
1463
  type: "json",
1463
- onComplete(i, a) {
1464
- t && t(i, a);
1464
+ onComplete(o, a) {
1465
+ t && t(o, a);
1465
1466
  },
1466
- onFailure(i, a) {
1467
- n && n(i, a);
1467
+ onFailure(o, a) {
1468
+ n && n(o, a);
1468
1469
  }
1469
1470
  });
1470
1471
  });
1471
1472
  }
1472
1473
  function We(e, t = void 0, n = void 0) {
1473
- const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1474
+ const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1474
1475
  params: {
1475
1476
  idsToFilterArr: [],
1476
1477
  mode: "offline",
@@ -1487,14 +1488,14 @@ function We(e, t = void 0, n = void 0) {
1487
1488
  "Content-type": "application/json;charset=UTF-8",
1488
1489
  Accept: "application/json"
1489
1490
  },
1490
- data: JSON.stringify(o),
1491
+ data: JSON.stringify(i),
1491
1492
  type: "json",
1492
- onComplete(i, a) {
1493
- const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1494
- t && t(c, i);
1493
+ onComplete(o, a) {
1494
+ const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1495
+ t && t(c, o);
1495
1496
  },
1496
- onFailure(i, a) {
1497
- n && n(i, a);
1497
+ onFailure(o, a) {
1498
+ n && n(o, a);
1498
1499
  }
1499
1500
  });
1500
1501
  });
@@ -1505,12 +1506,12 @@ function Be(e, t = void 0, n = void 0) {
1505
1506
  uri: "/api/community/listmycommunities",
1506
1507
  limit: `/limit/${e.limit ? e.limit : 128}`,
1507
1508
  page: `/page/${e.page ? e.page : "1"}`
1508
- }, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1509
- w(e, (i) => {
1510
- f(o, {
1509
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1510
+ w(e, (o) => {
1511
+ f(i, {
1511
1512
  method: "GET",
1512
1513
  headers: {
1513
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1514
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1514
1515
  },
1515
1516
  onComplete(a, c, d) {
1516
1517
  const p = JSON.parse(a).result;
@@ -1542,20 +1543,20 @@ function Be(e, t = void 0, n = void 0) {
1542
1543
  });
1543
1544
  }
1544
1545
  function ee(e, t, n, s) {
1545
- const o = `${e.space}/api/community/listmembers`, r = {
1546
+ const i = `${e.space}/api/community/listmembers`, r = {
1546
1547
  params: {
1547
1548
  page: e.page ? e.page : 1,
1548
1549
  limit: e.limit ? e.limit : 50,
1549
1550
  community_id: t
1550
1551
  }
1551
1552
  };
1552
- w(e, (i) => {
1553
- f(o, {
1553
+ w(e, (o) => {
1554
+ f(i, {
1554
1555
  method: "POST",
1555
1556
  headers: {
1556
1557
  "Content-type": "application/json;charset=UTF-8",
1557
1558
  Accept: "application/json",
1558
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1559
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1559
1560
  },
1560
1561
  data: JSON.stringify(r),
1561
1562
  type: "json",
@@ -1572,30 +1573,30 @@ function ee(e, t, n, s) {
1572
1573
  function Ye(e, t = void 0, n = void 0) {
1573
1574
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1574
1575
  e.commu_id || (e.commu_id = s);
1575
- const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1576
+ const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1576
1577
  w(e, (r) => {
1577
- f(o, {
1578
+ f(i, {
1578
1579
  method: "GET",
1579
1580
  headers: {
1580
1581
  "Content-type": "application/json;charset=UTF-8",
1581
1582
  Accept: "application/json",
1582
1583
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1583
1584
  },
1584
- onComplete(i) {
1585
- const a = JSON.parse(i);
1585
+ onComplete(o) {
1586
+ const a = JSON.parse(o);
1586
1587
  t && t(a);
1587
1588
  },
1588
- onFailure(i, a) {
1589
- const c = i;
1589
+ onFailure(o, a) {
1590
+ const c = o;
1590
1591
  c.status = a.status, c.response = a.errormsg, n && n(c);
1591
1592
  }
1592
1593
  });
1593
1594
  });
1594
1595
  }
1595
1596
  function qe(e, t, n = void 0, s = void 0) {
1596
- const { listAllContacts: o, currentUser: r } = e;
1597
- console.log("__listAllContacts", o.hits);
1598
- const i = `${e.space}/api/directmessages`, a = {
1597
+ const { listAllContacts: i, currentUser: r } = e;
1598
+ console.log("__listAllContacts", i.hits);
1599
+ const o = `${e.space}/api/directmessages`, a = {
1599
1600
  users: [r.login].concat(t.receipt)
1600
1601
  }, c = {
1601
1602
  id_msg: "",
@@ -1614,7 +1615,7 @@ function qe(e, t, n = void 0, s = void 0) {
1614
1615
  }
1615
1616
  ), d === !1 && setTimeout(() => {
1616
1617
  d === !1 && w(e, (l) => {
1617
- f(i, {
1618
+ f(o, {
1618
1619
  method: "POST",
1619
1620
  headers: {
1620
1621
  "Content-Type": "application/json",
@@ -1636,16 +1637,16 @@ function qe(e, t, n = void 0, s = void 0) {
1636
1637
  }, 500);
1637
1638
  }
1638
1639
  function te(e, t, n, s) {
1639
- const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1640
+ const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1640
1641
  w(e, (r) => {
1641
- f(o, {
1642
+ f(i, {
1642
1643
  method: "GET",
1643
1644
  headers: {
1644
1645
  Accept: "application/json,text/javascript,*/*",
1645
1646
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1646
1647
  },
1647
- onComplete(i) {
1648
- const a = JSON.parse(i), c = [];
1648
+ onComplete(o) {
1649
+ const a = JSON.parse(o), c = [];
1649
1650
  a.result.forEach((p) => {
1650
1651
  p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1651
1652
  });
@@ -1657,20 +1658,20 @@ function te(e, t, n, s) {
1657
1658
  });
1658
1659
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1659
1660
  },
1660
- onFailure(i) {
1661
- const a = i;
1661
+ onFailure(o) {
1662
+ const a = o;
1662
1663
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1663
1664
  }
1664
1665
  });
1665
1666
  });
1666
1667
  }
1667
1668
  function D(e, t, n = void 0, s = void 0) {
1668
- const o = {
1669
+ const i = {
1669
1670
  base: e.space,
1670
1671
  uri: "/api/community",
1671
1672
  id_msg: `${t.id_msg}`,
1672
1673
  endUri: "/instantmessages"
1673
- }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1674
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1674
1675
  author: { login: t.senderId, displayName: t.senderName },
1675
1676
  accessState: null,
1676
1677
  commentUri: null,
@@ -1688,7 +1689,7 @@ function D(e, t, n = void 0, s = void 0) {
1688
1689
  Accept: "application/json",
1689
1690
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1690
1691
  },
1691
- data: JSON.stringify(i),
1692
+ data: JSON.stringify(o),
1692
1693
  type: "json",
1693
1694
  onComplete(c, d, l) {
1694
1695
  const p = c;
@@ -1719,15 +1720,15 @@ const se = {
1719
1720
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1720
1721
  };
1721
1722
  function He(e, t, n = void 0, s = void 0) {
1722
- const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1723
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1723
1724
  (c) => c.id === t.community_id
1724
- ), i = e.swymCommunities.find(
1725
+ ), o = e.swymCommunities.find(
1725
1726
  (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1726
1727
  ), a = {
1727
1728
  params: {
1728
1729
  title: t.title,
1729
1730
  // String, le nom de l'affaire
1730
- community_id: r?.id !== void 0 ? r.id : i.id,
1731
+ community_id: r?.id !== void 0 ? r.id : o.id,
1731
1732
  // String, l'id de la communauté
1732
1733
  message: ae(t.text_html),
1733
1734
  // STRING => le contenue du message doit être au format HTML
@@ -1741,7 +1742,7 @@ function He(e, t, n = void 0, s = void 0) {
1741
1742
  Accept: "application/json",
1742
1743
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1743
1744
  };
1744
- f(o, {
1745
+ f(i, {
1745
1746
  method: "POST",
1746
1747
  headers: d,
1747
1748
  data: JSON.stringify(a),
@@ -1758,19 +1759,19 @@ function He(e, t, n = void 0, s = void 0) {
1758
1759
  });
1759
1760
  }
1760
1761
  function ze(e, t, n = void 0, s = void 0) {
1761
- const o = `${e.space}/api/idea/delete`, r = {
1762
+ const i = `${e.space}/api/idea/delete`, r = {
1762
1763
  params: {
1763
1764
  community_id: t.community_id,
1764
1765
  ideationIds: [t.idee_id]
1765
1766
  }
1766
1767
  };
1767
- w(e, (i) => {
1768
- f(o, {
1768
+ w(e, (o) => {
1769
+ f(i, {
1769
1770
  method: "POST",
1770
1771
  headers: {
1771
1772
  "Content-type": "application/json;charset=UTF-8",
1772
1773
  Accept: "application/json",
1773
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1774
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1774
1775
  },
1775
1776
  data: JSON.stringify(r),
1776
1777
  type: "json",
@@ -1785,9 +1786,9 @@ function ze(e, t, n = void 0, s = void 0) {
1785
1786
  });
1786
1787
  }
1787
1788
  function Qe(e, t = "", n = void 0, s = void 0) {
1788
- const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1789
- t === "" && (t = o);
1790
- const r = `${e.space}/api/idea/get`, i = {
1789
+ const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1790
+ t === "" && (t = i);
1791
+ const r = `${e.space}/api/idea/get`, o = {
1791
1792
  params: {
1792
1793
  id: t
1793
1794
  }
@@ -1800,7 +1801,7 @@ function Qe(e, t = "", n = void 0, s = void 0) {
1800
1801
  Accept: "application/json",
1801
1802
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1802
1803
  },
1803
- data: JSON.stringify(i),
1804
+ data: JSON.stringify(o),
1804
1805
  type: "json",
1805
1806
  onComplete(c) {
1806
1807
  const d = c;
@@ -1814,16 +1815,16 @@ function Qe(e, t = "", n = void 0, s = void 0) {
1814
1815
  });
1815
1816
  }
1816
1817
  function Ze(e, t = se, n = void 0, s = void 0) {
1817
- const o = {
1818
+ const i = {
1818
1819
  uri: "/api/idea/list",
1819
1820
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1820
1821
  limit: `/limit/${t.limit ? t.limit : 10}`
1821
- }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1822
- w(e, (i) => {
1822
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1823
+ w(e, (o) => {
1823
1824
  f(r, {
1824
1825
  method: "GET",
1825
1826
  headers: {
1826
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1827
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1827
1828
  },
1828
1829
  onComplete(a) {
1829
1830
  const c = JSON.parse(a);
@@ -1913,37 +1914,37 @@ function ae(e) {
1913
1914
  }
1914
1915
  function et(e, t = void 0, n = void 0) {
1915
1916
  const s = e.space + "/api/user/getcurrent/";
1916
- w(e, (o) => {
1917
+ w(e, (i) => {
1917
1918
  f(s, {
1918
1919
  method: "GET",
1919
1920
  headers: {
1920
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1921
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1921
1922
  },
1922
- onComplete(r, i, a) {
1923
+ onComplete(r, o, a) {
1923
1924
  const c = JSON.parse(r);
1924
1925
  t && t(c.result);
1925
1926
  },
1926
- onFailure(r, i, a) {
1927
- const c = { erreur: JSON.parse(r), headers: i, xhr: a };
1927
+ onFailure(r, o, a) {
1928
+ const c = { erreur: JSON.parse(r), headers: o, xhr: a };
1928
1929
  n && n(c);
1929
1930
  }
1930
1931
  });
1931
1932
  });
1932
1933
  }
1933
1934
  function tt(e, t, n = void 0, s = void 0) {
1934
- const o = e.space + "/api/user/find/login/" + t;
1935
+ const i = e.space + "/api/user/find/login/" + t;
1935
1936
  w(
1936
1937
  e,
1937
1938
  (r) => {
1938
- f(o, {
1939
+ f(i, {
1939
1940
  method: "GET",
1940
1941
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1941
- onComplete(i, a, c) {
1942
- const d = JSON.parse(i);
1942
+ onComplete(o, a, c) {
1943
+ const d = JSON.parse(o);
1943
1944
  n && n(d);
1944
1945
  },
1945
- onFailure(i) {
1946
- s && s(i);
1946
+ onFailure(o) {
1947
+ s && s(o);
1947
1948
  }
1948
1949
  });
1949
1950
  },
@@ -1953,8 +1954,8 @@ function tt(e, t, n = void 0, s = void 0) {
1953
1954
  function nt(e, t = void 0, n = void 0) {
1954
1955
  e.tenant && E(e, (s) => {
1955
1956
  console.log("serviceUrls", s);
1956
- const o = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", i = `${o}/login/?service=${r}/auth/cas`;
1957
- f(i, {
1957
+ const i = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
1958
+ f(o, {
1958
1959
  onComplete(a, c) {
1959
1960
  console.log("response", a), console.log("headers", c), t && t(c);
1960
1961
  },
@@ -1971,25 +1972,25 @@ function st(e) {
1971
1972
  function at(e, t = void 0, n = void 0) {
1972
1973
  return console.log("credentials", e), new Promise((s) => {
1973
1974
  if (e.token === "" && T(e), !e.space || e.space === "") {
1974
- const i = J();
1975
- console.log("platformeInfo", i);
1975
+ const o = J();
1976
+ console.log("platformeInfo", o);
1976
1977
  }
1977
1978
  b(
1978
1979
  e,
1979
1980
  "Common space",
1980
1981
  ["VPLMProjectLeader", "VPLMCreator"],
1981
1982
  void 0,
1982
- (i) => e.ctx = i,
1983
- (i) => {
1984
- console.log("onError =>", i);
1983
+ (o) => e.ctx = o,
1984
+ (o) => {
1985
+ console.log("onError =>", o);
1985
1986
  },
1986
1987
  !0
1987
1988
  );
1988
- const o = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1989
+ const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1989
1990
  f(r, {
1990
- onComplete(i) {
1991
- if (Array.isArray(JSON.parse(i))) {
1992
- const a = JSON.parse(i);
1991
+ onComplete(o) {
1992
+ if (Array.isArray(JSON.parse(o))) {
1993
+ const a = JSON.parse(o);
1993
1994
  console.log("serviceId=3dsearch", a);
1994
1995
  const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1995
1996
  f(c, {
@@ -2001,7 +2002,7 @@ function at(e, t = void 0, n = void 0) {
2001
2002
  data: JSON.stringify({
2002
2003
  with_indexing_date: !0,
2003
2004
  with_nls: !1,
2004
- label: `3DSearch-${o}`,
2005
+ label: `3DSearch-${i}`,
2005
2006
  locale: "en",
2006
2007
  select_predicate: [
2007
2008
  "ds6w:label",
@@ -2041,8 +2042,8 @@ function at(e, t = void 0, n = void 0) {
2041
2042
  });
2042
2043
  }
2043
2044
  },
2044
- onFailure(i) {
2045
- n && n(i);
2045
+ onFailure(o) {
2046
+ n && n(o);
2046
2047
  }
2047
2048
  });
2048
2049
  });
@@ -2050,14 +2051,14 @@ function at(e, t = void 0, n = void 0) {
2050
2051
  export {
2051
2052
  j as UUID,
2052
2053
  at as _3DSearch_usersGroup,
2053
- ve as _3DSpace_Create_Doc,
2054
+ Fe as _3DSpace_Create_Doc,
2054
2055
  Ie as _3DSpace_bookmark_addSubsciptions,
2055
2056
  T as _3DSpace_csrf,
2056
2057
  I as _3DSpace_download_doc,
2057
2058
  B as _3DSpace_download_multidoc,
2058
2059
  V as _3DSpace_file_update,
2059
2060
  W as _3DSpace_file_update_csr,
2060
- Fe as _3DSpace_file_url_csr,
2061
+ ve as _3DSpace_file_url_csr,
2061
2062
  k as _3DSpace_get_csrf,
2062
2063
  X as _3DSpace_get_docInfo,
2063
2064
  Y as _3DSpace_get_downloadTicket_multidoc,