@beam3_dev/api_module 0.0.67 → 0.0.68

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,5 +1,5 @@
1
1
  import { v4 as M } from "uuid";
2
- import { DateTime as N } from "luxon";
2
+ import { DateTime as b } from "luxon";
3
3
  import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
4
  function R() {
5
5
  return M();
@@ -34,10 +34,10 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ie(e, t = void 0, s = void 0) {
38
- const n = parseInt(e);
37
+ async function ie(e, t = void 0, n = void 0) {
38
+ const s = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
@@ -47,10 +47,10 @@ async function ie(e, t = void 0, s = void 0) {
47
47
  ).then((o) => o.json()).then((o) => {
48
48
  t && t(o);
49
49
  }).catch((o) => {
50
- s && s(o), console.error("Erreur : " + o);
50
+ n && n(o), console.error("Erreur : " + o);
51
51
  });
52
52
  }
53
- async function re(e, t = void 0, s = void 0) {
53
+ async function re(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
  {
@@ -59,19 +59,19 @@ async function re(e, t = void 0, s = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((n) => n.json()).then((n) => {
63
- t && t(n);
64
- }).catch((n) => {
65
- s && s(n), console.error("Erreur : " + n);
62
+ ).then((s) => s.json()).then((s) => {
63
+ t && t(s);
64
+ }).catch((s) => {
65
+ n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
68
  async function ce(e, t = L) {
69
- let s = N.now().year;
70
- const n = e, o = [], c = (a) => {
69
+ let n = b.now().year;
70
+ const s = e, o = [], c = (a) => {
71
71
  for (let i in a)
72
72
  o.push({ date: i, comment: a[i] });
73
73
  };
74
- for (let a = s; a <= s + 1; a++)
74
+ for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
77
77
  {
@@ -84,59 +84,59 @@ async function ce(e, t = L) {
84
84
  c(i);
85
85
  }).catch((i) => console.error("Erreur : " + i));
86
86
  return (() => {
87
- const a = n.length === 0 ? {
87
+ const a = s.length === 0 ? {
88
88
  events: []
89
- } : n;
89
+ } : s;
90
90
  for (let i of o)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
92
+ (l) => l.start === b.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
93
93
  ) === -1 && a.events.push({
94
94
  name: "Férié : " + i.comment,
95
- start: N.fromISO(i.date).toISODate(),
96
- end: N.fromISO(i.date).toISODate(),
95
+ start: b.fromISO(i.date).toISODate(),
96
+ end: b.fromISO(i.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function de(e, t, s = !0) {
104
- const n = e.events.findIndex((o) => o.uuid === t.uuid);
105
- return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((o, c) => o.start - c.start), e;
103
+ async function de(e, t, n = !0) {
104
+ const s = e.events.findIndex((o) => o.uuid === t.uuid);
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, c) => o.start - c.start), e;
106
106
  }
107
107
  function f(e, t) {
108
- O(["DS/WAFData/WAFData"], (s) => {
109
- s.authenticatedRequest(e, t);
108
+ O(["DS/WAFData/WAFData"], (n) => {
109
+ n.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function le(e, t, s) {
113
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
- n.draggable(e, { data: t, start: s });
112
+ function le(e, t, n) {
113
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
+ s.draggable(e, { data: t, start: n });
115
115
  });
116
116
  }
117
117
  function pe(e, t = void 0) {
118
- O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
119
- let n;
120
- n === void 0 && (n = s.createProxy({
118
+ O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
+ let s;
120
+ s === void 0 && (s = n.createProxy({
121
121
  widgetId: A.id,
122
122
  filteringMode: "WithFilteringServices"
123
- }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
123
+ }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
125
125
  }
126
126
  function ue(e, t) {
127
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
128
- s.droppable(e, { drop: t });
127
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
128
+ n.droppable(e, { drop: t });
129
129
  });
130
130
  }
131
- async function fe(e, t = void 0, s = void 0) {
131
+ async function fe(e, t = void 0, n = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
- (n) => {
135
- (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", n), t(
136
- n.getPlatformServices({
134
+ (s) => {
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
136
+ s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
139
- onFailure: s
139
+ onFailure: n
140
140
  })
141
141
  ));
142
142
  }
@@ -145,24 +145,24 @@ async function fe(e, t = void 0, s = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const s = t.getTenant(), n = t.getUser(), o = 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
- tenant: s,
153
- user: n,
152
+ tenant: n,
153
+ user: s,
154
154
  appsConfiguration: o,
155
155
  appConf: c
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
159
- function ge(e, t, s) {
160
- const n = {
159
+ function ge(e, t, n) {
160
+ const s = {
161
161
  base: `${e.space}`,
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
- }, o = `${n.base}${n.uri}${n.option}`;
165
+ }, o = `${s.base}${s.uri}${s.option}`;
166
166
  f(o, {
167
167
  method: "GET",
168
168
  headers: {
@@ -178,33 +178,33 @@ function ge(e, t, s) {
178
178
  },
179
179
  onFailure(c, r) {
180
180
  const a = c;
181
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
181
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
182
182
  }
183
183
  });
184
184
  }
185
- function he(e, t = void 0, s = void 0) {
186
- let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
- f(n, {
185
+ function he(e, t = void 0, n = void 0) {
186
+ let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
+ f(s, {
188
188
  onComplete(o, c, r) {
189
189
  const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
192
  onFailure(o, c) {
193
193
  const r = o;
194
- r.msg = c.errormsg, r.errCode = c.errorcode, s && s(r);
194
+ r.msg = c.errormsg, r.errCode = c.errorcode, n && n(r);
195
195
  }
196
196
  });
197
197
  }
198
- function Se(e, t, s = void 0, n = void 0) {
198
+ function Se(e, t, n = void 0, s = void 0) {
199
199
  let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  f(o, {
201
201
  onComplete(c, r, a) {
202
202
  const i = JSON.parse(c);
203
- s && s(i);
203
+ n && n(i);
204
204
  },
205
205
  onFailure(c, r) {
206
206
  const a = c;
207
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
207
+ a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
@@ -212,7 +212,7 @@ const F = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
- function _e(e, t, s = void 0, n = void 0) {
215
+ function _e(e, t, n = void 0, s = void 0) {
216
216
  const { space: o, currentUser: c } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
218
  }.URIUGr}`, i = {
@@ -232,16 +232,16 @@ function _e(e, t, s = void 0, n = void 0) {
232
232
  headers: F,
233
233
  data: JSON.stringify(i),
234
234
  onComplete(d) {
235
- s && s(JSON.parse(d));
235
+ n && n(JSON.parse(d));
236
236
  },
237
237
  onFailure(d, l) {
238
238
  console.log(d);
239
239
  const p = d;
240
- p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
240
+ p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
241
241
  }
242
242
  });
243
243
  }
244
- function ye(e, t, s = void 0, n = void 0) {
244
+ function ye(e, t, n = void 0, s = void 0) {
245
245
  const { space: o, tenant: c } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${i}`;
246
246
  f(d, {
247
247
  opts: {
@@ -252,16 +252,16 @@ function ye(e, t, s = void 0, n = void 0) {
252
252
  }
253
253
  },
254
254
  onComplete(u) {
255
- s && s(JSON.parse(u));
255
+ n && n(JSON.parse(u));
256
256
  },
257
257
  onFailure(u, m) {
258
258
  const g = u;
259
- g.msg = m.errormsg, g.errCode = m.errorcode, n && n(g);
259
+ g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
260
260
  }
261
261
  });
262
262
  }
263
- function E(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: o } = e, c = n, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
263
+ function E(e, t = void 0, n = void 0) {
264
+ const { space: s, tenant: o } = e, c = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
267
  }, d = `${c}${r}${a}`;
@@ -272,12 +272,12 @@ function E(e, t = void 0, s = void 0) {
272
272
  },
273
273
  onFailure(l, p) {
274
274
  const u = l;
275
- u.msg = p.errormsg, u.errCode = p.errorcode, s && s(u);
275
+ u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
276
276
  }
277
277
  });
278
278
  }
279
- function we(e, t = void 0, s = void 0) {
280
- const { space: n, currentUser: o } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
279
+ function we(e, t = void 0, n = void 0) {
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
  } };
@@ -294,13 +294,13 @@ function we(e, t = void 0, s = void 0) {
294
294
  u.rules = _, t && t(u);
295
295
  },
296
296
  (_) => {
297
- s && s(_);
297
+ n && n(_);
298
298
  }
299
299
  );
300
300
  }
301
301
  },
302
302
  onFailure(l) {
303
- s && s(l);
303
+ n && n(l);
304
304
  }
305
305
  });
306
306
  } catch (l) {
@@ -308,12 +308,12 @@ function we(e, t = void 0, s = void 0) {
308
308
  }
309
309
  }
310
310
  function Te(e, t) {
311
- const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
311
+ const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
312
  f(o, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Ce(e, t, s, n = void 0, o = void 0) {
316
+ function Ce(e, t, n, s = void 0, o = void 0) {
317
317
  const { space: c, tenant: r } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -322,36 +322,36 @@ function Ce(e, t, s, n = void 0, o = void 0) {
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
324
  OPTsTenant: `tenant=dstenant:${r}`
325
- }, i = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
325
+ }, i = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
326
326
  f(d, {
327
327
  headers: F,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
331
331
  onComplete(p) {
332
- n && n(p);
332
+ s && s(p);
333
333
  },
334
334
  onFailure(p) {
335
335
  o && o(p);
336
336
  }
337
337
  });
338
338
  }
339
- function Oe(e, t, s, n = void 0, o = void 0) {
339
+ function Oe(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",
343
343
  headers: F,
344
- data: JSON.stringify(s),
344
+ data: JSON.stringify(n),
345
345
  type: "json",
346
346
  onComplete(d) {
347
- n && n(d);
347
+ s && s(d);
348
348
  },
349
349
  onFailure(d) {
350
350
  o && o(d);
351
351
  }
352
352
  });
353
353
  }
354
- function be(e, t, s = void 0, n = void 0) {
354
+ function Ne(e, t, n = void 0, s = void 0) {
355
355
  const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
356
  f(r, {
357
357
  opts: {
@@ -362,27 +362,27 @@ function be(e, t, s = void 0, n = void 0) {
362
362
  }
363
363
  },
364
364
  onComplete(d) {
365
- s && s(JSON.parse(d));
365
+ n && n(JSON.parse(d));
366
366
  },
367
367
  onFailure(d) {
368
- n && n(d);
368
+ s && s(d);
369
369
  }
370
370
  });
371
371
  }
372
- async function J(e, t, s) {
372
+ async function J(e, t, n) {
373
373
  if (e.space) {
374
- const n = `${e.space}/resources/v1/application/CSRF`;
375
- f(n, {
374
+ const s = `${e.space}/resources/v1/application/CSRF`;
375
+ f(s, {
376
376
  onComplete(o) {
377
377
  o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
378
378
  },
379
379
  onFailure(o, c, r) {
380
- s && s({ error: o, headers: c, xhr: r });
380
+ n && n({ error: o, headers: c, xhr: r });
381
381
  }
382
382
  });
383
383
  }
384
384
  }
385
- async function G(e, t = void 0, s = void 0, n = void 0) {
385
+ async function G(e, t = void 0, n = void 0, s = void 0) {
386
386
  const o = e.space;
387
387
  if (t === void 0) {
388
388
  console.log("Le paramètre docid est obligatoire");
@@ -392,53 +392,53 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
392
392
  f(c, {
393
393
  onComplete(r, a, i) {
394
394
  const d = JSON.parse(r);
395
- s && s(d);
395
+ n && n(d);
396
396
  },
397
397
  onFailure(r) {
398
- n && n(r);
398
+ s && s(r);
399
399
  }
400
400
  });
401
401
  }
402
- function k(e, t = void 0, s = void 0) {
402
+ function k(e, t = void 0, n = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
- let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- console.log("_3DSpace_get_csrf / url", n), f(n, {
404
+ let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
+ console.log("_3DSpace_get_csrf / url", s), f(s, {
406
406
  onComplete(o, c, r) {
407
407
  const a = JSON.parse(o);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
410
410
  onFailure(o) {
411
- s && s(o);
411
+ n && n(o);
412
412
  }
413
413
  });
414
414
  } else
415
415
  C(
416
416
  e,
417
- (n) => {
418
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
417
+ (s) => {
418
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
419
419
  },
420
- (n) => {
421
- s && s(n);
420
+ (s) => {
421
+ n && n(s);
422
422
  }
423
423
  );
424
424
  }
425
- function C(e, t = void 0, s = void 0) {
425
+ function C(e, t = void 0, n = void 0) {
426
426
  if (e.space) {
427
- const n = e.space + "/resources/v1/application/CSRF";
428
- f(n, {
427
+ const s = e.space + "/resources/v1/application/CSRF";
428
+ f(s, {
429
429
  onComplete(o, c, r) {
430
430
  const a = JSON.parse(o);
431
431
  console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
432
432
  },
433
433
  onFailure(o, c, r) {
434
- s && s({ response: o, headers: c, xhr: r });
434
+ n && n({ response: o, headers: c, xhr: r });
435
435
  }
436
436
  });
437
437
  } else
438
- s && s("ERROR : url du 3DSpace non défini.");
438
+ n && n("ERROR : url du 3DSpace non défini.");
439
439
  }
440
- function U(e, t = void 0, s = void 0) {
441
- let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
440
+ function U(e, t = void 0, n = void 0) {
441
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
442
442
  k(
443
443
  e,
444
444
  (o) => {
@@ -446,7 +446,7 @@ function U(e, t = void 0, s = void 0) {
446
446
  "_3DSpace_get_ticket / onComplete / ☠️ info => ",
447
447
  o,
448
448
  e.token
449
- ), f(n, {
449
+ ), f(s, {
450
450
  method: "PUT",
451
451
  headers: {
452
452
  ENO_CSRF_TOKEN: e.token
@@ -456,28 +456,28 @@ function U(e, t = void 0, s = void 0) {
456
456
  console.log("le ticket est dans la callback"), t && t(a);
457
457
  },
458
458
  onFailure(c, r) {
459
- console.warn("☠️ error => ", c, r), s && s(c, r);
459
+ console.warn("☠️ error => ", c, r), n && n(c, r);
460
460
  }
461
461
  });
462
462
  },
463
463
  (o) => {
464
- console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
464
+ console.warn("_3DSpace_get_ticket / error => ", o), n && n(o);
465
465
  }
466
466
  );
467
467
  }
468
- function Ne(e, t, s, n = void 0, o = void 0) {
468
+ function be(e, t, n, s = void 0, o = void 0) {
469
469
  const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- s || (s = e.token), f(c, {
470
+ n || (n = e.token), f(c, {
471
471
  method: "PUT",
472
472
  headers: {
473
- ENO_CSRF_TOKEN: s
473
+ ENO_CSRF_TOKEN: n
474
474
  },
475
475
  onComplete(r) {
476
476
  let a = JSON.parse(r);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
479
  const i = a.data[0].dataelements.ticketURL;
480
- n && n(i);
480
+ s && s(i);
481
481
  } catch (i) {
482
482
  o && o(i);
483
483
  }
@@ -487,7 +487,7 @@ function Ne(e, t, s, n = void 0, o = void 0) {
487
487
  }
488
488
  });
489
489
  }
490
- function K(e, t, s, n, o, c = void 0, r = void 0) {
490
+ function K(e, t, n, s, o, c = void 0, r = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -495,8 +495,8 @@ function K(e, t, s, n, o, c = void 0, r = void 0) {
495
495
  W(
496
496
  e,
497
497
  t,
498
- s,
499
498
  n,
499
+ s,
500
500
  o,
501
501
  a.csrf.value,
502
502
  c,
@@ -505,7 +505,7 @@ function K(e, t, s, n, o, c = void 0, r = void 0) {
505
505
  }
506
506
  );
507
507
  }
508
- function W(e, t, s, n, o, c, r = void 0, a = void 0) {
508
+ function W(e, t, n, s, o, c, r = void 0, a = void 0) {
509
509
  const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
510
  f(i, {
511
511
  method: "PUT",
@@ -514,7 +514,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
514
514
  },
515
515
  onComplete(d, l, p) {
516
516
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
517
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", n, o);
517
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
518
518
  const g = {};
519
519
  g.method = "POST", g.data = m, g.onComplete = function(h) {
520
520
  let S = "temp_" + Date.now(), _ = {
@@ -529,7 +529,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
529
529
  relateddata: {
530
530
  files: [
531
531
  {
532
- id: s,
532
+ id: n,
533
533
  dataelements: {
534
534
  title: o,
535
535
  receipt: h
@@ -560,7 +560,7 @@ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
560
560
  }
561
561
  });
562
562
  }
563
- async function ke(e, t, s, n, o = void 0, c = void 0) {
563
+ async function ke(e, t, n, s, o = void 0, c = void 0) {
564
564
  const r = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
565
565
  type: "text/plain"
566
566
  }), p = {
@@ -578,7 +578,7 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
578
578
  },
579
579
  onComplete(u, m, g) {
580
580
  const h = JSON.parse(u).data[0].dataelements;
581
- d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
581
+ d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
582
582
  const S = {
583
583
  method: "POST",
584
584
  data: d,
@@ -596,15 +596,15 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
596
596
  {
597
597
  type: "Document",
598
598
  dataelements: {
599
- title: `Title_${s.toLowerCase().split(" ").join("_")}`,
599
+ title: `Title_${n.toLowerCase().split(" ").join("_")}`,
600
600
  policy: "Document Release",
601
- description: n
601
+ description: s
602
602
  },
603
603
  relateddata: {
604
604
  files: [
605
605
  {
606
606
  dataelements: {
607
- title: `${s}.json`,
607
+ title: `${n}.json`,
608
608
  receipt: T
609
609
  }
610
610
  }
@@ -636,7 +636,7 @@ async function ke(e, t, s, n, o = void 0, c = void 0) {
636
636
  }
637
637
  });
638
638
  }
639
- function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
639
+ function N(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
640
640
  const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
641
641
  f(r, {
642
642
  method: "GET",
@@ -652,10 +652,10 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
652
652
  (h, S, _) => S === _.findIndex(
653
653
  (y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
654
654
  )
655
- ), s && (Array.isArray(s) ? s.forEach((h) => {
655
+ ), n && (Array.isArray(n) ? n.forEach((h) => {
656
656
  u || g.forEach((S) => {
657
- if (h === S.role.name && n === S.organization.title)
658
- u = h, p = n;
657
+ if (h === S.role.name && s === S.organization.title)
658
+ u = h, p = s;
659
659
  else if (h === S.role.name) {
660
660
  let _ = g.filter(
661
661
  (y) => y.role.name === h
@@ -664,11 +664,11 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
664
664
  }
665
665
  });
666
666
  }) : g.forEach((h) => {
667
- if (s === h.role.name && n === h.organization.title)
668
- u = s, p = n;
669
- else if (s === h.role.name) {
667
+ if (n === h.role.name && s === h.organization.title)
668
+ u = n, p = s;
669
+ else if (n === h.role.name) {
670
670
  let S = g.filter(
671
- (_) => _.role.name === s
671
+ (_) => _.role.name === n
672
672
  );
673
673
  S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
674
674
  }
@@ -682,50 +682,51 @@ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0) {
682
682
  }
683
683
  });
684
684
  }
685
- async function I(e, t = void 0, s = void 0) {
686
- const n = e.objID;
687
- return (!n || n === "") && console.warn(
685
+ async function I(e, t = void 0, n = void 0) {
686
+ return (!e.objID || e.objID === "") && console.warn(
688
687
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
689
688
  ), (e.space === "" || !e.space) && console.warn(
690
689
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
691
690
  ), (e.token === "" || !e.token) && (J(
692
691
  e,
693
- (c) => {
694
- e.token = c;
692
+ (o) => {
693
+ e.token = o;
695
694
  },
696
- (c) => {
697
- console.log("☠️ error => ", c);
695
+ (o) => {
696
+ console.log("☠️ error => ", o);
698
697
  }
699
698
  ), console.warn(
700
699
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
701
- )), console.log("_3DSpace_download_doc / credentials", e), new Promise((c, r) => {
700
+ )), console.log("_3DSpace_download_doc / credentials", e), new Promise((o, c) => {
702
701
  U(
703
702
  e,
704
- (a) => {
703
+ (r) => {
705
704
  setTimeout(() => {
706
- f(a, {
707
- headers: {
708
- "Content-Type": "application/json",
709
- Accept: "application/json",
710
- ENO_CSRF_TOKEN: e.token
711
- },
705
+ const a = {
706
+ ENO_CSRF_TOKEN: e.token
707
+ };
708
+ f(r, {
709
+ headers: a,
712
710
  onComplete(i) {
713
711
  const d = JSON.parse(i);
714
- console.log("_3DSpace_download_doc / reponse ", d), t && t(d), c(d);
712
+ console.log(
713
+ "_3DSpace_download_doc / reponse (liste d'objetsID) ",
714
+ d
715
+ ), t && t(d), o(d);
715
716
  },
716
717
  onFailure(i, d, l) {
717
- s && (console.log("error http", i), s({ error: i, headers: d, xhr: l }), r({ error: i, headers: d, xhr: l }));
718
+ n && (console.log("error http", i), n({ msg: JSON.parse(i), headers: d, xhr: l }), c({ msg: JSON.parse(i), headers: d, xhr: l }));
718
719
  }
719
720
  });
720
- }, 500);
721
+ }, 1e3);
721
722
  },
722
- (a) => {
723
- s && s(a), console.log("*_3dspace_download_doc / error file URL *", a), r(a);
723
+ (r) => {
724
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), c(r);
724
725
  }
725
726
  );
726
727
  });
727
728
  }
728
- async function X(e, t, s = void 0, n = void 0) {
729
+ async function X(e, t, n = void 0, s = void 0) {
729
730
  let o = [];
730
731
  for (let a = 0; a < t.length; a += 80) {
731
732
  const i = t.slice(a, a + 80);
@@ -739,13 +740,13 @@ async function X(e, t, s = void 0, n = void 0) {
739
740
  a++, a < o.length && r(a);
740
741
  },
741
742
  (i) => {
742
- s && s(i);
743
+ n && n(i);
743
744
  }
744
745
  );
745
746
  };
746
747
  r(0);
747
748
  }
748
- function V(e, t, s = void 0, n = void 0, o = void 0) {
749
+ function V(e, t, n = void 0, s = void 0, o = void 0) {
749
750
  const c = [];
750
751
  t.forEach((i) => {
751
752
  c.push({
@@ -766,12 +767,12 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
766
767
  type: "json",
767
768
  onComplete(i) {
768
769
  const d = i.data;
769
- i.success === !0 && (s && s(), d.forEach((l) => {
770
+ i.success === !0 && (n && n(), d.forEach((l) => {
770
771
  try {
771
772
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
772
773
  f(u, {
773
774
  onComplete: (m) => {
774
- n && n({
775
+ s && s({
775
776
  objectId: l.id,
776
777
  fileName: p,
777
778
  data: JSON.parse(m)
@@ -791,11 +792,11 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
791
792
  }
792
793
  });
793
794
  }
794
- function De(e, t, s = void 0, n = void 0) {
795
+ function De(e, t, n = void 0, s = void 0) {
795
796
  return new Promise((o) => {
796
797
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
797
798
  const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
798
- b(
799
+ N(
799
800
  e.space,
800
801
  "ESPACE COMMUN",
801
802
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -822,21 +823,21 @@ function De(e, t, s = void 0, n = void 0) {
822
823
  }),
823
824
  type: "json",
824
825
  onComplete(a) {
825
- s && s(a);
826
+ n && n(a);
826
827
  },
827
828
  onFailure(a) {
828
- n && n(a);
829
+ s && s(a);
829
830
  }
830
831
  };
831
832
  f(c, r);
832
833
  }
833
834
  });
834
835
  }
835
- function Fe(e, t, s, n = void 0, o = void 0) {
836
+ function Fe(e, t, n, s = void 0, o = void 0) {
836
837
  return new Promise((c) => {
837
838
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
838
839
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
839
- b(
840
+ N(
840
841
  e.space,
841
842
  "ESPACE COMMUN",
842
843
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -858,13 +859,13 @@ function Fe(e, t, s, n = void 0, o = void 0) {
858
859
  data: [
859
860
  {
860
861
  id: t,
861
- nextState: s
862
+ nextState: n
862
863
  }
863
864
  ]
864
865
  }),
865
866
  type: "json",
866
867
  onComplete(i) {
867
- n && n(i);
868
+ s && s(i);
868
869
  },
869
870
  onFailure(i) {
870
871
  o && o(i);
@@ -874,11 +875,11 @@ function Fe(e, t, s, n = void 0, o = void 0) {
874
875
  }
875
876
  });
876
877
  }
877
- function Ue(e, t, s = void 0, n = void 0) {
878
+ function Ue(e, t, n = void 0, s = void 0) {
878
879
  return new Promise((o) => {
879
880
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
880
881
  const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
881
- b(
882
+ N(
882
883
  e.space,
883
884
  "ESPACE COMMUN",
884
885
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -905,21 +906,21 @@ function Ue(e, t, s = void 0, n = void 0) {
905
906
  }),
906
907
  type: "json",
907
908
  onComplete(a) {
908
- s && s(a);
909
+ n && n(a);
909
910
  },
910
911
  onFailure(a) {
911
- n && n(a);
912
+ s && s(a);
912
913
  }
913
914
  };
914
915
  f(c, r);
915
916
  }
916
917
  });
917
918
  }
918
- function $e(e, t, s = void 0, n = void 0) {
919
+ function $e(e, t, n = void 0, s = void 0) {
919
920
  return new Promise((o) => {
920
921
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
921
922
  const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
922
- b(
923
+ N(
923
924
  e.space,
924
925
  "ESPACE COMMUN",
925
926
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -952,21 +953,21 @@ function $e(e, t, s = void 0, n = void 0) {
952
953
  }),
953
954
  type: "json",
954
955
  onComplete(a) {
955
- s && s(a);
956
+ n && n(a);
956
957
  },
957
958
  onFailure(a) {
958
- n && n(a);
959
+ s && s(a);
959
960
  }
960
961
  };
961
962
  f(c, r);
962
963
  }
963
964
  });
964
965
  }
965
- function je(e, t, s, n = void 0, o = void 0) {
966
+ function je(e, t, n, s = void 0, o = void 0) {
966
967
  return new Promise((c) => {
967
968
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
968
969
  const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
969
- b(
970
+ N(
970
971
  e.space,
971
972
  "ESPACE COMMUN",
972
973
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -988,9 +989,9 @@ function je(e, t, s, n = void 0, o = void 0) {
988
989
  data: [
989
990
  {
990
991
  physicalid: t,
991
- proposedRevision: s,
992
+ proposedRevision: n,
992
993
  modifiedAttributes: {
993
- revision: s
994
+ revision: n
994
995
  }
995
996
  }
996
997
  ],
@@ -999,7 +1000,7 @@ function je(e, t, s, n = void 0, o = void 0) {
999
1000
  }),
1000
1001
  type: "json",
1001
1002
  onComplete(i) {
1002
- n && n(i);
1003
+ s && s(i);
1003
1004
  },
1004
1005
  onFailure(i) {
1005
1006
  o && o(i);
@@ -1010,12 +1011,12 @@ function je(e, t, s, n = void 0, o = void 0) {
1010
1011
  });
1011
1012
  }
1012
1013
  //!SECTION
1013
- function Ae(e, t = void 0, s = void 0) {
1014
- const n = {
1014
+ function Ae(e, t = void 0, n = void 0) {
1015
+ const s = {
1015
1016
  base: `${e.space}`,
1016
1017
  uri: "/resources/bps/cspaces",
1017
1018
  optTenant: `tenant=${e.tenant}`
1018
- }, o = `${n.base}${n.uri}?${n.optTenant}`;
1019
+ }, o = `${s.base}${s.uri}?${s.optTenant}`;
1019
1020
  f(o, {
1020
1021
  method: "GET",
1021
1022
  headers: {
@@ -1027,11 +1028,11 @@ function Ae(e, t = void 0, s = void 0) {
1027
1028
  t && t(a, r);
1028
1029
  },
1029
1030
  onFailure(c, r, a) {
1030
- s && s({ response: c, headers: r, xhr: a });
1031
+ n && n({ response: c, headers: r, xhr: a });
1031
1032
  }
1032
1033
  });
1033
1034
  }
1034
- function Re(e, t, s, n) {
1035
+ function Re(e, t, n, s) {
1035
1036
  U(
1036
1037
  e.space,
1037
1038
  t,
@@ -1039,42 +1040,42 @@ function Re(e, t, s, n) {
1039
1040
  f(o, {
1040
1041
  header: { ENO_CSRF_TOKEN: e.token },
1041
1042
  onComplete: (c) => {
1042
- s && s(c);
1043
+ n && n(c);
1043
1044
  },
1044
1045
  onFailure: (c) => {
1045
- console.log("error http", c), n && n(c);
1046
+ console.log("error http", c), s && s(c);
1046
1047
  }
1047
1048
  });
1048
1049
  }
1049
1050
  );
1050
1051
  }
1051
- async function Ie(e, t, s = void 0, n = void 0) {
1052
+ async function Ie(e, t, n = void 0, s = void 0) {
1052
1053
  return new Promise((o) => {
1053
1054
  U(e, t, (c) => {
1054
1055
  f(c, {
1055
- onComplete: (r, a, i) => (o(JSON.parse(r)), s && s(JSON.parse(r), a, i), o),
1056
+ onComplete: (r, a, i) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, i), o),
1056
1057
  onFailure: (r, a, i) => {
1057
- n && n(r, a, i), console.log(r, a?.errormsg);
1058
+ s && s(r, a, i), console.log(r, a?.errormsg);
1058
1059
  }
1059
1060
  });
1060
1061
  });
1061
1062
  });
1062
1063
  }
1063
- function ve(e, t, s, n = void 0, o = void 0) {
1064
+ function ve(e, t, n, s = void 0, o = void 0) {
1064
1065
  const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1065
1066
  k(
1066
1067
  e,
1067
- s,
1068
+ n,
1068
1069
  (r) => {
1069
1070
  const a = r.data[0].relateddata.files[0].id, i = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1070
1071
  K(
1071
1072
  e,
1072
- s,
1073
+ n,
1073
1074
  a,
1074
1075
  c,
1075
1076
  i,
1076
1077
  (d) => {
1077
- n && n(d);
1078
+ s && s(d);
1078
1079
  },
1079
1080
  (d) => {
1080
1081
  o && o(d);
@@ -1085,59 +1086,59 @@ function ve(e, t, s, n = void 0, o = void 0) {
1085
1086
  }
1086
1087
  let v, P;
1087
1088
  const $ = [];
1088
- async function Pe(e, t = void 0, s = void 0) {
1089
+ async function Pe(e, t = void 0, n = void 0) {
1089
1090
  e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
1090
1091
  e,
1091
- (n) => {
1092
- t && t(n);
1092
+ (s) => {
1093
+ t && t(s);
1093
1094
  },
1094
- (n) => {
1095
- s && s(n);
1095
+ (s) => {
1096
+ n && n(s);
1096
1097
  }
1097
1098
  )) : (e.objID === null || e.objID === "") && C(
1098
1099
  e,
1099
- (n) => {
1100
- t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1100
+ (s) => {
1101
+ t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1101
1102
  },
1102
- (n) => {
1103
- s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1103
+ (s) => {
1104
+ n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1104
1105
  }
1105
1106
  );
1106
1107
  }
1107
- async function xe(e, t = void 0, s = void 0) {
1108
+ async function xe(e, t = void 0, n = void 0) {
1108
1109
  console.log("getDatasByTenant (getDocuments)", e), await I(
1109
1110
  e,
1110
- (n) => {
1111
+ (s) => {
1111
1112
  const o = {};
1112
- o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1113
+ o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1113
1114
  },
1114
- (n) => {
1115
- s && s?.(n);
1115
+ (s) => {
1116
+ n && n?.(s);
1116
1117
  }
1117
1118
  );
1118
1119
  }
1119
- function Me(e, t = void 0, s = void 0) {
1120
- const n = [];
1120
+ function Me(e, t = void 0, n = void 0) {
1121
+ const s = [];
1121
1122
  e.objIds.forEach((o, c) => {
1122
1123
  I(
1123
1124
  e,
1124
1125
  o.objId,
1125
1126
  (r) => {
1126
- n.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && t && t(n);
1127
+ s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && t && t(s);
1127
1128
  }
1128
1129
  );
1129
1130
  });
1130
1131
  }
1131
- function B(e, t, s = void 0, n = void 0) {
1132
+ function B(e, t, n = void 0, s = void 0) {
1132
1133
  X(
1133
1134
  e,
1134
1135
  v,
1135
1136
  (o) => {
1136
1137
  const c = [...t];
1137
- c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data), s && s($);
1138
+ c.find((r) => r.objectID === o.objectId).data = o.data, P = c, $.push(o.data), n && n($);
1138
1139
  },
1139
1140
  (o) => {
1140
- n && (n(o), console.log(o));
1141
+ s && (s(o), console.log(o));
1141
1142
  }
1142
1143
  );
1143
1144
  }
@@ -1161,7 +1162,7 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1161
1162
  order_by: "desc",
1162
1163
  tag: "testTag"
1163
1164
  };
1164
- function Le(e, t, s = void 0, n = void 0) {
1165
+ function Le(e, t, n = void 0, s = void 0) {
1165
1166
  const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
1166
1167
  uri: "/resources/6w/tags",
1167
1168
  otpCTX: "SecurityContext=preferred",
@@ -1201,27 +1202,27 @@ function Le(e, t, s = void 0, n = void 0) {
1201
1202
  e,
1202
1203
  t,
1203
1204
  (y) => {
1204
- s && s(y);
1205
+ n && n(y);
1205
1206
  },
1206
1207
  (y) => {
1207
- n && n(y);
1208
+ s && s(y);
1208
1209
  }
1209
1210
  );
1210
1211
  },
1211
1212
  (g, h) => {
1212
1213
  const S = g;
1213
- S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
1214
+ S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
1214
1215
  }
1215
1216
  );
1216
1217
  }, 2e3);
1217
1218
  },
1218
1219
  onFailure(u, m) {
1219
1220
  const g = u;
1220
- g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1221
+ g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1221
1222
  }
1222
1223
  });
1223
1224
  }
1224
- function q(e, t, s = void 0, n = void 0) {
1225
+ function q(e, t, n = void 0, s = void 0) {
1225
1226
  console.log("obj ", t);
1226
1227
  const o = t.info.name, c = {
1227
1228
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1296,15 +1297,15 @@ function q(e, t, s = void 0, n = void 0) {
1296
1297
  data: JSON.stringify(d),
1297
1298
  onComplete(l) {
1298
1299
  const p = JSON.parse(l);
1299
- s(p);
1300
+ n(p);
1300
1301
  },
1301
1302
  onFailure(l, p) {
1302
1303
  const u = l;
1303
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1304
+ 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);
1304
1305
  }
1305
1306
  });
1306
1307
  }
1307
- function Ee(e, t, s = void 0, n = void 0) {
1308
+ function Ee(e, t, n = void 0, s = void 0) {
1308
1309
  const { objId: o, pred: c, tag: r } = t, a = {
1309
1310
  uri: "/resources/6w/tags",
1310
1311
  otpCTX: "SecurityContext=preferred",
@@ -1332,15 +1333,15 @@ function Ee(e, t, s = void 0, n = void 0) {
1332
1333
  Accept: "application/json,text/javascript,*/*"
1333
1334
  },
1334
1335
  onComplete(l) {
1335
- s && s(l);
1336
+ n && n(l);
1336
1337
  },
1337
1338
  onFailure(l, p) {
1338
1339
  const u = l;
1339
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
1340
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1340
1341
  }
1341
1342
  });
1342
1343
  }
1343
- function Je(e, t = "", s = void 0, n = void 0) {
1344
+ function Je(e, t = "", n = void 0, s = void 0) {
1344
1345
  const { space: o } = e;
1345
1346
  if (t === "")
1346
1347
  return;
@@ -1355,29 +1356,29 @@ function Je(e, t = "", s = void 0, n = void 0) {
1355
1356
  headers: r,
1356
1357
  data: i,
1357
1358
  onComplete(d) {
1358
- s && s(JSON.parse(d));
1359
+ n && n(JSON.parse(d));
1359
1360
  },
1360
1361
  onFailure(d, l) {
1361
1362
  const p = d;
1362
- p.msg = l.error, n && n(p);
1363
+ p.msg = l.error, s && s(p);
1363
1364
  }
1364
1365
  });
1365
1366
  }
1366
- async function w(e, t = void 0, s = void 0) {
1367
- const n = e.space + "/api/index/tk";
1368
- return f(n, {
1367
+ async function w(e, t = void 0, n = void 0) {
1368
+ const s = e.space + "/api/index/tk";
1369
+ return f(s, {
1369
1370
  onComplete(o, c, r) {
1370
1371
  const a = JSON.parse(o);
1371
1372
  if (t)
1372
1373
  return t(a), e.token = a?.result?.ServerToken;
1373
1374
  },
1374
1375
  onFailure(o) {
1375
- s && s(o);
1376
+ n && n(o);
1376
1377
  }
1377
1378
  });
1378
1379
  }
1379
- function Ge(e, t = void 0, s = void 0) {
1380
- const n = `${e.space}/api/exalead/whatsnew`, o = {
1380
+ function Ge(e, t = void 0, n = void 0) {
1381
+ const s = `${e.space}/api/exalead/whatsnew`, o = {
1381
1382
  params: {
1382
1383
  community_id: null,
1383
1384
  hash_key: null,
@@ -1388,7 +1389,7 @@ function Ge(e, t = void 0, s = void 0) {
1388
1389
  }
1389
1390
  };
1390
1391
  w(e, (c) => {
1391
- f(n, {
1392
+ f(s, {
1392
1393
  method: "POST",
1393
1394
  headers: {
1394
1395
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
@@ -1401,13 +1402,13 @@ function Ge(e, t = void 0, s = void 0) {
1401
1402
  t && t(r, a);
1402
1403
  },
1403
1404
  onFailure(r, a) {
1404
- s && s(r, a);
1405
+ n && n(r, a);
1405
1406
  }
1406
1407
  });
1407
1408
  });
1408
1409
  }
1409
- function Ke(e, t = void 0, s = void 0) {
1410
- const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1410
+ function Ke(e, t = void 0, n = void 0) {
1411
+ const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1411
1412
  params: {
1412
1413
  idsToFilterArr: [],
1413
1414
  mode: "offline",
@@ -1417,7 +1418,7 @@ function Ke(e, t = void 0, s = void 0) {
1417
1418
  }
1418
1419
  };
1419
1420
  w(e, (c) => {
1420
- f(n, {
1421
+ f(s, {
1421
1422
  method: "POST",
1422
1423
  headers: {
1423
1424
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
@@ -1431,18 +1432,18 @@ function Ke(e, t = void 0, s = void 0) {
1431
1432
  t && t(i, r);
1432
1433
  },
1433
1434
  onFailure(r, a) {
1434
- s && s(r, a);
1435
+ n && n(r, a);
1435
1436
  }
1436
1437
  });
1437
1438
  });
1438
1439
  }
1439
- function We(e, t = void 0, s = void 0) {
1440
- const n = {
1440
+ function We(e, t = void 0, n = void 0) {
1441
+ const s = {
1441
1442
  base: e.space,
1442
1443
  uri: "/api/community/listmycommunities",
1443
1444
  limit: `/limit/${e.limit ? e.limit : 128}`,
1444
1445
  page: `/page/${e.page ? e.page : "1"}`
1445
- }, o = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1446
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1446
1447
  w(e, (r) => {
1447
1448
  f(o, {
1448
1449
  method: "GET",
@@ -1467,18 +1468,18 @@ function We(e, t = void 0, s = void 0) {
1467
1468
  (h) => {
1468
1469
  u++, g.members = h, c.push(g), u === p.length && t && t(c);
1469
1470
  },
1470
- (h) => s(h)
1471
+ (h) => n(h)
1471
1472
  );
1472
1473
  });
1473
1474
  },
1474
1475
  onFailure(a, i) {
1475
1476
  const d = a;
1476
- d.status = i.status, d.response = i.errormsg, s && s(d);
1477
+ d.status = i.status, d.response = i.errormsg, n && n(d);
1477
1478
  }
1478
1479
  });
1479
1480
  });
1480
1481
  }
1481
- function Q(e, t, s, n) {
1482
+ function Q(e, t, n, s) {
1482
1483
  const o = `${e.space}/api/community/listmembers`, c = {
1483
1484
  params: {
1484
1485
  page: e.page ? e.page : 1,
@@ -1497,18 +1498,18 @@ function Q(e, t, s, n) {
1497
1498
  data: JSON.stringify(c),
1498
1499
  type: "json",
1499
1500
  onComplete(a, i, d) {
1500
- s && s(a);
1501
+ n && n(a);
1501
1502
  },
1502
1503
  onFailure(a, i) {
1503
1504
  const d = a;
1504
- d.status = i.status, d.response = i.errormsg, n && n(d);
1505
+ d.status = i.status, d.response = i.errormsg, s && s(d);
1505
1506
  }
1506
1507
  });
1507
1508
  });
1508
1509
  }
1509
- function Xe(e, t = void 0, s = void 0) {
1510
- const n = "YXdA5x4DSUKtlAi2wmnyTA";
1511
- e.commu_id || (e.commu_id = n);
1510
+ function Xe(e, t = void 0, n = void 0) {
1511
+ const s = "YXdA5x4DSUKtlAi2wmnyTA";
1512
+ e.commu_id || (e.commu_id = s);
1512
1513
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1513
1514
  w(e, (c) => {
1514
1515
  f(o, {
@@ -1524,12 +1525,12 @@ function Xe(e, t = void 0, s = void 0) {
1524
1525
  },
1525
1526
  onFailure(r, a) {
1526
1527
  const i = r;
1527
- i.status = a.status, i.response = a.errormsg, s && s(i);
1528
+ i.status = a.status, i.response = a.errormsg, n && n(i);
1528
1529
  }
1529
1530
  });
1530
1531
  });
1531
1532
  }
1532
- function Ve(e, t, s = void 0, n = void 0) {
1533
+ function Ve(e, t, n = void 0, s = void 0) {
1533
1534
  const { listAllContacts: o, currentUser: c } = e;
1534
1535
  console.log("__listAllContacts", o.hits);
1535
1536
  const r = `${e.space}/api/directmessages`, a = {
@@ -1547,7 +1548,7 @@ function Ve(e, t, s = void 0, n = void 0) {
1547
1548
  l !== void 0 && (i.id_msg = l.id, d = !0, j(e, i));
1548
1549
  },
1549
1550
  (l) => {
1550
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
1551
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), i.id_msg = "";
1551
1552
  }
1552
1553
  ), d === !1 && setTimeout(() => {
1553
1554
  d === !1 && w(e, (l) => {
@@ -1562,17 +1563,17 @@ function Ve(e, t, s = void 0, n = void 0) {
1562
1563
  type: "json",
1563
1564
  onComplete(p, u, m) {
1564
1565
  const g = p;
1565
- g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), i.id_msg = g.result.id, j(e, i);
1566
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), i.id_msg = g.result.id, j(e, i);
1566
1567
  },
1567
1568
  onFailure(p, u, m) {
1568
1569
  const g = p;
1569
- g.msg = u.errormsg, g.status = u.status, n && n(g);
1570
+ g.msg = u.errormsg, g.status = u.status, s && s(g);
1570
1571
  }
1571
1572
  });
1572
1573
  });
1573
1574
  }, 500);
1574
1575
  }
1575
- function Z(e, t, s, n) {
1576
+ function Z(e, t, n, s) {
1576
1577
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1577
1578
  w(e, (c) => {
1578
1579
  f(o, {
@@ -1592,16 +1593,16 @@ function Z(e, t, s, n) {
1592
1593
  u.push(m.login);
1593
1594
  }), JSON.stringify(u) === JSON.stringify(d);
1594
1595
  });
1595
- s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1596
+ n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1596
1597
  },
1597
1598
  onFailure(r) {
1598
1599
  const a = r;
1599
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1600
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1600
1601
  }
1601
1602
  });
1602
1603
  });
1603
1604
  }
1604
- function j(e, t, s = void 0, n = void 0) {
1605
+ function j(e, t, n = void 0, s = void 0) {
1605
1606
  const o = {
1606
1607
  base: e.space,
1607
1608
  uri: "/api/community",
@@ -1629,21 +1630,21 @@ function j(e, t, s = void 0, n = void 0) {
1629
1630
  type: "json",
1630
1631
  onComplete(i, d, l) {
1631
1632
  const p = i;
1632
- p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1633
+ p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1633
1634
  },
1634
1635
  onFailure(i, d) {
1635
1636
  const l = i;
1636
- l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1637
+ l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1637
1638
  }
1638
1639
  });
1639
1640
  });
1640
1641
  }
1641
1642
  function ee(e) {
1642
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1643
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1643
1644
  return `<p>${e} </p>
1644
1645
  <br/>
1645
1646
  <hr/>
1646
- <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1647
+ <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1647
1648
  }
1648
1649
  const te = {
1649
1650
  title: "TEST DEV COMMUNITY IDEA",
@@ -1655,7 +1656,7 @@ const te = {
1655
1656
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1656
1657
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1657
1658
  };
1658
- function Be(e, t, s = void 0, n = void 0) {
1659
+ function Be(e, t, n = void 0, s = void 0) {
1659
1660
  const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1660
1661
  (i) => i.id === t.community_id
1661
1662
  ), r = e.swymCommunities.find(
@@ -1685,16 +1686,16 @@ function Be(e, t, s = void 0, n = void 0) {
1685
1686
  type: "json",
1686
1687
  onComplete(l, p, u) {
1687
1688
  const m = JSON.parse(l);
1688
- m.status = u.status, m.response = u.response, s && s(m);
1689
+ m.status = u.status, m.response = u.response, n && n(m);
1689
1690
  },
1690
1691
  onFailure(l, p, u) {
1691
1692
  const m = l;
1692
- m.status = p.status, m.response = p.errormsg, n && n(m);
1693
+ m.status = p.status, m.response = p.errormsg, s && s(m);
1693
1694
  }
1694
1695
  });
1695
1696
  });
1696
1697
  }
1697
- function Ye(e, t, s = void 0, n = void 0) {
1698
+ function Ye(e, t, n = void 0, s = void 0) {
1698
1699
  const o = `${e.space}/api/idea/delete`, c = {
1699
1700
  params: {
1700
1701
  community_id: t.community_id,
@@ -1712,16 +1713,16 @@ function Ye(e, t, s = void 0, n = void 0) {
1712
1713
  data: JSON.stringify(c),
1713
1714
  type: "json",
1714
1715
  onComplete(a, i, d) {
1715
- s && s(a);
1716
+ n && n(a);
1716
1717
  },
1717
1718
  onFailure(a, i, d) {
1718
1719
  const l = a;
1719
- l.status = i.status, l.response = i.errormsg, n && n(l);
1720
+ l.status = i.status, l.response = i.errormsg, s && s(l);
1720
1721
  }
1721
1722
  });
1722
1723
  });
1723
1724
  }
1724
- function He(e, t = "", s = void 0, n = void 0) {
1725
+ function He(e, t = "", n = void 0, s = void 0) {
1725
1726
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1726
1727
  t === "" && (t = o);
1727
1728
  const c = `${e.space}/api/idea/get`, r = {
@@ -1741,16 +1742,16 @@ function He(e, t = "", s = void 0, n = void 0) {
1741
1742
  type: "json",
1742
1743
  onComplete(i) {
1743
1744
  const d = i;
1744
- d.msg = d.result.message, s && s(d);
1745
+ d.msg = d.result.message, n && n(d);
1745
1746
  },
1746
1747
  onFailure(i) {
1747
1748
  const d = i;
1748
- d.status = headers.status, d.response = headers.errormsg, n && n(d);
1749
+ d.status = headers.status, d.response = headers.errormsg, s && s(d);
1749
1750
  }
1750
1751
  });
1751
1752
  });
1752
1753
  }
1753
- function ze(e, t = te, s = void 0, n = void 0) {
1754
+ function ze(e, t = te, n = void 0, s = void 0) {
1754
1755
  const o = {
1755
1756
  uri: "/api/idea/list",
1756
1757
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
@@ -1764,11 +1765,11 @@ function ze(e, t = te, s = void 0, n = void 0) {
1764
1765
  },
1765
1766
  onComplete(a) {
1766
1767
  const i = JSON.parse(a);
1767
- s && s(i);
1768
+ n && n(i);
1768
1769
  },
1769
1770
  onFailure(a, i) {
1770
1771
  const d = a;
1771
- d.status = i.status, d.response = i.errormsg, n && n(d);
1772
+ d.status = i.status, d.response = i.errormsg, s && s(d);
1772
1773
  }
1773
1774
  });
1774
1775
  });
@@ -1848,10 +1849,10 @@ function ne(e) {
1848
1849
  <p>
1849
1850
  </p>` : e;
1850
1851
  }
1851
- function qe(e, t = void 0, s = void 0) {
1852
- const n = e.space + "/api/user/getcurrent/";
1852
+ function qe(e, t = void 0, n = void 0) {
1853
+ const s = e.space + "/api/user/getcurrent/";
1853
1854
  w(e, (o) => {
1854
- f(n, {
1855
+ f(s, {
1855
1856
  method: "GET",
1856
1857
  headers: {
1857
1858
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
@@ -1862,12 +1863,12 @@ function qe(e, t = void 0, s = void 0) {
1862
1863
  },
1863
1864
  onFailure(c, r, a) {
1864
1865
  const i = { erreur: JSON.parse(c), headers: r, xhr: a };
1865
- s && s(i);
1866
+ n && n(i);
1866
1867
  }
1867
1868
  });
1868
1869
  });
1869
1870
  }
1870
- function Qe(e, t, s = void 0, n = void 0) {
1871
+ function Qe(e, t, n = void 0, s = void 0) {
1871
1872
  const o = e.space + "/api/user/find/login/" + t;
1872
1873
  w(
1873
1874
  e,
@@ -1877,14 +1878,14 @@ function Qe(e, t, s = void 0, n = void 0) {
1877
1878
  headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1878
1879
  onComplete(r, a, i) {
1879
1880
  const d = JSON.parse(r);
1880
- s && s(d);
1881
+ n && n(d);
1881
1882
  },
1882
1883
  onFailure(r) {
1883
- n && n(r);
1884
+ s && s(r);
1884
1885
  }
1885
1886
  });
1886
1887
  },
1887
- n
1888
+ s
1888
1889
  );
1889
1890
  }
1890
1891
  function Ze(e) {
@@ -1899,11 +1900,11 @@ export {
1899
1900
  X as _3DSpace_download_multidoc,
1900
1901
  K as _3DSpace_file_update,
1901
1902
  W as _3DSpace_file_update_csr,
1902
- Ne as _3DSpace_file_url_csr,
1903
+ be as _3DSpace_file_url_csr,
1903
1904
  k as _3DSpace_get_csrf,
1904
1905
  G as _3DSpace_get_docInfo,
1905
1906
  V as _3DSpace_get_downloadTicket_multidoc,
1906
- b as _3DSpace_get_securityContexts,
1907
+ N as _3DSpace_get_securityContexts,
1907
1908
  U as _3DSpace_get_ticket,
1908
1909
  je as _3DSpace_lifecycle_changeRevision,
1909
1910
  Fe as _3DSpace_lifecycle_changeState,
@@ -1956,7 +1957,7 @@ export {
1956
1957
  Ce as patchUserGroups,
1957
1958
  Oe as patchUserGroupsControl,
1958
1959
  ve as pushDataIn3DSpace,
1959
- be as readUserGroupControl,
1960
+ Ne as readUserGroupControl,
1960
1961
  Ee as removeTagToDoc,
1961
1962
  Ze as sayHello,
1962
1963
  de as updateEvent