@beam3_dev/api_module 0.0.323 → 0.0.325

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
@@ -34,7 +34,7 @@ const z = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function Ue(e, t = void 0, n = void 0) {
37
+ async function Ue(e, n = void 0, t = void 0) {
38
38
  const s = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
@@ -45,12 +45,12 @@ async function Ue(e, t = void 0, n = void 0) {
45
45
  }
46
46
  }
47
47
  ).then((i) => i.json()).then((i) => {
48
- t && t(i);
48
+ n && n(i);
49
49
  }).catch((i) => {
50
- n && n(i), console.error("Erreur : " + i);
50
+ t && t(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function xe(e, t = void 0, n = void 0) {
53
+ async function xe(e, n = void 0, t = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -60,18 +60,18 @@ async function xe(e, t = void 0, n = void 0) {
60
60
  }
61
61
  }
62
62
  ).then((s) => s.json()).then((s) => {
63
- t && t(s);
63
+ n && n(s);
64
64
  }).catch((s) => {
65
- n && n(s), console.error("Erreur : " + s);
65
+ t && t(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
- async function Ie(e, t = z) {
69
- let n = O.now().year;
68
+ async function Ie(e, n = z) {
69
+ let t = O.now().year;
70
70
  const s = e, i = [], r = (a) => {
71
71
  for (let c in a)
72
72
  i.push({ date: c, comment: a[c] });
73
73
  };
74
- for (let a = n; a <= n + 1; a++)
74
+ for (let a = t; a <= t + 1; a++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
77
77
  {
@@ -94,13 +94,13 @@ async function Ie(e, t = z) {
94
94
  name: "Férié : " + c.comment,
95
95
  start: O.fromISO(c.date).toISODate(),
96
96
  end: O.fromISO(c.date).toISODate(),
97
- color: t.b3BusinnessDays,
97
+ color: n.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- function H(e, t, n) {
103
+ function H(e, n, t) {
104
104
  const { credentials: s, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
@@ -109,14 +109,14 @@ function H(e, t, n) {
109
109
  Q(
110
110
  { credentials: s, chunks: a, initLoop: 0, fn: o },
111
111
  (c) => {
112
- t && t(c);
112
+ n && n(c);
113
113
  },
114
114
  (c) => {
115
- n && n(c);
115
+ t && t(c);
116
116
  }
117
117
  );
118
118
  }
119
- function Q(e, t, n) {
119
+ function Q(e, n, t) {
120
120
  const { credentials: s, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
121
121
  o(
122
122
  s,
@@ -125,57 +125,57 @@ function Q(e, t, n) {
125
125
  c++, c < i.length && a(c);
126
126
  },
127
127
  (d) => {
128
- t && t(d);
128
+ n && n(d);
129
129
  },
130
130
  (d) => {
131
- n && n(d);
131
+ t && t(d);
132
132
  }
133
133
  );
134
134
  };
135
135
  a(r);
136
136
  }
137
- async function Ne(e, t, n = !0) {
138
- const s = e.events.findIndex((i) => i.uuid === t.uuid);
139
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
137
+ async function Re(e, n, t = !0) {
138
+ const s = e.events.findIndex((i) => i.uuid === n.uuid);
139
+ return s === -1 ? e.events.push(n) : t ? e.events[s] = n : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
140
140
  }
141
- function m(e, t) {
142
- $(["DS/WAFData/WAFData"], (n) => {
143
- n.authenticatedRequest(e, t);
141
+ function m(e, n) {
142
+ $(["DS/WAFData/WAFData"], (t) => {
143
+ t.authenticatedRequest(e, n);
144
144
  });
145
145
  }
146
- function Re(e, t, n) {
146
+ function Ne(e, n, t) {
147
147
  $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
148
148
  s.draggable(e, {
149
- data: t,
150
- start: n
149
+ data: n,
150
+ start: t
151
151
  });
152
152
  });
153
153
  }
154
- function Fe(e, t = void 0) {
155
- $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
154
+ function Fe(e, n = void 0) {
155
+ $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (t) => {
156
156
  let s;
157
- s === void 0 && (s = n.createProxy({
157
+ s === void 0 && (s = t.createProxy({
158
158
  widgetId: L.id,
159
159
  filteringMode: "WithFilteringServices"
160
- }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
160
+ }), n !== void 0 && s.addEvent("onFilterSubjectsChange", n)), s.setSubjectsTags(e);
161
161
  });
162
162
  }
163
- function je(e, t) {
164
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
165
- n.droppable(e, {
166
- drop: t
163
+ function je(e, n) {
164
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (t) => {
165
+ t.droppable(e, {
166
+ drop: n
167
167
  });
168
168
  });
169
169
  }
170
- async function ke(e, t = void 0, n = void 0) {
170
+ async function ke(e, n = void 0, t = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
173
  (s) => {
174
- (!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
174
+ (!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), n && n(
175
175
  s.getPlatformServices({
176
176
  platformId: e,
177
- onComplete: t,
178
- onFailure: n
177
+ onComplete: n,
178
+ onFailure: t
179
179
  })
180
180
  );
181
181
  }
@@ -183,33 +183,33 @@ async function ke(e, t = void 0, n = void 0) {
183
183
  }
184
184
  function Z() {
185
185
  let e = {};
186
- return $(["DS/PlatformAPI/PlatformAPI"], (t) => {
187
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
186
+ return $(["DS/PlatformAPI/PlatformAPI"], (n) => {
187
+ const t = n.getTenant(), s = n.getUser(), i = n.getAllApplicationConfigurations(), r = n.getApplicationConfiguration(
188
188
  "com.3ds.wp.passport.cors"
189
189
  );
190
190
  e = {
191
- tenant: n,
191
+ tenant: t,
192
192
  user: s,
193
193
  appsConfiguration: i,
194
194
  appConf: r
195
195
  };
196
196
  }), console.log("%cRETOUR API :", "color:blue", e), e;
197
197
  }
198
- function De(e, t = void 0, n = void 0) {
198
+ function De(e, n = void 0, t = void 0) {
199
199
  if (e.tenant) {
200
200
  const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
201
  m(s, {
202
202
  onComplete(i) {
203
203
  const r = typeof i == "string" ? JSON.parse(i) : i;
204
- r && "fields" in r ? t && t(r.fields) : n && n("_getMe return not find properties fields");
204
+ r && "fields" in r ? n && n(r.fields) : t && t("_getMe return not find properties fields");
205
205
  },
206
206
  onFailure(i) {
207
- n && n("_getMe return error", i);
207
+ t && t("_getMe return error", i);
208
208
  }
209
209
  });
210
210
  }
211
211
  }
212
- function M(e, t = void 0, n = void 0) {
212
+ function M(e, n = void 0, t = void 0) {
213
213
  if (console.log("_getServiceUrl"), e.tenant) {
214
214
  const s = `https://${e.tenant.toLowerCase()}-eu1-compass.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?platform=${e.tenant.toUpperCase()}&cors=true&xrequestedwith=xmlhttprequest`;
215
215
  m(s, {
@@ -217,17 +217,17 @@ function M(e, t = void 0, n = void 0) {
217
217
  const r = typeof i == "string" ? JSON.parse(i) : i;
218
218
  if (r && "platforms" in r) {
219
219
  const o = r.platforms.find((a) => a.id === e.tenant.toUpperCase());
220
- t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
220
+ n && o ? n(o) : t && t("_getServiceUrl return listServiceUrl = undefined");
221
221
  } else
222
- n && n("_getServiceUrl return oResponse = undefined");
222
+ t && t("_getServiceUrl return oResponse = undefined");
223
223
  },
224
224
  onFailure(i) {
225
- n && n(i);
225
+ t && t(i);
226
226
  }
227
227
  });
228
228
  }
229
229
  }
230
- function ve(e, t = void 0, n = void 0) {
230
+ function ve(e, n = void 0, t = void 0) {
231
231
  if (e.tenant) {
232
232
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
233
  m(s, {
@@ -235,16 +235,16 @@ function ve(e, t = void 0, n = void 0) {
235
235
  const r = JSON.parse(i);
236
236
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
237
237
  const o = `${r[0].services[0].url}`;
238
- t && t(o);
238
+ n && n(o);
239
239
  }
240
240
  },
241
241
  onFailure(i) {
242
- n && n(i);
242
+ t && t(i);
243
243
  }
244
244
  });
245
245
  }
246
246
  }
247
- function Ae(e, t, n) {
247
+ function Ae(e, n, t) {
248
248
  const s = {
249
249
  base: `${e.space}`,
250
250
  uri: "/resources/AppsMngt/api/custom/applications",
@@ -262,33 +262,33 @@ function Ae(e, t, n) {
262
262
  const u = p.attributes.name, f = p.id;
263
263
  return { name: u, id: f };
264
264
  });
265
- t && t(d, c);
265
+ n && n(d, c);
266
266
  },
267
267
  onFailure(r, o) {
268
268
  const a = r;
269
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
269
+ a.msg = o.errormsg, a.errCode = o.errorcode, t && t(a);
270
270
  }
271
271
  });
272
272
  }
273
- function Pe(e, t = void 0, n = void 0) {
273
+ function Pe(e, n = void 0, t = void 0) {
274
274
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
275
275
  m(s, {
276
276
  onComplete(i, r, o) {
277
277
  const a = JSON.parse(i);
278
- console.log("_AppMngt_get_users => ", a), t && t(a);
278
+ console.log("_AppMngt_get_users => ", a), n && n(a);
279
279
  },
280
280
  onFailure(i, r) {
281
281
  const o = i;
282
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
282
+ o.msg = r.errormsg, o.errCode = r.errorcode, t && t(o);
283
283
  }
284
284
  });
285
285
  }
286
- function Le(e, t, n = void 0, s = void 0) {
287
- let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
286
+ function Le(e, n, t = void 0, s = void 0) {
287
+ let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${n}`;
288
288
  m(i, {
289
289
  onComplete(r, o, a) {
290
290
  const c = JSON.parse(r);
291
- n && n(c);
291
+ t && t(c);
292
292
  },
293
293
  onFailure(r, o) {
294
294
  const a = r;
@@ -300,18 +300,18 @@ const j = {
300
300
  "Content-Type": "application/json",
301
301
  Accept: "application/json,text/javascript,*/*"
302
302
  };
303
- function Me(e, t, n = void 0, s = void 0) {
303
+ function Me(e, n, t = void 0, s = void 0) {
304
304
  const { space: i, currentUser: r } = e, a = `${i}${{
305
305
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
306
306
  }.URIUGr}`, c = {
307
307
  groups: [
308
308
  {
309
- title: t.title,
310
- description: t.description,
311
- members: t.members || [r.email, "samuel.mureau@beam3.fr"],
309
+ title: n.title,
310
+ description: n.description,
311
+ members: n.members || [r.email, "samuel.mureau@beam3.fr"],
312
312
  pending_members: [],
313
- sharing: t.sharing,
314
- visibility: t.visibility
313
+ sharing: n.sharing,
314
+ visibility: n.visibility
315
315
  }
316
316
  ]
317
317
  };
@@ -320,7 +320,7 @@ function Me(e, t, n = void 0, s = void 0) {
320
320
  headers: j,
321
321
  data: JSON.stringify(c),
322
322
  onComplete(d) {
323
- n && n(JSON.parse(d));
323
+ t && t(JSON.parse(d));
324
324
  },
325
325
  onFailure(d, p) {
326
326
  console.log(d);
@@ -329,8 +329,8 @@ function Me(e, t, n = void 0, s = void 0) {
329
329
  }
330
330
  });
331
331
  }
332
- function Je(e, t, n = void 0, s = void 0) {
333
- const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
332
+ function Je(e, n, t = void 0, s = void 0) {
333
+ const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${n}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
334
334
  m(d, {
335
335
  opts: {
336
336
  method: "GET",
@@ -340,7 +340,7 @@ function Je(e, t, n = void 0, s = void 0) {
340
340
  }
341
341
  },
342
342
  onComplete(f) {
343
- n && n(JSON.parse(f));
343
+ t && t(JSON.parse(f));
344
344
  },
345
345
  onFailure(f, l) {
346
346
  const g = f;
@@ -348,7 +348,7 @@ function Je(e, t, n = void 0, s = void 0) {
348
348
  }
349
349
  });
350
350
  }
351
- function ee(e, t = void 0, n = void 0) {
351
+ function ee(e, n = void 0, t = void 0) {
352
352
  const { _usersgroup: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
353
353
  method: "GET",
354
354
  Accept: "application/json,*/*,test/javascript"
@@ -356,15 +356,15 @@ function ee(e, t = void 0, n = void 0) {
356
356
  m(d, {
357
357
  OPTsH: c,
358
358
  onComplete(p) {
359
- t && t(JSON.parse(p));
359
+ n && n(JSON.parse(p));
360
360
  },
361
361
  onFailure(p, u) {
362
362
  const f = p;
363
- f.function = "getUsersGroupRules()", f.msg = u.errormsg, f.errCode = u.errorcode, n && n(f);
363
+ f.function = "getUsersGroupRules()", f.msg = u.errormsg, f.errCode = u.errorcode, t && t(f);
364
364
  }
365
365
  });
366
366
  }
367
- function Ge(e, t = void 0, n = void 0) {
367
+ function Ge(e, n = void 0, t = void 0) {
368
368
  const { _usersgroup: s, currentUser: i, numMax: r } = e;
369
369
  r || (r = 50);
370
370
  const o = "/3drdfpersist/resources/v1/usersgroup", a = "?select=uri,title,owner,members", c = `&top=${r}`, d = `${s}${o}${a}${c}`, u = { method: "GET", headers: {
@@ -381,17 +381,17 @@ function Ge(e, t = void 0, n = void 0) {
381
381
  g.iam = w, g.UG = h, g.iamMember = S, ee(
382
382
  e,
383
383
  (_) => {
384
- g.rules = _, t && t(g);
384
+ g.rules = _, n && n(g);
385
385
  },
386
386
  (_) => {
387
- _.function += ", getUserGroupsList()", n && n(_);
387
+ _.function += ", getUserGroupsList()", t && t(_);
388
388
  }
389
389
  );
390
390
  }
391
391
  },
392
392
  onFailure(f, l) {
393
393
  const g = f;
394
- g.function = "getUserGroupsList()", g.msg = l.errormsg, g.errCode = l.errorcode, n && n(g);
394
+ g.function = "getUserGroupsList()", g.msg = l.errormsg, g.errCode = l.errorcode, t && t(g);
395
395
  }
396
396
  });
397
397
  } catch (f) {
@@ -403,26 +403,31 @@ function Ge(e, t = void 0, n = void 0) {
403
403
  cause: f
404
404
  })
405
405
  };
406
- n(l);
406
+ t(l);
407
407
  }
408
408
  }
409
- function Ke(e, t, n) {
410
- const { _usersgroup: s, lists_uri: i, currentUser: r } = e, o = {
409
+ function Be(e, n, t) {
410
+ const { _usersgroup: s, list_uris: i, currentUser: r } = e;
411
+ if (!i || i.length === 0) {
412
+ t({ msg: "getUserGroupsByURIList: lists_uri is empty or undefined" });
413
+ return;
414
+ }
415
+ const o = {
411
416
  "Content-Type": "application/json"
412
417
  }, a = {
413
418
  baseUrl: s,
414
419
  uri: "/3drdfpersist/resources/v1/usersgroup/groups",
415
420
  opt: "?select=uri,members"
416
- }, c = `${a.baseUrl}${a.uri}${a.opt}`, p = {
421
+ }, c = `${a.baseUrl}${a.uri}${a.opt}`, d = JSON.stringify({ groups: i }), p = {
417
422
  method: "POST",
418
423
  headers: o,
419
- data: JSON.stringify({ groups: i })
424
+ data: d
420
425
  };
421
426
  try {
422
427
  m(c, {
423
428
  options: p,
424
429
  onComplete(u) {
425
- t && t(u);
430
+ n && n(u);
426
431
  },
427
432
  onFailure(u, f) {
428
433
  const l = {
@@ -433,7 +438,7 @@ function Ke(e, t, n) {
433
438
  msg: f,
434
439
  fonction: "getUserGroupsByURIList()"
435
440
  };
436
- n && n(l);
441
+ t && t(l);
437
442
  }
438
443
  });
439
444
  } catch (u) {
@@ -445,16 +450,16 @@ function Ke(e, t, n) {
445
450
  cause: u
446
451
  })
447
452
  };
448
- n && n(f);
453
+ t && t(f);
449
454
  }
450
455
  }
451
- function Be(e, t) {
452
- const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
456
+ function Ke(e, n) {
457
+ const { space: t } = e, i = `${t}/3drdfpersist/resources/v1/usersgroup/${n}`;
453
458
  m(i, {
454
459
  method: "DELETE"
455
460
  });
456
461
  }
457
- function Ee(e, t, n, s = void 0, i = void 0) {
462
+ function Ee(e, n, t, s = void 0, i = void 0) {
458
463
  const { space: r, tenant: o } = e, a = {
459
464
  URITI: "/3drdfpersist/resources/v1/template-instances",
460
465
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -463,7 +468,7 @@ function Ee(e, t, n, s = void 0, i = void 0) {
463
468
  nexURImem: "/members",
464
469
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
465
470
  OPTsTenant: `tenant=dstenant:${o}`
466
- }, c = n, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
471
+ }, c = t, d = `${r}${a.URIUGr}/${n}`, p = JSON.stringify(c);
467
472
  m(d, {
468
473
  headers: j,
469
474
  method: "PATCH",
@@ -477,12 +482,12 @@ function Ee(e, t, n, s = void 0, i = void 0) {
477
482
  }
478
483
  });
479
484
  }
480
- function qe(e, t, n, s = void 0, i = void 0) {
481
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
485
+ function qe(e, n, t, s = void 0, i = void 0) {
486
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
482
487
  m(a, {
483
488
  method: "PATCH",
484
489
  headers: j,
485
- data: JSON.stringify(n),
490
+ data: JSON.stringify(t),
486
491
  type: "json",
487
492
  onComplete(d) {
488
493
  s && s(d);
@@ -492,8 +497,8 @@ function qe(e, t, n, s = void 0, i = void 0) {
492
497
  }
493
498
  });
494
499
  }
495
- function Xe(e, t, n = void 0, s = void 0) {
496
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
500
+ function Xe(e, n, t = void 0, s = void 0) {
501
+ const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
497
502
  m(o, {
498
503
  opts: {
499
504
  method: "GET",
@@ -503,43 +508,43 @@ function Xe(e, t, n = void 0, s = void 0) {
503
508
  }
504
509
  },
505
510
  onComplete(d) {
506
- n && n(JSON.parse(d));
511
+ t && t(JSON.parse(d));
507
512
  },
508
513
  onFailure(d) {
509
514
  s && s(d);
510
515
  }
511
516
  });
512
517
  }
513
- async function te(e, t, n) {
518
+ async function te(e, n, t) {
514
519
  if (e.space) {
515
520
  const s = `${e.space}/resources/v1/application/CSRF`;
516
521
  m(s, {
517
522
  onComplete(i) {
518
- i = JSON.parse(i), t && t(i.csrf);
523
+ i = JSON.parse(i), n && n(i.csrf);
519
524
  },
520
525
  onFailure(i, r, o) {
521
- n && n({ error: i, headers: r, xhr: o });
526
+ t && t({ error: i, headers: r, xhr: o });
522
527
  }
523
528
  });
524
529
  }
525
530
  }
526
531
  var x = {};
527
- function ne(e, t) {
528
- return Object.prototype.hasOwnProperty.call(e, t);
532
+ function ne(e, n) {
533
+ return Object.prototype.hasOwnProperty.call(e, n);
529
534
  }
530
- var se = function(e, t, n, s) {
531
- t = t || "&", n = n || "=";
535
+ var se = function(e, n, t, s) {
536
+ n = n || "&", t = t || "=";
532
537
  var i = {};
533
538
  if (typeof e != "string" || e.length === 0)
534
539
  return i;
535
540
  var r = /\+/g;
536
- e = e.split(t);
541
+ e = e.split(n);
537
542
  var o = 1e3;
538
543
  s && typeof s.maxKeys == "number" && (o = s.maxKeys);
539
544
  var a = e.length;
540
545
  o > 0 && a > o && (a = o);
541
546
  for (var c = 0; c < a; ++c) {
542
- var d = e[c].replace(r, "%20"), p = d.indexOf(n), u, f, l, g;
547
+ var d = e[c].replace(r, "%20"), p = d.indexOf(t), u, f, l, g;
543
548
  p >= 0 ? (u = d.substr(0, p), f = d.substr(p + 1)) : (u = d, f = ""), l = decodeURIComponent(u), g = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
544
549
  }
545
550
  return i;
@@ -554,41 +559,41 @@ var se = function(e, t, n, s) {
554
559
  default:
555
560
  return "";
556
561
  }
557
- }, ie = function(e, t, n, s) {
558
- return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
559
- var r = encodeURIComponent(U(i)) + n;
562
+ }, ie = function(e, n, t, s) {
563
+ return n = n || "&", t = t || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
564
+ var r = encodeURIComponent(U(i)) + t;
560
565
  return Array.isArray(e[i]) ? e[i].map(function(o) {
561
566
  return r + encodeURIComponent(U(o));
562
- }).join(t) : r + encodeURIComponent(U(e[i]));
563
- }).filter(Boolean).join(t) : s ? encodeURIComponent(U(s)) + n + encodeURIComponent(U(e)) : "";
567
+ }).join(n) : r + encodeURIComponent(U(e[i]));
568
+ }).filter(Boolean).join(n) : s ? encodeURIComponent(U(s)) + t + encodeURIComponent(U(e)) : "";
564
569
  };
565
570
  x.decode = x.parse = se;
566
571
  x.encode = x.stringify = ie;
567
- async function J(e, t = void 0, n = void 0, s = void 0) {
572
+ async function J(e, n = void 0, t = void 0, s = void 0) {
568
573
  const i = e.space;
569
- if (t === void 0) {
574
+ if (n === void 0) {
570
575
  console.log("Le paramètre docid est obligatoire");
571
576
  return;
572
577
  }
573
- const r = i + `/resources/v1/modeler/documents/${t}`;
578
+ const r = i + `/resources/v1/modeler/documents/${n}`;
574
579
  m(r, {
575
580
  onComplete(o, a, c) {
576
581
  const d = JSON.parse(o);
577
- n && n(d);
582
+ t && t(d);
578
583
  },
579
584
  onFailure(o) {
580
585
  s && s(o);
581
586
  }
582
587
  });
583
588
  }
584
- async function We(e, t = void 0, n = void 0, s = void 0) {
589
+ async function We(e, n = void 0, t = void 0, s = void 0) {
585
590
  const i = e.space;
586
- if (t === void 0) {
591
+ if (n === void 0) {
587
592
  console.log("Le paramètre docids est obligatoire");
588
593
  return;
589
594
  }
590
595
  let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = x.stringify({
591
- $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
596
+ $ids: n.toString().replace('"', "").replace("[", "").replace("]", "")
592
597
  });
593
598
  m(r, {
594
599
  method: "POST",
@@ -598,46 +603,46 @@ async function We(e, t = void 0, n = void 0, s = void 0) {
598
603
  data: o,
599
604
  onComplete(a, c, d) {
600
605
  const p = JSON.parse(a);
601
- n && n(p);
606
+ t && t(p);
602
607
  },
603
608
  onFailure(a) {
604
609
  s && s(a);
605
610
  }
606
611
  });
607
612
  }
608
- function N(e, t = void 0, n = void 0) {
613
+ function R(e, n = void 0, t = void 0) {
609
614
  if (e.objID && e.objID !== "") {
610
615
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
611
616
  m(s, {
612
617
  onComplete(i, r, o) {
613
618
  const a = JSON.parse(i);
614
- e.success = !0, e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
619
+ e.success = !0, e.token = a?.csrf?.value, e.datas = a?.data[0], n && n(e);
615
620
  },
616
621
  onFailure(i) {
617
- n && n(i);
622
+ t && t(i);
618
623
  }
619
624
  });
620
625
  } else
621
626
  b(
622
627
  e,
623
628
  (s) => {
624
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), e.token = s, t && t(e);
629
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), e.token = s, n && n(e);
625
630
  },
626
631
  (s) => {
627
- n && n(s);
632
+ t && t(s);
628
633
  }
629
634
  );
630
635
  }
631
- function b(e, t = void 0, n = void 0) {
636
+ function b(e, n = void 0, t = void 0) {
632
637
  if (e.space) {
633
638
  const s = e.space + "/resources/v1/application/CSRF";
634
639
  m(s, {
635
640
  onComplete(i, r, o) {
636
641
  const a = JSON.parse(i);
637
- t && t(a.csrf.value);
642
+ n && n(a.csrf.value);
638
643
  },
639
644
  onFailure(i, r, o) {
640
- n && n({
645
+ t && t({
641
646
  response: i,
642
647
  headers: r,
643
648
  xhr: o
@@ -645,11 +650,11 @@ function b(e, t = void 0, n = void 0) {
645
650
  }
646
651
  });
647
652
  } else
648
- n && n("ERROR : url du 3DSpace non défini.");
653
+ t && t("ERROR : url du 3DSpace non défini.");
649
654
  }
650
- function k(e, t = void 0, n = void 0) {
655
+ function k(e, n = void 0, t = void 0) {
651
656
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
652
- N(
657
+ R(
653
658
  e,
654
659
  (i) => {
655
660
  m(s, {
@@ -659,24 +664,24 @@ function k(e, t = void 0, n = void 0) {
659
664
  },
660
665
  onComplete(r, o) {
661
666
  const c = JSON.parse(r).data[0].dataelements.ticketURL;
662
- t && t(c, o);
667
+ n && n(c, o);
663
668
  },
664
669
  onFailure(r, o) {
665
- console.warn("☠️ error => ", r, o), n && n(r, o);
670
+ console.warn("☠️ error => ", r, o), t && t(r, o);
666
671
  }
667
672
  });
668
673
  },
669
674
  (i) => {
670
- console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
675
+ console.warn("_3DSpace_get_ticket / error => ", i), t && t(i);
671
676
  }
672
677
  );
673
678
  }
674
- function Ve(e, t, n = void 0, s = void 0, i = void 0) {
675
- const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
676
- n || (n = e.token), m(r, {
679
+ function Ve(e, n, t = void 0, s = void 0, i = void 0) {
680
+ const r = `${e.space}/resources/v1/modeler/documents/${n}/files/DownloadTicket`;
681
+ t || (t = e.token), m(r, {
677
682
  method: "PUT",
678
683
  headers: {
679
- ENO_CSRF_TOKEN: n
684
+ ENO_CSRF_TOKEN: t
680
685
  },
681
686
  onComplete(o) {
682
687
  let a = JSON.parse(o);
@@ -693,20 +698,20 @@ function Ve(e, t, n = void 0, s = void 0, i = void 0) {
693
698
  }
694
699
  });
695
700
  }
696
- function G(e, t, n, s, i, r = void 0, o = void 0) {
701
+ function G(e, n, t, s, i, r = void 0, o = void 0) {
697
702
  const a = () => oe(
698
703
  e,
699
- t,
700
704
  n,
705
+ t,
701
706
  s,
702
707
  i,
703
708
  e.token,
704
709
  r,
705
710
  o
706
711
  );
707
- e.token ? a() : N(
712
+ e.token ? a() : R(
708
713
  e,
709
- t,
714
+ n,
710
715
  (c) => {
711
716
  console.log(
712
717
  "_3DSpace_file_update | _3DSpace_get_csrf| onDone | result",
@@ -715,7 +720,7 @@ function G(e, t, n, s, i, r = void 0, o = void 0) {
715
720
  }
716
721
  );
717
722
  }
718
- function oe(e, t, n, s, i, r, o = void 0, a = void 0) {
723
+ function oe(e, n, t, s, i, r, o = void 0, a = void 0) {
719
724
  const c = e.space + `/resources/v1/modeler/documents/files/CheckinTicket?tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`;
720
725
  m(c, {
721
726
  method: "PUT",
@@ -758,7 +763,7 @@ function oe(e, t, n, s, i, r, o = void 0, a = void 0) {
758
763
  }
759
764
  ]
760
765
  },
761
- id: t,
766
+ id: n,
762
767
  updateAction: "NONE"
763
768
  }
764
769
  ]
@@ -781,14 +786,14 @@ function oe(e, t, n, s, i, r, o = void 0, a = void 0) {
781
786
  }
782
787
  });
783
788
  }
784
- async function Ye(e, t, n = void 0, s = void 0) {
789
+ async function Ye(e, n, t = void 0, s = void 0) {
785
790
  e.space, e.token, e.ctx;
786
791
  const i = e?.description, r = e?.title;
787
- if (!t) {
792
+ if (!n) {
788
793
  console.warn("Error: docId undefined"), s && s("Error: docId undefined");
789
794
  return;
790
795
  }
791
- let o = `${e.space}/resources/v1/modeler/documents/${t}`;
796
+ let o = `${e.space}/resources/v1/modeler/documents/${n}`;
792
797
  const a = JSON.stringify({
793
798
  data: [
794
799
  {
@@ -807,20 +812,20 @@ async function Ye(e, t, n = void 0, s = void 0) {
807
812
  data: a,
808
813
  type: "json",
809
814
  onComplete(c) {
810
- n && n(c);
815
+ t && t(c);
811
816
  },
812
817
  onFailure(c) {
813
818
  s && s(c);
814
819
  }
815
820
  });
816
821
  }
817
- async function ze(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
822
+ async function ze(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0) {
818
823
  let { tenant: o, cs_name: a } = e;
819
824
  if (!o && !a) {
820
825
  i && i("Credentials undefined");
821
826
  return;
822
827
  }
823
- if (!t && !n) {
828
+ if (!n && !t) {
824
829
  i && i("Définition du fichier undefined");
825
830
  return;
826
831
  }
@@ -846,28 +851,28 @@ async function ze(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
846
851
  try {
847
852
  if (l = JSON.parse(l), l?.ticket) {
848
853
  const { ticket: y, actionurl: S, jobticket: w } = l;
849
- K(
854
+ B(
850
855
  { dataelements: { ticket: y, ticketURL: S } },
851
- n,
852
856
  t,
857
+ n,
853
858
  (_) => {
854
859
  const F = new DOMParser().parseFromString(
855
860
  _,
856
861
  "text/html"
857
862
  ).body.firstChild.querySelector("input").getAttributeNode("value").value, D = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(a)}/contents?receipt=${encodeURIComponent(F)}`;
858
- let W = /(?:\.([^.]+))?$/.exec(t)[1];
863
+ let W = /(?:\.([^.]+))?$/.exec(n)[1];
859
864
  const v = JSON.stringify({
860
865
  actions: [],
861
866
  businessobj: {
862
867
  description: e?.description ? e?.description : "",
863
- file: t,
868
+ file: n,
864
869
  fullnameowner: "",
865
870
  icon: "",
866
871
  maturity: "",
867
872
  modified: "",
868
873
  owner: {},
869
874
  thumbnail: "",
870
- title: W ? t.split(".").slice(0, -1).join(".") : t,
875
+ title: W ? n.split(".").slice(0, -1).join(".") : n,
871
876
  type: {}
872
877
  },
873
878
  collabspace: a
@@ -896,7 +901,7 @@ async function ze(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
896
901
  console.warn("pushFileInFcs", _), i && i(_);
897
902
  },
898
903
  (_) => {
899
- r && r({ fileName: t, progress: _ });
904
+ r && r({ fileName: n, progress: _ });
900
905
  }
901
906
  );
902
907
  }
@@ -918,17 +923,17 @@ async function ze(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
918
923
  }
919
924
  );
920
925
  }
921
- async function He(e, t, n, s = void 0, i = void 0) {
926
+ async function He(e, n, t, s = void 0, i = void 0) {
922
927
  e.space, e.token, e.ctx, J(
923
928
  e,
924
- t,
929
+ n,
925
930
  (r) => {
926
931
  const o = r.data[0].relateddata.files[0].id, a = r.data[0].relateddata.files[0].dataelements.title;
927
932
  G(
928
933
  e,
929
- t,
930
- o,
931
934
  n,
935
+ o,
936
+ t,
932
937
  a,
933
938
  (c) => {
934
939
  s && s(c);
@@ -943,20 +948,20 @@ async function He(e, t, n, s = void 0, i = void 0) {
943
948
  }
944
949
  );
945
950
  }
946
- async function Qe(e, t, n, s, i = void 0, r = void 0) {
951
+ async function Qe(e, n, t, s, i = void 0, r = void 0) {
947
952
  ae(
948
953
  e,
949
954
  (o) => {
950
955
  o?.items >= 1 && o.data.forEach((a) => {
951
- K(
956
+ B(
952
957
  a,
953
- t,
954
958
  n,
959
+ t,
955
960
  (c) => {
956
961
  re(
957
962
  e,
958
963
  c,
959
- n,
964
+ t,
960
965
  s,
961
966
  (d) => {
962
967
  d?.data.length ? i && i(d) : r && r({
@@ -974,7 +979,7 @@ async function Qe(e, t, n, s, i = void 0, r = void 0) {
974
979
  (o) => console.warn(o)
975
980
  );
976
981
  }
977
- function ae(e, t = void 0, n = void 0) {
982
+ function ae(e, n = void 0, t = void 0) {
978
983
  if (e?.space && e.token && e.ctx) {
979
984
  let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
980
985
  m(s, {
@@ -990,21 +995,21 @@ function ae(e, t = void 0, n = void 0) {
990
995
  i = JSON.parse(i);
991
996
  } catch {
992
997
  }
993
- t && t(i);
998
+ n && n(i);
994
999
  },
995
1000
  onFailure(i) {
996
- n && n(i);
1001
+ t && t(i);
997
1002
  }
998
1003
  });
999
1004
  } else
1000
1005
  console.log("Error de credentials", e);
1001
1006
  }
1002
- function K(e, t, n, s = void 0, i = void 0, r = void 0) {
1003
- console.log("pushFileInFcs", { fcs__jobTicket: e, fileData: t, fileName: n });
1007
+ function B(e, n, t, s = void 0, i = void 0, r = void 0) {
1008
+ console.log("pushFileInFcs", { fcs__jobTicket: e, fileData: n, fileName: t });
1004
1009
  let o = new FormData();
1005
- t instanceof Blob || (t = new Blob([t], {
1010
+ n instanceof Blob || (n = new Blob([n], {
1006
1011
  type: "text/plain"
1007
- })), o.append("__fcs__jobTicket", e.dataelements.ticket), o.append("file-name", n), o.append("file_0", t, n), o.append("file-title", n), o.append("file-description", n);
1012
+ })), o.append("__fcs__jobTicket", e.dataelements.ticket), o.append("file-name", t), o.append("file_0", n, t), o.append("file-title", t), o.append("file-description", t);
1008
1013
  let a = e.dataelements.ticketURL;
1009
1014
  const c = new XMLHttpRequest();
1010
1015
  c.open("POST", a, !0), c.upload.onprogress = function(d) {
@@ -1018,8 +1023,8 @@ function K(e, t, n, s = void 0, i = void 0, r = void 0) {
1018
1023
  i && i(c.statusText);
1019
1024
  }, c.send(o);
1020
1025
  }
1021
- function re(e, t, n, s = void 0, i = void 0, r = void 0) {
1022
- console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
1026
+ function re(e, n, t, s = void 0, i = void 0, r = void 0) {
1027
+ console.log("relatedDocAndFile", { credentials: e, receipt: n, filename: t });
1023
1028
  const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
1024
1029
  let a = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
1025
1030
  m(c, {
@@ -1035,15 +1040,15 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
1035
1040
  {
1036
1041
  type: "Document",
1037
1042
  dataelements: {
1038
- title: o(n),
1043
+ title: o(t),
1039
1044
  description: s
1040
1045
  },
1041
1046
  relateddata: {
1042
1047
  files: [
1043
1048
  {
1044
1049
  dataelements: {
1045
- title: n,
1046
- receipt: `${t}
1050
+ title: t,
1051
+ receipt: `${n}
1047
1052
  `
1048
1053
  }
1049
1054
  }
@@ -1065,23 +1070,23 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
1065
1070
  }
1066
1071
  });
1067
1072
  }
1068
- function R(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
1073
+ function N(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
1069
1074
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1070
1075
  m(a, {
1071
1076
  method: "GET",
1072
1077
  onComplete(c) {
1073
1078
  const d = JSON.parse(c);
1074
1079
  let p = "", u, f, l;
1075
- if (t) {
1076
- let g = d.collabspaces.find((h) => h.title === t);
1080
+ if (n) {
1081
+ let g = d.collabspaces.find((h) => h.title === n);
1077
1082
  if (g) {
1078
- u = t;
1083
+ u = n;
1079
1084
  let h = g.couples;
1080
1085
  h = h.filter(
1081
1086
  (y, S, w) => S === w.findIndex(
1082
1087
  (_) => _.organization.pid === y.organization.pid && _.role.pid === y.role.pid
1083
1088
  )
1084
- ), n && (Array.isArray(n) ? n.forEach((y) => {
1089
+ ), t && (Array.isArray(t) ? t.forEach((y) => {
1085
1090
  l || h.forEach((S) => {
1086
1091
  if (y === S.role.name && s === S.organization.title)
1087
1092
  l = y, f = s;
@@ -1093,11 +1098,11 @@ function R(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
1093
1098
  }
1094
1099
  });
1095
1100
  }) : h.forEach((y) => {
1096
- if (n === y.role.name && s === y.organization.title)
1097
- l = n, f = s;
1098
- else if (n === y.role.name) {
1101
+ if (t === y.role.name && s === y.organization.title)
1102
+ l = t, f = s;
1103
+ else if (t === y.role.name) {
1099
1104
  let S = h.filter(
1100
- (w) => w.role.name === n
1105
+ (w) => w.role.name === t
1101
1106
  );
1102
1107
  S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
1103
1108
  }
@@ -1114,14 +1119,14 @@ function R(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
1114
1119
  }
1115
1120
  });
1116
1121
  }
1117
- async function B(e, t = void 0, n = void 0) {
1122
+ async function K(e, n = void 0, t = void 0) {
1118
1123
  return (!e.objID || e.objID === "") && (console.warn(
1119
1124
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1120
- ), n && n(
1125
+ ), t && t(
1121
1126
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1122
1127
  )), (e.space === "" || !e.space) && (console.warn(
1123
1128
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
1124
- ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1129
+ ), t && t("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1125
1130
  e,
1126
1131
  (s) => {
1127
1132
  e.token = s;
@@ -1134,9 +1139,9 @@ async function B(e, t = void 0, n = void 0) {
1134
1139
  e,
1135
1140
  (r) => {
1136
1141
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
1137
- t && t(o);
1138
- }).catch((o) => {
1139
1142
  n && n(o);
1143
+ }).catch((o) => {
1144
+ t && t(o);
1140
1145
  })) : m(r, {
1141
1146
  onComplete(o) {
1142
1147
  let a;
@@ -1145,10 +1150,10 @@ async function B(e, t = void 0, n = void 0) {
1145
1150
  } catch {
1146
1151
  a = o;
1147
1152
  }
1148
- t && typeof t == "function" && t(a), s(a);
1153
+ n && typeof n == "function" && n(a), s(a);
1149
1154
  },
1150
1155
  onFailure(o, a, c) {
1151
- n && (console.log("error http", o), n({
1156
+ t && (console.log("error http", o), t({
1152
1157
  msg: JSON.parse(o),
1153
1158
  headers: a,
1154
1159
  xhr: c
@@ -1161,28 +1166,28 @@ async function B(e, t = void 0, n = void 0) {
1161
1166
  });
1162
1167
  },
1163
1168
  (r) => {
1164
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1169
+ t && t(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1165
1170
  }
1166
1171
  );
1167
1172
  });
1168
1173
  }
1169
- async function ce(e, t, n = void 0, s = void 0) {
1170
- typeof t < "u" && Array.isArray(t) && t?.length > 0 ? H({
1174
+ async function ce(e, n, t = void 0, s = void 0) {
1175
+ typeof n < "u" && Array.isArray(n) && n?.length > 0 ? H({
1171
1176
  credentials: e,
1172
- myArray: t,
1177
+ myArray: n,
1173
1178
  chunk: 80,
1174
1179
  fn_to_call: de
1175
1180
  }, (r) => {
1176
- n && n(r);
1181
+ t && t(r);
1177
1182
  }) : (console.warn(
1178
1183
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1179
1184
  ), s && s(
1180
1185
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1181
1186
  ));
1182
1187
  }
1183
- function de(e, t, n = void 0, s = void 0, i = void 0) {
1188
+ function de(e, n, t = void 0, s = void 0, i = void 0) {
1184
1189
  const r = [];
1185
- t.forEach((c) => {
1190
+ n.forEach((c) => {
1186
1191
  r.push({
1187
1192
  id: c
1188
1193
  });
@@ -1201,7 +1206,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1201
1206
  type: "json",
1202
1207
  onComplete(c) {
1203
1208
  const d = c.data;
1204
- c.success === !0 && (n && n(), d.forEach((p) => {
1209
+ c.success === !0 && (t && t(), d.forEach((p) => {
1205
1210
  try {
1206
1211
  const u = p.dataelements.fileName, f = p.dataelements.ticketURL;
1207
1212
  m(f, {
@@ -1233,9 +1238,9 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1233
1238
  }
1234
1239
  });
1235
1240
  }
1236
- function Ze(e, t, n = void 0, s = void 0) {
1241
+ function Ze(e, n, t = void 0, s = void 0) {
1237
1242
  return new Promise((i) => {
1238
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1243
+ if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
1239
1244
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1240
1245
  let o = {
1241
1246
  method: "POST",
@@ -1248,13 +1253,13 @@ function Ze(e, t, n = void 0, s = void 0) {
1248
1253
  data: JSON.stringify({
1249
1254
  data: [
1250
1255
  {
1251
- id: t
1256
+ id: n
1252
1257
  }
1253
1258
  ]
1254
1259
  }),
1255
1260
  type: "json",
1256
1261
  onComplete(a) {
1257
- n && n(a);
1262
+ t && t(a);
1258
1263
  },
1259
1264
  onFailure(a) {
1260
1265
  s && s(a);
@@ -1264,9 +1269,9 @@ function Ze(e, t, n = void 0, s = void 0) {
1264
1269
  }
1265
1270
  });
1266
1271
  }
1267
- function et(e, t, n, s = void 0, i = void 0) {
1272
+ function et(e, n, t, s = void 0, i = void 0) {
1268
1273
  return new Promise((r) => {
1269
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1274
+ if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
1270
1275
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1271
1276
  let a = {
1272
1277
  method: "POST",
@@ -1279,8 +1284,8 @@ function et(e, t, n, s = void 0, i = void 0) {
1279
1284
  data: JSON.stringify({
1280
1285
  data: [
1281
1286
  {
1282
- id: t,
1283
- nextState: n
1287
+ id: n,
1288
+ nextState: t
1284
1289
  }
1285
1290
  ]
1286
1291
  }),
@@ -1296,11 +1301,11 @@ function et(e, t, n, s = void 0, i = void 0) {
1296
1301
  }
1297
1302
  });
1298
1303
  }
1299
- function tt(e, t, n = void 0, s = void 0) {
1304
+ function tt(e, n, t = void 0, s = void 0) {
1300
1305
  return new Promise((i) => {
1301
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1306
+ if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
1302
1307
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1303
- R(
1308
+ N(
1304
1309
  e.space,
1305
1310
  "ESPACE COMMUN",
1306
1311
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1321,13 +1326,13 @@ function tt(e, t, n = void 0, s = void 0) {
1321
1326
  data: JSON.stringify({
1322
1327
  graphRequests: [
1323
1328
  {
1324
- id: t
1329
+ id: n
1325
1330
  }
1326
1331
  ]
1327
1332
  }),
1328
1333
  type: "json",
1329
1334
  onComplete(a) {
1330
- n && n(a);
1335
+ t && t(a);
1331
1336
  },
1332
1337
  onFailure(a) {
1333
1338
  s && s(a);
@@ -1337,11 +1342,11 @@ function tt(e, t, n = void 0, s = void 0) {
1337
1342
  }
1338
1343
  });
1339
1344
  }
1340
- function nt(e, t, n = void 0, s = void 0) {
1345
+ function nt(e, n, t = void 0, s = void 0) {
1341
1346
  return new Promise((i) => {
1342
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1347
+ if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
1343
1348
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1344
- R(
1349
+ N(
1345
1350
  e.space,
1346
1351
  "ESPACE COMMUN",
1347
1352
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1363,10 +1368,10 @@ function nt(e, t, n = void 0, s = void 0) {
1363
1368
  data: [
1364
1369
  {
1365
1370
  "attribute[PLMReference.V_versionComment]": null,
1366
- physicalid: t,
1371
+ physicalid: n,
1367
1372
  type: "Document",
1368
1373
  tenant: e.tenant,
1369
- objectId: t,
1374
+ objectId: n,
1370
1375
  policy: "Document Release",
1371
1376
  availableSemantic: ["E", "LAST", "NEW", "DUP"]
1372
1377
  }
@@ -1374,7 +1379,7 @@ function nt(e, t, n = void 0, s = void 0) {
1374
1379
  }),
1375
1380
  type: "json",
1376
1381
  onComplete(a) {
1377
- n && n(a);
1382
+ t && t(a);
1378
1383
  },
1379
1384
  onFailure(a) {
1380
1385
  s && s(a);
@@ -1384,11 +1389,11 @@ function nt(e, t, n = void 0, s = void 0) {
1384
1389
  }
1385
1390
  });
1386
1391
  }
1387
- function st(e, t, n, s = void 0, i = void 0) {
1392
+ function st(e, n, t, s = void 0, i = void 0) {
1388
1393
  return new Promise((r) => {
1389
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1394
+ if (e.token === "" && b(e), n !== void 0 && n !== "" && n !== null) {
1390
1395
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1391
- R(
1396
+ N(
1392
1397
  e.space,
1393
1398
  "ESPACE COMMUN",
1394
1399
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1409,10 +1414,10 @@ function st(e, t, n, s = void 0, i = void 0) {
1409
1414
  data: JSON.stringify({
1410
1415
  data: [
1411
1416
  {
1412
- physicalid: t,
1413
- proposedRevision: n,
1417
+ physicalid: n,
1418
+ proposedRevision: t,
1414
1419
  modifiedAttributes: {
1415
- revision: n
1420
+ revision: t
1416
1421
  }
1417
1422
  }
1418
1423
  ],
@@ -1432,20 +1437,20 @@ function st(e, t, n, s = void 0, i = void 0) {
1432
1437
  });
1433
1438
  }
1434
1439
  function ue(e) {
1435
- return new Promise((t, n) => {
1440
+ return new Promise((n, t) => {
1436
1441
  const s = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1437
1442
  m(s, {
1438
1443
  method: "GET",
1439
1444
  onComplete(r) {
1440
- t(r);
1445
+ n(r);
1441
1446
  },
1442
1447
  onFailure(r) {
1443
- n(r);
1448
+ t(r);
1444
1449
  }
1445
1450
  });
1446
1451
  });
1447
1452
  }
1448
- function it(e, t, n = void 0, s = void 0) {
1453
+ function it(e, n, t = void 0, s = void 0) {
1449
1454
  return new Promise(async (i, r) => {
1450
1455
  const { tenant: o, ctx: a, space: c } = e;
1451
1456
  (!o || !a || !c) && r({ error: "Erreur de credentials", tenant: o, ctx: a, space: c });
@@ -1464,14 +1469,14 @@ function it(e, t, n = void 0, s = void 0) {
1464
1469
  data: JSON.stringify({
1465
1470
  graphRequests: [
1466
1471
  {
1467
- id: t,
1472
+ id: n,
1468
1473
  attributes: ["revision", "policy"]
1469
1474
  }
1470
1475
  ]
1471
1476
  }),
1472
1477
  type: "json",
1473
1478
  onComplete(f) {
1474
- n && n(f), i(f);
1479
+ t && t(f), i(f);
1475
1480
  },
1476
1481
  onFailure(f) {
1477
1482
  s && s(f), r(f);
@@ -1480,19 +1485,19 @@ function it(e, t, n = void 0, s = void 0) {
1480
1485
  m(d, u);
1481
1486
  });
1482
1487
  }
1483
- function ot(e, t, n, s, i = void 0, r = void 0) {
1488
+ function ot(e, n, t, s, i = void 0, r = void 0) {
1484
1489
  return new Promise((o) => {
1485
1490
  const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1486
1491
  let c = {
1487
1492
  attributes: {
1488
- title: n,
1493
+ title: t,
1489
1494
  description: s,
1490
1495
  inheritedAccess: "no"
1491
1496
  }
1492
1497
  }, d = {
1493
1498
  items: []
1494
1499
  };
1495
- t && (d.parentId = t), d.items.push(c);
1500
+ n && (d.parentId = n), d.items.push(c);
1496
1501
  let p = {
1497
1502
  method: "POST",
1498
1503
  headers: {
@@ -1513,7 +1518,7 @@ function ot(e, t, n, s, i = void 0, r = void 0) {
1513
1518
  m(a, p);
1514
1519
  });
1515
1520
  }
1516
- function at(e, t, n, s, i = void 0, r = void 0) {
1521
+ function at(e, n, t, s, i = void 0, r = void 0) {
1517
1522
  return console.log("credentials", e), new Promise((o) => {
1518
1523
  `${e.space}`, JSON.stringify({
1519
1524
  csrf: {
@@ -1524,10 +1529,10 @@ function at(e, t, n, s, i = void 0, r = void 0) {
1524
1529
  {
1525
1530
  type: "Workspace",
1526
1531
  cestamp: "businessobject",
1527
- relId: t,
1528
- id: t,
1532
+ relId: n,
1533
+ id: n,
1529
1534
  dataelements: {
1530
- personList: n,
1535
+ personList: t,
1531
1536
  eventsList: s
1532
1537
  },
1533
1538
  tenant: e.tenant
@@ -1537,7 +1542,7 @@ function at(e, t, n, s, i = void 0, r = void 0) {
1537
1542
  });
1538
1543
  }
1539
1544
  //!SECTION
1540
- function rt(e, t = void 0, n = void 0) {
1545
+ function rt(e, n = void 0, t = void 0) {
1541
1546
  const s = {
1542
1547
  base: `${e.space}`,
1543
1548
  uri: "/resources/bps/cspaces",
@@ -1551,22 +1556,22 @@ function rt(e, t = void 0, n = void 0) {
1551
1556
  },
1552
1557
  onComplete(r, o) {
1553
1558
  const a = JSON.parse(r);
1554
- t && t(a, o);
1559
+ n && n(a, o);
1555
1560
  },
1556
1561
  onFailure(r, o, a) {
1557
- n && n({ response: r, headers: o, xhr: a });
1562
+ t && t({ response: r, headers: o, xhr: a });
1558
1563
  }
1559
1564
  });
1560
1565
  }
1561
- function ct(e, t, n, s) {
1566
+ function ct(e, n, t, s) {
1562
1567
  k(
1563
1568
  e.space,
1564
- t,
1569
+ n,
1565
1570
  (i) => {
1566
1571
  m(i, {
1567
1572
  header: { ENO_CSRF_TOKEN: e.token },
1568
1573
  onComplete: (r) => {
1569
- n && n(r);
1574
+ t && t(r);
1570
1575
  },
1571
1576
  onFailure: (r) => {
1572
1577
  console.log("error http", r), s && s(r);
@@ -1575,11 +1580,11 @@ function ct(e, t, n, s) {
1575
1580
  }
1576
1581
  );
1577
1582
  }
1578
- async function dt(e, t, n = void 0, s = void 0) {
1583
+ async function dt(e, n, t = void 0, s = void 0) {
1579
1584
  return new Promise((i) => {
1580
- k(e, t, (r) => {
1585
+ k(e, n, (r) => {
1581
1586
  m(r, {
1582
- onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1587
+ onComplete: (o, a, c) => (i(JSON.parse(o)), t && t(JSON.parse(o), a, c), i),
1583
1588
  onFailure: (o, a, c) => {
1584
1589
  s && s(o, a, c), console.log(o, a?.errormsg);
1585
1590
  }
@@ -1587,16 +1592,16 @@ async function dt(e, t, n = void 0, s = void 0) {
1587
1592
  });
1588
1593
  });
1589
1594
  }
1590
- function ut(e, t, n, s = void 0, i = void 0) {
1591
- const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1592
- e = { ...e, objID: n }, N(
1595
+ function ut(e, n, t, s = void 0, i = void 0) {
1596
+ const r = new Blob([JSON.stringify(n)], { type: "text/plain" });
1597
+ e = { ...e, objID: t }, R(
1593
1598
  e,
1594
1599
  (o) => {
1595
1600
  console.log("_3DSpace_get_csrf | onDone | data", o);
1596
1601
  const a = o.datas.relateddata.files[0].id, c = o.datas.relateddata.files[0].dataelements.title;
1597
1602
  G(
1598
1603
  e,
1599
- n,
1604
+ t,
1600
1605
  a,
1601
1606
  r,
1602
1607
  c,
@@ -1615,60 +1620,60 @@ function ut(e, t, n, s = void 0, i = void 0) {
1615
1620
  }
1616
1621
  let E, q;
1617
1622
  const A = [];
1618
- async function pt(e, t = void 0, n = void 0) {
1619
- e.objID && e.objID !== "" ? N(
1623
+ async function pt(e, n = void 0, t = void 0) {
1624
+ e.objID && e.objID !== "" ? R(
1620
1625
  e,
1621
1626
  (s) => {
1622
- t && t(s);
1627
+ n && n(s);
1623
1628
  },
1624
1629
  (s) => {
1625
- n && n(s);
1630
+ t && t(s);
1626
1631
  }
1627
1632
  ) : (e.objID === null || e.objID === "") && b(
1628
1633
  e,
1629
1634
  (s) => {
1630
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1635
+ n && n({ rep: s, msg: "Pas d'objID, ou invalide" });
1631
1636
  },
1632
1637
  (s) => {
1633
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1638
+ t && t({ msg: "Pas d'objID et erreur sur le Space", err: s });
1634
1639
  }
1635
1640
  );
1636
1641
  }
1637
- async function lt(e, t = void 0, n = void 0) {
1638
- console.log("getDatasByTenant (getDocuments)", e), await B(
1642
+ async function lt(e, n = void 0, t = void 0) {
1643
+ console.log("getDatasByTenant (getDocuments)", e), await K(
1639
1644
  e,
1640
1645
  (s) => {
1641
1646
  const i = {};
1642
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1647
+ i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), n && n?.(i);
1643
1648
  },
1644
1649
  (s) => {
1645
- n && n?.(s);
1650
+ t && t?.(s);
1646
1651
  }
1647
1652
  );
1648
1653
  }
1649
- function ft(e, t = void 0, n = void 0) {
1654
+ function ft(e, n = void 0, t = void 0) {
1650
1655
  const s = [];
1651
1656
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1652
1657
  console.warn("la liste est vide ou n'est pas un tableau");
1653
1658
  return;
1654
1659
  }
1655
1660
  e.objIds.forEach((i, r) => {
1656
- B(
1661
+ K(
1657
1662
  e,
1658
1663
  i.objID,
1659
1664
  (o) => {
1660
- s.push({ [i.name]: o }), i.name === "dbProjets" && (E = o.affaires.map((a) => a.objectID), pe(e, q)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1665
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (E = o.affaires.map((a) => a.objectID), pe(e, q)), r === e.objIds.length - 1 && (n && n(s), delete e.objIds, delete e.datas);
1661
1666
  }
1662
1667
  );
1663
1668
  });
1664
1669
  }
1665
- function pe(e, t, n = void 0, s = void 0) {
1670
+ function pe(e, n, t = void 0, s = void 0) {
1666
1671
  ce(
1667
1672
  e,
1668
1673
  E,
1669
1674
  (i) => {
1670
- const r = [...t];
1671
- r.find((o) => o.objectID === i.objectId).data = i.data, q = r, A.push(i.data), n && n(A);
1675
+ const r = [...n];
1676
+ r.find((o) => o.objectID === i.objectId).data = i.data, q = r, A.push(i.data), t && t(A);
1672
1677
  },
1673
1678
  (i) => {
1674
1679
  s && (s(i), console.log(i));
@@ -1695,8 +1700,8 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1695
1700
  order_by: "desc",
1696
1701
  tag: "testTag"
1697
1702
  };
1698
- function mt(e, t, n = void 0, s = void 0) {
1699
- const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1703
+ function mt(e, n, t = void 0, s = void 0) {
1704
+ const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = n, d = {
1700
1705
  uri: "/resources/6w/tags",
1701
1706
  otpCTX: "SecurityContext=preferred",
1702
1707
  optTenant: `tenant=${r}`
@@ -1731,11 +1736,11 @@ function mt(e, t, n = void 0, s = void 0) {
1731
1736
  o,
1732
1737
  (g) => {
1733
1738
  const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", S = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1734
- l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, ge(
1739
+ l.name = h, l.ext = y, l.createBy = S, n.info = { ...l }, ge(
1735
1740
  e,
1736
- t,
1741
+ n,
1737
1742
  (w) => {
1738
- n && n(w);
1743
+ t && t(w);
1739
1744
  },
1740
1745
  (w) => {
1741
1746
  s && s(w);
@@ -1755,9 +1760,9 @@ function mt(e, t, n = void 0, s = void 0) {
1755
1760
  }
1756
1761
  });
1757
1762
  }
1758
- function ge(e, t, n = void 0, s = void 0) {
1759
- console.log("obj ", t);
1760
- const i = t.info.name, r = {
1763
+ function ge(e, n, t = void 0, s = void 0) {
1764
+ console.log("obj ", n);
1765
+ const i = n.info.name, r = {
1761
1766
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1762
1767
  uri: "/federated/search"
1763
1768
  }, o = `${r.baseUrl}${r.uri}`, a = {
@@ -1830,7 +1835,7 @@ function ge(e, t, n = void 0, s = void 0) {
1830
1835
  data: JSON.stringify(d),
1831
1836
  onComplete(p) {
1832
1837
  const u = JSON.parse(p);
1833
- n(u);
1838
+ t(u);
1834
1839
  },
1835
1840
  onFailure(p, u) {
1836
1841
  const f = p;
@@ -1838,8 +1843,8 @@ function ge(e, t, n = void 0, s = void 0) {
1838
1843
  }
1839
1844
  });
1840
1845
  }
1841
- function gt(e, t, n = void 0, s = void 0) {
1842
- const { objId: i, pred: r, tag: o } = t, a = {
1846
+ function gt(e, n, t = void 0, s = void 0) {
1847
+ const { objId: i, pred: r, tag: o } = n, a = {
1843
1848
  uri: "/resources/6w/tags",
1844
1849
  otpCTX: "SecurityContext=preferred",
1845
1850
  optTenant: `tenant=${e.tenant}`
@@ -1866,7 +1871,7 @@ function gt(e, t, n = void 0, s = void 0) {
1866
1871
  Accept: "application/json,text/javascript,*/*"
1867
1872
  },
1868
1873
  onComplete(p) {
1869
- n && n(p);
1874
+ t && t(p);
1870
1875
  },
1871
1876
  onFailure(p, u) {
1872
1877
  const f = p;
@@ -1874,22 +1879,22 @@ function gt(e, t, n = void 0, s = void 0) {
1874
1879
  }
1875
1880
  });
1876
1881
  }
1877
- function ht(e, t = "", n = void 0, s = void 0) {
1882
+ function ht(e, n = "", t = void 0, s = void 0) {
1878
1883
  const { space: i } = e;
1879
- if (t === "")
1884
+ if (n === "")
1880
1885
  return;
1881
1886
  const r = {
1882
1887
  uri: "/resources/v1/modeler/documents"
1883
1888
  }, o = {
1884
1889
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1885
1890
  Accept: "application/json,text/javascript,*/*"
1886
- }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1891
+ }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${n}`;
1887
1892
  m(a, {
1888
1893
  method: "POST",
1889
1894
  headers: o,
1890
1895
  data: c,
1891
1896
  onComplete(d) {
1892
- n && n(JSON.parse(d));
1897
+ t && t(JSON.parse(d));
1893
1898
  },
1894
1899
  onFailure(d, p) {
1895
1900
  const u = d;
@@ -1897,20 +1902,20 @@ function ht(e, t = "", n = void 0, s = void 0) {
1897
1902
  }
1898
1903
  });
1899
1904
  }
1900
- async function C(e, t = void 0, n = void 0) {
1905
+ async function C(e, n = void 0, t = void 0) {
1901
1906
  const s = e._3DSwym + "/api/index/tk";
1902
1907
  return m(s, {
1903
1908
  onComplete(i, r, o) {
1904
1909
  const a = JSON.parse(i);
1905
- if (t)
1906
- return t(a), e.token = a?.result?.ServerToken;
1910
+ if (n)
1911
+ return n(a), e.token = a?.result?.ServerToken;
1907
1912
  },
1908
1913
  onFailure(i) {
1909
- n && n(i);
1914
+ t && t(i);
1910
1915
  }
1911
1916
  });
1912
1917
  }
1913
- function yt(e, t = void 0, n = void 0) {
1918
+ function yt(e, n = void 0, t = void 0) {
1914
1919
  const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1915
1920
  params: {
1916
1921
  community_id: null,
@@ -1932,15 +1937,15 @@ function yt(e, t = void 0, n = void 0) {
1932
1937
  data: JSON.stringify(i),
1933
1938
  type: "json",
1934
1939
  onComplete(o, a) {
1935
- t && t(o, a);
1940
+ n && n(o, a);
1936
1941
  },
1937
1942
  onFailure(o, a) {
1938
- n && n(o, a);
1943
+ t && t(o, a);
1939
1944
  }
1940
1945
  });
1941
1946
  });
1942
1947
  }
1943
- function _t(e, t = void 0, n = void 0) {
1948
+ function _t(e, n = void 0, t = void 0) {
1944
1949
  const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1945
1950
  params: {
1946
1951
  idsToFilterArr: [],
@@ -1962,15 +1967,15 @@ function _t(e, t = void 0, n = void 0) {
1962
1967
  type: "json",
1963
1968
  onComplete(o, a) {
1964
1969
  const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1965
- t && t(c, o);
1970
+ n && n(c, o);
1966
1971
  },
1967
1972
  onFailure(o, a) {
1968
- n && n(o, a);
1973
+ t && t(o, a);
1969
1974
  }
1970
1975
  });
1971
1976
  });
1972
1977
  }
1973
- function St(e, t = void 0, n = void 0) {
1978
+ function St(e, n = void 0, t = void 0) {
1974
1979
  const s = {
1975
1980
  base: e._3DSwym,
1976
1981
  uri: "/api/community/listmycommunities",
@@ -1999,25 +2004,25 @@ function St(e, t = void 0, n = void 0) {
1999
2004
  e,
2000
2005
  l.id,
2001
2006
  (h) => {
2002
- f++, g.members = h, r.push(g), f === u.length && t && t(r);
2007
+ f++, g.members = h, r.push(g), f === u.length && n && n(r);
2003
2008
  },
2004
- (h) => n(h)
2009
+ (h) => t(h)
2005
2010
  );
2006
2011
  });
2007
2012
  },
2008
2013
  onFailure(a, c) {
2009
2014
  const d = a;
2010
- d.status = c.status, d.response = c.errormsg, n && n(d);
2015
+ d.status = c.status, d.response = c.errormsg, t && t(d);
2011
2016
  }
2012
2017
  });
2013
2018
  });
2014
2019
  }
2015
- function he(e, t, n, s) {
2020
+ function he(e, n, t, s) {
2016
2021
  const i = `${e._3DSwym}/api/community/listmembers`, r = {
2017
2022
  params: {
2018
2023
  page: e.page ? e.page : 1,
2019
2024
  limit: e.limit ? e.limit : 50,
2020
- community_id: t
2025
+ community_id: n
2021
2026
  }
2022
2027
  };
2023
2028
  C(e, (o) => {
@@ -2031,7 +2036,7 @@ function he(e, t, n, s) {
2031
2036
  data: JSON.stringify(r),
2032
2037
  type: "json",
2033
2038
  onComplete(a, c, d) {
2034
- n && n(a);
2039
+ t && t(a);
2035
2040
  },
2036
2041
  onFailure(a, c) {
2037
2042
  const d = a;
@@ -2040,7 +2045,7 @@ function he(e, t, n, s) {
2040
2045
  });
2041
2046
  });
2042
2047
  }
2043
- function wt(e, t = void 0, n = void 0) {
2048
+ function wt(e, n = void 0, t = void 0) {
2044
2049
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
2045
2050
  e.commu_id || (e.commu_id = s);
2046
2051
  const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
@@ -2054,25 +2059,25 @@ function wt(e, t = void 0, n = void 0) {
2054
2059
  },
2055
2060
  onComplete(o) {
2056
2061
  const a = JSON.parse(o);
2057
- t && t(a);
2062
+ n && n(a);
2058
2063
  },
2059
2064
  onFailure(o, a) {
2060
2065
  const c = o;
2061
- c.status = a.status, c.response = a.errormsg, n && n(c);
2066
+ c.status = a.status, c.response = a.errormsg, t && t(c);
2062
2067
  }
2063
2068
  });
2064
2069
  });
2065
2070
  }
2066
- function Ct(e, t, n = void 0, s = void 0) {
2071
+ function Ct(e, n, t = void 0, s = void 0) {
2067
2072
  const { listAllContacts: i, currentUser: r, _3DSwym: o } = e;
2068
2073
  console.log("__listAllContacts", i.hits);
2069
2074
  const a = `${o}/api/directmessages`, c = {
2070
- users: [r.login].concat(t.receipt)
2075
+ users: [r.login].concat(n.receipt)
2071
2076
  }, d = {
2072
2077
  id_msg: "",
2073
2078
  senderId: e.currentUser.login,
2074
2079
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
2075
- msg: _e(t.msg)
2080
+ msg: _e(n.msg)
2076
2081
  };
2077
2082
  let p = !1;
2078
2083
  ye(
@@ -2096,7 +2101,7 @@ function Ct(e, t, n = void 0, s = void 0) {
2096
2101
  type: "json",
2097
2102
  onComplete(f, l, g) {
2098
2103
  const h = f;
2099
- h.reponse = JSON.parse(g.response), h.status = g.status, n && n(h), d.id_msg = h.result.id, P(e, d);
2104
+ h.reponse = JSON.parse(g.response), h.status = g.status, t && t(h), d.id_msg = h.result.id, P(e, d);
2100
2105
  },
2101
2106
  onFailure(f, l, g) {
2102
2107
  const h = f;
@@ -2106,7 +2111,7 @@ function Ct(e, t, n = void 0, s = void 0) {
2106
2111
  });
2107
2112
  }, 500);
2108
2113
  }
2109
- function ye(e, t, n, s) {
2114
+ function ye(e, n, t, s) {
2110
2115
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2111
2116
  C(e, (r) => {
2112
2117
  m(i, {
@@ -2118,15 +2123,15 @@ function ye(e, t, n, s) {
2118
2123
  onComplete(o) {
2119
2124
  const a = JSON.parse(o), c = [];
2120
2125
  a.result.forEach((u) => {
2121
- u.users = u.users.sort((f, l) => f.login.localeCompare(l.login)), u.users.length === t.length && c.push(u);
2126
+ u.users = u.users.sort((f, l) => f.login.localeCompare(l.login)), u.users.length === n.length && c.push(u);
2122
2127
  });
2123
- const d = t.sort(), p = c.find((u) => {
2128
+ const d = n.sort(), p = c.find((u) => {
2124
2129
  const f = [];
2125
2130
  return u.users.forEach((l) => {
2126
2131
  f.push(l.login);
2127
2132
  }), JSON.stringify(f) === JSON.stringify(d);
2128
2133
  });
2129
- n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
2134
+ t && p !== void 0 ? t(p) : (s || p === void 0) && s(p);
2130
2135
  },
2131
2136
  onFailure(o) {
2132
2137
  const a = o;
@@ -2135,21 +2140,21 @@ function ye(e, t, n, s) {
2135
2140
  });
2136
2141
  });
2137
2142
  }
2138
- function P(e, t, n = void 0, s = void 0) {
2143
+ function P(e, n, t = void 0, s = void 0) {
2139
2144
  const i = {
2140
2145
  base: e._3DSwym,
2141
2146
  uri: "/api/community",
2142
- id_msg: `${t.id_msg}`,
2147
+ id_msg: `${n.id_msg}`,
2143
2148
  endUri: "/instantmessages"
2144
2149
  }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
2145
- author: { login: t.senderId, displayName: t.senderName },
2150
+ author: { login: n.senderId, displayName: n.senderName },
2146
2151
  accessState: null,
2147
2152
  commentUri: null,
2148
2153
  comments: null,
2149
2154
  endorsements: null,
2150
2155
  moderationState: null,
2151
2156
  parentCommentUri: null,
2152
- richMessage: t.msg
2157
+ richMessage: n.msg
2153
2158
  };
2154
2159
  console.log("_3dSwym_sendDirectMessageData url ", r), C(e, (a) => {
2155
2160
  m(r, {
@@ -2163,7 +2168,7 @@ function P(e, t, n = void 0, s = void 0) {
2163
2168
  type: "json",
2164
2169
  onComplete(c, d, p) {
2165
2170
  const u = c;
2166
- u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), n && n(u);
2171
+ u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), t && t(u);
2167
2172
  },
2168
2173
  onFailure(c, d) {
2169
2174
  const p = c;
@@ -2173,24 +2178,24 @@ function P(e, t, n = void 0, s = void 0) {
2173
2178
  });
2174
2179
  }
2175
2180
  function _e(e) {
2176
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2181
+ const n = (/* @__PURE__ */ new Date()).toLocaleDateString(), t = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2177
2182
  return `<p>${e} </p>
2178
2183
  <br/>
2179
2184
  <hr/>
2180
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
2185
+ <p><u>envoyer :</u>Le <b>${n} à ${t}</b></p>`;
2181
2186
  }
2182
- function bt(e, t, n = void 0, s = void 0) {
2187
+ function bt(e, n, t = void 0, s = void 0) {
2183
2188
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2184
- (c) => c.id === t.community_id
2189
+ (c) => c.id === n.community_id
2185
2190
  ), o = e.swymCommunities.find(
2186
- (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
2191
+ (c) => c.title.toLowerCase() === n.community_title.toLowerCase()
2187
2192
  ), a = {
2188
2193
  params: {
2189
- title: t.title,
2194
+ title: n.title,
2190
2195
  // String, le nom de l'affaire
2191
2196
  community_id: r?.id !== void 0 ? r.id : o.id,
2192
2197
  // String, l'id de la communauté
2193
- message: Se(t.text_html),
2198
+ message: Se(n.text_html),
2194
2199
  // STRING => le contenue du message doit être au format HTML
2195
2200
  published: 1
2196
2201
  // 1 publier, 0 non publier
@@ -2209,7 +2214,7 @@ function bt(e, t, n = void 0, s = void 0) {
2209
2214
  type: "json",
2210
2215
  onComplete(p, u, f) {
2211
2216
  const l = JSON.parse(p);
2212
- l.status = f.status, l.response = f.response, n && n(l);
2217
+ l.status = f.status, l.response = f.response, t && t(l);
2213
2218
  },
2214
2219
  onFailure(p, u, f) {
2215
2220
  const l = p;
@@ -2218,7 +2223,7 @@ function bt(e, t, n = void 0, s = void 0) {
2218
2223
  });
2219
2224
  });
2220
2225
  }
2221
- function Tt(e, t = void 0, n = void 0) {
2226
+ function Tt(e, n = void 0, t = void 0) {
2222
2227
  const s = { base: e.space, uri: "/api/idea/add" };
2223
2228
  if (!Array.isArray(e.swymCommunities)) {
2224
2229
  const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
@@ -2276,7 +2281,7 @@ function Tt(e, t = void 0, n = void 0) {
2276
2281
  data: JSON.stringify(r),
2277
2282
  onComplete(c, d, p) {
2278
2283
  const u = { response: c };
2279
- typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, t && t(u);
2284
+ typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, n && n(u);
2280
2285
  },
2281
2286
  onFailure(c, d, p) {
2282
2287
  const u = JSON.parse(d), f = JSON.parse(c), l = new Error(
@@ -2285,17 +2290,17 @@ function Tt(e, t = void 0, n = void 0) {
2285
2290
  cause: { head: u, rep: f }
2286
2291
  }
2287
2292
  );
2288
- n && n(l);
2293
+ t && t(l);
2289
2294
  }
2290
2295
  };
2291
2296
  m(s.base + s.uri, a);
2292
2297
  });
2293
2298
  }
2294
- function Ot(e, t, n = void 0, s = void 0) {
2299
+ function Ot(e, n, t = void 0, s = void 0) {
2295
2300
  const i = `${e.space}/api/idea/delete`, r = {
2296
2301
  params: {
2297
- community_id: t.community_id,
2298
- ideationIds: [t.idee_id]
2302
+ community_id: n.community_id,
2303
+ ideationIds: [n.idee_id]
2299
2304
  }
2300
2305
  };
2301
2306
  C(e, (o) => {
@@ -2309,7 +2314,7 @@ function Ot(e, t, n = void 0, s = void 0) {
2309
2314
  data: JSON.stringify(r),
2310
2315
  type: "json",
2311
2316
  onComplete(a, c, d) {
2312
- n && n(a);
2317
+ t && t(a);
2313
2318
  },
2314
2319
  onFailure(a, c, d) {
2315
2320
  const p = a;
@@ -2318,7 +2323,7 @@ function Ot(e, t, n = void 0, s = void 0) {
2318
2323
  });
2319
2324
  });
2320
2325
  }
2321
- function $t(e, t = void 0, n = void 0) {
2326
+ function $t(e, n = void 0, t = void 0) {
2322
2327
  const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2323
2328
  if (e.idPost === "") {
2324
2329
  const a = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
@@ -2338,15 +2343,15 @@ function $t(e, t = void 0, n = void 0) {
2338
2343
  },
2339
2344
  data: JSON.stringify(o),
2340
2345
  onComplete(a) {
2341
- a = typeof a == "string" ? JSON.parse(a) : a, t && t({ response: a });
2346
+ a = typeof a == "string" ? JSON.parse(a) : a, n && n({ response: a });
2342
2347
  },
2343
2348
  onFailure(a) {
2344
2349
  const c = a;
2345
- c.status = headers.status, c.response = headers.errormsg, n && n(c);
2350
+ c.status = headers.status, c.response = headers.errormsg, t && t(c);
2346
2351
  }
2347
2352
  });
2348
2353
  }
2349
- function Ut(e, t, n) {
2354
+ function Ut(e, n, t) {
2350
2355
  const {
2351
2356
  _3DSwym: s,
2352
2357
  _3DSwym_token: i,
@@ -2383,17 +2388,17 @@ function Ut(e, t, n) {
2383
2388
  const S = {
2384
2389
  response: typeof g == "string" ? JSON.parse(g) : g
2385
2390
  };
2386
- S.status = y.status, t && t(S);
2391
+ S.status = y.status, n && n(S);
2387
2392
  },
2388
2393
  onFailure(g) {
2389
- n && n(g);
2394
+ t && t(g);
2390
2395
  }
2391
2396
  };
2392
2397
  m(u.base + u.uri, l);
2393
2398
  }
2394
- function xt(e, t, n = void 0, s = void 0) {
2399
+ function xt(e, n, t = void 0, s = void 0) {
2395
2400
  const { _3DSwym: i } = e;
2396
- let { community_id: r, limit: o, page: a, search: c } = t;
2401
+ let { community_id: r, limit: o, page: a, search: c } = n;
2397
2402
  const d = [], p = 1;
2398
2403
  let u = !1, f = 2;
2399
2404
  a || (a = p), o || (o = 100);
@@ -2421,12 +2426,12 @@ function xt(e, t, n = void 0, s = void 0) {
2421
2426
  (F) => F.title.includes(c)
2422
2427
  );
2423
2428
  if (T) {
2424
- n(T);
2429
+ t(T);
2425
2430
  return;
2426
2431
  }
2427
2432
  }
2428
- if (n && f < a && !c) {
2429
- u = !0, n(d);
2433
+ if (t && f < a && !c) {
2434
+ u = !0, t(d);
2430
2435
  return;
2431
2436
  }
2432
2437
  y(S);
@@ -2516,7 +2521,7 @@ function Se(e) {
2516
2521
  <p>
2517
2522
  </p>` : e;
2518
2523
  }
2519
- function It(e, t = void 0, n = void 0) {
2524
+ function It(e, n = void 0, t = void 0) {
2520
2525
  const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2521
2526
  if (s && i && r && o && a) {
2522
2527
  const c = `${i}/api/idea/forward`;
@@ -2534,22 +2539,22 @@ function It(e, t = void 0, n = void 0) {
2534
2539
  }),
2535
2540
  type: "json",
2536
2541
  onComplete(d) {
2537
- t && t(d);
2542
+ n && n(d);
2538
2543
  },
2539
2544
  onFailure(d, p) {
2540
2545
  const u = d;
2541
- u.status = p.status, u.response = p.errormsg, n && n(u);
2546
+ u.status = p.status, u.response = p.errormsg, t && t(u);
2542
2547
  }
2543
2548
  });
2544
2549
  } else
2545
- n && n({
2550
+ t && t({
2546
2551
  status: "error",
2547
2552
  msg: "Credentials incomplet !",
2548
2553
  attend: "tenant, _3DSwym , _3DSwym_token, community_id, idea_id",
2549
2554
  credentials: e
2550
2555
  });
2551
2556
  }
2552
- function Nt(e, t = void 0, n = void 0) {
2557
+ function Rt(e, n = void 0, t = void 0) {
2553
2558
  return new Promise((s, i) => {
2554
2559
  try {
2555
2560
  let r;
@@ -2579,8 +2584,8 @@ function Nt(e, t = void 0, n = void 0) {
2579
2584
  }
2580
2585
  });
2581
2586
  }
2582
- function Rt(e, t, n = void 0, s = void 0) {
2583
- const i = e.space + "/api/user/find/login/" + t;
2587
+ function Nt(e, n, t = void 0, s = void 0) {
2588
+ const i = e.space + "/api/user/find/login/" + n;
2584
2589
  C(
2585
2590
  e,
2586
2591
  (r) => {
@@ -2589,7 +2594,7 @@ function Rt(e, t, n = void 0, s = void 0) {
2589
2594
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2590
2595
  onComplete(o, a, c) {
2591
2596
  const d = JSON.parse(o);
2592
- n && n(d);
2597
+ t && t(d);
2593
2598
  },
2594
2599
  onFailure(o) {
2595
2600
  s && s(o);
@@ -2599,7 +2604,7 @@ function Rt(e, t, n = void 0, s = void 0) {
2599
2604
  s
2600
2605
  );
2601
2606
  }
2602
- function Ft(e, t = void 0, n = void 0) {
2607
+ function Ft(e, n = void 0, t = void 0) {
2603
2608
  const {
2604
2609
  _3DSwym: s,
2605
2610
  _3DSwym_token: i,
@@ -2618,21 +2623,21 @@ function Ft(e, t = void 0, n = void 0) {
2618
2623
  const l = {
2619
2624
  response: typeof p == "string" ? JSON.parse(p) : p
2620
2625
  };
2621
- l.status = f.status, t && t(l);
2626
+ l.status = f.status, n && n(l);
2622
2627
  },
2623
2628
  onFailure(p) {
2624
- n && n(p);
2629
+ t && t(p);
2625
2630
  }
2626
2631
  };
2627
2632
  m(a, d);
2628
2633
  }
2629
- function jt(e, t = void 0, n = void 0) {
2634
+ function jt(e, n = void 0, t = void 0) {
2630
2635
  e.tenant && M(e, (s) => {
2631
2636
  const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2632
- return t && t(i), i;
2637
+ return n && n(i), i;
2633
2638
  });
2634
2639
  }
2635
- function kt(e, t = void 0, n = void 0) {
2640
+ function kt(e, n = void 0, t = void 0) {
2636
2641
  console.log("_Iterop_Auth_CAS"), e.tenant && M(e, (s) => {
2637
2642
  console.log("serviceUrls", s);
2638
2643
  const i = s.services.find(
@@ -2645,47 +2650,47 @@ function kt(e, t = void 0, n = void 0) {
2645
2650
  await fetch(c, {
2646
2651
  method: "POST"
2647
2652
  }).then((d) => d.json()).then(async (d) => {
2648
- t && t(d?.token);
2653
+ n && n(d?.token);
2649
2654
  });
2650
2655
  },
2651
2656
  onFailure(a) {
2652
- n && n(a);
2657
+ t && t(a);
2653
2658
  }
2654
2659
  });
2655
2660
  });
2656
2661
  }
2657
- function Dt(e, t = void 0, n = void 0) {
2662
+ function Dt(e, n = void 0, t = void 0) {
2658
2663
  if (e.tenant) {
2659
2664
  const s = e.tenant.toLowerCase();
2660
2665
  fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2661
2666
  method: "POST"
2662
2667
  }).then((i) => i.json()).then((i) => {
2663
- t && t(i);
2664
- }).catch((i) => {
2665
2668
  n && n(i);
2669
+ }).catch((i) => {
2670
+ t && t(i);
2666
2671
  });
2667
2672
  }
2668
2673
  }
2669
- async function vt(e, t, n = void 0, s = void 0) {
2674
+ async function vt(e, n, t = void 0, s = void 0) {
2670
2675
  if (e.tenant) {
2671
2676
  const i = e.tenant.toLowerCase();
2672
2677
  fetch(
2673
- `https://api.uixhome.fr/${i}/iterop/repository/data/tables?t=${t}`,
2678
+ `https://api.uixhome.fr/${i}/iterop/repository/data/tables?t=${n}`,
2674
2679
  {
2675
2680
  method: "GET"
2676
2681
  }
2677
2682
  ).then((r) => r.json()).then((r) => {
2678
- n && n(r);
2683
+ t && t(r);
2679
2684
  }).catch((r) => {
2680
2685
  s && s(r);
2681
2686
  });
2682
2687
  }
2683
2688
  }
2684
- function At(e, t, n, s = void 0, i = void 0) {
2689
+ function At(e, n, t, s = void 0, i = void 0) {
2685
2690
  if (e.tenant) {
2686
2691
  const r = e.tenant.toLowerCase();
2687
2692
  fetch(
2688
- `https://api.uixhome.fr/${r}/iterop/businesstable/one/${n}?t=${t}`,
2693
+ `https://api.uixhome.fr/${r}/iterop/businesstable/one/${t}?t=${n}`,
2689
2694
  {
2690
2695
  method: "POST"
2691
2696
  }
@@ -2696,11 +2701,11 @@ function At(e, t, n, s = void 0, i = void 0) {
2696
2701
  });
2697
2702
  }
2698
2703
  }
2699
- async function Pt(e, t, n, s = void 0, i = void 0) {
2704
+ async function Pt(e, n, t, s = void 0, i = void 0) {
2700
2705
  if (e.tenant) {
2701
2706
  const r = e.tenant.toLowerCase();
2702
2707
  fetch(
2703
- `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`,
2708
+ `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${t}/?t=${n}`,
2704
2709
  {
2705
2710
  method: "POST"
2706
2711
  }
@@ -2711,24 +2716,24 @@ async function Pt(e, t, n, s = void 0, i = void 0) {
2711
2716
  });
2712
2717
  }
2713
2718
  }
2714
- async function Lt(e, t, n, s, i = void 0, r = void 0) {
2719
+ async function Lt(e, n, t, s, i = void 0, r = void 0) {
2715
2720
  if (e.tenant) {
2716
2721
  const o = e.tenant.toLowerCase();
2717
2722
  fetch(
2718
- `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2723
+ `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${s}`,
2719
2724
  {
2720
2725
  method: "POST"
2721
2726
  }
2722
2727
  ).then((a) => a.json()).then((a) => {
2723
2728
  i && i(a);
2724
2729
  }).catch((a) => {
2725
- r && r(a, n, s);
2730
+ r && r(a, t, s);
2726
2731
  });
2727
2732
  }
2728
2733
  }
2729
- async function Mt(e, t, n, s, i, r = void 0, o = void 0) {
2734
+ async function Mt(e, n, t, s, i, r = void 0, o = void 0) {
2730
2735
  if (e.tenant) {
2731
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2736
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${t}?t=${n}&c=${encodeURIComponent(
2732
2737
  s
2733
2738
  )}&b=${encodeURIComponent(i)}`;
2734
2739
  fetch(a, {
@@ -2738,16 +2743,16 @@ async function Mt(e, t, n, s, i, r = void 0, o = void 0) {
2738
2743
  }).catch((c) => {
2739
2744
  o && o({
2740
2745
  error: c,
2741
- tableId: n,
2746
+ tableId: t,
2742
2747
  columns: s,
2743
2748
  body: i
2744
2749
  });
2745
2750
  });
2746
2751
  }
2747
2752
  }
2748
- async function Jt(e, t, n, s, i = void 0, r = void 0) {
2753
+ async function Jt(e, n, t, s, i = void 0, r = void 0) {
2749
2754
  if (e.tenant) {
2750
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2755
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${t}?t=${n}&b=${encodeURIComponent(
2751
2756
  s
2752
2757
  )}`;
2753
2758
  fetch(o, {
@@ -2762,10 +2767,10 @@ async function Jt(e, t, n, s, i = void 0, r = void 0) {
2762
2767
  });
2763
2768
  }
2764
2769
  }
2765
- async function Gt(e, t, n, s = void 0, i = void 0) {
2770
+ async function Gt(e, n, t, s = void 0, i = void 0) {
2766
2771
  if (e.tenant) {
2767
- const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2768
- n
2772
+ const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${n}&b=${encodeURIComponent(
2773
+ t
2769
2774
  )}`;
2770
2775
  fetch(r, {
2771
2776
  method: "POST"
@@ -2779,11 +2784,11 @@ async function Gt(e, t, n, s = void 0, i = void 0) {
2779
2784
  });
2780
2785
  }
2781
2786
  }
2782
- async function Kt(e, t, n, s, i = void 0, r = void 0) {
2787
+ async function Bt(e, n, t, s, i = void 0, r = void 0) {
2783
2788
  if (e.tenant) {
2784
2789
  const o = e.tenant.toLowerCase();
2785
2790
  fetch(
2786
- `https://api.uixhome.fr/${o}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2791
+ `https://api.uixhome.fr/${o}/iterop/runtime/processes/${t}?t=${n}&b=${s}`,
2787
2792
  {
2788
2793
  method: "POST"
2789
2794
  }
@@ -2794,11 +2799,11 @@ async function Kt(e, t, n, s, i = void 0, r = void 0) {
2794
2799
  });
2795
2800
  }
2796
2801
  }
2797
- async function Bt(e, t, n, s = void 0, i = void 0) {
2802
+ async function Kt(e, n, t, s = void 0, i = void 0) {
2798
2803
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2799
2804
  const r = e.tenant.toLowerCase();
2800
2805
  fetch(
2801
- `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
2806
+ `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${t}/?t=${n}`,
2802
2807
  {
2803
2808
  method: "POST"
2804
2809
  }
@@ -2809,11 +2814,11 @@ async function Bt(e, t, n, s = void 0, i = void 0) {
2809
2814
  });
2810
2815
  }
2811
2816
  }
2812
- async function Et(e, t, n, s, i, r = void 0, o = void 0) {
2817
+ async function Et(e, n, t, s, i, r = void 0, o = void 0) {
2813
2818
  if (e.tenant) {
2814
2819
  const a = e.tenant.toLowerCase();
2815
2820
  fetch(
2816
- `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2821
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${s}&b=${i}`,
2817
2822
  {
2818
2823
  method: "POST"
2819
2824
  }
@@ -2824,11 +2829,11 @@ async function Et(e, t, n, s, i, r = void 0, o = void 0) {
2824
2829
  });
2825
2830
  }
2826
2831
  }
2827
- async function qt(e, t, n, s, i = void 0, r = void 0) {
2832
+ async function qt(e, n, t, s, i = void 0, r = void 0) {
2828
2833
  if (e.tenant) {
2829
2834
  const o = e.tenant.toLowerCase();
2830
2835
  fetch(
2831
- `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2836
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${t}/?t=${n}&b=${s}`,
2832
2837
  {
2833
2838
  method: "POST"
2834
2839
  }
@@ -2840,11 +2845,11 @@ async function qt(e, t, n, s, i = void 0, r = void 0) {
2840
2845
  }
2841
2846
  }
2842
2847
  //!SECTION
2843
- async function Xt(e, t, n, s = void 0, i = void 0) {
2848
+ async function Xt(e, n, t, s = void 0, i = void 0) {
2844
2849
  if (e.tenant) {
2845
2850
  const r = e.tenant.toLowerCase();
2846
2851
  fetch(
2847
- `https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
2852
+ `https://api.uixhome.fr/${r}/iterop/list/one/${t}/?t=${n}`,
2848
2853
  {
2849
2854
  method: "POST"
2850
2855
  }
@@ -2857,16 +2862,16 @@ async function Xt(e, t, n, s = void 0, i = void 0) {
2857
2862
  }
2858
2863
  //!SECTION
2859
2864
  function Wt(e) {
2860
- const t = "Hello " + e;
2861
- return console.log(t), t;
2865
+ const n = "Hello " + e;
2866
+ return console.log(n), n;
2862
2867
  }
2863
- function Vt(e, t = void 0, n = void 0) {
2868
+ function Vt(e, n = void 0, t = void 0) {
2864
2869
  return console.log("credentials", e), new Promise((s) => {
2865
2870
  if (e.token === "" && b(e), !e.space || e.space === "") {
2866
2871
  const o = Z();
2867
2872
  console.log("platformeInfo", o);
2868
2873
  }
2869
- R(
2874
+ N(
2870
2875
  e,
2871
2876
  "Common space",
2872
2877
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2925,16 +2930,16 @@ function Vt(e, t = void 0, n = void 0) {
2925
2930
  }),
2926
2931
  type: "json",
2927
2932
  onComplete(d) {
2928
- t && t(d);
2933
+ n && n(d);
2929
2934
  },
2930
2935
  onFailure(d) {
2931
- n && n(d);
2936
+ t && t(d);
2932
2937
  }
2933
2938
  });
2934
2939
  }
2935
2940
  },
2936
2941
  onFailure(o) {
2937
- n && n(o);
2942
+ t && t(o);
2938
2943
  }
2939
2944
  });
2940
2945
  });
@@ -2948,16 +2953,16 @@ export {
2948
2953
  at as _3DSpace_bookmark_addSubsciptions,
2949
2954
  ot as _3DSpace_bookmark_newWorkspace,
2950
2955
  b as _3DSpace_csrf,
2951
- B as _3DSpace_download_doc,
2956
+ K as _3DSpace_download_doc,
2952
2957
  ce as _3DSpace_download_multidoc,
2953
2958
  G as _3DSpace_file_update,
2954
2959
  oe as _3DSpace_file_update_csr,
2955
2960
  Ve as _3DSpace_file_url_csr,
2956
- N as _3DSpace_get_csrf,
2961
+ R as _3DSpace_get_csrf,
2957
2962
  J as _3DSpace_get_docInfo,
2958
2963
  de as _3DSpace_get_downloadTicket_multidoc,
2959
2964
  We as _3DSpace_get_multiDocInfo,
2960
- R as _3DSpace_get_securityContexts,
2965
+ N as _3DSpace_get_securityContexts,
2961
2966
  k as _3DSpace_get_ticket,
2962
2967
  st as _3DSpace_lifecycle_changeRevision,
2963
2968
  et as _3DSpace_lifecycle_changeState,
@@ -2980,8 +2985,8 @@ export {
2980
2985
  he as _3DSwym_getMembersCommunity,
2981
2986
  $t as _3DSwym_getOneIdea,
2982
2987
  C as _3DSwym_get_Token,
2983
- Nt as _3DSwym_get_currentUser,
2984
- Rt as _3DSwym_get_findUser,
2988
+ Rt as _3DSwym_get_currentUser,
2989
+ Nt as _3DSwym_get_findUser,
2985
2990
  Tt as _3DSwym_postIdea,
2986
2991
  bt as _3DSwym_postIdeaTemplate,
2987
2992
  P as _3DSwym_sendMessageData,
@@ -2989,7 +2994,7 @@ export {
2989
2994
  Pe as _AppMngt_get_users,
2990
2995
  Lt as _Iterop_AddOrRemoveRows,
2991
2996
  kt as _Iterop_Auth_CAS,
2992
- Bt as _Iterop_GetOneDependencyTable,
2997
+ Kt as _Iterop_GetOneDependencyTable,
2993
2998
  Xt as _Iterop_GetOneList,
2994
2999
  Et as _Iterop_PatchDependencyTable,
2995
3000
  qt as _Iterop_PutDependencyTable,
@@ -2999,7 +3004,7 @@ export {
2999
3004
  At as _Iterop_getOneBusinessTable,
3000
3005
  Pt as _Iterop_getOneBusinessTableRows,
3001
3006
  Dt as _Iterop_jwtUser,
3002
- Kt as _Iterop_runProcess,
3007
+ Bt as _Iterop_runProcess,
3003
3008
  Jt as _Iterop_updateBusinessTable,
3004
3009
  De as _getMe,
3005
3010
  Z as _getPlateformInfos,
@@ -3008,7 +3013,7 @@ export {
3008
3013
  ve as _getServiceUrl_3DPassport,
3009
3014
  jt as _getServiceUrl_Iterop,
3010
3015
  m as _httpCallAuthenticated,
3011
- Re as _setDraggable,
3016
+ Ne as _setDraggable,
3012
3017
  je as _setDroppable,
3013
3018
  Fe as _setupTagger,
3014
3019
  mt as addTagToDoc,
@@ -3017,7 +3022,7 @@ export {
3017
3022
  z as couleurs,
3018
3023
  Me as createUserGroups,
3019
3024
  pe as dataMixing,
3020
- Be as deleteUserGroups,
3025
+ Ke as deleteUserGroups,
3021
3026
  xe as findAdresse,
3022
3027
  rt as getAllContextSecurity,
3023
3028
  te as getCSRFToken,
@@ -3029,7 +3034,7 @@ export {
3029
3034
  ft as getDatasFrom3DSpace,
3030
3035
  dt as getDownloadDocument,
3031
3036
  ht as getInfoDocTags,
3032
- Ke as getUserGroupsByURIList,
3037
+ Be as getUserGroupsByURIList,
3033
3038
  Ge as getUserGroupsList,
3034
3039
  ee as getUsersGroupRules,
3035
3040
  pt as get_3DSpace_csrf,
@@ -3039,6 +3044,6 @@ export {
3039
3044
  Xe as readUserGroupControl,
3040
3045
  gt as removeTagToDoc,
3041
3046
  Wt as sayHello,
3042
- Ne as updateEvent
3047
+ Re as updateEvent
3043
3048
  };
3044
3049
  //# sourceMappingURL=wb3Api.js.map