@beam3_dev/api_module 0.0.63 → 0.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
- import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
- function A() {
3
+ import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
+ function R() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -34,23 +34,23 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ie(e, t = void 0, n = void 0) {
38
- const s = parseInt(e);
37
+ async function ie(e, t = void 0, s = void 0) {
38
+ const n = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
44
44
  Accept: "application/json"
45
45
  }
46
46
  }
47
- ).then((o) => o.json()).then((o) => {
48
- t && t(o);
49
- }).catch((o) => {
50
- n && n(o), console.error("Erreur : " + o);
47
+ ).then((a) => a.json()).then((a) => {
48
+ t && t(a);
49
+ }).catch((a) => {
50
+ s && s(a), console.error("Erreur : " + a);
51
51
  });
52
52
  }
53
- async function re(e, t = void 0, n = void 0) {
53
+ async function re(e, t = void 0, s = 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,84 +59,84 @@ async function re(e, t = void 0, n = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((s) => s.json()).then((s) => {
63
- t && t(s);
64
- }).catch((s) => {
65
- n && n(s), console.error("Erreur : " + s);
62
+ ).then((n) => n.json()).then((n) => {
63
+ t && t(n);
64
+ }).catch((n) => {
65
+ s && s(n), console.error("Erreur : " + n);
66
66
  });
67
67
  }
68
68
  async function ce(e, t = L) {
69
- let n = N.now().year;
70
- const s = e, o = [], i = (a) => {
71
- for (let c in a)
72
- o.push({ date: c, comment: a[c] });
69
+ let s = N.now().year;
70
+ const n = e, a = [], c = (o) => {
71
+ for (let r in o)
72
+ a.push({ date: r, comment: o[r] });
73
73
  };
74
- for (let a = n; a <= n + 1; a++)
74
+ for (let o = s; o <= s + 1; o++)
75
75
  await fetch(
76
- "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
76
+ "https://calendrier.api.gouv.fr/jours-feries/metropole/" + o + ".json",
77
77
  {
78
78
  method: "GET",
79
79
  headers: {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((c) => c.json()).then((c) => {
84
- i(c);
85
- }).catch((c) => console.error("Erreur : " + c));
83
+ ).then((r) => r.json()).then((r) => {
84
+ c(r);
85
+ }).catch((r) => console.error("Erreur : " + r));
86
86
  return (() => {
87
- const a = s.length === 0 ? {
87
+ const o = n.length === 0 ? {
88
88
  events: []
89
- } : s;
90
- for (let c of o)
91
- a.events.findIndex(
92
- (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
- ) === -1 && a.events.push({
94
- name: "Férié : " + c.comment,
95
- start: N.fromISO(c.date).toISODate(),
96
- end: N.fromISO(c.date).toISODate(),
89
+ } : n;
90
+ for (let r of a)
91
+ o.events.findIndex(
92
+ (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
+ ) === -1 && o.events.push({
94
+ name: "Férié : " + r.comment,
95
+ start: N.fromISO(r.date).toISODate(),
96
+ end: N.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
- return a;
100
+ return o;
101
101
  })();
102
102
  }
103
- async function de(e, t, n = !0) {
104
- const s = e.events.findIndex((o) => o.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, i) => o.start - i.start), e;
103
+ async function de(e, t, s = !0) {
104
+ const n = e.events.findIndex((a) => a.uuid === t.uuid);
105
+ return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((a, c) => a.start - c.start), e;
106
106
  }
107
107
  function f(e, t) {
108
- O(["DS/WAFData/WAFData"], (n) => {
109
- n.authenticatedRequest(e, t);
108
+ O(["DS/WAFData/WAFData"], (s) => {
109
+ s.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function le(e, t, n) {
113
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
- s.draggable(e, { data: t, start: n });
112
+ function le(e, t, s) {
113
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
+ n.draggable(e, { data: t, start: s });
115
115
  });
116
116
  }
117
117
  function pe(e, t = void 0) {
118
- O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
- let s;
120
- s === void 0 && (s = n.createProxy({
121
- widgetId: R.id,
118
+ O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
119
+ let n;
120
+ n === void 0 && (n = s.createProxy({
121
+ widgetId: A.id,
122
122
  filteringMode: "WithFilteringServices"
123
- }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
123
+ }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
124
124
  });
125
125
  }
126
126
  function ue(e, t) {
127
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
128
- n.droppable(e, { drop: t });
127
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
128
+ s.droppable(e, { drop: t });
129
129
  });
130
130
  }
131
- async function fe(e, t = void 0, n = void 0) {
131
+ async function fe(e, t = void 0, s = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
- (s) => {
135
- (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
136
- s.getPlatformServices({
134
+ (n) => {
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", n), t(
136
+ n.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
139
- onFailure: n
139
+ onFailure: s
140
140
  })
141
141
  ));
142
142
  }
@@ -145,66 +145,66 @@ async function fe(e, t = void 0, n = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), i = t.getApplicationConfiguration(
148
+ const s = t.getTenant(), n = t.getUser(), a = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
- tenant: n,
153
- user: s,
154
- appsConfiguration: o,
155
- appConf: i
152
+ tenant: s,
153
+ user: n,
154
+ appsConfiguration: a,
155
+ appConf: c
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
159
- function ge(e, t, n) {
160
- const s = {
159
+ function ge(e, t, s) {
160
+ const n = {
161
161
  base: `${e.space}`,
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
- }, o = `${s.base}${s.uri}${s.option}`;
166
- f(o, {
165
+ }, a = `${n.base}${n.uri}${n.option}`;
166
+ f(a, {
167
167
  method: "GET",
168
168
  headers: {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(i, r, a) {
173
- const c = JSON.parse(i), d = c.data.map((l) => {
172
+ onComplete(c, i, o) {
173
+ const r = JSON.parse(c), d = r.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, c);
177
+ t && t(d, r);
178
178
  },
179
- onFailure(i, r) {
180
- const a = i;
181
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
179
+ onFailure(c, i) {
180
+ const o = c;
181
+ o.msg = i.errormsg, o.errCode = i.errorcode, s && s(o);
182
182
  }
183
183
  });
184
184
  }
185
- function he(e, t = void 0, n = void 0) {
186
- let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
- f(s, {
188
- onComplete(o, i, r) {
189
- const a = JSON.parse(o);
190
- console.log("_AppMngt_get_users => ", a), t && t(a);
185
+ function he(e, t = void 0, s = void 0) {
186
+ let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
+ f(n, {
188
+ onComplete(a, c, i) {
189
+ const o = JSON.parse(a);
190
+ console.log("_AppMngt_get_users => ", o), t && t(o);
191
191
  },
192
- onFailure(o, i) {
193
- const r = o;
194
- r.msg = i.errormsg, r.errCode = i.errorcode, n && n(r);
192
+ onFailure(a, c) {
193
+ const i = a;
194
+ i.msg = c.errormsg, i.errCode = c.errorcode, s && s(i);
195
195
  }
196
196
  });
197
197
  }
198
- function Se(e, t, n = void 0, s = void 0) {
199
- let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
- f(o, {
201
- onComplete(i, r, a) {
202
- const c = JSON.parse(i);
203
- n && n(c);
198
+ function Se(e, t, s = void 0, n = void 0) {
199
+ let a = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
+ f(a, {
201
+ onComplete(c, i, o) {
202
+ const r = JSON.parse(c);
203
+ s && s(r);
204
204
  },
205
- onFailure(i, r) {
206
- const a = i;
207
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
205
+ onFailure(c, i) {
206
+ const o = c;
207
+ o.msg = i.errormsg, o.errCode = i.errorcode, n && n(o);
208
208
  }
209
209
  });
210
210
  }
@@ -212,37 +212,37 @@ const F = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
- function _e(e, t, n = void 0, s = void 0) {
216
- const { space: o, currentUser: i } = e, a = `${o}${{
215
+ function _e(e, t, s = void 0, n = void 0) {
216
+ const { space: a, currentUser: c } = e, o = `${a}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, c = {
218
+ }.URIUGr}`, r = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [i.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [c.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
227
227
  }
228
228
  ]
229
229
  };
230
- f(a, {
230
+ f(o, {
231
231
  method: "POST",
232
232
  headers: F,
233
- data: JSON.stringify(c),
233
+ data: JSON.stringify(r),
234
234
  onComplete(d) {
235
- n && n(JSON.parse(d));
235
+ s && s(JSON.parse(d));
236
236
  },
237
237
  onFailure(d, l) {
238
238
  console.log(d);
239
239
  const p = d;
240
- p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
240
+ p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
241
241
  }
242
242
  });
243
243
  }
244
- function ye(e, t, n = void 0, s = void 0) {
245
- const { space: o, tenant: i } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${i}`, d = `${r}${a}${c}`;
244
+ function ye(e, t, s = void 0, n = void 0) {
245
+ const { space: a, tenant: c } = e, i = a, o = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${i}${o}${r}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -252,55 +252,55 @@ function ye(e, t, n = void 0, s = void 0) {
252
252
  }
253
253
  },
254
254
  onComplete(u) {
255
- n && n(JSON.parse(u));
255
+ s && s(JSON.parse(u));
256
256
  },
257
257
  onFailure(u, m) {
258
258
  const g = u;
259
- g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
259
+ g.msg = m.errormsg, g.errCode = m.errorcode, n && n(g);
260
260
  }
261
261
  });
262
262
  }
263
- function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: o } = e, i = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
263
+ function E(e, t = void 0, s = void 0) {
264
+ const { space: n, tenant: a } = e, c = n, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${a}`, r = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${i}${r}${a}`;
267
+ }, d = `${c}${i}${o}`;
268
268
  f(d, {
269
- OPTsH: c,
269
+ OPTsH: r,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
273
273
  onFailure(l, p) {
274
274
  const u = l;
275
- u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
275
+ u.msg = p.errormsg, u.errCode = p.errorcode, s && s(u);
276
276
  }
277
277
  });
278
278
  }
279
- function we(e, t = void 0, n = void 0) {
280
- const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
279
+ function we(e, t = void 0, s = void 0) {
280
+ const { space: n, currentUser: a } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
281
281
  "Content-Type": "application/json",
282
282
  Accept: "application/json,text/javascript,*/*"
283
283
  } };
284
284
  try {
285
- f(a, {
285
+ f(o, {
286
286
  opts: d,
287
287
  onComplete(l) {
288
288
  const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
- if (o && Object.keys(o).length > 0) {
290
- const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
289
+ if (a && Object.keys(a).length > 0) {
290
+ const g = m.filter((_) => _.owner === a.email), h = m.filter((_) => _.members.includes(a.email)), S = g.concat(h);
291
291
  u.iam = S, u.UG = m, u.iamMember = h, E(
292
292
  e,
293
293
  (_) => {
294
294
  u.rules = _, t && t(u);
295
295
  },
296
296
  (_) => {
297
- n && n(_);
297
+ s && s(_);
298
298
  }
299
299
  );
300
300
  }
301
301
  },
302
302
  onFailure(l) {
303
- n && n(l);
303
+ s && s(l);
304
304
  }
305
305
  });
306
306
  } catch (l) {
@@ -308,52 +308,52 @@ function we(e, t = void 0, n = void 0) {
308
308
  }
309
309
  }
310
310
  function Te(e, t) {
311
- const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
- f(o, {
311
+ const { space: s } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
+ f(a, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Ce(e, t, n, s = void 0, o = void 0) {
317
- const { space: i, tenant: r } = e, a = {
316
+ function Ce(e, t, s, n = void 0, a = void 0) {
317
+ const { space: c, tenant: i } = e, o = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${r}`
325
- }, c = n, d = `${i}${a.URIUGr}/${t}`, l = JSON.stringify(c);
324
+ OPTsTenant: `tenant=dstenant:${i}`
325
+ }, r = s, d = `${c}${o.URIUGr}/${t}`, l = JSON.stringify(r);
326
326
  f(d, {
327
327
  headers: F,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
331
331
  onComplete(p) {
332
- s && s(p);
332
+ n && n(p);
333
333
  },
334
334
  onFailure(p) {
335
- o && o(p);
335
+ a && a(p);
336
336
  }
337
337
  });
338
338
  }
339
- function Oe(e, t, n, s = void 0, o = void 0) {
340
- const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
- f(a, {
339
+ function Oe(e, t, s, n = void 0, a = void 0) {
340
+ const { space: c } = e, o = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
+ f(o, {
342
342
  method: "PATCH",
343
343
  headers: F,
344
- data: JSON.stringify(n),
344
+ data: JSON.stringify(s),
345
345
  type: "json",
346
346
  onComplete(d) {
347
- s && s(d);
347
+ n && n(d);
348
348
  },
349
349
  onFailure(d) {
350
- o && o(d);
350
+ a && a(d);
351
351
  }
352
352
  });
353
353
  }
354
- function be(e, t, n = void 0, s = void 0) {
355
- const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- f(r, {
354
+ function be(e, t, s = void 0, n = void 0) {
355
+ const { space: a } = e, i = `${a}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ f(i, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -362,171 +362,165 @@ function be(e, t, n = void 0, s = void 0) {
362
362
  }
363
363
  },
364
364
  onComplete(d) {
365
- n && n(JSON.parse(d));
365
+ s && s(JSON.parse(d));
366
366
  },
367
367
  onFailure(d) {
368
- s && s(d);
368
+ n && n(d);
369
369
  }
370
370
  });
371
371
  }
372
- const J = async (e, t, n) => {
373
- if (!e.space)
374
- return;
375
- const s = `${e.space}/resources/v1/application/CSRF`;
376
- try {
377
- return response = await f(
378
- s,
379
- (o) => {
380
- const i = JSON.parse(o);
381
- return console.log("getCSRFToken() / response => ", i), t?.(i.csrf), i;
372
+ async function J(e, t, s) {
373
+ if (e.space) {
374
+ const n = `${e.space}/resources/v1/application/CSRF`;
375
+ f(n, {
376
+ onComplete(a) {
377
+ a = JSON.parse(a), console.log("getCSRFToken() / response => ", a), t && t(a.csrf);
382
378
  },
383
- (o) => {
384
- n?.({ error, headers, xhr });
379
+ onFailure(a, c, i) {
380
+ s && s({ error: a, headers: c, xhr: i });
385
381
  }
386
- );
387
- } catch (o) {
388
- n?.("erreur", o);
382
+ });
389
383
  }
390
- };
391
- async function G(e, t = void 0, n = void 0, s = void 0) {
392
- const o = e.space;
384
+ }
385
+ async function G(e, t = void 0, s = void 0, n = void 0) {
386
+ const a = e.space;
393
387
  if (t === void 0) {
394
388
  console.log("Le paramètre docid est obligatoire");
395
389
  return;
396
390
  }
397
- const i = o + `/resources/v1/modeler/documents/${t}`;
398
- f(i, {
399
- onComplete(r, a, c) {
400
- const d = JSON.parse(r);
401
- n && n(d);
391
+ const c = a + `/resources/v1/modeler/documents/${t}`;
392
+ f(c, {
393
+ onComplete(i, o, r) {
394
+ const d = JSON.parse(i);
395
+ s && s(d);
402
396
  },
403
- onFailure(r) {
404
- s && s(r);
397
+ onFailure(i) {
398
+ n && n(i);
405
399
  }
406
400
  });
407
401
  }
408
- function k(e, t = void 0, n = void 0) {
402
+ function k(e, t = void 0, s = void 0) {
409
403
  if (e.objID && e.objID !== "") {
410
- let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
411
- console.log("_3DSpace_get_csrf / url", s), f(s, {
412
- onComplete(o, i, r) {
413
- const a = JSON.parse(o);
414
- e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
404
+ let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
+ console.log("_3DSpace_get_csrf / url", n), f(n, {
406
+ onComplete(a, c, i) {
407
+ const o = JSON.parse(a);
408
+ e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
415
409
  },
416
- onFailure(o) {
417
- n && n(o);
410
+ onFailure(a) {
411
+ s && s(a);
418
412
  }
419
413
  });
420
414
  } else
421
415
  C(
422
416
  e,
423
- (s) => {
424
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
417
+ (n) => {
418
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
425
419
  },
426
- (s) => {
427
- n && n(s);
420
+ (n) => {
421
+ s && s(n);
428
422
  }
429
423
  );
430
424
  }
431
- function C(e, t = void 0, n = void 0) {
425
+ function C(e, t = void 0, s = void 0) {
432
426
  if (e.space) {
433
- const s = e.space + "/resources/v1/application/CSRF";
434
- f(s, {
435
- onComplete(o, i, r) {
436
- const a = JSON.parse(o);
437
- console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
427
+ const n = e.space + "/resources/v1/application/CSRF";
428
+ f(n, {
429
+ onComplete(a, c, i) {
430
+ const o = JSON.parse(a);
431
+ console.log("_3DSpace_csrf() / info => ", o), t && t(o.csrf.value);
438
432
  },
439
- onFailure(o, i, r) {
440
- n && n({ response: o, headers: i, xhr: r });
433
+ onFailure(a, c, i) {
434
+ s && s({ response: a, headers: c, xhr: i });
441
435
  }
442
436
  });
443
437
  } else
444
- n && n("ERROR : url du 3DSpace non défini.");
438
+ s && s("ERROR : url du 3DSpace non défini.");
445
439
  }
446
- function U(e, t = void 0, n = void 0) {
447
- let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
440
+ function U(e, t = void 0, s = void 0) {
441
+ let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
448
442
  k(
449
443
  e,
450
- (o) => {
444
+ (a) => {
451
445
  console.log(
452
446
  "_3DSpace_get_ticket / onComplete / ☠️ info => ",
453
- o,
447
+ a,
454
448
  e.token
455
- ), f(s, {
449
+ ), f(n, {
456
450
  method: "PUT",
457
451
  headers: {
458
452
  ENO_CSRF_TOKEN: e.token
459
453
  },
460
- onComplete(i) {
461
- const a = JSON.parse(i).data[0].dataelements.ticketURL;
462
- console.log("le ticket est dans la callback"), t && t(a);
454
+ onComplete(c) {
455
+ const o = JSON.parse(c).data[0].dataelements.ticketURL;
456
+ console.log("le ticket est dans la callback"), t && t(o);
463
457
  },
464
- onFailure(i, r) {
465
- console.warn("☠️ error => ", i, r), n && n(i, r);
458
+ onFailure(c, i) {
459
+ console.warn("☠️ error => ", c, i), s && s(c, i);
466
460
  }
467
461
  });
468
462
  },
469
- (o) => {
470
- console.warn("_3DSpace_get_ticket / error => ", o), n && n(o);
463
+ (a) => {
464
+ console.warn("_3DSpace_get_ticket / error => ", a), s && s(a);
471
465
  }
472
466
  );
473
467
  }
474
- function Ne(e, t, n, s = void 0, o = void 0) {
475
- const i = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
476
- n || (n = e.token), f(i, {
468
+ function Ne(e, t, s, n = void 0, a = void 0) {
469
+ const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
+ s || (s = e.token), f(c, {
477
471
  method: "PUT",
478
472
  headers: {
479
- ENO_CSRF_TOKEN: n
473
+ ENO_CSRF_TOKEN: s
480
474
  },
481
- onComplete(r) {
482
- let a = JSON.parse(r);
483
- if (console.log("☠️ info => ", a), a.success === !0)
475
+ onComplete(i) {
476
+ let o = JSON.parse(i);
477
+ if (console.log("☠️ info => ", o), o.success === !0)
484
478
  try {
485
- const c = a.data[0].dataelements.ticketURL;
486
- s && s(c);
487
- } catch (c) {
488
- o && o(c);
479
+ const r = o.data[0].dataelements.ticketURL;
480
+ n && n(r);
481
+ } catch (r) {
482
+ a && a(r);
489
483
  }
490
484
  },
491
- onFailure(r) {
492
- o && o(r);
485
+ onFailure(i) {
486
+ a && a(i);
493
487
  }
494
488
  });
495
489
  }
496
- function K(e, t, n, s, o, i = void 0, r = void 0) {
490
+ function K(e, t, s, n, a, c = void 0, i = void 0) {
497
491
  k(
498
492
  e,
499
493
  t,
500
- (a) => {
494
+ (o) => {
501
495
  W(
502
496
  e,
503
497
  t,
504
- n,
505
498
  s,
506
- o,
507
- a.csrf.value,
508
- i,
509
- r
499
+ n,
500
+ a,
501
+ o.csrf.value,
502
+ c,
503
+ i
510
504
  );
511
505
  }
512
506
  );
513
507
  }
514
- function W(e, t, n, s, o, i, r = void 0, a = void 0) {
515
- const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
516
- f(c, {
508
+ function W(e, t, s, n, a, c, i = void 0, o = void 0) {
509
+ const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ f(r, {
517
511
  method: "PUT",
518
512
  headers: {
519
- ENO_CSRF_TOKEN: i
513
+ ENO_CSRF_TOKEN: c
520
514
  },
521
515
  onComplete(d, l, p) {
522
516
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
523
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
517
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", n, a);
524
518
  const g = {};
525
519
  g.method = "POST", g.data = m, g.onComplete = function(h) {
526
520
  let S = "temp_" + Date.now(), _ = {
527
521
  method: "PUT",
528
522
  headers: {
529
- ENO_CSRF_TOKEN: i
523
+ ENO_CSRF_TOKEN: c
530
524
  },
531
525
  data: JSON.stringify({
532
526
  data: [
@@ -535,9 +529,9 @@ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
535
529
  relateddata: {
536
530
  files: [
537
531
  {
538
- id: n,
532
+ id: s,
539
533
  dataelements: {
540
- title: o,
534
+ title: a,
541
535
  receipt: h
542
536
  },
543
537
  updateAction: "REVISE"
@@ -550,10 +544,10 @@ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
550
544
  }),
551
545
  type: "json",
552
546
  onComplete(y) {
553
- r && r(y);
547
+ i && i(y);
554
548
  },
555
549
  onFailure(y) {
556
- a && a(y);
550
+ o && o(y);
557
551
  }
558
552
  };
559
553
  f(
@@ -561,39 +555,39 @@ function W(e, t, n, s, o, i, r = void 0, a = void 0) {
561
555
  _
562
556
  );
563
557
  }, g.onFailure = function(h) {
564
- a && a(h);
558
+ o && o(h);
565
559
  }, g.timeout = 0, f(u.ticketURL, g);
566
560
  }
567
561
  });
568
562
  }
569
- async function ke(e, t, n, s, o = void 0, i = void 0) {
570
- const r = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
563
+ async function ke(e, t, s, n, a = void 0, c = void 0) {
564
+ const i = e.space, o = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
571
565
  type: "text/plain"
572
566
  }), p = {
573
- url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
574
- url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
567
+ url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
568
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
575
569
  };
576
- if (!r && r !== "") {
570
+ if (!i && i !== "") {
577
571
  console.log("le store._3DSpace est vide");
578
572
  return;
579
573
  }
580
574
  f(p.url_Ticket, {
581
575
  method: "PUT",
582
576
  headers: {
583
- ENO_CSRF_TOKEN: a.value
577
+ ENO_CSRF_TOKEN: o.value
584
578
  },
585
579
  onComplete(u, m, g) {
586
580
  const h = JSON.parse(u).data[0].dataelements;
587
- d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
581
+ d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
588
582
  const S = {
589
583
  method: "POST",
590
584
  data: d,
591
585
  onComplete(T) {
592
- if (c !== "" && a !== "") {
586
+ if (r !== "" && o !== "") {
593
587
  const D = {
594
588
  method: "POST",
595
589
  headers: {
596
- ENO_CSRF_TOKEN: a,
590
+ ENO_CSRF_TOKEN: o,
597
591
  Accept: "application/json",
598
592
  "Content-Type": "application/json"
599
593
  },
@@ -602,21 +596,21 @@ async function ke(e, t, n, s, o = void 0, i = void 0) {
602
596
  {
603
597
  type: "Document",
604
598
  dataelements: {
605
- title: `Title_${n.toLowerCase().split(" ").join("_")}`,
599
+ title: `Title_${s.toLowerCase().split(" ").join("_")}`,
606
600
  policy: "Document Release",
607
- description: s
601
+ description: n
608
602
  },
609
603
  relateddata: {
610
604
  files: [
611
605
  {
612
606
  dataelements: {
613
- title: `${n}.json`,
607
+ title: `${s}.json`,
614
608
  receipt: T
615
609
  }
616
610
  }
617
611
  ]
618
612
  },
619
- tempId: A()
613
+ tempId: R()
620
614
  }
621
615
  ]
622
616
  }),
@@ -625,32 +619,32 @@ async function ke(e, t, n, s, o = void 0, i = void 0) {
625
619
  onComplete: _,
626
620
  onFailure: y
627
621
  };
628
- c !== "" && f(p.url_Post, D);
622
+ r !== "" && f(p.url_Post, D);
629
623
  } else
630
624
  console.warn("le store est vide");
631
625
  },
632
626
  onFailure: y
633
627
  };
634
628
  function _(T) {
635
- console.log("Success -- response ", T.data[0]), o && o(T);
629
+ console.log("Success -- response ", T.data[0]), a && a(T);
636
630
  }
637
631
  function y(T, D) {
638
632
  console.log("Erreur -- response ", T, `
639
- headers `, D), i && i(T);
633
+ headers `, D), c && c(T);
640
634
  }
641
635
  f(h.ticketURL, S);
642
636
  }
643
637
  });
644
638
  }
645
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
646
- const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
647
- f(r, {
639
+ function b(e, t = void 0, s = void 0, n = void 0, a = void 0, c = void 0) {
640
+ const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
641
+ f(i, {
648
642
  method: "GET",
649
- onComplete(a) {
650
- const c = JSON.parse(a);
643
+ onComplete(o) {
644
+ const r = JSON.parse(o);
651
645
  let d = "", l, p, u;
652
646
  if (t) {
653
- let m = c.collabspaces.find((g) => g.title === t);
647
+ let m = r.collabspaces.find((g) => g.title === t);
654
648
  if (m) {
655
649
  l = t;
656
650
  let g = m.couples;
@@ -658,120 +652,122 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
658
652
  (h, S, _) => S === _.findIndex(
659
653
  (y) => y.organization.pid === h.organization.pid && y.role.pid === h.role.pid
660
654
  )
661
- ), n && (Array.isArray(n) ? n.forEach((h) => {
655
+ ), s && (Array.isArray(s) ? s.forEach((h) => {
662
656
  u || g.forEach((S) => {
663
- if (h === S.role.name && s === S.organization.title)
664
- u = h, p = s;
657
+ if (h === S.role.name && n === S.organization.title)
658
+ u = h, p = n;
665
659
  else if (h === S.role.name) {
666
660
  let _ = g.filter(
667
661
  (y) => y.role.name === h
668
662
  );
669
- _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : i(_);
663
+ _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : c(_);
670
664
  }
671
665
  });
672
666
  }) : g.forEach((h) => {
673
- if (n === h.role.name && s === h.organization.title)
674
- u = n, p = s;
675
- else if (n === h.role.name) {
667
+ if (s === h.role.name && n === h.organization.title)
668
+ u = s, p = n;
669
+ else if (s === h.role.name) {
676
670
  let S = g.filter(
677
- (_) => _.role.name === n
671
+ (_) => _.role.name === s
678
672
  );
679
- S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : i(S);
673
+ S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
680
674
  }
681
675
  }));
682
676
  }
683
677
  }
684
- l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : i && (d = u + "." + p + "." + l, i(d));
678
+ l && p && u ? (d = u + "." + p + "." + l, a(d)) : r.preferredcredentials ? (d = r.preferredcredentials.role.name + "." + r.preferredcredentials.organization.title + "." + r.preferredcredentials.collabspace.title, a(d)) : c && (d = u + "." + p + "." + l, c(d));
685
679
  },
686
- onFailure(a) {
687
- console.log("Erreur de récupération du contexte de sécurité. => ", a);
680
+ onFailure(o) {
681
+ console.log("Erreur de récupération du contexte de sécurité. => ", o);
688
682
  }
689
683
  });
690
684
  }
691
- async function I(e, t = void 0, n = void 0, s = void 0) {
692
- const o = e.objID;
693
- delete e.token, (!o || o === "") && console.warn(
685
+ async function I(e, t = void 0, s = void 0) {
686
+ const n = e.objID;
687
+ (!n || n === "") && console.warn(
694
688
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
695
689
  ), (e.space === "" || !e.space) && console.warn(
696
690
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
697
- ), (e.token === "" || !e.token) && (console.log("je récupère un nouveau token"), J(
691
+ ), (e.token === "" || !e.token) && (J(
698
692
  e,
699
- (i) => {
700
- e.token = i;
693
+ (a) => {
694
+ e.token = a;
701
695
  },
702
- (i) => {
703
- console.log("☠️ error => ", i);
696
+ (a) => {
697
+ console.log("☠️ error => ", a);
704
698
  }
705
699
  ), console.warn(
706
700
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
707
701
  )), console.log("_3DSpace_download_doc / credentials", e), U(
708
702
  e,
709
- (i) => {
710
- f(i, {
703
+ (a) => {
704
+ f(a, {
711
705
  headers: {
706
+ "Content-Type": "application/json",
707
+ Accept: "application/json",
712
708
  ENO_CSRF_TOKEN: e.token
713
709
  },
714
- onComplete(r) {
715
- const a = JSON.parse(r);
716
- console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
710
+ onComplete(c) {
711
+ const i = JSON.parse(c);
712
+ console.log("_3DSpace_download_doc / reponse ", i), t && t(i);
717
713
  },
718
- onFailure(r, a, c) {
719
- n && (console.log("error http", r), n({ error: r, headers: a, xhr: c }));
714
+ onFailure(c, i, o) {
715
+ s && (console.log("error http", c), s({ error: c, headers: i, xhr: o }));
720
716
  }
721
717
  });
722
718
  },
723
- (i) => {
724
- n && n(i), console.log("*_3dspace_download_doc / error file URL *", i);
719
+ (a) => {
720
+ s && s(a), console.log("*_3dspace_download_doc / error file URL *", a);
725
721
  }
726
722
  );
727
723
  }
728
- async function X(e, t, n = void 0, s = void 0) {
729
- let o = [];
730
- for (let a = 0; a < t.length; a += 80) {
731
- const c = t.slice(a, a + 80);
732
- o.push(c);
724
+ async function X(e, t, s = void 0, n = void 0) {
725
+ let a = [];
726
+ for (let o = 0; o < t.length; o += 80) {
727
+ const r = t.slice(o, o + 80);
728
+ a.push(r);
733
729
  }
734
- const r = (a) => {
730
+ const i = (o) => {
735
731
  V(
736
732
  e,
737
- o[a],
733
+ a[o],
738
734
  () => {
739
- a++, a < o.length && r(a);
735
+ o++, o < a.length && i(o);
740
736
  },
741
- (c) => {
742
- n && n(c);
737
+ (r) => {
738
+ s && s(r);
743
739
  }
744
740
  );
745
741
  };
746
- r(0);
742
+ i(0);
747
743
  }
748
- function V(e, t, n = void 0, s = void 0, o = void 0) {
749
- const i = [];
750
- t.forEach((c) => {
751
- i.push({
752
- id: c
744
+ function V(e, t, s = void 0, n = void 0, a = void 0) {
745
+ const c = [];
746
+ t.forEach((r) => {
747
+ c.push({
748
+ id: r
753
749
  });
754
750
  });
755
- let r = JSON.stringify({
751
+ let i = JSON.stringify({
756
752
  csrf: {
757
753
  name: "ENO_CSRF_TOKEN",
758
754
  value: e.token
759
755
  },
760
- data: i
756
+ data: c
761
757
  });
762
- const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
763
- f(a, {
758
+ const o = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
759
+ f(o, {
764
760
  method: "PUT",
765
- data: r,
761
+ data: i,
766
762
  type: "json",
767
- onComplete(c) {
768
- const d = c.data;
769
- c.success === !0 && (n && n(), d.forEach((l) => {
763
+ onComplete(r) {
764
+ const d = r.data;
765
+ r.success === !0 && (s && s(), d.forEach((l) => {
770
766
  try {
771
767
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
772
768
  f(u, {
773
769
  onComplete: (m) => {
774
- s && s({
770
+ n && n({
775
771
  objectId: l.id,
776
772
  fileName: p,
777
773
  data: JSON.parse(m)
@@ -782,30 +778,30 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
782
778
  }
783
779
  });
784
780
  } catch (p) {
785
- console.log(p), o && o(p);
781
+ console.log(p), a && a(p);
786
782
  }
787
783
  }));
788
784
  },
789
- onFailure(c) {
790
- console.log(c), o && o(c);
785
+ onFailure(r) {
786
+ console.log(r), a && a(r);
791
787
  }
792
788
  });
793
789
  }
794
- function De(e, t, n = void 0, s = void 0) {
795
- return new Promise((o) => {
790
+ function De(e, t, s = void 0, n = void 0) {
791
+ return new Promise((a) => {
796
792
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
797
- const i = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
793
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
798
794
  b(
799
795
  e.space,
800
796
  "ESPACE COMMUN",
801
797
  ["VPLMProjectLeader", "VPLMCreator"],
802
798
  void 0,
803
- (a) => e.ctx = a,
804
- (a) => {
805
- console.log("onError =>", a);
799
+ (o) => e.ctx = o,
800
+ (o) => {
801
+ console.log("onError =>", o);
806
802
  }
807
803
  );
808
- let r = {
804
+ let i = {
809
805
  method: "POST",
810
806
  headers: {
811
807
  SecurityContext: "ctx::" + e.ctx,
@@ -821,32 +817,32 @@ function De(e, t, n = void 0, s = void 0) {
821
817
  ]
822
818
  }),
823
819
  type: "json",
824
- onComplete(a) {
825
- n && n(a);
820
+ onComplete(o) {
821
+ s && s(o);
826
822
  },
827
- onFailure(a) {
828
- s && s(a);
823
+ onFailure(o) {
824
+ n && n(o);
829
825
  }
830
826
  };
831
- f(i, r);
827
+ f(c, i);
832
828
  }
833
829
  });
834
830
  }
835
- function Fe(e, t, n, s = void 0, o = void 0) {
836
- return new Promise((i) => {
831
+ function Fe(e, t, s, n = void 0, a = void 0) {
832
+ return new Promise((c) => {
837
833
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
838
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
834
+ const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
839
835
  b(
840
836
  e.space,
841
837
  "ESPACE COMMUN",
842
838
  ["VPLMProjectLeader", "VPLMCreator"],
843
839
  void 0,
844
- (c) => e.ctx = c,
845
- (c) => {
846
- console.log("onError =>", c);
840
+ (r) => e.ctx = r,
841
+ (r) => {
842
+ console.log("onError =>", r);
847
843
  }
848
844
  );
849
- let a = {
845
+ let o = {
850
846
  method: "POST",
851
847
  headers: {
852
848
  SecurityContext: "ctx::" + e.ctx,
@@ -858,37 +854,37 @@ function Fe(e, t, n, s = void 0, o = void 0) {
858
854
  data: [
859
855
  {
860
856
  id: t,
861
- nextState: n
857
+ nextState: s
862
858
  }
863
859
  ]
864
860
  }),
865
861
  type: "json",
866
- onComplete(c) {
867
- s && s(c);
862
+ onComplete(r) {
863
+ n && n(r);
868
864
  },
869
- onFailure(c) {
870
- o && o(c);
865
+ onFailure(r) {
866
+ a && a(r);
871
867
  }
872
868
  };
873
- f(r, a);
869
+ f(i, o);
874
870
  }
875
871
  });
876
872
  }
877
- function Ue(e, t, n = void 0, s = void 0) {
878
- return new Promise((o) => {
873
+ function Ue(e, t, s = void 0, n = void 0) {
874
+ return new Promise((a) => {
879
875
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
880
- const i = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
876
+ const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
881
877
  b(
882
878
  e.space,
883
879
  "ESPACE COMMUN",
884
880
  ["VPLMProjectLeader", "VPLMCreator"],
885
881
  void 0,
886
- (a) => e.ctx = a,
887
- (a) => {
888
- console.log("onError =>", a);
882
+ (o) => e.ctx = o,
883
+ (o) => {
884
+ console.log("onError =>", o);
889
885
  }
890
886
  );
891
- let r = {
887
+ let i = {
892
888
  method: "POST",
893
889
  headers: {
894
890
  securitycontext: "ctx::" + e.ctx,
@@ -904,32 +900,32 @@ function Ue(e, t, n = void 0, s = void 0) {
904
900
  ]
905
901
  }),
906
902
  type: "json",
907
- onComplete(a) {
908
- n && n(a);
903
+ onComplete(o) {
904
+ s && s(o);
909
905
  },
910
- onFailure(a) {
911
- s && s(a);
906
+ onFailure(o) {
907
+ n && n(o);
912
908
  }
913
909
  };
914
- f(i, r);
910
+ f(c, i);
915
911
  }
916
912
  });
917
913
  }
918
- function $e(e, t, n = void 0, s = void 0) {
919
- return new Promise((o) => {
914
+ function $e(e, t, s = void 0, n = void 0) {
915
+ return new Promise((a) => {
920
916
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
921
- const i = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
917
+ const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
922
918
  b(
923
919
  e.space,
924
920
  "ESPACE COMMUN",
925
921
  ["VPLMProjectLeader", "VPLMCreator"],
926
922
  void 0,
927
- (a) => e.ctx = a,
928
- (a) => {
929
- console.log("onError =>", a);
923
+ (o) => e.ctx = o,
924
+ (o) => {
925
+ console.log("onError =>", o);
930
926
  }
931
927
  );
932
- let r = {
928
+ let i = {
933
929
  method: "POST",
934
930
  headers: {
935
931
  SecurityContext: "ctx::" + e.ctx,
@@ -951,32 +947,32 @@ function $e(e, t, n = void 0, s = void 0) {
951
947
  ]
952
948
  }),
953
949
  type: "json",
954
- onComplete(a) {
955
- n && n(a);
950
+ onComplete(o) {
951
+ s && s(o);
956
952
  },
957
- onFailure(a) {
958
- s && s(a);
953
+ onFailure(o) {
954
+ n && n(o);
959
955
  }
960
956
  };
961
- f(i, r);
957
+ f(c, i);
962
958
  }
963
959
  });
964
960
  }
965
- function je(e, t, n, s = void 0, o = void 0) {
966
- return new Promise((i) => {
961
+ function je(e, t, s, n = void 0, a = void 0) {
962
+ return new Promise((c) => {
967
963
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
968
- const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
964
+ const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
969
965
  b(
970
966
  e.space,
971
967
  "ESPACE COMMUN",
972
968
  ["VPLMProjectLeader", "VPLMCreator"],
973
969
  void 0,
974
- (c) => e.ctx = c,
975
- (c) => {
976
- console.log("onError =>", c);
970
+ (r) => e.ctx = r,
971
+ (r) => {
972
+ console.log("onError =>", r);
977
973
  }
978
974
  );
979
- let a = {
975
+ let o = {
980
976
  method: "POST",
981
977
  headers: {
982
978
  securitycontext: "ctx::" + e.ctx,
@@ -988,9 +984,9 @@ function je(e, t, n, s = void 0, o = void 0) {
988
984
  data: [
989
985
  {
990
986
  physicalid: t,
991
- proposedRevision: n,
987
+ proposedRevision: s,
992
988
  modifiedAttributes: {
993
- revision: n
989
+ revision: s
994
990
  }
995
991
  }
996
992
  ],
@@ -998,86 +994,86 @@ function je(e, t, n, s = void 0, o = void 0) {
998
994
  notificationTimeout: 600
999
995
  }),
1000
996
  type: "json",
1001
- onComplete(c) {
1002
- s && s(c);
997
+ onComplete(r) {
998
+ n && n(r);
1003
999
  },
1004
- onFailure(c) {
1005
- o && o(c);
1000
+ onFailure(r) {
1001
+ a && a(r);
1006
1002
  }
1007
1003
  };
1008
- f(r, a);
1004
+ f(i, o);
1009
1005
  }
1010
1006
  });
1011
1007
  }
1012
1008
  //!SECTION
1013
- function Re(e, t = void 0, n = void 0) {
1014
- const s = {
1009
+ function Ae(e, t = void 0, s = void 0) {
1010
+ const n = {
1015
1011
  base: `${e.space}`,
1016
1012
  uri: "/resources/bps/cspaces",
1017
1013
  optTenant: `tenant=${e.tenant}`
1018
- }, o = `${s.base}${s.uri}?${s.optTenant}`;
1019
- f(o, {
1014
+ }, a = `${n.base}${n.uri}?${n.optTenant}`;
1015
+ f(a, {
1020
1016
  method: "GET",
1021
1017
  headers: {
1022
1018
  Accept: "application/json,text/javascript,*/*",
1023
1019
  "Content-Type": "application/ds-json"
1024
1020
  },
1025
- onComplete(i, r) {
1026
- const a = JSON.parse(i);
1027
- t && t(a, r);
1021
+ onComplete(c, i) {
1022
+ const o = JSON.parse(c);
1023
+ t && t(o, i);
1028
1024
  },
1029
- onFailure(i, r, a) {
1030
- n && n({ response: i, headers: r, xhr: a });
1025
+ onFailure(c, i, o) {
1026
+ s && s({ response: c, headers: i, xhr: o });
1031
1027
  }
1032
1028
  });
1033
1029
  }
1034
- function Ae(e, t, n, s) {
1030
+ function Re(e, t, s, n) {
1035
1031
  U(
1036
1032
  e.space,
1037
1033
  t,
1038
- (o) => {
1039
- f(o, {
1034
+ (a) => {
1035
+ f(a, {
1040
1036
  header: { ENO_CSRF_TOKEN: e.token },
1041
- onComplete: (i) => {
1042
- n && n(i);
1037
+ onComplete: (c) => {
1038
+ s && s(c);
1043
1039
  },
1044
- onFailure: (i) => {
1045
- console.log("error http", i), s && s(i);
1040
+ onFailure: (c) => {
1041
+ console.log("error http", c), n && n(c);
1046
1042
  }
1047
1043
  });
1048
1044
  }
1049
1045
  );
1050
1046
  }
1051
- async function Ie(e, t, n = void 0, s = void 0) {
1052
- return new Promise((o) => {
1053
- U(e, t, (i) => {
1054
- f(i, {
1055
- onComplete: (r, a, c) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, c), o),
1056
- onFailure: (r, a, c) => {
1057
- s && s(r, a, c), console.log(r, a?.errormsg);
1047
+ async function Ie(e, t, s = void 0, n = void 0) {
1048
+ return new Promise((a) => {
1049
+ U(e, t, (c) => {
1050
+ f(c, {
1051
+ onComplete: (i, o, r) => (a(JSON.parse(i)), s && s(JSON.parse(i), o, r), a),
1052
+ onFailure: (i, o, r) => {
1053
+ n && n(i, o, r), console.log(i, o?.errormsg);
1058
1054
  }
1059
1055
  });
1060
1056
  });
1061
1057
  });
1062
1058
  }
1063
- function ve(e, t, n, s = void 0, o = void 0) {
1064
- const i = new Blob([JSON.stringify(t)], { type: "text/plain" });
1059
+ function ve(e, t, s, n = void 0, a = void 0) {
1060
+ const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1065
1061
  k(
1066
1062
  e,
1067
- n,
1068
- (r) => {
1069
- const a = r.data[0].relateddata.files[0].id, c = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1063
+ s,
1064
+ (i) => {
1065
+ const o = i.data[0].relateddata.files[0].id, r = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1070
1066
  K(
1071
1067
  e,
1072
- n,
1073
- a,
1074
- i,
1068
+ s,
1069
+ o,
1075
1070
  c,
1071
+ r,
1076
1072
  (d) => {
1077
- s && s(d);
1073
+ n && n(d);
1078
1074
  },
1079
1075
  (d) => {
1080
- o && o(d);
1076
+ a && a(d);
1081
1077
  }
1082
1078
  );
1083
1079
  }
@@ -1085,62 +1081,59 @@ function ve(e, t, n, s = void 0, o = void 0) {
1085
1081
  }
1086
1082
  let v, x;
1087
1083
  const $ = [];
1088
- async function xe(e, t = void 0, n = void 0) {
1084
+ async function xe(e, t = void 0, s = void 0) {
1089
1085
  e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
1090
1086
  e,
1091
- (s) => {
1092
- t && t(s);
1087
+ (n) => {
1088
+ t && t(n);
1093
1089
  },
1094
- (s) => {
1095
- n && n(s);
1090
+ (n) => {
1091
+ s && s(n);
1096
1092
  }
1097
1093
  )) : (e.objID === null || e.objID === "") && C(
1098
1094
  e,
1099
- (s) => {
1100
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1095
+ (n) => {
1096
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1101
1097
  },
1102
- (s) => {
1103
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1098
+ (n) => {
1099
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1104
1100
  }
1105
1101
  );
1106
1102
  }
1107
- async function Pe(e, t = void 0, n = void 0) {
1103
+ async function Pe(e, t = void 0, s = void 0) {
1108
1104
  console.log("getDatasByTenant (getDocuments)", e), await I(
1109
1105
  e,
1110
- (s) => {
1111
- const o = {};
1112
- o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1106
+ (n) => {
1107
+ const a = {};
1108
+ a.obj = n, console.log("getDatasByTenant (getDocuments) _datas", a), t && t?.(a);
1113
1109
  },
1114
- (s) => {
1115
- n && n?.(s);
1110
+ (n) => {
1111
+ s && s?.(n);
1116
1112
  }
1117
1113
  );
1118
1114
  }
1119
- function Me(e, t = void 0, n = void 0) {
1120
- const s = [];
1121
- e.objIds.forEach((o, i) => {
1115
+ function Me(e, t = void 0, s = void 0) {
1116
+ const n = [];
1117
+ e.objIds.forEach((a, c) => {
1122
1118
  I(
1123
1119
  e,
1124
- o.objId,
1125
- (r) => {
1126
- s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, x)), i === e.objIds.length - 1 && t && t(s);
1127
- },
1128
- (r) => {
1129
- n && n(r);
1120
+ a.objId,
1121
+ (i) => {
1122
+ n.push({ [a.name]: i }), a.name === "dbProjets" && (v = i.affaires.map((o) => o.objectID), B(e, x)), c === e.objIds.length - 1 && t && t(n);
1130
1123
  }
1131
1124
  );
1132
1125
  });
1133
1126
  }
1134
- function B(e, t, n = void 0, s = void 0) {
1127
+ function B(e, t, s = void 0, n = void 0) {
1135
1128
  X(
1136
1129
  e,
1137
1130
  v,
1138
- (o) => {
1139
- const i = [...t];
1140
- i.find((r) => r.objectID === o.objectId).data = o.data, x = i, $.push(o.data), n && n($);
1131
+ (a) => {
1132
+ const c = [...t];
1133
+ c.find((i) => i.objectID === a.objectId).data = a.data, x = c, $.push(a.data), s && s($);
1141
1134
  },
1142
- (o) => {
1143
- s && (s(o), console.log(o));
1135
+ (a) => {
1136
+ n && (n(a), console.log(a));
1144
1137
  }
1145
1138
  );
1146
1139
  }
@@ -1164,22 +1157,22 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1164
1157
  order_by: "desc",
1165
1158
  tag: "testTag"
1166
1159
  };
1167
- function Le(e, t, n = void 0, s = void 0) {
1168
- const { space: o, tenant: i } = e, { objId: r, pred: a, tag: c } = t, d = {
1160
+ function Le(e, t, s = void 0, n = void 0) {
1161
+ const { space: a, tenant: c } = e, { objId: i, pred: o, tag: r } = t, d = {
1169
1162
  uri: "/resources/6w/tags",
1170
1163
  otpCTX: "SecurityContext=preferred",
1171
- optTenant: `tenant=${i}`
1172
- }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1164
+ optTenant: `tenant=${c}`
1165
+ }, l = `${a}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1173
1166
  tag: [
1174
1167
  {
1175
1168
  subject: [
1176
1169
  {
1177
- uri: `pid://${r}`
1170
+ uri: `pid://${i}`
1178
1171
  }
1179
1172
  ],
1180
- predicate: P[a],
1173
+ predicate: P[o],
1181
1174
  object: {
1182
- literal: c
1175
+ literal: r
1183
1176
  }
1184
1177
  }
1185
1178
  ]
@@ -1197,46 +1190,46 @@ function Le(e, t, n = void 0, s = void 0) {
1197
1190
  setTimeout(() => {
1198
1191
  G(
1199
1192
  e,
1200
- r,
1193
+ i,
1201
1194
  (g) => {
1202
1195
  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;
1203
1196
  m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
1204
1197
  e,
1205
1198
  t,
1206
1199
  (y) => {
1207
- n && n(y);
1200
+ s && s(y);
1208
1201
  },
1209
1202
  (y) => {
1210
- s && s(y);
1203
+ n && n(y);
1211
1204
  }
1212
1205
  );
1213
1206
  },
1214
1207
  (g, h) => {
1215
1208
  const S = g;
1216
- S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
1209
+ S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
1217
1210
  }
1218
1211
  );
1219
1212
  }, 2e3);
1220
1213
  },
1221
1214
  onFailure(u, m) {
1222
1215
  const g = u;
1223
- g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1216
+ g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1224
1217
  }
1225
1218
  });
1226
1219
  }
1227
- function q(e, t, n = void 0, s = void 0) {
1220
+ function q(e, t, s = void 0, n = void 0) {
1228
1221
  console.log("obj ", t);
1229
- const o = t.info.name, i = {
1222
+ const a = t.info.name, c = {
1230
1223
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1231
1224
  uri: "/federated/search"
1232
- }, r = `${i.baseUrl}${i.uri}`, a = {
1225
+ }, i = `${c.baseUrl}${c.uri}`, o = {
1233
1226
  "Content-Type": "application/json",
1234
1227
  Accept: "application/json,text/javascript,*/*"
1235
- }, c = A(), d = {
1228
+ }, r = R(), d = {
1236
1229
  with_indexing_date: !0,
1237
1230
  with_synthesis: !0,
1238
1231
  with_nls: !1,
1239
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1232
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1240
1233
  locale: "fr",
1241
1234
  select_predicate: [
1242
1235
  "ds6w:label",
@@ -1264,7 +1257,7 @@ function q(e, t, n = void 0, s = void 0) {
1264
1257
  ],
1265
1258
  with_synthesis_hierarchical: !0,
1266
1259
  select_file: ["icon", "thumbnail_2d"],
1267
- query: o,
1260
+ query: a,
1268
1261
  specific_source_parameter: {
1269
1262
  "3dspace": {
1270
1263
  additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
@@ -1293,41 +1286,41 @@ function q(e, t, n = void 0, s = void 0) {
1293
1286
  }
1294
1287
  }
1295
1288
  };
1296
- console.log("dataPattern => ", d), f(r, {
1289
+ console.log("dataPattern => ", d), f(i, {
1297
1290
  method: "POST",
1298
- headers: a,
1291
+ headers: o,
1299
1292
  data: JSON.stringify(d),
1300
1293
  onComplete(l) {
1301
1294
  const p = JSON.parse(l);
1302
- n(p);
1295
+ s(p);
1303
1296
  },
1304
1297
  onFailure(l, p) {
1305
1298
  const u = l;
1306
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1299
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1307
1300
  }
1308
1301
  });
1309
1302
  }
1310
- function Ee(e, t, n = void 0, s = void 0) {
1311
- const { objId: o, pred: i, tag: r } = t, a = {
1303
+ function Ee(e, t, s = void 0, n = void 0) {
1304
+ const { objId: a, pred: c, tag: i } = t, o = {
1312
1305
  uri: "/resources/6w/tags",
1313
1306
  otpCTX: "SecurityContext=preferred",
1314
1307
  optTenant: `tenant=${e.tenant}`
1315
- }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1308
+ }, r = `${e.space}${o.uri}?${o.otpCTX}&${o.optTenant}`, d = {
1316
1309
  tag: [
1317
1310
  {
1318
1311
  subject: [
1319
1312
  {
1320
- uri: `pid://${o}`
1313
+ uri: `pid://${a}`
1321
1314
  }
1322
1315
  ],
1323
- predicate: P[i],
1316
+ predicate: P[c],
1324
1317
  object: {
1325
- literal: r
1318
+ literal: i
1326
1319
  }
1327
1320
  }
1328
1321
  ]
1329
1322
  };
1330
- f(c, {
1323
+ f(r, {
1331
1324
  method: "DELETE",
1332
1325
  data: JSON.stringify(d),
1333
1326
  headers: {
@@ -1335,52 +1328,52 @@ function Ee(e, t, n = void 0, s = void 0) {
1335
1328
  Accept: "application/json,text/javascript,*/*"
1336
1329
  },
1337
1330
  onComplete(l) {
1338
- n && n(l);
1331
+ s && s(l);
1339
1332
  },
1340
1333
  onFailure(l, p) {
1341
1334
  const u = l;
1342
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1335
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
1343
1336
  }
1344
1337
  });
1345
1338
  }
1346
- function Je(e, t = "", n = void 0, s = void 0) {
1347
- const { space: o } = e;
1339
+ function Je(e, t = "", s = void 0, n = void 0) {
1340
+ const { space: a } = e;
1348
1341
  if (t === "")
1349
1342
  return;
1350
- const i = {
1343
+ const c = {
1351
1344
  uri: "/resources/v1/modeler/documents"
1352
- }, r = {
1345
+ }, i = {
1353
1346
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1354
1347
  Accept: "application/json,text/javascript,*/*"
1355
- }, a = `${o}${i.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}`;
1356
- f(a, {
1348
+ }, o = `${a}${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}`;
1349
+ f(o, {
1357
1350
  method: "POST",
1358
- headers: r,
1359
- data: c,
1351
+ headers: i,
1352
+ data: r,
1360
1353
  onComplete(d) {
1361
- n && n(JSON.parse(d));
1354
+ s && s(JSON.parse(d));
1362
1355
  },
1363
1356
  onFailure(d, l) {
1364
1357
  const p = d;
1365
- p.msg = l.error, s && s(p);
1358
+ p.msg = l.error, n && n(p);
1366
1359
  }
1367
1360
  });
1368
1361
  }
1369
- async function w(e, t = void 0, n = void 0) {
1370
- const s = e.space + "/api/index/tk";
1371
- return f(s, {
1372
- onComplete(o, i, r) {
1373
- const a = JSON.parse(o);
1362
+ async function w(e, t = void 0, s = void 0) {
1363
+ const n = e.space + "/api/index/tk";
1364
+ return f(n, {
1365
+ onComplete(a, c, i) {
1366
+ const o = JSON.parse(a);
1374
1367
  if (t)
1375
- return t(a), e.token = a?.result?.ServerToken;
1368
+ return t(o), e.token = o?.result?.ServerToken;
1376
1369
  },
1377
- onFailure(o) {
1378
- n && n(o);
1370
+ onFailure(a) {
1371
+ s && s(a);
1379
1372
  }
1380
1373
  });
1381
1374
  }
1382
- function Ge(e, t = void 0, n = void 0) {
1383
- const s = `${e.space}/api/exalead/whatsnew`, o = {
1375
+ function Ge(e, t = void 0, s = void 0) {
1376
+ const n = `${e.space}/api/exalead/whatsnew`, a = {
1384
1377
  params: {
1385
1378
  community_id: null,
1386
1379
  hash_key: null,
@@ -1390,27 +1383,27 @@ function Ge(e, t = void 0, n = void 0) {
1390
1383
  start: 0
1391
1384
  }
1392
1385
  };
1393
- w(e, (i) => {
1394
- f(s, {
1386
+ w(e, (c) => {
1387
+ f(n, {
1395
1388
  method: "POST",
1396
1389
  headers: {
1397
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
1390
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1398
1391
  "Content-type": "application/json;charset=UTF-8",
1399
1392
  Accept: "application/json"
1400
1393
  },
1401
- data: JSON.stringify(o),
1394
+ data: JSON.stringify(a),
1402
1395
  type: "json",
1403
- onComplete(r, a) {
1404
- t && t(r, a);
1396
+ onComplete(i, o) {
1397
+ t && t(i, o);
1405
1398
  },
1406
- onFailure(r, a) {
1407
- n && n(r, a);
1399
+ onFailure(i, o) {
1400
+ s && s(i, o);
1408
1401
  }
1409
1402
  });
1410
1403
  });
1411
1404
  }
1412
- function Ke(e, t = void 0, n = void 0) {
1413
- const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1405
+ function Ke(e, t = void 0, s = void 0) {
1406
+ const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, a = {
1414
1407
  params: {
1415
1408
  idsToFilterArr: [],
1416
1409
  mode: "offline",
@@ -1419,41 +1412,41 @@ function Ke(e, t = void 0, n = void 0) {
1419
1412
  maxNbOfCommonElements: "5"
1420
1413
  }
1421
1414
  };
1422
- w(e, (i) => {
1423
- f(s, {
1415
+ w(e, (c) => {
1416
+ f(n, {
1424
1417
  method: "POST",
1425
1418
  headers: {
1426
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
1419
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1427
1420
  "Content-type": "application/json;charset=UTF-8",
1428
1421
  Accept: "application/json"
1429
1422
  },
1430
- data: JSON.stringify(o),
1423
+ data: JSON.stringify(a),
1431
1424
  type: "json",
1432
- onComplete(r, a) {
1433
- const c = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1434
- t && t(c, r);
1425
+ onComplete(i, o) {
1426
+ const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1427
+ t && t(r, i);
1435
1428
  },
1436
- onFailure(r, a) {
1437
- n && n(r, a);
1429
+ onFailure(i, o) {
1430
+ s && s(i, o);
1438
1431
  }
1439
1432
  });
1440
1433
  });
1441
1434
  }
1442
- function We(e, t = void 0, n = void 0) {
1443
- const s = {
1435
+ function We(e, t = void 0, s = void 0) {
1436
+ const n = {
1444
1437
  base: e.space,
1445
1438
  uri: "/api/community/listmycommunities",
1446
1439
  limit: `/limit/${e.limit ? e.limit : 128}`,
1447
1440
  page: `/page/${e.page ? e.page : "1"}`
1448
- }, o = `${s.base}${s.uri}${s.limit}${s.page}`, i = [];
1449
- w(e, (r) => {
1450
- f(o, {
1441
+ }, a = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1442
+ w(e, (i) => {
1443
+ f(a, {
1451
1444
  method: "GET",
1452
1445
  headers: {
1453
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1446
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1454
1447
  },
1455
- onComplete(a, c, d) {
1456
- const p = JSON.parse(a).result;
1448
+ onComplete(o, r, d) {
1449
+ const p = JSON.parse(o).result;
1457
1450
  let u = 0;
1458
1451
  p.forEach((m) => {
1459
1452
  const g = {
@@ -1468,76 +1461,76 @@ function We(e, t = void 0, n = void 0) {
1468
1461
  e,
1469
1462
  m.id,
1470
1463
  (h) => {
1471
- u++, g.members = h, i.push(g), u === p.length && t && t(i);
1464
+ u++, g.members = h, c.push(g), u === p.length && t && t(c);
1472
1465
  },
1473
- (h) => n(h)
1466
+ (h) => s(h)
1474
1467
  );
1475
1468
  });
1476
1469
  },
1477
- onFailure(a, c) {
1478
- const d = a;
1479
- d.status = c.status, d.response = c.errormsg, n && n(d);
1470
+ onFailure(o, r) {
1471
+ const d = o;
1472
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1480
1473
  }
1481
1474
  });
1482
1475
  });
1483
1476
  }
1484
- function Q(e, t, n, s) {
1485
- const o = `${e.space}/api/community/listmembers`, i = {
1477
+ function Q(e, t, s, n) {
1478
+ const a = `${e.space}/api/community/listmembers`, c = {
1486
1479
  params: {
1487
1480
  page: e.page ? e.page : 1,
1488
1481
  limit: e.limit ? e.limit : 50,
1489
1482
  community_id: t
1490
1483
  }
1491
1484
  };
1492
- w(e, (r) => {
1493
- f(o, {
1485
+ w(e, (i) => {
1486
+ f(a, {
1494
1487
  method: "POST",
1495
1488
  headers: {
1496
1489
  "Content-type": "application/json;charset=UTF-8",
1497
1490
  Accept: "application/json",
1498
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1491
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1499
1492
  },
1500
- data: JSON.stringify(i),
1493
+ data: JSON.stringify(c),
1501
1494
  type: "json",
1502
- onComplete(a, c, d) {
1503
- n && n(a);
1495
+ onComplete(o, r, d) {
1496
+ s && s(o);
1504
1497
  },
1505
- onFailure(a, c) {
1506
- const d = a;
1507
- d.status = c.status, d.response = c.errormsg, s && s(d);
1498
+ onFailure(o, r) {
1499
+ const d = o;
1500
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1508
1501
  }
1509
1502
  });
1510
1503
  });
1511
1504
  }
1512
- function Xe(e, t = void 0, n = void 0) {
1513
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
1514
- e.commu_id || (e.commu_id = s);
1515
- const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1516
- w(e, (i) => {
1517
- f(o, {
1505
+ function Xe(e, t = void 0, s = void 0) {
1506
+ const n = "YXdA5x4DSUKtlAi2wmnyTA";
1507
+ e.commu_id || (e.commu_id = n);
1508
+ const a = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1509
+ w(e, (c) => {
1510
+ f(a, {
1518
1511
  method: "GET",
1519
1512
  headers: {
1520
1513
  "Content-type": "application/json;charset=UTF-8",
1521
1514
  Accept: "application/json",
1522
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1515
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1523
1516
  },
1524
- onComplete(r) {
1525
- const a = JSON.parse(r);
1526
- t && t(a);
1517
+ onComplete(i) {
1518
+ const o = JSON.parse(i);
1519
+ t && t(o);
1527
1520
  },
1528
- onFailure(r, a) {
1529
- const c = r;
1530
- c.status = a.status, c.response = a.errormsg, n && n(c);
1521
+ onFailure(i, o) {
1522
+ const r = i;
1523
+ r.status = o.status, r.response = o.errormsg, s && s(r);
1531
1524
  }
1532
1525
  });
1533
1526
  });
1534
1527
  }
1535
- function Ve(e, t, n = void 0, s = void 0) {
1536
- const { listAllContacts: o, currentUser: i } = e;
1537
- console.log("__listAllContacts", o.hits);
1538
- const r = `${e.space}/api/directmessages`, a = {
1539
- users: [i.login].concat(t.receipt)
1540
- }, c = {
1528
+ function Ve(e, t, s = void 0, n = void 0) {
1529
+ const { listAllContacts: a, currentUser: c } = e;
1530
+ console.log("__listAllContacts", a.hits);
1531
+ const i = `${e.space}/api/directmessages`, o = {
1532
+ users: [c.login].concat(t.receipt)
1533
+ }, r = {
1541
1534
  id_msg: "",
1542
1535
  senderId: e.currentUser.login,
1543
1536
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1545,72 +1538,72 @@ function Ve(e, t, n = void 0, s = void 0) {
1545
1538
  };
1546
1539
  let d = !1;
1547
1540
  Z(
1548
- a.users,
1541
+ o.users,
1549
1542
  (l) => {
1550
- l !== void 0 && (c.id_msg = l.id, d = !0, j(e, c));
1543
+ l !== void 0 && (r.id_msg = l.id, d = !0, j(e, r));
1551
1544
  },
1552
1545
  (l) => {
1553
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1546
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), r.id_msg = "";
1554
1547
  }
1555
1548
  ), d === !1 && setTimeout(() => {
1556
1549
  d === !1 && w(e, (l) => {
1557
- f(r, {
1550
+ f(i, {
1558
1551
  method: "POST",
1559
1552
  headers: {
1560
1553
  "Content-Type": "application/json",
1561
1554
  Accept: "application/json",
1562
1555
  "X-DS-SWYM-CSRFTOKEN": l.result.ServerToken
1563
1556
  },
1564
- data: JSON.stringify(a),
1557
+ data: JSON.stringify(o),
1565
1558
  type: "json",
1566
1559
  onComplete(p, u, m) {
1567
1560
  const g = p;
1568
- g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, j(e, c);
1561
+ g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), r.id_msg = g.result.id, j(e, r);
1569
1562
  },
1570
1563
  onFailure(p, u, m) {
1571
1564
  const g = p;
1572
- g.msg = u.errormsg, g.status = u.status, s && s(g);
1565
+ g.msg = u.errormsg, g.status = u.status, n && n(g);
1573
1566
  }
1574
1567
  });
1575
1568
  });
1576
1569
  }, 500);
1577
1570
  }
1578
- function Z(e, t, n, s) {
1579
- const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1580
- w(e, (i) => {
1581
- f(o, {
1571
+ function Z(e, t, s, n) {
1572
+ const a = `${e.space}/api/directmessages/lite?with_favorites=false`;
1573
+ w(e, (c) => {
1574
+ f(a, {
1582
1575
  method: "GET",
1583
1576
  headers: {
1584
1577
  Accept: "application/json,text/javascript,*/*",
1585
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1578
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1586
1579
  },
1587
- onComplete(r) {
1588
- const a = JSON.parse(r), c = [];
1589
- a.result.forEach((p) => {
1590
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1580
+ onComplete(i) {
1581
+ const o = JSON.parse(i), r = [];
1582
+ o.result.forEach((p) => {
1583
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1591
1584
  });
1592
- const d = t.sort(), l = c.find((p) => {
1585
+ const d = t.sort(), l = r.find((p) => {
1593
1586
  const u = [];
1594
1587
  return p.users.forEach((m) => {
1595
1588
  u.push(m.login);
1596
1589
  }), JSON.stringify(u) === JSON.stringify(d);
1597
1590
  });
1598
- n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1591
+ s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1599
1592
  },
1600
- onFailure(r) {
1601
- const a = r;
1602
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1593
+ onFailure(i) {
1594
+ const o = i;
1595
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), n && n(o);
1603
1596
  }
1604
1597
  });
1605
1598
  });
1606
1599
  }
1607
- function j(e, t, n = void 0, s = void 0) {
1608
- const o = {
1600
+ function j(e, t, s = void 0, n = void 0) {
1601
+ const a = {
1609
1602
  base: e.space,
1610
1603
  uri: "/api/community",
1611
1604
  id_msg: `${t.id_msg}`,
1612
1605
  endUri: "/instantmessages"
1613
- }, i = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
1606
+ }, c = `${a.base}${a.uri}/${a.id_msg}${a.endUri}`, i = {
1614
1607
  author: { login: t.senderId, displayName: t.senderName },
1615
1608
  accessState: null,
1616
1609
  commentUri: null,
@@ -1620,33 +1613,33 @@ function j(e, t, n = void 0, s = void 0) {
1620
1613
  parentCommentUri: null,
1621
1614
  richMessage: t.msg
1622
1615
  };
1623
- console.log("_3dSwym_sendDirectMessageData url ", i), w(e, (a) => {
1624
- f(i, {
1616
+ console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (o) => {
1617
+ f(c, {
1625
1618
  method: "POST",
1626
1619
  headers: {
1627
1620
  "Content-Type": "application/json",
1628
1621
  Accept: "application/json",
1629
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1622
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1630
1623
  },
1631
- data: JSON.stringify(r),
1624
+ data: JSON.stringify(i),
1632
1625
  type: "json",
1633
- onComplete(c, d, l) {
1634
- const p = c;
1635
- p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1626
+ onComplete(r, d, l) {
1627
+ const p = r;
1628
+ p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1636
1629
  },
1637
- onFailure(c, d) {
1638
- const l = c;
1639
- l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1630
+ onFailure(r, d) {
1631
+ const l = r;
1632
+ l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1640
1633
  }
1641
1634
  });
1642
1635
  });
1643
1636
  }
1644
1637
  function ee(e) {
1645
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1638
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1646
1639
  return `<p>${e} </p>
1647
1640
  <br/>
1648
1641
  <hr/>
1649
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1642
+ <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1650
1643
  }
1651
1644
  const te = {
1652
1645
  title: "TEST DEV COMMUNITY IDEA",
@@ -1658,16 +1651,16 @@ const te = {
1658
1651
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1659
1652
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1660
1653
  };
1661
- function Be(e, t, n = void 0, s = void 0) {
1662
- const o = `${e.space}/api/idea/add`, i = e.swymCommunities.find(
1663
- (c) => c.id === t.community_id
1664
- ), r = e.swymCommunities.find(
1665
- (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1666
- ), a = {
1654
+ function Be(e, t, s = void 0, n = void 0) {
1655
+ const a = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1656
+ (r) => r.id === t.community_id
1657
+ ), i = e.swymCommunities.find(
1658
+ (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1659
+ ), o = {
1667
1660
  params: {
1668
1661
  title: t.title,
1669
1662
  // String, le nom de l'affaire
1670
- community_id: i?.id !== void 0 ? i.id : r.id,
1663
+ community_id: c?.id !== void 0 ? c.id : i.id,
1671
1664
  // String, l'id de la communauté
1672
1665
  message: ne(t.text_html),
1673
1666
  // STRING => le contenue du message doit être au format HTML
@@ -1675,103 +1668,103 @@ function Be(e, t, n = void 0, s = void 0) {
1675
1668
  // 1 publier, 0 non publier
1676
1669
  }
1677
1670
  };
1678
- w(e, (c) => {
1671
+ w(e, (r) => {
1679
1672
  const d = {
1680
1673
  "Content-type": "application/json;charset=UTF-8",
1681
1674
  Accept: "application/json",
1682
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1675
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1683
1676
  };
1684
- f(o, {
1677
+ f(a, {
1685
1678
  method: "POST",
1686
1679
  headers: d,
1687
- data: JSON.stringify(a),
1680
+ data: JSON.stringify(o),
1688
1681
  type: "json",
1689
1682
  onComplete(l, p, u) {
1690
1683
  const m = JSON.parse(l);
1691
- m.status = u.status, m.response = u.response, n && n(m);
1684
+ m.status = u.status, m.response = u.response, s && s(m);
1692
1685
  },
1693
1686
  onFailure(l, p, u) {
1694
1687
  const m = l;
1695
- m.status = p.status, m.response = p.errormsg, s && s(m);
1688
+ m.status = p.status, m.response = p.errormsg, n && n(m);
1696
1689
  }
1697
1690
  });
1698
1691
  });
1699
1692
  }
1700
- function Ye(e, t, n = void 0, s = void 0) {
1701
- const o = `${e.space}/api/idea/delete`, i = {
1693
+ function Ye(e, t, s = void 0, n = void 0) {
1694
+ const a = `${e.space}/api/idea/delete`, c = {
1702
1695
  params: {
1703
1696
  community_id: t.community_id,
1704
1697
  ideationIds: [t.idee_id]
1705
1698
  }
1706
1699
  };
1707
- w(e, (r) => {
1708
- f(o, {
1700
+ w(e, (i) => {
1701
+ f(a, {
1709
1702
  method: "POST",
1710
1703
  headers: {
1711
1704
  "Content-type": "application/json;charset=UTF-8",
1712
1705
  Accept: "application/json",
1713
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1706
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1714
1707
  },
1715
- data: JSON.stringify(i),
1708
+ data: JSON.stringify(c),
1716
1709
  type: "json",
1717
- onComplete(a, c, d) {
1718
- n && n(a);
1710
+ onComplete(o, r, d) {
1711
+ s && s(o);
1719
1712
  },
1720
- onFailure(a, c, d) {
1721
- const l = a;
1722
- l.status = c.status, l.response = c.errormsg, s && s(l);
1713
+ onFailure(o, r, d) {
1714
+ const l = o;
1715
+ l.status = r.status, l.response = r.errormsg, n && n(l);
1723
1716
  }
1724
1717
  });
1725
1718
  });
1726
1719
  }
1727
- function He(e, t = "", n = void 0, s = void 0) {
1728
- const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1729
- t === "" && (t = o);
1730
- const i = `${e.space}/api/idea/get`, r = {
1720
+ function He(e, t = "", s = void 0, n = void 0) {
1721
+ const a = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1722
+ t === "" && (t = a);
1723
+ const c = `${e.space}/api/idea/get`, i = {
1731
1724
  params: {
1732
1725
  id: t
1733
1726
  }
1734
1727
  };
1735
- w(e, (a) => {
1736
- f(i, {
1728
+ w(e, (o) => {
1729
+ f(c, {
1737
1730
  method: "POST",
1738
1731
  headers: {
1739
1732
  "Content-type": "application/json;charset=UTF-8",
1740
1733
  Accept: "application/json",
1741
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1734
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1742
1735
  },
1743
- data: JSON.stringify(r),
1736
+ data: JSON.stringify(i),
1744
1737
  type: "json",
1745
- onComplete(c) {
1746
- const d = c;
1747
- d.msg = d.result.message, n && n(d);
1738
+ onComplete(r) {
1739
+ const d = r;
1740
+ d.msg = d.result.message, s && s(d);
1748
1741
  },
1749
- onFailure(c) {
1750
- const d = c;
1751
- d.status = headers.status, d.response = headers.errormsg, s && s(d);
1742
+ onFailure(r) {
1743
+ const d = r;
1744
+ d.status = headers.status, d.response = headers.errormsg, n && n(d);
1752
1745
  }
1753
1746
  });
1754
1747
  });
1755
1748
  }
1756
- function ze(e, t = te, n = void 0, s = void 0) {
1757
- const o = {
1749
+ function ze(e, t = te, s = void 0, n = void 0) {
1750
+ const a = {
1758
1751
  uri: "/api/idea/list",
1759
1752
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1760
1753
  limit: `/limit/${t.limit ? t.limit : 10}`
1761
- }, i = `${e.space}${o.uri}${o.comId}${o.limit}`;
1762
- w(e, (r) => {
1763
- f(i, {
1754
+ }, c = `${e.space}${a.uri}${a.comId}${a.limit}`;
1755
+ w(e, (i) => {
1756
+ f(c, {
1764
1757
  method: "GET",
1765
1758
  headers: {
1766
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1759
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1767
1760
  },
1768
- onComplete(a) {
1769
- const c = JSON.parse(a);
1770
- n && n(c);
1761
+ onComplete(o) {
1762
+ const r = JSON.parse(o);
1763
+ s && s(r);
1771
1764
  },
1772
- onFailure(a, c) {
1773
- const d = a;
1774
- d.status = c.status, d.response = c.errormsg, s && s(d);
1765
+ onFailure(o, r) {
1766
+ const d = o;
1767
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1775
1768
  }
1776
1769
  });
1777
1770
  });
@@ -1851,43 +1844,43 @@ function ne(e) {
1851
1844
  <p>
1852
1845
  </p>` : e;
1853
1846
  }
1854
- function qe(e, t = void 0, n = void 0) {
1855
- const s = e.space + "/api/user/getcurrent/";
1856
- w(e, (o) => {
1857
- f(s, {
1847
+ function qe(e, t = void 0, s = void 0) {
1848
+ const n = e.space + "/api/user/getcurrent/";
1849
+ w(e, (a) => {
1850
+ f(n, {
1858
1851
  method: "GET",
1859
1852
  headers: {
1860
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1853
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1861
1854
  },
1862
- onComplete(i, r, a) {
1863
- const c = JSON.parse(i);
1864
- t && t(c.result);
1855
+ onComplete(c, i, o) {
1856
+ const r = JSON.parse(c);
1857
+ t && t(r.result);
1865
1858
  },
1866
- onFailure(i, r, a) {
1867
- const c = { erreur: JSON.parse(i), headers: r, xhr: a };
1868
- n && n(c);
1859
+ onFailure(c, i, o) {
1860
+ const r = { erreur: JSON.parse(c), headers: i, xhr: o };
1861
+ s && s(r);
1869
1862
  }
1870
1863
  });
1871
1864
  });
1872
1865
  }
1873
- function Qe(e, t, n = void 0, s = void 0) {
1874
- const o = e.space + "/api/user/find/login/" + t;
1866
+ function Qe(e, t, s = void 0, n = void 0) {
1867
+ const a = e.space + "/api/user/find/login/" + t;
1875
1868
  w(
1876
1869
  e,
1877
- (i) => {
1878
- f(o, {
1870
+ (c) => {
1871
+ f(a, {
1879
1872
  method: "GET",
1880
- headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1881
- onComplete(r, a, c) {
1882
- const d = JSON.parse(r);
1883
- n && n(d);
1873
+ headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1874
+ onComplete(i, o, r) {
1875
+ const d = JSON.parse(i);
1876
+ s && s(d);
1884
1877
  },
1885
- onFailure(r) {
1886
- s && s(r);
1878
+ onFailure(i) {
1879
+ n && n(i);
1887
1880
  }
1888
1881
  });
1889
1882
  },
1890
- s
1883
+ n
1891
1884
  );
1892
1885
  }
1893
1886
  function Ze(e) {
@@ -1895,7 +1888,7 @@ function Ze(e) {
1895
1888
  return console.log(t), t;
1896
1889
  }
1897
1890
  export {
1898
- A as UUID,
1891
+ R as UUID,
1899
1892
  ke as _3DSpace_Create_Doc,
1900
1893
  C as _3DSpace_csrf,
1901
1894
  I as _3DSpace_download_doc,
@@ -1943,11 +1936,11 @@ export {
1943
1936
  B as dataMixing,
1944
1937
  Te as deleteUserGroups,
1945
1938
  re as findAdresse,
1946
- Re as getAllContextSecurity,
1939
+ Ae as getAllContextSecurity,
1947
1940
  J as getCSRFToken,
1948
1941
  ie as getCommunes,
1949
1942
  ye as getComplementUG,
1950
- Ae as getDataFrom3DSpace,
1943
+ Re as getDataFrom3DSpace,
1951
1944
  ce as getDataFromGouvFr,
1952
1945
  Pe as getDatasByTenant,
1953
1946
  Me as getDatasFrom3DSpace,