@beam3_dev/api_module 0.0.52 → 0.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
- import { DateTime as b } from "luxon";
3
- import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
- function R() {
2
+ import { DateTime as N } from "luxon";
3
+ import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
+ function A() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -34,7 +34,7 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ie(e, t = void 0, n = void 0) {
37
+ async function oe(e, t = void 0, n = void 0) {
38
38
  const s = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
@@ -44,13 +44,13 @@ async function ie(e, t = void 0, n = void 0) {
44
44
  Accept: "application/json"
45
45
  }
46
46
  }
47
- ).then((i) => i.json()).then((i) => {
48
- t && t(i);
49
- }).catch((i) => {
50
- n && n(i), console.error("Erreur : " + i);
47
+ ).then((o) => o.json()).then((o) => {
48
+ t && t(o);
49
+ }).catch((o) => {
50
+ n && n(o), console.error("Erreur : " + o);
51
51
  });
52
52
  }
53
- async function oe(e, t = void 0, n = void 0) {
53
+ async function ie(e, t = void 0, n = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -66,10 +66,10 @@ async function oe(e, t = void 0, n = void 0) {
66
66
  });
67
67
  }
68
68
  async function re(e, t = L) {
69
- let n = b.now().year;
70
- const s = e, i = [], c = (a) => {
69
+ let n = N.now().year;
70
+ const s = e, o = [], c = (a) => {
71
71
  for (let r in a)
72
- i.push({ date: r, comment: a[r] });
72
+ o.push({ date: r, comment: a[r] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -87,13 +87,13 @@ async function re(e, t = L) {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of i)
90
+ for (let r of o)
91
91
  a.events.findIndex(
92
- (l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
93
  ) === -1 && a.events.push({
94
94
  name: "Férié : " + r.comment,
95
- start: b.fromISO(r.date).toISODate(),
96
- end: b.fromISO(r.date).toISODate(),
95
+ start: N.fromISO(r.date).toISODate(),
96
+ end: N.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -101,8 +101,8 @@ async function re(e, t = L) {
101
101
  })();
102
102
  }
103
103
  async function ce(e, t, n = !0) {
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;
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, c) => o.start - c.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -118,7 +118,7 @@ function le(e, t = void 0) {
118
118
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
119
  let s;
120
120
  s === void 0 && (s = n.createProxy({
121
- widgetId: A.id,
121
+ widgetId: R.id,
122
122
  filteringMode: "WithFilteringServices"
123
123
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
@@ -132,7 +132,7 @@ async function ue(e, t = void 0, n = void 0) {
132
132
  O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (s) => {
135
- (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
135
+ (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
136
  s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
@@ -145,13 +145,13 @@ async function ue(e, t = void 0, n = void 0) {
145
145
  function fe() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: n,
153
153
  user: s,
154
- appsConfiguration: i,
154
+ appsConfiguration: o,
155
155
  appConf: c
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
@@ -162,49 +162,49 @@ function me(e, t, n) {
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
- }, i = `${s.base}${s.uri}${s.option}`;
166
- f(i, {
165
+ }, o = `${s.base}${s.uri}${s.option}`;
166
+ f(o, {
167
167
  method: "GET",
168
168
  headers: {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, o, a) {
172
+ onComplete(c, i, a) {
173
173
  const r = JSON.parse(c), d = r.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
177
  t && t(d, r);
178
178
  },
179
- onFailure(c, o) {
179
+ onFailure(c, i) {
180
180
  const a = c;
181
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
181
+ a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
182
182
  }
183
183
  });
184
184
  }
185
185
  function ge(e, t = void 0, n = void 0) {
186
186
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  f(s, {
188
- onComplete(i, c, o) {
189
- const a = JSON.parse(i);
188
+ onComplete(o, c, i) {
189
+ const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(i, c) {
193
- const o = i;
194
- o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
192
+ onFailure(o, c) {
193
+ const i = o;
194
+ i.msg = c.errormsg, i.errCode = c.errorcode, n && n(i);
195
195
  }
196
196
  });
197
197
  }
198
198
  function he(e, t, n = void 0, s = void 0) {
199
- let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
- f(i, {
201
- onComplete(c, o, a) {
199
+ let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
+ f(o, {
201
+ onComplete(c, i, a) {
202
202
  const r = JSON.parse(c);
203
203
  n && n(r);
204
204
  },
205
- onFailure(c, o) {
205
+ onFailure(c, i) {
206
206
  const a = c;
207
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
207
+ a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
@@ -213,7 +213,7 @@ const F = {
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function Se(e, t, n = void 0, s = void 0) {
216
- const { space: i, currentUser: c } = e, a = `${i}${{
216
+ const { space: o, currentUser: c } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
218
  }.URIUGr}`, r = {
219
219
  groups: [
@@ -242,7 +242,7 @@ function Se(e, t, n = void 0, s = void 0) {
242
242
  });
243
243
  }
244
244
  function _e(e, t, n = void 0, s = void 0) {
245
- const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
245
+ const { space: o, tenant: c } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${i}${a}${r}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,10 +261,10 @@ function _e(e, t, n = void 0, s = void 0) {
261
261
  });
262
262
  }
263
263
  function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
264
+ const { space: s, tenant: o } = e, c = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, r = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${o}${a}`;
267
+ }, d = `${c}${i}${a}`;
268
268
  f(d, {
269
269
  OPTsH: r,
270
270
  onComplete(l) {
@@ -277,7 +277,7 @@ function E(e, t = void 0, n = void 0) {
277
277
  });
278
278
  }
279
279
  function ye(e, t = void 0, n = void 0) {
280
- 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: {
280
+ 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: {
281
281
  "Content-Type": "application/json",
282
282
  Accept: "application/json,text/javascript,*/*"
283
283
  } };
@@ -286,8 +286,8 @@ function ye(e, t = void 0, n = void 0) {
286
286
  opts: d,
287
287
  onComplete(l) {
288
288
  const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
- if (i && Object.keys(i).length > 0) {
290
- const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
289
+ if (o && Object.keys(o).length > 0) {
290
+ const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
291
291
  u.iam = S, u.UG = m, u.iamMember = h, E(
292
292
  e,
293
293
  (_) => {
@@ -308,20 +308,20 @@ function ye(e, t = void 0, n = void 0) {
308
308
  }
309
309
  }
310
310
  function we(e, t) {
311
- const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
- f(i, {
311
+ const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
+ f(o, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Te(e, t, n, s = void 0, i = void 0) {
317
- const { space: c, tenant: o } = e, a = {
316
+ function Te(e, t, n, s = void 0, o = void 0) {
317
+ const { space: c, tenant: i } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${o}`
324
+ OPTsTenant: `tenant=dstenant:${i}`
325
325
  }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
326
326
  f(d, {
327
327
  headers: F,
@@ -332,11 +332,11 @@ function Te(e, t, n, s = void 0, i = void 0) {
332
332
  s && s(p);
333
333
  },
334
334
  onFailure(p) {
335
- i && i(p);
335
+ o && o(p);
336
336
  }
337
337
  });
338
338
  }
339
- function Ce(e, t, n, s = void 0, i = void 0) {
339
+ function Ce(e, t, n, s = void 0, o = void 0) {
340
340
  const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
@@ -347,13 +347,13 @@ function Ce(e, t, n, s = void 0, i = void 0) {
347
347
  s && s(d);
348
348
  },
349
349
  onFailure(d) {
350
- i && i(d);
350
+ o && o(d);
351
351
  }
352
352
  });
353
353
  }
354
354
  function Oe(e, t, n = void 0, s = void 0) {
355
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- f(o, {
355
+ const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ f(i, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -370,19 +370,19 @@ function Oe(e, t, n = void 0, s = void 0) {
370
370
  });
371
371
  }
372
372
  async function J(e, t = void 0, n = void 0, s = void 0) {
373
- const i = e.space;
373
+ const o = e.space;
374
374
  if (t === void 0) {
375
375
  console.log("Le paramètre docid est obligatoire");
376
376
  return;
377
377
  }
378
- const c = i + `/resources/v1/modeler/documents/${t}`;
378
+ const c = o + `/resources/v1/modeler/documents/${t}`;
379
379
  f(c, {
380
- onComplete(o, a, r) {
381
- const d = JSON.parse(o);
380
+ onComplete(i, a, r) {
381
+ const d = JSON.parse(i);
382
382
  n && n(d);
383
383
  },
384
- onFailure(o) {
385
- s && s(o);
384
+ onFailure(i) {
385
+ s && s(i);
386
386
  }
387
387
  });
388
388
  }
@@ -390,12 +390,12 @@ function k(e, t = void 0, n = void 0) {
390
390
  if (e.objID && e.objID !== "") {
391
391
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
392
392
  f(s, {
393
- onComplete(i, c, o) {
394
- const a = JSON.parse(i);
393
+ onComplete(o, c, i) {
394
+ const a = JSON.parse(o);
395
395
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
396
396
  },
397
- onFailure(i) {
398
- n && n(i);
397
+ onFailure(o) {
398
+ n && n(o);
399
399
  }
400
400
  });
401
401
  } else
@@ -413,12 +413,12 @@ function C(e, t = void 0, n = void 0) {
413
413
  if (e.space) {
414
414
  const s = e.space + "/resources/v1/application/CSRF";
415
415
  f(s, {
416
- onComplete(i, c, o) {
417
- const a = JSON.parse(i);
416
+ onComplete(o, c, i) {
417
+ const a = JSON.parse(o);
418
418
  console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
419
419
  },
420
- onFailure(i, c, o) {
421
- n && n({ response: i, headers: c, xhr: o });
420
+ onFailure(o, c, i) {
421
+ n && n({ response: o, headers: c, xhr: i });
422
422
  }
423
423
  });
424
424
  } else
@@ -428,10 +428,10 @@ function U(e, t = void 0, n = void 0) {
428
428
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
429
429
  k(
430
430
  e,
431
- (i) => {
431
+ (o) => {
432
432
  console.log(
433
433
  "_3DSpace_file_url / onComplete / ☠️ info => ",
434
- i,
434
+ o,
435
435
  e.token
436
436
  ), f(s, {
437
437
  method: "PUT",
@@ -439,44 +439,44 @@ function U(e, t = void 0, n = void 0) {
439
439
  ENO_CSRF_TOKEN: e.token
440
440
  },
441
441
  onComplete(c) {
442
- let o = JSON.parse(c);
443
- console.log("_3DSpace_file_url() / ☠️ info => ", o);
444
- const a = o.data[0].dataelements.ticketURL;
445
- e.ticket = a, t && t(a);
442
+ let i = JSON.parse(c);
443
+ console.log("_3DSpace_file_url() / ☠️ info => ", i);
444
+ const a = i.data[0].dataelements.ticketURL;
445
+ console.log("le ticket est dans la callback"), t && t(a);
446
446
  },
447
- onFailure(c, o) {
448
- console.warn("☠️ error => ", c, o), n && n(c, o);
447
+ onFailure(c, i) {
448
+ console.warn("☠️ error => ", c, i), n && n(c, i);
449
449
  }
450
450
  });
451
451
  },
452
- (i) => {
453
- console.warn("_3DSpace_file_url / error => ", i), n && n(i);
452
+ (o) => {
453
+ console.warn("_3DSpace_file_url / error => ", o), n && n(o);
454
454
  }
455
455
  );
456
456
  }
457
- function Ne(e, t, n, s = void 0, i = void 0) {
457
+ function be(e, t, n, s = void 0, o = void 0) {
458
458
  const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
459
459
  n || (n = e.token), f(c, {
460
460
  method: "PUT",
461
461
  headers: {
462
462
  ENO_CSRF_TOKEN: n
463
463
  },
464
- onComplete(o) {
465
- let a = JSON.parse(o);
464
+ onComplete(i) {
465
+ let a = JSON.parse(i);
466
466
  if (console.log("☠️ info => ", a), a.success === !0)
467
467
  try {
468
468
  const r = a.data[0].dataelements.ticketURL;
469
469
  s && s(r);
470
470
  } catch (r) {
471
- i && i(r);
471
+ o && o(r);
472
472
  }
473
473
  },
474
- onFailure(o) {
475
- i && i(o);
474
+ onFailure(i) {
475
+ o && o(i);
476
476
  }
477
477
  });
478
478
  }
479
- function G(e, t, n, s, i, c = void 0, o = void 0) {
479
+ function G(e, t, n, s, o, c = void 0, i = void 0) {
480
480
  k(
481
481
  e,
482
482
  t,
@@ -486,15 +486,15 @@ function G(e, t, n, s, i, c = void 0, o = void 0) {
486
486
  t,
487
487
  n,
488
488
  s,
489
- i,
489
+ o,
490
490
  a.csrf.value,
491
491
  c,
492
- o
492
+ i
493
493
  );
494
494
  }
495
495
  );
496
496
  }
497
- function K(e, t, n, s, i, c, o = void 0, a = void 0) {
497
+ function K(e, t, n, s, o, c, i = void 0, a = void 0) {
498
498
  const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
499
499
  f(r, {
500
500
  method: "PUT",
@@ -503,7 +503,7 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
503
503
  },
504
504
  onComplete(d, l, p) {
505
505
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
506
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, i);
506
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
507
507
  const g = {};
508
508
  g.method = "POST", g.data = m, g.onComplete = function(h) {
509
509
  let S = "temp_" + Date.now(), _ = {
@@ -520,7 +520,7 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
520
520
  {
521
521
  id: n,
522
522
  dataelements: {
523
- title: i,
523
+ title: o,
524
524
  receipt: h
525
525
  },
526
526
  updateAction: "REVISE"
@@ -533,7 +533,7 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
533
533
  }),
534
534
  type: "json",
535
535
  onComplete(y) {
536
- o && o(y);
536
+ i && i(y);
537
537
  },
538
538
  onFailure(y) {
539
539
  a && a(y);
@@ -549,14 +549,14 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
549
549
  }
550
550
  });
551
551
  }
552
- async function be(e, t, n, s, i = void 0, c = void 0) {
553
- const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
552
+ async function Ne(e, t, n, s, o = void 0, c = void 0) {
553
+ const i = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
554
554
  type: "text/plain"
555
555
  }), p = {
556
- url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
557
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
556
+ url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
557
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
558
558
  };
559
- if (!o && o !== "") {
559
+ if (!i && i !== "") {
560
560
  console.log("le store._3DSpace est vide");
561
561
  return;
562
562
  }
@@ -599,7 +599,7 @@ async function be(e, t, n, s, i = void 0, c = void 0) {
599
599
  }
600
600
  ]
601
601
  },
602
- tempId: R()
602
+ tempId: A()
603
603
  }
604
604
  ]
605
605
  }),
@@ -615,7 +615,7 @@ async function be(e, t, n, s, i = void 0, c = void 0) {
615
615
  onFailure: y
616
616
  };
617
617
  function _(T) {
618
- console.log("Success -- response ", T.data[0]), i && i(T);
618
+ console.log("Success -- response ", T.data[0]), o && o(T);
619
619
  }
620
620
  function y(T, D) {
621
621
  console.log("Erreur -- response ", T, `
@@ -625,9 +625,9 @@ async function be(e, t, n, s, i = void 0, c = void 0) {
625
625
  }
626
626
  });
627
627
  }
628
- function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
629
- const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
630
- f(o, {
628
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
629
+ const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
630
+ f(i, {
631
631
  method: "GET",
632
632
  onComplete(a) {
633
633
  const r = JSON.parse(a);
@@ -664,7 +664,7 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
664
664
  }));
665
665
  }
666
666
  }
667
- l && p && u ? (d = u + "." + p + "." + l, i(d)) : r.preferredcredentials ? (d = r.preferredcredentials.role.name + "." + r.preferredcredentials.organization.title + "." + r.preferredcredentials.collabspace.title, i(d)) : c && (d = u + "." + p + "." + l, c(d));
667
+ l && p && u ? (d = u + "." + p + "." + l, o(d)) : r.preferredcredentials ? (d = r.preferredcredentials.role.name + "." + r.preferredcredentials.organization.title + "." + r.preferredcredentials.collabspace.title, o(d)) : c && (d = u + "." + p + "." + l, c(d));
668
668
  },
669
669
  onFailure(a) {
670
670
  console.log("Erreur de récupération du contexte de sécurité. => ", a);
@@ -672,11 +672,13 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
672
672
  });
673
673
  }
674
674
  async function I(e, t = void 0, n = void 0, s = void 0) {
675
- const i = e.objID;
676
- (i === void 0 || i === "") && console.warn(
675
+ const o = e.objID;
676
+ (!o || o === "") && console.warn(
677
677
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
678
678
  ), (e.space === "" || !e.space) && console.warn(
679
679
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
680
+ ), (e.token === "" || !e.token) && console.warn(
681
+ "_3DSpace_download_doc() / Le paramètre token est obligatoire"
680
682
  );
681
683
  try {
682
684
  console.log("_3DSpace_download_doc / credentials", e), U(
@@ -686,12 +688,12 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
686
688
  headers: {
687
689
  ENO_CSRF_TOKEN: e.token
688
690
  },
689
- onComplete(o) {
690
- const a = JSON.parse(o);
691
- t && t(a);
691
+ onComplete(i) {
692
+ const a = JSON.parse(i);
693
+ console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
692
694
  },
693
- onFailure(o, a, r) {
694
- n && (console.log("error http", o), n({ error: o, headers: a, xhr: r }));
695
+ onFailure(i, a, r) {
696
+ n && (console.log("error http", i), n({ error: i, headers: a, xhr: r }));
695
697
  }
696
698
  });
697
699
  },
@@ -704,33 +706,33 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
704
706
  }
705
707
  }
706
708
  async function W(e, t, n = void 0, s = void 0) {
707
- let i = [];
709
+ let o = [];
708
710
  for (let a = 0; a < t.length; a += 80) {
709
711
  const r = t.slice(a, a + 80);
710
- i.push(r);
712
+ o.push(r);
711
713
  }
712
- const o = (a) => {
714
+ const i = (a) => {
713
715
  X(
714
716
  e,
715
- i[a],
717
+ o[a],
716
718
  () => {
717
- a++, a < i.length && o(a);
719
+ a++, a < o.length && i(a);
718
720
  },
719
721
  (r) => {
720
722
  n && n(r);
721
723
  }
722
724
  );
723
725
  };
724
- o(0);
726
+ i(0);
725
727
  }
726
- function X(e, t, n = void 0, s = void 0, i = void 0) {
728
+ function X(e, t, n = void 0, s = void 0, o = void 0) {
727
729
  const c = [];
728
730
  t.forEach((r) => {
729
731
  c.push({
730
732
  id: r
731
733
  });
732
734
  });
733
- let o = JSON.stringify({
735
+ let i = JSON.stringify({
734
736
  csrf: {
735
737
  name: "ENO_CSRF_TOKEN",
736
738
  value: e.token
@@ -740,7 +742,7 @@ function X(e, t, n = void 0, s = void 0, i = void 0) {
740
742
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
741
743
  f(a, {
742
744
  method: "PUT",
743
- data: o,
745
+ data: i,
744
746
  type: "json",
745
747
  onComplete(r) {
746
748
  const d = r.data;
@@ -760,20 +762,20 @@ function X(e, t, n = void 0, s = void 0, i = void 0) {
760
762
  }
761
763
  });
762
764
  } catch (p) {
763
- console.log(p), i && i(p);
765
+ console.log(p), o && o(p);
764
766
  }
765
767
  }));
766
768
  },
767
769
  onFailure(r) {
768
- console.log(r), i && i(r);
770
+ console.log(r), o && o(r);
769
771
  }
770
772
  });
771
773
  }
772
774
  function ke(e, t, n = void 0, s = void 0) {
773
- return new Promise((i) => {
775
+ return new Promise((o) => {
774
776
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
775
777
  const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
776
- N(
778
+ b(
777
779
  e.space,
778
780
  "ESPACE COMMUN",
779
781
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -783,7 +785,7 @@ function ke(e, t, n = void 0, s = void 0) {
783
785
  console.log("onError =>", a);
784
786
  }
785
787
  );
786
- let o = {
788
+ let i = {
787
789
  method: "POST",
788
790
  headers: {
789
791
  SecurityContext: "ctx::" + e.ctx,
@@ -806,15 +808,15 @@ function ke(e, t, n = void 0, s = void 0) {
806
808
  s && s(a);
807
809
  }
808
810
  };
809
- f(c, o);
811
+ f(c, i);
810
812
  }
811
813
  });
812
814
  }
813
- function De(e, t, n, s = void 0, i = void 0) {
815
+ function De(e, t, n, s = void 0, o = void 0) {
814
816
  return new Promise((c) => {
815
817
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
816
- const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
817
- N(
818
+ const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
819
+ b(
818
820
  e.space,
819
821
  "ESPACE COMMUN",
820
822
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -845,18 +847,18 @@ function De(e, t, n, s = void 0, i = void 0) {
845
847
  s && s(r);
846
848
  },
847
849
  onFailure(r) {
848
- i && i(r);
850
+ o && o(r);
849
851
  }
850
852
  };
851
- f(o, a);
853
+ f(i, a);
852
854
  }
853
855
  });
854
856
  }
855
857
  function Fe(e, t, n = void 0, s = void 0) {
856
- return new Promise((i) => {
858
+ return new Promise((o) => {
857
859
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
858
860
  const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
859
- N(
861
+ b(
860
862
  e.space,
861
863
  "ESPACE COMMUN",
862
864
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -866,7 +868,7 @@ function Fe(e, t, n = void 0, s = void 0) {
866
868
  console.log("onError =>", a);
867
869
  }
868
870
  );
869
- let o = {
871
+ let i = {
870
872
  method: "POST",
871
873
  headers: {
872
874
  securitycontext: "ctx::" + e.ctx,
@@ -889,15 +891,15 @@ function Fe(e, t, n = void 0, s = void 0) {
889
891
  s && s(a);
890
892
  }
891
893
  };
892
- f(c, o);
894
+ f(c, i);
893
895
  }
894
896
  });
895
897
  }
896
898
  function Ue(e, t, n = void 0, s = void 0) {
897
- return new Promise((i) => {
899
+ return new Promise((o) => {
898
900
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
899
901
  const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
900
- N(
902
+ b(
901
903
  e.space,
902
904
  "ESPACE COMMUN",
903
905
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -907,7 +909,7 @@ function Ue(e, t, n = void 0, s = void 0) {
907
909
  console.log("onError =>", a);
908
910
  }
909
911
  );
910
- let o = {
912
+ let i = {
911
913
  method: "POST",
912
914
  headers: {
913
915
  SecurityContext: "ctx::" + e.ctx,
@@ -936,15 +938,15 @@ function Ue(e, t, n = void 0, s = void 0) {
936
938
  s && s(a);
937
939
  }
938
940
  };
939
- f(c, o);
941
+ f(c, i);
940
942
  }
941
943
  });
942
944
  }
943
- function $e(e, t, n, s = void 0, i = void 0) {
945
+ function $e(e, t, n, s = void 0, o = void 0) {
944
946
  return new Promise((c) => {
945
947
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
946
- const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
947
- N(
948
+ const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
949
+ b(
948
950
  e.space,
949
951
  "ESPACE COMMUN",
950
952
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -980,52 +982,54 @@ function $e(e, t, n, s = void 0, i = void 0) {
980
982
  s && s(r);
981
983
  },
982
984
  onFailure(r) {
983
- i && i(r);
985
+ o && o(r);
984
986
  }
985
987
  };
986
- f(o, a);
988
+ f(i, a);
987
989
  }
988
990
  });
989
991
  }
990
992
  //!SECTION
991
993
  async function je(e, t, n) {
992
- const s = `${e.space}/resources/v1/application/CSRF`;
993
- f(s, {
994
- onComplete(i) {
995
- i = JSON.parse(i), t && t(i.csrf);
996
- },
997
- onFailure(i, c, o) {
998
- n && n({ error: i, headers: c, xhr: o });
999
- }
1000
- });
994
+ if (e.space) {
995
+ const s = `${e.space}/resources/v1/application/CSRF`;
996
+ f(s, {
997
+ onComplete(o) {
998
+ o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
999
+ },
1000
+ onFailure(o, c, i) {
1001
+ n && n({ error: o, headers: c, xhr: i });
1002
+ }
1003
+ });
1004
+ }
1001
1005
  }
1002
- function Ae(e, t = void 0, n = void 0) {
1006
+ function Re(e, t = void 0, n = void 0) {
1003
1007
  const s = {
1004
1008
  base: `${e.space}`,
1005
1009
  uri: "/resources/bps/cspaces",
1006
1010
  optTenant: `tenant=${e.tenant}`
1007
- }, i = `${s.base}${s.uri}?${s.optTenant}`;
1008
- f(i, {
1011
+ }, o = `${s.base}${s.uri}?${s.optTenant}`;
1012
+ f(o, {
1009
1013
  method: "GET",
1010
1014
  headers: {
1011
1015
  Accept: "application/json,text/javascript,*/*",
1012
1016
  "Content-Type": "application/ds-json"
1013
1017
  },
1014
- onComplete(c, o) {
1018
+ onComplete(c, i) {
1015
1019
  const a = JSON.parse(c);
1016
- t && t(a, o);
1020
+ t && t(a, i);
1017
1021
  },
1018
- onFailure(c, o, a) {
1019
- n && n({ response: c, headers: o, xhr: a });
1022
+ onFailure(c, i, a) {
1023
+ n && n({ response: c, headers: i, xhr: a });
1020
1024
  }
1021
1025
  });
1022
1026
  }
1023
- function Re(e, t, n, s) {
1027
+ function Ae(e, t, n, s) {
1024
1028
  U(
1025
1029
  e.space,
1026
1030
  t,
1027
- (i) => {
1028
- f(i, {
1031
+ (o) => {
1032
+ f(o, {
1029
1033
  header: { ENO_CSRF_TOKEN: e.token },
1030
1034
  onComplete: (c) => {
1031
1035
  n && n(c);
@@ -1038,24 +1042,24 @@ function Re(e, t, n, s) {
1038
1042
  );
1039
1043
  }
1040
1044
  async function Ie(e, t, n = void 0, s = void 0) {
1041
- return new Promise((i) => {
1042
- U(e.space, t, (c) => {
1045
+ return new Promise((o) => {
1046
+ U(e, t, (c) => {
1043
1047
  f(c, {
1044
- onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1045
- onFailure: (o, a, r) => {
1046
- s && s(o, a, r), console.log(o, a?.errormsg);
1048
+ onComplete: (i, a, r) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, r), o),
1049
+ onFailure: (i, a, r) => {
1050
+ s && s(i, a, r), console.log(i, a?.errormsg);
1047
1051
  }
1048
1052
  });
1049
1053
  });
1050
1054
  });
1051
1055
  }
1052
- function ve(e, t, n, s = void 0, i = void 0) {
1056
+ function ve(e, t, n, s = void 0, o = void 0) {
1053
1057
  const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1054
1058
  k(
1055
1059
  e,
1056
1060
  n,
1057
- (o) => {
1058
- 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;
1061
+ (i) => {
1062
+ const a = i.data[0].relateddata.files[0].id, r = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1059
1063
  G(
1060
1064
  e,
1061
1065
  n,
@@ -1066,7 +1070,7 @@ function ve(e, t, n, s = void 0, i = void 0) {
1066
1070
  s && s(d);
1067
1071
  },
1068
1072
  (d) => {
1069
- i && i(d);
1073
+ o && o(d);
1070
1074
  }
1071
1075
  );
1072
1076
  }
@@ -1097,8 +1101,8 @@ async function Pe(e, t = void 0, n = void 0) {
1097
1101
  console.log("getDatasByTenant (getDocuments)", e), await I(
1098
1102
  e,
1099
1103
  (s) => {
1100
- const i = {};
1101
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t(i);
1104
+ const o = {};
1105
+ o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t(o);
1102
1106
  },
1103
1107
  (s) => {
1104
1108
  n && n(s);
@@ -1107,15 +1111,15 @@ async function Pe(e, t = void 0, n = void 0) {
1107
1111
  }
1108
1112
  function Me(e, t = void 0, n = void 0) {
1109
1113
  const s = [];
1110
- e.objIds.forEach((i, c) => {
1114
+ e.objIds.forEach((o, c) => {
1111
1115
  I(
1112
1116
  e,
1113
- i.objId,
1114
- (o) => {
1115
- s.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), V(e, x)), c === e.objIds.length - 1 && t && t(s);
1117
+ o.objId,
1118
+ (i) => {
1119
+ s.push({ [o.name]: i }), o.name === "dbProjets" && (v = i.affaires.map((a) => a.objectID), V(e, x)), c === e.objIds.length - 1 && t && t(s);
1116
1120
  },
1117
- (o) => {
1118
- n && n(o);
1121
+ (i) => {
1122
+ n && n(i);
1119
1123
  }
1120
1124
  );
1121
1125
  });
@@ -1124,12 +1128,12 @@ function V(e, t, n = void 0, s = void 0) {
1124
1128
  W(
1125
1129
  e,
1126
1130
  v,
1127
- (i) => {
1131
+ (o) => {
1128
1132
  const c = [...t];
1129
- c.find((o) => o.objectID === i.objectId).data = i.data, x = c, $.push(i.data), n && n($);
1133
+ c.find((i) => i.objectID === o.objectId).data = o.data, x = c, $.push(o.data), n && n($);
1130
1134
  },
1131
- (i) => {
1132
- s && (s(i), console.log(i));
1135
+ (o) => {
1136
+ s && (s(o), console.log(o));
1133
1137
  }
1134
1138
  );
1135
1139
  }
@@ -1154,16 +1158,16 @@ const B = "FA35FB9B177A280065800EA0000F599C", Y = [
1154
1158
  tag: "testTag"
1155
1159
  };
1156
1160
  function Le(e, t, n = void 0, s = void 0) {
1157
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1161
+ const { space: o, tenant: c } = e, { objId: i, pred: a, tag: r } = t, d = {
1158
1162
  uri: "/resources/6w/tags",
1159
1163
  otpCTX: "SecurityContext=preferred",
1160
1164
  optTenant: `tenant=${c}`
1161
- }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1165
+ }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1162
1166
  tag: [
1163
1167
  {
1164
1168
  subject: [
1165
1169
  {
1166
- uri: `pid://${o}`
1170
+ uri: `pid://${i}`
1167
1171
  }
1168
1172
  ],
1169
1173
  predicate: P[a],
@@ -1186,7 +1190,7 @@ function Le(e, t, n = void 0, s = void 0) {
1186
1190
  setTimeout(() => {
1187
1191
  J(
1188
1192
  e,
1189
- o,
1193
+ i,
1190
1194
  (g) => {
1191
1195
  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;
1192
1196
  m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, z(
@@ -1215,13 +1219,13 @@ function Le(e, t, n = void 0, s = void 0) {
1215
1219
  }
1216
1220
  function z(e, t, n = void 0, s = void 0) {
1217
1221
  console.log("obj ", t);
1218
- const i = t.info.name, c = {
1222
+ const o = t.info.name, c = {
1219
1223
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1220
1224
  uri: "/federated/search"
1221
- }, o = `${c.baseUrl}${c.uri}`, a = {
1225
+ }, i = `${c.baseUrl}${c.uri}`, a = {
1222
1226
  "Content-Type": "application/json",
1223
1227
  Accept: "application/json,text/javascript,*/*"
1224
- }, r = R(), d = {
1228
+ }, r = A(), d = {
1225
1229
  with_indexing_date: !0,
1226
1230
  with_synthesis: !0,
1227
1231
  with_nls: !1,
@@ -1253,7 +1257,7 @@ function z(e, t, n = void 0, s = void 0) {
1253
1257
  ],
1254
1258
  with_synthesis_hierarchical: !0,
1255
1259
  select_file: ["icon", "thumbnail_2d"],
1256
- query: i,
1260
+ query: o,
1257
1261
  specific_source_parameter: {
1258
1262
  "3dspace": {
1259
1263
  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)'
@@ -1282,7 +1286,7 @@ function z(e, t, n = void 0, s = void 0) {
1282
1286
  }
1283
1287
  }
1284
1288
  };
1285
- console.log("dataPattern => ", d), f(o, {
1289
+ console.log("dataPattern => ", d), f(i, {
1286
1290
  method: "POST",
1287
1291
  headers: a,
1288
1292
  data: JSON.stringify(d),
@@ -1297,7 +1301,7 @@ function z(e, t, n = void 0, s = void 0) {
1297
1301
  });
1298
1302
  }
1299
1303
  function Ee(e, t, n = void 0, s = void 0) {
1300
- const { objId: i, pred: c, tag: o } = t, a = {
1304
+ const { objId: o, pred: c, tag: i } = t, a = {
1301
1305
  uri: "/resources/6w/tags",
1302
1306
  otpCTX: "SecurityContext=preferred",
1303
1307
  optTenant: `tenant=${e.tenant}`
@@ -1306,12 +1310,12 @@ function Ee(e, t, n = void 0, s = void 0) {
1306
1310
  {
1307
1311
  subject: [
1308
1312
  {
1309
- uri: `pid://${i}`
1313
+ uri: `pid://${o}`
1310
1314
  }
1311
1315
  ],
1312
1316
  predicate: P[c],
1313
1317
  object: {
1314
- literal: o
1318
+ literal: i
1315
1319
  }
1316
1320
  }
1317
1321
  ]
@@ -1333,18 +1337,18 @@ function Ee(e, t, n = void 0, s = void 0) {
1333
1337
  });
1334
1338
  }
1335
1339
  function Je(e, t = "", n = void 0, s = void 0) {
1336
- const { space: i } = e;
1340
+ const { space: o } = e;
1337
1341
  if (t === "")
1338
1342
  return;
1339
1343
  const c = {
1340
1344
  uri: "/enovia/resources/v1/modeler/documents"
1341
- }, o = {
1345
+ }, i = {
1342
1346
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1343
1347
  Accept: "application/json,text/javascript,*/*"
1344
- }, 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}`;
1348
+ }, a = `${o}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1345
1349
  f(a, {
1346
1350
  method: "POST",
1347
- headers: o,
1351
+ headers: i,
1348
1352
  data: r,
1349
1353
  onComplete(d) {
1350
1354
  n && n(JSON.parse(d));
@@ -1358,18 +1362,18 @@ function Je(e, t = "", n = void 0, s = void 0) {
1358
1362
  async function w(e, t = void 0, n = void 0) {
1359
1363
  const s = e.space + "/api/index/tk";
1360
1364
  return f(s, {
1361
- onComplete(i, c, o) {
1362
- const a = JSON.parse(i);
1365
+ onComplete(o, c, i) {
1366
+ const a = JSON.parse(o);
1363
1367
  if (t)
1364
1368
  return t(a), e.token = a?.result?.ServerToken;
1365
1369
  },
1366
- onFailure(i) {
1367
- n && n(i);
1370
+ onFailure(o) {
1371
+ n && n(o);
1368
1372
  }
1369
1373
  });
1370
1374
  }
1371
1375
  function Ge(e, t = void 0, n = void 0) {
1372
- const s = `${e.space}/api/exalead/whatsnew`, i = {
1376
+ const s = `${e.space}/api/exalead/whatsnew`, o = {
1373
1377
  params: {
1374
1378
  community_id: null,
1375
1379
  hash_key: null,
@@ -1387,19 +1391,19 @@ function Ge(e, t = void 0, n = void 0) {
1387
1391
  "Content-type": "application/json;charset=UTF-8",
1388
1392
  Accept: "application/json"
1389
1393
  },
1390
- data: JSON.stringify(i),
1394
+ data: JSON.stringify(o),
1391
1395
  type: "json",
1392
- onComplete(o, a) {
1393
- t && t(o, a);
1396
+ onComplete(i, a) {
1397
+ t && t(i, a);
1394
1398
  },
1395
- onFailure(o, a) {
1396
- n && n(o, a);
1399
+ onFailure(i, a) {
1400
+ n && n(i, a);
1397
1401
  }
1398
1402
  });
1399
1403
  });
1400
1404
  }
1401
1405
  function Ke(e, t = void 0, n = void 0) {
1402
- const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1406
+ const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1403
1407
  params: {
1404
1408
  idsToFilterArr: [],
1405
1409
  mode: "offline",
@@ -1416,14 +1420,14 @@ function Ke(e, t = void 0, n = void 0) {
1416
1420
  "Content-type": "application/json;charset=UTF-8",
1417
1421
  Accept: "application/json"
1418
1422
  },
1419
- data: JSON.stringify(i),
1423
+ data: JSON.stringify(o),
1420
1424
  type: "json",
1421
- onComplete(o, a) {
1422
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1423
- t && t(r, o);
1425
+ onComplete(i, a) {
1426
+ const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1427
+ t && t(r, i);
1424
1428
  },
1425
- onFailure(o, a) {
1426
- n && n(o, a);
1429
+ onFailure(i, a) {
1430
+ n && n(i, a);
1427
1431
  }
1428
1432
  });
1429
1433
  });
@@ -1434,12 +1438,12 @@ function We(e, t = void 0, n = void 0) {
1434
1438
  uri: "/api/community/listmycommunities",
1435
1439
  limit: `/limit/${e.limit ? e.limit : 128}`,
1436
1440
  page: `/page/${e.page ? e.page : "1"}`
1437
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1438
- w(e, (o) => {
1439
- f(i, {
1441
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1442
+ w(e, (i) => {
1443
+ f(o, {
1440
1444
  method: "GET",
1441
1445
  headers: {
1442
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1446
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1443
1447
  },
1444
1448
  onComplete(a, r, d) {
1445
1449
  const p = JSON.parse(a).result;
@@ -1471,20 +1475,20 @@ function We(e, t = void 0, n = void 0) {
1471
1475
  });
1472
1476
  }
1473
1477
  function q(e, t, n, s) {
1474
- const i = `${e.space}/api/community/listmembers`, c = {
1478
+ const o = `${e.space}/api/community/listmembers`, c = {
1475
1479
  params: {
1476
1480
  page: e.page ? e.page : 1,
1477
1481
  limit: e.limit ? e.limit : 50,
1478
1482
  community_id: t
1479
1483
  }
1480
1484
  };
1481
- w(e, (o) => {
1482
- f(i, {
1485
+ w(e, (i) => {
1486
+ f(o, {
1483
1487
  method: "POST",
1484
1488
  headers: {
1485
1489
  "Content-type": "application/json;charset=UTF-8",
1486
1490
  Accept: "application/json",
1487
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1491
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1488
1492
  },
1489
1493
  data: JSON.stringify(c),
1490
1494
  type: "json",
@@ -1501,30 +1505,30 @@ function q(e, t, n, s) {
1501
1505
  function Xe(e, t = void 0, n = void 0) {
1502
1506
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1503
1507
  e.commu_id || (e.commu_id = s);
1504
- const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1508
+ const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1505
1509
  w(e, (c) => {
1506
- f(i, {
1510
+ f(o, {
1507
1511
  method: "GET",
1508
1512
  headers: {
1509
1513
  "Content-type": "application/json;charset=UTF-8",
1510
1514
  Accept: "application/json",
1511
1515
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1512
1516
  },
1513
- onComplete(o) {
1514
- const a = JSON.parse(o);
1517
+ onComplete(i) {
1518
+ const a = JSON.parse(i);
1515
1519
  t && t(a);
1516
1520
  },
1517
- onFailure(o, a) {
1518
- const r = o;
1521
+ onFailure(i, a) {
1522
+ const r = i;
1519
1523
  r.status = a.status, r.response = a.errormsg, n && n(r);
1520
1524
  }
1521
1525
  });
1522
1526
  });
1523
1527
  }
1524
1528
  function Ve(e, t, n = void 0, s = void 0) {
1525
- const { listAllContacts: i, currentUser: c } = e;
1526
- console.log("__listAllContacts", i.hits);
1527
- const o = `${e.space}/api/directmessages`, a = {
1529
+ const { listAllContacts: o, currentUser: c } = e;
1530
+ console.log("__listAllContacts", o.hits);
1531
+ const i = `${e.space}/api/directmessages`, a = {
1528
1532
  users: [c.login].concat(t.receipt)
1529
1533
  }, r = {
1530
1534
  id_msg: "",
@@ -1543,7 +1547,7 @@ function Ve(e, t, n = void 0, s = void 0) {
1543
1547
  }
1544
1548
  ), d === !1 && setTimeout(() => {
1545
1549
  d === !1 && w(e, (l) => {
1546
- f(o, {
1550
+ f(i, {
1547
1551
  method: "POST",
1548
1552
  headers: {
1549
1553
  "Content-Type": "application/json",
@@ -1565,16 +1569,16 @@ function Ve(e, t, n = void 0, s = void 0) {
1565
1569
  }, 500);
1566
1570
  }
1567
1571
  function Q(e, t, n, s) {
1568
- const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1572
+ const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1569
1573
  w(e, (c) => {
1570
- f(i, {
1574
+ f(o, {
1571
1575
  method: "GET",
1572
1576
  headers: {
1573
1577
  Accept: "application/json,text/javascript,*/*",
1574
1578
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1575
1579
  },
1576
- onComplete(o) {
1577
- const a = JSON.parse(o), r = [];
1580
+ onComplete(i) {
1581
+ const a = JSON.parse(i), r = [];
1578
1582
  a.result.forEach((p) => {
1579
1583
  p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1580
1584
  });
@@ -1586,20 +1590,20 @@ function Q(e, t, n, s) {
1586
1590
  });
1587
1591
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1588
1592
  },
1589
- onFailure(o) {
1590
- const a = o;
1593
+ onFailure(i) {
1594
+ const a = i;
1591
1595
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1592
1596
  }
1593
1597
  });
1594
1598
  });
1595
1599
  }
1596
1600
  function j(e, t, n = void 0, s = void 0) {
1597
- const i = {
1601
+ const o = {
1598
1602
  base: e.space,
1599
1603
  uri: "/api/community",
1600
1604
  id_msg: `${t.id_msg}`,
1601
1605
  endUri: "/instantmessages"
1602
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1606
+ }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1603
1607
  author: { login: t.senderId, displayName: t.senderName },
1604
1608
  accessState: null,
1605
1609
  commentUri: null,
@@ -1617,7 +1621,7 @@ function j(e, t, n = void 0, s = void 0) {
1617
1621
  Accept: "application/json",
1618
1622
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1619
1623
  },
1620
- data: JSON.stringify(o),
1624
+ data: JSON.stringify(i),
1621
1625
  type: "json",
1622
1626
  onComplete(r, d, l) {
1623
1627
  const p = r;
@@ -1648,15 +1652,15 @@ const ee = {
1648
1652
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1649
1653
  };
1650
1654
  function Be(e, t, n = void 0, s = void 0) {
1651
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1655
+ const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1652
1656
  (r) => r.id === t.community_id
1653
- ), o = e.swymCommunities.find(
1657
+ ), i = e.swymCommunities.find(
1654
1658
  (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1655
1659
  ), a = {
1656
1660
  params: {
1657
1661
  title: t.title,
1658
1662
  // String, le nom de l'affaire
1659
- community_id: c?.id !== void 0 ? c.id : o.id,
1663
+ community_id: c?.id !== void 0 ? c.id : i.id,
1660
1664
  // String, l'id de la communauté
1661
1665
  message: te(t.text_html),
1662
1666
  // STRING => le contenue du message doit être au format HTML
@@ -1670,7 +1674,7 @@ function Be(e, t, n = void 0, s = void 0) {
1670
1674
  Accept: "application/json",
1671
1675
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1672
1676
  };
1673
- f(i, {
1677
+ f(o, {
1674
1678
  method: "POST",
1675
1679
  headers: d,
1676
1680
  data: JSON.stringify(a),
@@ -1687,19 +1691,19 @@ function Be(e, t, n = void 0, s = void 0) {
1687
1691
  });
1688
1692
  }
1689
1693
  function Ye(e, t, n = void 0, s = void 0) {
1690
- const i = `${e.space}/api/idea/delete`, c = {
1694
+ const o = `${e.space}/api/idea/delete`, c = {
1691
1695
  params: {
1692
1696
  community_id: t.community_id,
1693
1697
  ideationIds: [t.idee_id]
1694
1698
  }
1695
1699
  };
1696
- w(e, (o) => {
1697
- f(i, {
1700
+ w(e, (i) => {
1701
+ f(o, {
1698
1702
  method: "POST",
1699
1703
  headers: {
1700
1704
  "Content-type": "application/json;charset=UTF-8",
1701
1705
  Accept: "application/json",
1702
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1706
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1703
1707
  },
1704
1708
  data: JSON.stringify(c),
1705
1709
  type: "json",
@@ -1714,9 +1718,9 @@ function Ye(e, t, n = void 0, s = void 0) {
1714
1718
  });
1715
1719
  }
1716
1720
  function He(e, t = "", n = void 0, s = void 0) {
1717
- const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1718
- t === "" && (t = i);
1719
- const c = `${e.space}/api/idea/get`, o = {
1721
+ const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1722
+ t === "" && (t = o);
1723
+ const c = `${e.space}/api/idea/get`, i = {
1720
1724
  params: {
1721
1725
  id: t
1722
1726
  }
@@ -1729,7 +1733,7 @@ function He(e, t = "", n = void 0, s = void 0) {
1729
1733
  Accept: "application/json",
1730
1734
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1731
1735
  },
1732
- data: JSON.stringify(o),
1736
+ data: JSON.stringify(i),
1733
1737
  type: "json",
1734
1738
  onComplete(r) {
1735
1739
  const d = r;
@@ -1743,16 +1747,16 @@ function He(e, t = "", n = void 0, s = void 0) {
1743
1747
  });
1744
1748
  }
1745
1749
  function ze(e, t = ee, n = void 0, s = void 0) {
1746
- const i = {
1750
+ const o = {
1747
1751
  uri: "/api/idea/list",
1748
1752
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1749
1753
  limit: `/limit/${t.limit ? t.limit : 10}`
1750
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1751
- w(e, (o) => {
1754
+ }, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
1755
+ w(e, (i) => {
1752
1756
  f(c, {
1753
1757
  method: "GET",
1754
1758
  headers: {
1755
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1759
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1756
1760
  },
1757
1761
  onComplete(a) {
1758
1762
  const r = JSON.parse(a);
@@ -1842,38 +1846,37 @@ function te(e) {
1842
1846
  }
1843
1847
  function qe(e, t = void 0, n = void 0) {
1844
1848
  const s = e.space + "/api/user/getcurrent/";
1845
- w(
1846
- e,
1847
- (i) => {
1848
- f(s, {
1849
- method: "GET",
1850
- headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1851
- onComplete(c, o, a) {
1852
- const r = JSON.parse(c);
1853
- t && t(r.result);
1854
- },
1855
- onFailure(c, o, a) {
1856
- n && n({ response: c, headers: o, xhr: a });
1857
- }
1858
- });
1859
- },
1860
- n
1861
- );
1849
+ w(e, (o) => {
1850
+ f(s, {
1851
+ method: "GET",
1852
+ headers: {
1853
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1854
+ },
1855
+ onComplete(c, i, a) {
1856
+ const r = JSON.parse(c);
1857
+ t && t(r.result);
1858
+ },
1859
+ onFailure(c, i, a) {
1860
+ const r = { erreur: JSON.parse(c), headers: i, xhr: a };
1861
+ n && n(r);
1862
+ }
1863
+ });
1864
+ });
1862
1865
  }
1863
1866
  function Qe(e, t, n = void 0, s = void 0) {
1864
- const i = e.space + "/api/user/find/login/" + t;
1867
+ const o = e.space + "/api/user/find/login/" + t;
1865
1868
  w(
1866
1869
  e,
1867
1870
  (c) => {
1868
- f(i, {
1871
+ f(o, {
1869
1872
  method: "GET",
1870
1873
  headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1871
- onComplete(o, a, r) {
1872
- const d = JSON.parse(o);
1874
+ onComplete(i, a, r) {
1875
+ const d = JSON.parse(i);
1873
1876
  n && n(d);
1874
1877
  },
1875
- onFailure(o) {
1876
- s && s(o);
1878
+ onFailure(i) {
1879
+ s && s(i);
1877
1880
  }
1878
1881
  });
1879
1882
  },
@@ -1885,19 +1888,19 @@ function Ze(e) {
1885
1888
  return console.log(t), t;
1886
1889
  }
1887
1890
  export {
1888
- R as UUID,
1889
- be as _3DSpace_Create_Doc,
1891
+ A as UUID,
1892
+ Ne as _3DSpace_Create_Doc,
1890
1893
  C as _3DSpace_csrf,
1891
1894
  I as _3DSpace_download_doc,
1892
1895
  W as _3DSpace_download_multidoc,
1893
1896
  G as _3DSpace_file_update,
1894
1897
  K as _3DSpace_file_update_csr,
1895
1898
  U as _3DSpace_file_url,
1896
- Ne as _3DSpace_file_url_csr,
1899
+ be as _3DSpace_file_url_csr,
1897
1900
  k as _3DSpace_get_csrf,
1898
1901
  J as _3DSpace_get_docInfo,
1899
1902
  X as _3DSpace_get_downloadTicket_multidoc,
1900
- N as _3DSpace_get_securityContexts,
1903
+ b as _3DSpace_get_securityContexts,
1901
1904
  $e as _3DSpace_lifecycle_changeRevision,
1902
1905
  De as _3DSpace_lifecycle_changeState,
1903
1906
  Fe as _3DSpace_lifecycle_getGraph,
@@ -1932,12 +1935,12 @@ export {
1932
1935
  Se as createUserGroups,
1933
1936
  V as dataMixing,
1934
1937
  we as deleteUserGroups,
1935
- oe as findAdresse,
1936
- Ae as getAllContextSecurity,
1938
+ ie as findAdresse,
1939
+ Re as getAllContextSecurity,
1937
1940
  je as getCSRFToken,
1938
- ie as getCommunes,
1941
+ oe as getCommunes,
1939
1942
  _e as getComplementUG,
1940
- Re as getDataFrom3DSpace,
1943
+ Ae as getDataFrom3DSpace,
1941
1944
  re as getDataFromGouvFr,
1942
1945
  Pe as getDatasByTenant,
1943
1946
  Me as getDatasFrom3DSpace,