@beam3_dev/api_module 0.0.118 → 0.0.119

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
@@ -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, i = [], c = (a) => {
71
- for (let r in a)
72
- i.push({ date: r, comment: a[r] });
70
+ const s = e, i = [], r = (a) => {
71
+ for (let c in a)
72
+ i.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function le(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((c) => c.json()).then((c) => {
84
+ r(c);
85
+ }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of i)
90
+ for (let c of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.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é : " + c.comment,
95
+ start: N.fromISO(c.date).toISODate(),
96
+ end: N.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,9 +102,9 @@ async function le(e, t = L) {
102
102
  }
103
103
  async function pe(e, t, n = !0) {
104
104
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
- function u(e, t) {
107
+ function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
109
109
  n.authenticatedRequest(e, t);
110
110
  });
@@ -150,25 +150,25 @@ 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(), i = t.getAllApplicationConfigurations(), c = 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
159
  appsConfiguration: i,
160
- appConf: c
160
+ appConf: r
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
163
163
  }
164
164
  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
- u(s, {
167
+ f(s, {
168
168
  onComplete(i) {
169
- const c = typeof i == "string" ? JSON.parse(i) : i;
170
- if (c && "platforms" in c) {
171
- const o = c.platforms.find(
169
+ const r = typeof i == "string" ? JSON.parse(i) : i;
170
+ if (r && "platforms" in r) {
171
+ const o = r.platforms.find(
172
172
  (a) => a.id === e.tenant.toUpperCase()
173
173
  );
174
174
  t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
@@ -184,11 +184,11 @@ function E(e, t = void 0, n = void 0) {
184
184
  function he(e, t = void 0, n = void 0) {
185
185
  if (e.tenant) {
186
186
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
- u(s, {
187
+ f(s, {
188
188
  onComplete(i) {
189
- const c = JSON.parse(i);
190
- if (console.log("serviceId=3dpassport", c), Array.isArray(c) && c.length > 0) {
191
- const o = `${c[0].services[0].url}`;
189
+ const r = JSON.parse(i);
190
+ if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
191
+ const o = `${r[0].services[0].url}`;
192
192
  t && t(o);
193
193
  }
194
194
  },
@@ -205,47 +205,47 @@ function Se(e, t, n) {
205
205
  option: `?filter=${e.tenant}`
206
206
  // facultatif
207
207
  }, i = `${s.base}${s.uri}${s.option}`;
208
- u(i, {
208
+ f(i, {
209
209
  method: "GET",
210
210
  headers: {
211
211
  "Content-Type": "application/json",
212
212
  Accept: "application/json"
213
213
  },
214
- onComplete(c, o, a) {
215
- const r = JSON.parse(c), d = r.data.map((l) => {
216
- const p = l.attributes.name, f = l.id;
217
- return { name: p, id: f };
214
+ onComplete(r, o, a) {
215
+ const c = JSON.parse(r), d = c.data.map((l) => {
216
+ const p = l.attributes.name, u = l.id;
217
+ return { name: p, id: u };
218
218
  });
219
- t && t(d, r);
219
+ t && t(d, c);
220
220
  },
221
- onFailure(c, o) {
222
- const a = c;
221
+ onFailure(r, o) {
222
+ const a = r;
223
223
  a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
224
224
  }
225
225
  });
226
226
  }
227
227
  function _e(e, t = void 0, n = void 0) {
228
228
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
- u(s, {
230
- onComplete(i, c, o) {
229
+ f(s, {
230
+ onComplete(i, r, o) {
231
231
  const a = JSON.parse(i);
232
232
  console.log("_AppMngt_get_users => ", a), t && t(a);
233
233
  },
234
- onFailure(i, c) {
234
+ onFailure(i, r) {
235
235
  const o = i;
236
- o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
236
+ o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
237
237
  }
238
238
  });
239
239
  }
240
240
  function ye(e, t, n = void 0, s = void 0) {
241
241
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
- u(i, {
243
- onComplete(c, o, a) {
244
- const r = JSON.parse(c);
245
- n && n(r);
242
+ f(i, {
243
+ onComplete(r, o, a) {
244
+ const c = JSON.parse(r);
245
+ n && n(c);
246
246
  },
247
- onFailure(c, o) {
248
- const a = c;
247
+ onFailure(r, o) {
248
+ const a = r;
249
249
  a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
250
250
  }
251
251
  });
@@ -255,24 +255,24 @@ const F = {
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
257
257
  function we(e, t, n = void 0, s = void 0) {
258
- const { space: i, currentUser: c } = e, a = `${i}${{
258
+ const { space: i, currentUser: r } = e, a = `${i}${{
259
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
- }.URIUGr}`, r = {
260
+ }.URIUGr}`, c = {
261
261
  groups: [
262
262
  {
263
263
  title: t.title,
264
264
  description: t.description,
265
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
265
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
266
266
  pending_members: [],
267
267
  sharing: t.sharing,
268
268
  visibility: t.visibility
269
269
  }
270
270
  ]
271
271
  };
272
- u(a, {
272
+ f(a, {
273
273
  method: "POST",
274
274
  headers: F,
275
- data: JSON.stringify(r),
275
+ data: JSON.stringify(c),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
278
278
  },
@@ -284,8 +284,8 @@ function we(e, t, n = void 0, s = void 0) {
284
284
  });
285
285
  }
286
286
  function Ce(e, t, n = void 0, s = void 0) {
287
- 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}`;
288
- u(d, {
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}`;
288
+ f(d, {
289
289
  opts: {
290
290
  method: "GET",
291
291
  headers: {
@@ -293,28 +293,28 @@ function Ce(e, t, n = void 0, s = void 0) {
293
293
  Accept: "application/json,text/javascript,*/*"
294
294
  }
295
295
  },
296
- onComplete(f) {
297
- n && n(JSON.parse(f));
296
+ onComplete(u) {
297
+ n && n(JSON.parse(u));
298
298
  },
299
- onFailure(f, m) {
300
- const g = f;
299
+ onFailure(u, m) {
300
+ const g = u;
301
301
  g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
302
302
  }
303
303
  });
304
304
  }
305
305
  function G(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
306
+ const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
307
307
  method: "GET",
308
308
  Accept: "application/json,*/*,test/javascript"
309
- }, d = `${c}${o}${a}`;
310
- u(d, {
311
- OPTsH: r,
309
+ }, d = `${r}${o}${a}`;
310
+ f(d, {
311
+ OPTsH: c,
312
312
  onComplete(l) {
313
313
  t && t(JSON.parse(l));
314
314
  },
315
315
  onFailure(l, p) {
316
- const f = l;
317
- f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
316
+ const u = l;
317
+ u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
318
318
  }
319
319
  });
320
320
  }
@@ -324,16 +324,16 @@ function Te(e, t = void 0, n = void 0) {
324
324
  Accept: "application/json,text/javascript,*/*"
325
325
  } };
326
326
  try {
327
- u(a, {
327
+ f(a, {
328
328
  opts: d,
329
329
  onComplete(l) {
330
- const p = JSON.parse(l), f = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
330
+ const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
331
331
  if (i && Object.keys(i).length > 0) {
332
332
  const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
333
- f.iam = S, f.UG = m, f.iamMember = h, G(
333
+ u.iam = S, u.UG = m, u.iamMember = h, G(
334
334
  e,
335
335
  (_) => {
336
- f.rules = _, t && t(f);
336
+ u.rules = _, t && t(u);
337
337
  },
338
338
  (_) => {
339
339
  n && n(_);
@@ -351,12 +351,12 @@ function Te(e, t = void 0, n = void 0) {
351
351
  }
352
352
  function Oe(e, t) {
353
353
  const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
- u(i, {
354
+ f(i, {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
358
  function be(e, t, n, s = void 0, i = void 0) {
359
- const { space: c, tenant: o } = e, a = {
359
+ const { space: r, tenant: o } = e, a = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
362
362
  nextURICh: "/characteristics",
@@ -364,8 +364,8 @@ function be(e, t, n, s = void 0, i = void 0) {
364
364
  nexURImem: "/members",
365
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
- }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
368
- u(d, {
367
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
368
+ f(d, {
369
369
  headers: F,
370
370
  method: "PATCH",
371
371
  data: l,
@@ -379,8 +379,8 @@ function be(e, t, n, s = void 0, i = void 0) {
379
379
  });
380
380
  }
381
381
  function Ne(e, t, n, s = void 0, i = void 0) {
382
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
- u(a, {
382
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
+ f(a, {
384
384
  method: "PATCH",
385
385
  headers: F,
386
386
  data: JSON.stringify(n),
@@ -395,7 +395,7 @@ function Ne(e, t, n, s = void 0, i = void 0) {
395
395
  }
396
396
  function ve(e, t, n = void 0, s = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
- u(o, {
398
+ f(o, {
399
399
  opts: {
400
400
  method: "GET",
401
401
  headers: {
@@ -414,12 +414,12 @@ function ve(e, t, n = void 0, s = void 0) {
414
414
  async function K(e, t, n) {
415
415
  if (e.space) {
416
416
  const s = `${e.space}/resources/v1/application/CSRF`;
417
- u(s, {
417
+ f(s, {
418
418
  onComplete(i) {
419
419
  i = JSON.parse(i), t && t(i.csrf);
420
420
  },
421
- onFailure(i, c, o) {
422
- n && n({ error: i, headers: c, xhr: o });
421
+ onFailure(i, r, o) {
422
+ n && n({ error: i, headers: r, xhr: o });
423
423
  }
424
424
  });
425
425
  }
@@ -430,9 +430,9 @@ async function X(e, t = void 0, n = void 0, s = void 0) {
430
430
  console.log("Le paramètre docid est obligatoire");
431
431
  return;
432
432
  }
433
- const c = i + `/resources/v1/modeler/documents/${t}`;
434
- u(c, {
435
- onComplete(o, a, r) {
433
+ const r = i + `/resources/v1/modeler/documents/${t}`;
434
+ f(r, {
435
+ onComplete(o, a, c) {
436
436
  const d = JSON.parse(o);
437
437
  n && n(d);
438
438
  },
@@ -444,8 +444,8 @@ async function X(e, t = void 0, n = void 0, s = void 0) {
444
444
  function v(e, t = void 0, n = void 0) {
445
445
  if (e.objID && e.objID !== "") {
446
446
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
447
- u(s, {
448
- onComplete(i, c, o) {
447
+ f(s, {
448
+ onComplete(i, r, o) {
449
449
  const a = JSON.parse(i);
450
450
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
451
451
  },
@@ -467,15 +467,15 @@ function v(e, t = void 0, n = void 0) {
467
467
  function T(e, t = void 0, n = void 0) {
468
468
  if (e.space) {
469
469
  const s = e.space + "/resources/v1/application/CSRF";
470
- u(s, {
471
- onComplete(i, c, o) {
470
+ f(s, {
471
+ onComplete(i, r, o) {
472
472
  const a = JSON.parse(i);
473
473
  t && t(a.csrf.value);
474
474
  },
475
- onFailure(i, c, o) {
475
+ onFailure(i, r, o) {
476
476
  n && n({
477
477
  response: i,
478
- headers: c,
478
+ headers: r,
479
479
  xhr: o
480
480
  });
481
481
  }
@@ -483,22 +483,22 @@ function T(e, t = void 0, n = void 0) {
483
483
  } else
484
484
  n && n("ERROR : url du 3DSpace non défini.");
485
485
  }
486
- function $(e, t = void 0, n = void 0) {
486
+ function D(e, t = void 0, n = void 0) {
487
487
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
488
488
  v(
489
489
  e,
490
490
  (i) => {
491
- u(s, {
491
+ f(s, {
492
492
  method: "PUT",
493
493
  headers: {
494
494
  ENO_CSRF_TOKEN: e.token
495
495
  },
496
- onComplete(c) {
497
- const a = JSON.parse(c).data[0].dataelements.ticketURL;
496
+ onComplete(r) {
497
+ const a = JSON.parse(r).data[0].dataelements.ticketURL;
498
498
  t && t(a);
499
499
  },
500
- onFailure(c, o) {
501
- console.warn("☠️ error => ", c, o), n && n(c, o);
500
+ onFailure(r, o) {
501
+ console.warn("☠️ error => ", r, o), n && n(r, o);
502
502
  }
503
503
  });
504
504
  },
@@ -508,8 +508,8 @@ function $(e, t = void 0, n = void 0) {
508
508
  );
509
509
  }
510
510
  function ke(e, t, n, s = void 0, i = void 0) {
511
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
512
- n || (n = e.token), u(c, {
511
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
512
+ n || (n = e.token), f(r, {
513
513
  method: "PUT",
514
514
  headers: {
515
515
  ENO_CSRF_TOKEN: n
@@ -518,10 +518,10 @@ function ke(e, t, n, s = void 0, i = void 0) {
518
518
  let a = JSON.parse(o);
519
519
  if (console.log("☠️ info => ", a), a.success === !0)
520
520
  try {
521
- const r = a.data[0].dataelements.ticketURL;
522
- s && s(r);
523
- } catch (r) {
524
- i && i(r);
521
+ const c = a.data[0].dataelements.ticketURL;
522
+ s && s(c);
523
+ } catch (c) {
524
+ i && i(c);
525
525
  }
526
526
  },
527
527
  onFailure(o) {
@@ -529,7 +529,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
529
529
  }
530
530
  });
531
531
  }
532
- function V(e, t, n, s, i, c = void 0, o = void 0) {
532
+ function V(e, t, n, s, i, r = void 0, o = void 0) {
533
533
  v(
534
534
  e,
535
535
  t,
@@ -541,28 +541,28 @@ function V(e, t, n, s, i, c = void 0, o = void 0) {
541
541
  s,
542
542
  i,
543
543
  a.csrf.value,
544
- c,
544
+ r,
545
545
  o
546
546
  );
547
547
  }
548
548
  );
549
549
  }
550
- function W(e, t, n, s, i, c, o = void 0, a = void 0) {
551
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
552
- u(r, {
550
+ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
551
+ const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
552
+ f(c, {
553
553
  method: "PUT",
554
554
  headers: {
555
- ENO_CSRF_TOKEN: c
555
+ ENO_CSRF_TOKEN: r
556
556
  },
557
557
  onComplete(d, l, p) {
558
- const f = JSON.parse(d).data[0].dataelements, m = new FormData();
559
- m.append("__fcs__jobTicket", f.ticket), m.append("file_0", s, i);
558
+ const u = JSON.parse(d).data[0].dataelements, m = new FormData();
559
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, i);
560
560
  const g = {};
561
561
  g.method = "POST", g.data = m, g.onComplete = function(h) {
562
562
  let S = "temp_" + Date.now(), _ = {
563
563
  method: "PUT",
564
564
  headers: {
565
- ENO_CSRF_TOKEN: c
565
+ ENO_CSRF_TOKEN: r
566
566
  },
567
567
  data: JSON.stringify({
568
568
  data: [{
@@ -588,40 +588,40 @@ function W(e, t, n, s, i, c, o = void 0, a = void 0) {
588
588
  a && a(y);
589
589
  }
590
590
  };
591
- u(
591
+ f(
592
592
  e.space + "/resources/v1/modeler/documents",
593
593
  _
594
594
  );
595
595
  }, g.onFailure = function(h) {
596
596
  a && a(h);
597
- }, g.timeout = 0, u(f.ticketURL, g);
597
+ }, g.timeout = 0, f(u.ticketURL, g);
598
598
  }
599
599
  });
600
600
  }
601
- async function Fe(e, t, n, s, i = void 0, c = void 0) {
602
- const o = e.space, a = e.token, r = 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)], {
603
603
  type: "text/plain"
604
604
  }), p = {
605
605
  url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
606
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
606
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
607
607
  };
608
608
  if (!o && o !== "") {
609
609
  console.log("le store._3DSpace est vide");
610
610
  return;
611
611
  }
612
- u(p.url_Ticket, {
612
+ f(p.url_Ticket, {
613
613
  method: "PUT",
614
614
  headers: {
615
615
  ENO_CSRF_TOKEN: a.value
616
616
  },
617
- onComplete(f, m, g) {
618
- const h = JSON.parse(f).data[0].dataelements;
617
+ onComplete(u, m, g) {
618
+ const h = JSON.parse(u).data[0].dataelements;
619
619
  d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
620
620
  const S = {
621
621
  method: "POST",
622
622
  data: d,
623
623
  onComplete(C) {
624
- if (r !== "" && a !== "") {
624
+ if (c !== "" && a !== "") {
625
625
  const k = {
626
626
  method: "POST",
627
627
  headers: {
@@ -653,7 +653,7 @@ async function Fe(e, t, n, s, i = void 0, c = void 0) {
653
653
  onComplete: _,
654
654
  onFailure: y
655
655
  };
656
- r !== "" && u(p.url_Post, k);
656
+ c !== "" && f(p.url_Post, k);
657
657
  } else
658
658
  console.warn("le store est vide");
659
659
  },
@@ -664,19 +664,19 @@ async function Fe(e, t, n, s, i = void 0, c = void 0) {
664
664
  }
665
665
  function y(C, k) {
666
666
  console.log("Erreur -- response ", C, `
667
- headers `, k), c && c(C);
667
+ headers `, k), r && r(C);
668
668
  }
669
- u(h.ticketURL, S);
669
+ f(h.ticketURL, S);
670
670
  }
671
671
  });
672
672
  }
673
- function b(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1) {
673
+ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
674
674
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
675
- u(a, {
675
+ f(a, {
676
676
  method: "GET",
677
- onComplete(r) {
678
- const d = JSON.parse(r);
679
- let l = "", p, f, m;
677
+ onComplete(c) {
678
+ const d = JSON.parse(c);
679
+ let l = "", p, u, m;
680
680
  if (t) {
681
681
  let g = d.collabspaces.find((h) => h.title === t);
682
682
  if (g) {
@@ -689,31 +689,31 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1
689
689
  ), n && (Array.isArray(n) ? n.forEach((S) => {
690
690
  m || h.forEach((_) => {
691
691
  if (S === _.role.name && s === _.organization.title)
692
- m = S, f = s;
692
+ m = S, u = s;
693
693
  else if (S === _.role.name) {
694
694
  let y = h.filter(
695
695
  (C) => C.role.name === S
696
696
  );
697
- y.length === 1 ? (m = y[0].role.name, f = y[0].organization.title) : c(y);
697
+ y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : r(y);
698
698
  }
699
699
  });
700
700
  }) : h.forEach((S) => {
701
701
  if (n === S.role.name && s === S.organization.title)
702
- m = n, f = s;
702
+ m = n, u = s;
703
703
  else if (n === S.role.name) {
704
704
  let _ = h.filter(
705
705
  (y) => y.role.name === n
706
706
  );
707
- _.length === 1 ? (m = _[0].role.name, f = _[0].organization.title) : c(_);
707
+ _.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : r(_);
708
708
  }
709
709
  }));
710
710
  }
711
711
  }
712
- p && f && m ? (l = m + "." + f + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = m + "." + f + "." + p, c(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));
713
713
  },
714
- onFailure(r, d) {
714
+ onFailure(c, d) {
715
715
  console.log("Erreur de récupération du contexte de sécurité. => ", {
716
- err: r,
716
+ err: c,
717
717
  headers: d
718
718
  });
719
719
  }
@@ -735,38 +735,38 @@ async function I(e, t = void 0, n = void 0) {
735
735
  ), console.warn(
736
736
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
737
737
  )), new Promise((s, i) => {
738
- $(
738
+ D(
739
739
  e,
740
- (c) => {
741
- u(c, {
740
+ (r) => {
741
+ f(r, {
742
742
  headers: {
743
743
  "Content-Type": "application/json",
744
744
  Accept: "application/json"
745
745
  },
746
746
  onComplete(a) {
747
- let r;
747
+ let c;
748
748
  try {
749
- r = JSON.parse(a);
749
+ c = JSON.parse(a);
750
750
  } catch {
751
- r = a;
751
+ c = a;
752
752
  }
753
- t && typeof t == "function" && t(r), s(r);
753
+ t && typeof t == "function" && t(c), s(c);
754
754
  },
755
- onFailure(a, r, d) {
755
+ onFailure(a, c, d) {
756
756
  n && (console.log("error http", a), n({
757
757
  msg: JSON.parse(a),
758
- headers: r,
758
+ headers: c,
759
759
  xhr: d
760
760
  }), i({
761
761
  msg: JSON.parse(a),
762
- headers: r,
762
+ headers: c,
763
763
  xhr: d
764
764
  }));
765
765
  }
766
766
  });
767
767
  },
768
- (c) => {
769
- n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
768
+ (r) => {
769
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
770
770
  }
771
771
  );
772
772
  });
@@ -775,8 +775,8 @@ async function B(e, t, n = void 0, s = void 0) {
775
775
  let i = [];
776
776
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
777
777
  for (let a = 0; a < t.length; a += 80) {
778
- const r = t.slice(a, a + 80);
779
- i.push(r);
778
+ const c = t.slice(a, a + 80);
779
+ i.push(c);
780
780
  }
781
781
  const o = (a) => {
782
782
  Y(
@@ -785,8 +785,8 @@ async function B(e, t, n = void 0, s = void 0) {
785
785
  () => {
786
786
  a++, a < i.length && o(a);
787
787
  },
788
- (r) => {
789
- n && n(r);
788
+ (c) => {
789
+ n && n(c);
790
790
  }
791
791
  );
792
792
  };
@@ -795,10 +795,10 @@ async function B(e, t, n = void 0, s = void 0) {
795
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.");
796
796
  }
797
797
  function Y(e, t, n = void 0, s = void 0, i = void 0) {
798
- const c = [];
799
- t.forEach((r) => {
800
- c.push({
801
- id: r
798
+ const r = [];
799
+ t.forEach((c) => {
800
+ r.push({
801
+ id: c
802
802
  });
803
803
  });
804
804
  let o = JSON.stringify({
@@ -806,19 +806,19 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
806
806
  name: "ENO_CSRF_TOKEN",
807
807
  value: e.token
808
808
  },
809
- data: c
809
+ data: r
810
810
  });
811
811
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
812
- u(a, {
812
+ f(a, {
813
813
  method: "PUT",
814
814
  data: o,
815
815
  type: "json",
816
- onComplete(r) {
817
- const d = r.data;
818
- r.success === !0 && (n && n(), d.forEach((l) => {
816
+ onComplete(c) {
817
+ const d = c.data;
818
+ c.success === !0 && (n && n(), d.forEach((l) => {
819
819
  try {
820
- const p = l.dataelements.fileName, f = l.dataelements.ticketURL;
821
- u(f, {
820
+ const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
821
+ f(u, {
822
822
  onComplete: (m) => {
823
823
  s && s({
824
824
  objectId: l.id,
@@ -835,15 +835,15 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
835
835
  }
836
836
  }));
837
837
  },
838
- onFailure(r) {
839
- console.log(r), i && i(r);
838
+ onFailure(c) {
839
+ console.log(c), i && i(c);
840
840
  }
841
841
  });
842
842
  }
843
- function $e(e, t, n = void 0, s = void 0) {
843
+ function De(e, t, n = void 0, s = void 0) {
844
844
  return new Promise((i) => {
845
845
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
846
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
846
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
847
847
  b(
848
848
  e.space,
849
849
  "ESPACE COMMUN",
@@ -875,12 +875,12 @@ function $e(e, t, n = void 0, s = void 0) {
875
875
  s && s(a);
876
876
  }
877
877
  };
878
- u(c, o);
878
+ f(r, o);
879
879
  }
880
880
  });
881
881
  }
882
882
  function Ae(e, t, n, s = void 0, i = void 0) {
883
- return new Promise((c) => {
883
+ return new Promise((r) => {
884
884
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
885
885
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
886
886
  b(
@@ -888,9 +888,9 @@ function Ae(e, t, n, s = void 0, i = void 0) {
888
888
  "ESPACE COMMUN",
889
889
  ["VPLMProjectLeader", "VPLMCreator"],
890
890
  void 0,
891
- (r) => e.ctx = r,
892
- (r) => {
893
- console.log("onError =>", r);
891
+ (c) => e.ctx = c,
892
+ (c) => {
893
+ console.log("onError =>", c);
894
894
  }
895
895
  );
896
896
  let a = {
@@ -908,21 +908,21 @@ function Ae(e, t, n, s = void 0, i = void 0) {
908
908
  }]
909
909
  }),
910
910
  type: "json",
911
- onComplete(r) {
912
- s && s(r);
911
+ onComplete(c) {
912
+ s && s(c);
913
913
  },
914
- onFailure(r) {
915
- i && i(r);
914
+ onFailure(c) {
915
+ i && i(c);
916
916
  }
917
917
  };
918
- u(o, a);
918
+ f(o, a);
919
919
  }
920
920
  });
921
921
  }
922
- function De(e, t, n = void 0, s = void 0) {
922
+ function $e(e, t, n = void 0, s = void 0) {
923
923
  return new Promise((i) => {
924
924
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
925
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
925
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
926
926
  b(
927
927
  e.space,
928
928
  "ESPACE COMMUN",
@@ -954,14 +954,14 @@ function De(e, t, n = void 0, s = void 0) {
954
954
  s && s(a);
955
955
  }
956
956
  };
957
- u(c, o);
957
+ f(r, o);
958
958
  }
959
959
  });
960
960
  }
961
961
  function Ue(e, t, n = void 0, s = void 0) {
962
962
  return new Promise((i) => {
963
963
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
964
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
964
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
965
965
  b(
966
966
  e.space,
967
967
  "ESPACE COMMUN",
@@ -999,12 +999,12 @@ function Ue(e, t, n = void 0, s = void 0) {
999
999
  s && s(a);
1000
1000
  }
1001
1001
  };
1002
- u(c, o);
1002
+ f(r, o);
1003
1003
  }
1004
1004
  });
1005
1005
  }
1006
1006
  function je(e, t, n, s = void 0, i = void 0) {
1007
- return new Promise((c) => {
1007
+ return new Promise((r) => {
1008
1008
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1009
1009
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1010
1010
  b(
@@ -1012,9 +1012,9 @@ function je(e, t, n, s = void 0, i = void 0) {
1012
1012
  "ESPACE COMMUN",
1013
1013
  ["VPLMProjectLeader", "VPLMCreator"],
1014
1014
  void 0,
1015
- (r) => e.ctx = r,
1016
- (r) => {
1017
- console.log("onError =>", r);
1015
+ (c) => e.ctx = c,
1016
+ (c) => {
1017
+ console.log("onError =>", c);
1018
1018
  }
1019
1019
  );
1020
1020
  let a = {
@@ -1037,18 +1037,18 @@ function je(e, t, n, s = void 0, i = void 0) {
1037
1037
  notificationTimeout: 600
1038
1038
  }),
1039
1039
  type: "json",
1040
- onComplete(r) {
1041
- s && s(r);
1040
+ onComplete(c) {
1041
+ s && s(c);
1042
1042
  },
1043
- onFailure(r) {
1044
- i && i(r);
1043
+ onFailure(c) {
1044
+ i && i(c);
1045
1045
  }
1046
1046
  };
1047
- u(o, a);
1047
+ f(o, a);
1048
1048
  }
1049
1049
  });
1050
1050
  }
1051
- function Ie(e, t, n, s, i = void 0, c = void 0) {
1051
+ function Ie(e, t, n, s, i = void 0, r = void 0) {
1052
1052
  return console.log("credentials", e), new Promise((o) => {
1053
1053
  `${e.space}`, JSON.stringify({
1054
1054
  csrf: {
@@ -1076,33 +1076,33 @@ function Re(e, t = void 0, n = void 0) {
1076
1076
  uri: "/resources/bps/cspaces",
1077
1077
  optTenant: `tenant=${e.tenant}`
1078
1078
  }, i = `${s.base}${s.uri}?${s.optTenant}`;
1079
- u(i, {
1079
+ f(i, {
1080
1080
  method: "GET",
1081
1081
  headers: {
1082
1082
  Accept: "application/json,text/javascript,*/*",
1083
1083
  "Content-Type": "application/ds-json"
1084
1084
  },
1085
- onComplete(c, o) {
1086
- const a = JSON.parse(c);
1085
+ onComplete(r, o) {
1086
+ const a = JSON.parse(r);
1087
1087
  t && t(a, o);
1088
1088
  },
1089
- onFailure(c, o, a) {
1090
- n && n({ response: c, headers: o, xhr: a });
1089
+ onFailure(r, o, a) {
1090
+ n && n({ response: r, headers: o, xhr: a });
1091
1091
  }
1092
1092
  });
1093
1093
  }
1094
1094
  function xe(e, t, n, s) {
1095
- $(
1095
+ D(
1096
1096
  e.space,
1097
1097
  t,
1098
1098
  (i) => {
1099
- u(i, {
1099
+ f(i, {
1100
1100
  header: { ENO_CSRF_TOKEN: e.token },
1101
- onComplete: (c) => {
1102
- n && n(c);
1101
+ onComplete: (r) => {
1102
+ n && n(r);
1103
1103
  },
1104
- onFailure: (c) => {
1105
- console.log("error http", c), s && s(c);
1104
+ onFailure: (r) => {
1105
+ console.log("error http", r), s && s(r);
1106
1106
  }
1107
1107
  });
1108
1108
  }
@@ -1110,29 +1110,29 @@ function xe(e, t, n, s) {
1110
1110
  }
1111
1111
  async function Pe(e, t, n = void 0, s = void 0) {
1112
1112
  return new Promise((i) => {
1113
- $(e, t, (c) => {
1114
- u(c, {
1115
- onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1116
- onFailure: (o, a, r) => {
1117
- s && s(o, a, r), console.log(o, a?.errormsg);
1113
+ D(e, t, (r) => {
1114
+ f(r, {
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);
1118
1118
  }
1119
1119
  });
1120
1120
  });
1121
1121
  });
1122
1122
  }
1123
1123
  function Me(e, t, n, s = void 0, i = void 0) {
1124
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1124
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1125
1125
  v(
1126
1126
  e,
1127
1127
  n,
1128
1128
  (o) => {
1129
- 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;
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;
1130
1130
  V(
1131
1131
  e,
1132
1132
  n,
1133
1133
  a,
1134
- c,
1135
1134
  r,
1135
+ c,
1136
1136
  (d) => {
1137
1137
  s && s(d);
1138
1138
  },
@@ -1182,12 +1182,12 @@ function Ee(e, t = void 0, n = void 0) {
1182
1182
  console.warn("la liste est vide ou n'est pas un tableau");
1183
1183
  return;
1184
1184
  }
1185
- e.objIds.forEach((i, c) => {
1185
+ e.objIds.forEach((i, r) => {
1186
1186
  I(
1187
1187
  e,
1188
1188
  i.objID,
1189
1189
  (o) => {
1190
- s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, x)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1190
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, x)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1191
1191
  }
1192
1192
  );
1193
1193
  });
@@ -1197,8 +1197,8 @@ function q(e, t, n = void 0, s = void 0) {
1197
1197
  e,
1198
1198
  R,
1199
1199
  (i) => {
1200
- const c = [...t];
1201
- c.find((o) => o.objectID === i.objectId).data = i.data, x = c, A.push(i.data), n && n(A);
1200
+ const r = [...t];
1201
+ r.find((o) => o.objectID === i.objectId).data = i.data, x = r, A.push(i.data), n && n(A);
1202
1202
  },
1203
1203
  (i) => {
1204
1204
  s && (s(i), console.log(i));
@@ -1226,10 +1226,10 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1226
1226
  tag: "testTag"
1227
1227
  };
1228
1228
  function Ge(e, t, n = void 0, s = void 0) {
1229
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1229
+ const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1230
1230
  uri: "/resources/6w/tags",
1231
1231
  otpCTX: "SecurityContext=preferred",
1232
- optTenant: `tenant=${c}`
1232
+ optTenant: `tenant=${r}`
1233
1233
  }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1234
1234
  tag: [
1235
1235
  {
@@ -1240,20 +1240,20 @@ function Ge(e, t, n = void 0, s = void 0) {
1240
1240
  ],
1241
1241
  predicate: P[a],
1242
1242
  object: {
1243
- literal: r
1243
+ literal: c
1244
1244
  }
1245
1245
  }
1246
1246
  ]
1247
1247
  };
1248
- u(l, {
1248
+ f(l, {
1249
1249
  method: "PUT",
1250
1250
  headers: {
1251
1251
  "Content-Type": "application/json",
1252
1252
  Accept: "application/json"
1253
1253
  },
1254
1254
  data: JSON.stringify(p),
1255
- onComplete(f) {
1256
- JSON.parse(f);
1255
+ onComplete(u) {
1256
+ JSON.parse(u);
1257
1257
  const m = {};
1258
1258
  setTimeout(() => {
1259
1259
  X(
@@ -1279,25 +1279,25 @@ function Ge(e, t, n = void 0, s = void 0) {
1279
1279
  );
1280
1280
  }, 2e3);
1281
1281
  },
1282
- onFailure(f, m) {
1283
- const g = f;
1282
+ onFailure(u, m) {
1283
+ const g = u;
1284
1284
  g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1285
1285
  }
1286
1286
  });
1287
1287
  }
1288
1288
  function Z(e, t, n = void 0, s = void 0) {
1289
1289
  console.log("obj ", t);
1290
- const i = t.info.name, c = {
1290
+ const i = t.info.name, r = {
1291
1291
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1292
1292
  uri: "/federated/search"
1293
- }, o = `${c.baseUrl}${c.uri}`, a = {
1293
+ }, o = `${r.baseUrl}${r.uri}`, a = {
1294
1294
  "Content-Type": "application/json",
1295
1295
  Accept: "application/json,text/javascript,*/*"
1296
- }, r = j(), d = {
1296
+ }, c = j(), d = {
1297
1297
  with_indexing_date: !0,
1298
1298
  with_synthesis: !0,
1299
1299
  with_nls: !1,
1300
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1300
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1301
1301
  locale: "fr",
1302
1302
  select_predicate: [
1303
1303
  "ds6w:label",
@@ -1354,7 +1354,7 @@ function Z(e, t, n = void 0, s = void 0) {
1354
1354
  }
1355
1355
  }
1356
1356
  };
1357
- console.log("dataPattern => ", d), u(o, {
1357
+ console.log("dataPattern => ", d), f(o, {
1358
1358
  method: "POST",
1359
1359
  headers: a,
1360
1360
  data: JSON.stringify(d),
@@ -1363,17 +1363,17 @@ function Z(e, t, n = void 0, s = void 0) {
1363
1363
  n(p);
1364
1364
  },
1365
1365
  onFailure(l, p) {
1366
- const f = l;
1367
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", l);
1366
+ const u = l;
1367
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1368
1368
  }
1369
1369
  });
1370
1370
  }
1371
1371
  function Ke(e, t, n = void 0, s = void 0) {
1372
- const { objId: i, pred: c, tag: o } = t, a = {
1372
+ const { objId: i, pred: r, tag: o } = t, a = {
1373
1373
  uri: "/resources/6w/tags",
1374
1374
  otpCTX: "SecurityContext=preferred",
1375
1375
  optTenant: `tenant=${e.tenant}`
1376
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1376
+ }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1377
1377
  tag: [
1378
1378
  {
1379
1379
  subject: [
@@ -1381,14 +1381,14 @@ function Ke(e, t, n = void 0, s = void 0) {
1381
1381
  uri: `pid://${i}`
1382
1382
  }
1383
1383
  ],
1384
- predicate: P[c],
1384
+ predicate: P[r],
1385
1385
  object: {
1386
1386
  literal: o
1387
1387
  }
1388
1388
  }
1389
1389
  ]
1390
1390
  };
1391
- u(r, {
1391
+ f(c, {
1392
1392
  method: "DELETE",
1393
1393
  data: JSON.stringify(d),
1394
1394
  headers: {
@@ -1399,8 +1399,8 @@ function Ke(e, t, n = void 0, s = void 0) {
1399
1399
  n && n(l);
1400
1400
  },
1401
1401
  onFailure(l, p) {
1402
- const f = l;
1403
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1402
+ const u = l;
1403
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1404
1404
  }
1405
1405
  });
1406
1406
  }
@@ -1408,16 +1408,16 @@ function Xe(e, t = "", n = void 0, s = void 0) {
1408
1408
  const { space: i } = e;
1409
1409
  if (t === "")
1410
1410
  return;
1411
- const c = {
1411
+ const r = {
1412
1412
  uri: "/resources/v1/modeler/documents"
1413
1413
  }, o = {
1414
1414
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1415
1415
  Accept: "application/json,text/javascript,*/*"
1416
- }, 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}`;
1417
- u(a, {
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}`;
1417
+ f(a, {
1418
1418
  method: "POST",
1419
1419
  headers: o,
1420
- data: r,
1420
+ data: c,
1421
1421
  onComplete(d) {
1422
1422
  n && n(JSON.parse(d));
1423
1423
  },
@@ -1429,8 +1429,8 @@ function Xe(e, t = "", n = void 0, s = void 0) {
1429
1429
  }
1430
1430
  async function w(e, t = void 0, n = void 0) {
1431
1431
  const s = e.space + "/api/index/tk";
1432
- return u(s, {
1433
- onComplete(i, c, o) {
1432
+ return f(s, {
1433
+ onComplete(i, r, o) {
1434
1434
  const a = JSON.parse(i);
1435
1435
  if (t)
1436
1436
  return t(a), e.token = a?.result?.ServerToken;
@@ -1451,11 +1451,11 @@ function Ve(e, t = void 0, n = void 0) {
1451
1451
  start: 0
1452
1452
  }
1453
1453
  };
1454
- w(e, (c) => {
1455
- u(s, {
1454
+ w(e, (r) => {
1455
+ f(s, {
1456
1456
  method: "POST",
1457
1457
  headers: {
1458
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1458
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1459
1459
  "Content-type": "application/json;charset=UTF-8",
1460
1460
  Accept: "application/json"
1461
1461
  },
@@ -1480,19 +1480,19 @@ function We(e, t = void 0, n = void 0) {
1480
1480
  maxNbOfCommonElements: "5"
1481
1481
  }
1482
1482
  };
1483
- w(e, (c) => {
1484
- u(s, {
1483
+ w(e, (r) => {
1484
+ f(s, {
1485
1485
  method: "POST",
1486
1486
  headers: {
1487
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1487
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1488
1488
  "Content-type": "application/json;charset=UTF-8",
1489
1489
  Accept: "application/json"
1490
1490
  },
1491
1491
  data: JSON.stringify(i),
1492
1492
  type: "json",
1493
1493
  onComplete(o, a) {
1494
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1495
- t && t(r, o);
1494
+ const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1495
+ t && t(c, o);
1496
1496
  },
1497
1497
  onFailure(o, a) {
1498
1498
  n && n(o, a);
@@ -1506,16 +1506,16 @@ function Be(e, t = void 0, n = void 0) {
1506
1506
  uri: "/api/community/listmycommunities",
1507
1507
  limit: `/limit/${e.limit ? e.limit : 128}`,
1508
1508
  page: `/page/${e.page ? e.page : "1"}`
1509
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1509
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1510
1510
  w(e, (o) => {
1511
- u(i, {
1511
+ f(i, {
1512
1512
  method: "GET",
1513
1513
  headers: {
1514
1514
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1515
1515
  },
1516
- onComplete(a, r, d) {
1516
+ onComplete(a, c, d) {
1517
1517
  const p = JSON.parse(a).result;
1518
- let f = 0;
1518
+ let u = 0;
1519
1519
  p.forEach((m) => {
1520
1520
  const g = {
1521
1521
  description: m.description,
@@ -1529,21 +1529,21 @@ function Be(e, t = void 0, n = void 0) {
1529
1529
  e,
1530
1530
  m.id,
1531
1531
  (h) => {
1532
- f++, g.members = h, c.push(g), f === p.length && t && t(c);
1532
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1533
1533
  },
1534
1534
  (h) => n(h)
1535
1535
  );
1536
1536
  });
1537
1537
  },
1538
- onFailure(a, r) {
1538
+ onFailure(a, c) {
1539
1539
  const d = a;
1540
- d.status = r.status, d.response = r.errormsg, n && n(d);
1540
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1541
1541
  }
1542
1542
  });
1543
1543
  });
1544
1544
  }
1545
1545
  function ee(e, t, n, s) {
1546
- const i = `${e.space}/api/community/listmembers`, c = {
1546
+ const i = `${e.space}/api/community/listmembers`, r = {
1547
1547
  params: {
1548
1548
  page: e.page ? e.page : 1,
1549
1549
  limit: e.limit ? e.limit : 50,
@@ -1551,21 +1551,21 @@ function ee(e, t, n, s) {
1551
1551
  }
1552
1552
  };
1553
1553
  w(e, (o) => {
1554
- u(i, {
1554
+ f(i, {
1555
1555
  method: "POST",
1556
1556
  headers: {
1557
1557
  "Content-type": "application/json;charset=UTF-8",
1558
1558
  Accept: "application/json",
1559
1559
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1560
1560
  },
1561
- data: JSON.stringify(c),
1561
+ data: JSON.stringify(r),
1562
1562
  type: "json",
1563
- onComplete(a, r, d) {
1563
+ onComplete(a, c, d) {
1564
1564
  n && n(a);
1565
1565
  },
1566
- onFailure(a, r) {
1566
+ onFailure(a, c) {
1567
1567
  const d = a;
1568
- d.status = r.status, d.response = r.errormsg, s && s(d);
1568
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1569
1569
  }
1570
1570
  });
1571
1571
  });
@@ -1574,31 +1574,31 @@ function Ye(e, t = void 0, n = void 0) {
1574
1574
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1575
1575
  e.commu_id || (e.commu_id = s);
1576
1576
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1577
- w(e, (c) => {
1578
- u(i, {
1577
+ w(e, (r) => {
1578
+ f(i, {
1579
1579
  method: "GET",
1580
1580
  headers: {
1581
1581
  "Content-type": "application/json;charset=UTF-8",
1582
1582
  Accept: "application/json",
1583
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1583
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1584
1584
  },
1585
1585
  onComplete(o) {
1586
1586
  const a = JSON.parse(o);
1587
1587
  t && t(a);
1588
1588
  },
1589
1589
  onFailure(o, a) {
1590
- const r = o;
1591
- r.status = a.status, r.response = a.errormsg, n && n(r);
1590
+ const c = o;
1591
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1592
1592
  }
1593
1593
  });
1594
1594
  });
1595
1595
  }
1596
1596
  function qe(e, t, n = void 0, s = void 0) {
1597
- const { listAllContacts: i, currentUser: c } = e;
1597
+ const { listAllContacts: i, currentUser: r } = e;
1598
1598
  console.log("__listAllContacts", i.hits);
1599
1599
  const o = `${e.space}/api/directmessages`, a = {
1600
- users: [c.login].concat(t.receipt)
1601
- }, r = {
1600
+ users: [r.login].concat(t.receipt)
1601
+ }, c = {
1602
1602
  id_msg: "",
1603
1603
  senderId: e.currentUser.login,
1604
1604
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1608,14 +1608,14 @@ function qe(e, t, n = void 0, s = void 0) {
1608
1608
  te(
1609
1609
  a.users,
1610
1610
  (l) => {
1611
- l !== void 0 && (r.id_msg = l.id, d = !0, D(e, r));
1611
+ l !== void 0 && (c.id_msg = l.id, d = !0, $(e, c));
1612
1612
  },
1613
1613
  (l) => {
1614
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1614
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1615
1615
  }
1616
1616
  ), d === !1 && setTimeout(() => {
1617
1617
  d === !1 && w(e, (l) => {
1618
- u(o, {
1618
+ f(o, {
1619
1619
  method: "POST",
1620
1620
  headers: {
1621
1621
  "Content-Type": "application/json",
@@ -1624,13 +1624,13 @@ function qe(e, t, n = void 0, s = void 0) {
1624
1624
  },
1625
1625
  data: JSON.stringify(a),
1626
1626
  type: "json",
1627
- onComplete(p, f, m) {
1627
+ onComplete(p, u, m) {
1628
1628
  const g = p;
1629
- g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), r.id_msg = g.result.id, D(e, r);
1629
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, $(e, c);
1630
1630
  },
1631
- onFailure(p, f, m) {
1631
+ onFailure(p, u, m) {
1632
1632
  const g = p;
1633
- g.msg = f.errormsg, g.status = f.status, s && s(g);
1633
+ g.msg = u.errormsg, g.status = u.status, s && s(g);
1634
1634
  }
1635
1635
  });
1636
1636
  });
@@ -1638,23 +1638,23 @@ function qe(e, t, n = void 0, s = void 0) {
1638
1638
  }
1639
1639
  function te(e, t, n, s) {
1640
1640
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1641
- w(e, (c) => {
1642
- u(i, {
1641
+ w(e, (r) => {
1642
+ f(i, {
1643
1643
  method: "GET",
1644
1644
  headers: {
1645
1645
  Accept: "application/json,text/javascript,*/*",
1646
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1646
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1647
1647
  },
1648
1648
  onComplete(o) {
1649
- const a = JSON.parse(o), r = [];
1649
+ const a = JSON.parse(o), c = [];
1650
1650
  a.result.forEach((p) => {
1651
- p.users = p.users.sort((f, m) => f.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1651
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1652
1652
  });
1653
- const d = t.sort(), l = r.find((p) => {
1654
- const f = [];
1653
+ const d = t.sort(), l = c.find((p) => {
1654
+ const u = [];
1655
1655
  return p.users.forEach((m) => {
1656
- f.push(m.login);
1657
- }), JSON.stringify(f) === JSON.stringify(d);
1656
+ u.push(m.login);
1657
+ }), JSON.stringify(u) === JSON.stringify(d);
1658
1658
  });
1659
1659
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1660
1660
  },
@@ -1665,13 +1665,13 @@ function te(e, t, n, s) {
1665
1665
  });
1666
1666
  });
1667
1667
  }
1668
- function D(e, t, n = void 0, s = void 0) {
1668
+ function $(e, t, n = void 0, s = void 0) {
1669
1669
  const i = {
1670
1670
  base: e.space,
1671
1671
  uri: "/api/community",
1672
1672
  id_msg: `${t.id_msg}`,
1673
1673
  endUri: "/instantmessages"
1674
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1674
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1675
1675
  author: { login: t.senderId, displayName: t.senderName },
1676
1676
  accessState: null,
1677
1677
  commentUri: null,
@@ -1681,8 +1681,8 @@ function D(e, t, n = void 0, s = void 0) {
1681
1681
  parentCommentUri: null,
1682
1682
  richMessage: t.msg
1683
1683
  };
1684
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1685
- u(c, {
1684
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1685
+ f(r, {
1686
1686
  method: "POST",
1687
1687
  headers: {
1688
1688
  "Content-Type": "application/json",
@@ -1691,12 +1691,12 @@ function D(e, t, n = void 0, s = void 0) {
1691
1691
  },
1692
1692
  data: JSON.stringify(o),
1693
1693
  type: "json",
1694
- onComplete(r, d, l) {
1695
- const p = r;
1694
+ onComplete(c, d, l) {
1695
+ const p = c;
1696
1696
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1697
1697
  },
1698
- onFailure(r, d) {
1699
- const l = r;
1698
+ onFailure(c, d) {
1699
+ const l = c;
1700
1700
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1701
1701
  }
1702
1702
  });
@@ -1720,15 +1720,15 @@ const se = {
1720
1720
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1721
1721
  };
1722
1722
  function He(e, t, n = void 0, s = void 0) {
1723
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1724
- (r) => r.id === t.community_id
1723
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1724
+ (c) => c.id === t.community_id
1725
1725
  ), o = e.swymCommunities.find(
1726
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1726
+ (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1727
1727
  ), a = {
1728
1728
  params: {
1729
1729
  title: t.title,
1730
1730
  // String, le nom de l'affaire
1731
- community_id: c?.id !== void 0 ? c.id : o.id,
1731
+ community_id: r?.id !== void 0 ? r.id : o.id,
1732
1732
  // String, l'id de la communauté
1733
1733
  message: ae(t.text_html),
1734
1734
  // STRING => le contenue du message doit être au format HTML
@@ -1736,22 +1736,22 @@ function He(e, t, n = void 0, s = void 0) {
1736
1736
  // 1 publier, 0 non publier
1737
1737
  }
1738
1738
  };
1739
- w(e, (r) => {
1739
+ w(e, (c) => {
1740
1740
  const d = {
1741
1741
  "Content-type": "application/json;charset=UTF-8",
1742
1742
  Accept: "application/json",
1743
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1743
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1744
1744
  };
1745
- u(i, {
1745
+ f(i, {
1746
1746
  method: "POST",
1747
1747
  headers: d,
1748
1748
  data: JSON.stringify(a),
1749
1749
  type: "json",
1750
- onComplete(l, p, f) {
1750
+ onComplete(l, p, u) {
1751
1751
  const m = JSON.parse(l);
1752
- m.status = f.status, m.response = f.response, n && n(m);
1752
+ m.status = u.status, m.response = u.response, n && n(m);
1753
1753
  },
1754
- onFailure(l, p, f) {
1754
+ onFailure(l, p, u) {
1755
1755
  const m = l;
1756
1756
  m.status = p.status, m.response = p.errormsg, s && s(m);
1757
1757
  }
@@ -1759,28 +1759,28 @@ function He(e, t, n = void 0, s = void 0) {
1759
1759
  });
1760
1760
  }
1761
1761
  function ze(e, t, n = void 0, s = void 0) {
1762
- const i = `${e.space}/api/idea/delete`, c = {
1762
+ const i = `${e.space}/api/idea/delete`, r = {
1763
1763
  params: {
1764
1764
  community_id: t.community_id,
1765
1765
  ideationIds: [t.idee_id]
1766
1766
  }
1767
1767
  };
1768
1768
  w(e, (o) => {
1769
- u(i, {
1769
+ f(i, {
1770
1770
  method: "POST",
1771
1771
  headers: {
1772
1772
  "Content-type": "application/json;charset=UTF-8",
1773
1773
  Accept: "application/json",
1774
1774
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1775
1775
  },
1776
- data: JSON.stringify(c),
1776
+ data: JSON.stringify(r),
1777
1777
  type: "json",
1778
- onComplete(a, r, d) {
1778
+ onComplete(a, c, d) {
1779
1779
  n && n(a);
1780
1780
  },
1781
- onFailure(a, r, d) {
1781
+ onFailure(a, c, d) {
1782
1782
  const l = a;
1783
- l.status = r.status, l.response = r.errormsg, s && s(l);
1783
+ l.status = c.status, l.response = c.errormsg, s && s(l);
1784
1784
  }
1785
1785
  });
1786
1786
  });
@@ -1788,13 +1788,13 @@ function ze(e, t, n = void 0, s = void 0) {
1788
1788
  function Qe(e, t = "", n = void 0, s = void 0) {
1789
1789
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1790
1790
  t === "" && (t = i);
1791
- const c = `${e.space}/api/idea/get`, o = {
1791
+ const r = `${e.space}/api/idea/get`, o = {
1792
1792
  params: {
1793
1793
  id: t
1794
1794
  }
1795
1795
  };
1796
1796
  w(e, (a) => {
1797
- u(c, {
1797
+ f(r, {
1798
1798
  method: "POST",
1799
1799
  headers: {
1800
1800
  "Content-type": "application/json;charset=UTF-8",
@@ -1803,12 +1803,12 @@ function Qe(e, t = "", n = void 0, s = void 0) {
1803
1803
  },
1804
1804
  data: JSON.stringify(o),
1805
1805
  type: "json",
1806
- onComplete(r) {
1807
- const d = r;
1806
+ onComplete(c) {
1807
+ const d = c;
1808
1808
  d.msg = d.result.message, n && n(d);
1809
1809
  },
1810
- onFailure(r) {
1811
- const d = r;
1810
+ onFailure(c) {
1811
+ const d = c;
1812
1812
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1813
1813
  }
1814
1814
  });
@@ -1819,20 +1819,20 @@ function Ze(e, t = se, n = void 0, s = void 0) {
1819
1819
  uri: "/api/idea/list",
1820
1820
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1821
1821
  limit: `/limit/${t.limit ? t.limit : 10}`
1822
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1822
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1823
1823
  w(e, (o) => {
1824
- u(c, {
1824
+ f(r, {
1825
1825
  method: "GET",
1826
1826
  headers: {
1827
1827
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1828
1828
  },
1829
1829
  onComplete(a) {
1830
- const r = JSON.parse(a);
1831
- n && n(r);
1830
+ const c = JSON.parse(a);
1831
+ n && n(c);
1832
1832
  },
1833
- onFailure(a, r) {
1833
+ onFailure(a, c) {
1834
1834
  const d = a;
1835
- d.status = r.status, d.response = r.errormsg, s && s(d);
1835
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1836
1836
  }
1837
1837
  });
1838
1838
  });
@@ -1915,18 +1915,18 @@ function ae(e) {
1915
1915
  function et(e, t = void 0, n = void 0) {
1916
1916
  const s = e.space + "/api/user/getcurrent/";
1917
1917
  w(e, (i) => {
1918
- u(s, {
1918
+ f(s, {
1919
1919
  method: "GET",
1920
1920
  headers: {
1921
1921
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1922
1922
  },
1923
- onComplete(c, o, a) {
1924
- const r = JSON.parse(c);
1925
- t && t(r.result);
1923
+ onComplete(r, o, a) {
1924
+ const c = JSON.parse(r);
1925
+ t && t(c.result);
1926
1926
  },
1927
- onFailure(c, o, a) {
1928
- const r = { erreur: JSON.parse(c), headers: o, xhr: a };
1929
- n && n(r);
1927
+ onFailure(r, o, a) {
1928
+ const c = { erreur: JSON.parse(r), headers: o, xhr: a };
1929
+ n && n(c);
1930
1930
  }
1931
1931
  });
1932
1932
  });
@@ -1935,11 +1935,11 @@ function tt(e, t, n = void 0, s = void 0) {
1935
1935
  const i = e.space + "/api/user/find/login/" + t;
1936
1936
  w(
1937
1937
  e,
1938
- (c) => {
1939
- u(i, {
1938
+ (r) => {
1939
+ f(i, {
1940
1940
  method: "GET",
1941
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1942
- onComplete(o, a, r) {
1941
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1942
+ onComplete(o, a, c) {
1943
1943
  const d = JSON.parse(o);
1944
1944
  n && n(d);
1945
1945
  },
@@ -1954,32 +1954,22 @@ function tt(e, t, n = void 0, s = void 0) {
1954
1954
  function nt(e, t = void 0, n = void 0) {
1955
1955
  e.tenant && E(e, (s) => {
1956
1956
  console.log("serviceUrls", s);
1957
- const i = s.services.find((r) => r.id === "3dpassport")?.url;
1958
- s.services.find((r) => r.id === "3dcompass")?.url;
1959
- const c = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2", o = `${i}/login?action=get_auth_params`, a = `${i}/login/?service=${c}/auth/cas`;
1960
- u(o, {
1961
- onComplete(r) {
1962
- r.lt, u(a, {
1963
- onComplete(d) {
1964
- console.log("response", d);
1965
- const l = typeof d == "string" ? JSON.parse(d)?.x3ds_service_redirect_url : d?.x3ds_service_redirect_url;
1966
- `${i}/login/?service=${l}` ? u(l, {
1967
- method: "POST",
1968
- headers: {
1969
- "Content-Type": "application/x-www-form-urlencoded"
1970
- },
1971
- onComplete(p) {
1972
- t && t(p);
1973
- },
1974
- onFailure(p) {
1975
- n && n(p);
1976
- }
1977
- }) : n && n("x3ds_service_redirect_url is undefined");
1978
- },
1979
- onFailure(d) {
1980
- n && n(d);
1957
+ const i = s.services.find((a) => a.id === "3dpassport")?.url;
1958
+ s.services.find((a) => a.id === "3dcompass")?.url;
1959
+ const r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
1960
+ f(o, {
1961
+ async onComplete(a) {
1962
+ console.log("response", a);
1963
+ const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url, d = await fetch(c, {
1964
+ method: "POST",
1965
+ headers: {
1966
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
1981
1967
  }
1982
1968
  });
1969
+ console.log("result", d);
1970
+ },
1971
+ onFailure(a) {
1972
+ n && n(a);
1983
1973
  }
1984
1974
  });
1985
1975
  });
@@ -2005,14 +1995,14 @@ function at(e, t = void 0, n = void 0) {
2005
1995
  },
2006
1996
  !0
2007
1997
  );
2008
- const i = N.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2009
- u(c, {
1998
+ const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1999
+ f(r, {
2010
2000
  onComplete(o) {
2011
2001
  if (Array.isArray(JSON.parse(o))) {
2012
2002
  const a = JSON.parse(o);
2013
2003
  console.log("serviceId=3dsearch", a);
2014
- const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2015
- u(r, {
2004
+ const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2005
+ f(c, {
2016
2006
  method: "POST",
2017
2007
  headers: {
2018
2008
  Accept: "application/json",
@@ -2082,12 +2072,12 @@ export {
2082
2072
  X as _3DSpace_get_docInfo,
2083
2073
  Y as _3DSpace_get_downloadTicket_multidoc,
2084
2074
  b as _3DSpace_get_securityContexts,
2085
- $ as _3DSpace_get_ticket,
2075
+ D as _3DSpace_get_ticket,
2086
2076
  je as _3DSpace_lifecycle_changeRevision,
2087
2077
  Ae as _3DSpace_lifecycle_changeState,
2088
- De as _3DSpace_lifecycle_getGraph,
2078
+ $e as _3DSpace_lifecycle_getGraph,
2089
2079
  Ue as _3DSpace_lifecycle_getNextRevision,
2090
- $e as _3DSpace_lifecycle_getNextStates,
2080
+ De as _3DSpace_lifecycle_getNextStates,
2091
2081
  qe as _3DSwym_buildDirectMessage,
2092
2082
  ze as _3DSwym_deleteIdea,
2093
2083
  te as _3DSwym_findCommunityToInstantMSG,
@@ -2102,7 +2092,7 @@ export {
2102
2092
  tt as _3DSwym_get_findUser,
2103
2093
  w as _3DSwym_get_version,
2104
2094
  He as _3DSwym_postIdea,
2105
- D as _3DSwym_sendMessageData,
2095
+ $ as _3DSwym_sendMessageData,
2106
2096
  ye as _AppMngt_get_info_user,
2107
2097
  _e as _AppMngt_get_users,
2108
2098
  nt as _Iterop_Auth_CAS,
@@ -2110,7 +2100,7 @@ export {
2110
2100
  ge as _getPlatformServices,
2111
2101
  E as _getServiceUrl,
2112
2102
  he as _getServiceUrl_3DPassport,
2113
- u as _httpCallAuthenticated,
2103
+ f as _httpCallAuthenticated,
2114
2104
  ue as _setDraggable,
2115
2105
  me as _setDroppable,
2116
2106
  fe as _setupTagger,