@beam3_dev/api_module 0.0.101 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
- import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
4
- function I() {
3
+ import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
+ function U() {
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 re(e, t = void 0, n = void 0) {
37
+ async function ce(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,
@@ -50,7 +50,7 @@ async function re(e, t = void 0, n = void 0) {
50
50
  n && n(o), console.error("Erreur : " + o);
51
51
  });
52
52
  }
53
- async function ce(e, t = void 0, n = void 0) {
53
+ async function de(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
  {
@@ -65,11 +65,11 @@ async function ce(e, t = void 0, n = void 0) {
65
65
  n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
- async function de(e, t = L) {
68
+ async function le(e, t = L) {
69
69
  let n = N.now().year;
70
- const s = e, o = [], c = (a) => {
71
- for (let r in a)
72
- o.push({ date: r, comment: a[r] });
70
+ const s = e, o = [], r = (a) => {
71
+ for (let c in a)
72
+ o.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,59 +80,64 @@ async function de(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((c) => c.json()).then((c) => {
84
+ r(c);
85
+ }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of o)
90
+ for (let c of o)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: N.fromISO(r.date).toISODate(),
96
- end: N.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + c.comment,
95
+ start: N.fromISO(c.date).toISODate(),
96
+ end: N.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function le(e, t, n = !0) {
103
+ async function pe(e, t, n = !0) {
104
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;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, r) => o.start - r.start), e;
106
106
  }
107
- function m(e, t) {
107
+ function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
109
109
  n.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function pe(e, t, n) {
112
+ function ue(e, t, n) {
113
113
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
- s.draggable(e, { data: t, start: n });
114
+ s.draggable(e, {
115
+ data: t,
116
+ start: n
117
+ });
115
118
  });
116
119
  }
117
- function ue(e, t = void 0) {
120
+ function fe(e, t = void 0) {
118
121
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
122
  let s;
120
123
  s === void 0 && (s = n.createProxy({
121
- widgetId: U.id,
124
+ widgetId: j.id,
122
125
  filteringMode: "WithFilteringServices"
123
126
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
127
  });
125
128
  }
126
- function fe(e, t) {
129
+ function me(e, t) {
127
130
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
128
- n.droppable(e, { drop: t });
131
+ n.droppable(e, {
132
+ drop: t
133
+ });
129
134
  });
130
135
  }
131
- async function me(e, t = void 0, n = void 0) {
136
+ async function ge(e, t = void 0, n = void 0) {
132
137
  await O(
133
138
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
139
  (s) => {
135
- (!e || e === "") && (e = U.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
140
+ (!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
141
  s.getPlatformServices({
137
142
  platformId: e,
138
143
  onComplete: t,
@@ -145,92 +150,128 @@ async function me(e, t = void 0, n = void 0) {
145
150
  function J() {
146
151
  let e = {};
147
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
154
  "com.3ds.wp.passport.cors"
150
155
  );
151
156
  e = {
152
157
  tenant: n,
153
158
  user: s,
154
159
  appsConfiguration: o,
155
- appConf: c
160
+ appConf: r
156
161
  };
157
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
163
  }
159
- function ge(e, t, n) {
164
+ function E(e, t = void 0, n = void 0) {
165
+ if (e.tenant) {
166
+ const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
+ f(s, {
168
+ onComplete(o) {
169
+ const r = JSON.parse(o);
170
+ if (console.log("_getServiceUrl", r), r && "platforms" in r) {
171
+ const i = r.find((a) => {
172
+ a.id, e.tenant;
173
+ });
174
+ t && t(i);
175
+ }
176
+ },
177
+ onFailure(o) {
178
+ n && n(o);
179
+ }
180
+ });
181
+ }
182
+ }
183
+ function he(e, t = void 0, n = void 0) {
184
+ if (e.tenant) {
185
+ const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
186
+ f(s, {
187
+ onComplete(o) {
188
+ const r = JSON.parse(o);
189
+ if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
190
+ const i = `${r[0].services[0].url}`;
191
+ t && t(i);
192
+ }
193
+ },
194
+ onFailure(o) {
195
+ n && n(o);
196
+ }
197
+ });
198
+ }
199
+ }
200
+ function Se(e, t, n) {
160
201
  const s = {
161
202
  base: `${e.space}`,
162
203
  uri: "/resources/AppsMngt/api/custom/applications",
163
204
  option: `?filter=${e.tenant}`
164
205
  // facultatif
165
206
  }, o = `${s.base}${s.uri}${s.option}`;
166
- m(o, {
207
+ f(o, {
167
208
  method: "GET",
168
209
  headers: {
169
210
  "Content-Type": "application/json",
170
211
  Accept: "application/json"
171
212
  },
172
- onComplete(c, i, a) {
173
- const r = JSON.parse(c), d = r.data.map((l) => {
213
+ onComplete(r, i, a) {
214
+ const c = JSON.parse(r), d = c.data.map((l) => {
174
215
  const p = l.attributes.name, u = l.id;
175
216
  return { name: p, id: u };
176
217
  });
177
- t && t(d, r);
218
+ t && t(d, c);
178
219
  },
179
- onFailure(c, i) {
180
- const a = c;
220
+ onFailure(r, i) {
221
+ const a = r;
181
222
  a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
182
223
  }
183
224
  });
184
225
  }
185
- function he(e, t = void 0, n = void 0) {
226
+ function _e(e, t = void 0, n = void 0) {
186
227
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
- m(s, {
188
- onComplete(o, c, i) {
228
+ f(s, {
229
+ onComplete(o, r, i) {
189
230
  const a = JSON.parse(o);
190
231
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
232
  },
192
- onFailure(o, c) {
233
+ onFailure(o, r) {
193
234
  const i = o;
194
- i.msg = c.errormsg, i.errCode = c.errorcode, n && n(i);
235
+ i.msg = r.errormsg, i.errCode = r.errorcode, n && n(i);
195
236
  }
196
237
  });
197
238
  }
198
- function Se(e, t, n = void 0, s = void 0) {
239
+ function ye(e, t, n = void 0, s = void 0) {
199
240
  let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
- m(o, {
201
- onComplete(c, i, a) {
202
- const r = JSON.parse(c);
203
- n && n(r);
241
+ f(o, {
242
+ onComplete(r, i, a) {
243
+ const c = JSON.parse(r);
244
+ n && n(c);
204
245
  },
205
- onFailure(c, i) {
206
- const a = c;
246
+ onFailure(r, i) {
247
+ const a = r;
207
248
  a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
208
249
  }
209
250
  });
210
251
  }
211
- const F = {
252
+ const v = {
212
253
  "Content-Type": "application/json",
213
254
  Accept: "application/json,text/javascript,*/*"
214
255
  };
215
- function _e(e, t, n = void 0, s = void 0) {
216
- const { space: o, currentUser: c } = e, a = `${o}${{
256
+ function we(e, t, n = void 0, s = void 0) {
257
+ const { space: o, currentUser: r } = e, a = `${o}${{
217
258
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, r = {
259
+ }.URIUGr}`, c = {
219
260
  groups: [
220
261
  {
221
262
  title: t.title,
222
263
  description: t.description,
223
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
264
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
224
265
  pending_members: [],
225
266
  sharing: t.sharing,
226
267
  visibility: t.visibility
227
268
  }
228
269
  ]
229
270
  };
230
- m(a, {
271
+ f(a, {
231
272
  method: "POST",
232
- headers: F,
233
- data: JSON.stringify(r),
273
+ headers: v,
274
+ data: JSON.stringify(c),
234
275
  onComplete(d) {
235
276
  n && n(JSON.parse(d));
236
277
  },
@@ -241,9 +282,9 @@ function _e(e, t, n = void 0, s = void 0) {
241
282
  }
242
283
  });
243
284
  }
244
- function ye(e, t, n = void 0, s = void 0) {
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
- m(d, {
285
+ function Ce(e, t, n = void 0, s = void 0) {
286
+ const { space: o, tenant: r } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${i}${a}${c}`;
287
+ f(d, {
247
288
  opts: {
248
289
  method: "GET",
249
290
  headers: {
@@ -254,19 +295,19 @@ function ye(e, t, n = void 0, s = void 0) {
254
295
  onComplete(u) {
255
296
  n && n(JSON.parse(u));
256
297
  },
257
- onFailure(u, f) {
298
+ onFailure(u, m) {
258
299
  const g = u;
259
- g.msg = f.errormsg, g.errCode = f.errorcode, s && s(g);
300
+ g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
260
301
  }
261
302
  });
262
303
  }
263
- function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: o } = e, c = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, r = {
304
+ function G(e, t = void 0, n = void 0) {
305
+ const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
265
306
  method: "GET",
266
307
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${i}${a}`;
268
- m(d, {
269
- OPTsH: r,
308
+ }, d = `${r}${i}${a}`;
309
+ f(d, {
310
+ OPTsH: c,
270
311
  onComplete(l) {
271
312
  t && t(JSON.parse(l));
272
313
  },
@@ -276,19 +317,19 @@ function E(e, t = void 0, n = void 0) {
276
317
  }
277
318
  });
278
319
  }
279
- function we(e, t = void 0, n = void 0) {
320
+ function Te(e, t = void 0, n = void 0) {
280
321
  const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
281
322
  "Content-Type": "application/json",
282
323
  Accept: "application/json,text/javascript,*/*"
283
324
  } };
284
325
  try {
285
- m(a, {
326
+ f(a, {
286
327
  opts: d,
287
328
  onComplete(l) {
288
- const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
329
+ const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
330
  if (o && Object.keys(o).length > 0) {
290
- const g = f.filter((_) => _.owner === o.email), h = f.filter((_) => _.members.includes(o.email)), S = g.concat(h);
291
- u.iam = S, u.UG = f, u.iamMember = h, E(
331
+ const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
332
+ u.iam = S, u.UG = m, u.iamMember = h, G(
292
333
  e,
293
334
  (_) => {
294
335
  u.rules = _, t && t(u);
@@ -307,14 +348,14 @@ function we(e, t = void 0, n = void 0) {
307
348
  console.log(l);
308
349
  }
309
350
  }
310
- function Ce(e, t) {
351
+ function Oe(e, t) {
311
352
  const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
- m(o, {
353
+ f(o, {
313
354
  method: "DELETE"
314
355
  });
315
356
  }
316
- function Te(e, t, n, s = void 0, o = void 0) {
317
- const { space: c, tenant: i } = e, a = {
357
+ function be(e, t, n, s = void 0, o = void 0) {
358
+ const { space: r, tenant: i } = e, a = {
318
359
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
360
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
361
  nextURICh: "/characteristics",
@@ -322,9 +363,9 @@ function Te(e, t, n, s = void 0, o = void 0) {
322
363
  nexURImem: "/members",
323
364
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
365
  OPTsTenant: `tenant=dstenant:${i}`
325
- }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
326
- m(d, {
327
- headers: F,
366
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
367
+ f(d, {
368
+ headers: v,
328
369
  method: "PATCH",
329
370
  data: l,
330
371
  type: "json",
@@ -336,11 +377,11 @@ function Te(e, t, n, s = void 0, o = void 0) {
336
377
  }
337
378
  });
338
379
  }
339
- function Oe(e, t, n, s = void 0, o = void 0) {
340
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
- m(a, {
380
+ function Ne(e, t, n, s = void 0, o = void 0) {
381
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
382
+ f(a, {
342
383
  method: "PATCH",
343
- headers: F,
384
+ headers: v,
344
385
  data: JSON.stringify(n),
345
386
  type: "json",
346
387
  onComplete(d) {
@@ -351,9 +392,9 @@ function Oe(e, t, n, s = void 0, o = void 0) {
351
392
  }
352
393
  });
353
394
  }
354
- function be(e, t, n = void 0, s = void 0) {
395
+ function ke(e, t, n = void 0, s = void 0) {
355
396
  const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- m(i, {
397
+ f(i, {
357
398
  opts: {
358
399
  method: "GET",
359
400
  headers: {
@@ -369,28 +410,28 @@ function be(e, t, n = void 0, s = void 0) {
369
410
  }
370
411
  });
371
412
  }
372
- async function G(e, t, n) {
413
+ async function K(e, t, n) {
373
414
  if (e.space) {
374
415
  const s = `${e.space}/resources/v1/application/CSRF`;
375
- m(s, {
416
+ f(s, {
376
417
  onComplete(o) {
377
418
  o = JSON.parse(o), t && t(o.csrf);
378
419
  },
379
- onFailure(o, c, i) {
380
- n && n({ error: o, headers: c, xhr: i });
420
+ onFailure(o, r, i) {
421
+ n && n({ error: o, headers: r, xhr: i });
381
422
  }
382
423
  });
383
424
  }
384
425
  }
385
- async function K(e, t = void 0, n = void 0, s = void 0) {
426
+ async function X(e, t = void 0, n = void 0, s = void 0) {
386
427
  const o = e.space;
387
428
  if (t === void 0) {
388
429
  console.log("Le paramètre docid est obligatoire");
389
430
  return;
390
431
  }
391
- const c = o + `/resources/v1/modeler/documents/${t}`;
392
- m(c, {
393
- onComplete(i, a, r) {
432
+ const r = o + `/resources/v1/modeler/documents/${t}`;
433
+ f(r, {
434
+ onComplete(i, a, c) {
394
435
  const d = JSON.parse(i);
395
436
  n && n(d);
396
437
  },
@@ -402,8 +443,8 @@ async function K(e, t = void 0, n = void 0, s = void 0) {
402
443
  function k(e, t = void 0, n = void 0) {
403
444
  if (e.objID && e.objID !== "") {
404
445
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- m(s, {
406
- onComplete(o, c, i) {
446
+ f(s, {
447
+ onComplete(o, r, i) {
407
448
  const a = JSON.parse(o);
408
449
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
450
  },
@@ -425,15 +466,15 @@ function k(e, t = void 0, n = void 0) {
425
466
  function T(e, t = void 0, n = void 0) {
426
467
  if (e.space) {
427
468
  const s = e.space + "/resources/v1/application/CSRF";
428
- m(s, {
429
- onComplete(o, c, i) {
469
+ f(s, {
470
+ onComplete(o, r, i) {
430
471
  const a = JSON.parse(o);
431
472
  t && t(a.csrf.value);
432
473
  },
433
- onFailure(o, c, i) {
474
+ onFailure(o, r, i) {
434
475
  n && n({
435
476
  response: o,
436
- headers: c,
477
+ headers: r,
437
478
  xhr: i
438
479
  });
439
480
  }
@@ -441,22 +482,22 @@ function T(e, t = void 0, n = void 0) {
441
482
  } else
442
483
  n && n("ERROR : url du 3DSpace non défini.");
443
484
  }
444
- function j(e, t = void 0, n = void 0) {
485
+ function D(e, t = void 0, n = void 0) {
445
486
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
446
487
  k(
447
488
  e,
448
489
  (o) => {
449
- m(s, {
490
+ f(s, {
450
491
  method: "PUT",
451
492
  headers: {
452
493
  ENO_CSRF_TOKEN: e.token
453
494
  },
454
- onComplete(c) {
455
- const a = JSON.parse(c).data[0].dataelements.ticketURL;
495
+ onComplete(r) {
496
+ const a = JSON.parse(r).data[0].dataelements.ticketURL;
456
497
  t && t(a);
457
498
  },
458
- onFailure(c, i) {
459
- console.warn("☠️ error => ", c, i), n && n(c, i);
499
+ onFailure(r, i) {
500
+ console.warn("☠️ error => ", r, i), n && n(r, i);
460
501
  }
461
502
  });
462
503
  },
@@ -465,9 +506,9 @@ function j(e, t = void 0, n = void 0) {
465
506
  }
466
507
  );
467
508
  }
468
- function Ne(e, t, n, s = void 0, o = void 0) {
469
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- n || (n = e.token), m(c, {
509
+ function Fe(e, t, n, s = void 0, o = void 0) {
510
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
511
+ n || (n = e.token), f(r, {
471
512
  method: "PUT",
472
513
  headers: {
473
514
  ENO_CSRF_TOKEN: n
@@ -476,10 +517,10 @@ function Ne(e, t, n, s = void 0, o = void 0) {
476
517
  let a = JSON.parse(i);
477
518
  if (console.log("☠️ info => ", a), a.success === !0)
478
519
  try {
479
- const r = a.data[0].dataelements.ticketURL;
480
- s && s(r);
481
- } catch (r) {
482
- o && o(r);
520
+ const c = a.data[0].dataelements.ticketURL;
521
+ s && s(c);
522
+ } catch (c) {
523
+ o && o(c);
483
524
  }
484
525
  },
485
526
  onFailure(i) {
@@ -487,40 +528,40 @@ function Ne(e, t, n, s = void 0, o = void 0) {
487
528
  }
488
529
  });
489
530
  }
490
- function X(e, t, n, s, o, c = void 0, i = void 0) {
531
+ function V(e, t, n, s, o, r = void 0, i = void 0) {
491
532
  k(
492
533
  e,
493
534
  t,
494
535
  (a) => {
495
- V(
536
+ W(
496
537
  e,
497
538
  t,
498
539
  n,
499
540
  s,
500
541
  o,
501
542
  a.csrf.value,
502
- c,
543
+ r,
503
544
  i
504
545
  );
505
546
  }
506
547
  );
507
548
  }
508
- function V(e, t, n, s, o, c, i = void 0, a = void 0) {
509
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- m(r, {
549
+ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
550
+ const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
551
+ f(c, {
511
552
  method: "PUT",
512
553
  headers: {
513
- ENO_CSRF_TOKEN: c
554
+ ENO_CSRF_TOKEN: r
514
555
  },
515
556
  onComplete(d, l, p) {
516
- const u = JSON.parse(d).data[0].dataelements, f = new FormData();
517
- f.append("__fcs__jobTicket", u.ticket), f.append("file_0", s, o);
557
+ const u = JSON.parse(d).data[0].dataelements, m = new FormData();
558
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
518
559
  const g = {};
519
- g.method = "POST", g.data = f, g.onComplete = function(h) {
560
+ g.method = "POST", g.data = m, g.onComplete = function(h) {
520
561
  let S = "temp_" + Date.now(), _ = {
521
562
  method: "PUT",
522
563
  headers: {
523
- ENO_CSRF_TOKEN: c
564
+ ENO_CSRF_TOKEN: r
524
565
  },
525
566
  data: JSON.stringify({
526
567
  data: [{
@@ -546,41 +587,41 @@ function V(e, t, n, s, o, c, i = void 0, a = void 0) {
546
587
  a && a(y);
547
588
  }
548
589
  };
549
- m(
590
+ f(
550
591
  e.space + "/resources/v1/modeler/documents",
551
592
  _
552
593
  );
553
594
  }, g.onFailure = function(h) {
554
595
  a && a(h);
555
- }, g.timeout = 0, m(u.ticketURL, g);
596
+ }, g.timeout = 0, f(u.ticketURL, g);
556
597
  }
557
598
  });
558
599
  }
559
- async function ke(e, t, n, s, o = void 0, c = void 0) {
560
- const i = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
600
+ async function ve(e, t, n, s, o = void 0, r = void 0) {
601
+ const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
602
  type: "text/plain"
562
603
  }), p = {
563
604
  url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
605
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
565
606
  };
566
607
  if (!i && i !== "") {
567
608
  console.log("le store._3DSpace est vide");
568
609
  return;
569
610
  }
570
- m(p.url_Ticket, {
611
+ f(p.url_Ticket, {
571
612
  method: "PUT",
572
613
  headers: {
573
614
  ENO_CSRF_TOKEN: a.value
574
615
  },
575
- onComplete(u, f, g) {
616
+ onComplete(u, m, g) {
576
617
  const h = JSON.parse(u).data[0].dataelements;
577
618
  d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
578
619
  const S = {
579
620
  method: "POST",
580
621
  data: d,
581
622
  onComplete(C) {
582
- if (r !== "" && a !== "") {
583
- const D = {
623
+ if (c !== "" && a !== "") {
624
+ const F = {
584
625
  method: "POST",
585
626
  headers: {
586
627
  ENO_CSRF_TOKEN: a,
@@ -603,7 +644,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
603
644
  }
604
645
  }]
605
646
  },
606
- tempId: I()
647
+ tempId: U()
607
648
  }]
608
649
  }),
609
650
  type: "json",
@@ -611,7 +652,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
611
652
  onComplete: _,
612
653
  onFailure: y
613
654
  };
614
- r !== "" && m(p.url_Post, D);
655
+ c !== "" && f(p.url_Post, F);
615
656
  } else
616
657
  console.warn("le store est vide");
617
658
  },
@@ -620,21 +661,21 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
620
661
  function _(C) {
621
662
  console.log("Success -- response ", C.data[0]), o && o(C);
622
663
  }
623
- function y(C, D) {
664
+ function y(C, F) {
624
665
  console.log("Erreur -- response ", C, `
625
- headers `, D), c && c(C);
666
+ headers `, F), r && r(C);
626
667
  }
627
- m(h.ticketURL, S);
668
+ f(h.ticketURL, S);
628
669
  }
629
670
  });
630
671
  }
631
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1) {
672
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0, i = !1) {
632
673
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
- m(a, {
674
+ f(a, {
634
675
  method: "GET",
635
- onComplete(r) {
636
- const d = JSON.parse(r);
637
- let l = "", p, u, f;
676
+ onComplete(c) {
677
+ const d = JSON.parse(c);
678
+ let l = "", p, u, m;
638
679
  if (t) {
639
680
  let g = d.collabspaces.find((h) => h.title === t);
640
681
  if (g) {
@@ -645,44 +686,44 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
645
686
  (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
646
687
  )
647
688
  ), n && (Array.isArray(n) ? n.forEach((S) => {
648
- f || h.forEach((_) => {
689
+ m || h.forEach((_) => {
649
690
  if (S === _.role.name && s === _.organization.title)
650
- f = S, u = s;
691
+ m = S, u = s;
651
692
  else if (S === _.role.name) {
652
693
  let y = h.filter(
653
694
  (C) => C.role.name === S
654
695
  );
655
- y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
696
+ y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : r(y);
656
697
  }
657
698
  });
658
699
  }) : h.forEach((S) => {
659
700
  if (n === S.role.name && s === S.organization.title)
660
- f = n, u = s;
701
+ m = n, u = s;
661
702
  else if (n === S.role.name) {
662
703
  let _ = h.filter(
663
704
  (y) => y.role.name === n
664
705
  );
665
- _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
706
+ _.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : r(_);
666
707
  }
667
708
  }));
668
709
  }
669
710
  }
670
- p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
711
+ p && u && m ? (l = m + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = m + "." + u + "." + p, r(l));
671
712
  },
672
- onFailure(r, d) {
713
+ onFailure(c, d) {
673
714
  console.log("Erreur de récupération du contexte de sécurité. => ", {
674
- err: r,
715
+ err: c,
675
716
  headers: d
676
717
  });
677
718
  }
678
719
  });
679
720
  }
680
- async function v(e, t = void 0, n = void 0) {
721
+ async function I(e, t = void 0, n = void 0) {
681
722
  return (!e.objID || e.objID === "") && console.warn(
682
723
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
683
724
  ), (e.space === "" || !e.space) && console.warn(
684
725
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
685
- ), (e.token === "" || !e.token) && (G(
726
+ ), (e.token === "" || !e.token) && (K(
686
727
  e,
687
728
  (s) => {
688
729
  e.token = s;
@@ -693,58 +734,58 @@ async function v(e, t = void 0, n = void 0) {
693
734
  ), console.warn(
694
735
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
695
736
  )), new Promise((s, o) => {
696
- j(
737
+ D(
697
738
  e,
698
- (c) => {
699
- m(c, {
739
+ (r) => {
740
+ f(r, {
700
741
  headers: {
701
742
  "Content-Type": "application/json",
702
743
  Accept: "application/json"
703
744
  },
704
745
  onComplete(a) {
705
- let r;
746
+ let c;
706
747
  try {
707
- r = JSON.parse(a);
748
+ c = JSON.parse(a);
708
749
  } catch {
709
- r = a;
750
+ c = a;
710
751
  }
711
- t && t(r), s(r);
752
+ t && typeof t == "function" && t(c), s(c);
712
753
  },
713
- onFailure(a, r, d) {
754
+ onFailure(a, c, d) {
714
755
  n && (console.log("error http", a), n({
715
756
  msg: JSON.parse(a),
716
- headers: r,
757
+ headers: c,
717
758
  xhr: d
718
759
  }), o({
719
760
  msg: JSON.parse(a),
720
- headers: r,
761
+ headers: c,
721
762
  xhr: d
722
763
  }));
723
764
  }
724
765
  });
725
766
  },
726
- (c) => {
727
- n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), o(c);
767
+ (r) => {
768
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
728
769
  }
729
770
  );
730
771
  });
731
772
  }
732
- async function W(e, t, n = void 0, s = void 0) {
773
+ async function B(e, t, n = void 0, s = void 0) {
733
774
  let o = [];
734
775
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
776
  for (let a = 0; a < t.length; a += 80) {
736
- const r = t.slice(a, a + 80);
737
- o.push(r);
777
+ const c = t.slice(a, a + 80);
778
+ o.push(c);
738
779
  }
739
780
  const i = (a) => {
740
- B(
781
+ Y(
741
782
  e,
742
783
  o[a],
743
784
  () => {
744
785
  a++, a < o.length && i(a);
745
786
  },
746
- (r) => {
747
- n && n(r);
787
+ (c) => {
788
+ n && n(c);
748
789
  }
749
790
  );
750
791
  };
@@ -752,11 +793,11 @@ async function W(e, t, n = void 0, s = void 0) {
752
793
  } else
753
794
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
795
  }
755
- function B(e, t, n = void 0, s = void 0, o = void 0) {
756
- const c = [];
757
- t.forEach((r) => {
758
- c.push({
759
- id: r
796
+ function Y(e, t, n = void 0, s = void 0, o = void 0) {
797
+ const r = [];
798
+ t.forEach((c) => {
799
+ r.push({
800
+ id: c
760
801
  });
761
802
  });
762
803
  let i = JSON.stringify({
@@ -764,28 +805,28 @@ function B(e, t, n = void 0, s = void 0, o = void 0) {
764
805
  name: "ENO_CSRF_TOKEN",
765
806
  value: e.token
766
807
  },
767
- data: c
808
+ data: r
768
809
  });
769
810
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
770
- m(a, {
811
+ f(a, {
771
812
  method: "PUT",
772
813
  data: i,
773
814
  type: "json",
774
- onComplete(r) {
775
- const d = r.data;
776
- r.success === !0 && (n && n(), d.forEach((l) => {
815
+ onComplete(c) {
816
+ const d = c.data;
817
+ c.success === !0 && (n && n(), d.forEach((l) => {
777
818
  try {
778
819
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
779
- m(u, {
780
- onComplete: (f) => {
820
+ f(u, {
821
+ onComplete: (m) => {
781
822
  s && s({
782
823
  objectId: l.id,
783
824
  fileName: p,
784
- data: JSON.parse(f)
825
+ data: JSON.parse(m)
785
826
  });
786
827
  },
787
- onFailure: (f) => {
788
- console.log("error http", f);
828
+ onFailure: (m) => {
829
+ console.log("error http", m);
789
830
  }
790
831
  });
791
832
  } catch (p) {
@@ -793,15 +834,15 @@ function B(e, t, n = void 0, s = void 0, o = void 0) {
793
834
  }
794
835
  }));
795
836
  },
796
- onFailure(r) {
797
- console.log(r), o && o(r);
837
+ onFailure(c) {
838
+ console.log(c), o && o(c);
798
839
  }
799
840
  });
800
841
  }
801
842
  function De(e, t, n = void 0, s = void 0) {
802
843
  return new Promise((o) => {
803
844
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
804
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
845
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
846
  b(
806
847
  e.space,
807
848
  "ESPACE COMMUN",
@@ -833,12 +874,12 @@ function De(e, t, n = void 0, s = void 0) {
833
874
  s && s(a);
834
875
  }
835
876
  };
836
- m(c, i);
877
+ f(r, i);
837
878
  }
838
879
  });
839
880
  }
840
- function Fe(e, t, n, s = void 0, o = void 0) {
841
- return new Promise((c) => {
881
+ function Ae(e, t, n, s = void 0, o = void 0) {
882
+ return new Promise((r) => {
842
883
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
843
884
  const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
885
  b(
@@ -846,9 +887,9 @@ function Fe(e, t, n, s = void 0, o = void 0) {
846
887
  "ESPACE COMMUN",
847
888
  ["VPLMProjectLeader", "VPLMCreator"],
848
889
  void 0,
849
- (r) => e.ctx = r,
850
- (r) => {
851
- console.log("onError =>", r);
890
+ (c) => e.ctx = c,
891
+ (c) => {
892
+ console.log("onError =>", c);
852
893
  }
853
894
  );
854
895
  let a = {
@@ -866,21 +907,21 @@ function Fe(e, t, n, s = void 0, o = void 0) {
866
907
  }]
867
908
  }),
868
909
  type: "json",
869
- onComplete(r) {
870
- s && s(r);
910
+ onComplete(c) {
911
+ s && s(c);
871
912
  },
872
- onFailure(r) {
873
- o && o(r);
913
+ onFailure(c) {
914
+ o && o(c);
874
915
  }
875
916
  };
876
- m(i, a);
917
+ f(i, a);
877
918
  }
878
919
  });
879
920
  }
880
- function je(e, t, n = void 0, s = void 0) {
921
+ function $e(e, t, n = void 0, s = void 0) {
881
922
  return new Promise((o) => {
882
923
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
883
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
924
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
925
  b(
885
926
  e.space,
886
927
  "ESPACE COMMUN",
@@ -912,14 +953,14 @@ function je(e, t, n = void 0, s = void 0) {
912
953
  s && s(a);
913
954
  }
914
955
  };
915
- m(c, i);
956
+ f(r, i);
916
957
  }
917
958
  });
918
959
  }
919
- function Ae(e, t, n = void 0, s = void 0) {
960
+ function je(e, t, n = void 0, s = void 0) {
920
961
  return new Promise((o) => {
921
962
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
922
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
963
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
964
  b(
924
965
  e.space,
925
966
  "ESPACE COMMUN",
@@ -957,12 +998,12 @@ function Ae(e, t, n = void 0, s = void 0) {
957
998
  s && s(a);
958
999
  }
959
1000
  };
960
- m(c, i);
1001
+ f(r, i);
961
1002
  }
962
1003
  });
963
1004
  }
964
- function $e(e, t, n, s = void 0, o = void 0) {
965
- return new Promise((c) => {
1005
+ function Ue(e, t, n, s = void 0, o = void 0) {
1006
+ return new Promise((r) => {
966
1007
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
967
1008
  const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
1009
  b(
@@ -970,9 +1011,9 @@ function $e(e, t, n, s = void 0, o = void 0) {
970
1011
  "ESPACE COMMUN",
971
1012
  ["VPLMProjectLeader", "VPLMCreator"],
972
1013
  void 0,
973
- (r) => e.ctx = r,
974
- (r) => {
975
- console.log("onError =>", r);
1014
+ (c) => e.ctx = c,
1015
+ (c) => {
1016
+ console.log("onError =>", c);
976
1017
  }
977
1018
  );
978
1019
  let a = {
@@ -995,104 +1036,102 @@ function $e(e, t, n, s = void 0, o = void 0) {
995
1036
  notificationTimeout: 600
996
1037
  }),
997
1038
  type: "json",
998
- onComplete(r) {
999
- s && s(r);
1039
+ onComplete(c) {
1040
+ s && s(c);
1000
1041
  },
1001
- onFailure(r) {
1002
- o && o(r);
1042
+ onFailure(c) {
1043
+ o && o(c);
1003
1044
  }
1004
1045
  };
1005
- m(i, a);
1046
+ f(i, a);
1006
1047
  }
1007
1048
  });
1008
1049
  }
1009
- function Ue(e, t, n, s, o = void 0, c = void 0) {
1010
- return console.log("credentials", e), new Promise(
1011
- (i) => {
1012
- `${e.space}`, JSON.stringify({
1013
- csrf: {
1014
- name: "ENO_CSRF_TOKEN",
1015
- value: e.token
1050
+ function Ie(e, t, n, s, o = void 0, r = void 0) {
1051
+ return console.log("credentials", e), new Promise((i) => {
1052
+ `${e.space}`, JSON.stringify({
1053
+ csrf: {
1054
+ name: "ENO_CSRF_TOKEN",
1055
+ value: e.token
1056
+ },
1057
+ data: [{
1058
+ type: "Workspace",
1059
+ cestamp: "businessobject",
1060
+ relId: t,
1061
+ id: t,
1062
+ dataelements: {
1063
+ personList: "<uuid:5ca25b8e-98d0-46c3-ac43-3faa83c4295a>",
1064
+ eventsList: "NXFolderCreated,NXFolderDeleted,NXContentAdded,NXContentRemoved"
1016
1065
  },
1017
- data: [{
1018
- type: "Workspace",
1019
- cestamp: "businessobject",
1020
- relId: t,
1021
- id: t,
1022
- dataelements: {
1023
- personList: "<uuid:5ca25b8e-98d0-46c3-ac43-3faa83c4295a>",
1024
- eventsList: "NXFolderCreated,NXFolderDeleted,NXContentAdded,NXContentRemoved"
1025
- },
1026
- tenant: e.tenant
1027
- }]
1028
- });
1029
- }
1030
- );
1066
+ tenant: e.tenant
1067
+ }]
1068
+ });
1069
+ });
1031
1070
  }
1032
1071
  //!SECTION
1033
- function Ie(e, t = void 0, n = void 0) {
1072
+ function Re(e, t = void 0, n = void 0) {
1034
1073
  const s = {
1035
1074
  base: `${e.space}`,
1036
1075
  uri: "/resources/bps/cspaces",
1037
1076
  optTenant: `tenant=${e.tenant}`
1038
1077
  }, o = `${s.base}${s.uri}?${s.optTenant}`;
1039
- m(o, {
1078
+ f(o, {
1040
1079
  method: "GET",
1041
1080
  headers: {
1042
1081
  Accept: "application/json,text/javascript,*/*",
1043
1082
  "Content-Type": "application/ds-json"
1044
1083
  },
1045
- onComplete(c, i) {
1046
- const a = JSON.parse(c);
1084
+ onComplete(r, i) {
1085
+ const a = JSON.parse(r);
1047
1086
  t && t(a, i);
1048
1087
  },
1049
- onFailure(c, i, a) {
1050
- n && n({ response: c, headers: i, xhr: a });
1088
+ onFailure(r, i, a) {
1089
+ n && n({ response: r, headers: i, xhr: a });
1051
1090
  }
1052
1091
  });
1053
1092
  }
1054
- function ve(e, t, n, s) {
1055
- j(
1093
+ function Pe(e, t, n, s) {
1094
+ D(
1056
1095
  e.space,
1057
1096
  t,
1058
1097
  (o) => {
1059
- m(o, {
1098
+ f(o, {
1060
1099
  header: { ENO_CSRF_TOKEN: e.token },
1061
- onComplete: (c) => {
1062
- n && n(c);
1100
+ onComplete: (r) => {
1101
+ n && n(r);
1063
1102
  },
1064
- onFailure: (c) => {
1065
- console.log("error http", c), s && s(c);
1103
+ onFailure: (r) => {
1104
+ console.log("error http", r), s && s(r);
1066
1105
  }
1067
1106
  });
1068
1107
  }
1069
1108
  );
1070
1109
  }
1071
- async function Re(e, t, n = void 0, s = void 0) {
1110
+ async function xe(e, t, n = void 0, s = void 0) {
1072
1111
  return new Promise((o) => {
1073
- j(e, t, (c) => {
1074
- m(c, {
1075
- onComplete: (i, a, r) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, r), o),
1076
- onFailure: (i, a, r) => {
1077
- s && s(i, a, r), console.log(i, a?.errormsg);
1112
+ D(e, t, (r) => {
1113
+ f(r, {
1114
+ onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
1115
+ onFailure: (i, a, c) => {
1116
+ s && s(i, a, c), console.log(i, a?.errormsg);
1078
1117
  }
1079
1118
  });
1080
1119
  });
1081
1120
  });
1082
1121
  }
1083
- function Pe(e, t, n, s = void 0, o = void 0) {
1084
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1122
+ function Me(e, t, n, s = void 0, o = void 0) {
1123
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1085
1124
  k(
1086
1125
  e,
1087
1126
  n,
1088
1127
  (i) => {
1089
- 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;
1090
- X(
1128
+ const a = i.data[0].relateddata.files[0].id, c = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1129
+ V(
1091
1130
  e,
1092
1131
  n,
1093
1132
  a,
1094
- c,
1095
1133
  r,
1134
+ c,
1096
1135
  (d) => {
1097
1136
  s && s(d);
1098
1137
  },
@@ -1105,7 +1144,7 @@ function Pe(e, t, n, s = void 0, o = void 0) {
1105
1144
  }
1106
1145
  let R, P;
1107
1146
  const A = [];
1108
- async function xe(e, t = void 0, n = void 0) {
1147
+ async function Le(e, t = void 0, n = void 0) {
1109
1148
  e.objID && e.objID !== "" ? k(
1110
1149
  e,
1111
1150
  (s) => {
@@ -1124,8 +1163,8 @@ async function xe(e, t = void 0, n = void 0) {
1124
1163
  }
1125
1164
  );
1126
1165
  }
1127
- async function Me(e, t = void 0, n = void 0) {
1128
- console.log("getDatasByTenant (getDocuments)", e), await v(
1166
+ async function Je(e, t = void 0, n = void 0) {
1167
+ console.log("getDatasByTenant (getDocuments)", e), await I(
1129
1168
  e,
1130
1169
  (s) => {
1131
1170
  const o = {};
@@ -1136,36 +1175,36 @@ async function Me(e, t = void 0, n = void 0) {
1136
1175
  }
1137
1176
  );
1138
1177
  }
1139
- function Le(e, t = void 0, n = void 0) {
1178
+ function Ee(e, t = void 0, n = void 0) {
1140
1179
  const s = [];
1141
1180
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1142
1181
  console.warn("la liste est vide ou n'est pas un tableau");
1143
1182
  return;
1144
1183
  }
1145
- e.objIds.forEach((o, c) => {
1146
- v(
1184
+ e.objIds.forEach((o, r) => {
1185
+ I(
1147
1186
  e,
1148
1187
  o.objID,
1149
1188
  (i) => {
1150
- s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), Y(e, P)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1189
+ s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1151
1190
  }
1152
1191
  );
1153
1192
  });
1154
1193
  }
1155
- function Y(e, t, n = void 0, s = void 0) {
1156
- W(
1194
+ function q(e, t, n = void 0, s = void 0) {
1195
+ B(
1157
1196
  e,
1158
1197
  R,
1159
1198
  (o) => {
1160
- const c = [...t];
1161
- c.find((i) => i.objectID === o.objectId).data = o.data, P = c, A.push(o.data), n && n(A);
1199
+ const r = [...t];
1200
+ r.find((i) => i.objectID === o.objectId).data = o.data, P = r, A.push(o.data), n && n(A);
1162
1201
  },
1163
1202
  (o) => {
1164
1203
  s && (s(o), console.log(o));
1165
1204
  }
1166
1205
  );
1167
1206
  }
1168
- const q = "FA35FB9B177A280065800EA0000F599C", H = [
1207
+ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1169
1208
  "swym",
1170
1209
  "3dspace",
1171
1210
  "drive",
@@ -1179,17 +1218,17 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
1179
1218
  where: "ds6w:where",
1180
1219
  who: "ds6w:who",
1181
1220
  why: "ds6w:why"
1182
- }, z = {
1183
- objId: q,
1221
+ }, Q = {
1222
+ objId: H,
1184
1223
  pred: "who",
1185
1224
  order_by: "desc",
1186
1225
  tag: "testTag"
1187
1226
  };
1188
- function Je(e, t, n = void 0, s = void 0) {
1189
- const { space: o, tenant: c } = e, { objId: i, pred: a, tag: r } = t, d = {
1227
+ function Ge(e, t, n = void 0, s = void 0) {
1228
+ const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
1190
1229
  uri: "/resources/6w/tags",
1191
1230
  otpCTX: "SecurityContext=preferred",
1192
- optTenant: `tenant=${c}`
1231
+ optTenant: `tenant=${r}`
1193
1232
  }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1194
1233
  tag: [
1195
1234
  {
@@ -1200,12 +1239,12 @@ function Je(e, t, n = void 0, s = void 0) {
1200
1239
  ],
1201
1240
  predicate: x[a],
1202
1241
  object: {
1203
- literal: r
1242
+ literal: c
1204
1243
  }
1205
1244
  }
1206
1245
  ]
1207
1246
  };
1208
- m(l, {
1247
+ f(l, {
1209
1248
  method: "PUT",
1210
1249
  headers: {
1211
1250
  "Content-Type": "application/json",
@@ -1214,14 +1253,14 @@ function Je(e, t, n = void 0, s = void 0) {
1214
1253
  data: JSON.stringify(p),
1215
1254
  onComplete(u) {
1216
1255
  JSON.parse(u);
1217
- const f = {};
1256
+ const m = {};
1218
1257
  setTimeout(() => {
1219
- K(
1258
+ X(
1220
1259
  e,
1221
1260
  i,
1222
1261
  (g) => {
1223
1262
  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;
1224
- f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, Q(
1263
+ m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, Z(
1225
1264
  e,
1226
1265
  t,
1227
1266
  (y) => {
@@ -1239,25 +1278,25 @@ function Je(e, t, n = void 0, s = void 0) {
1239
1278
  );
1240
1279
  }, 2e3);
1241
1280
  },
1242
- onFailure(u, f) {
1281
+ onFailure(u, m) {
1243
1282
  const g = u;
1244
- g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1283
+ g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1245
1284
  }
1246
1285
  });
1247
1286
  }
1248
- function Q(e, t, n = void 0, s = void 0) {
1287
+ function Z(e, t, n = void 0, s = void 0) {
1249
1288
  console.log("obj ", t);
1250
- const o = t.info.name, c = {
1289
+ const o = t.info.name, r = {
1251
1290
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1252
1291
  uri: "/federated/search"
1253
- }, i = `${c.baseUrl}${c.uri}`, a = {
1292
+ }, i = `${r.baseUrl}${r.uri}`, a = {
1254
1293
  "Content-Type": "application/json",
1255
1294
  Accept: "application/json,text/javascript,*/*"
1256
- }, r = I(), d = {
1295
+ }, c = U(), d = {
1257
1296
  with_indexing_date: !0,
1258
1297
  with_synthesis: !0,
1259
1298
  with_nls: !1,
1260
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1299
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1261
1300
  locale: "fr",
1262
1301
  select_predicate: [
1263
1302
  "ds6w:label",
@@ -1295,7 +1334,7 @@ function Q(e, t, n = void 0, s = void 0) {
1295
1334
  }
1296
1335
  },
1297
1336
  select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1298
- order_by: z.order_by,
1337
+ order_by: Q.order_by,
1299
1338
  order_field: "relevance",
1300
1339
  select_snippets: [
1301
1340
  "ds6w:snippet",
@@ -1306,7 +1345,7 @@ function Q(e, t, n = void 0, s = void 0) {
1306
1345
  ],
1307
1346
  nresults: 40,
1308
1347
  start: "0",
1309
- source: H,
1348
+ source: z,
1310
1349
  tenant: e.tenant,
1311
1350
  login: {
1312
1351
  "3dspace": {
@@ -1314,7 +1353,7 @@ function Q(e, t, n = void 0, s = void 0) {
1314
1353
  }
1315
1354
  }
1316
1355
  };
1317
- console.log("dataPattern => ", d), m(i, {
1356
+ console.log("dataPattern => ", d), f(i, {
1318
1357
  method: "POST",
1319
1358
  headers: a,
1320
1359
  data: JSON.stringify(d),
@@ -1328,12 +1367,12 @@ function Q(e, t, n = void 0, s = void 0) {
1328
1367
  }
1329
1368
  });
1330
1369
  }
1331
- function Ee(e, t, n = void 0, s = void 0) {
1332
- const { objId: o, pred: c, tag: i } = t, a = {
1370
+ function Ke(e, t, n = void 0, s = void 0) {
1371
+ const { objId: o, pred: r, tag: i } = t, a = {
1333
1372
  uri: "/resources/6w/tags",
1334
1373
  otpCTX: "SecurityContext=preferred",
1335
1374
  optTenant: `tenant=${e.tenant}`
1336
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1375
+ }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1337
1376
  tag: [
1338
1377
  {
1339
1378
  subject: [
@@ -1341,14 +1380,14 @@ function Ee(e, t, n = void 0, s = void 0) {
1341
1380
  uri: `pid://${o}`
1342
1381
  }
1343
1382
  ],
1344
- predicate: x[c],
1383
+ predicate: x[r],
1345
1384
  object: {
1346
1385
  literal: i
1347
1386
  }
1348
1387
  }
1349
1388
  ]
1350
1389
  };
1351
- m(r, {
1390
+ f(c, {
1352
1391
  method: "DELETE",
1353
1392
  data: JSON.stringify(d),
1354
1393
  headers: {
@@ -1364,20 +1403,20 @@ function Ee(e, t, n = void 0, s = void 0) {
1364
1403
  }
1365
1404
  });
1366
1405
  }
1367
- function Ge(e, t = "", n = void 0, s = void 0) {
1406
+ function Xe(e, t = "", n = void 0, s = void 0) {
1368
1407
  const { space: o } = e;
1369
1408
  if (t === "")
1370
1409
  return;
1371
- const c = {
1410
+ const r = {
1372
1411
  uri: "/resources/v1/modeler/documents"
1373
1412
  }, i = {
1374
1413
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1375
1414
  Accept: "application/json,text/javascript,*/*"
1376
- }, 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}`;
1377
- m(a, {
1415
+ }, a = `${o}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1416
+ f(a, {
1378
1417
  method: "POST",
1379
1418
  headers: i,
1380
- data: r,
1419
+ data: c,
1381
1420
  onComplete(d) {
1382
1421
  n && n(JSON.parse(d));
1383
1422
  },
@@ -1389,8 +1428,8 @@ function Ge(e, t = "", n = void 0, s = void 0) {
1389
1428
  }
1390
1429
  async function w(e, t = void 0, n = void 0) {
1391
1430
  const s = e.space + "/api/index/tk";
1392
- return m(s, {
1393
- onComplete(o, c, i) {
1431
+ return f(s, {
1432
+ onComplete(o, r, i) {
1394
1433
  const a = JSON.parse(o);
1395
1434
  if (t)
1396
1435
  return t(a), e.token = a?.result?.ServerToken;
@@ -1400,7 +1439,7 @@ async function w(e, t = void 0, n = void 0) {
1400
1439
  }
1401
1440
  });
1402
1441
  }
1403
- function Ke(e, t = void 0, n = void 0) {
1442
+ function Ve(e, t = void 0, n = void 0) {
1404
1443
  const s = `${e.space}/api/exalead/whatsnew`, o = {
1405
1444
  params: {
1406
1445
  community_id: null,
@@ -1411,11 +1450,11 @@ function Ke(e, t = void 0, n = void 0) {
1411
1450
  start: 0
1412
1451
  }
1413
1452
  };
1414
- w(e, (c) => {
1415
- m(s, {
1453
+ w(e, (r) => {
1454
+ f(s, {
1416
1455
  method: "POST",
1417
1456
  headers: {
1418
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1457
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1419
1458
  "Content-type": "application/json;charset=UTF-8",
1420
1459
  Accept: "application/json"
1421
1460
  },
@@ -1430,7 +1469,7 @@ function Ke(e, t = void 0, n = void 0) {
1430
1469
  });
1431
1470
  });
1432
1471
  }
1433
- function Xe(e, t = void 0, n = void 0) {
1472
+ function We(e, t = void 0, n = void 0) {
1434
1473
  const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1435
1474
  params: {
1436
1475
  idsToFilterArr: [],
@@ -1440,19 +1479,19 @@ function Xe(e, t = void 0, n = void 0) {
1440
1479
  maxNbOfCommonElements: "5"
1441
1480
  }
1442
1481
  };
1443
- w(e, (c) => {
1444
- m(s, {
1482
+ w(e, (r) => {
1483
+ f(s, {
1445
1484
  method: "POST",
1446
1485
  headers: {
1447
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1486
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1448
1487
  "Content-type": "application/json;charset=UTF-8",
1449
1488
  Accept: "application/json"
1450
1489
  },
1451
1490
  data: JSON.stringify(o),
1452
1491
  type: "json",
1453
1492
  onComplete(i, a) {
1454
- const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1455
- t && t(r, i);
1493
+ const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1494
+ t && t(c, i);
1456
1495
  },
1457
1496
  onFailure(i, a) {
1458
1497
  n && n(i, a);
@@ -1460,50 +1499,50 @@ function Xe(e, t = void 0, n = void 0) {
1460
1499
  });
1461
1500
  });
1462
1501
  }
1463
- function Ve(e, t = void 0, n = void 0) {
1502
+ function Be(e, t = void 0, n = void 0) {
1464
1503
  const s = {
1465
1504
  base: e.space,
1466
1505
  uri: "/api/community/listmycommunities",
1467
1506
  limit: `/limit/${e.limit ? e.limit : 128}`,
1468
1507
  page: `/page/${e.page ? e.page : "1"}`
1469
- }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1508
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1470
1509
  w(e, (i) => {
1471
- m(o, {
1510
+ f(o, {
1472
1511
  method: "GET",
1473
1512
  headers: {
1474
1513
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1475
1514
  },
1476
- onComplete(a, r, d) {
1515
+ onComplete(a, c, d) {
1477
1516
  const p = JSON.parse(a).result;
1478
1517
  let u = 0;
1479
- p.forEach((f) => {
1518
+ p.forEach((m) => {
1480
1519
  const g = {
1481
- description: f.description,
1482
- id: f.id,
1483
- title: f.title,
1484
- owner: f.owner,
1485
- role: f.role,
1486
- access: f.access
1520
+ description: m.description,
1521
+ id: m.id,
1522
+ title: m.title,
1523
+ owner: m.owner,
1524
+ role: m.role,
1525
+ access: m.access
1487
1526
  };
1488
- Z(
1527
+ ee(
1489
1528
  e,
1490
- f.id,
1529
+ m.id,
1491
1530
  (h) => {
1492
- u++, g.members = h, c.push(g), u === p.length && t && t(c);
1531
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1493
1532
  },
1494
1533
  (h) => n(h)
1495
1534
  );
1496
1535
  });
1497
1536
  },
1498
- onFailure(a, r) {
1537
+ onFailure(a, c) {
1499
1538
  const d = a;
1500
- d.status = r.status, d.response = r.errormsg, n && n(d);
1539
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1501
1540
  }
1502
1541
  });
1503
1542
  });
1504
1543
  }
1505
- function Z(e, t, n, s) {
1506
- const o = `${e.space}/api/community/listmembers`, c = {
1544
+ function ee(e, t, n, s) {
1545
+ const o = `${e.space}/api/community/listmembers`, r = {
1507
1546
  params: {
1508
1547
  page: e.page ? e.page : 1,
1509
1548
  limit: e.limit ? e.limit : 50,
@@ -1511,71 +1550,71 @@ function Z(e, t, n, s) {
1511
1550
  }
1512
1551
  };
1513
1552
  w(e, (i) => {
1514
- m(o, {
1553
+ f(o, {
1515
1554
  method: "POST",
1516
1555
  headers: {
1517
1556
  "Content-type": "application/json;charset=UTF-8",
1518
1557
  Accept: "application/json",
1519
1558
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1520
1559
  },
1521
- data: JSON.stringify(c),
1560
+ data: JSON.stringify(r),
1522
1561
  type: "json",
1523
- onComplete(a, r, d) {
1562
+ onComplete(a, c, d) {
1524
1563
  n && n(a);
1525
1564
  },
1526
- onFailure(a, r) {
1565
+ onFailure(a, c) {
1527
1566
  const d = a;
1528
- d.status = r.status, d.response = r.errormsg, s && s(d);
1567
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1529
1568
  }
1530
1569
  });
1531
1570
  });
1532
1571
  }
1533
- function We(e, t = void 0, n = void 0) {
1572
+ function Ye(e, t = void 0, n = void 0) {
1534
1573
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1535
1574
  e.commu_id || (e.commu_id = s);
1536
1575
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1537
- w(e, (c) => {
1538
- m(o, {
1576
+ w(e, (r) => {
1577
+ f(o, {
1539
1578
  method: "GET",
1540
1579
  headers: {
1541
1580
  "Content-type": "application/json;charset=UTF-8",
1542
1581
  Accept: "application/json",
1543
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1582
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1544
1583
  },
1545
1584
  onComplete(i) {
1546
1585
  const a = JSON.parse(i);
1547
1586
  t && t(a);
1548
1587
  },
1549
1588
  onFailure(i, a) {
1550
- const r = i;
1551
- r.status = a.status, r.response = a.errormsg, n && n(r);
1589
+ const c = i;
1590
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1552
1591
  }
1553
1592
  });
1554
1593
  });
1555
1594
  }
1556
- function Be(e, t, n = void 0, s = void 0) {
1557
- const { listAllContacts: o, currentUser: c } = e;
1595
+ function qe(e, t, n = void 0, s = void 0) {
1596
+ const { listAllContacts: o, currentUser: r } = e;
1558
1597
  console.log("__listAllContacts", o.hits);
1559
1598
  const i = `${e.space}/api/directmessages`, a = {
1560
- users: [c.login].concat(t.receipt)
1561
- }, r = {
1599
+ users: [r.login].concat(t.receipt)
1600
+ }, c = {
1562
1601
  id_msg: "",
1563
1602
  senderId: e.currentUser.login,
1564
1603
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1565
- msg: te(t.msg)
1604
+ msg: ne(t.msg)
1566
1605
  };
1567
1606
  let d = !1;
1568
- ee(
1607
+ te(
1569
1608
  a.users,
1570
1609
  (l) => {
1571
- l !== void 0 && (r.id_msg = l.id, d = !0, $(e, r));
1610
+ l !== void 0 && (c.id_msg = l.id, d = !0, $(e, c));
1572
1611
  },
1573
1612
  (l) => {
1574
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1613
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1575
1614
  }
1576
1615
  ), d === !1 && setTimeout(() => {
1577
1616
  d === !1 && w(e, (l) => {
1578
- m(i, {
1617
+ f(i, {
1579
1618
  method: "POST",
1580
1619
  headers: {
1581
1620
  "Content-Type": "application/json",
@@ -1584,11 +1623,11 @@ function Be(e, t, n = void 0, s = void 0) {
1584
1623
  },
1585
1624
  data: JSON.stringify(a),
1586
1625
  type: "json",
1587
- onComplete(p, u, f) {
1626
+ onComplete(p, u, m) {
1588
1627
  const g = p;
1589
- g.reponse = JSON.parse(f.response), g.status = f.status, n && n(g), r.id_msg = g.result.id, $(e, r);
1628
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, $(e, c);
1590
1629
  },
1591
- onFailure(p, u, f) {
1630
+ onFailure(p, u, m) {
1592
1631
  const g = p;
1593
1632
  g.msg = u.errormsg, g.status = u.status, s && s(g);
1594
1633
  }
@@ -1596,24 +1635,24 @@ function Be(e, t, n = void 0, s = void 0) {
1596
1635
  });
1597
1636
  }, 500);
1598
1637
  }
1599
- function ee(e, t, n, s) {
1638
+ function te(e, t, n, s) {
1600
1639
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1601
- w(e, (c) => {
1602
- m(o, {
1640
+ w(e, (r) => {
1641
+ f(o, {
1603
1642
  method: "GET",
1604
1643
  headers: {
1605
1644
  Accept: "application/json,text/javascript,*/*",
1606
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1645
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1607
1646
  },
1608
1647
  onComplete(i) {
1609
- const a = JSON.parse(i), r = [];
1648
+ const a = JSON.parse(i), c = [];
1610
1649
  a.result.forEach((p) => {
1611
- p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
1650
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1612
1651
  });
1613
- const d = t.sort(), l = r.find((p) => {
1652
+ const d = t.sort(), l = c.find((p) => {
1614
1653
  const u = [];
1615
- return p.users.forEach((f) => {
1616
- u.push(f.login);
1654
+ return p.users.forEach((m) => {
1655
+ u.push(m.login);
1617
1656
  }), JSON.stringify(u) === JSON.stringify(d);
1618
1657
  });
1619
1658
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
@@ -1631,7 +1670,7 @@ function $(e, t, n = void 0, s = void 0) {
1631
1670
  uri: "/api/community",
1632
1671
  id_msg: `${t.id_msg}`,
1633
1672
  endUri: "/instantmessages"
1634
- }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1673
+ }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1635
1674
  author: { login: t.senderId, displayName: t.senderName },
1636
1675
  accessState: null,
1637
1676
  commentUri: null,
@@ -1641,8 +1680,8 @@ function $(e, t, n = void 0, s = void 0) {
1641
1680
  parentCommentUri: null,
1642
1681
  richMessage: t.msg
1643
1682
  };
1644
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1645
- m(c, {
1683
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1684
+ f(r, {
1646
1685
  method: "POST",
1647
1686
  headers: {
1648
1687
  "Content-Type": "application/json",
@@ -1651,25 +1690,25 @@ function $(e, t, n = void 0, s = void 0) {
1651
1690
  },
1652
1691
  data: JSON.stringify(i),
1653
1692
  type: "json",
1654
- onComplete(r, d, l) {
1655
- const p = r;
1693
+ onComplete(c, d, l) {
1694
+ const p = c;
1656
1695
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1657
1696
  },
1658
- onFailure(r, d) {
1659
- const l = r;
1697
+ onFailure(c, d) {
1698
+ const l = c;
1660
1699
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1661
1700
  }
1662
1701
  });
1663
1702
  });
1664
1703
  }
1665
- function te(e) {
1704
+ function ne(e) {
1666
1705
  const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1667
1706
  return `<p>${e} </p>
1668
1707
  <br/>
1669
1708
  <hr/>
1670
1709
  <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1671
1710
  }
1672
- const ne = {
1711
+ const se = {
1673
1712
  title: "TEST DEV COMMUNITY IDEA",
1674
1713
  // titre du post
1675
1714
  community_id: "YXdA5x4DSUKtlAi2wmnyTA",
@@ -1679,82 +1718,82 @@ const ne = {
1679
1718
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1680
1719
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1681
1720
  };
1682
- function Ye(e, t, n = void 0, s = void 0) {
1683
- const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1684
- (r) => r.id === t.community_id
1721
+ function He(e, t, n = void 0, s = void 0) {
1722
+ const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1723
+ (c) => c.id === t.community_id
1685
1724
  ), i = e.swymCommunities.find(
1686
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1725
+ (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1687
1726
  ), a = {
1688
1727
  params: {
1689
1728
  title: t.title,
1690
1729
  // String, le nom de l'affaire
1691
- community_id: c?.id !== void 0 ? c.id : i.id,
1730
+ community_id: r?.id !== void 0 ? r.id : i.id,
1692
1731
  // String, l'id de la communauté
1693
- message: se(t.text_html),
1732
+ message: ae(t.text_html),
1694
1733
  // STRING => le contenue du message doit être au format HTML
1695
1734
  published: 1
1696
1735
  // 1 publier, 0 non publier
1697
1736
  }
1698
1737
  };
1699
- w(e, (r) => {
1738
+ w(e, (c) => {
1700
1739
  const d = {
1701
1740
  "Content-type": "application/json;charset=UTF-8",
1702
1741
  Accept: "application/json",
1703
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1742
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1704
1743
  };
1705
- m(o, {
1744
+ f(o, {
1706
1745
  method: "POST",
1707
1746
  headers: d,
1708
1747
  data: JSON.stringify(a),
1709
1748
  type: "json",
1710
1749
  onComplete(l, p, u) {
1711
- const f = JSON.parse(l);
1712
- f.status = u.status, f.response = u.response, n && n(f);
1750
+ const m = JSON.parse(l);
1751
+ m.status = u.status, m.response = u.response, n && n(m);
1713
1752
  },
1714
1753
  onFailure(l, p, u) {
1715
- const f = l;
1716
- f.status = p.status, f.response = p.errormsg, s && s(f);
1754
+ const m = l;
1755
+ m.status = p.status, m.response = p.errormsg, s && s(m);
1717
1756
  }
1718
1757
  });
1719
1758
  });
1720
1759
  }
1721
- function qe(e, t, n = void 0, s = void 0) {
1722
- const o = `${e.space}/api/idea/delete`, c = {
1760
+ function ze(e, t, n = void 0, s = void 0) {
1761
+ const o = `${e.space}/api/idea/delete`, r = {
1723
1762
  params: {
1724
1763
  community_id: t.community_id,
1725
1764
  ideationIds: [t.idee_id]
1726
1765
  }
1727
1766
  };
1728
1767
  w(e, (i) => {
1729
- m(o, {
1768
+ f(o, {
1730
1769
  method: "POST",
1731
1770
  headers: {
1732
1771
  "Content-type": "application/json;charset=UTF-8",
1733
1772
  Accept: "application/json",
1734
1773
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1735
1774
  },
1736
- data: JSON.stringify(c),
1775
+ data: JSON.stringify(r),
1737
1776
  type: "json",
1738
- onComplete(a, r, d) {
1777
+ onComplete(a, c, d) {
1739
1778
  n && n(a);
1740
1779
  },
1741
- onFailure(a, r, d) {
1780
+ onFailure(a, c, d) {
1742
1781
  const l = a;
1743
- l.status = r.status, l.response = r.errormsg, s && s(l);
1782
+ l.status = c.status, l.response = c.errormsg, s && s(l);
1744
1783
  }
1745
1784
  });
1746
1785
  });
1747
1786
  }
1748
- function He(e, t = "", n = void 0, s = void 0) {
1787
+ function Qe(e, t = "", n = void 0, s = void 0) {
1749
1788
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1750
1789
  t === "" && (t = o);
1751
- const c = `${e.space}/api/idea/get`, i = {
1790
+ const r = `${e.space}/api/idea/get`, i = {
1752
1791
  params: {
1753
1792
  id: t
1754
1793
  }
1755
1794
  };
1756
1795
  w(e, (a) => {
1757
- m(c, {
1796
+ f(r, {
1758
1797
  method: "POST",
1759
1798
  headers: {
1760
1799
  "Content-type": "application/json;charset=UTF-8",
@@ -1763,41 +1802,41 @@ function He(e, t = "", n = void 0, s = void 0) {
1763
1802
  },
1764
1803
  data: JSON.stringify(i),
1765
1804
  type: "json",
1766
- onComplete(r) {
1767
- const d = r;
1805
+ onComplete(c) {
1806
+ const d = c;
1768
1807
  d.msg = d.result.message, n && n(d);
1769
1808
  },
1770
- onFailure(r) {
1771
- const d = r;
1809
+ onFailure(c) {
1810
+ const d = c;
1772
1811
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1773
1812
  }
1774
1813
  });
1775
1814
  });
1776
1815
  }
1777
- function ze(e, t = ne, n = void 0, s = void 0) {
1816
+ function Ze(e, t = se, n = void 0, s = void 0) {
1778
1817
  const o = {
1779
1818
  uri: "/api/idea/list",
1780
1819
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1781
1820
  limit: `/limit/${t.limit ? t.limit : 10}`
1782
- }, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
1821
+ }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1783
1822
  w(e, (i) => {
1784
- m(c, {
1823
+ f(r, {
1785
1824
  method: "GET",
1786
1825
  headers: {
1787
1826
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1788
1827
  },
1789
1828
  onComplete(a) {
1790
- const r = JSON.parse(a);
1791
- n && n(r);
1829
+ const c = JSON.parse(a);
1830
+ n && n(c);
1792
1831
  },
1793
- onFailure(a, r) {
1832
+ onFailure(a, c) {
1794
1833
  const d = a;
1795
- d.status = r.status, d.response = r.errormsg, s && s(d);
1834
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1796
1835
  }
1797
1836
  });
1798
1837
  });
1799
1838
  }
1800
- function se(e) {
1839
+ function ae(e) {
1801
1840
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1802
1841
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1803
1842
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -1872,34 +1911,34 @@ function se(e) {
1872
1911
  <p>
1873
1912
  </p>` : e;
1874
1913
  }
1875
- function Qe(e, t = void 0, n = void 0) {
1914
+ function et(e, t = void 0, n = void 0) {
1876
1915
  const s = e.space + "/api/user/getcurrent/";
1877
1916
  w(e, (o) => {
1878
- m(s, {
1917
+ f(s, {
1879
1918
  method: "GET",
1880
1919
  headers: {
1881
1920
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1882
1921
  },
1883
- onComplete(c, i, a) {
1884
- const r = JSON.parse(c);
1885
- t && t(r.result);
1922
+ onComplete(r, i, a) {
1923
+ const c = JSON.parse(r);
1924
+ t && t(c.result);
1886
1925
  },
1887
- onFailure(c, i, a) {
1888
- const r = { erreur: JSON.parse(c), headers: i, xhr: a };
1889
- n && n(r);
1926
+ onFailure(r, i, a) {
1927
+ const c = { erreur: JSON.parse(r), headers: i, xhr: a };
1928
+ n && n(c);
1890
1929
  }
1891
1930
  });
1892
1931
  });
1893
1932
  }
1894
- function Ze(e, t, n = void 0, s = void 0) {
1933
+ function tt(e, t, n = void 0, s = void 0) {
1895
1934
  const o = e.space + "/api/user/find/login/" + t;
1896
1935
  w(
1897
1936
  e,
1898
- (c) => {
1899
- m(o, {
1937
+ (r) => {
1938
+ f(o, {
1900
1939
  method: "GET",
1901
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1902
- onComplete(i, a, r) {
1940
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1941
+ onComplete(i, a, c) {
1903
1942
  const d = JSON.parse(i);
1904
1943
  n && n(d);
1905
1944
  },
@@ -1911,11 +1950,24 @@ function Ze(e, t, n = void 0, s = void 0) {
1911
1950
  s
1912
1951
  );
1913
1952
  }
1914
- function et(e) {
1953
+ function nt(e, t = void 0, n = void 0) {
1954
+ e.tenant && E(e, (s) => {
1955
+ const o = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", i = `${o}/login/?service=${r}/auth/cas`;
1956
+ f(i, {
1957
+ onComplete(a, c) {
1958
+ console.log("response", a), console.log("headers", c);
1959
+ },
1960
+ onFailure(a) {
1961
+ n && n(a);
1962
+ }
1963
+ });
1964
+ });
1965
+ }
1966
+ function st(e) {
1915
1967
  const t = "Hello " + e;
1916
1968
  return console.log(t), t;
1917
1969
  }
1918
- function tt(e, t = void 0, n = void 0) {
1970
+ function at(e, t = void 0, n = void 0) {
1919
1971
  return console.log("credentials", e), new Promise((s) => {
1920
1972
  if (e.token === "" && T(e), !e.space || e.space === "") {
1921
1973
  const i = J();
@@ -1932,14 +1984,14 @@ function tt(e, t = void 0, n = void 0) {
1932
1984
  },
1933
1985
  !0
1934
1986
  );
1935
- const o = N.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1936
- m(c, {
1987
+ const o = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1988
+ f(r, {
1937
1989
  onComplete(i) {
1938
1990
  if (Array.isArray(JSON.parse(i))) {
1939
1991
  const a = JSON.parse(i);
1940
1992
  console.log("serviceId=3dsearch", a);
1941
- const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1942
- m(r, {
1993
+ const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1994
+ f(c, {
1943
1995
  method: "POST",
1944
1996
  headers: {
1945
1997
  Accept: "application/json",
@@ -1995,75 +2047,78 @@ function tt(e, t = void 0, n = void 0) {
1995
2047
  });
1996
2048
  }
1997
2049
  export {
1998
- I as UUID,
1999
- tt as _3DSearch_usersGroup,
2000
- ke as _3DSpace_Create_Doc,
2001
- Ue as _3DSpace_bookmark_addSubsciptions,
2050
+ U as UUID,
2051
+ at as _3DSearch_usersGroup,
2052
+ ve as _3DSpace_Create_Doc,
2053
+ Ie as _3DSpace_bookmark_addSubsciptions,
2002
2054
  T as _3DSpace_csrf,
2003
- v as _3DSpace_download_doc,
2004
- W as _3DSpace_download_multidoc,
2005
- X as _3DSpace_file_update,
2006
- V as _3DSpace_file_update_csr,
2007
- Ne as _3DSpace_file_url_csr,
2055
+ I as _3DSpace_download_doc,
2056
+ B as _3DSpace_download_multidoc,
2057
+ V as _3DSpace_file_update,
2058
+ W as _3DSpace_file_update_csr,
2059
+ Fe as _3DSpace_file_url_csr,
2008
2060
  k as _3DSpace_get_csrf,
2009
- K as _3DSpace_get_docInfo,
2010
- B as _3DSpace_get_downloadTicket_multidoc,
2061
+ X as _3DSpace_get_docInfo,
2062
+ Y as _3DSpace_get_downloadTicket_multidoc,
2011
2063
  b as _3DSpace_get_securityContexts,
2012
- j as _3DSpace_get_ticket,
2013
- $e as _3DSpace_lifecycle_changeRevision,
2014
- Fe as _3DSpace_lifecycle_changeState,
2015
- je as _3DSpace_lifecycle_getGraph,
2016
- Ae as _3DSpace_lifecycle_getNextRevision,
2064
+ D as _3DSpace_get_ticket,
2065
+ Ue as _3DSpace_lifecycle_changeRevision,
2066
+ Ae as _3DSpace_lifecycle_changeState,
2067
+ $e as _3DSpace_lifecycle_getGraph,
2068
+ je as _3DSpace_lifecycle_getNextRevision,
2017
2069
  De as _3DSpace_lifecycle_getNextStates,
2018
- Be as _3DSwym_buildDirectMessage,
2019
- qe as _3DSwym_deleteIdea,
2020
- ee as _3DSwym_findCommunityToInstantMSG,
2021
- Ve as _3DSwym_getAllCommunities,
2022
- Ke as _3DSwym_getAllNews,
2023
- Xe as _3DSwym_getFamiliarPeople,
2024
- We as _3DSwym_getIdeaStatusMaturity,
2025
- Z as _3DSwym_getMembersCommunity,
2026
- He as _3DSwym_getSWYMIdea,
2027
- ze as _3DSwym_get_AllSWYMIdeas,
2028
- Qe as _3DSwym_get_currentUser,
2029
- Ze as _3DSwym_get_findUser,
2070
+ qe as _3DSwym_buildDirectMessage,
2071
+ ze as _3DSwym_deleteIdea,
2072
+ te as _3DSwym_findCommunityToInstantMSG,
2073
+ Be as _3DSwym_getAllCommunities,
2074
+ Ve as _3DSwym_getAllNews,
2075
+ We as _3DSwym_getFamiliarPeople,
2076
+ Ye as _3DSwym_getIdeaStatusMaturity,
2077
+ ee as _3DSwym_getMembersCommunity,
2078
+ Qe as _3DSwym_getSWYMIdea,
2079
+ Ze as _3DSwym_get_AllSWYMIdeas,
2080
+ et as _3DSwym_get_currentUser,
2081
+ tt as _3DSwym_get_findUser,
2030
2082
  w as _3DSwym_get_version,
2031
- Ye as _3DSwym_postIdea,
2083
+ He as _3DSwym_postIdea,
2032
2084
  $ as _3DSwym_sendMessageData,
2033
- Se as _AppMngt_get_info_user,
2034
- he as _AppMngt_get_users,
2085
+ ye as _AppMngt_get_info_user,
2086
+ _e as _AppMngt_get_users,
2087
+ nt as _Iterop_Auth_CAS,
2035
2088
  J as _getPlateformInfos,
2036
- me as _getPlatformServices,
2037
- m as _httpCallAuthenticated,
2038
- pe as _setDraggable,
2039
- fe as _setDroppable,
2040
- ue as _setupTagger,
2041
- Je as addTagToDoc,
2042
- ge as compass_getListAdditionalApps,
2089
+ ge as _getPlatformServices,
2090
+ E as _getServiceUrl,
2091
+ he as _getServiceUrl_3DPassport,
2092
+ f as _httpCallAuthenticated,
2093
+ ue as _setDraggable,
2094
+ me as _setDroppable,
2095
+ fe as _setupTagger,
2096
+ Ge as addTagToDoc,
2097
+ Se as compass_getListAdditionalApps,
2043
2098
  L as couleurs,
2044
- _e as createUserGroups,
2045
- Y as dataMixing,
2046
- Ce as deleteUserGroups,
2047
- ce as findAdresse,
2048
- Ie as getAllContextSecurity,
2049
- G as getCSRFToken,
2050
- re as getCommunes,
2051
- ye as getComplementUG,
2052
- ve as getDataFrom3DSpace,
2053
- de as getDataFromGouvFr,
2054
- Me as getDatasByTenant,
2055
- Le as getDatasFrom3DSpace,
2056
- Re as getDownloadDocument,
2057
- Ge as getInfoDocTags,
2058
- we as getUserGroupsList,
2059
- E as getUsersGroupRules,
2060
- xe as get_3DSpace_csrf,
2061
- Te as patchUserGroups,
2062
- Oe as patchUserGroupsControl,
2063
- Pe as pushDataIn3DSpace,
2064
- be as readUserGroupControl,
2065
- Ee as removeTagToDoc,
2066
- et as sayHello,
2067
- le as updateEvent
2099
+ we as createUserGroups,
2100
+ q as dataMixing,
2101
+ Oe as deleteUserGroups,
2102
+ de as findAdresse,
2103
+ Re as getAllContextSecurity,
2104
+ K as getCSRFToken,
2105
+ ce as getCommunes,
2106
+ Ce as getComplementUG,
2107
+ Pe as getDataFrom3DSpace,
2108
+ le as getDataFromGouvFr,
2109
+ Je as getDatasByTenant,
2110
+ Ee as getDatasFrom3DSpace,
2111
+ xe as getDownloadDocument,
2112
+ Xe as getInfoDocTags,
2113
+ Te as getUserGroupsList,
2114
+ G as getUsersGroupRules,
2115
+ Le as get_3DSpace_csrf,
2116
+ be as patchUserGroups,
2117
+ Ne as patchUserGroupsControl,
2118
+ Me as pushDataIn3DSpace,
2119
+ ke as readUserGroupControl,
2120
+ Ke as removeTagToDoc,
2121
+ st as sayHello,
2122
+ pe as updateEvent
2068
2123
  };
2069
2124
  //# sourceMappingURL=wb3Api.js.map