@beam3_dev/api_module 0.0.173 → 0.0.174

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,10 +1,10 @@
1
- import { v4 as G } from "uuid";
1
+ import { v4 as E } from "uuid";
2
2
  import { DateTime as v } from "luxon";
3
- import { requirejs as O, widget as P } from "@widget-lab/3ddashboard-utils";
4
- function R() {
5
- return G();
3
+ import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
+ function P() {
5
+ return E();
6
6
  }
7
- const E = {
7
+ const K = {
8
8
  b3M3Yellow: "#FFB300",
9
9
  b3AboutageBlue: "#42A5F5",
10
10
  b3UsinageGreen: "#689F38",
@@ -34,7 +34,7 @@ const E = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function fe(e, t = void 0, n = void 0) {
37
+ async function me(e, t = void 0, n = void 0) {
38
38
  const s = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
@@ -50,7 +50,7 @@ async function fe(e, t = void 0, n = void 0) {
50
50
  n && n(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function me(e, t = void 0, n = void 0) {
53
+ async function ge(e, t = void 0, n = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -65,11 +65,11 @@ async function me(e, t = void 0, n = void 0) {
65
65
  n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
- async function ge(e, t = E) {
68
+ async function he(e, t = K) {
69
69
  let n = v.now().year;
70
- const s = e, i = [], c = (a) => {
71
- for (let r in a)
72
- i.push({ date: r, comment: a[r] });
70
+ const s = e, i = [], r = (a) => {
71
+ for (let c in a)
72
+ i.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,36 +80,36 @@ async function ge(e, t = E) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((c) => c.json()).then((c) => {
84
+ r(c);
85
+ }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of i)
90
+ for (let c of i)
91
91
  a.events.findIndex(
92
- (p) => p.start === v.fromISO(r.date).toISODate() && p.name === "Férié : " + r.comment
92
+ (p) => p.start === v.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: v.fromISO(r.date).toISODate(),
96
- end: v.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + c.comment,
95
+ start: v.fromISO(c.date).toISODate(),
96
+ end: v.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function he(e, t, n = !0) {
103
+ async function Se(e, t, n = !0) {
104
104
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
105
+ 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;
106
106
  }
107
107
  function m(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
109
109
  n.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function Se(e, t, n) {
112
+ function ye(e, t, n) {
113
113
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
114
  s.draggable(e, {
115
115
  data: t,
@@ -121,23 +121,23 @@ function _e(e, t = void 0) {
121
121
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
122
122
  let s;
123
123
  s === void 0 && (s = n.createProxy({
124
- widgetId: P.id,
124
+ widgetId: R.id,
125
125
  filteringMode: "WithFilteringServices"
126
126
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
127
127
  });
128
128
  }
129
- function ye(e, t) {
129
+ function we(e, t) {
130
130
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
131
131
  n.droppable(e, {
132
132
  drop: t
133
133
  });
134
134
  });
135
135
  }
136
- async function we(e, t = void 0, n = void 0) {
136
+ async function Ce(e, t = void 0, n = void 0) {
137
137
  await O(
138
138
  ["DS/i3DXCompassServices/i3DXCompassServices"],
139
139
  (s) => {
140
- (!e || e === "") && (e = P.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
140
+ (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
141
141
  s.getPlatformServices({
142
142
  platformId: e,
143
143
  onComplete: t,
@@ -147,17 +147,17 @@ async function we(e, t = void 0, n = void 0) {
147
147
  }
148
148
  );
149
149
  }
150
- function K() {
150
+ function V() {
151
151
  let e = {};
152
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
154
154
  "com.3ds.wp.passport.cors"
155
155
  );
156
156
  e = {
157
157
  tenant: n,
158
158
  user: s,
159
159
  appsConfiguration: i,
160
- appConf: c
160
+ appConf: r
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
163
163
  }
@@ -166,9 +166,9 @@ function b(e, t = void 0, n = void 0) {
166
166
  const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
167
  m(s, {
168
168
  onComplete(i) {
169
- const c = typeof i == "string" ? JSON.parse(i) : i;
170
- if (c && "platforms" in c) {
171
- const o = c.platforms.find(
169
+ const r = typeof i == "string" ? JSON.parse(i) : i;
170
+ if (r && "platforms" in r) {
171
+ const o = r.platforms.find(
172
172
  (a) => a.id === e.tenant.toUpperCase()
173
173
  );
174
174
  t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
@@ -181,14 +181,14 @@ function b(e, t = void 0, n = void 0) {
181
181
  });
182
182
  }
183
183
  }
184
- function Ce(e, t = void 0, n = void 0) {
184
+ function Te(e, t = void 0, n = void 0) {
185
185
  if (e.tenant) {
186
186
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
187
  m(s, {
188
188
  onComplete(i) {
189
- const c = JSON.parse(i);
190
- if (console.log("serviceId=3dpassport", c), Array.isArray(c) && c.length > 0) {
191
- const o = `${c[0].services[0].url}`;
189
+ const r = JSON.parse(i);
190
+ if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
191
+ const o = `${r[0].services[0].url}`;
192
192
  t && t(o);
193
193
  }
194
194
  },
@@ -198,7 +198,7 @@ function Ce(e, t = void 0, n = void 0) {
198
198
  });
199
199
  }
200
200
  }
201
- function Te(e, t, n) {
201
+ function Oe(e, t, n) {
202
202
  const s = {
203
203
  base: `${e.space}`,
204
204
  uri: "/resources/AppsMngt/api/custom/applications",
@@ -211,41 +211,41 @@ function Te(e, t, n) {
211
211
  "Content-Type": "application/json",
212
212
  Accept: "application/json"
213
213
  },
214
- onComplete(c, o, a) {
215
- const r = JSON.parse(c), d = r.data.map((p) => {
216
- const l = p.attributes.name, u = p.id;
217
- return { name: l, id: u };
214
+ onComplete(r, o, a) {
215
+ const c = JSON.parse(r), d = c.data.map((p) => {
216
+ const l = p.attributes.name, f = p.id;
217
+ return { name: l, id: f };
218
218
  });
219
- t && t(d, r);
219
+ t && t(d, c);
220
220
  },
221
- onFailure(c, o) {
222
- const a = c;
221
+ onFailure(r, o) {
222
+ const a = r;
223
223
  a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
224
224
  }
225
225
  });
226
226
  }
227
- function Oe(e, t = void 0, n = void 0) {
227
+ function be(e, t = void 0, n = void 0) {
228
228
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
229
  m(s, {
230
- onComplete(i, c, o) {
230
+ onComplete(i, r, o) {
231
231
  const a = JSON.parse(i);
232
232
  console.log("_AppMngt_get_users => ", a), t && t(a);
233
233
  },
234
- onFailure(i, c) {
234
+ onFailure(i, r) {
235
235
  const o = i;
236
- o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
236
+ o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
237
237
  }
238
238
  });
239
239
  }
240
- function be(e, t, n = void 0, s = void 0) {
240
+ function Ne(e, t, n = void 0, s = void 0) {
241
241
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
242
  m(i, {
243
- onComplete(c, o, a) {
244
- const r = JSON.parse(c);
245
- n && n(r);
243
+ onComplete(r, o, a) {
244
+ const c = JSON.parse(r);
245
+ n && n(c);
246
246
  },
247
- onFailure(c, o) {
248
- const a = c;
247
+ onFailure(r, o) {
248
+ const a = r;
249
249
  a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
250
250
  }
251
251
  });
@@ -254,15 +254,15 @@ const U = {
254
254
  "Content-Type": "application/json",
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
257
- function Ne(e, t, n = void 0, s = void 0) {
258
- const { space: i, currentUser: c } = e, a = `${i}${{
257
+ function $e(e, t, n = void 0, s = void 0) {
258
+ const { space: i, currentUser: r } = e, a = `${i}${{
259
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
- }.URIUGr}`, r = {
260
+ }.URIUGr}`, c = {
261
261
  groups: [
262
262
  {
263
263
  title: t.title,
264
264
  description: t.description,
265
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
265
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
266
266
  pending_members: [],
267
267
  sharing: t.sharing,
268
268
  visibility: t.visibility
@@ -272,7 +272,7 @@ function Ne(e, t, n = void 0, s = void 0) {
272
272
  m(a, {
273
273
  method: "POST",
274
274
  headers: U,
275
- data: JSON.stringify(r),
275
+ data: JSON.stringify(c),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
278
278
  },
@@ -283,8 +283,8 @@ function Ne(e, t, n = void 0, s = void 0) {
283
283
  }
284
284
  });
285
285
  }
286
- function $e(e, t, n = void 0, s = void 0) {
287
- const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
286
+ function ve(e, t, n = void 0, s = void 0) {
287
+ 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}`;
288
288
  m(d, {
289
289
  opts: {
290
290
  method: "GET",
@@ -293,32 +293,32 @@ function $e(e, t, n = void 0, s = void 0) {
293
293
  Accept: "application/json,text/javascript,*/*"
294
294
  }
295
295
  },
296
- onComplete(u) {
297
- n && n(JSON.parse(u));
296
+ onComplete(f) {
297
+ n && n(JSON.parse(f));
298
298
  },
299
- onFailure(u, f) {
300
- const g = u;
301
- g.msg = f.errormsg, g.errCode = f.errorcode, s && s(g);
299
+ onFailure(f, u) {
300
+ const g = f;
301
+ g.msg = u.errormsg, g.errCode = u.errorcode, s && s(g);
302
302
  }
303
303
  });
304
304
  }
305
- function V(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
305
+ function B(e, t = void 0, n = void 0) {
306
+ const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
307
307
  method: "GET",
308
308
  Accept: "application/json,*/*,test/javascript"
309
- }, d = `${c}${o}${a}`;
309
+ }, d = `${r}${o}${a}`;
310
310
  m(d, {
311
- OPTsH: r,
311
+ OPTsH: c,
312
312
  onComplete(p) {
313
313
  t && t(JSON.parse(p));
314
314
  },
315
315
  onFailure(p, l) {
316
- const u = p;
317
- u.msg = l.errormsg, u.errCode = l.errorcode, n && n(u);
316
+ const f = p;
317
+ f.msg = l.errormsg, f.errCode = l.errorcode, n && n(f);
318
318
  }
319
319
  });
320
320
  }
321
- function ve(e, t = void 0, n = void 0) {
321
+ function Ie(e, t = void 0, n = void 0) {
322
322
  const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
323
323
  "Content-Type": "application/json",
324
324
  Accept: "application/json,text/javascript,*/*"
@@ -327,16 +327,16 @@ function ve(e, t = void 0, n = void 0) {
327
327
  m(a, {
328
328
  opts: d,
329
329
  onComplete(p) {
330
- const l = JSON.parse(p), u = {}, f = l.groups.filter((g) => g.uri.startsWith("uuid:"));
330
+ const l = JSON.parse(p), f = {}, u = l.groups.filter((g) => g.uri.startsWith("uuid:"));
331
331
  if (i && Object.keys(i).length > 0) {
332
- const g = f.filter((_) => _.owner === i.email), h = f.filter((_) => _.members.includes(i.email)), S = g.concat(h);
333
- u.iam = S, u.UG = f, u.iamMember = h, V(
332
+ const g = u.filter((y) => y.owner === i.email), h = u.filter((y) => y.members.includes(i.email)), S = g.concat(h);
333
+ f.iam = S, f.UG = u, f.iamMember = h, B(
334
334
  e,
335
- (_) => {
336
- u.rules = _, t && t(u);
335
+ (y) => {
336
+ f.rules = y, t && t(f);
337
337
  },
338
- (_) => {
339
- n && n(_);
338
+ (y) => {
339
+ n && n(y);
340
340
  }
341
341
  );
342
342
  }
@@ -349,14 +349,14 @@ function ve(e, t = void 0, n = void 0) {
349
349
  console.log(p);
350
350
  }
351
351
  }
352
- function Ie(e, t) {
352
+ function Ae(e, t) {
353
353
  const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
354
  m(i, {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function Ae(e, t, n, s = void 0, i = void 0) {
359
- const { space: c, tenant: o } = e, a = {
358
+ function ke(e, t, n, s = void 0, i = void 0) {
359
+ const { space: r, tenant: o } = e, a = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
362
362
  nextURICh: "/characteristics",
@@ -364,7 +364,7 @@ function Ae(e, t, n, s = void 0, i = void 0) {
364
364
  nexURImem: "/members",
365
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
- }, r = n, d = `${c}${a.URIUGr}/${t}`, p = JSON.stringify(r);
367
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
368
368
  m(d, {
369
369
  headers: U,
370
370
  method: "PATCH",
@@ -378,8 +378,8 @@ function Ae(e, t, n, s = void 0, i = void 0) {
378
378
  }
379
379
  });
380
380
  }
381
- function ke(e, t, n, s = void 0, i = void 0) {
382
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
381
+ function Ue(e, t, n, s = void 0, i = void 0) {
382
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  m(a, {
384
384
  method: "PATCH",
385
385
  headers: U,
@@ -393,7 +393,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
393
393
  }
394
394
  });
395
395
  }
396
- function Ue(e, t, n = void 0, s = void 0) {
396
+ function Fe(e, t, n = void 0, s = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  m(o, {
399
399
  opts: {
@@ -411,37 +411,37 @@ function Ue(e, t, n = void 0, s = void 0) {
411
411
  }
412
412
  });
413
413
  }
414
- async function B(e, t, n) {
414
+ async function W(e, t, n) {
415
415
  if (e.space) {
416
416
  const s = `${e.space}/resources/v1/application/CSRF`;
417
417
  m(s, {
418
418
  onComplete(i) {
419
419
  i = JSON.parse(i), t && t(i.csrf);
420
420
  },
421
- onFailure(i, c, o) {
422
- n && n({ error: i, headers: c, xhr: o });
421
+ onFailure(i, r, o) {
422
+ n && n({ error: i, headers: r, xhr: o });
423
423
  }
424
424
  });
425
425
  }
426
426
  }
427
427
  var I = {};
428
- function W(e, t) {
428
+ function X(e, t) {
429
429
  return Object.prototype.hasOwnProperty.call(e, t);
430
430
  }
431
- var X = function(e, t, n, s) {
431
+ var Y = function(e, t, n, s) {
432
432
  t = t || "&", n = n || "=";
433
433
  var i = {};
434
434
  if (typeof e != "string" || e.length === 0)
435
435
  return i;
436
- var c = /\+/g;
436
+ var r = /\+/g;
437
437
  e = e.split(t);
438
438
  var o = 1e3;
439
439
  s && typeof s.maxKeys == "number" && (o = s.maxKeys);
440
440
  var a = e.length;
441
441
  o > 0 && a > o && (a = o);
442
- for (var r = 0; r < a; ++r) {
443
- var d = e[r].replace(c, "%20"), p = d.indexOf(n), l, u, f, g;
444
- p >= 0 ? (l = d.substr(0, p), u = d.substr(p + 1)) : (l = d, u = ""), f = decodeURIComponent(l), g = decodeURIComponent(u), W(i, f) ? Array.isArray(i[f]) ? i[f].push(g) : i[f] = [i[f], g] : i[f] = g;
442
+ for (var c = 0; c < a; ++c) {
443
+ var d = e[c].replace(r, "%20"), p = d.indexOf(n), l, f, u, g;
444
+ p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f), X(i, u) ? Array.isArray(i[u]) ? i[u].push(g) : i[u] = [i[u], g] : i[u] = g;
445
445
  }
446
446
  return i;
447
447
  }, $ = function(e) {
@@ -455,25 +455,25 @@ var X = function(e, t, n, s) {
455
455
  default:
456
456
  return "";
457
457
  }
458
- }, Y = function(e, t, n, s) {
458
+ }, H = function(e, t, n, s) {
459
459
  return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
460
- var c = encodeURIComponent($(i)) + n;
460
+ var r = encodeURIComponent($(i)) + n;
461
461
  return Array.isArray(e[i]) ? e[i].map(function(o) {
462
- return c + encodeURIComponent($(o));
463
- }).join(t) : c + encodeURIComponent($(e[i]));
462
+ return r + encodeURIComponent($(o));
463
+ }).join(t) : r + encodeURIComponent($(e[i]));
464
464
  }).filter(Boolean).join(t) : s ? encodeURIComponent($(s)) + n + encodeURIComponent($(e)) : "";
465
465
  };
466
- I.decode = I.parse = X;
467
- I.encode = I.stringify = Y;
468
- async function H(e, t = void 0, n = void 0, s = void 0) {
466
+ I.decode = I.parse = Y;
467
+ I.encode = I.stringify = H;
468
+ async function z(e, t = void 0, n = void 0, s = void 0) {
469
469
  const i = e.space;
470
470
  if (t === void 0) {
471
471
  console.log("Le paramètre docid est obligatoire");
472
472
  return;
473
473
  }
474
- const c = i + `/resources/v1/modeler/documents/${t}`;
475
- m(c, {
476
- onComplete(o, a, r) {
474
+ const r = i + `/resources/v1/modeler/documents/${t}`;
475
+ m(r, {
476
+ onComplete(o, a, c) {
477
477
  const d = JSON.parse(o);
478
478
  n && n(d);
479
479
  },
@@ -482,22 +482,22 @@ async function H(e, t = void 0, n = void 0, s = void 0) {
482
482
  }
483
483
  });
484
484
  }
485
- async function Fe(e, t = void 0, n = void 0, s = void 0) {
485
+ async function je(e, t = void 0, n = void 0, s = void 0) {
486
486
  const i = e.space;
487
487
  if (t === void 0) {
488
488
  console.log("Le paramètre docids est obligatoire");
489
489
  return;
490
490
  }
491
- let c = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
491
+ let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
492
492
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
493
493
  });
494
- m(c, {
494
+ m(r, {
495
495
  method: "POST",
496
496
  headers: {
497
497
  "Content-Type": "application/x-www-form-urlencoded"
498
498
  },
499
499
  data: o,
500
- onComplete(a, r, d) {
500
+ onComplete(a, c, d) {
501
501
  const p = JSON.parse(a);
502
502
  n && n(p);
503
503
  },
@@ -510,7 +510,7 @@ function A(e, t = void 0, n = void 0) {
510
510
  if (e.objID && e.objID !== "") {
511
511
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
512
  m(s, {
513
- onComplete(i, c, o) {
513
+ onComplete(i, r, o) {
514
514
  const a = JSON.parse(i);
515
515
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
516
516
  },
@@ -533,14 +533,14 @@ function T(e, t = void 0, n = void 0) {
533
533
  if (e.space) {
534
534
  const s = e.space + "/resources/v1/application/CSRF";
535
535
  m(s, {
536
- onComplete(i, c, o) {
536
+ onComplete(i, r, o) {
537
537
  const a = JSON.parse(i);
538
538
  t && t(a.csrf.value);
539
539
  },
540
- onFailure(i, c, o) {
540
+ onFailure(i, r, o) {
541
541
  n && n({
542
542
  response: i,
543
- headers: c,
543
+ headers: r,
544
544
  xhr: o
545
545
  });
546
546
  }
@@ -558,12 +558,12 @@ function F(e, t = void 0, n = void 0) {
558
558
  headers: {
559
559
  ENO_CSRF_TOKEN: e.token
560
560
  },
561
- onComplete(c, o) {
562
- const r = JSON.parse(c).data[0].dataelements.ticketURL;
563
- t && t(r, o);
561
+ onComplete(r, o) {
562
+ const c = JSON.parse(r).data[0].dataelements.ticketURL;
563
+ t && t(c, o);
564
564
  },
565
- onFailure(c, o) {
566
- console.warn("☠️ error => ", c, o), n && n(c, o);
565
+ onFailure(r, o) {
566
+ console.warn("☠️ error => ", r, o), n && n(r, o);
567
567
  }
568
568
  });
569
569
  },
@@ -572,9 +572,9 @@ function F(e, t = void 0, n = void 0) {
572
572
  }
573
573
  );
574
574
  }
575
- function je(e, t, n, s = void 0, i = void 0) {
576
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
- n || (n = e.token), m(c, {
575
+ function xe(e, t, n, s = void 0, i = void 0) {
576
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
+ n || (n = e.token), m(r, {
578
578
  method: "PUT",
579
579
  headers: {
580
580
  ENO_CSRF_TOKEN: n
@@ -583,10 +583,10 @@ function je(e, t, n, s = void 0, i = void 0) {
583
583
  let a = JSON.parse(o);
584
584
  if (console.log("☠️ info => ", a), a.success === !0)
585
585
  try {
586
- const r = a.data[0].dataelements.ticketURL;
587
- s && s(r);
588
- } catch (r) {
589
- i && i(r);
586
+ const c = a.data[0].dataelements.ticketURL;
587
+ s && s(c);
588
+ } catch (c) {
589
+ i && i(c);
590
590
  }
591
591
  },
592
592
  onFailure(o) {
@@ -594,44 +594,44 @@ function je(e, t, n, s = void 0, i = void 0) {
594
594
  }
595
595
  });
596
596
  }
597
- function z(e, t, n, s, i, c = void 0, o = void 0) {
598
- const a = () => q(
597
+ function q(e, t, n, s, i, r = void 0, o = void 0) {
598
+ const a = () => Q(
599
599
  e,
600
600
  t,
601
601
  n,
602
602
  s,
603
603
  i,
604
604
  e.token,
605
- c,
605
+ r,
606
606
  o
607
607
  );
608
608
  e.token ? a() : A(
609
609
  e,
610
610
  t,
611
- (r) => {
612
- e.token = r.csrf.value, a();
611
+ (c) => {
612
+ e.token = c.csrf.value, a();
613
613
  }
614
614
  );
615
615
  }
616
- function q(e, t, n, s, i, c, o = void 0, a = void 0) {
617
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
618
- m(r, {
616
+ function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
617
+ const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
618
+ m(c, {
619
619
  method: "PUT",
620
620
  headers: {
621
621
  ENO_CSRF_TOKEN: e.token
622
622
  },
623
623
  onComplete(d, p, l) {
624
- const u = JSON.parse(d).csrf, f = JSON.parse(d).data[0].dataelements, g = new FormData();
625
- g.append("__fcs__jobTicket", f.ticket), g.append("file_0", s, i);
624
+ const f = JSON.parse(d).csrf, u = JSON.parse(d).data[0].dataelements, g = new FormData();
625
+ g.append("__fcs__jobTicket", u.ticket), g.append("file_0", s, i);
626
626
  const h = {};
627
627
  h.method = "POST", h.data = g, h.onComplete = function(S) {
628
- let _ = {
628
+ let y = {
629
629
  method: "PUT",
630
630
  headers: {
631
631
  SecurityContext: "ctx::" + e.ctx
632
632
  },
633
633
  data: JSON.stringify({
634
- csrf: u,
634
+ csrf: f,
635
635
  data: [{
636
636
  relateddata: {
637
637
  files: [{
@@ -647,49 +647,44 @@ function q(e, t, n, s, i, c, o = void 0, a = void 0) {
647
647
  }]
648
648
  }),
649
649
  type: "json",
650
- onComplete(w) {
651
- o && o(w);
650
+ onComplete(C) {
651
+ o && o(C);
652
652
  },
653
- onFailure(w) {
654
- a && a(w);
653
+ onFailure(C) {
654
+ a && a(C);
655
655
  }
656
- }, y = e.tenant.toUpperCase();
656
+ }, _ = e.tenant.toUpperCase();
657
657
  m(
658
- e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${y}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
659
- _
658
+ e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${_}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
659
+ y
660
660
  );
661
661
  }, h.onFailure = function(S) {
662
662
  a && a(S);
663
- }, h.timeout = 0, m(f.ticketURL, h);
663
+ }, h.timeout = 0, m(u.ticketURL, h);
664
664
  }
665
665
  });
666
666
  }
667
- async function xe(e, t, n, s, i = void 0, c = void 0) {
668
- const o = e.space, a = e.token, r = e.ctx, d = new FormData(), p = new Blob([JSON.stringify(t)], {
669
- type: "text/plain"
670
- }), l = {
671
- url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
672
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
673
- };
674
- if (!o && o !== "") {
675
- console.log("le store._3DSpace est vide");
676
- return;
677
- }
678
- m(l.url_Ticket, {
679
- method: "PUT",
680
- headers: {
681
- ENO_CSRF_TOKEN: a.value,
682
- SecurityContext: `ctx::${r}`
683
- },
684
- onComplete(u, f, g) {
685
- const h = JSON.parse(u).data[0].dataelements;
686
- d.append("__fcs__jobTicket", h.ticket), d.append("file_0", p, n);
687
- const S = {
688
- method: "POST",
689
- data: d,
690
- onComplete(w) {
691
- if (r && r !== "" && a && a !== "") {
692
- const k = {
667
+ async function Re(e, t, n, s, i = void 0, r = void 0) {
668
+ const o = e.space, a = e.token, c = e.ctx;
669
+ if (o !== "") {
670
+ let d = `${o}/resources/v1/modeler/documents/files/CheckinTicket`;
671
+ m(d, {
672
+ method: "PUT",
673
+ headers: {
674
+ ENO_CSRF_TOKEN: a
675
+ },
676
+ onComplete(p, l, f) {
677
+ let u = JSON.parse(p).data[0].dataelements, g = new FormData();
678
+ const h = new Blob([t], {
679
+ type: "text/plain"
680
+ });
681
+ g.append("__fcs__jobTicket", u.ticket), g.append("filename", h, n);
682
+ const S = (_) => _.indexOf(".") === -1 ? _ : _.split(".").slice(0, -1).join(".");
683
+ let y = {
684
+ method: "POST",
685
+ data: g,
686
+ onComplete(_) {
687
+ let C = P(), G = {
693
688
  method: "POST",
694
689
  headers: {
695
690
  ENO_CSRF_TOKEN: a,
@@ -697,91 +692,92 @@ async function xe(e, t, n, s, i = void 0, c = void 0) {
697
692
  "Content-Type": "application/json"
698
693
  },
699
694
  data: JSON.stringify({
700
- csrf: u.csrf,
701
- data: [{
702
- type: "Document",
703
- dataelements: {
704
- title: `Title_${n.toLowerCase().split(" ").join("_")}`,
705
- policy: "Document Release",
706
- description: s
707
- },
708
- relateddata: {
709
- files: [{
710
- dataelements: {
711
- title: `${n}.json`,
712
- receipt: w
713
- }
714
- }]
715
- },
716
- tempId: "temp_" + R()
717
- }]
695
+ data: [
696
+ {
697
+ type: "Document",
698
+ dataelements: {
699
+ title: S(n),
700
+ description: s,
701
+ policy: "Document Release"
702
+ },
703
+ relateddata: {
704
+ files: [
705
+ {
706
+ dataelements: {
707
+ title: n,
708
+ receipt: _
709
+ }
710
+ }
711
+ ]
712
+ },
713
+ tempId: C
714
+ }
715
+ ]
718
716
  }),
719
717
  type: "json",
720
- timeout: 0,
721
- onComplete: _,
722
- onFailure: y
718
+ onComplete(k) {
719
+ i && i(k);
720
+ },
721
+ onFailure(k) {
722
+ r && r(k);
723
+ }
723
724
  };
724
- r !== "" && m(l.url_Post, k);
725
- } else
726
- console.warn("le store est vide");
727
- },
728
- onFailure: y
729
- };
730
- function _(w) {
731
- console.log("Success -- response ", w.data[0]), i && i(w);
732
- }
733
- function y(w, k) {
734
- console.log("Erreur -- response ", w, `
735
- headers `, k), c && c(w);
725
+ m(o + "/resources/v1/modeler/documents/?SecurityContext=ctx::" + c, G);
726
+ },
727
+ onFailure(_) {
728
+ r && r(_);
729
+ },
730
+ timeout: 0
731
+ };
732
+ m(u.ticketURL, y);
736
733
  }
737
- m(h.ticketURL, S);
738
- }
739
- });
734
+ });
735
+ }
740
736
  }
741
- function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1) {
737
+ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
742
738
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
743
739
  m(a, {
744
740
  method: "GET",
745
- onComplete(r) {
746
- const d = JSON.parse(r);
747
- let p = "", l, u, f;
741
+ onComplete(c) {
742
+ const d = JSON.parse(c);
743
+ let p = "", l, f, u;
748
744
  if (t) {
749
745
  let g = d.collabspaces.find((h) => h.title === t);
750
746
  if (g) {
751
747
  l = t;
752
748
  let h = g.couples;
753
749
  h = h.filter(
754
- (S, _, y) => _ === y.findIndex(
755
- (w) => w.organization.pid === S.organization.pid && w.role.pid === S.role.pid
750
+ (S, y, _) => y === _.findIndex(
751
+ (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
756
752
  )
757
753
  ), n && (Array.isArray(n) ? n.forEach((S) => {
758
- f || h.forEach((_) => {
759
- if (S === _.role.name && s === _.organization.title)
760
- f = S, u = s;
761
- else if (S === _.role.name) {
762
- let y = h.filter(
763
- (w) => w.role.name === S
754
+ u || h.forEach((y) => {
755
+ if (S === y.role.name && s === y.organization.title)
756
+ u = S, f = s;
757
+ else if (S === y.role.name) {
758
+ let _ = h.filter(
759
+ (C) => C.role.name === S
764
760
  );
765
- y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
761
+ _.length === 1 ? (u = _[0].role.name, f = _[0].organization.title) : r(_);
766
762
  }
767
763
  });
768
764
  }) : h.forEach((S) => {
769
765
  if (n === S.role.name && s === S.organization.title)
770
- f = n, u = s;
766
+ u = n, f = s;
771
767
  else if (n === S.role.name) {
772
- let _ = h.filter(
773
- (y) => y.role.name === n
768
+ let y = h.filter(
769
+ (_) => _.role.name === n
774
770
  );
775
- _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
771
+ y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : r(y);
776
772
  }
777
773
  }));
778
774
  }
779
775
  }
780
- l && u && f ? (p = f + "." + u + "." + l, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : c && (p = f + "." + u + "." + l, c(p));
776
+ l && f && u ? (p = u + "." + f + "." + l, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : r && (p = u + "." + f + "." + l, r(p));
781
777
  },
782
- onFailure(r, d) {
778
+ onFailure(c, d) {
783
779
  console.log("Erreur de récupération du contexte de sécurité. => ", {
784
- err: r,
780
+ err: c,
785
781
  headers: d
786
782
  });
787
783
  }
@@ -792,7 +788,7 @@ async function D(e, t = void 0, n = void 0) {
792
788
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
793
789
  ), n && n("_3DSpace_download_doc() / Le paramètre objectId est obligatoire")), (e.space === "" || !e.space) && (console.warn(
794
790
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
795
- ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && B(
791
+ ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && W(
796
792
  e,
797
793
  (s) => {
798
794
  e.token = s;
@@ -803,12 +799,12 @@ async function D(e, t = void 0, n = void 0) {
803
799
  ), new Promise((s, i) => {
804
800
  F(
805
801
  e,
806
- (c) => {
807
- e?.returnType === "blob" ? (console.log("ticketURL blob", c), fetch(c).then((o) => o.blob()).then((o) => {
802
+ (r) => {
803
+ e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
808
804
  t && t(o);
809
805
  }).catch((o) => {
810
806
  n && n(o);
811
- })) : m(c, {
807
+ })) : m(r, {
812
808
  onComplete(o) {
813
809
  let a;
814
810
  try {
@@ -818,41 +814,41 @@ async function D(e, t = void 0, n = void 0) {
818
814
  }
819
815
  t && typeof t == "function" && t(a), s(a);
820
816
  },
821
- onFailure(o, a, r) {
817
+ onFailure(o, a, c) {
822
818
  n && (console.log("error http", o), n({
823
819
  msg: JSON.parse(o),
824
820
  headers: a,
825
- xhr: r
821
+ xhr: c
826
822
  }), i({
827
823
  msg: JSON.parse(o),
828
824
  headers: a,
829
- xhr: r
825
+ xhr: c
830
826
  }));
831
827
  }
832
828
  });
833
829
  },
834
- (c) => {
835
- n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
830
+ (r) => {
831
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
836
832
  }
837
833
  );
838
834
  });
839
835
  }
840
- async function Q(e, t, n = void 0, s = void 0) {
836
+ async function Z(e, t, n = void 0, s = void 0) {
841
837
  let i = [];
842
838
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
843
839
  for (let a = 0; a < t.length; a += 80) {
844
- const r = t.slice(a, a + 80);
845
- i.push(r);
840
+ const c = t.slice(a, a + 80);
841
+ i.push(c);
846
842
  }
847
843
  const o = (a) => {
848
- Z(
844
+ ee(
849
845
  e,
850
846
  i[a],
851
847
  () => {
852
848
  a++, a < i.length && o(a);
853
849
  },
854
- (r) => {
855
- n && n(r);
850
+ (c) => {
851
+ n && n(c);
856
852
  }
857
853
  );
858
854
  };
@@ -864,11 +860,11 @@ async function Q(e, t, n = void 0, s = void 0) {
864
860
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
865
861
  );
866
862
  }
867
- function Z(e, t, n = void 0, s = void 0, i = void 0) {
868
- const c = [];
869
- t.forEach((r) => {
870
- c.push({
871
- id: r
863
+ function ee(e, t, n = void 0, s = void 0, i = void 0) {
864
+ const r = [];
865
+ t.forEach((c) => {
866
+ r.push({
867
+ id: c
872
868
  });
873
869
  });
874
870
  let o = JSON.stringify({
@@ -876,25 +872,25 @@ function Z(e, t, n = void 0, s = void 0, i = void 0) {
876
872
  name: "ENO_CSRF_TOKEN",
877
873
  value: e.token
878
874
  },
879
- data: c
875
+ data: r
880
876
  });
881
877
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
882
878
  m(a, {
883
879
  method: "PUT",
884
880
  data: o,
885
881
  type: "json",
886
- onComplete(r) {
887
- const d = r.data;
888
- r.success === !0 && (n && n(), d.forEach((p) => {
882
+ onComplete(c) {
883
+ const d = c.data;
884
+ c.success === !0 && (n && n(), d.forEach((p) => {
889
885
  try {
890
- const l = p.dataelements.fileName, u = p.dataelements.ticketURL;
891
- m(u, {
892
- onComplete: (f, g) => {
886
+ const l = p.dataelements.fileName, f = p.dataelements.ticketURL;
887
+ m(f, {
888
+ onComplete: (u, g) => {
893
889
  let h;
894
890
  try {
895
- h = JSON.parse(f);
891
+ h = JSON.parse(u);
896
892
  } catch {
897
- h = f.blob();
893
+ h = u.blob();
898
894
  }
899
895
  s && s({
900
896
  objectId: p.id,
@@ -903,8 +899,8 @@ function Z(e, t, n = void 0, s = void 0, i = void 0) {
903
899
  data: h
904
900
  });
905
901
  },
906
- onFailure: (f) => {
907
- console.log("error http", f);
902
+ onFailure: (u) => {
903
+ console.log("error http", u);
908
904
  }
909
905
  });
910
906
  } catch (l) {
@@ -912,15 +908,15 @@ function Z(e, t, n = void 0, s = void 0, i = void 0) {
912
908
  }
913
909
  }));
914
910
  },
915
- onFailure(r) {
916
- console.log(r), i && i(r);
911
+ onFailure(c) {
912
+ console.log(c), i && i(c);
917
913
  }
918
914
  });
919
915
  }
920
916
  function Pe(e, t, n = void 0, s = void 0) {
921
917
  return new Promise((i) => {
922
918
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
923
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
919
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
924
920
  N(
925
921
  e.space,
926
922
  "ESPACE COMMUN",
@@ -952,12 +948,12 @@ function Pe(e, t, n = void 0, s = void 0) {
952
948
  s && s(a);
953
949
  }
954
950
  };
955
- m(c, o);
951
+ m(r, o);
956
952
  }
957
953
  });
958
954
  }
959
- function Re(e, t, n, s = void 0, i = void 0) {
960
- return new Promise((c) => {
955
+ function De(e, t, n, s = void 0, i = void 0) {
956
+ return new Promise((r) => {
961
957
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
962
958
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
963
959
  N(
@@ -965,9 +961,9 @@ function Re(e, t, n, s = void 0, i = void 0) {
965
961
  "ESPACE COMMUN",
966
962
  ["VPLMProjectLeader", "VPLMCreator"],
967
963
  void 0,
968
- (r) => e.ctx = r,
969
- (r) => {
970
- console.log("onError =>", r);
964
+ (c) => e.ctx = c,
965
+ (c) => {
966
+ console.log("onError =>", c);
971
967
  }
972
968
  );
973
969
  let a = {
@@ -985,21 +981,21 @@ function Re(e, t, n, s = void 0, i = void 0) {
985
981
  }]
986
982
  }),
987
983
  type: "json",
988
- onComplete(r) {
989
- s && s(r);
984
+ onComplete(c) {
985
+ s && s(c);
990
986
  },
991
- onFailure(r) {
992
- i && i(r);
987
+ onFailure(c) {
988
+ i && i(c);
993
989
  }
994
990
  };
995
991
  m(o, a);
996
992
  }
997
993
  });
998
994
  }
999
- function De(e, t, n = void 0, s = void 0) {
995
+ function Le(e, t, n = void 0, s = void 0) {
1000
996
  return new Promise((i) => {
1001
997
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1002
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
998
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1003
999
  N(
1004
1000
  e.space,
1005
1001
  "ESPACE COMMUN",
@@ -1031,14 +1027,14 @@ function De(e, t, n = void 0, s = void 0) {
1031
1027
  s && s(a);
1032
1028
  }
1033
1029
  };
1034
- m(c, o);
1030
+ m(r, o);
1035
1031
  }
1036
1032
  });
1037
1033
  }
1038
- function Le(e, t, n = void 0, s = void 0) {
1034
+ function Me(e, t, n = void 0, s = void 0) {
1039
1035
  return new Promise((i) => {
1040
1036
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1041
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1037
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1042
1038
  N(
1043
1039
  e.space,
1044
1040
  "ESPACE COMMUN",
@@ -1076,12 +1072,12 @@ function Le(e, t, n = void 0, s = void 0) {
1076
1072
  s && s(a);
1077
1073
  }
1078
1074
  };
1079
- m(c, o);
1075
+ m(r, o);
1080
1076
  }
1081
1077
  });
1082
1078
  }
1083
- function Me(e, t, n, s = void 0, i = void 0) {
1084
- return new Promise((c) => {
1079
+ function Je(e, t, n, s = void 0, i = void 0) {
1080
+ return new Promise((r) => {
1085
1081
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1086
1082
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1087
1083
  N(
@@ -1089,9 +1085,9 @@ function Me(e, t, n, s = void 0, i = void 0) {
1089
1085
  "ESPACE COMMUN",
1090
1086
  ["VPLMProjectLeader", "VPLMCreator"],
1091
1087
  void 0,
1092
- (r) => e.ctx = r,
1093
- (r) => {
1094
- console.log("onError =>", r);
1088
+ (c) => e.ctx = c,
1089
+ (c) => {
1090
+ console.log("onError =>", c);
1095
1091
  }
1096
1092
  );
1097
1093
  let a = {
@@ -1114,21 +1110,21 @@ function Me(e, t, n, s = void 0, i = void 0) {
1114
1110
  notificationTimeout: 600
1115
1111
  }),
1116
1112
  type: "json",
1117
- onComplete(r) {
1118
- s && s(r);
1113
+ onComplete(c) {
1114
+ s && s(c);
1119
1115
  },
1120
- onFailure(r) {
1121
- i && i(r);
1116
+ onFailure(c) {
1117
+ i && i(c);
1122
1118
  }
1123
1119
  };
1124
1120
  m(o, a);
1125
1121
  }
1126
1122
  });
1127
1123
  }
1128
- function Je(e, t, n, s, i = void 0, c = void 0) {
1124
+ function Ge(e, t, n, s, i = void 0, r = void 0) {
1129
1125
  return new Promise((o) => {
1130
1126
  const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1131
- let r = {
1127
+ let c = {
1132
1128
  attributes: {
1133
1129
  title: n,
1134
1130
  description: s,
@@ -1137,7 +1133,7 @@ function Je(e, t, n, s, i = void 0, c = void 0) {
1137
1133
  }, d = {
1138
1134
  items: []
1139
1135
  };
1140
- t && (d.parentId = t), d.items.push(r);
1136
+ t && (d.parentId = t), d.items.push(c);
1141
1137
  let p = {
1142
1138
  method: "POST",
1143
1139
  headers: {
@@ -1152,13 +1148,13 @@ function Je(e, t, n, s, i = void 0, c = void 0) {
1152
1148
  i && i(l);
1153
1149
  },
1154
1150
  onFailure(l) {
1155
- c && c(l);
1151
+ r && r(l);
1156
1152
  }
1157
1153
  };
1158
1154
  m(a, p);
1159
1155
  });
1160
1156
  }
1161
- function Ge(e, t, n, s, i = void 0, c = void 0) {
1157
+ function Ee(e, t, n, s, i = void 0, r = void 0) {
1162
1158
  return console.log("credentials", e), new Promise((o) => {
1163
1159
  `${e.space}`, JSON.stringify({
1164
1160
  csrf: {
@@ -1180,7 +1176,7 @@ function Ge(e, t, n, s, i = void 0, c = void 0) {
1180
1176
  });
1181
1177
  }
1182
1178
  //!SECTION
1183
- function Ee(e, t = void 0, n = void 0) {
1179
+ function Ke(e, t = void 0, n = void 0) {
1184
1180
  const s = {
1185
1181
  base: `${e.space}`,
1186
1182
  uri: "/resources/bps/cspaces",
@@ -1192,57 +1188,57 @@ function Ee(e, t = void 0, n = void 0) {
1192
1188
  Accept: "application/json,text/javascript,*/*",
1193
1189
  "Content-Type": "application/ds-json"
1194
1190
  },
1195
- onComplete(c, o) {
1196
- const a = JSON.parse(c);
1191
+ onComplete(r, o) {
1192
+ const a = JSON.parse(r);
1197
1193
  t && t(a, o);
1198
1194
  },
1199
- onFailure(c, o, a) {
1200
- n && n({ response: c, headers: o, xhr: a });
1195
+ onFailure(r, o, a) {
1196
+ n && n({ response: r, headers: o, xhr: a });
1201
1197
  }
1202
1198
  });
1203
1199
  }
1204
- function Ke(e, t, n, s) {
1200
+ function Ve(e, t, n, s) {
1205
1201
  F(
1206
1202
  e.space,
1207
1203
  t,
1208
1204
  (i) => {
1209
1205
  m(i, {
1210
1206
  header: { ENO_CSRF_TOKEN: e.token },
1211
- onComplete: (c) => {
1212
- n && n(c);
1207
+ onComplete: (r) => {
1208
+ n && n(r);
1213
1209
  },
1214
- onFailure: (c) => {
1215
- console.log("error http", c), s && s(c);
1210
+ onFailure: (r) => {
1211
+ console.log("error http", r), s && s(r);
1216
1212
  }
1217
1213
  });
1218
1214
  }
1219
1215
  );
1220
1216
  }
1221
- async function Ve(e, t, n = void 0, s = void 0) {
1217
+ async function Be(e, t, n = void 0, s = void 0) {
1222
1218
  return new Promise((i) => {
1223
- F(e, t, (c) => {
1224
- m(c, {
1225
- onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1226
- onFailure: (o, a, r) => {
1227
- s && s(o, a, r), console.log(o, a?.errormsg);
1219
+ F(e, t, (r) => {
1220
+ m(r, {
1221
+ onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1222
+ onFailure: (o, a, c) => {
1223
+ s && s(o, a, c), console.log(o, a?.errormsg);
1228
1224
  }
1229
1225
  });
1230
1226
  });
1231
1227
  });
1232
1228
  }
1233
- function Be(e, t, n, s = void 0, i = void 0) {
1234
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1229
+ function We(e, t, n, s = void 0, i = void 0) {
1230
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1235
1231
  A(
1236
1232
  e,
1237
1233
  n,
1238
1234
  (o) => {
1239
- const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1240
- z(
1235
+ const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1236
+ q(
1241
1237
  e,
1242
1238
  n,
1243
1239
  a,
1244
- c,
1245
1240
  r,
1241
+ c,
1246
1242
  (d) => {
1247
1243
  s && s(d);
1248
1244
  },
@@ -1255,7 +1251,7 @@ function Be(e, t, n, s = void 0, i = void 0) {
1255
1251
  }
1256
1252
  let L, M;
1257
1253
  const j = [];
1258
- async function We(e, t = void 0, n = void 0) {
1254
+ async function Xe(e, t = void 0, n = void 0) {
1259
1255
  e.objID && e.objID !== "" ? A(
1260
1256
  e,
1261
1257
  (s) => {
@@ -1274,7 +1270,7 @@ async function We(e, t = void 0, n = void 0) {
1274
1270
  }
1275
1271
  );
1276
1272
  }
1277
- async function Xe(e, t = void 0, n = void 0) {
1273
+ async function Ye(e, t = void 0, n = void 0) {
1278
1274
  console.log("getDatasByTenant (getDocuments)", e), await D(
1279
1275
  e,
1280
1276
  (s) => {
@@ -1286,36 +1282,36 @@ async function Xe(e, t = void 0, n = void 0) {
1286
1282
  }
1287
1283
  );
1288
1284
  }
1289
- function Ye(e, t = void 0, n = void 0) {
1285
+ function He(e, t = void 0, n = void 0) {
1290
1286
  const s = [];
1291
1287
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1292
1288
  console.warn("la liste est vide ou n'est pas un tableau");
1293
1289
  return;
1294
1290
  }
1295
- e.objIds.forEach((i, c) => {
1291
+ e.objIds.forEach((i, r) => {
1296
1292
  D(
1297
1293
  e,
1298
1294
  i.objID,
1299
1295
  (o) => {
1300
- s.push({ [i.name]: o }), i.name === "dbProjets" && (L = o.affaires.map((a) => a.objectID), ee(e, M)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1296
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (L = o.affaires.map((a) => a.objectID), te(e, M)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1301
1297
  }
1302
1298
  );
1303
1299
  });
1304
1300
  }
1305
- function ee(e, t, n = void 0, s = void 0) {
1306
- Q(
1301
+ function te(e, t, n = void 0, s = void 0) {
1302
+ Z(
1307
1303
  e,
1308
1304
  L,
1309
1305
  (i) => {
1310
- const c = [...t];
1311
- c.find((o) => o.objectID === i.objectId).data = i.data, M = c, j.push(i.data), n && n(j);
1306
+ const r = [...t];
1307
+ r.find((o) => o.objectID === i.objectId).data = i.data, M = r, j.push(i.data), n && n(j);
1312
1308
  },
1313
1309
  (i) => {
1314
1310
  s && (s(i), console.log(i));
1315
1311
  }
1316
1312
  );
1317
1313
  }
1318
- const te = "FA35FB9B177A280065800EA0000F599C", ne = [
1314
+ const ne = "FA35FB9B177A280065800EA0000F599C", se = [
1319
1315
  "swym",
1320
1316
  "3dspace",
1321
1317
  "drive",
@@ -1329,17 +1325,17 @@ const te = "FA35FB9B177A280065800EA0000F599C", ne = [
1329
1325
  where: "ds6w:where",
1330
1326
  who: "ds6w:who",
1331
1327
  why: "ds6w:why"
1332
- }, se = {
1333
- objId: te,
1328
+ }, ie = {
1329
+ objId: ne,
1334
1330
  pred: "who",
1335
1331
  order_by: "desc",
1336
1332
  tag: "testTag"
1337
1333
  };
1338
- function He(e, t, n = void 0, s = void 0) {
1339
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1334
+ function ze(e, t, n = void 0, s = void 0) {
1335
+ const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1340
1336
  uri: "/resources/6w/tags",
1341
1337
  otpCTX: "SecurityContext=preferred",
1342
- optTenant: `tenant=${c}`
1338
+ optTenant: `tenant=${r}`
1343
1339
  }, p = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, l = {
1344
1340
  tag: [
1345
1341
  {
@@ -1350,7 +1346,7 @@ function He(e, t, n = void 0, s = void 0) {
1350
1346
  ],
1351
1347
  predicate: J[a],
1352
1348
  object: {
1353
- literal: r
1349
+ literal: c
1354
1350
  }
1355
1351
  }
1356
1352
  ]
@@ -1362,23 +1358,23 @@ function He(e, t, n = void 0, s = void 0) {
1362
1358
  Accept: "application/json"
1363
1359
  },
1364
1360
  data: JSON.stringify(l),
1365
- onComplete(u) {
1366
- JSON.parse(u);
1367
- const f = {};
1361
+ onComplete(f) {
1362
+ JSON.parse(f);
1363
+ const u = {};
1368
1364
  setTimeout(() => {
1369
- H(
1365
+ z(
1370
1366
  e,
1371
1367
  o,
1372
1368
  (g) => {
1373
- const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1374
- f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, ie(
1369
+ const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", y = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1370
+ u.name = h, u.ext = S, u.createBy = y, t.info = { ...u }, ae(
1375
1371
  e,
1376
1372
  t,
1377
- (y) => {
1378
- n && n(y);
1373
+ (_) => {
1374
+ n && n(_);
1379
1375
  },
1380
- (y) => {
1381
- s && s(y);
1376
+ (_) => {
1377
+ s && s(_);
1382
1378
  }
1383
1379
  );
1384
1380
  },
@@ -1389,25 +1385,25 @@ function He(e, t, n = void 0, s = void 0) {
1389
1385
  );
1390
1386
  }, 2e3);
1391
1387
  },
1392
- onFailure(u, f) {
1393
- const g = u;
1394
- g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1388
+ onFailure(f, u) {
1389
+ const g = f;
1390
+ g.msg = u.errormsg, g.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1395
1391
  }
1396
1392
  });
1397
1393
  }
1398
- function ie(e, t, n = void 0, s = void 0) {
1394
+ function ae(e, t, n = void 0, s = void 0) {
1399
1395
  console.log("obj ", t);
1400
- const i = t.info.name, c = {
1396
+ const i = t.info.name, r = {
1401
1397
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1402
1398
  uri: "/federated/search"
1403
- }, o = `${c.baseUrl}${c.uri}`, a = {
1399
+ }, o = `${r.baseUrl}${r.uri}`, a = {
1404
1400
  "Content-Type": "application/json",
1405
1401
  Accept: "application/json,text/javascript,*/*"
1406
- }, r = R(), d = {
1402
+ }, c = P(), d = {
1407
1403
  with_indexing_date: !0,
1408
1404
  with_synthesis: !0,
1409
1405
  with_nls: !1,
1410
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1406
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1411
1407
  locale: "fr",
1412
1408
  select_predicate: [
1413
1409
  "ds6w:label",
@@ -1445,7 +1441,7 @@ function ie(e, t, n = void 0, s = void 0) {
1445
1441
  }
1446
1442
  },
1447
1443
  select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1448
- order_by: se.order_by,
1444
+ order_by: ie.order_by,
1449
1445
  order_field: "relevance",
1450
1446
  select_snippets: [
1451
1447
  "ds6w:snippet",
@@ -1456,7 +1452,7 @@ function ie(e, t, n = void 0, s = void 0) {
1456
1452
  ],
1457
1453
  nresults: 40,
1458
1454
  start: "0",
1459
- source: ne,
1455
+ source: se,
1460
1456
  tenant: e.tenant,
1461
1457
  login: {
1462
1458
  "3dspace": {
@@ -1473,17 +1469,17 @@ function ie(e, t, n = void 0, s = void 0) {
1473
1469
  n(l);
1474
1470
  },
1475
1471
  onFailure(p, l) {
1476
- const u = p;
1477
- u.msg = l.errormsg, u.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", p);
1472
+ const f = p;
1473
+ f.msg = l.errormsg, f.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", p);
1478
1474
  }
1479
1475
  });
1480
1476
  }
1481
- function ze(e, t, n = void 0, s = void 0) {
1482
- const { objId: i, pred: c, tag: o } = t, a = {
1477
+ function qe(e, t, n = void 0, s = void 0) {
1478
+ const { objId: i, pred: r, tag: o } = t, a = {
1483
1479
  uri: "/resources/6w/tags",
1484
1480
  otpCTX: "SecurityContext=preferred",
1485
1481
  optTenant: `tenant=${e.tenant}`
1486
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1482
+ }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1487
1483
  tag: [
1488
1484
  {
1489
1485
  subject: [
@@ -1491,14 +1487,14 @@ function ze(e, t, n = void 0, s = void 0) {
1491
1487
  uri: `pid://${i}`
1492
1488
  }
1493
1489
  ],
1494
- predicate: J[c],
1490
+ predicate: J[r],
1495
1491
  object: {
1496
1492
  literal: o
1497
1493
  }
1498
1494
  }
1499
1495
  ]
1500
1496
  };
1501
- m(r, {
1497
+ m(c, {
1502
1498
  method: "DELETE",
1503
1499
  data: JSON.stringify(d),
1504
1500
  headers: {
@@ -1509,25 +1505,25 @@ function ze(e, t, n = void 0, s = void 0) {
1509
1505
  n && n(p);
1510
1506
  },
1511
1507
  onFailure(p, l) {
1512
- const u = p;
1513
- u.msg = l.errormsg, u.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1508
+ const f = p;
1509
+ f.msg = l.errormsg, f.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1514
1510
  }
1515
1511
  });
1516
1512
  }
1517
- function qe(e, t = "", n = void 0, s = void 0) {
1513
+ function Qe(e, t = "", n = void 0, s = void 0) {
1518
1514
  const { space: i } = e;
1519
1515
  if (t === "")
1520
1516
  return;
1521
- const c = {
1517
+ const r = {
1522
1518
  uri: "/resources/v1/modeler/documents"
1523
1519
  }, o = {
1524
1520
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1525
1521
  Accept: "application/json,text/javascript,*/*"
1526
- }, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1522
+ }, 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}`;
1527
1523
  m(a, {
1528
1524
  method: "POST",
1529
1525
  headers: o,
1530
- data: r,
1526
+ data: c,
1531
1527
  onComplete(d) {
1532
1528
  n && n(JSON.parse(d));
1533
1529
  },
@@ -1537,10 +1533,10 @@ function qe(e, t = "", n = void 0, s = void 0) {
1537
1533
  }
1538
1534
  });
1539
1535
  }
1540
- async function C(e, t = void 0, n = void 0) {
1536
+ async function w(e, t = void 0, n = void 0) {
1541
1537
  const s = e.space + "/api/index/tk";
1542
1538
  return m(s, {
1543
- onComplete(i, c, o) {
1539
+ onComplete(i, r, o) {
1544
1540
  const a = JSON.parse(i);
1545
1541
  if (t)
1546
1542
  return t(a), e.token = a?.result?.ServerToken;
@@ -1550,7 +1546,7 @@ async function C(e, t = void 0, n = void 0) {
1550
1546
  }
1551
1547
  });
1552
1548
  }
1553
- function Qe(e, t = void 0, n = void 0) {
1549
+ function Ze(e, t = void 0, n = void 0) {
1554
1550
  const s = `${e.space}/api/exalead/whatsnew`, i = {
1555
1551
  params: {
1556
1552
  community_id: null,
@@ -1561,11 +1557,11 @@ function Qe(e, t = void 0, n = void 0) {
1561
1557
  start: 0
1562
1558
  }
1563
1559
  };
1564
- C(e, (c) => {
1560
+ w(e, (r) => {
1565
1561
  m(s, {
1566
1562
  method: "POST",
1567
1563
  headers: {
1568
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1564
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1569
1565
  "Content-type": "application/json;charset=UTF-8",
1570
1566
  Accept: "application/json"
1571
1567
  },
@@ -1580,7 +1576,7 @@ function Qe(e, t = void 0, n = void 0) {
1580
1576
  });
1581
1577
  });
1582
1578
  }
1583
- function Ze(e, t = void 0, n = void 0) {
1579
+ function et(e, t = void 0, n = void 0) {
1584
1580
  const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1585
1581
  params: {
1586
1582
  idsToFilterArr: [],
@@ -1590,19 +1586,19 @@ function Ze(e, t = void 0, n = void 0) {
1590
1586
  maxNbOfCommonElements: "5"
1591
1587
  }
1592
1588
  };
1593
- C(e, (c) => {
1589
+ w(e, (r) => {
1594
1590
  m(s, {
1595
1591
  method: "POST",
1596
1592
  headers: {
1597
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1593
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1598
1594
  "Content-type": "application/json;charset=UTF-8",
1599
1595
  Accept: "application/json"
1600
1596
  },
1601
1597
  data: JSON.stringify(i),
1602
1598
  type: "json",
1603
1599
  onComplete(o, a) {
1604
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1605
- t && t(r, o);
1600
+ const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1601
+ t && t(c, o);
1606
1602
  },
1607
1603
  onFailure(o, a) {
1608
1604
  n && n(o, a);
@@ -1610,57 +1606,57 @@ function Ze(e, t = void 0, n = void 0) {
1610
1606
  });
1611
1607
  });
1612
1608
  }
1613
- function et(e, t = void 0, n = void 0) {
1609
+ function tt(e, t = void 0, n = void 0) {
1614
1610
  const s = {
1615
1611
  base: e.space,
1616
1612
  uri: "/api/community/listmycommunities",
1617
1613
  limit: `/limit/${e.limit ? e.limit : 128}`,
1618
1614
  page: `/page/${e.page ? e.page : "1"}`
1619
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1620
- C(e, (o) => {
1615
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1616
+ w(e, (o) => {
1621
1617
  m(i, {
1622
1618
  method: "GET",
1623
1619
  headers: {
1624
1620
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1625
1621
  },
1626
- onComplete(a, r, d) {
1622
+ onComplete(a, c, d) {
1627
1623
  const l = JSON.parse(a).result;
1628
- let u = 0;
1629
- l.forEach((f) => {
1624
+ let f = 0;
1625
+ l.forEach((u) => {
1630
1626
  const g = {
1631
- description: f.description,
1632
- id: f.id,
1633
- title: f.title,
1634
- owner: f.owner,
1635
- role: f.role,
1636
- access: f.access
1627
+ description: u.description,
1628
+ id: u.id,
1629
+ title: u.title,
1630
+ owner: u.owner,
1631
+ role: u.role,
1632
+ access: u.access
1637
1633
  };
1638
- ae(
1634
+ oe(
1639
1635
  e,
1640
- f.id,
1636
+ u.id,
1641
1637
  (h) => {
1642
- u++, g.members = h, c.push(g), u === l.length && t && t(c);
1638
+ f++, g.members = h, r.push(g), f === l.length && t && t(r);
1643
1639
  },
1644
1640
  (h) => n(h)
1645
1641
  );
1646
1642
  });
1647
1643
  },
1648
- onFailure(a, r) {
1644
+ onFailure(a, c) {
1649
1645
  const d = a;
1650
- d.status = r.status, d.response = r.errormsg, n && n(d);
1646
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1651
1647
  }
1652
1648
  });
1653
1649
  });
1654
1650
  }
1655
- function ae(e, t, n, s) {
1656
- const i = `${e.space}/api/community/listmembers`, c = {
1651
+ function oe(e, t, n, s) {
1652
+ const i = `${e.space}/api/community/listmembers`, r = {
1657
1653
  params: {
1658
1654
  page: e.page ? e.page : 1,
1659
1655
  limit: e.limit ? e.limit : 50,
1660
1656
  community_id: t
1661
1657
  }
1662
1658
  };
1663
- C(e, (o) => {
1659
+ w(e, (o) => {
1664
1660
  m(i, {
1665
1661
  method: "POST",
1666
1662
  headers: {
@@ -1668,63 +1664,63 @@ function ae(e, t, n, s) {
1668
1664
  Accept: "application/json",
1669
1665
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1670
1666
  },
1671
- data: JSON.stringify(c),
1667
+ data: JSON.stringify(r),
1672
1668
  type: "json",
1673
- onComplete(a, r, d) {
1669
+ onComplete(a, c, d) {
1674
1670
  n && n(a);
1675
1671
  },
1676
- onFailure(a, r) {
1672
+ onFailure(a, c) {
1677
1673
  const d = a;
1678
- d.status = r.status, d.response = r.errormsg, s && s(d);
1674
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1679
1675
  }
1680
1676
  });
1681
1677
  });
1682
1678
  }
1683
- function tt(e, t = void 0, n = void 0) {
1679
+ function nt(e, t = void 0, n = void 0) {
1684
1680
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1685
1681
  e.commu_id || (e.commu_id = s);
1686
1682
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1687
- C(e, (c) => {
1683
+ w(e, (r) => {
1688
1684
  m(i, {
1689
1685
  method: "GET",
1690
1686
  headers: {
1691
1687
  "Content-type": "application/json;charset=UTF-8",
1692
1688
  Accept: "application/json",
1693
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1689
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1694
1690
  },
1695
1691
  onComplete(o) {
1696
1692
  const a = JSON.parse(o);
1697
1693
  t && t(a);
1698
1694
  },
1699
1695
  onFailure(o, a) {
1700
- const r = o;
1701
- r.status = a.status, r.response = a.errormsg, n && n(r);
1696
+ const c = o;
1697
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1702
1698
  }
1703
1699
  });
1704
1700
  });
1705
1701
  }
1706
- function nt(e, t, n = void 0, s = void 0) {
1707
- const { listAllContacts: i, currentUser: c } = e;
1702
+ function st(e, t, n = void 0, s = void 0) {
1703
+ const { listAllContacts: i, currentUser: r } = e;
1708
1704
  console.log("__listAllContacts", i.hits);
1709
1705
  const o = `${e.space}/api/directmessages`, a = {
1710
- users: [c.login].concat(t.receipt)
1711
- }, r = {
1706
+ users: [r.login].concat(t.receipt)
1707
+ }, c = {
1712
1708
  id_msg: "",
1713
1709
  senderId: e.currentUser.login,
1714
1710
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1715
- msg: re(t.msg)
1711
+ msg: ce(t.msg)
1716
1712
  };
1717
1713
  let d = !1;
1718
- oe(
1714
+ re(
1719
1715
  a.users,
1720
1716
  (p) => {
1721
- p !== void 0 && (r.id_msg = p.id, d = !0, x(e, r));
1717
+ p !== void 0 && (c.id_msg = p.id, d = !0, x(e, c));
1722
1718
  },
1723
1719
  (p) => {
1724
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), r.id_msg = "";
1720
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), c.id_msg = "";
1725
1721
  }
1726
1722
  ), d === !1 && setTimeout(() => {
1727
- d === !1 && C(e, (p) => {
1723
+ d === !1 && w(e, (p) => {
1728
1724
  m(o, {
1729
1725
  method: "POST",
1730
1726
  headers: {
@@ -1734,37 +1730,37 @@ function nt(e, t, n = void 0, s = void 0) {
1734
1730
  },
1735
1731
  data: JSON.stringify(a),
1736
1732
  type: "json",
1737
- onComplete(l, u, f) {
1733
+ onComplete(l, f, u) {
1738
1734
  const g = l;
1739
- g.reponse = JSON.parse(f.response), g.status = f.status, n && n(g), r.id_msg = g.result.id, x(e, r);
1735
+ g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, x(e, c);
1740
1736
  },
1741
- onFailure(l, u, f) {
1737
+ onFailure(l, f, u) {
1742
1738
  const g = l;
1743
- g.msg = u.errormsg, g.status = u.status, s && s(g);
1739
+ g.msg = f.errormsg, g.status = f.status, s && s(g);
1744
1740
  }
1745
1741
  });
1746
1742
  });
1747
1743
  }, 500);
1748
1744
  }
1749
- function oe(e, t, n, s) {
1745
+ function re(e, t, n, s) {
1750
1746
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1751
- C(e, (c) => {
1747
+ w(e, (r) => {
1752
1748
  m(i, {
1753
1749
  method: "GET",
1754
1750
  headers: {
1755
1751
  Accept: "application/json,text/javascript,*/*",
1756
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1752
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1757
1753
  },
1758
1754
  onComplete(o) {
1759
- const a = JSON.parse(o), r = [];
1755
+ const a = JSON.parse(o), c = [];
1760
1756
  a.result.forEach((l) => {
1761
- l.users = l.users.sort((u, f) => u.login.localeCompare(f.login)), l.users.length === t.length && r.push(l);
1757
+ l.users = l.users.sort((f, u) => f.login.localeCompare(u.login)), l.users.length === t.length && c.push(l);
1762
1758
  });
1763
- const d = t.sort(), p = r.find((l) => {
1764
- const u = [];
1765
- return l.users.forEach((f) => {
1766
- u.push(f.login);
1767
- }), JSON.stringify(u) === JSON.stringify(d);
1759
+ const d = t.sort(), p = c.find((l) => {
1760
+ const f = [];
1761
+ return l.users.forEach((u) => {
1762
+ f.push(u.login);
1763
+ }), JSON.stringify(f) === JSON.stringify(d);
1768
1764
  });
1769
1765
  n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
1770
1766
  },
@@ -1781,7 +1777,7 @@ function x(e, t, n = void 0, s = void 0) {
1781
1777
  uri: "/api/community",
1782
1778
  id_msg: `${t.id_msg}`,
1783
1779
  endUri: "/instantmessages"
1784
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1780
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1785
1781
  author: { login: t.senderId, displayName: t.senderName },
1786
1782
  accessState: null,
1787
1783
  commentUri: null,
@@ -1791,8 +1787,8 @@ function x(e, t, n = void 0, s = void 0) {
1791
1787
  parentCommentUri: null,
1792
1788
  richMessage: t.msg
1793
1789
  };
1794
- console.log("_3dSwym_sendDirectMessageData url ", c), C(e, (a) => {
1795
- m(c, {
1790
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1791
+ m(r, {
1796
1792
  method: "POST",
1797
1793
  headers: {
1798
1794
  "Content-Type": "application/json",
@@ -1801,25 +1797,25 @@ function x(e, t, n = void 0, s = void 0) {
1801
1797
  },
1802
1798
  data: JSON.stringify(o),
1803
1799
  type: "json",
1804
- onComplete(r, d, p) {
1805
- const l = r;
1800
+ onComplete(c, d, p) {
1801
+ const l = c;
1806
1802
  l.status = p.status, l.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", l), n && n(l);
1807
1803
  },
1808
- onFailure(r, d) {
1809
- const p = r;
1804
+ onFailure(c, d) {
1805
+ const p = c;
1810
1806
  p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
1811
1807
  }
1812
1808
  });
1813
1809
  });
1814
1810
  }
1815
- function re(e) {
1811
+ function ce(e) {
1816
1812
  const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1817
1813
  return `<p>${e} </p>
1818
1814
  <br/>
1819
1815
  <hr/>
1820
1816
  <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1821
1817
  }
1822
- const ce = {
1818
+ const de = {
1823
1819
  title: "TEST DEV COMMUNITY IDEA",
1824
1820
  // titre du post
1825
1821
  community_id: "YXdA5x4DSUKtlAi2wmnyTA",
@@ -1829,53 +1825,53 @@ const ce = {
1829
1825
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1830
1826
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1831
1827
  };
1832
- function st(e, t, n = void 0, s = void 0) {
1833
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1834
- (r) => r.id === t.community_id
1828
+ function it(e, t, n = void 0, s = void 0) {
1829
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1830
+ (c) => c.id === t.community_id
1835
1831
  ), o = e.swymCommunities.find(
1836
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1832
+ (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1837
1833
  ), a = {
1838
1834
  params: {
1839
1835
  title: t.title,
1840
1836
  // String, le nom de l'affaire
1841
- community_id: c?.id !== void 0 ? c.id : o.id,
1837
+ community_id: r?.id !== void 0 ? r.id : o.id,
1842
1838
  // String, l'id de la communauté
1843
- message: de(t.text_html),
1839
+ message: pe(t.text_html),
1844
1840
  // STRING => le contenue du message doit être au format HTML
1845
1841
  published: 1
1846
1842
  // 1 publier, 0 non publier
1847
1843
  }
1848
1844
  };
1849
- C(e, (r) => {
1845
+ w(e, (c) => {
1850
1846
  const d = {
1851
1847
  "Content-type": "application/json;charset=UTF-8",
1852
1848
  Accept: "application/json",
1853
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1849
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1854
1850
  };
1855
1851
  m(i, {
1856
1852
  method: "POST",
1857
1853
  headers: d,
1858
1854
  data: JSON.stringify(a),
1859
1855
  type: "json",
1860
- onComplete(p, l, u) {
1861
- const f = JSON.parse(p);
1862
- f.status = u.status, f.response = u.response, n && n(f);
1856
+ onComplete(p, l, f) {
1857
+ const u = JSON.parse(p);
1858
+ u.status = f.status, u.response = f.response, n && n(u);
1863
1859
  },
1864
- onFailure(p, l, u) {
1865
- const f = p;
1866
- f.status = l.status, f.response = l.errormsg, s && s(f);
1860
+ onFailure(p, l, f) {
1861
+ const u = p;
1862
+ u.status = l.status, u.response = l.errormsg, s && s(u);
1867
1863
  }
1868
1864
  });
1869
1865
  });
1870
1866
  }
1871
- function it(e, t, n = void 0, s = void 0) {
1872
- const i = `${e.space}/api/idea/delete`, c = {
1867
+ function at(e, t, n = void 0, s = void 0) {
1868
+ const i = `${e.space}/api/idea/delete`, r = {
1873
1869
  params: {
1874
1870
  community_id: t.community_id,
1875
1871
  ideationIds: [t.idee_id]
1876
1872
  }
1877
1873
  };
1878
- C(e, (o) => {
1874
+ w(e, (o) => {
1879
1875
  m(i, {
1880
1876
  method: "POST",
1881
1877
  headers: {
@@ -1883,28 +1879,28 @@ function it(e, t, n = void 0, s = void 0) {
1883
1879
  Accept: "application/json",
1884
1880
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1885
1881
  },
1886
- data: JSON.stringify(c),
1882
+ data: JSON.stringify(r),
1887
1883
  type: "json",
1888
- onComplete(a, r, d) {
1884
+ onComplete(a, c, d) {
1889
1885
  n && n(a);
1890
1886
  },
1891
- onFailure(a, r, d) {
1887
+ onFailure(a, c, d) {
1892
1888
  const p = a;
1893
- p.status = r.status, p.response = r.errormsg, s && s(p);
1889
+ p.status = c.status, p.response = c.errormsg, s && s(p);
1894
1890
  }
1895
1891
  });
1896
1892
  });
1897
1893
  }
1898
- function at(e, t = "", n = void 0, s = void 0) {
1894
+ function ot(e, t = "", n = void 0, s = void 0) {
1899
1895
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1900
1896
  t === "" && (t = i);
1901
- const c = `${e.space}/api/idea/get`, o = {
1897
+ const r = `${e.space}/api/idea/get`, o = {
1902
1898
  params: {
1903
1899
  id: t
1904
1900
  }
1905
1901
  };
1906
- C(e, (a) => {
1907
- m(c, {
1902
+ w(e, (a) => {
1903
+ m(r, {
1908
1904
  method: "POST",
1909
1905
  headers: {
1910
1906
  "Content-type": "application/json;charset=UTF-8",
@@ -1913,41 +1909,41 @@ function at(e, t = "", n = void 0, s = void 0) {
1913
1909
  },
1914
1910
  data: JSON.stringify(o),
1915
1911
  type: "json",
1916
- onComplete(r) {
1917
- const d = r;
1912
+ onComplete(c) {
1913
+ const d = c;
1918
1914
  d.msg = d.result.message, n && n(d);
1919
1915
  },
1920
- onFailure(r) {
1921
- const d = r;
1916
+ onFailure(c) {
1917
+ const d = c;
1922
1918
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1923
1919
  }
1924
1920
  });
1925
1921
  });
1926
1922
  }
1927
- function ot(e, t = ce, n = void 0, s = void 0) {
1923
+ function rt(e, t = de, n = void 0, s = void 0) {
1928
1924
  const i = {
1929
1925
  uri: "/api/idea/list",
1930
1926
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1931
1927
  limit: `/limit/${t.limit ? t.limit : 10}`
1932
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1933
- C(e, (o) => {
1934
- m(c, {
1928
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1929
+ w(e, (o) => {
1930
+ m(r, {
1935
1931
  method: "GET",
1936
1932
  headers: {
1937
1933
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1938
1934
  },
1939
1935
  onComplete(a) {
1940
- const r = JSON.parse(a);
1941
- n && n(r);
1936
+ const c = JSON.parse(a);
1937
+ n && n(c);
1942
1938
  },
1943
- onFailure(a, r) {
1939
+ onFailure(a, c) {
1944
1940
  const d = a;
1945
- d.status = r.status, d.response = r.errormsg, s && s(d);
1941
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1946
1942
  }
1947
1943
  });
1948
1944
  });
1949
1945
  }
1950
- function de(e) {
1946
+ function pe(e) {
1951
1947
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1952
1948
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1953
1949
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -2022,34 +2018,34 @@ function de(e) {
2022
2018
  <p>
2023
2019
  </p>` : e;
2024
2020
  }
2025
- function rt(e, t = void 0, n = void 0) {
2021
+ function ct(e, t = void 0, n = void 0) {
2026
2022
  const s = e.space + "/api/user/getcurrent/";
2027
- C(e, (i) => {
2023
+ w(e, (i) => {
2028
2024
  m(s, {
2029
2025
  method: "GET",
2030
2026
  headers: {
2031
2027
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
2032
2028
  },
2033
- onComplete(c, o, a) {
2034
- const r = JSON.parse(c);
2035
- t && t(r.result);
2029
+ onComplete(r, o, a) {
2030
+ const c = JSON.parse(r);
2031
+ t && t(c.result);
2036
2032
  },
2037
- onFailure(c, o, a) {
2038
- const r = { erreur: JSON.parse(c), headers: o, xhr: a };
2039
- n && n(r);
2033
+ onFailure(r, o, a) {
2034
+ const c = { erreur: JSON.parse(r), headers: o, xhr: a };
2035
+ n && n(c);
2040
2036
  }
2041
2037
  });
2042
2038
  });
2043
2039
  }
2044
- function ct(e, t, n = void 0, s = void 0) {
2040
+ function dt(e, t, n = void 0, s = void 0) {
2045
2041
  const i = e.space + "/api/user/find/login/" + t;
2046
- C(
2042
+ w(
2047
2043
  e,
2048
- (c) => {
2044
+ (r) => {
2049
2045
  m(i, {
2050
2046
  method: "GET",
2051
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
2052
- onComplete(o, a, r) {
2047
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2048
+ onComplete(o, a, c) {
2053
2049
  const d = JSON.parse(o);
2054
2050
  n && n(d);
2055
2051
  },
@@ -2061,22 +2057,22 @@ function ct(e, t, n = void 0, s = void 0) {
2061
2057
  s
2062
2058
  );
2063
2059
  }
2064
- function dt(e, t = void 0, n = void 0) {
2060
+ function pt(e, t = void 0, n = void 0) {
2065
2061
  e.tenant && b(e, (s) => {
2066
2062
  console.log("serviceUrls", s);
2067
- const i = s.services.find((c) => c.id === "businessprocess")?.url + "/api/v2";
2063
+ const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2068
2064
  return t && t(i), i;
2069
2065
  });
2070
2066
  }
2071
- function pt(e, t = void 0, n = void 0) {
2067
+ function lt(e, t = void 0, n = void 0) {
2072
2068
  e.tenant && b(e, (s) => {
2073
2069
  console.log("serviceUrls", s);
2074
- const i = s.services.find((a) => a.id === "3dpassport")?.url, c = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${c}/auth/cas`;
2070
+ const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2075
2071
  m(o, {
2076
2072
  async onComplete(a) {
2077
2073
  console.log("response", a);
2078
- const r = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
2079
- await fetch(r, {
2074
+ const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
2075
+ await fetch(c, {
2080
2076
  method: "POST"
2081
2077
  }).then((d) => d.json()).then(async (d) => {
2082
2078
  t && t(d?.token);
@@ -2088,34 +2084,34 @@ function pt(e, t = void 0, n = void 0) {
2088
2084
  });
2089
2085
  });
2090
2086
  }
2091
- async function lt(e, t, n = void 0, s = void 0) {
2087
+ async function ut(e, t, n = void 0, s = void 0) {
2092
2088
  e.tenant && b(e, (i) => {
2093
- const o = `${i.services.find((r) => r.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
2089
+ const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
2094
2090
  fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
2095
2091
  method: "POST"
2096
- }).then((r) => r.json()).then((r) => {
2097
- n && n(r);
2098
- }).catch((r) => {
2099
- s && s(r);
2092
+ }).then((c) => c.json()).then((c) => {
2093
+ n && n(c);
2094
+ }).catch((c) => {
2095
+ s && s(c);
2100
2096
  });
2101
2097
  });
2102
2098
  }
2103
- async function ut(e, t, n = void 0, s = void 0) {
2099
+ async function ft(e, t, n = void 0, s = void 0) {
2104
2100
  e.tenant && b(e, (i) => {
2105
- const o = `${i.services.find((r) => r.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
2101
+ const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
2106
2102
  fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
2107
2103
  method: "GET"
2108
- }).then((r) => r.json()).then((r) => {
2109
- n && n(r);
2110
- }).catch((r) => {
2111
- s && s(r);
2104
+ }).then((c) => c.json()).then((c) => {
2105
+ n && n(c);
2106
+ }).catch((c) => {
2107
+ s && s(c);
2112
2108
  });
2113
2109
  });
2114
2110
  }
2115
- async function ft(e, t, n, s = void 0, i = void 0) {
2111
+ async function mt(e, t, n, s = void 0, i = void 0) {
2116
2112
  if (e.tenant) {
2117
- const c = e.tenant.toLowerCase();
2118
- fetch(`https://api.uixhome.fr/${c}/iterop//businesstable/${n}?t=${t}`, {
2113
+ const r = e.tenant.toLowerCase();
2114
+ fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${n}?t=${t}`, {
2119
2115
  method: "POST"
2120
2116
  }).then((o) => o.json()).then((o) => {
2121
2117
  s && s(o);
@@ -2124,10 +2120,10 @@ async function ft(e, t, n, s = void 0, i = void 0) {
2124
2120
  });
2125
2121
  }
2126
2122
  }
2127
- async function mt(e, t, n, s = void 0, i = void 0) {
2123
+ async function gt(e, t, n, s = void 0, i = void 0) {
2128
2124
  if (e.tenant) {
2129
- const c = e.tenant.toLowerCase();
2130
- fetch(`https://api.uixhome.fr/${c}/iterop//businesstable/${n}/rows/?t=${t}`, {
2125
+ const r = e.tenant.toLowerCase();
2126
+ fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${n}/rows/?t=${t}`, {
2131
2127
  method: "POST"
2132
2128
  }).then((o) => o.json()).then((o) => {
2133
2129
  s && s(o);
@@ -2136,46 +2132,46 @@ async function mt(e, t, n, s = void 0, i = void 0) {
2136
2132
  });
2137
2133
  }
2138
2134
  }
2139
- async function gt(e, t, n, s, i = void 0, c = void 0) {
2135
+ async function ht(e, t, n, s, i = void 0, r = void 0) {
2140
2136
  e.tenant && b(e, (o) => {
2141
- o.services.find((r) => r.id === "businessprocess")?.url + "";
2137
+ o.services.find((c) => c.id === "businessprocess")?.url + "";
2142
2138
  const a = e.tenant.toLowerCase();
2143
2139
  fetch(
2144
2140
  `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2145
2141
  {
2146
2142
  method: "POST"
2147
2143
  }
2148
- ).then((r) => r.json()).then((r) => {
2149
- i && i(r);
2150
- }).catch((r) => {
2151
- c && c(r);
2144
+ ).then((c) => c.json()).then((c) => {
2145
+ i && i(c);
2146
+ }).catch((c) => {
2147
+ r && r(c);
2152
2148
  });
2153
2149
  });
2154
2150
  }
2155
- async function ht(e, t, n, s, i, c = void 0, o = void 0) {
2151
+ async function St(e, t, n, s, i, r = void 0, o = void 0) {
2156
2152
  e.tenant && b(e, (a) => {
2157
2153
  a.services.find((d) => d.id === "businessprocess")?.url + "";
2158
- const r = e.tenant.toLowerCase();
2154
+ const c = e.tenant.toLowerCase();
2159
2155
  fetch(
2160
- `https://api.uixhome.fr/${r}/iterop/businesstable/patch/${n}/rows?t=${t}&rowsToAdd=${s}&rowsToRemove=${i}`,
2156
+ `https://api.uixhome.fr/${c}/iterop/businesstable/patch/${n}/rows?t=${t}&rowsToAdd=${s}&rowsToRemove=${i}`,
2161
2157
  {
2162
2158
  method: "POST"
2163
2159
  }
2164
2160
  ).then((d) => d.json()).then((d) => {
2165
- c && c(d);
2161
+ r && r(d);
2166
2162
  }).catch((d) => {
2167
2163
  o && o(d);
2168
2164
  });
2169
2165
  });
2170
2166
  }
2171
- function St(e) {
2167
+ function yt(e) {
2172
2168
  const t = "Hello " + e;
2173
2169
  return console.log(t), t;
2174
2170
  }
2175
2171
  function _t(e, t = void 0, n = void 0) {
2176
2172
  return console.log("credentials", e), new Promise((s) => {
2177
2173
  if (e.token === "" && T(e), !e.space || e.space === "") {
2178
- const o = K();
2174
+ const o = V();
2179
2175
  console.log("platformeInfo", o);
2180
2176
  }
2181
2177
  N(
@@ -2189,14 +2185,14 @@ function _t(e, t = void 0, n = void 0) {
2189
2185
  },
2190
2186
  !0
2191
2187
  );
2192
- const i = v.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2193
- m(c, {
2188
+ const i = v.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2189
+ m(r, {
2194
2190
  onComplete(o) {
2195
2191
  if (Array.isArray(JSON.parse(o))) {
2196
2192
  const a = JSON.parse(o);
2197
2193
  console.log("serviceId=3dsearch", a);
2198
- const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2199
- m(r, {
2194
+ const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2195
+ m(c, {
2200
2196
  method: "POST",
2201
2197
  headers: {
2202
2198
  Accept: "application/json",
@@ -2252,87 +2248,87 @@ function _t(e, t = void 0, n = void 0) {
2252
2248
  });
2253
2249
  }
2254
2250
  export {
2255
- R as UUID,
2251
+ P as UUID,
2256
2252
  _t as _3DSearch_usersGroup,
2257
- xe as _3DSpace_Create_Doc,
2258
- Ge as _3DSpace_bookmark_addSubsciptions,
2259
- Je as _3DSpace_bookmark_newWorkspace,
2253
+ Re as _3DSpace_Create_Doc,
2254
+ Ee as _3DSpace_bookmark_addSubsciptions,
2255
+ Ge as _3DSpace_bookmark_newWorkspace,
2260
2256
  T as _3DSpace_csrf,
2261
2257
  D as _3DSpace_download_doc,
2262
- Q as _3DSpace_download_multidoc,
2263
- z as _3DSpace_file_update,
2264
- q as _3DSpace_file_update_csr,
2265
- je as _3DSpace_file_url_csr,
2258
+ Z as _3DSpace_download_multidoc,
2259
+ q as _3DSpace_file_update,
2260
+ Q as _3DSpace_file_update_csr,
2261
+ xe as _3DSpace_file_url_csr,
2266
2262
  A as _3DSpace_get_csrf,
2267
- H as _3DSpace_get_docInfo,
2268
- Z as _3DSpace_get_downloadTicket_multidoc,
2269
- Fe as _3DSpace_get_multiDocInfo,
2263
+ z as _3DSpace_get_docInfo,
2264
+ ee as _3DSpace_get_downloadTicket_multidoc,
2265
+ je as _3DSpace_get_multiDocInfo,
2270
2266
  N as _3DSpace_get_securityContexts,
2271
2267
  F as _3DSpace_get_ticket,
2272
- Me as _3DSpace_lifecycle_changeRevision,
2273
- Re as _3DSpace_lifecycle_changeState,
2274
- De as _3DSpace_lifecycle_getGraph,
2275
- Le as _3DSpace_lifecycle_getNextRevision,
2268
+ Je as _3DSpace_lifecycle_changeRevision,
2269
+ De as _3DSpace_lifecycle_changeState,
2270
+ Le as _3DSpace_lifecycle_getGraph,
2271
+ Me as _3DSpace_lifecycle_getNextRevision,
2276
2272
  Pe as _3DSpace_lifecycle_getNextStates,
2277
- nt as _3DSwym_buildDirectMessage,
2278
- it as _3DSwym_deleteIdea,
2279
- oe as _3DSwym_findCommunityToInstantMSG,
2280
- et as _3DSwym_getAllCommunities,
2281
- Qe as _3DSwym_getAllNews,
2282
- Ze as _3DSwym_getFamiliarPeople,
2283
- tt as _3DSwym_getIdeaStatusMaturity,
2284
- ae as _3DSwym_getMembersCommunity,
2285
- at as _3DSwym_getSWYMIdea,
2286
- ot as _3DSwym_get_AllSWYMIdeas,
2287
- rt as _3DSwym_get_currentUser,
2288
- ct as _3DSwym_get_findUser,
2289
- C as _3DSwym_get_version,
2290
- st as _3DSwym_postIdea,
2273
+ st as _3DSwym_buildDirectMessage,
2274
+ at as _3DSwym_deleteIdea,
2275
+ re as _3DSwym_findCommunityToInstantMSG,
2276
+ tt as _3DSwym_getAllCommunities,
2277
+ Ze as _3DSwym_getAllNews,
2278
+ et as _3DSwym_getFamiliarPeople,
2279
+ nt as _3DSwym_getIdeaStatusMaturity,
2280
+ oe as _3DSwym_getMembersCommunity,
2281
+ ot as _3DSwym_getSWYMIdea,
2282
+ rt as _3DSwym_get_AllSWYMIdeas,
2283
+ ct as _3DSwym_get_currentUser,
2284
+ dt as _3DSwym_get_findUser,
2285
+ w as _3DSwym_get_version,
2286
+ it as _3DSwym_postIdea,
2291
2287
  x as _3DSwym_sendMessageData,
2292
- be as _AppMngt_get_info_user,
2293
- Oe as _AppMngt_get_users,
2294
- ht as _Iterop_AddOrRemoveRows,
2295
- pt as _Iterop_Auth_CAS,
2296
- lt as _Iterop_ListUsers,
2297
- ut as _Iterop_getAllBusinessTables,
2298
- ft as _Iterop_getOneBusinessTable,
2299
- mt as _Iterop_getOneBusinessTableRows,
2300
- gt as _Iterop_runProcess,
2301
- K as _getPlateformInfos,
2302
- we as _getPlatformServices,
2288
+ Ne as _AppMngt_get_info_user,
2289
+ be as _AppMngt_get_users,
2290
+ St as _Iterop_AddOrRemoveRows,
2291
+ lt as _Iterop_Auth_CAS,
2292
+ ut as _Iterop_ListUsers,
2293
+ ft as _Iterop_getAllBusinessTables,
2294
+ mt as _Iterop_getOneBusinessTable,
2295
+ gt as _Iterop_getOneBusinessTableRows,
2296
+ ht as _Iterop_runProcess,
2297
+ V as _getPlateformInfos,
2298
+ Ce as _getPlatformServices,
2303
2299
  b as _getServiceUrl,
2304
- Ce as _getServiceUrl_3DPassport,
2305
- dt as _getServiceUrl_Iterop,
2300
+ Te as _getServiceUrl_3DPassport,
2301
+ pt as _getServiceUrl_Iterop,
2306
2302
  m as _httpCallAuthenticated,
2307
- Se as _setDraggable,
2308
- ye as _setDroppable,
2303
+ ye as _setDraggable,
2304
+ we as _setDroppable,
2309
2305
  _e as _setupTagger,
2310
- He as addTagToDoc,
2311
- Te as compass_getListAdditionalApps,
2312
- E as couleurs,
2313
- Ne as createUserGroups,
2314
- ee as dataMixing,
2315
- Ie as deleteUserGroups,
2316
- me as findAdresse,
2317
- Ee as getAllContextSecurity,
2318
- B as getCSRFToken,
2319
- fe as getCommunes,
2320
- $e as getComplementUG,
2321
- Ke as getDataFrom3DSpace,
2322
- ge as getDataFromGouvFr,
2323
- Xe as getDatasByTenant,
2324
- Ye as getDatasFrom3DSpace,
2325
- Ve as getDownloadDocument,
2326
- qe as getInfoDocTags,
2327
- ve as getUserGroupsList,
2328
- V as getUsersGroupRules,
2329
- We as get_3DSpace_csrf,
2330
- Ae as patchUserGroups,
2331
- ke as patchUserGroupsControl,
2332
- Be as pushDataIn3DSpace,
2333
- Ue as readUserGroupControl,
2334
- ze as removeTagToDoc,
2335
- St as sayHello,
2336
- he as updateEvent
2306
+ ze as addTagToDoc,
2307
+ Oe as compass_getListAdditionalApps,
2308
+ K as couleurs,
2309
+ $e as createUserGroups,
2310
+ te as dataMixing,
2311
+ Ae as deleteUserGroups,
2312
+ ge as findAdresse,
2313
+ Ke as getAllContextSecurity,
2314
+ W as getCSRFToken,
2315
+ me as getCommunes,
2316
+ ve as getComplementUG,
2317
+ Ve as getDataFrom3DSpace,
2318
+ he as getDataFromGouvFr,
2319
+ Ye as getDatasByTenant,
2320
+ He as getDatasFrom3DSpace,
2321
+ Be as getDownloadDocument,
2322
+ Qe as getInfoDocTags,
2323
+ Ie as getUserGroupsList,
2324
+ B as getUsersGroupRules,
2325
+ Xe as get_3DSpace_csrf,
2326
+ ke as patchUserGroups,
2327
+ Ue as patchUserGroupsControl,
2328
+ We as pushDataIn3DSpace,
2329
+ Fe as readUserGroupControl,
2330
+ qe as removeTagToDoc,
2331
+ yt as sayHello,
2332
+ Se as updateEvent
2337
2333
  };
2338
2334
  //# sourceMappingURL=wb3Api.js.map