@beam3_dev/api_module 0.0.148 → 0.0.149

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