@beam3_dev/api_module 0.0.302 → 0.0.304

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,6 +1,6 @@
1
1
  import { v4 as V } from "uuid";
2
2
  import { DateTime as O } from "luxon";
3
- import { requirejs as $, widget as L } from "@widget-lab/3ddashboard-utils";
3
+ import { requirejs as $, widget as A } from "@widget-lab/3ddashboard-utils";
4
4
  function Y() {
5
5
  return V();
6
6
  }
@@ -34,10 +34,10 @@ const z = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function xe(e, t = void 0, s = void 0) {
38
- const n = parseInt(e);
37
+ async function Ne(e, t = void 0, n = void 0) {
38
+ const s = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
@@ -47,10 +47,10 @@ async function xe(e, t = void 0, s = void 0) {
47
47
  ).then((i) => i.json()).then((i) => {
48
48
  t && t(i);
49
49
  }).catch((i) => {
50
- s && s(i), console.error("Erreur : " + i);
50
+ n && n(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function Ne(e, t = void 0, s = void 0) {
53
+ async function xe(e, t = void 0, n = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -59,19 +59,19 @@ async function Ne(e, t = void 0, s = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((n) => n.json()).then((n) => {
63
- t && t(n);
64
- }).catch((n) => {
65
- s && s(n), console.error("Erreur : " + n);
62
+ ).then((s) => s.json()).then((s) => {
63
+ t && t(s);
64
+ }).catch((s) => {
65
+ n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
68
  async function Ie(e, t = z) {
69
- let s = O.now().year;
70
- const n = e, i = [], r = (o) => {
69
+ let n = O.now().year;
70
+ const s = e, i = [], r = (o) => {
71
71
  for (let c in o)
72
72
  i.push({ date: c, comment: o[c] });
73
73
  };
74
- for (let o = s; o <= s + 1; o++)
74
+ for (let o = n; o <= n + 1; o++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + o + ".json",
77
77
  {
@@ -84,9 +84,9 @@ async function Ie(e, t = z) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const o = n.length === 0 ? {
87
+ const o = s.length === 0 ? {
88
88
  events: []
89
- } : n;
89
+ } : s;
90
90
  for (let c of i)
91
91
  o.events.findIndex(
92
92
  (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
@@ -100,26 +100,26 @@ async function Ie(e, t = z) {
100
100
  return o;
101
101
  })();
102
102
  }
103
- function H(e, t, s) {
104
- const { credentials: n, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
103
+ function H(e, t, n) {
104
+ const { credentials: s, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
107
107
  o.push(d);
108
108
  }
109
109
  Q(
110
- { credentials: n, chunks: o, initLoop: 0, fn: a },
110
+ { credentials: s, chunks: o, initLoop: 0, fn: a },
111
111
  (c) => {
112
112
  t && t(c);
113
113
  },
114
114
  (c) => {
115
- s && s(c);
115
+ n && n(c);
116
116
  }
117
117
  );
118
118
  }
119
- function Q(e, t, s) {
120
- const { credentials: n, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
119
+ function Q(e, t, n) {
120
+ const { credentials: s, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
121
121
  a(
122
- n,
122
+ s,
123
123
  i[c],
124
124
  () => {
125
125
  c++, c < i.length && o(c);
@@ -128,54 +128,54 @@ function Q(e, t, s) {
128
128
  t && t(d);
129
129
  },
130
130
  (d) => {
131
- s && s(d);
131
+ n && n(d);
132
132
  }
133
133
  );
134
134
  };
135
135
  o(r);
136
136
  }
137
- async function Ue(e, t, s = !0) {
138
- const n = e.events.findIndex((i) => i.uuid === t.uuid);
139
- return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
137
+ async function Ue(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;
140
140
  }
141
141
  function m(e, t) {
142
- $(["DS/WAFData/WAFData"], (s) => {
143
- s.authenticatedRequest(e, t);
142
+ $(["DS/WAFData/WAFData"], (n) => {
143
+ n.authenticatedRequest(e, t);
144
144
  });
145
145
  }
146
- function Fe(e, t, s) {
147
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
148
- n.draggable(e, {
146
+ function Fe(e, t, n) {
147
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
148
+ s.draggable(e, {
149
149
  data: t,
150
- start: s
150
+ start: n
151
151
  });
152
152
  });
153
153
  }
154
154
  function Re(e, t = void 0) {
155
- $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
156
- let n;
157
- n === void 0 && (n = s.createProxy({
158
- widgetId: L.id,
155
+ $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
156
+ let s;
157
+ s === void 0 && (s = n.createProxy({
158
+ widgetId: A.id,
159
159
  filteringMode: "WithFilteringServices"
160
- }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
160
+ }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
161
161
  });
162
162
  }
163
- function je(e, t) {
164
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
165
- s.droppable(e, {
163
+ function De(e, t) {
164
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
165
+ n.droppable(e, {
166
166
  drop: t
167
167
  });
168
168
  });
169
169
  }
170
- async function ke(e, t = void 0, s = void 0) {
170
+ async function je(e, t = void 0, n = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
- (n) => {
174
- (!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
- n.getPlatformServices({
173
+ (s) => {
174
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
+ s.getPlatformServices({
176
176
  platformId: e,
177
177
  onComplete: t,
178
- onFailure: s
178
+ onFailure: n
179
179
  })
180
180
  );
181
181
  }
@@ -184,53 +184,53 @@ async function ke(e, t = void 0, s = void 0) {
184
184
  function Z() {
185
185
  let e = {};
186
186
  return $(["DS/PlatformAPI/PlatformAPI"], (t) => {
187
- const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
187
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
188
188
  "com.3ds.wp.passport.cors"
189
189
  );
190
190
  e = {
191
- tenant: s,
192
- user: n,
191
+ tenant: n,
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, s = void 0) {
198
+ function ke(e, t = void 0, n = void 0) {
199
199
  if (e.tenant) {
200
- const n = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
- m(n, {
200
+ const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
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) : s && s("_getMe return not find properties fields");
204
+ r && "fields" in r ? t && t(r.fields) : n && n("_getMe return not find properties fields");
205
205
  },
206
206
  onFailure(i) {
207
- s && s("_getMe return error", i);
207
+ n && n("_getMe return error", i);
208
208
  }
209
209
  });
210
210
  }
211
211
  }
212
- function M(e, t = void 0, s = void 0) {
212
+ function P(e, t = void 0, n = void 0) {
213
213
  if (console.log("_getServiceUrl"), e.tenant) {
214
- const n = `https://${e.tenant.toLowerCase()}-eu1-compass.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?platform=${e.tenant.toUpperCase()}&cors=true&xrequestedwith=xmlhttprequest`;
215
- m(n, {
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
+ m(s, {
216
216
  onComplete(i) {
217
217
  const r = typeof i == "string" ? JSON.parse(i) : i;
218
218
  if (r && "platforms" in r) {
219
219
  const a = r.platforms.find((o) => o.id === e.tenant.toUpperCase());
220
- t && a ? t(a) : s && s("_getServiceUrl return listServiceUrl = undefined");
220
+ t && a ? t(a) : n && n("_getServiceUrl return listServiceUrl = undefined");
221
221
  } else
222
- s && s("_getServiceUrl return oResponse = undefined");
222
+ n && n("_getServiceUrl return oResponse = undefined");
223
223
  },
224
224
  onFailure(i) {
225
- s && s(i);
225
+ n && n(i);
226
226
  }
227
227
  });
228
228
  }
229
229
  }
230
- function ve(e, t = void 0, s = void 0) {
230
+ function ve(e, t = void 0, n = void 0) {
231
231
  if (e.tenant) {
232
- const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
- m(n, {
232
+ const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
+ m(s, {
234
234
  onComplete(i) {
235
235
  const r = JSON.parse(i);
236
236
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
@@ -239,18 +239,18 @@ function ve(e, t = void 0, s = void 0) {
239
239
  }
240
240
  },
241
241
  onFailure(i) {
242
- s && s(i);
242
+ n && n(i);
243
243
  }
244
244
  });
245
245
  }
246
246
  }
247
- function Ae(e, t, s) {
248
- const n = {
247
+ function Ae(e, t, n) {
248
+ const s = {
249
249
  base: `${e.space}`,
250
250
  uri: "/resources/AppsMngt/api/custom/applications",
251
251
  option: `?filter=${e.tenant}`
252
252
  // facultatif
253
- }, i = `${n.base}${n.uri}${n.option}`;
253
+ }, i = `${s.base}${s.uri}${s.option}`;
254
254
  m(i, {
255
255
  method: "GET",
256
256
  headers: {
@@ -266,41 +266,41 @@ function Ae(e, t, s) {
266
266
  },
267
267
  onFailure(r, a) {
268
268
  const o = r;
269
- o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
269
+ o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
270
270
  }
271
271
  });
272
272
  }
273
- function Pe(e, t = void 0, s = void 0) {
274
- let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
275
- m(n, {
273
+ function Pe(e, t = void 0, n = void 0) {
274
+ let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
275
+ m(s, {
276
276
  onComplete(i, r, a) {
277
277
  const o = JSON.parse(i);
278
278
  console.log("_AppMngt_get_users => ", o), t && t(o);
279
279
  },
280
280
  onFailure(i, r) {
281
281
  const a = i;
282
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
282
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
283
283
  }
284
284
  });
285
285
  }
286
- function Le(e, t, s = void 0, n = void 0) {
286
+ function Le(e, t, n = void 0, s = void 0) {
287
287
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
288
288
  m(i, {
289
289
  onComplete(r, a, o) {
290
290
  const c = JSON.parse(r);
291
- s && s(c);
291
+ n && n(c);
292
292
  },
293
293
  onFailure(r, a) {
294
294
  const o = r;
295
- o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
295
+ o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
296
296
  }
297
297
  });
298
298
  }
299
- const j = {
299
+ const D = {
300
300
  "Content-Type": "application/json",
301
301
  Accept: "application/json,text/javascript,*/*"
302
302
  };
303
- function Me(e, t, s = void 0, n = void 0) {
303
+ function Me(e, t, n = void 0, s = void 0) {
304
304
  const { space: i, currentUser: r } = e, o = `${i}${{
305
305
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
306
306
  }.URIUGr}`, c = {
@@ -317,19 +317,19 @@ function Me(e, t, s = void 0, n = void 0) {
317
317
  };
318
318
  m(o, {
319
319
  method: "POST",
320
- headers: j,
320
+ headers: D,
321
321
  data: JSON.stringify(c),
322
322
  onComplete(d) {
323
- s && s(JSON.parse(d));
323
+ n && n(JSON.parse(d));
324
324
  },
325
325
  onFailure(d, u) {
326
326
  console.log(d);
327
327
  const p = d;
328
- p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
328
+ p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
329
329
  }
330
330
  });
331
331
  }
332
- function Je(e, t, s = void 0, n = void 0) {
332
+ function Je(e, t, n = void 0, s = void 0) {
333
333
  const { space: i, tenant: r } = e, a = i, o = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${a}${o}${c}`;
334
334
  m(d, {
335
335
  opts: {
@@ -340,16 +340,16 @@ function Je(e, t, s = void 0, n = void 0) {
340
340
  }
341
341
  },
342
342
  onComplete(f) {
343
- s && s(JSON.parse(f));
343
+ n && n(JSON.parse(f));
344
344
  },
345
345
  onFailure(f, l) {
346
346
  const h = f;
347
- h.msg = l.errormsg, h.errCode = l.errorcode, n && n(h);
347
+ h.msg = l.errormsg, h.errCode = l.errorcode, s && s(h);
348
348
  }
349
349
  });
350
350
  }
351
- function ee(e, t = void 0, s = void 0) {
352
- const { space: n, tenant: i } = e, r = n, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
351
+ function ee(e, t = void 0, n = void 0) {
352
+ const { space: s, tenant: i } = e, r = s, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
353
353
  method: "GET",
354
354
  Accept: "application/json,*/*,test/javascript"
355
355
  }, d = `${r}${a}${o}`;
@@ -360,12 +360,12 @@ function ee(e, t = void 0, s = void 0) {
360
360
  },
361
361
  onFailure(u, p) {
362
362
  const f = u;
363
- f.msg = p.errormsg, f.errCode = p.errorcode, s && s(f);
363
+ f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
364
364
  }
365
365
  });
366
366
  }
367
- function Ge(e, t = void 0, s = void 0) {
368
- const { space: n, currentUser: i } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
367
+ function Ge(e, t = void 0, n = void 0) {
368
+ const { space: s, currentUser: i } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
369
369
  "Content-Type": "application/json",
370
370
  Accept: "application/json,text/javascript,*/*"
371
371
  } };
@@ -382,13 +382,13 @@ function Ge(e, t = void 0, s = void 0) {
382
382
  f.rules = y, t && t(f);
383
383
  },
384
384
  (y) => {
385
- s && s(y);
385
+ n && n(y);
386
386
  }
387
387
  );
388
388
  }
389
389
  },
390
390
  onFailure(u) {
391
- s && s(u);
391
+ n && n(u);
392
392
  }
393
393
  });
394
394
  } catch (u) {
@@ -396,12 +396,12 @@ function Ge(e, t = void 0, s = void 0) {
396
396
  }
397
397
  }
398
398
  function Ke(e, t) {
399
- const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
399
+ const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
400
400
  m(i, {
401
401
  method: "DELETE"
402
402
  });
403
403
  }
404
- function qe(e, t, s, n = void 0, i = void 0) {
404
+ function Be(e, t, n, s = void 0, i = void 0) {
405
405
  const { space: r, tenant: a } = e, o = {
406
406
  URITI: "/3drdfpersist/resources/v1/template-instances",
407
407
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -410,36 +410,36 @@ function qe(e, t, s, n = void 0, i = void 0) {
410
410
  nexURImem: "/members",
411
411
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
412
412
  OPTsTenant: `tenant=dstenant:${a}`
413
- }, c = s, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
413
+ }, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
414
414
  m(d, {
415
- headers: j,
415
+ headers: D,
416
416
  method: "PATCH",
417
417
  data: u,
418
418
  type: "json",
419
419
  onComplete(p) {
420
- n && n(p);
420
+ s && s(p);
421
421
  },
422
422
  onFailure(p) {
423
423
  i && i(p);
424
424
  }
425
425
  });
426
426
  }
427
- function Be(e, t, s, n = void 0, i = void 0) {
427
+ function qe(e, t, n, s = void 0, i = void 0) {
428
428
  const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
429
429
  m(o, {
430
430
  method: "PATCH",
431
- headers: j,
432
- data: JSON.stringify(s),
431
+ headers: D,
432
+ data: JSON.stringify(n),
433
433
  type: "json",
434
434
  onComplete(d) {
435
- n && n(d);
435
+ s && s(d);
436
436
  },
437
437
  onFailure(d) {
438
438
  i && i(d);
439
439
  }
440
440
  });
441
441
  }
442
- function Ee(e, t, s = void 0, n = void 0) {
442
+ function Ee(e, t, n = void 0, s = void 0) {
443
443
  const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
444
444
  m(a, {
445
445
  opts: {
@@ -450,43 +450,43 @@ function Ee(e, t, s = void 0, n = void 0) {
450
450
  }
451
451
  },
452
452
  onComplete(d) {
453
- s && s(JSON.parse(d));
453
+ n && n(JSON.parse(d));
454
454
  },
455
455
  onFailure(d) {
456
- n && n(d);
456
+ s && s(d);
457
457
  }
458
458
  });
459
459
  }
460
- async function te(e, t, s) {
460
+ async function te(e, t, n) {
461
461
  if (e.space) {
462
- const n = `${e.space}/resources/v1/application/CSRF`;
463
- m(n, {
462
+ const s = `${e.space}/resources/v1/application/CSRF`;
463
+ m(s, {
464
464
  onComplete(i) {
465
465
  i = JSON.parse(i), t && t(i.csrf);
466
466
  },
467
467
  onFailure(i, r, a) {
468
- s && s({ error: i, headers: r, xhr: a });
468
+ n && n({ error: i, headers: r, xhr: a });
469
469
  }
470
470
  });
471
471
  }
472
472
  }
473
- var N = {};
473
+ var I = {};
474
474
  function ne(e, t) {
475
475
  return Object.prototype.hasOwnProperty.call(e, t);
476
476
  }
477
- var se = function(e, t, s, n) {
478
- t = t || "&", s = s || "=";
477
+ var se = function(e, t, n, s) {
478
+ t = t || "&", n = n || "=";
479
479
  var i = {};
480
480
  if (typeof e != "string" || e.length === 0)
481
481
  return i;
482
482
  var r = /\+/g;
483
483
  e = e.split(t);
484
484
  var a = 1e3;
485
- n && typeof n.maxKeys == "number" && (a = n.maxKeys);
485
+ s && typeof s.maxKeys == "number" && (a = s.maxKeys);
486
486
  var o = e.length;
487
487
  a > 0 && o > a && (o = a);
488
488
  for (var c = 0; c < o; ++c) {
489
- var d = e[c].replace(r, "%20"), u = d.indexOf(s), p, f, l, h;
489
+ var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, h;
490
490
  u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), h = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(h) : i[l] = [i[l], h] : i[l] = h;
491
491
  }
492
492
  return i;
@@ -501,17 +501,17 @@ var se = function(e, t, s, n) {
501
501
  default:
502
502
  return "";
503
503
  }
504
- }, ie = function(e, t, s, n) {
505
- return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
506
- var r = encodeURIComponent(x(i)) + s;
504
+ }, ie = function(e, t, n, s) {
505
+ return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
506
+ var r = encodeURIComponent(x(i)) + n;
507
507
  return Array.isArray(e[i]) ? e[i].map(function(a) {
508
508
  return r + encodeURIComponent(x(a));
509
509
  }).join(t) : r + encodeURIComponent(x(e[i]));
510
- }).filter(Boolean).join(t) : n ? encodeURIComponent(x(n)) + s + encodeURIComponent(x(e)) : "";
510
+ }).filter(Boolean).join(t) : s ? encodeURIComponent(x(s)) + n + encodeURIComponent(x(e)) : "";
511
511
  };
512
- N.decode = N.parse = se;
513
- N.encode = N.stringify = ie;
514
- async function J(e, t = void 0, s = void 0, n = void 0) {
512
+ I.decode = I.parse = se;
513
+ I.encode = I.stringify = ie;
514
+ async function L(e, t = void 0, n = void 0, s = void 0) {
515
515
  const i = e.space;
516
516
  if (t === void 0) {
517
517
  console.log("Le paramètre docid est obligatoire");
@@ -521,20 +521,20 @@ async function J(e, t = void 0, s = void 0, n = void 0) {
521
521
  m(r, {
522
522
  onComplete(a, o, c) {
523
523
  const d = JSON.parse(a);
524
- s && s(d);
524
+ n && n(d);
525
525
  },
526
526
  onFailure(a) {
527
- n && n(a);
527
+ s && s(a);
528
528
  }
529
529
  });
530
530
  }
531
- async function Xe(e, t = void 0, s = void 0, n = void 0) {
531
+ async function Xe(e, t = void 0, n = void 0, s = void 0) {
532
532
  const i = e.space;
533
533
  if (t === void 0) {
534
534
  console.log("Le paramètre docids est obligatoire");
535
535
  return;
536
536
  }
537
- let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, a = N.stringify({
537
+ let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, a = I.stringify({
538
538
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
539
539
  });
540
540
  m(r, {
@@ -545,46 +545,46 @@ async function Xe(e, t = void 0, s = void 0, n = void 0) {
545
545
  data: a,
546
546
  onComplete(o, c, d) {
547
547
  const u = JSON.parse(o);
548
- s && s(u);
548
+ n && n(u);
549
549
  },
550
550
  onFailure(o) {
551
- n && n(o);
551
+ s && s(o);
552
552
  }
553
553
  });
554
554
  }
555
- function U(e, t = void 0, s = void 0) {
555
+ function U(e, t = void 0, n = void 0) {
556
556
  if (e.objID && e.objID !== "") {
557
- let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
558
- m(n, {
557
+ let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
558
+ m(s, {
559
559
  onComplete(i, r, a) {
560
560
  const o = JSON.parse(i);
561
561
  e.success = !0, e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
562
562
  },
563
563
  onFailure(i) {
564
- s && s(i);
564
+ n && n(i);
565
565
  }
566
566
  });
567
567
  } else
568
- b(
568
+ T(
569
569
  e,
570
- (n) => {
571
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), e.token = n, t && t(e);
570
+ (s) => {
571
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), e.token = s, t && t(e);
572
572
  },
573
- (n) => {
574
- s && s(n);
573
+ (s) => {
574
+ n && n(s);
575
575
  }
576
576
  );
577
577
  }
578
- function b(e, t = void 0, s = void 0) {
578
+ function T(e, t = void 0, n = void 0) {
579
579
  if (e.space) {
580
- const n = e.space + "/resources/v1/application/CSRF";
581
- m(n, {
580
+ const s = e.space + "/resources/v1/application/CSRF";
581
+ m(s, {
582
582
  onComplete(i, r, a) {
583
583
  const o = JSON.parse(i);
584
584
  t && t(o.csrf.value);
585
585
  },
586
586
  onFailure(i, r, a) {
587
- s && s({
587
+ n && n({
588
588
  response: i,
589
589
  headers: r,
590
590
  xhr: a
@@ -592,14 +592,14 @@ function b(e, t = void 0, s = void 0) {
592
592
  }
593
593
  });
594
594
  } else
595
- s && s("ERROR : url du 3DSpace non défini.");
595
+ n && n("ERROR : url du 3DSpace non défini.");
596
596
  }
597
- function k(e, t = void 0, s = void 0) {
598
- let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
597
+ function j(e, t = void 0, n = void 0) {
598
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
599
599
  U(
600
600
  e,
601
601
  (i) => {
602
- m(n, {
602
+ m(s, {
603
603
  method: "PUT",
604
604
  headers: {
605
605
  ENO_CSRF_TOKEN: e.token
@@ -609,28 +609,28 @@ function k(e, t = void 0, s = void 0) {
609
609
  t && t(c, a);
610
610
  },
611
611
  onFailure(r, a) {
612
- console.warn("☠️ error => ", r, a), s && s(r, a);
612
+ console.warn("☠️ error => ", r, a), n && n(r, a);
613
613
  }
614
614
  });
615
615
  },
616
616
  (i) => {
617
- console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
617
+ console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
618
618
  }
619
619
  );
620
620
  }
621
- function We(e, t, s = void 0, n = void 0, i = void 0) {
621
+ function We(e, t, n = void 0, s = void 0, i = void 0) {
622
622
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
623
- s || (s = e.token), m(r, {
623
+ n || (n = e.token), m(r, {
624
624
  method: "PUT",
625
625
  headers: {
626
- ENO_CSRF_TOKEN: s
626
+ ENO_CSRF_TOKEN: n
627
627
  },
628
628
  onComplete(a) {
629
629
  let o = JSON.parse(a);
630
630
  if (console.log("☠️ info => ", o), o.success === !0)
631
631
  try {
632
632
  const c = o.data[0].dataelements.ticketURL;
633
- n && n(c);
633
+ s && s(c);
634
634
  } catch (c) {
635
635
  i && i(c);
636
636
  }
@@ -640,12 +640,12 @@ function We(e, t, s = void 0, n = void 0, i = void 0) {
640
640
  }
641
641
  });
642
642
  }
643
- function G(e, t, s, n, i, r = void 0, a = void 0) {
643
+ function M(e, t, n, s, i, r = void 0, a = void 0) {
644
644
  const o = () => ae(
645
645
  e,
646
646
  t,
647
- s,
648
647
  n,
648
+ s,
649
649
  i,
650
650
  e.token,
651
651
  r,
@@ -662,7 +662,7 @@ function G(e, t, s, n, i, r = void 0, a = void 0) {
662
662
  }
663
663
  );
664
664
  }
665
- function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
665
+ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
666
666
  const c = e.space + `/resources/v1/modeler/documents/files/CheckinTicket?tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`;
667
667
  m(c, {
668
668
  method: "PUT",
@@ -680,7 +680,7 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
680
680
  onComplete(d, u, p) {
681
681
  const f = d.csrf, l = d.data[0].dataelements, h = new FormData();
682
682
  let g;
683
- n instanceof Blob ? g = n : g = new Blob([n], {
683
+ s instanceof Blob ? g = s : g = new Blob([s], {
684
684
  type: "text/plain"
685
685
  }), h.append(l.ticketparamname, l.ticket), h.append("file_0", g, i);
686
686
  const _ = {};
@@ -728,11 +728,11 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
728
728
  }
729
729
  });
730
730
  }
731
- async function Ve(e, t, s = void 0, n = void 0) {
731
+ async function Ve(e, t, n = void 0, s = void 0) {
732
732
  e.space, e.token, e.ctx;
733
733
  const i = e?.description, r = e?.title;
734
734
  if (!t) {
735
- console.warn("Error: docId undefined"), n && n("Error: docId undefined");
735
+ console.warn("Error: docId undefined"), s && s("Error: docId undefined");
736
736
  return;
737
737
  }
738
738
  let a = `${e.space}/resources/v1/modeler/documents/${t}`;
@@ -754,20 +754,20 @@ async function Ve(e, t, s = void 0, n = void 0) {
754
754
  data: o,
755
755
  type: "json",
756
756
  onComplete(c) {
757
- s && s(c);
757
+ n && n(c);
758
758
  },
759
759
  onFailure(c) {
760
- n && n(c);
760
+ s && s(c);
761
761
  }
762
762
  });
763
763
  }
764
- async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0) {
764
+ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
765
765
  let { tenant: a, cs_name: o } = e;
766
766
  if (!a && !o) {
767
767
  i && i("Credentials undefined");
768
768
  return;
769
769
  }
770
- if (!t && !s) {
770
+ if (!t && !n) {
771
771
  i && i("Définition du fichier undefined");
772
772
  return;
773
773
  }
@@ -786,29 +786,29 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
786
786
  p && m(d, {
787
787
  method: "GET",
788
788
  headers: {
789
- "x-ds-csrftoken": p,
789
+ ENO_CSRF_TOKEN: e.token,
790
790
  Accept: "application/json"
791
791
  },
792
792
  onComplete(l, h, g) {
793
793
  try {
794
794
  if (l = JSON.parse(l), l?.ticket) {
795
795
  const { ticket: _, actionurl: y, jobticket: w } = l;
796
- K(
796
+ n instanceof Blob || (n = new Blob([n], { type: "text/plain" })), J(
797
797
  { dataelements: { ticket: _, ticketURL: y } },
798
- s,
798
+ n,
799
799
  t,
800
800
  (S) => {
801
801
  const R = new DOMParser().parseFromString(
802
802
  S,
803
803
  "text/html"
804
- ).body.firstChild.querySelector("input").getAttributeNode("value").value, D = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${o}/contents?receipt=${encodeURIComponent(
805
- R
806
- )}`;
807
- let W = /(?:\.([^.]+))?$/.exec(t)[1];
808
- const v = JSON.stringify({
804
+ ).body.firstChild.querySelector("input").getAttributeNode("value").value, E = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(
805
+ o
806
+ )}/contents?receipt=${encodeURIComponent(R)}`;
807
+ let X = /(?:\.([^.]+))?$/.exec(t)[1];
808
+ const W = JSON.stringify({
809
809
  actions: [],
810
810
  businessobj: {
811
- description: e?.description,
811
+ description: "",
812
812
  file: t,
813
813
  fullnameowner: "",
814
814
  icon: "",
@@ -816,28 +816,31 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
816
816
  modified: "",
817
817
  owner: {},
818
818
  thumbnail: "",
819
- title: W ? t.split(".").slice(0, -1).join(".") : t,
819
+ title: X ? t.split(".").slice(0, -1).join(".") : t,
820
820
  type: {}
821
821
  },
822
822
  collabspace: o
823
823
  });
824
- m(D, {
824
+ m(E, {
825
825
  method: "POST",
826
826
  headers: {
827
827
  Accept: "application/json",
828
828
  "Content-Type": "application/json;charset=UTF-8",
829
829
  "X-DS-CSRFTOKEN": p
830
830
  },
831
- data: v,
831
+ data: W,
832
832
  type: "json",
833
- onComplete(I, Ce, be) {
834
- n && n(I);
833
+ onComplete(N, Ce, Te) {
834
+ console.log(
835
+ "_3DSpace_Upload_Doc | pushFileInFcs | onComplete",
836
+ N
837
+ ), s && s(N);
835
838
  },
836
- onFailure(I) {
837
- console.warn(
839
+ onFailure(N) {
840
+ console.error(
838
841
  "_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
839
- { url: D, bodyRequest: v, err: I }
840
- ), i && i(I);
842
+ N
843
+ ), i && i(N);
841
844
  }
842
845
  });
843
846
  },
@@ -845,7 +848,7 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
845
848
  console.warn("pushFileInFcs", S), i && i(S);
846
849
  },
847
850
  (S) => {
848
- r && r({ fileName: t, progress: S });
851
+ r && r(S);
849
852
  }
850
853
  );
851
854
  }
@@ -867,20 +870,20 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
867
870
  }
868
871
  );
869
872
  }
870
- async function ze(e, t, s, n = void 0, i = void 0) {
871
- e.space, e.token, e.ctx, J(
873
+ async function ze(e, t, n, s = void 0, i = void 0) {
874
+ e.space, e.token, e.ctx, L(
872
875
  e,
873
876
  t,
874
877
  (r) => {
875
878
  const a = r.data[0].relateddata.files[0].id, o = r.data[0].relateddata.files[0].dataelements.title;
876
- G(
879
+ M(
877
880
  e,
878
881
  t,
879
882
  a,
880
- s,
883
+ n,
881
884
  o,
882
885
  (c) => {
883
- n && n(c);
886
+ s && s(c);
884
887
  },
885
888
  (c) => {
886
889
  i && i(c);
@@ -892,21 +895,21 @@ async function ze(e, t, s, n = void 0, i = void 0) {
892
895
  }
893
896
  );
894
897
  }
895
- async function He(e, t, s, n, i = void 0, r = void 0) {
898
+ async function He(e, t, n, s, i = void 0, r = void 0) {
896
899
  oe(
897
900
  e,
898
901
  (a) => {
899
902
  a?.items >= 1 && a.data.forEach((o) => {
900
- K(
903
+ J(
901
904
  o,
902
905
  t,
903
- s,
906
+ n,
904
907
  (c) => {
905
908
  re(
906
909
  e,
907
910
  c,
908
- s,
909
911
  n,
912
+ s,
910
913
  (d) => {
911
914
  d?.data.length ? i && i(d) : r && r({
912
915
  success: !1,
@@ -923,10 +926,10 @@ async function He(e, t, s, n, i = void 0, r = void 0) {
923
926
  (a) => console.warn(a)
924
927
  );
925
928
  }
926
- function oe(e, t = void 0, s = void 0) {
929
+ function oe(e, t = void 0, n = void 0) {
927
930
  if (e?.space && e.token && e.ctx) {
928
- let n = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
929
- m(n, {
931
+ let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
932
+ m(s, {
930
933
  method: "PUT",
931
934
  headers: {
932
935
  ENO_CSRF_TOKEN: e.token,
@@ -942,17 +945,17 @@ function oe(e, t = void 0, s = void 0) {
942
945
  t && t(i);
943
946
  },
944
947
  onFailure(i) {
945
- s && s(i);
948
+ n && n(i);
946
949
  }
947
950
  });
948
951
  } else
949
952
  console.log("Error de credentials", e);
950
953
  }
951
- function K(e, t, s, n = void 0, i = void 0, r = void 0) {
954
+ function J(e, t, n, s = void 0, i = void 0, r = void 0) {
952
955
  let a = new FormData();
953
956
  t instanceof Blob || (t = new Blob([t], {
954
957
  type: "text/plain"
955
- })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, s);
958
+ })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, n);
956
959
  let o = e.dataelements.ticketURL;
957
960
  const c = new XMLHttpRequest();
958
961
  c.open("POST", o, !0), c.upload.onprogress = function(d) {
@@ -961,13 +964,13 @@ function K(e, t, s, n = void 0, i = void 0, r = void 0) {
961
964
  r && r(u);
962
965
  }
963
966
  }, c.onload = function() {
964
- c.status === 200 ? n && n(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
967
+ c.status === 200 ? s && s(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
965
968
  }, c.onerror = function() {
966
969
  i && i(c.statusText);
967
970
  }, c.send(a);
968
971
  }
969
- function re(e, t, s, n = void 0, i = void 0, r = void 0) {
970
- console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: s });
972
+ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
973
+ console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
971
974
  const a = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
972
975
  let o = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
973
976
  m(c, {
@@ -983,14 +986,14 @@ function re(e, t, s, n = void 0, i = void 0, r = void 0) {
983
986
  {
984
987
  type: "Document",
985
988
  dataelements: {
986
- title: a(s),
987
- description: n
989
+ title: a(n),
990
+ description: s
988
991
  },
989
992
  relateddata: {
990
993
  files: [
991
994
  {
992
995
  dataelements: {
993
- title: s,
996
+ title: n,
994
997
  receipt: `${t}
995
998
  `
996
999
  }
@@ -1013,7 +1016,7 @@ function re(e, t, s, n = void 0, i = void 0, r = void 0) {
1013
1016
  }
1014
1017
  });
1015
1018
  }
1016
- function F(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1) {
1019
+ function F(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1) {
1017
1020
  const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1018
1021
  m(o, {
1019
1022
  method: "GET",
@@ -1029,10 +1032,10 @@ function F(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1029
1032
  (_, y, w) => y === w.findIndex(
1030
1033
  (S) => S.organization.pid === _.organization.pid && S.role.pid === _.role.pid
1031
1034
  )
1032
- ), s && (Array.isArray(s) ? s.forEach((_) => {
1035
+ ), n && (Array.isArray(n) ? n.forEach((_) => {
1033
1036
  l || g.forEach((y) => {
1034
- if (_ === y.role.name && n === y.organization.title)
1035
- l = _, f = n;
1037
+ if (_ === y.role.name && s === y.organization.title)
1038
+ l = _, f = s;
1036
1039
  else if (_ === y.role.name) {
1037
1040
  let w = g.filter(
1038
1041
  (S) => S.role.name === _
@@ -1041,11 +1044,11 @@ function F(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1041
1044
  }
1042
1045
  });
1043
1046
  }) : g.forEach((_) => {
1044
- if (s === _.role.name && n === _.organization.title)
1045
- l = s, f = n;
1046
- else if (s === _.role.name) {
1047
+ if (n === _.role.name && s === _.organization.title)
1048
+ l = n, f = s;
1049
+ else if (n === _.role.name) {
1047
1050
  let y = g.filter(
1048
- (w) => w.role.name === s
1051
+ (w) => w.role.name === n
1049
1052
  );
1050
1053
  y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
1051
1054
  }
@@ -1062,29 +1065,29 @@ function F(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1062
1065
  }
1063
1066
  });
1064
1067
  }
1065
- async function q(e, t = void 0, s = void 0) {
1068
+ async function G(e, t = void 0, n = void 0) {
1066
1069
  return (!e.objID || e.objID === "") && (console.warn(
1067
1070
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1068
- ), s && s(
1071
+ ), n && n(
1069
1072
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1070
1073
  )), (e.space === "" || !e.space) && (console.warn(
1071
1074
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
1072
- ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1075
+ ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1073
1076
  e,
1074
- (n) => {
1075
- e.token = n;
1077
+ (s) => {
1078
+ e.token = s;
1076
1079
  },
1077
- (n) => {
1078
- console.log("☠️ error => ", n);
1080
+ (s) => {
1081
+ console.log("☠️ error => ", s);
1079
1082
  }
1080
- ), new Promise((n, i) => {
1081
- k(
1083
+ ), new Promise((s, i) => {
1084
+ j(
1082
1085
  e,
1083
1086
  (r) => {
1084
1087
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((a) => a.blob()).then((a) => {
1085
1088
  t && t(a);
1086
1089
  }).catch((a) => {
1087
- s && s(a);
1090
+ n && n(a);
1088
1091
  })) : m(r, {
1089
1092
  onComplete(a) {
1090
1093
  let o;
@@ -1093,10 +1096,10 @@ async function q(e, t = void 0, s = void 0) {
1093
1096
  } catch {
1094
1097
  o = a;
1095
1098
  }
1096
- t && typeof t == "function" && t(o), n(o);
1099
+ t && typeof t == "function" && t(o), s(o);
1097
1100
  },
1098
1101
  onFailure(a, o, c) {
1099
- s && (console.log("error http", a), s({
1102
+ n && (console.log("error http", a), n({
1100
1103
  msg: JSON.parse(a),
1101
1104
  headers: o,
1102
1105
  xhr: c
@@ -1109,26 +1112,26 @@ async function q(e, t = void 0, s = void 0) {
1109
1112
  });
1110
1113
  },
1111
1114
  (r) => {
1112
- s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1115
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1113
1116
  }
1114
1117
  );
1115
1118
  });
1116
1119
  }
1117
- async function ce(e, t, s = void 0, n = void 0) {
1120
+ async function ce(e, t, n = void 0, s = void 0) {
1118
1121
  typeof t < "u" && Array.isArray(t) && t?.length > 0 ? H({
1119
1122
  credentials: e,
1120
1123
  myArray: t,
1121
1124
  chunk: 80,
1122
1125
  fn_to_call: de
1123
1126
  }, (r) => {
1124
- s && s(r);
1127
+ n && n(r);
1125
1128
  }) : (console.warn(
1126
1129
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1127
- ), n && n(
1130
+ ), s && s(
1128
1131
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1129
1132
  ));
1130
1133
  }
1131
- function de(e, t, s = void 0, n = void 0, i = void 0) {
1134
+ function de(e, t, n = void 0, s = void 0, i = void 0) {
1132
1135
  const r = [];
1133
1136
  t.forEach((c) => {
1134
1137
  r.push({
@@ -1149,7 +1152,7 @@ function de(e, t, s = void 0, n = void 0, i = void 0) {
1149
1152
  type: "json",
1150
1153
  onComplete(c) {
1151
1154
  const d = c.data;
1152
- c.success === !0 && (s && s(), d.forEach((u) => {
1155
+ c.success === !0 && (n && n(), d.forEach((u) => {
1153
1156
  try {
1154
1157
  const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
1155
1158
  m(f, {
@@ -1160,7 +1163,7 @@ function de(e, t, s = void 0, n = void 0, i = void 0) {
1160
1163
  } catch {
1161
1164
  g = l.blob();
1162
1165
  }
1163
- n && n({
1166
+ s && s({
1164
1167
  objectId: u.id,
1165
1168
  headers: h,
1166
1169
  fileName: p,
@@ -1181,9 +1184,9 @@ function de(e, t, s = void 0, n = void 0, i = void 0) {
1181
1184
  }
1182
1185
  });
1183
1186
  }
1184
- function Qe(e, t, s = void 0, n = void 0) {
1187
+ function Qe(e, t, n = void 0, s = void 0) {
1185
1188
  return new Promise((i) => {
1186
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1189
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1187
1190
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1188
1191
  let a = {
1189
1192
  method: "POST",
@@ -1202,19 +1205,19 @@ function Qe(e, t, s = void 0, n = void 0) {
1202
1205
  }),
1203
1206
  type: "json",
1204
1207
  onComplete(o) {
1205
- s && s(o);
1208
+ n && n(o);
1206
1209
  },
1207
1210
  onFailure(o) {
1208
- n && n(o);
1211
+ s && s(o);
1209
1212
  }
1210
1213
  };
1211
1214
  m(r, a);
1212
1215
  }
1213
1216
  });
1214
1217
  }
1215
- function Ze(e, t, s, n = void 0, i = void 0) {
1218
+ function Ze(e, t, n, s = void 0, i = void 0) {
1216
1219
  return new Promise((r) => {
1217
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1220
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1218
1221
  const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1219
1222
  let o = {
1220
1223
  method: "POST",
@@ -1228,13 +1231,13 @@ function Ze(e, t, s, n = void 0, i = void 0) {
1228
1231
  data: [
1229
1232
  {
1230
1233
  id: t,
1231
- nextState: s
1234
+ nextState: n
1232
1235
  }
1233
1236
  ]
1234
1237
  }),
1235
1238
  type: "json",
1236
1239
  onComplete(c) {
1237
- n && n(c);
1240
+ s && s(c);
1238
1241
  },
1239
1242
  onFailure(c) {
1240
1243
  i && i(c);
@@ -1244,9 +1247,9 @@ function Ze(e, t, s, n = void 0, i = void 0) {
1244
1247
  }
1245
1248
  });
1246
1249
  }
1247
- function et(e, t, s = void 0, n = void 0) {
1250
+ function et(e, t, n = void 0, s = void 0) {
1248
1251
  return new Promise((i) => {
1249
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1252
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1250
1253
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1251
1254
  F(
1252
1255
  e.space,
@@ -1275,19 +1278,19 @@ function et(e, t, s = void 0, n = void 0) {
1275
1278
  }),
1276
1279
  type: "json",
1277
1280
  onComplete(o) {
1278
- s && s(o);
1281
+ n && n(o);
1279
1282
  },
1280
1283
  onFailure(o) {
1281
- n && n(o);
1284
+ s && s(o);
1282
1285
  }
1283
1286
  };
1284
1287
  m(r, a);
1285
1288
  }
1286
1289
  });
1287
1290
  }
1288
- function tt(e, t, s = void 0, n = void 0) {
1291
+ function tt(e, t, n = void 0, s = void 0) {
1289
1292
  return new Promise((i) => {
1290
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1293
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1291
1294
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1292
1295
  F(
1293
1296
  e.space,
@@ -1322,19 +1325,19 @@ function tt(e, t, s = void 0, n = void 0) {
1322
1325
  }),
1323
1326
  type: "json",
1324
1327
  onComplete(o) {
1325
- s && s(o);
1328
+ n && n(o);
1326
1329
  },
1327
1330
  onFailure(o) {
1328
- n && n(o);
1331
+ s && s(o);
1329
1332
  }
1330
1333
  };
1331
1334
  m(r, a);
1332
1335
  }
1333
1336
  });
1334
1337
  }
1335
- function nt(e, t, s, n = void 0, i = void 0) {
1338
+ function nt(e, t, n, s = void 0, i = void 0) {
1336
1339
  return new Promise((r) => {
1337
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1340
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1338
1341
  const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1339
1342
  F(
1340
1343
  e.space,
@@ -1358,9 +1361,9 @@ function nt(e, t, s, n = void 0, i = void 0) {
1358
1361
  data: [
1359
1362
  {
1360
1363
  physicalid: t,
1361
- proposedRevision: s,
1364
+ proposedRevision: n,
1362
1365
  modifiedAttributes: {
1363
- revision: s
1366
+ revision: n
1364
1367
  }
1365
1368
  }
1366
1369
  ],
@@ -1369,7 +1372,7 @@ function nt(e, t, s, n = void 0, i = void 0) {
1369
1372
  }),
1370
1373
  type: "json",
1371
1374
  onComplete(c) {
1372
- n && n(c);
1375
+ s && s(c);
1373
1376
  },
1374
1377
  onFailure(c) {
1375
1378
  i && i(c);
@@ -1380,20 +1383,20 @@ function nt(e, t, s, n = void 0, i = void 0) {
1380
1383
  });
1381
1384
  }
1382
1385
  function ue(e) {
1383
- return new Promise((t, s) => {
1384
- const n = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1385
- m(n, {
1386
+ return new Promise((t, n) => {
1387
+ const s = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1388
+ m(s, {
1386
1389
  method: "GET",
1387
1390
  onComplete(r) {
1388
1391
  t(r);
1389
1392
  },
1390
1393
  onFailure(r) {
1391
- s(r);
1394
+ n(r);
1392
1395
  }
1393
1396
  });
1394
1397
  });
1395
1398
  }
1396
- function st(e, t, s = void 0, n = void 0) {
1399
+ function st(e, t, n = void 0, s = void 0) {
1397
1400
  return new Promise(async (i, r) => {
1398
1401
  const { tenant: a, ctx: o, space: c } = e;
1399
1402
  (!a || !o || !c) && r({ error: "Erreur de credentials", tenant: a, ctx: o, space: c });
@@ -1419,22 +1422,22 @@ function st(e, t, s = void 0, n = void 0) {
1419
1422
  }),
1420
1423
  type: "json",
1421
1424
  onComplete(f) {
1422
- s && s(f), i(f);
1425
+ n && n(f), i(f);
1423
1426
  },
1424
1427
  onFailure(f) {
1425
- n && n(f), r(f);
1428
+ s && s(f), r(f);
1426
1429
  }
1427
1430
  };
1428
1431
  m(d, p);
1429
1432
  });
1430
1433
  }
1431
- function it(e, t, s, n, i = void 0, r = void 0) {
1434
+ function it(e, t, n, s, i = void 0, r = void 0) {
1432
1435
  return new Promise((a) => {
1433
1436
  const o = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1434
1437
  let c = {
1435
1438
  attributes: {
1436
- title: s,
1437
- description: n,
1439
+ title: n,
1440
+ description: s,
1438
1441
  inheritedAccess: "no"
1439
1442
  }
1440
1443
  }, d = {
@@ -1461,7 +1464,7 @@ function it(e, t, s, n, i = void 0, r = void 0) {
1461
1464
  m(o, u);
1462
1465
  });
1463
1466
  }
1464
- function at(e, t, s, n, i = void 0, r = void 0) {
1467
+ function at(e, t, n, s, i = void 0, r = void 0) {
1465
1468
  return console.log("credentials", e), new Promise((a) => {
1466
1469
  `${e.space}`, JSON.stringify({
1467
1470
  csrf: {
@@ -1475,8 +1478,8 @@ function at(e, t, s, n, i = void 0, r = void 0) {
1475
1478
  relId: t,
1476
1479
  id: t,
1477
1480
  dataelements: {
1478
- personList: s,
1479
- eventsList: n
1481
+ personList: n,
1482
+ eventsList: s
1480
1483
  },
1481
1484
  tenant: e.tenant
1482
1485
  }
@@ -1485,12 +1488,12 @@ function at(e, t, s, n, i = void 0, r = void 0) {
1485
1488
  });
1486
1489
  }
1487
1490
  //!SECTION
1488
- function ot(e, t = void 0, s = void 0) {
1489
- const n = {
1491
+ function ot(e, t = void 0, n = void 0) {
1492
+ const s = {
1490
1493
  base: `${e.space}`,
1491
1494
  uri: "/resources/bps/cspaces",
1492
1495
  optTenant: `tenant=${e.tenant}`
1493
- }, i = `${n.base}${n.uri}?${n.optTenant}`;
1496
+ }, i = `${s.base}${s.uri}?${s.optTenant}`;
1494
1497
  m(i, {
1495
1498
  method: "GET",
1496
1499
  headers: {
@@ -1502,54 +1505,54 @@ function ot(e, t = void 0, s = void 0) {
1502
1505
  t && t(o, a);
1503
1506
  },
1504
1507
  onFailure(r, a, o) {
1505
- s && s({ response: r, headers: a, xhr: o });
1508
+ n && n({ response: r, headers: a, xhr: o });
1506
1509
  }
1507
1510
  });
1508
1511
  }
1509
- function rt(e, t, s, n) {
1510
- k(
1512
+ function rt(e, t, n, s) {
1513
+ j(
1511
1514
  e.space,
1512
1515
  t,
1513
1516
  (i) => {
1514
1517
  m(i, {
1515
1518
  header: { ENO_CSRF_TOKEN: e.token },
1516
1519
  onComplete: (r) => {
1517
- s && s(r);
1520
+ n && n(r);
1518
1521
  },
1519
1522
  onFailure: (r) => {
1520
- console.log("error http", r), n && n(r);
1523
+ console.log("error http", r), s && s(r);
1521
1524
  }
1522
1525
  });
1523
1526
  }
1524
1527
  );
1525
1528
  }
1526
- async function ct(e, t, s = void 0, n = void 0) {
1529
+ async function ct(e, t, n = void 0, s = void 0) {
1527
1530
  return new Promise((i) => {
1528
- k(e, t, (r) => {
1531
+ j(e, t, (r) => {
1529
1532
  m(r, {
1530
- onComplete: (a, o, c) => (i(JSON.parse(a)), s && s(JSON.parse(a), o, c), i),
1533
+ onComplete: (a, o, c) => (i(JSON.parse(a)), n && n(JSON.parse(a), o, c), i),
1531
1534
  onFailure: (a, o, c) => {
1532
- n && n(a, o, c), console.log(a, o?.errormsg);
1535
+ s && s(a, o, c), console.log(a, o?.errormsg);
1533
1536
  }
1534
1537
  });
1535
1538
  });
1536
1539
  });
1537
1540
  }
1538
- function dt(e, t, s, n = void 0, i = void 0) {
1541
+ function dt(e, t, n, s = void 0, i = void 0) {
1539
1542
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1540
- e = { ...e, objID: s }, U(
1543
+ e = { ...e, objID: n }, U(
1541
1544
  e,
1542
1545
  (a) => {
1543
1546
  console.log("_3DSpace_get_csrf | onDone | data", a);
1544
1547
  const o = a.datas.relateddata.files[0].id, c = a.datas.relateddata.files[0].dataelements.title;
1545
- G(
1548
+ M(
1546
1549
  e,
1547
- s,
1550
+ n,
1548
1551
  o,
1549
1552
  r,
1550
1553
  c,
1551
1554
  (d) => {
1552
- n && n(d);
1555
+ s && s(d);
1553
1556
  },
1554
1557
  (d) => {
1555
1558
  i && i(d);
@@ -1561,65 +1564,65 @@ function dt(e, t, s, n = void 0, i = void 0) {
1561
1564
  }
1562
1565
  );
1563
1566
  }
1564
- let B, E;
1565
- const A = [];
1566
- async function ut(e, t = void 0, s = void 0) {
1567
+ let K, B;
1568
+ const k = [];
1569
+ async function ut(e, t = void 0, n = void 0) {
1567
1570
  e.objID && e.objID !== "" ? U(
1568
1571
  e,
1569
- (n) => {
1570
- t && t(n);
1572
+ (s) => {
1573
+ t && t(s);
1571
1574
  },
1572
- (n) => {
1573
- s && s(n);
1575
+ (s) => {
1576
+ n && n(s);
1574
1577
  }
1575
- ) : (e.objID === null || e.objID === "") && b(
1578
+ ) : (e.objID === null || e.objID === "") && T(
1576
1579
  e,
1577
- (n) => {
1578
- t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1580
+ (s) => {
1581
+ t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1579
1582
  },
1580
- (n) => {
1581
- s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1583
+ (s) => {
1584
+ n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1582
1585
  }
1583
1586
  );
1584
1587
  }
1585
- async function pt(e, t = void 0, s = void 0) {
1586
- console.log("getDatasByTenant (getDocuments)", e), await q(
1588
+ async function pt(e, t = void 0, n = void 0) {
1589
+ console.log("getDatasByTenant (getDocuments)", e), await G(
1587
1590
  e,
1588
- (n) => {
1591
+ (s) => {
1589
1592
  const i = {};
1590
- i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1593
+ i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1591
1594
  },
1592
- (n) => {
1593
- s && s?.(n);
1595
+ (s) => {
1596
+ n && n?.(s);
1594
1597
  }
1595
1598
  );
1596
1599
  }
1597
- function lt(e, t = void 0, s = void 0) {
1598
- const n = [];
1600
+ function lt(e, t = void 0, n = void 0) {
1601
+ const s = [];
1599
1602
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1600
1603
  console.warn("la liste est vide ou n'est pas un tableau");
1601
1604
  return;
1602
1605
  }
1603
1606
  e.objIds.forEach((i, r) => {
1604
- q(
1607
+ G(
1605
1608
  e,
1606
1609
  i.objID,
1607
1610
  (a) => {
1608
- n.push({ [i.name]: a }), i.name === "dbProjets" && (B = a.affaires.map((o) => o.objectID), pe(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1611
+ s.push({ [i.name]: a }), i.name === "dbProjets" && (K = a.affaires.map((o) => o.objectID), pe(e, B)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1609
1612
  }
1610
1613
  );
1611
1614
  });
1612
1615
  }
1613
- function pe(e, t, s = void 0, n = void 0) {
1616
+ function pe(e, t, n = void 0, s = void 0) {
1614
1617
  ce(
1615
1618
  e,
1616
- B,
1619
+ K,
1617
1620
  (i) => {
1618
1621
  const r = [...t];
1619
- r.find((a) => a.objectID === i.objectId).data = i.data, E = r, A.push(i.data), s && s(A);
1622
+ r.find((a) => a.objectID === i.objectId).data = i.data, B = r, k.push(i.data), n && n(k);
1620
1623
  },
1621
1624
  (i) => {
1622
- n && (n(i), console.log(i));
1625
+ s && (s(i), console.log(i));
1623
1626
  }
1624
1627
  );
1625
1628
  }
@@ -1630,7 +1633,7 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1630
1633
  "usersgroup",
1631
1634
  "3dplan",
1632
1635
  "dashboard"
1633
- ], X = {
1636
+ ], q = {
1634
1637
  how: "ds6w:how",
1635
1638
  what: "ds6w:what",
1636
1639
  when: "ds6w:when",
@@ -1643,7 +1646,7 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1643
1646
  order_by: "desc",
1644
1647
  tag: "testTag"
1645
1648
  };
1646
- function ft(e, t, s = void 0, n = void 0) {
1649
+ function ft(e, t, n = void 0, s = void 0) {
1647
1650
  const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
1648
1651
  uri: "/resources/6w/tags",
1649
1652
  otpCTX: "SecurityContext=preferred",
@@ -1656,7 +1659,7 @@ function ft(e, t, s = void 0, n = void 0) {
1656
1659
  uri: `pid://${a}`
1657
1660
  }
1658
1661
  ],
1659
- predicate: X[o],
1662
+ predicate: q[o],
1660
1663
  object: {
1661
1664
  literal: c
1662
1665
  }
@@ -1674,7 +1677,7 @@ function ft(e, t, s = void 0, n = void 0) {
1674
1677
  JSON.parse(f);
1675
1678
  const l = {};
1676
1679
  setTimeout(() => {
1677
- J(
1680
+ L(
1678
1681
  e,
1679
1682
  a,
1680
1683
  (h) => {
@@ -1683,27 +1686,27 @@ function ft(e, t, s = void 0, n = void 0) {
1683
1686
  e,
1684
1687
  t,
1685
1688
  (w) => {
1686
- s && s(w);
1689
+ n && n(w);
1687
1690
  },
1688
1691
  (w) => {
1689
- n && n(w);
1692
+ s && s(w);
1690
1693
  }
1691
1694
  );
1692
1695
  },
1693
1696
  (h, g) => {
1694
1697
  const _ = h;
1695
- _.msg = g.errormsg, _.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", _), n && n(_);
1698
+ _.msg = g.errormsg, _.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", _), s && s(_);
1696
1699
  }
1697
1700
  );
1698
1701
  }, 2e3);
1699
1702
  },
1700
1703
  onFailure(f, l) {
1701
1704
  const h = f;
1702
- h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), n && n(h);
1705
+ h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), s && s(h);
1703
1706
  }
1704
1707
  });
1705
1708
  }
1706
- function he(e, t, s = void 0, n = void 0) {
1709
+ function he(e, t, n = void 0, s = void 0) {
1707
1710
  console.log("obj ", t);
1708
1711
  const i = t.info.name, r = {
1709
1712
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1778,15 +1781,15 @@ function he(e, t, s = void 0, n = void 0) {
1778
1781
  data: JSON.stringify(d),
1779
1782
  onComplete(u) {
1780
1783
  const p = JSON.parse(u);
1781
- s(p);
1784
+ n(p);
1782
1785
  },
1783
1786
  onFailure(u, p) {
1784
1787
  const f = u;
1785
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1788
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1786
1789
  }
1787
1790
  });
1788
1791
  }
1789
- function mt(e, t, s = void 0, n = void 0) {
1792
+ function mt(e, t, n = void 0, s = void 0) {
1790
1793
  const { objId: i, pred: r, tag: a } = t, o = {
1791
1794
  uri: "/resources/6w/tags",
1792
1795
  otpCTX: "SecurityContext=preferred",
@@ -1799,7 +1802,7 @@ function mt(e, t, s = void 0, n = void 0) {
1799
1802
  uri: `pid://${i}`
1800
1803
  }
1801
1804
  ],
1802
- predicate: X[r],
1805
+ predicate: q[r],
1803
1806
  object: {
1804
1807
  literal: a
1805
1808
  }
@@ -1814,15 +1817,15 @@ function mt(e, t, s = void 0, n = void 0) {
1814
1817
  Accept: "application/json,text/javascript,*/*"
1815
1818
  },
1816
1819
  onComplete(u) {
1817
- s && s(u);
1820
+ n && n(u);
1818
1821
  },
1819
1822
  onFailure(u, p) {
1820
1823
  const f = u;
1821
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
1824
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1822
1825
  }
1823
1826
  });
1824
1827
  }
1825
- function ht(e, t = "", s = void 0, n = void 0) {
1828
+ function ht(e, t = "", n = void 0, s = void 0) {
1826
1829
  const { space: i } = e;
1827
1830
  if (t === "")
1828
1831
  return;
@@ -1837,29 +1840,29 @@ function ht(e, t = "", s = void 0, n = void 0) {
1837
1840
  headers: a,
1838
1841
  data: c,
1839
1842
  onComplete(d) {
1840
- s && s(JSON.parse(d));
1843
+ n && n(JSON.parse(d));
1841
1844
  },
1842
1845
  onFailure(d, u) {
1843
1846
  const p = d;
1844
- p.msg = u.error, n && n(p);
1847
+ p.msg = u.error, s && s(p);
1845
1848
  }
1846
1849
  });
1847
1850
  }
1848
- async function C(e, t = void 0, s = void 0) {
1849
- const n = e._3DSwym + "/api/index/tk";
1850
- return m(n, {
1851
+ async function C(e, t = void 0, n = void 0) {
1852
+ const s = e._3DSwym + "/api/index/tk";
1853
+ return m(s, {
1851
1854
  onComplete(i, r, a) {
1852
1855
  const o = JSON.parse(i);
1853
1856
  if (t)
1854
1857
  return t(o), e.token = o?.result?.ServerToken;
1855
1858
  },
1856
1859
  onFailure(i) {
1857
- s && s(i);
1860
+ n && n(i);
1858
1861
  }
1859
1862
  });
1860
1863
  }
1861
- function gt(e, t = void 0, s = void 0) {
1862
- const n = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1864
+ function gt(e, t = void 0, n = void 0) {
1865
+ const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1863
1866
  params: {
1864
1867
  community_id: null,
1865
1868
  hash_key: null,
@@ -1870,7 +1873,7 @@ function gt(e, t = void 0, s = void 0) {
1870
1873
  }
1871
1874
  };
1872
1875
  C(e, (r) => {
1873
- m(n, {
1876
+ m(s, {
1874
1877
  method: "POST",
1875
1878
  headers: {
1876
1879
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1883,13 +1886,13 @@ function gt(e, t = void 0, s = void 0) {
1883
1886
  t && t(a, o);
1884
1887
  },
1885
1888
  onFailure(a, o) {
1886
- s && s(a, o);
1889
+ n && n(a, o);
1887
1890
  }
1888
1891
  });
1889
1892
  });
1890
1893
  }
1891
- function _t(e, t = void 0, s = void 0) {
1892
- const n = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1894
+ function _t(e, t = void 0, n = void 0) {
1895
+ const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1893
1896
  params: {
1894
1897
  idsToFilterArr: [],
1895
1898
  mode: "offline",
@@ -1899,7 +1902,7 @@ function _t(e, t = void 0, s = void 0) {
1899
1902
  }
1900
1903
  };
1901
1904
  C(e, (r) => {
1902
- m(n, {
1905
+ m(s, {
1903
1906
  method: "POST",
1904
1907
  headers: {
1905
1908
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1913,18 +1916,18 @@ function _t(e, t = void 0, s = void 0) {
1913
1916
  t && t(c, a);
1914
1917
  },
1915
1918
  onFailure(a, o) {
1916
- s && s(a, o);
1919
+ n && n(a, o);
1917
1920
  }
1918
1921
  });
1919
1922
  });
1920
1923
  }
1921
- function yt(e, t = void 0, s = void 0) {
1922
- const n = {
1924
+ function yt(e, t = void 0, n = void 0) {
1925
+ const s = {
1923
1926
  base: e._3DSwym,
1924
1927
  uri: "/api/community/listmycommunities",
1925
1928
  limit: `/limit/${e.limit ? e.limit : 500}`,
1926
1929
  page: `/page/${e.page ? e.page : "1"}`
1927
- }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1930
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1928
1931
  C(e, (a) => {
1929
1932
  m(i, {
1930
1933
  method: "GET",
@@ -1949,18 +1952,18 @@ function yt(e, t = void 0, s = void 0) {
1949
1952
  (g) => {
1950
1953
  f++, h.members = g, r.push(h), f === p.length && t && t(r);
1951
1954
  },
1952
- (g) => s(g)
1955
+ (g) => n(g)
1953
1956
  );
1954
1957
  });
1955
1958
  },
1956
1959
  onFailure(o, c) {
1957
1960
  const d = o;
1958
- d.status = c.status, d.response = c.errormsg, s && s(d);
1961
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1959
1962
  }
1960
1963
  });
1961
1964
  });
1962
1965
  }
1963
- function ge(e, t, s, n) {
1966
+ function ge(e, t, n, s) {
1964
1967
  const i = `${e._3DSwym}/api/community/listmembers`, r = {
1965
1968
  params: {
1966
1969
  page: e.page ? e.page : 1,
@@ -1979,18 +1982,18 @@ function ge(e, t, s, n) {
1979
1982
  data: JSON.stringify(r),
1980
1983
  type: "json",
1981
1984
  onComplete(o, c, d) {
1982
- s && s(o);
1985
+ n && n(o);
1983
1986
  },
1984
1987
  onFailure(o, c) {
1985
1988
  const d = o;
1986
- d.status = c.status, d.response = c.errormsg, n && n(d);
1989
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1987
1990
  }
1988
1991
  });
1989
1992
  });
1990
1993
  }
1991
- function St(e, t = void 0, s = void 0) {
1992
- const n = "YXdA5x4DSUKtlAi2wmnyTA";
1993
- e.commu_id || (e.commu_id = n);
1994
+ function St(e, t = void 0, n = void 0) {
1995
+ const s = "YXdA5x4DSUKtlAi2wmnyTA";
1996
+ e.commu_id || (e.commu_id = s);
1994
1997
  const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1995
1998
  C(e, (r) => {
1996
1999
  m(i, {
@@ -2006,12 +2009,12 @@ function St(e, t = void 0, s = void 0) {
2006
2009
  },
2007
2010
  onFailure(a, o) {
2008
2011
  const c = a;
2009
- c.status = o.status, c.response = o.errormsg, s && s(c);
2012
+ c.status = o.status, c.response = o.errormsg, n && n(c);
2010
2013
  }
2011
2014
  });
2012
2015
  });
2013
2016
  }
2014
- function wt(e, t, s = void 0, n = void 0) {
2017
+ function wt(e, t, n = void 0, s = void 0) {
2015
2018
  const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
2016
2019
  console.log("__listAllContacts", i.hits);
2017
2020
  const o = `${a}/api/directmessages`, c = {
@@ -2026,10 +2029,10 @@ function wt(e, t, s = void 0, n = void 0) {
2026
2029
  _e(
2027
2030
  c.users,
2028
2031
  (p) => {
2029
- p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
2032
+ p !== void 0 && (d.id_msg = p.id, u = !0, v(e, d));
2030
2033
  },
2031
2034
  (p) => {
2032
- u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), n && n(p), d.id_msg = "";
2035
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
2033
2036
  }
2034
2037
  ), u === !1 && setTimeout(() => {
2035
2038
  u === !1 && C(e, (p) => {
@@ -2044,17 +2047,17 @@ function wt(e, t, s = void 0, n = void 0) {
2044
2047
  type: "json",
2045
2048
  onComplete(f, l, h) {
2046
2049
  const g = f;
2047
- g.reponse = JSON.parse(h.response), g.status = h.status, s && s(g), d.id_msg = g.result.id, P(e, d);
2050
+ g.reponse = JSON.parse(h.response), g.status = h.status, n && n(g), d.id_msg = g.result.id, v(e, d);
2048
2051
  },
2049
2052
  onFailure(f, l, h) {
2050
2053
  const g = f;
2051
- g.msg = l.errormsg, g.status = l.status, n && n(g);
2054
+ g.msg = l.errormsg, g.status = l.status, s && s(g);
2052
2055
  }
2053
2056
  });
2054
2057
  });
2055
2058
  }, 500);
2056
2059
  }
2057
- function _e(e, t, s, n) {
2060
+ function _e(e, t, n, s) {
2058
2061
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2059
2062
  C(e, (r) => {
2060
2063
  m(i, {
@@ -2074,16 +2077,16 @@ function _e(e, t, s, n) {
2074
2077
  f.push(l.login);
2075
2078
  }), JSON.stringify(f) === JSON.stringify(d);
2076
2079
  });
2077
- s && u !== void 0 ? s(u) : (n || u === void 0) && n(u);
2080
+ n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
2078
2081
  },
2079
2082
  onFailure(a) {
2080
2083
  const o = a;
2081
- o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), n && n(o);
2084
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
2082
2085
  }
2083
2086
  });
2084
2087
  });
2085
2088
  }
2086
- function P(e, t, s = void 0, n = void 0) {
2089
+ function v(e, t, n = void 0, s = void 0) {
2087
2090
  const i = {
2088
2091
  base: e._3DSwym,
2089
2092
  uri: "/api/community",
@@ -2111,23 +2114,23 @@ function P(e, t, s = void 0, n = void 0) {
2111
2114
  type: "json",
2112
2115
  onComplete(c, d, u) {
2113
2116
  const p = c;
2114
- p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
2117
+ p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
2115
2118
  },
2116
2119
  onFailure(c, d) {
2117
2120
  const u = c;
2118
- u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
2121
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
2119
2122
  }
2120
2123
  });
2121
2124
  });
2122
2125
  }
2123
2126
  function ye(e) {
2124
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2127
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2125
2128
  return `<p>${e} </p>
2126
2129
  <br/>
2127
2130
  <hr/>
2128
- <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
2131
+ <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
2129
2132
  }
2130
- function Ct(e, t, s = void 0, n = void 0) {
2133
+ function Ct(e, t, n = void 0, s = void 0) {
2131
2134
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2132
2135
  (c) => c.id === t.community_id
2133
2136
  ), a = e.swymCommunities.find(
@@ -2157,20 +2160,20 @@ function Ct(e, t, s = void 0, n = void 0) {
2157
2160
  type: "json",
2158
2161
  onComplete(u, p, f) {
2159
2162
  const l = JSON.parse(u);
2160
- l.status = f.status, l.response = f.response, s && s(l);
2163
+ l.status = f.status, l.response = f.response, n && n(l);
2161
2164
  },
2162
2165
  onFailure(u, p, f) {
2163
2166
  const l = u;
2164
- l.status = p.status, l.response = p.errormsg, n && n(l);
2167
+ l.status = p.status, l.response = p.errormsg, s && s(l);
2165
2168
  }
2166
2169
  });
2167
2170
  });
2168
2171
  }
2169
- function bt(e, t = void 0, s = void 0) {
2170
- const n = { base: e.space, uri: "/api/idea/add" };
2172
+ function Tt(e, t = void 0, n = void 0) {
2173
+ const s = { base: e.space, uri: "/api/idea/add" };
2171
2174
  if (!Array.isArray(e.swymCommunities)) {
2172
2175
  const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
2173
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2176
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2174
2177
  cause: a
2175
2178
  });
2176
2179
  }
@@ -2178,19 +2181,19 @@ function bt(e, t = void 0, s = void 0) {
2178
2181
  (a) => a.id === e.community_id
2179
2182
  ) === -1) {
2180
2183
  const a = "la communauté n'existe pas dans la liste des communautés du Swym";
2181
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2184
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2182
2185
  cause: a
2183
2186
  });
2184
2187
  }
2185
2188
  if (e.community_id && e.community_id === "") {
2186
2189
  const a = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2187
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2190
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2188
2191
  cause: a
2189
2192
  });
2190
2193
  }
2191
2194
  if (e.title && e.title === "") {
2192
2195
  const a = "☠️ title doit être un String.";
2193
- throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2196
+ throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2194
2197
  cause: a
2195
2198
  });
2196
2199
  }
@@ -2209,7 +2212,7 @@ function bt(e, t = void 0, s = void 0) {
2209
2212
  C(e, (a) => {
2210
2213
  if (!a)
2211
2214
  throw new Error(
2212
- `☠️ token n'est pas disponible pour cette requête : ${n.base + n.uri}`,
2215
+ `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2213
2216
  {
2214
2217
  cause: a
2215
2218
  }
@@ -2228,18 +2231,18 @@ function bt(e, t = void 0, s = void 0) {
2228
2231
  },
2229
2232
  onFailure(c, d, u) {
2230
2233
  const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2231
- `Erreur sur cette requête : ${n.base + n.uri}`,
2234
+ `Erreur sur cette requête : ${s.base + s.uri}`,
2232
2235
  {
2233
2236
  cause: { head: p, rep: f }
2234
2237
  }
2235
2238
  );
2236
- s && s(l);
2239
+ n && n(l);
2237
2240
  }
2238
2241
  };
2239
- m(n.base + n.uri, o);
2242
+ m(s.base + s.uri, o);
2240
2243
  });
2241
2244
  }
2242
- function Tt(e, t, s = void 0, n = void 0) {
2245
+ function bt(e, t, n = void 0, s = void 0) {
2243
2246
  const i = `${e.space}/api/idea/delete`, r = {
2244
2247
  params: {
2245
2248
  community_id: t.community_id,
@@ -2257,17 +2260,17 @@ function Tt(e, t, s = void 0, n = void 0) {
2257
2260
  data: JSON.stringify(r),
2258
2261
  type: "json",
2259
2262
  onComplete(o, c, d) {
2260
- s && s(o);
2263
+ n && n(o);
2261
2264
  },
2262
2265
  onFailure(o, c, d) {
2263
2266
  const u = o;
2264
- u.status = c.status, u.response = c.errormsg, n && n(u);
2267
+ u.status = c.status, u.response = c.errormsg, s && s(u);
2265
2268
  }
2266
2269
  });
2267
2270
  });
2268
2271
  }
2269
- function Ot(e, t = void 0, s = void 0) {
2270
- const { _3DSwym: n, _3DSwym_token: i } = e, r = `${n}/api/idea/get`;
2272
+ function Ot(e, t = void 0, n = void 0) {
2273
+ const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2271
2274
  if (e.idPost === "") {
2272
2275
  const o = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2273
2276
  throw new Error(`Erreur sur cette requête : ${r}`, { cause: o });
@@ -2290,13 +2293,13 @@ function Ot(e, t = void 0, s = void 0) {
2290
2293
  },
2291
2294
  onFailure(o) {
2292
2295
  const c = o;
2293
- c.status = headers.status, c.response = headers.errormsg, s && s(c);
2296
+ c.status = headers.status, c.response = headers.errormsg, n && n(c);
2294
2297
  }
2295
2298
  });
2296
2299
  }
2297
- function $t(e, t, s) {
2300
+ function $t(e, t, n) {
2298
2301
  const {
2299
- _3DSwym: n,
2302
+ _3DSwym: s,
2300
2303
  _3DSwym_token: i,
2301
2304
  idPost: r,
2302
2305
  title: a,
@@ -2305,7 +2308,7 @@ function $t(e, t, s) {
2305
2308
  status_id: d,
2306
2309
  message: u
2307
2310
  } = e, p = {
2308
- base: `${n}`,
2311
+ base: `${s}`,
2309
2312
  uri: "/api/idea/edit"
2310
2313
  }, l = {
2311
2314
  method: "POST",
@@ -2334,12 +2337,12 @@ function $t(e, t, s) {
2334
2337
  y.status = _.status, t && t(y);
2335
2338
  },
2336
2339
  onFailure(h) {
2337
- s && s(h);
2340
+ n && n(h);
2338
2341
  }
2339
2342
  };
2340
2343
  m(p.base + p.uri, l);
2341
2344
  }
2342
- function xt(e, t, s = void 0, n = void 0) {
2345
+ function Nt(e, t, n = void 0, s = void 0) {
2343
2346
  const { _3DSwym: i } = e;
2344
2347
  let { community_id: r, limit: a, page: o, search: c } = t;
2345
2348
  const d = [], u = 1;
@@ -2365,24 +2368,24 @@ function xt(e, t, s = void 0, n = void 0) {
2365
2368
  if (o++, l.page = `/page/${o}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2366
2369
  d.push(S.response.result);
2367
2370
  else {
2368
- const T = S.response.result.find(
2371
+ const b = S.response.result.find(
2369
2372
  (R) => R.title.includes(c)
2370
2373
  );
2371
- if (T) {
2372
- s(T);
2374
+ if (b) {
2375
+ n(b);
2373
2376
  return;
2374
2377
  }
2375
2378
  }
2376
- if (s && f < o && !c) {
2377
- p = !0, s(d);
2379
+ if (n && f < o && !c) {
2380
+ p = !0, n(d);
2378
2381
  return;
2379
2382
  }
2380
2383
  _(y);
2381
2384
  }
2382
2385
  },
2383
2386
  onFailure(w, S) {
2384
- const T = w;
2385
- T.status = S.status, T.response = S.errormsg, n && n(T);
2387
+ const b = w;
2388
+ b.status = S.status, b.response = S.errormsg, s && s(b);
2386
2389
  }
2387
2390
  });
2388
2391
  };
@@ -2464,9 +2467,9 @@ function Se(e) {
2464
2467
  <p>
2465
2468
  </p>` : e;
2466
2469
  }
2467
- function Nt(e, t = void 0, s = void 0) {
2468
- const { tenant: n, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2469
- if (n && i && r && a && o) {
2470
+ function xt(e, t = void 0, n = void 0) {
2471
+ const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2472
+ if (s && i && r && a && o) {
2470
2473
  const c = `${i}/api/idea/forward`;
2471
2474
  m(c, {
2472
2475
  method: "POST",
@@ -2476,8 +2479,8 @@ function Nt(e, t = void 0, s = void 0) {
2476
2479
  "X-DS-SWYM-CSRFTOKEN": r
2477
2480
  },
2478
2481
  data: JSON.stringify({
2479
- community_uri: `swym:prd:${n.toUpperCase()}:community:${a}`,
2480
- content_uri: `swym:prd:${n.toUpperCase()}:idea:${o}`,
2482
+ community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
2483
+ content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
2481
2484
  timeout: 3e4
2482
2485
  }),
2483
2486
  type: "json",
@@ -2486,19 +2489,19 @@ function Nt(e, t = void 0, s = void 0) {
2486
2489
  },
2487
2490
  onFailure(d, u) {
2488
2491
  const p = d;
2489
- p.status = u.status, p.response = u.errormsg, s && s(p);
2492
+ p.status = u.status, p.response = u.errormsg, n && n(p);
2490
2493
  }
2491
2494
  });
2492
2495
  } else
2493
- s && s({
2496
+ n && n({
2494
2497
  status: "error",
2495
2498
  msg: "Credentials incomplet !",
2496
2499
  attend: "tenant, _3DSwym , _3DSwym_token, community_id, idea_id",
2497
2500
  credentials: e
2498
2501
  });
2499
2502
  }
2500
- function It(e, t = void 0, s = void 0) {
2501
- return new Promise((n, i) => {
2503
+ function It(e, t = void 0, n = void 0) {
2504
+ return new Promise((s, i) => {
2502
2505
  try {
2503
2506
  let r;
2504
2507
  if (e._3DDashboard) {
@@ -2514,20 +2517,20 @@ function It(e, t = void 0, s = void 0) {
2514
2517
  } catch (f) {
2515
2518
  i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2516
2519
  }
2517
- console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, n(p);
2520
+ console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, s(p);
2518
2521
  },
2519
2522
  onFailure(o) {
2520
2523
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", o);
2521
2524
  }
2522
2525
  });
2523
2526
  }
2524
- r ? n(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2527
+ r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2525
2528
  } catch (r) {
2526
2529
  i("ERROR | _3DSwym_get_currentUser => ", r);
2527
2530
  }
2528
2531
  });
2529
2532
  }
2530
- function Ut(e, t, s = void 0, n = void 0) {
2533
+ function Ut(e, t, n = void 0, s = void 0) {
2531
2534
  const i = e.space + "/api/user/find/login/" + t;
2532
2535
  C(
2533
2536
  e,
@@ -2537,23 +2540,23 @@ function Ut(e, t, s = void 0, n = void 0) {
2537
2540
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2538
2541
  onComplete(a, o, c) {
2539
2542
  const d = JSON.parse(a);
2540
- s && s(d);
2543
+ n && n(d);
2541
2544
  },
2542
2545
  onFailure(a) {
2543
- n && n(a);
2546
+ s && s(a);
2544
2547
  }
2545
2548
  });
2546
2549
  },
2547
- n
2550
+ s
2548
2551
  );
2549
2552
  }
2550
- function Ft(e, t = void 0, s = void 0) {
2553
+ function Ft(e, t = void 0, n = void 0) {
2551
2554
  const {
2552
- _3DSwym: n,
2555
+ _3DSwym: s,
2553
2556
  _3DSwym_token: i,
2554
2557
  subjectUri: r,
2555
2558
  richMessage: a
2556
- } = e, o = `${n}/commentproxy/subjects/${r}/comments`, d = {
2559
+ } = e, o = `${s}/commentproxy/subjects/${r}/comments`, d = {
2557
2560
  method: "POST",
2558
2561
  headers: {
2559
2562
  "Content-type": "application/json;charset=UTF-8",
@@ -2569,23 +2572,23 @@ function Ft(e, t = void 0, s = void 0) {
2569
2572
  l.status = f.status, t && t(l);
2570
2573
  },
2571
2574
  onFailure(u) {
2572
- s && s(u);
2575
+ n && n(u);
2573
2576
  }
2574
2577
  };
2575
2578
  m(o, d);
2576
2579
  }
2577
- function Rt(e, t = void 0, s = void 0) {
2578
- e.tenant && M(e, (n) => {
2579
- const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2580
+ function Rt(e, t = void 0, n = void 0) {
2581
+ e.tenant && P(e, (s) => {
2582
+ const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2580
2583
  return t && t(i), i;
2581
2584
  });
2582
2585
  }
2583
- function jt(e, t = void 0, s = void 0) {
2584
- console.log("_Iterop_Auth_CAS"), e.tenant && M(e, (n) => {
2585
- console.log("serviceUrls", n);
2586
- const i = n.services.find(
2586
+ function Dt(e, t = void 0, n = void 0) {
2587
+ console.log("_Iterop_Auth_CAS"), e.tenant && P(e, (s) => {
2588
+ console.log("serviceUrls", s);
2589
+ const i = s.services.find(
2587
2590
  (o) => o.id === "3dpassport"
2588
- )?.url, r = n.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?cors=false&service=${r}/auth/cas`;
2591
+ )?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?cors=false&service=${r}/auth/cas`;
2589
2592
  m(a, {
2590
2593
  async onComplete(o) {
2591
2594
  console.log("response", o);
@@ -2597,24 +2600,24 @@ function jt(e, t = void 0, s = void 0) {
2597
2600
  });
2598
2601
  },
2599
2602
  onFailure(o) {
2600
- s && s(o);
2603
+ n && n(o);
2601
2604
  }
2602
2605
  });
2603
2606
  });
2604
2607
  }
2605
- function kt(e, t = void 0, s = void 0) {
2608
+ function jt(e, t = void 0, n = void 0) {
2606
2609
  if (e.tenant) {
2607
- const n = e.tenant.toLowerCase();
2608
- fetch(`https://api.uixhome.fr/${n}/iterop/jwtuser`, {
2610
+ const s = e.tenant.toLowerCase();
2611
+ fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2609
2612
  method: "POST"
2610
2613
  }).then((i) => i.json()).then((i) => {
2611
2614
  t && t(i);
2612
2615
  }).catch((i) => {
2613
- s && s(i);
2616
+ n && n(i);
2614
2617
  });
2615
2618
  }
2616
2619
  }
2617
- async function Dt(e, t, s = void 0, n = void 0) {
2620
+ async function kt(e, t, n = void 0, s = void 0) {
2618
2621
  if (e.tenant) {
2619
2622
  const i = e.tenant.toLowerCase();
2620
2623
  fetch(
@@ -2623,61 +2626,61 @@ async function Dt(e, t, s = void 0, n = void 0) {
2623
2626
  method: "GET"
2624
2627
  }
2625
2628
  ).then((r) => r.json()).then((r) => {
2626
- s && s(r);
2627
- }).catch((r) => {
2628
2629
  n && n(r);
2630
+ }).catch((r) => {
2631
+ s && s(r);
2629
2632
  });
2630
2633
  }
2631
2634
  }
2632
- async function vt(e, t, s, n = void 0, i = void 0) {
2635
+ async function vt(e, t, n, s = void 0, i = void 0) {
2633
2636
  if (e.tenant) {
2634
2637
  const r = e.tenant.toLowerCase();
2635
2638
  fetch(
2636
- `https://api.uixhome.fr/${r}/iterop/businesstable/one/${s}?t=${t}`,
2639
+ `https://api.uixhome.fr/${r}/iterop/businesstable/one/${n}?t=${t}`,
2637
2640
  {
2638
2641
  method: "POST"
2639
2642
  }
2640
2643
  ).then((a) => a.json()).then((a) => {
2641
- n && n(a);
2644
+ s && s(a);
2642
2645
  }).catch((a) => {
2643
2646
  i && i(a);
2644
2647
  });
2645
2648
  }
2646
2649
  }
2647
- async function At(e, t, s, n = void 0, i = void 0) {
2650
+ async function At(e, t, n, s = void 0, i = void 0) {
2648
2651
  if (e.tenant) {
2649
2652
  const r = e.tenant.toLowerCase();
2650
2653
  fetch(
2651
- `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${s}/?t=${t}`,
2654
+ `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`,
2652
2655
  {
2653
2656
  method: "POST"
2654
2657
  }
2655
2658
  ).then((a) => a.json()).then((a) => {
2656
- n && n(a);
2659
+ s && s(a);
2657
2660
  }).catch((a) => {
2658
2661
  i && i(a);
2659
2662
  });
2660
2663
  }
2661
2664
  }
2662
- async function Pt(e, t, s, n, i = void 0, r = void 0) {
2665
+ async function Pt(e, t, n, s, i = void 0, r = void 0) {
2663
2666
  if (e.tenant) {
2664
2667
  const a = e.tenant.toLowerCase();
2665
2668
  fetch(
2666
- `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${n}`,
2669
+ `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2667
2670
  {
2668
2671
  method: "POST"
2669
2672
  }
2670
2673
  ).then((o) => o.json()).then((o) => {
2671
2674
  i && i(o);
2672
2675
  }).catch((o) => {
2673
- r && r(o, s, n);
2676
+ r && r(o, n, s);
2674
2677
  });
2675
2678
  }
2676
2679
  }
2677
- async function Lt(e, t, s, n, i, r = void 0, a = void 0) {
2680
+ async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2678
2681
  if (e.tenant) {
2679
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${s}?t=${t}&c=${encodeURIComponent(
2680
- n
2682
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2683
+ s
2681
2684
  )}&b=${encodeURIComponent(i)}`;
2682
2685
  fetch(o, {
2683
2686
  method: "POST"
@@ -2686,17 +2689,17 @@ async function Lt(e, t, s, n, i, r = void 0, a = void 0) {
2686
2689
  }).catch((c) => {
2687
2690
  a && a({
2688
2691
  error: c,
2689
- tableId: s,
2690
- columns: n,
2692
+ tableId: n,
2693
+ columns: s,
2691
2694
  body: i
2692
2695
  });
2693
2696
  });
2694
2697
  }
2695
2698
  }
2696
- async function Mt(e, t, s, n, i = void 0, r = void 0) {
2699
+ async function Mt(e, t, n, s, i = void 0, r = void 0) {
2697
2700
  if (e.tenant) {
2698
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2699
- n
2701
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2702
+ s
2700
2703
  )}`;
2701
2704
  fetch(a, {
2702
2705
  method: "POST"
@@ -2710,15 +2713,15 @@ async function Mt(e, t, s, n, i = void 0, r = void 0) {
2710
2713
  });
2711
2714
  }
2712
2715
  }
2713
- async function Jt(e, t, s, n = void 0, i = void 0) {
2716
+ async function Jt(e, t, n, s = void 0, i = void 0) {
2714
2717
  if (e.tenant) {
2715
2718
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2716
- s
2719
+ n
2717
2720
  )}`;
2718
2721
  fetch(r, {
2719
2722
  method: "POST"
2720
2723
  }).then((a) => a.json()).then((a) => {
2721
- n && n(a);
2724
+ s && s(a);
2722
2725
  }).catch((a) => {
2723
2726
  i && i({
2724
2727
  error: a,
@@ -2727,11 +2730,11 @@ async function Jt(e, t, s, n = void 0, i = void 0) {
2727
2730
  });
2728
2731
  }
2729
2732
  }
2730
- async function Gt(e, t, s, n, i = void 0, r = void 0) {
2733
+ async function Gt(e, t, n, s, i = void 0, r = void 0) {
2731
2734
  if (e.tenant) {
2732
2735
  const a = e.tenant.toLowerCase();
2733
2736
  fetch(
2734
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2737
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2735
2738
  {
2736
2739
  method: "POST"
2737
2740
  }
@@ -2742,26 +2745,26 @@ async function Gt(e, t, s, n, i = void 0, r = void 0) {
2742
2745
  });
2743
2746
  }
2744
2747
  }
2745
- async function Kt(e, t, s, n = void 0, i = void 0) {
2748
+ async function Kt(e, t, n, s = void 0, i = void 0) {
2746
2749
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2747
2750
  const r = e.tenant.toLowerCase();
2748
2751
  fetch(
2749
- `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${s}/?t=${t}`,
2752
+ `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
2750
2753
  {
2751
2754
  method: "POST"
2752
2755
  }
2753
2756
  ).then((a) => a.json()).then((a) => {
2754
- n && n(a);
2757
+ s && s(a);
2755
2758
  }).catch((a) => {
2756
2759
  i && i(a);
2757
2760
  });
2758
2761
  }
2759
2762
  }
2760
- async function qt(e, t, s, n, i, r = void 0, a = void 0) {
2763
+ async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2761
2764
  if (e.tenant) {
2762
2765
  const o = e.tenant.toLowerCase();
2763
2766
  fetch(
2764
- `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${s}/?t=${t}&cli=${n}&b=${i}`,
2767
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2765
2768
  {
2766
2769
  method: "POST"
2767
2770
  }
@@ -2772,11 +2775,11 @@ async function qt(e, t, s, n, i, r = void 0, a = void 0) {
2772
2775
  });
2773
2776
  }
2774
2777
  }
2775
- async function Bt(e, t, s, n, i = void 0, r = void 0) {
2778
+ async function qt(e, t, n, s, i = void 0, r = void 0) {
2776
2779
  if (e.tenant) {
2777
2780
  const a = e.tenant.toLowerCase();
2778
2781
  fetch(
2779
- `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${s}/?t=${t}&b=${n}`,
2782
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2780
2783
  {
2781
2784
  method: "POST"
2782
2785
  }
@@ -2788,16 +2791,16 @@ async function Bt(e, t, s, n, i = void 0, r = void 0) {
2788
2791
  }
2789
2792
  }
2790
2793
  //!SECTION
2791
- async function Et(e, t, s, n = void 0, i = void 0) {
2794
+ async function Et(e, t, n, s = void 0, i = void 0) {
2792
2795
  if (e.tenant) {
2793
2796
  const r = e.tenant.toLowerCase();
2794
2797
  fetch(
2795
- `https://api.uixhome.fr/${r}/iterop/list/one/${s}/?t=${t}`,
2798
+ `https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
2796
2799
  {
2797
2800
  method: "POST"
2798
2801
  }
2799
2802
  ).then((a) => a.json()).then((a) => {
2800
- n && n(a);
2803
+ s && s(a);
2801
2804
  }).catch((a) => {
2802
2805
  i && i(a);
2803
2806
  });
@@ -2808,9 +2811,9 @@ function Xt(e) {
2808
2811
  const t = "Hello " + e;
2809
2812
  return console.log(t), t;
2810
2813
  }
2811
- function Wt(e, t = void 0, s = void 0) {
2812
- return console.log("credentials", e), new Promise((n) => {
2813
- if (e.token === "" && b(e), !e.space || e.space === "") {
2814
+ function Wt(e, t = void 0, n = void 0) {
2815
+ return console.log("credentials", e), new Promise((s) => {
2816
+ if (e.token === "" && T(e), !e.space || e.space === "") {
2814
2817
  const a = Z();
2815
2818
  console.log("platformeInfo", a);
2816
2819
  }
@@ -2876,13 +2879,13 @@ function Wt(e, t = void 0, s = void 0) {
2876
2879
  t && t(d);
2877
2880
  },
2878
2881
  onFailure(d) {
2879
- s && s(d);
2882
+ n && n(d);
2880
2883
  }
2881
2884
  });
2882
2885
  }
2883
2886
  },
2884
2887
  onFailure(a) {
2885
- s && s(a);
2888
+ n && n(a);
2886
2889
  }
2887
2890
  });
2888
2891
  });
@@ -2895,18 +2898,18 @@ export {
2895
2898
  Ye as _3DSpace_Upload_File,
2896
2899
  at as _3DSpace_bookmark_addSubsciptions,
2897
2900
  it as _3DSpace_bookmark_newWorkspace,
2898
- b as _3DSpace_csrf,
2899
- q as _3DSpace_download_doc,
2901
+ T as _3DSpace_csrf,
2902
+ G as _3DSpace_download_doc,
2900
2903
  ce as _3DSpace_download_multidoc,
2901
- G as _3DSpace_file_update,
2904
+ M as _3DSpace_file_update,
2902
2905
  ae as _3DSpace_file_update_csr,
2903
2906
  We as _3DSpace_file_url_csr,
2904
2907
  U as _3DSpace_get_csrf,
2905
- J as _3DSpace_get_docInfo,
2908
+ L as _3DSpace_get_docInfo,
2906
2909
  de as _3DSpace_get_downloadTicket_multidoc,
2907
2910
  Xe as _3DSpace_get_multiDocInfo,
2908
2911
  F as _3DSpace_get_securityContexts,
2909
- k as _3DSpace_get_ticket,
2912
+ j as _3DSpace_get_ticket,
2910
2913
  nt as _3DSpace_lifecycle_changeRevision,
2911
2914
  Ze as _3DSpace_lifecycle_changeState,
2912
2915
  et as _3DSpace_lifecycle_getGraph,
@@ -2914,14 +2917,14 @@ export {
2914
2917
  Qe as _3DSpace_lifecycle_getNextStates,
2915
2918
  st as _3DSpace_lifecycle_getRevisions,
2916
2919
  Ve as _3DSpace_put_docInfo,
2917
- Nt as _3DSwym_ForwardIdea,
2920
+ xt as _3DSwym_ForwardIdea,
2918
2921
  Ft as _3DSwym_addComment,
2919
2922
  wt as _3DSwym_buildDirectMessage,
2920
- Tt as _3DSwym_deleteIdea,
2923
+ bt as _3DSwym_deleteIdea,
2921
2924
  $t as _3DSwym_editIdea,
2922
2925
  _e as _3DSwym_findCommunityToInstantMSG,
2923
2926
  yt as _3DSwym_getAllCommunities,
2924
- xt as _3DSwym_getAllListIdeas,
2927
+ Nt as _3DSwym_getAllListIdeas,
2925
2928
  gt as _3DSwym_getAllNews,
2926
2929
  _t as _3DSwym_getFamiliarPeople,
2927
2930
  St as _3DSwym_getIdeaStatusMaturity,
@@ -2930,34 +2933,34 @@ export {
2930
2933
  C as _3DSwym_get_Token,
2931
2934
  It as _3DSwym_get_currentUser,
2932
2935
  Ut as _3DSwym_get_findUser,
2933
- bt as _3DSwym_postIdea,
2936
+ Tt as _3DSwym_postIdea,
2934
2937
  Ct as _3DSwym_postIdeaTemplate,
2935
- P as _3DSwym_sendMessageData,
2938
+ v as _3DSwym_sendMessageData,
2936
2939
  Le as _AppMngt_get_info_user,
2937
2940
  Pe as _AppMngt_get_users,
2938
2941
  Pt as _Iterop_AddOrRemoveRows,
2939
- jt as _Iterop_Auth_CAS,
2942
+ Dt as _Iterop_Auth_CAS,
2940
2943
  Kt as _Iterop_GetOneDependencyTable,
2941
2944
  Et as _Iterop_GetOneList,
2942
- qt as _Iterop_PatchDependencyTable,
2943
- Bt as _Iterop_PutDependencyTable,
2945
+ Bt as _Iterop_PatchDependencyTable,
2946
+ qt as _Iterop_PutDependencyTable,
2944
2947
  Lt as _Iterop_businessTableSearchInRows,
2945
2948
  Jt as _Iterop_createBusinessTable,
2946
- Dt as _Iterop_getAllBusinessTables,
2949
+ kt as _Iterop_getAllBusinessTables,
2947
2950
  vt as _Iterop_getOneBusinessTable,
2948
2951
  At as _Iterop_getOneBusinessTableRows,
2949
- kt as _Iterop_jwtUser,
2952
+ jt as _Iterop_jwtUser,
2950
2953
  Gt as _Iterop_runProcess,
2951
2954
  Mt as _Iterop_updateBusinessTable,
2952
- De as _getMe,
2955
+ ke as _getMe,
2953
2956
  Z as _getPlateformInfos,
2954
- ke as _getPlatformServices,
2955
- M as _getServiceUrl,
2957
+ je as _getPlatformServices,
2958
+ P as _getServiceUrl,
2956
2959
  ve as _getServiceUrl_3DPassport,
2957
2960
  Rt as _getServiceUrl_Iterop,
2958
2961
  m as _httpCallAuthenticated,
2959
2962
  Fe as _setDraggable,
2960
- je as _setDroppable,
2963
+ De as _setDroppable,
2961
2964
  Re as _setupTagger,
2962
2965
  ft as addTagToDoc,
2963
2966
  H as chunkArray,
@@ -2966,10 +2969,10 @@ export {
2966
2969
  Me as createUserGroups,
2967
2970
  pe as dataMixing,
2968
2971
  Ke as deleteUserGroups,
2969
- Ne as findAdresse,
2972
+ xe as findAdresse,
2970
2973
  ot as getAllContextSecurity,
2971
2974
  te as getCSRFToken,
2972
- xe as getCommunes,
2975
+ Ne as getCommunes,
2973
2976
  Je as getComplementUG,
2974
2977
  rt as getDataFrom3DSpace,
2975
2978
  Ie as getDataFromGouvFr,
@@ -2980,8 +2983,8 @@ export {
2980
2983
  Ge as getUserGroupsList,
2981
2984
  ee as getUsersGroupRules,
2982
2985
  ut as get_3DSpace_csrf,
2983
- qe as patchUserGroups,
2984
- Be as patchUserGroupsControl,
2986
+ Be as patchUserGroups,
2987
+ qe as patchUserGroupsControl,
2985
2988
  dt as pushDataIn3DSpace,
2986
2989
  Ee as readUserGroupControl,
2987
2990
  mt as removeTagToDoc,