@mindline/sync 1.0.99 → 1.0.101

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/sync.es.js CHANGED
@@ -1,11 +1,11 @@
1
- var Ae = Object.defineProperty;
1
+ var $e = Object.defineProperty;
2
2
  var ge = (a) => {
3
3
  throw TypeError(a);
4
4
  };
5
- var $e = (a, t, s) => t in a ? Ae(a, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : a[t] = s;
6
- var l = (a, t, s) => $e(a, typeof t != "symbol" ? t + "" : t, s), ke = (a, t, s) => t.has(a) || ge("Cannot " + s);
7
- var j = (a, t, s) => t.has(a) ? ge("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, s);
8
- var E = (a, t, s) => (ke(a, t, "access private method"), s);
5
+ var Ae = (a, t, r) => t in a ? $e(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r;
6
+ var l = (a, t, r) => Ae(a, typeof t != "symbol" ? t + "" : t, r), ke = (a, t, r) => t.has(a) || ge("Cannot " + r);
7
+ var j = (a, t, r) => t.has(a) ? ge("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(a) : t.set(a, r);
8
+ var G = (a, t, r) => (ke(a, t, "access private method"), r);
9
9
  import * as H from "@microsoft/signalr";
10
10
  import { deserializeArray as W } from "class-transformer";
11
11
  const De = [
@@ -20,7 +20,7 @@ const De = [
20
20
  session: "Sign In",
21
21
  sel: !0
22
22
  }
23
- ], Re = [
23
+ ], ve = [
24
24
  {
25
25
  tid: "1",
26
26
  name: "",
@@ -30,7 +30,7 @@ const De = [
30
30
  sel: !0,
31
31
  graphSP: ""
32
32
  }
33
- ], Pe = [], ve = [
33
+ ], Pe = [], Re = [
34
34
  {
35
35
  id: "1",
36
36
  name: "",
@@ -43,7 +43,7 @@ const De = [
43
43
  associatedConfigs: [],
44
44
  sel: !0
45
45
  }
46
- ], Ge = [
46
+ ], Ee = [
47
47
  {
48
48
  Run: "3",
49
49
  Start: "2023-09-17T12:00:00.000-07:00",
@@ -65,7 +65,7 @@ const De = [
65
65
  Read: "2023-09-17T12:00:15.500-07:00",
66
66
  Write: "2023-09-17T12:01:30.000-07:00"
67
67
  }
68
- ], Ee = [
68
+ ], Ge = [
69
69
  {
70
70
  type: "mg",
71
71
  resource: "Tenant Root Group",
@@ -140,16 +140,16 @@ const De = [
140
140
  resources: []
141
141
  }
142
142
  ], O = "workspaceIDs";
143
- function wt(a, t) {
143
+ function bt(a, t) {
144
144
  return a + t;
145
145
  }
146
- function Tt() {
146
+ function It() {
147
147
  return "hello NPM";
148
148
  }
149
149
  function F() {
150
- return "1.0.99";
150
+ return "1.0.101";
151
151
  }
152
- class y {
152
+ class m {
153
153
  constructor() {
154
154
  l(this, "result");
155
155
  l(this, "status");
@@ -174,6 +174,12 @@ const $ = class $ {
174
174
  static adminsEndpoint() {
175
175
  return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/admins`;
176
176
  }
177
+ static auditConfigEndpoint() {
178
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/audit-configuration`;
179
+ }
180
+ static auditEventsEndpoint() {
181
+ return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/audit-events`;
182
+ }
177
183
  static configConsentEndpoint() {
178
184
  return `https://${$.environmentTag}-configurationapi-westus.azurewebsites.net/api/v1/configuration/consent`;
179
185
  }
@@ -216,14 +222,14 @@ class p {
216
222
  // graph API predicates
217
223
  l(p, "graphGroupsPredicate", "v1.0/groups"), l(p, "graphMailPredicate", "v1.0/me/messages"), l(p, "graphMePredicate", "v1.0/me"), l(p, "graphOauth2PermissionGrantsPredicate", "v1.0/oauth2PermissionGrants"), l(p, "graphServicePrincipalsPredicate", "v1.0/servicePrincipals"), l(p, "graphUsersPredicate", "v1.0/users"), l(p, "graphTenantByDomainPredicate", "beta/tenantRelationships/findTenantInformationByDomainName"), l(p, "graphTenantByIdPredicate", "beta/tenantRelationships/findTenantInformationByTenantId"), // authority values are based on the well-known OIDC auth endpoints
218
224
  l(p, "authorityWW", "https://login.microsoftonline.com/"), l(p, "authorityWWRegex", /^(https:\/\/login\.microsoftonline\.com\/)([\dA-Fa-f]{8}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{12})\/oauth2\/authorize$/), l(p, "authorityUS", "https://login.microsoftonline.us/"), l(p, "authorityUSRegex", /^(https:\/\/login\.microsoftonline\.us\/)([\dA-Fa-f]{8}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{12})\/oauth2\/authorize$/), l(p, "authorityCN", "https://login.partner.microsoftonline.cn/"), l(p, "authorityCNRegex", /^(https:\/\/login\.partner\.microsoftonline\.cn\/)([\dA-Fa-f]{8}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{4}-[\dA-Fa-f]{12})\/oauth2\/authorize$/);
219
- class St {
225
+ class $t {
220
226
  constructor() {
221
227
  l(this, "id", "");
222
228
  l(this, "displayName", "");
223
229
  l(this, "description", "");
224
230
  }
225
231
  }
226
- class bt {
232
+ class At {
227
233
  constructor() {
228
234
  l(this, "group", "");
229
235
  l(this, "value", "");
@@ -231,11 +237,11 @@ class bt {
231
237
  l(this, "removable", !1);
232
238
  l(this, "expanded", "");
233
239
  }
234
- static compareByValue(t, s) {
235
- return t.value.localeCompare(s.value);
240
+ static compareByValue(t, r) {
241
+ return t.value.localeCompare(r.value);
236
242
  }
237
- static compareByGroup(t, s) {
238
- return t.group.localeCompare(s.group);
243
+ static compareByGroup(t, r) {
244
+ return t.group.localeCompare(r.group);
239
245
  }
240
246
  }
241
247
  class X {
@@ -271,7 +277,7 @@ class X {
271
277
  this.oid = "", this.name = "", this.mail = "", this.authority = "", this.tid = "", this.companyName = "", this.companyDomain = "", this.workspaceIDs = "", this.session = "Sign In", this.spacode = "", this.graphAccessToken = "", this.mindlineAccessToken = "", this.azureAccessToken = "", this.loginHint = "", this.scopes = new Array(), this.authTS = /* @__PURE__ */ new Date(0), this.sel = !1, this.loggingIn = !1;
272
278
  }
273
279
  }
274
- var Ne = /* @__PURE__ */ ((a) => (a[a.invalid = 0] = "invalid", a[a.aad = 1] = "aad", a[a.ad = 2] = "ad", a[a.googleworkspace = 3] = "googleworkspace", a))(Ne || {}), Ce = /* @__PURE__ */ ((a) => (a[a.read = 1] = "read", a[a.write = 2] = "write", a[a.notassigned = 3] = "notassigned", a))(Ce || {});
280
+ var Ce = /* @__PURE__ */ ((a) => (a[a.invalid = 0] = "invalid", a[a.aad = 1] = "aad", a[a.ad = 2] = "ad", a[a.googleworkspace = 3] = "googleworkspace", a))(Ce || {}), Ne = /* @__PURE__ */ ((a) => (a[a.read = 1] = "read", a[a.write = 2] = "write", a[a.notassigned = 3] = "notassigned", a))(Ne || {});
275
281
  class L {
276
282
  // are we validating by TID or by domain? "Domain" | "Tenant ID"
277
283
  constructor() {
@@ -302,7 +308,7 @@ function Oe(a, t) {
302
308
  return "";
303
309
  }
304
310
  }
305
- function C(a) {
311
+ function N(a) {
306
312
  switch (a) {
307
313
  case p.authorityWW:
308
314
  return "https://graph.microsoft.com/";
@@ -360,6 +366,20 @@ class Y {
360
366
  this.id = "", this.name = "", this.workspaceId = "", this.description = "", this.tenants = new Array(), this.isEnabled = !1, this.workspaceIDs = "", this.sel = !1;
361
367
  }
362
368
  }
369
+ class kt {
370
+ // selection state
371
+ constructor() {
372
+ l(this, "id");
373
+ l(this, "workspaceId");
374
+ l(this, "name");
375
+ l(this, "description");
376
+ l(this, "isEnabled");
377
+ l(this, "email");
378
+ l(this, "tenantId");
379
+ l(this, "sel");
380
+ this.id = "", this.name = "", this.workspaceId = "", this.description = "", this.isEnabled = !1, this.email = "", this.tenantId = "", this.sel = !1;
381
+ }
382
+ }
363
383
  class ee {
364
384
  // selection state
365
385
  constructor() {
@@ -390,7 +410,7 @@ function x() {
390
410
  }
391
411
  }
392
412
  var q, ye;
393
- class It {
413
+ class Dt {
394
414
  constructor(t = !1) {
395
415
  j(this, q);
396
416
  l(this, "version", F());
@@ -413,15 +433,15 @@ class It {
413
433
  if (t)
414
434
  localStorage.removeItem("InitInfo");
415
435
  else {
416
- E(this, q, ye).call(this, i);
436
+ G(this, q, ye).call(this, i);
417
437
  return;
418
438
  }
419
439
  }
420
440
  }
421
441
  this.tab = 0, this.version = F(), this.configlevelconsent_configid = "", this.configlevelconsent_access = 3;
422
- var s = JSON.stringify(De), r = JSON.stringify(Re), e = JSON.stringify(Pe), n = JSON.stringify(ve);
442
+ var r = JSON.stringify(De), s = JSON.stringify(ve), e = JSON.stringify(Pe), n = JSON.stringify(Re);
423
443
  try {
424
- this.us = W(X, s), this.ts = W(L, r), this.cs = W(Y, e), this.ws = W(ee, n), this.tagWithWorkspaces();
444
+ this.us = W(X, r), this.ts = W(L, s), this.cs = W(Y, e), this.ws = W(ee, n), this.tagWithWorkspaces();
425
445
  } catch {
426
446
  debugger;
427
447
  }
@@ -433,24 +453,24 @@ class It {
433
453
  tagWithWorkspaces() {
434
454
  this.us.map((t) => t.workspaceIDs = ""), this.ts.map((t) => t.workspaceIDs = ""), this.cs.map((t) => t.workspaceIDs = "");
435
455
  for (let t of this.ws) {
436
- for (let s of t.associatedUsers) {
437
- let r = this.us.find((e) => e.oid === s);
438
- if (r !== void 0)
439
- r[O] += t.id, r[O] += " ";
456
+ for (let r of t.associatedUsers) {
457
+ let s = this.us.find((e) => e.oid === r);
458
+ if (s !== void 0)
459
+ s[O] += t.id, s[O] += " ";
440
460
  else
441
461
  debugger;
442
462
  }
443
- for (let s of t.associatedTenants) {
444
- let r = this.ts.find((e) => e.tid === s);
445
- if (r !== void 0)
446
- r[O] += t.id, r[O] += " ";
463
+ for (let r of t.associatedTenants) {
464
+ let s = this.ts.find((e) => e.tid === r);
465
+ if (s !== void 0)
466
+ s[O] += t.id, s[O] += " ";
447
467
  else
448
468
  debugger;
449
469
  }
450
- for (let s of t.associatedConfigs) {
451
- let r = this.cs.find((e) => e.id === s);
452
- if (r !== void 0)
453
- r[O] += t.id, r[O] += " ";
470
+ for (let r of t.associatedConfigs) {
471
+ let s = this.cs.find((e) => e.id === r);
472
+ if (s !== void 0)
473
+ s[O] += t.id, s[O] += " ";
454
474
  else
455
475
  debugger;
456
476
  }
@@ -459,18 +479,18 @@ class It {
459
479
  }
460
480
  }
461
481
  q = new WeakSet(), ye = function(t) {
462
- this.tab = t.tab, this.version = F(), this.configlevelconsent_configid = t.configlevelconsent_configid, this.configlevelconsent_access = t.configlevelconsent_access, typeof t.us > "u" ? this.us = new Array() : this.us = t.us.map((s) => {
463
- let r = new X();
464
- return r.oid = s.oid, r.name = s.name, r.mail = s.mail, r.authority = s.authority, r.tid = s.tid, r.companyName = s.companyName, r.companyDomain = s.companyDomain, r.workspaceIDs = s.workspaceIDs, r.session = s.session, r.spacode = s.spacode, r.graphAccessToken = s.graphAccessToken, r.mindlineAccessToken = s.mindlineAccessToken, r.azureAccessToken = s.azureAccessToken, r.loginHint = s.loginHint, r.scopes = s.scopes, r.authTS = new Date(s.authTS), r.sel = s.sel, r.loggingIn = s.loggingIn, r;
465
- }), typeof t.ts > "u" ? this.ts = new Array() : this.ts = t.ts.map((s) => {
466
- let r = new L();
467
- return r.tid = s.tid, r.name = s.name, r.domain = s.domain, r.tenantType = s.tenantType, r.authority = s.authority, r.workspaceIDs = s.workspaceIDs, r.sel = s.sel, r.lookupfield = s.lookupfield, r;
468
- }), typeof t.cs > "u" ? this.cs = new Array() : this.cs = t.cs.map((s) => {
469
- let r = new Y();
470
- return r.id = s.id, r.workspaceId = s.workspaceId, r.name = s.name, r.description = s.description, r.tenants = s.tenants, r.isEnabled = s.isEnabled, r.workspaceIDs = s.workspaceIDs, r.sel = s.sel, r;
471
- }), typeof t.ws > "u" ? this.ws = new Array() : this.ws = t.ws.map((s) => {
472
- let r = new ee();
473
- return r.id = s.id, r.name = s.name, r.ownerid = s.ownerid, r.associatedUsers = s.associatedUsers, r.associatedTenants = s.associatedTenants, r.associatedConfigs = s.associatedConfigs, r.sel = s.sel, r;
482
+ this.tab = t.tab, this.version = F(), this.configlevelconsent_configid = t.configlevelconsent_configid, this.configlevelconsent_access = t.configlevelconsent_access, typeof t.us > "u" ? this.us = new Array() : this.us = t.us.map((r) => {
483
+ let s = new X();
484
+ return s.oid = r.oid, s.name = r.name, s.mail = r.mail, s.authority = r.authority, s.tid = r.tid, s.companyName = r.companyName, s.companyDomain = r.companyDomain, s.workspaceIDs = r.workspaceIDs, s.session = r.session, s.spacode = r.spacode, s.graphAccessToken = r.graphAccessToken, s.mindlineAccessToken = r.mindlineAccessToken, s.azureAccessToken = r.azureAccessToken, s.loginHint = r.loginHint, s.scopes = r.scopes, s.authTS = new Date(r.authTS), s.sel = r.sel, s.loggingIn = r.loggingIn, s;
485
+ }), typeof t.ts > "u" ? this.ts = new Array() : this.ts = t.ts.map((r) => {
486
+ let s = new L();
487
+ return s.tid = r.tid, s.name = r.name, s.domain = r.domain, s.tenantType = r.tenantType, s.authority = r.authority, s.workspaceIDs = r.workspaceIDs, s.sel = r.sel, s.lookupfield = r.lookupfield, s;
488
+ }), typeof t.cs > "u" ? this.cs = new Array() : this.cs = t.cs.map((r) => {
489
+ let s = new Y();
490
+ return s.id = r.id, s.workspaceId = r.workspaceId, s.name = r.name, s.description = r.description, s.tenants = r.tenants, s.isEnabled = r.isEnabled, s.workspaceIDs = r.workspaceIDs, s.sel = r.sel, s;
491
+ }), typeof t.ws > "u" ? this.ws = new Array() : this.ws = t.ws.map((r) => {
492
+ let s = new ee();
493
+ return s.id = r.id, s.name = r.name, s.ownerid = r.ownerid, s.associatedUsers = r.associatedUsers, s.associatedTenants = r.associatedTenants, s.associatedConfigs = r.associatedConfigs, s.sel = r.sel, s;
474
494
  });
475
495
  };
476
496
  const Be = [
@@ -526,59 +546,59 @@ const Be = [
526
546
  ]
527
547
  }
528
548
  ];
529
- var v, te, se, re;
530
- class At {
549
+ var R, te, se, re;
550
+ class vt {
531
551
  constructor(t) {
532
- j(this, v);
552
+ j(this, R);
533
553
  l(this, "tasks");
534
554
  this.tasks = [new Q()], this.init(t);
535
555
  }
536
556
  // get initial data from localStorage or file
537
557
  init(t) {
538
558
  if (console.log(`Calling TaskArray::init(bClearLocalStorage: ${t ? "true" : "false"})`), this.tasks.length = 0, t && x() && localStorage.removeItem("Tasks"), x()) {
539
- let s = localStorage.getItem("Tasks");
540
- if (s != null && typeof s == "string" && s !== "") {
541
- let e = JSON.parse(s);
542
- if (this.tasks = E(this, v, se).call(this, e.tasks), this.tasks.length !== 0) return;
559
+ let r = localStorage.getItem("Tasks");
560
+ if (r != null && typeof r == "string" && r !== "") {
561
+ let e = JSON.parse(r);
562
+ if (this.tasks = G(this, R, se).call(this, e.tasks), this.tasks.length !== 0) return;
543
563
  }
544
564
  }
545
- this.tasks = E(this, v, se).call(this, Be);
565
+ this.tasks = G(this, R, se).call(this, Be);
546
566
  }
547
567
  // set start time for a task
548
- setTaskStart(t, s) {
549
- let r = E(this, v, te).call(this, t);
550
- if (r != null && r != null)
551
- r.setStart(s), r.status = "in progress", E(this, v, re).call(this);
568
+ setTaskStart(t, r) {
569
+ let s = G(this, R, te).call(this, t);
570
+ if (s != null && s != null)
571
+ s.setStart(r), s.status = "in progress", G(this, R, re).call(this);
552
572
  else
553
573
  debugger;
554
574
  }
555
575
  // set end time for a task
556
- setTaskEnd(t, s, r) {
557
- let e = E(this, v, te).call(this, t);
576
+ setTaskEnd(t, r, s) {
577
+ let e = G(this, R, te).call(this, t);
558
578
  if (e != null && e != null)
559
- e.setEnd(s), e.status = r, E(this, v, re).call(this);
579
+ e.setEnd(r), e.status = s, G(this, R, re).call(this);
560
580
  else
561
581
  debugger;
562
582
  }
563
583
  }
564
- v = new WeakSet(), //
584
+ R = new WeakSet(), //
565
585
  // private
566
586
  //
567
587
  te = function(t) {
568
- let s = this.tasks.find((r) => r.task == t);
569
- if (s == null || s == null) {
570
- for (s of this.tasks)
571
- if (s.subtasks != null && s.subtasks != null && (s = s.subtasks.find((r) => r.task == t), s != null && s != null))
588
+ let r = this.tasks.find((s) => s.task == t);
589
+ if (r == null || r == null) {
590
+ for (r of this.tasks)
591
+ if (r.subtasks != null && r.subtasks != null && (r = r.subtasks.find((s) => s.task == t), r != null && r != null))
572
592
  break;
573
593
  }
574
- return s;
594
+ return r;
575
595
  }, se = function(t) {
576
- return t.map((s) => {
577
- let r = new Q();
578
- return r.id = s.id, r.task = s.task, r.setStart(new Date(s.start)), r.setEnd(new Date(s.end)), r.expected = s.expected, r.status = s.status, r.expanded = s.expanded, typeof s.subtasks < "u" && s.subtasks != null && (r.subtasks = s.subtasks.map((e) => {
596
+ return t.map((r) => {
597
+ let s = new Q();
598
+ return s.id = r.id, s.task = r.task, s.setStart(new Date(r.start)), s.setEnd(new Date(r.end)), s.expected = r.expected, s.status = r.status, s.expanded = r.expanded, typeof r.subtasks < "u" && r.subtasks != null && (s.subtasks = r.subtasks.map((e) => {
579
599
  let n = new Q();
580
600
  return n.id = e.id, n.task = e.task, n.setStart(new Date(e.start)), n.setEnd(new Date(e.end)), n.expected = e.expected, n.status = e.status, n.expanded = e.expanded, n;
581
- })), r;
601
+ })), s;
582
602
  });
583
603
  }, re = function() {
584
604
  let t = JSON.stringify(this);
@@ -600,10 +620,10 @@ class Q {
600
620
  }
601
621
  setEnd(t) {
602
622
  this.end = t, this.endDisplay = `${this.end.getMinutes().toString().padStart(2, "0")}:${this.end.getSeconds().toString().padStart(2, "0")}`;
603
- let s = 0, r = this.end.getSeconds() - this.start.getSeconds();
604
- r < 0 && (r += 60, s = -1);
605
- let e = this.end.getMinutes() - this.start.getMinutes() + s;
606
- e < 0 && (e += 60), this.elapsedDisplay = `${e.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
623
+ let r = 0, s = this.end.getSeconds() - this.start.getSeconds();
624
+ s < 0 && (s += 60, r = -1);
625
+ let e = this.end.getMinutes() - this.start.getMinutes() + r;
626
+ e < 0 && (e += 60), this.elapsedDisplay = `${e.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
607
627
  }
608
628
  setStart(t) {
609
629
  this.start = t, this.startDisplay = `${this.start.getMinutes().toString().padStart(2, "0")}:${this.start.getSeconds().toString().padStart(2, "0")}`;
@@ -646,19 +666,19 @@ class Ue {
646
666
  }
647
667
  init(t) {
648
668
  if (x()) {
649
- let s = localStorage.getItem("syncmilestones");
650
- if (s != null && typeof s == "string" && s !== "") {
651
- let e = JSON.parse(s);
669
+ let r = localStorage.getItem("syncmilestones");
670
+ if (r != null && typeof r == "string" && r !== "") {
671
+ let e = JSON.parse(r);
652
672
  if (e.length !== 0)
653
673
  if (t)
654
674
  localStorage.removeItem("syncmilestones");
655
675
  else {
656
- E(this, z, ne).call(this, e);
676
+ G(this, z, ne).call(this, e);
657
677
  return;
658
678
  }
659
679
  }
660
680
  }
661
- E(this, z, ne).call(this, Ge);
681
+ G(this, z, ne).call(this, Ee);
662
682
  }
663
683
  save() {
664
684
  let t = JSON.stringify(this.milestones);
@@ -670,8 +690,8 @@ class Ue {
670
690
  debugger;
671
691
  return;
672
692
  }
673
- let s = Number(this.milestones[0].Run), r = new B(s + 1);
674
- this.milestones.unshift(r), this.milestones = this.milestones.map((e) => {
693
+ let r = Number(this.milestones[0].Run), s = new B(r + 1);
694
+ this.milestones.unshift(s), this.milestones = this.milestones.map((e) => {
675
695
  let n = new B(e.Run);
676
696
  return n.Start = e.Start, n.startDisplay = e.startDisplay, n.POST = e.POST, n.postDisplay = e.postDisplay, n.Read = e.Read, n.readDisplay = e.readDisplay, n.Write = e.Write, n.writeDisplay = e.writeDisplay, n.Duration = e.Duration, n.durationDisplay = e.durationDisplay, n;
677
697
  }), t(this.milestones), console.log(`Start milestone: ${this.milestones[0].Run}:${this.milestones[0].Start}`);
@@ -681,11 +701,11 @@ class Ue {
681
701
  debugger;
682
702
  return;
683
703
  }
684
- let s = this.milestones.shift();
685
- this.milestones = this.milestones.map((r) => {
686
- let e = new B(r.Run);
687
- return e.Start = r.Start, e.startDisplay = r.startDisplay, e.POST = r.POST, e.postDisplay = r.postDisplay, e.Read = r.Read, e.readDisplay = r.readDisplay, e.Write = r.Write, e.writeDisplay = r.writeDisplay, e.Duration = r.Duration, e.durationDisplay = r.durationDisplay, e;
688
- }), t(this.milestones), console.log(`Unstart removed first milestone: ${s.Run}:${s.Start}`);
704
+ let r = this.milestones.shift();
705
+ this.milestones = this.milestones.map((s) => {
706
+ let e = new B(s.Run);
707
+ return e.Start = s.Start, e.startDisplay = s.startDisplay, e.POST = s.POST, e.postDisplay = s.postDisplay, e.Read = s.Read, e.readDisplay = s.readDisplay, e.Write = s.Write, e.writeDisplay = s.writeDisplay, e.Duration = s.Duration, e.durationDisplay = s.durationDisplay, e;
708
+ }), t(this.milestones), console.log(`Unstart removed first milestone: ${r.Run}:${r.Start}`);
689
709
  }
690
710
  post(t) {
691
711
  if (this.milestones == null || this.milestones.length < 1) {
@@ -707,23 +727,23 @@ class Ue {
707
727
  return;
708
728
  }
709
729
  for (this.milestones[0].write(""); this.milestones.length > 10; ) {
710
- let s = this.milestones.pop();
711
- console.log(`Removed milestone #${s.Run}: ${s.Start}`);
730
+ let r = this.milestones.pop();
731
+ console.log(`Removed milestone #${r.Run}: ${r.Start}`);
712
732
  }
713
- this.save(), this.milestones = this.milestones.map((s) => {
714
- let r = new B(s.Run);
715
- return r.Start = s.Start, r.startDisplay = s.startDisplay, r.POST = s.POST, r.postDisplay = s.postDisplay, r.Read = s.Read, r.readDisplay = s.readDisplay, r.Write = s.Write, r.writeDisplay = s.writeDisplay, r.Duration = s.Duration, r.durationDisplay = s.durationDisplay, r;
733
+ this.save(), this.milestones = this.milestones.map((r) => {
734
+ let s = new B(r.Run);
735
+ return s.Start = r.Start, s.startDisplay = r.startDisplay, s.POST = r.POST, s.postDisplay = r.postDisplay, s.Read = r.Read, s.readDisplay = r.readDisplay, s.Write = r.Write, s.writeDisplay = r.writeDisplay, s.Duration = r.Duration, s.durationDisplay = r.durationDisplay, s;
716
736
  }), t(this.milestones);
717
737
  }
718
738
  }
719
739
  z = new WeakSet(), ne = function(t) {
720
- t == null ? this.milestones = new Array() : this.milestones = t.map((s) => {
721
- let r = new B(Number(s.Run));
722
- return r.start(s.Start), r.post(s.POST), r.read(s.Read), r.write(s.Write), r;
740
+ t == null ? this.milestones = new Array() : this.milestones = t.map((r) => {
741
+ let s = new B(Number(r.Run));
742
+ return s.start(r.Start), s.post(r.POST), s.read(r.Read), s.write(r.Write), s;
723
743
  });
724
744
  };
725
- class $t {
726
- constructor(t, s, r) {
745
+ class Pt {
746
+ constructor(t, r, s) {
727
747
  l(this, "tenantNodes");
728
748
  l(this, "pb_startTS");
729
749
  l(this, "pb_progress");
@@ -733,15 +753,15 @@ class $t {
733
753
  l(this, "pb_total");
734
754
  l(this, "pb_timer");
735
755
  l(this, "milestoneArray");
736
- this.tenantNodes = new Array(), this.init(t, s, r), this.pb_startTS = 0, this.pb_progress = 0, this.pb_increment = 0, this.pb_timer = null, this.pb_idle = 0, this.pb_idleMax = 0, this.pb_total = 0, this.milestoneArray = new Ue(!1);
756
+ this.tenantNodes = new Array(), this.init(t, r, s), this.pb_startTS = 0, this.pb_progress = 0, this.pb_increment = 0, this.pb_timer = null, this.pb_idle = 0, this.pb_idleMax = 0, this.pb_total = 0, this.milestoneArray = new Ue(!1);
737
757
  }
738
758
  // populate tenantNodes based on config tenants
739
- init(t, s, r) {
759
+ init(t, r, s) {
740
760
  console.log(
741
- `Calling BatchArray::init(config: "${t ? t.name : "null"}", bClearLocalStorage: ${r ? "true" : "false"})`
742
- ), r && x() && (localStorage.removeItem(t.name), this.milestoneArray.init(r)), t != null && t.tenants != null && s != null && (this.tenantNodes.length = 0, t.tenants.map((e) => {
761
+ `Calling BatchArray::init(config: "${t ? t.name : "null"}", bClearLocalStorage: ${s ? "true" : "false"})`
762
+ ), s && x() && (localStorage.removeItem(t.name), this.milestoneArray.init(s)), t != null && t.tenants != null && r != null && (this.tenantNodes.length = 0, t.tenants.map((e) => {
743
763
  if (e.configurationTenantType === "source" || e.configurationTenantType === "sourcetarget") {
744
- let n = s.ts.find(
764
+ let n = r.ts.find(
745
765
  (o) => o.tid === e.tid
746
766
  );
747
767
  if (n != null) {
@@ -762,7 +782,7 @@ class $t {
762
782
  }), this.tenantNodes.map((e) => {
763
783
  t.tenants.map((n) => {
764
784
  if ((n.configurationTenantType === "target" || n.configurationTenantType === "sourcetarget") && n.tid !== e.tid) {
765
- let o = s.ts.find(
785
+ let o = r.ts.find(
766
786
  (d) => d.tid === n.tid
767
787
  );
768
788
  if (o != null) {
@@ -783,23 +803,23 @@ class $t {
783
803
  });
784
804
  }));
785
805
  }
786
- initializeProgressBar(t, s, r, e) {
806
+ initializeProgressBar(t, r, s, e) {
787
807
  this.pb_startTS = Date.now(), this.pb_progress = 0, this.pb_increment = 0.25, this.pb_idle = 0, this.pb_idleMax = 0, this.pb_total = 0, this.pb_timer = setInterval(() => {
788
- this.milestoneArray.milestones[0].Write != null ? (clearInterval(this.pb_timer), this.pb_timer = null, this.pb_progress = 100, t(this.pb_progress), r(`Complete. [max idle: ${this.pb_idleMax}]`)) : (this.pb_total = this.pb_total + 1, this.pb_idle = this.pb_idle + 1, this.pb_idleMax = Math.max(this.pb_idle, this.pb_idleMax), r(`${this.pb_total} seconds elapsed. Last update ${this.pb_idle} seconds ago. [max idle: ${this.pb_idleMax}/60]`), this.pb_idle >= 60 && this.milestoneArray.milestones[0].Write == null && s(`sync continuing, but no update for ${this.pb_idle} seconds`), this.pb_progress < 100 && (this.pb_progress = Math.min(100, this.pb_progress + this.pb_increment), t(this.pb_progress)));
808
+ this.milestoneArray.milestones[0].Write != null ? (clearInterval(this.pb_timer), this.pb_timer = null, this.pb_progress = 100, t(this.pb_progress), s(`Complete. [max idle: ${this.pb_idleMax}]`)) : (this.pb_total = this.pb_total + 1, this.pb_idle = this.pb_idle + 1, this.pb_idleMax = Math.max(this.pb_idle, this.pb_idleMax), s(`${this.pb_total} seconds elapsed. Last update ${this.pb_idle} seconds ago. [max idle: ${this.pb_idleMax}/60]`), this.pb_idle >= 60 && this.milestoneArray.milestones[0].Write == null && r(`sync continuing, but no update for ${this.pb_idle} seconds`), this.pb_progress < 100 && (this.pb_progress = Math.min(100, this.pb_progress + this.pb_increment), t(this.pb_progress)));
789
809
  }, 1e3), this.milestoneArray.start(e);
790
810
  }
791
- uninitializeProgressBar(t, s, r, e) {
792
- this.pb_startTS = 0, this.pb_progress = 0, t(this.pb_progress), s("sync failed to execute"), this.pb_increment = 0, clearInterval(this.pb_timer), this.pb_timer = null, this.pb_idle = 0, this.pb_idleMax = 0, r(`No updates seen for ${this.pb_idle} seconds. [max idle: ${this.pb_idleMax}]`), this.milestoneArray.unstart(e);
811
+ uninitializeProgressBar(t, r, s, e) {
812
+ this.pb_startTS = 0, this.pb_progress = 0, t(this.pb_progress), r("sync failed to execute"), this.pb_increment = 0, clearInterval(this.pb_timer), this.pb_timer = null, this.pb_idle = 0, this.pb_idleMax = 0, s(`No updates seen for ${this.pb_idle} seconds. [max idle: ${this.pb_idleMax}]`), this.milestoneArray.unstart(e);
793
813
  }
794
- initializeSignalR(t, s, r, e, n, o, d, i, c, u, f) {
795
- this.milestoneArray.post(c), u("started sync, waiting for updates..."), this.init(t, s, !1);
814
+ initializeSignalR(t, r, s, e, n, o, d, i, c, u, f) {
815
+ this.milestoneArray.post(c), u("started sync, waiting for updates..."), this.init(t, r, !1);
796
816
  let b = (I) => {
797
817
  console.log(I);
798
- let R = JSON.parse(I);
818
+ let v = JSON.parse(I);
799
819
  this.pb_idle = 0;
800
- let D = r.find((g) => g.BatchId == R.TargetID);
820
+ let D = s.find((g) => g.BatchId == v.TargetID);
801
821
  if (D == null) {
802
- console.log(`Batch ${R.TargetID} not found in batchIdArray.`);
822
+ console.log(`Batch ${v.TargetID} not found in batchIdArray.`);
803
823
  debugger;
804
824
  return;
805
825
  }
@@ -810,24 +830,24 @@ class $t {
810
830
  return;
811
831
  }
812
832
  h.batchId = D.BatchId;
813
- let A = R.Stats, m = Object.keys(A), P = Object.values(A), oe = !1, ie = !1;
814
- for (let g = 0; g < m.length; g++) {
815
- let G = m[g].endsWith("TotalCount"), M = m[g].endsWith("CurrentCount"), _ = m[g].endsWith("DeferredCount"), V = m[g].endsWith("RescheduledCount");
816
- if (m[g].startsWith("Reader")) {
817
- let N = /Reader\/TID:(.+)\/TotalCount/;
818
- if (M && (N = /Reader\/TID:(.+)\/CurrentCount/), _ && (N = /Reader\/TID:(.+)\/DeferredCount/), V && (N = /Reader\/TID:(.+)\/RescheduledCount/), m[g].match(N) == null) {
819
- console.log(`tid not found in ${m[g]}.`);
833
+ let k = v.Stats, y = Object.keys(k), P = Object.values(k), oe = !1, ie = !1;
834
+ for (let g = 0; g < y.length; g++) {
835
+ let E = y[g].endsWith("TotalCount"), M = y[g].endsWith("CurrentCount"), _ = y[g].endsWith("DeferredCount"), V = y[g].endsWith("RescheduledCount");
836
+ if (y[g].startsWith("Reader")) {
837
+ let C = /Reader\/TID:(.+)\/TotalCount/;
838
+ if (M && (C = /Reader\/TID:(.+)\/CurrentCount/), _ && (C = /Reader\/TID:(.+)\/DeferredCount/), V && (C = /Reader\/TID:(.+)\/RescheduledCount/), y[g].match(C) == null) {
839
+ console.log(`tid not found in ${y[g]}.`);
820
840
  debugger;
821
841
  return;
822
842
  }
823
- G ? (oe = Number(P[g]) == 0, h.total = Math.max(Number(P[g]), h.total), console.log(`----- ${h.name} TID: ${h.tid} batchId: ${h.batchId}`), console.log(`----- ${h.name} Total To Read: ${h.total}`)) : (ie = Number(P[g]) == 0, h.read = Math.max(Number(P[g]), h.read), console.log(`----- ${h.name} Currently Read: ${h.read}`));
843
+ E ? (oe = Number(P[g]) == 0, h.total = Math.max(Number(P[g]), h.total), console.log(`----- ${h.name} TID: ${h.tid} batchId: ${h.batchId}`), console.log(`----- ${h.name} Total To Read: ${h.total}`)) : (ie = Number(P[g]) == 0, h.read = Math.max(Number(P[g]), h.read), console.log(`----- ${h.name} Currently Read: ${h.read}`));
824
844
  }
825
- if (h.nothingtosync = oe && ie, m[g].startsWith("Writer")) {
826
- let N = /Writer\/TID:(.+)\/TotalCount/;
827
- M && (N = /Writer\/TID:(.+)\/CurrentCount/), _ && (N = /Writer\/TID:(.+)\/DeferredCount/), V && (N = /Writer\/TID:(.+)\/RescheduledCount/);
828
- let Z = m[g].match(N);
845
+ if (h.nothingtosync = oe && ie, y[g].startsWith("Writer")) {
846
+ let C = /Writer\/TID:(.+)\/TotalCount/;
847
+ M && (C = /Writer\/TID:(.+)\/CurrentCount/), _ && (C = /Writer\/TID:(.+)\/DeferredCount/), V && (C = /Writer\/TID:(.+)\/RescheduledCount/);
848
+ let Z = y[g].match(C);
829
849
  if (Z == null) {
830
- console.log(`tid not found in ${m[g]}.`);
850
+ console.log(`tid not found in ${y[g]}.`);
831
851
  debugger;
832
852
  return;
833
853
  }
@@ -837,7 +857,7 @@ class $t {
837
857
  debugger;
838
858
  return;
839
859
  }
840
- if (w.batchId = D.BatchId, G)
860
+ if (w.batchId = D.BatchId, E)
841
861
  w.total = Math.max(Number(P[g]), w.total), console.log(`----- ${w.name} TID: ${w.tid} batchId: ${w.batchId}`), console.log(`----- ${w.name} Total To Write: ${w.total}`);
842
862
  else if (M)
843
863
  w.written = Math.max(Number(P[g]), w.written), console.log(`----- ${w.name} Total Written: ${w.written}`);
@@ -854,8 +874,8 @@ class $t {
854
874
  h.update(h.total, h.read, h.written, h.deferred);
855
875
  let le = !0, ce = !0, de = !1, ue = !0, K = 0, pe = 0, fe = 0, he = 0;
856
876
  if (this.tenantNodes.map((g) => {
857
- g.targets.map((G) => {
858
- ce && (ce = G.status == "complete" || G.status == "failed"), de || (de = G.total > 0 || G.status != "not started"), fe += Math.max(G.total, g.total), he += G.written;
877
+ g.targets.map((E) => {
878
+ ce && (ce = E.status == "complete" || E.status == "failed"), de || (de = E.total > 0 || E.status != "not started"), fe += Math.max(E.total, g.total), he += E.written;
859
879
  }), ue && (ue = g.nothingtosync), le && (le = g.status == "complete" || g.status == "failed"), K += g.total, pe += g.read;
860
880
  }), n(K), o(pe), d(Math.max(fe, K)), i(he), ue)
861
881
  this.milestoneArray.write(c), u("nothing to sync"), console.log('Setting config sync result: "nothing to sync"');
@@ -868,32 +888,32 @@ class $t {
868
888
  ce ? (this.milestoneArray.write(c), u("sync complete"), console.log('Setting config sync result: "complete"')) : de ? (u("writing in progress"), console.log('Setting config sync result: "writing in progress"')) : this.milestoneArray.milestones[0].Read == null && (u("reading in progress"), console.log('Setting config sync result: "reading in progress"'));
869
889
  }
870
890
  };
871
- r.map((I) => {
872
- const R = T.signalREndpoint();
873
- let D = new URL(R);
891
+ s.map((I) => {
892
+ const v = T.signalREndpoint();
893
+ let D = new URL(v);
874
894
  D.searchParams.append("statsId", I.BatchId), console.log(`Creating SignalR Hub for TID: ${I.SourceId} ${D.href}`);
875
895
  const h = new H.HubConnectionBuilder().withUrl(D.href).withAutomaticReconnect().configureLogging(H.LogLevel.Information).build();
876
- h.on("newMessage", b), h.onreconnecting((A) => {
877
- console.assert(h.state === H.HubConnectionState.Reconnecting), console.log(`Connection lost due to error "${A}". Reconnecting.`);
878
- }), h.onreconnected((A) => {
879
- console.assert(h.state === H.HubConnectionState.Connected), console.log(`Connection reestablished. Connected with connectionId "${A}".`);
896
+ h.on("newMessage", b), h.onreconnecting((k) => {
897
+ console.assert(h.state === H.HubConnectionState.Reconnecting), console.log(`Connection lost due to error "${k}". Reconnecting.`);
898
+ }), h.onreconnected((k) => {
899
+ console.assert(h.state === H.HubConnectionState.Connected), console.log(`Connection reestablished. Connected with connectionId "${k}".`);
880
900
  }), h.onclose(async () => {
881
901
  console.log("Connection closing. Attempting restart."), await h.start();
882
902
  }), h.start().catch(console.error);
883
903
  });
884
904
  }
885
905
  // start a sync cycle
886
- async startSync(t, s, r) {
887
- let e = new y();
906
+ async startSync(t, r, s) {
907
+ let e = new m();
888
908
  if (this.tenantNodes == null || this.tenantNodes.length == 0) {
889
909
  debugger;
890
910
  return e.result = !1, e.error = "startSync: invalid parameters", e.status = 500, e;
891
911
  }
892
- return e = await gt(t, s, r), e;
912
+ return e = await wt(t, r, s), e;
893
913
  }
894
914
  }
895
915
  class me {
896
- constructor(t, s, r) {
916
+ constructor(t, r, s) {
897
917
  l(this, "expanded");
898
918
  l(this, "status", "");
899
919
  l(this, "name");
@@ -905,41 +925,41 @@ class me {
905
925
  l(this, "deferred", 0);
906
926
  l(this, "nothingtosync");
907
927
  l(this, "targets");
908
- this.expanded = !1, this.name = s, this.tid = t, this.batchId = r, this.nothingtosync = !1, this.targets = new Array(), this.update(0, 0, 0, 0);
928
+ this.expanded = !1, this.name = r, this.tid = t, this.batchId = s, this.nothingtosync = !1, this.targets = new Array(), this.update(0, 0, 0, 0);
909
929
  }
910
- update(t, s, r, e) {
911
- this.total = t, this.read = s, this.written = r, this.deferred = e, this.read === 0 && this.written === 0 && (this.status = "not started"), this.read > 0 ? this.read < this.total ? this.status = "in progress" : this.read === this.total && (this.status = "complete") : this.written > 0 && (this.written + this.deferred < this.total ? this.status = "in progress" : this.written === this.total ? this.status = "complete" : this.written + this.deferred >= this.total && (this.status = "failed"));
930
+ update(t, r, s, e) {
931
+ this.total = t, this.read = r, this.written = s, this.deferred = e, this.read === 0 && this.written === 0 && (this.status = "not started"), this.read > 0 ? this.read < this.total ? this.status = "in progress" : this.read === this.total && (this.status = "complete") : this.written > 0 && (this.written + this.deferred < this.total ? this.status = "in progress" : this.written === this.total ? this.status = "complete" : this.written + this.deferred >= this.total && (this.status = "failed"));
912
932
  }
913
933
  }
914
934
  class we {
915
- constructor(t, s) {
935
+ constructor(t, r) {
916
936
  l(this, "resourceNodes");
917
- this.resourceNodes = new Array(), t && this.init(s);
937
+ this.resourceNodes = new Array(), t && this.init(r);
918
938
  }
919
939
  // get resource data from localStorage or file
920
940
  init(t) {
921
941
  if (console.log(`Calling ResourceArray::init(bClearLocalStorage: ${t ? "true" : "false"})`), x()) {
922
- let r = localStorage.getItem("ResourceArray");
923
- if (r != null && typeof r == "string" && r !== "")
942
+ let s = localStorage.getItem("ResourceArray");
943
+ if (s != null && typeof s == "string" && s !== "")
924
944
  if (t)
925
945
  localStorage.removeItem("ResourceArray");
926
946
  else {
927
- let n = JSON.parse(r);
947
+ let n = JSON.parse(s);
928
948
  this.resourceNodes = n.resourceNodes;
929
949
  return;
930
950
  }
931
951
  }
932
- var s = JSON.stringify(Ee);
952
+ var r = JSON.stringify(Ge);
933
953
  try {
934
- this.resourceNodes = W(Le, s);
954
+ this.resourceNodes = W(Le, r);
935
955
  } catch {
936
956
  debugger;
937
957
  }
938
958
  }
939
959
  // read
940
- async read(t, s) {
941
- let r = new we(!1, !1);
942
- return r.resourceNodes = await Xe(t, s), r;
960
+ async read(t, r) {
961
+ let s = new we(!1, !1);
962
+ return s.resourceNodes = await Xe(t, r), s;
943
963
  }
944
964
  // save resource data to localstorage
945
965
  save() {
@@ -950,16 +970,16 @@ class we {
950
970
  }
951
971
  }
952
972
  class Le {
953
- constructor(t, s, r) {
973
+ constructor(t, r, s) {
954
974
  l(this, "type");
955
975
  l(this, "resource");
956
976
  l(this, "cost");
957
977
  l(this, "expanded");
958
978
  l(this, "resources");
959
- this.type = t, this.resource = s, this.cost = r, this.expanded = !1, this.resources = new Array();
979
+ this.type = t, this.resource = r, this.cost = s, this.expanded = !1, this.resources = new Array();
960
980
  }
961
981
  }
962
- class kt {
982
+ class Rt {
963
983
  constructor(t) {
964
984
  l(this, "actorNodes");
965
985
  this.actorNodes = new Array(), this.init(t);
@@ -967,26 +987,26 @@ class kt {
967
987
  // get initial data from localStorage or file
968
988
  init(t) {
969
989
  if (console.log(`Calling ResourceArray::init(bClearLocalStorage: ${t ? "true" : "false"})`), x()) {
970
- let r = localStorage.getItem("RBACActors");
971
- if (r != null && typeof r == "string" && r !== "")
990
+ let s = localStorage.getItem("RBACActors");
991
+ if (s != null && typeof s == "string" && s !== "")
972
992
  if (t)
973
993
  localStorage.removeItem("RBACActors");
974
994
  else {
975
- let n = JSON.parse(r);
995
+ let n = JSON.parse(s);
976
996
  this.actorNodes = n.actorNodes;
977
997
  return;
978
998
  }
979
999
  }
980
- var s = JSON.stringify(xe);
1000
+ var r = JSON.stringify(xe);
981
1001
  try {
982
- this.actorNodes = W(ze, s);
1002
+ this.actorNodes = W(ze, r);
983
1003
  } catch {
984
1004
  debugger;
985
1005
  }
986
1006
  }
987
1007
  }
988
1008
  class ze {
989
- constructor(t, s, r, e, n, o) {
1009
+ constructor(t, r, s, e, n, o) {
990
1010
  l(this, "type");
991
1011
  l(this, "actor");
992
1012
  l(this, "resource");
@@ -994,16 +1014,16 @@ class ze {
994
1014
  l(this, "updatedby");
995
1015
  l(this, "updatedon");
996
1016
  l(this, "actors");
997
- this.type = t, this.actor = s, this.resource = r, this.role = e, this.updatedby = n, this.updatedon = o, this.actors = new Array();
1017
+ this.type = t, this.actor = r, this.resource = s, this.role = e, this.updatedby = n, this.updatedon = o, this.actors = new Array();
998
1018
  }
999
1019
  }
1000
1020
  function Me(a) {
1001
1021
  return "Group.Read.All User.Read.All openid profile offline_access User.Read Contacts.Read CrossTenantInformation.ReadBasic.All";
1002
1022
  }
1003
1023
  async function J(a, t) {
1004
- const s = new Headers();
1005
- s.append("Content-Type", "application/json"), s.append("accept", "*/*");
1006
- const r = Me();
1024
+ const r = new Headers();
1025
+ r.append("Content-Type", "application/json"), r.append("accept", "*/*");
1026
+ const s = Me();
1007
1027
  if (t.graphAccessToken == null || t.graphAccessToken === "")
1008
1028
  try {
1009
1029
  let e = await a.acquireTokenByCode({
@@ -1019,7 +1039,7 @@ async function J(a, t) {
1019
1039
  for (let i = 0; i < e.length; i++)
1020
1040
  e[i].homeAccountId == n && (o = e[i]);
1021
1041
  let d = await a.acquireTokenSilent({
1022
- scopes: [r],
1042
+ scopes: [s],
1023
1043
  account: o
1024
1044
  });
1025
1045
  t.graphAccessToken = d.accessToken, console.log("Front end token graph acquired silently: " + t.graphAccessToken.slice(0, 20));
@@ -1030,32 +1050,32 @@ async function J(a, t) {
1030
1050
  for (let i = 0; i < n.length; i++)
1031
1051
  n[i].homeAccountId == o && (d = n[i]);
1032
1052
  a.acquireTokenRedirect({
1033
- scopes: [r],
1053
+ scopes: [s],
1034
1054
  account: d
1035
1055
  });
1036
1056
  } catch (n) {
1037
1057
  console.log("Front end graph token redirect acquisition failure: " + n);
1038
1058
  }
1039
1059
  }
1040
- return s.append("Authorization", `Bearer ${t.graphAccessToken}`), s;
1060
+ return r.append("Authorization", `Bearer ${t.graphAccessToken}`), r;
1041
1061
  }
1042
- async function Dt(a, t, s) {
1062
+ async function Et(a, t, r) {
1043
1063
  if (t == null || t.spacode == "")
1044
1064
  return { groups: [], error: "500: invalid user passed to groupsGet" };
1045
1065
  let e = { method: "GET", headers: await J(a, t) };
1046
1066
  try {
1047
- let n = C(t.authority) + p.graphGroupsPredicate;
1048
- n += `/?$filter=startsWith(displayName, '${s}')`;
1067
+ let n = N(t.authority) + p.graphGroupsPredicate;
1068
+ n += `/?$filter=startsWith(displayName, '${r}')`;
1049
1069
  let d = await (await fetch(n, e)).json();
1050
1070
  return typeof d.error < "u" ? { groups: [], error: `${d.error.code}: ${d.error.message}` } : { groups: d.value, error: "" };
1051
1071
  } catch (n) {
1052
1072
  return console.log(n), { groups: [], error: `Exception: ${n}` };
1053
1073
  }
1054
1074
  }
1055
- async function je(a, t, s, r) {
1075
+ async function je(a, t, r, s) {
1056
1076
  try {
1057
- let e = C(t.authority) + p.graphOauth2PermissionGrantsPredicate, n = new URL(e);
1058
- n.searchParams.append("$filter", `resourceId eq '${s}' and consentType eq 'Principal' and principalId eq '${r}'`);
1077
+ let e = N(t.authority) + p.graphOauth2PermissionGrantsPredicate, n = new URL(e);
1078
+ n.searchParams.append("$filter", `resourceId eq '${r}' and consentType eq 'Principal' and principalId eq '${s}'`);
1059
1079
  let d = await (await fetch(n.href, a)).json();
1060
1080
  if (typeof d.error < "u")
1061
1081
  return { grants: null, id: null, error: `${d.error.code}: ${d.error.message}` };
@@ -1068,13 +1088,13 @@ async function je(a, t, s, r) {
1068
1088
  return console.log(e), { grants: null, id: null, error: `Exception: ${e}` };
1069
1089
  }
1070
1090
  }
1071
- async function He(a, t, s, r) {
1091
+ async function He(a, t, r, s) {
1072
1092
  if (t == null || t.spacode == "")
1073
1093
  return !1;
1074
1094
  try {
1075
- let e = C(t.authority);
1076
- e += p.graphOauth2PermissionGrantsPredicate + `/${s}`;
1077
- let n = `{ "scope": "${r}" }`, d = { method: "PATCH", headers: await J(a, t), body: n }, i = await fetch(e, d), c = await i.json();
1095
+ let e = N(t.authority);
1096
+ e += p.graphOauth2PermissionGrantsPredicate + `/${r}`;
1097
+ let n = `{ "scope": "${s}" }`, d = { method: "PATCH", headers: await J(a, t), body: n }, i = await fetch(e, d), c = await i.json();
1078
1098
  if (i.status == 204 && i.statusText == "No Content")
1079
1099
  return !0;
1080
1100
  debugger;
@@ -1084,25 +1104,25 @@ async function He(a, t, s, r) {
1084
1104
  return console.log(e), !1;
1085
1105
  }
1086
1106
  }
1087
- function Rt(a, t) {
1088
- let s = We(a.authority);
1089
- s += a.tid, s += "/adminconsent";
1090
- let r = new URL(s), e = Oe(a.authority, t);
1091
- r.searchParams.append("client_id", e), r.searchParams.append("redirect_uri", window.location.origin), r.searchParams.append("domain_hint", a.companyDomain), r.searchParams.append("login_hint", a.mail), window.location.assign(r.href);
1107
+ function Gt(a, t) {
1108
+ let r = We(a.authority);
1109
+ r += a.tid, r += "/adminconsent";
1110
+ let s = new URL(r), e = Oe(a.authority, t);
1111
+ s.searchParams.append("client_id", e), s.searchParams.append("redirect_uri", window.location.origin), s.searchParams.append("domain_hint", a.companyDomain), s.searchParams.append("login_hint", a.mail), window.location.assign(s.href);
1092
1112
  }
1093
- async function qe(a, t, s) {
1113
+ async function qe(a, t, r) {
1094
1114
  try {
1095
- let r = C(t.authority);
1096
- r += p.graphServicePrincipalsPredicate, r += `(appId='${s}')`;
1097
- let e = new URL(r);
1115
+ let s = N(t.authority);
1116
+ s += p.graphServicePrincipalsPredicate, s += `(appId='${r}')`;
1117
+ let e = new URL(s);
1098
1118
  e.searchParams.append("$select", "id,appId,displayName");
1099
1119
  let o = await (await fetch(e.href, a)).json();
1100
1120
  return typeof o.error < "u" ? { spid: "", error: `${o.error.code}: ${o.error.message}` } : { spid: o.id, error: "" };
1101
- } catch (r) {
1102
- return console.log(r), { spid: "", error: `Exception: ${r}` };
1121
+ } catch (s) {
1122
+ return console.log(s), { spid: "", error: `Exception: ${s}` };
1103
1123
  }
1104
1124
  }
1105
- async function Pt(a, t) {
1125
+ async function xt(a, t) {
1106
1126
  if (a.authority == "") {
1107
1127
  let e = new L();
1108
1128
  if (e.domain = a.tid, await Te(e, !1))
@@ -1112,57 +1132,57 @@ async function Pt(a, t) {
1112
1132
  return !1;
1113
1133
  }
1114
1134
  }
1115
- let s = window.location.href;
1135
+ let r = window.location.href;
1116
1136
  switch (a.authority) {
1117
1137
  case p.authorityWW:
1118
- s += "MicrosoftIdentity/Account/SignIn";
1138
+ r += "MicrosoftIdentity/Account/SignIn";
1119
1139
  break;
1120
1140
  case p.authorityUS:
1121
- s += "USGov/SignIn";
1141
+ r += "USGov/SignIn";
1122
1142
  break;
1123
1143
  case p.authorityCN:
1124
- s += "China/SignIn";
1144
+ r += "China/SignIn";
1125
1145
  break;
1126
1146
  default:
1127
1147
  return !1;
1128
1148
  }
1129
- let r = new URL(s);
1130
- if (r.searchParams.append("redirectUri", window.location.origin), a.oid !== "1") {
1131
- r.searchParams.append("loginHint", a.mail);
1149
+ let s = new URL(r);
1150
+ if (s.searchParams.append("redirectUri", window.location.origin), a.oid !== "1") {
1151
+ s.searchParams.append("loginHint", a.mail);
1132
1152
  const e = /@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$/, n = a.mail.match(e);
1133
1153
  let o = n ? n[1] : "organizations";
1134
- r.searchParams.append("domainHint", o);
1154
+ s.searchParams.append("domainHint", o);
1135
1155
  } else
1136
- r.searchParams.append("domainHint", "organizations");
1137
- return t.setTaskStart("initialization", /* @__PURE__ */ new Date()), t.setTaskStart("authenticate user", /* @__PURE__ */ new Date()), window.location.assign(r.href), !0;
1156
+ s.searchParams.append("domainHint", "organizations");
1157
+ return t.setTaskStart("initialization", /* @__PURE__ */ new Date()), t.setTaskStart("authenticate user", /* @__PURE__ */ new Date()), window.location.assign(s.href), !0;
1138
1158
  }
1139
- function vt(a, t) {
1159
+ function Ct(a, t) {
1140
1160
  debugger;
1141
1161
  if (a.oid == "1") return;
1142
- let s = window.location.href;
1162
+ let r = window.location.href;
1143
1163
  switch (a.authority) {
1144
1164
  case p.authorityWW:
1145
- s += "MicrosoftIdentity/Account/Challenge";
1165
+ r += "MicrosoftIdentity/Account/Challenge";
1146
1166
  break;
1147
1167
  case p.authorityUS:
1148
- s += "USGov/Challenge";
1168
+ r += "USGov/Challenge";
1149
1169
  break;
1150
1170
  case p.authorityCN:
1151
- s += "China/Challenge";
1171
+ r += "China/Challenge";
1152
1172
  break;
1153
1173
  default:
1154
1174
  return;
1155
1175
  }
1156
- let r = new URL(s);
1157
- r.searchParams.append("redirectUri", window.location.origin), r.searchParams.append("scope", t), r.searchParams.append("domainHint", "organizations"), r.searchParams.append("loginHint", a.mail), window.location.assign(r.href);
1176
+ let s = new URL(r);
1177
+ s.searchParams.append("redirectUri", window.location.origin), s.searchParams.append("scope", t), s.searchParams.append("domainHint", "organizations"), s.searchParams.append("loginHint", a.mail), window.location.assign(s.href);
1158
1178
  }
1159
- async function Gt(a) {
1179
+ async function Nt(a) {
1160
1180
  if (a.oid == "1") return !1;
1161
1181
  let t = window.location.href;
1162
1182
  t += "user";
1163
- let s = new URL(t);
1164
- s.searchParams.append("oid", a.oid), s.searchParams.append("tid", a.tid), s.searchParams.append("loginHint", a.loginHint), s.searchParams.append("verb", "LOGOUT");
1165
- let r = { method: "PATCH" }, e = await fetch(s.href, r);
1183
+ let r = new URL(t);
1184
+ r.searchParams.append("oid", a.oid), r.searchParams.append("tid", a.tid), r.searchParams.append("loginHint", a.loginHint), r.searchParams.append("verb", "LOGOUT");
1185
+ let s = { method: "PATCH" }, e = await fetch(r.href, s);
1166
1186
  if (e.status == 200 && e.statusText == "OK")
1167
1187
  console.log(`Successfully set admin ${a.mail} logout_hint`);
1168
1188
  else
@@ -1181,15 +1201,15 @@ async function Gt(a) {
1181
1201
  default:
1182
1202
  return !1;
1183
1203
  }
1184
- return s = new URL(n), s.searchParams.append("redirectUri", window.location.origin), window.location.assign(s.href), !0;
1204
+ return r = new URL(n), r.searchParams.append("redirectUri", window.location.origin), window.location.assign(r.href), !0;
1185
1205
  }
1186
- async function Et(a, t, s, r) {
1187
- if (r) debugger;
1206
+ async function Ot(a, t, r, s) {
1207
+ if (s) debugger;
1188
1208
  if (t.name != null && t.name !== "") return !1;
1189
1209
  if (a.graphAccessToken != null && a.graphAccessToken === "") {
1190
1210
  console.log(`tenantRelationshipsGetByDomain called with invalid logged in user: ${a.name}`);
1191
1211
  try {
1192
- let i = await s.acquireTokenByCode({ code: a.spacode, scopes: ["user.read", "contacts.read", "CrossTenantInformation.ReadBasic.All"] });
1212
+ let i = await r.acquireTokenByCode({ code: a.spacode, scopes: ["user.read", "contacts.read", "CrossTenantInformation.ReadBasic.All"] });
1193
1213
  a.graphAccessToken = i.accessToken, console.log("tenantRelationshipsGetByDomain: Front end token acquired: " + a.graphAccessToken.slice(0, 20));
1194
1214
  } catch (i) {
1195
1215
  return console.log("tenantRelationshipsGetByDomain: Front end token failure: " + i), !1;
@@ -1199,7 +1219,7 @@ async function Et(a, t, s, r) {
1199
1219
  e.append("Authorization", n);
1200
1220
  let o = { method: "GET", headers: e };
1201
1221
  try {
1202
- var d = C(t.authority) + p.graphTenantByDomainPredicate;
1222
+ var d = N(t.authority) + p.graphTenantByDomainPredicate;
1203
1223
  d += "(domainName='", d += t.domain, d += "')", console.log("tenantRelationshipsGetByDomain: Attempting GET from /findTenantInformationByDomainName:", d);
1204
1224
  let i = await fetch(d, o);
1205
1225
  if (i.status == 200) {
@@ -1218,11 +1238,11 @@ async function Et(a, t, s, r) {
1218
1238
  }
1219
1239
  return !1;
1220
1240
  }
1221
- async function Je(a, t, s, r, e) {
1241
+ async function Je(a, t, r, s, e) {
1222
1242
  if (console.log("**** tenantRelationshipsGetById"), e) debugger;
1223
1243
  if (a.graphAccessToken === "")
1224
1244
  try {
1225
- let c = await r.acquireTokenByCode({ code: a.spacode, scopes: ["user.read", "contacts.read", "CrossTenantInformation.ReadBasic.All"] });
1245
+ let c = await s.acquireTokenByCode({ code: a.spacode, scopes: ["user.read", "contacts.read", "CrossTenantInformation.ReadBasic.All"] });
1226
1246
  a.graphAccessToken = c.accessToken, console.log("tenantRelationshipsGetById: Front end token acquired: " + a.graphAccessToken.slice(0, 20));
1227
1247
  } catch (c) {
1228
1248
  return console.log("tenantRelationshipsGetById: Front end token failure: " + c), !1;
@@ -1231,7 +1251,7 @@ async function Je(a, t, s, r, e) {
1231
1251
  n.append("Authorization", o);
1232
1252
  let d = { method: "GET", headers: n };
1233
1253
  try {
1234
- var i = C(a.authority) + p.graphTenantByIdPredicate;
1254
+ var i = N(a.authority) + p.graphTenantByIdPredicate;
1235
1255
  i += "(tenantId='", i += t.tid, i += "')", console.log("tenantRelationshipsGetById: Attempting GET from /findTenantInformationByTenantId:", i);
1236
1256
  let u = await (await fetch(i, d)).json();
1237
1257
  if (u && typeof u.displayName !== void 0 && u.displayName !== "") {
@@ -1251,16 +1271,16 @@ async function Je(a, t, s, r, e) {
1251
1271
  }
1252
1272
  async function Te(a, t) {
1253
1273
  if (t) debugger;
1254
- let s = [p.authorityWW, p.authorityUS, p.authorityCN], r = [p.authorityWWRegex, p.authorityUSRegex, p.authorityCNRegex], e = null;
1274
+ let r = [p.authorityWW, p.authorityUS, p.authorityCN], s = [p.authorityWWRegex, p.authorityUSRegex, p.authorityCNRegex], e = null;
1255
1275
  try {
1256
1276
  for (let i = 0; i < 3; i++) {
1257
- var n = s[i];
1277
+ var n = r[i];
1258
1278
  if (a.lookupfield == "Domain" ? n += a.domain : a.lookupfield == "Tenant ID" && (n += a.tid), n += "/.well-known/openid-configuration", console.log("Attempting GET from openid well-known endpoint: ", n), e = await fetch(n), e.status == 200) {
1259
1279
  let c = await e.json();
1260
1280
  if (c) {
1261
1281
  var o = c.authorization_endpoint;
1262
1282
  for (let u = 0; u < 3; u++) {
1263
- var d = o.match(r[u]);
1283
+ var d = o.match(s[u]);
1264
1284
  if (d != null)
1265
1285
  return a.tid = d[2], a.authority = d[1], console.log(`Successful GET from openid well-known endpoint: tid: ${a.tid} authority: ${a.authority}`), !0;
1266
1286
  }
@@ -1274,22 +1294,22 @@ async function Te(a, t) {
1274
1294
  }
1275
1295
  return (a.tid == "" || a.authority == "") && console.log(`GET from openid well-known endpoint failed to find tenant: ${e ? e.statusText : "unknown"}`), !1;
1276
1296
  }
1277
- async function Ke(a, t, s) {
1278
- if (t == null || t.spacode == "" || s == null) {
1297
+ async function Ke(a, t, r) {
1298
+ if (t == null || t.spacode == "" || r == null) {
1279
1299
  debugger;
1280
1300
  return { scopes: null, id: null, error: "500: invalid parameter(s) passed to getUserDelegatedScopes" };
1281
1301
  }
1282
1302
  let e = { method: "GET", headers: await J(a, t) };
1283
1303
  try {
1284
- if (s.graphSP == "") {
1304
+ if (r.graphSP == "") {
1285
1305
  let { spid: i, error: c } = await qe(e, t, "00000003-0000-0000-c000-000000000000");
1286
1306
  if (c != "") {
1287
1307
  debugger;
1288
1308
  return { scopes: null, id: null, error: `${c}` };
1289
1309
  }
1290
- s.graphSP = i;
1310
+ r.graphSP = i;
1291
1311
  }
1292
- let { grants: n, id: o, error: d } = await je(e, t, s.graphSP, t.oid);
1312
+ let { grants: n, id: o, error: d } = await je(e, t, r.graphSP, t.oid);
1293
1313
  if (d != "") {
1294
1314
  debugger;
1295
1315
  return { scopes: null, id: null, error: `${d}` };
@@ -1300,17 +1320,17 @@ async function Ke(a, t, s) {
1300
1320
  return console.log(n), { scopes: null, id: null, error: `Exception: ${n}` };
1301
1321
  }
1302
1322
  }
1303
- async function xt(a, t, s, r) {
1304
- if (t == null || t.spacode == "" || s == null) {
1323
+ async function Wt(a, t, r, s) {
1324
+ if (t == null || t.spacode == "" || r == null) {
1305
1325
  debugger;
1306
1326
  return !1;
1307
1327
  }
1308
- let { scopes: e, id: n, error: o } = await Ke(a, t, s);
1328
+ let { scopes: e, id: n, error: o } = await Ke(a, t, r);
1309
1329
  if (o != "") {
1310
1330
  debugger;
1311
1331
  return console.log(`userDelegatedScopesRemove: cannot find userDelegatedScopes for ${t.mail}: ${o}`), !1;
1312
1332
  }
1313
- e = e.replace(r, "");
1333
+ e = e.replace(s, "");
1314
1334
  let d = await He(a, t, n, e);
1315
1335
  if (!d) {
1316
1336
  debugger;
@@ -1318,65 +1338,71 @@ async function xt(a, t, s, r) {
1318
1338
  }
1319
1339
  return t.scopes = e.split(" "), d;
1320
1340
  }
1321
- async function Nt(a, t) {
1341
+ async function Ft(a, t) {
1322
1342
  if (t == null || t.spacode == "")
1323
1343
  return { users: [], error: "500: invalid user passed to usersGet" };
1324
1344
  try {
1325
- let r = { method: "GET", headers: await J(a, t) }, e = C(t.authority);
1345
+ let s = { method: "GET", headers: await J(a, t) }, e = N(t.authority);
1326
1346
  e += p.graphUsersPredicate;
1327
- let o = await (await fetch(e, r)).json();
1347
+ let o = await (await fetch(e, s)).json();
1328
1348
  if (typeof o.error < "u")
1329
1349
  return { users: [], error: `${o.error.code}: ${o.error.message}` };
1330
1350
  let d = new Array();
1331
1351
  for (let i of o.value)
1332
1352
  d.push(i.mail);
1333
1353
  return { users: d, error: "" };
1334
- } catch (s) {
1335
- return console.log(s), { users: [], error: `Exception: ${s}` };
1354
+ } catch (r) {
1355
+ return console.log(r), { users: [], error: `Exception: ${r}` };
1336
1356
  }
1337
1357
  }
1338
- async function Ct(a, t, s, r, e, n, o, d) {
1339
- let i = new y();
1340
- if (s.id === "1") {
1341
- if (i = await it(a, t, s, n.id, d), i.result) {
1342
- r && r(s.id);
1358
+ async function _t(a, t, r, s) {
1359
+ return rt(a, t, r, s);
1360
+ }
1361
+ async function Bt(a, t, r) {
1362
+ return nt();
1363
+ }
1364
+ async function Ut(a, t, r) {
1365
+ return at(a, t, r);
1366
+ }
1367
+ async function Lt(a, t, r, s, e, n, o, d) {
1368
+ let i = new m();
1369
+ if (r.id === "1") {
1370
+ if (i = await dt(a, t, r, n.id, d), i.result) {
1371
+ s && s(r.id);
1343
1372
  const c = {};
1344
- Object.defineProperty(c, s.id, { value: !0, writable: !0, enumerable: !0 }), e(c);
1373
+ Object.defineProperty(c, r.id, { value: !0, writable: !0, enumerable: !0 }), e(c);
1345
1374
  let u = n.associatedConfigs.findIndex((f) => f == "1");
1346
- u !== -1 && (n.associatedConfigs.splice(u, 1), n.associatedConfigs.push(s.id));
1375
+ u !== -1 && (n.associatedConfigs.splice(u, 1), n.associatedConfigs.push(r.id));
1347
1376
  }
1348
1377
  } else
1349
- i = await lt(a, t, s, d);
1378
+ i = await ut(a, t, r, d);
1350
1379
  return o.save(), i;
1351
1380
  }
1352
- async function Ot(a, t, s, r, e) {
1353
- let n = new y();
1354
- return n = await ot(a, t, s, r, e), n;
1355
- }
1356
- async function Wt(a, t, s, r, e) {
1357
- return at(a, t, s, r);
1381
+ async function zt(a, t, r, s, e) {
1382
+ let n = new m();
1383
+ return n = await ct(a, t, r, s, e), n;
1358
1384
  }
1359
- async function Ft(a, t, s, r, e) {
1360
- return rt(a, t, s, r, e);
1385
+ async function Mt(a, t, r, s, e) {
1386
+ return ot(a, t, r, s, e);
1361
1387
  }
1362
- async function _t(a, t, s, r, e) {
1363
- return nt(a, t, s, r, e);
1388
+ async function jt(a, t, r, s, e) {
1389
+ return it(a, t, r, s, e);
1364
1390
  }
1365
- async function Bt(a, t, s, r, e) {
1366
- let n = new y();
1391
+ async function Ht(a, t, r, s, e) {
1392
+ let n = new m();
1367
1393
  if (e) debugger;
1368
1394
  try {
1369
- let o = r.ws.find((d) => d.id === s);
1395
+ let o = s.ws.find((d) => d.id === r);
1370
1396
  if (o != null) {
1371
1397
  o.associatedConfigs.length = 0;
1372
1398
  let d = await be(a, t, o.id, e);
1373
1399
  if (!d.result) return d;
1374
1400
  let i = "";
1375
1401
  for (let c of o.associatedConfigs) {
1376
- let u = r.cs.find((f) => f.id === c);
1402
+ let u = s.cs.find((f) => f.id === c);
1377
1403
  u != null && u.sel && (i = u.id);
1378
1404
  }
1379
- Se(o, r, d.array, i), r.tagWithWorkspaces();
1405
+ Se(o, s, d.array, i), s.tagWithWorkspaces();
1380
1406
  }
1381
1407
  return n;
1382
1408
  } catch (o) {
@@ -1384,31 +1410,34 @@ async function Bt(a, t, s, r, e) {
1384
1410
  }
1385
1411
  return n.result = !1, n.status = 500, n;
1386
1412
  }
1387
- async function Ut(a, t, s, r, e) {
1413
+ async function qt(a, t, r, s, e) {
1414
+ return lt(a, t, r, s);
1415
+ }
1416
+ async function Jt(a, t, r, s, e) {
1388
1417
  console.log(">>>>>> initGet");
1389
- let n = new y();
1418
+ let n = new m();
1390
1419
  if (e)
1391
1420
  debugger;
1392
1421
  let o = new L();
1393
- return o.tid = t.tid, o.domain = t.tid, await Te(o, e) ? (t.authority = o.authority, r.setTaskStart("GET tenant details", /* @__PURE__ */ new Date()), n.result = await Je(t, o, s, a, e), r.setTaskEnd("GET tenant details", /* @__PURE__ */ new Date(), "complete"), n.result && (t.companyName = o.name, t.companyDomain = o.domain, r.setTaskStart("POST config init", /* @__PURE__ */ new Date()), n = await ct(a, t, e), r.setTaskEnd("POST config init", /* @__PURE__ */ new Date(), n.result ? "complete" : "failed")), n.result && (r.setTaskStart("GET workspaces", /* @__PURE__ */ new Date()), n = await Qe(a, t, s, e), r.setTaskEnd("GET workspaces", /* @__PURE__ */ new Date(), n.result ? "complete" : "failed")), console.log("initGet complete. Version: " + F()), n) : (n.error = `Failed to retrieve authority for user "${t.mail}" TID ${t.tid}.`, n.result = !1, n);
1422
+ return o.tid = t.tid, o.domain = t.tid, await Te(o, e) ? (t.authority = o.authority, s.setTaskStart("GET tenant details", /* @__PURE__ */ new Date()), n.result = await Je(t, o, r, a, e), s.setTaskEnd("GET tenant details", /* @__PURE__ */ new Date(), "complete"), n.result && (t.companyName = o.name, t.companyDomain = o.domain, s.setTaskStart("POST config init", /* @__PURE__ */ new Date()), n = await pt(a, t, e), s.setTaskEnd("POST config init", /* @__PURE__ */ new Date(), n.result ? "complete" : "failed")), n.result && (s.setTaskStart("GET workspaces", /* @__PURE__ */ new Date()), n = await Qe(a, t, r, e), s.setTaskEnd("GET workspaces", /* @__PURE__ */ new Date(), n.result ? "complete" : "failed")), console.log("initGet complete. Version: " + F()), n) : (n.error = `Failed to retrieve authority for user "${t.mail}" TID ${t.tid}.`, n.result = !1, n);
1394
1423
  }
1395
- async function Lt(a, t, s, r) {
1396
- return pt(a, t, s, r);
1424
+ async function Kt(a, t, r, s) {
1425
+ return gt(a, t, r, s);
1397
1426
  }
1398
- async function zt(a, t, s, r, e) {
1399
- return dt(a, t, s, r);
1427
+ async function Vt(a, t, r, s, e) {
1428
+ return ft(a, t, r, s);
1400
1429
  }
1401
- async function Mt(a, t, s, r) {
1402
- return st(a, t, s, r);
1430
+ async function Zt(a, t, r, s) {
1431
+ return st(a, t, r, s);
1403
1432
  }
1404
- async function jt(a, t, s, r) {
1405
- return et(a, t, s, r);
1433
+ async function Qt(a, t, r, s) {
1434
+ return et(a, t, r, s);
1406
1435
  }
1407
- async function Ht(a, t, s, r) {
1408
- return await ft(a, t, s, r);
1436
+ async function Xt(a, t, r, s) {
1437
+ return await mt(a, t, r, s);
1409
1438
  }
1410
- function Ve(a, t, s, r) {
1411
- s.map((e) => {
1439
+ function Ve(a, t, r, s) {
1440
+ r.map((e) => {
1412
1441
  let n = null, o = t.us.findIndex((c) => c.oid === e.userId || c.oid === e.email);
1413
1442
  if (o === -1) {
1414
1443
  let c = t.us.findIndex((u) => u.oid === "1");
@@ -1420,13 +1449,13 @@ function Ve(a, t, s, r) {
1420
1449
  n = new X(), t.us.push(n);
1421
1450
  } else
1422
1451
  n = t.us.at(o);
1423
- n.sel = r === e.userId, n.oid = e.userId ? e.userId : e.email, n.name = e.firstName ?? n.name, n.mail = e.email, n.tid = e.tenantId;
1452
+ n.sel = s === e.userId, n.oid = e.userId ? e.userId : e.email, n.name = e.firstName ?? n.name, n.mail = e.email, n.tid = e.tenantId;
1424
1453
  let d = t.ts.find((c) => c.tid === n.tid);
1425
1454
  d != null && (n.authority = d.authority, n.companyName = d.name, n.companyDomain = d.domain), a.associatedUsers.findIndex((c) => c === n.oid) == -1 && a.associatedUsers.push(n.oid);
1426
1455
  }), t.save();
1427
1456
  }
1428
- function Ze(a, t, s, r) {
1429
- s.map((e) => {
1457
+ function Ze(a, t, r, s) {
1458
+ r.map((e) => {
1430
1459
  let n = null, o = t.ts.findIndex((u) => u.tid === e.tenantId);
1431
1460
  if (o === -1) {
1432
1461
  let u = t.ts.findIndex((f) => f.tid === "1");
@@ -1438,13 +1467,13 @@ function Ze(a, t, s, r) {
1438
1467
  n = new L(), t.ts.push(n);
1439
1468
  } else
1440
1469
  n = t.ts.at(o);
1441
- n.sel = r === e.tenantId, n.tid = e.tenantId, n.name = e.name, n.domain = e.domain, n.tenantType = e.type.toLowerCase();
1470
+ n.sel = s === e.tenantId, n.tid = e.tenantId, n.name = e.name, n.domain = e.domain, n.tenantType = e.type.toLowerCase();
1442
1471
  const d = /^(https:\/\/login.microsoftonline.(?:us|com)\/)organizations\/v2.0$/, i = e.authority.match(d);
1443
1472
  n.authority = i ? i[1] : e.authority, a.associatedTenants.findIndex((u) => u === e.tenantId) == -1 && a.associatedTenants.push(e.tenantId);
1444
1473
  }), t.save();
1445
1474
  }
1446
- function Se(a, t, s, r) {
1447
- s.map((e) => {
1475
+ function Se(a, t, r, s) {
1476
+ r.map((e) => {
1448
1477
  let n = null, o = t.cs.findIndex((i) => i.id === e.id);
1449
1478
  if (o === -1) {
1450
1479
  let i = t.cs.findIndex((c) => c.id === "1");
@@ -1456,45 +1485,45 @@ function Se(a, t, s, r) {
1456
1485
  n = new Y(), t.cs.push(n);
1457
1486
  } else
1458
1487
  n = t.cs.at(o);
1459
- n.sel = r === e.id, n.id = e.id, n.workspaceId = e.workspaceId, n.name = e.name, n.description = e.description, n.isEnabled = e.isEnabled, n.tenants.length = 0, e.tenants.map((i) => {
1488
+ n.sel = s === e.id, n.id = e.id, n.workspaceId = e.workspaceId, n.name = e.name, n.description = e.description, n.isEnabled = e.isEnabled, n.tenants.length = 0, e.tenants.map((i) => {
1460
1489
  let c = new _e();
1461
1490
  c.tid = i.tenantId, c.sourceGroupId = i.sourceGroupId ?? "", c.sourceGroupName = i.sourceGroupName ?? "", c.targetGroupId = i.targetGroupId ?? "", c.targetGroupName = i.targetGroupName ?? "", c.configurationTenantType = i.configurationTenantType.toLowerCase(), c.deltaToken = i.deltaToken ?? "", c.configId = n.id, c.batchId = i.batchId ?? "", c.isReadPermissionConsented = i.isReadPermissionConsented, c.isWritePermissionConsented = i.isWritePermissionConsented, n.tenants.push(c);
1462
1491
  }), a.associatedConfigs.findIndex((i) => i === e.id) == -1 && a.associatedConfigs.push(e.id);
1463
1492
  }), t.save();
1464
1493
  }
1465
- async function Qe(a, t, s, r) {
1466
- let e = new y();
1467
- if (r) debugger;
1494
+ async function Qe(a, t, r, s) {
1495
+ let e = new m();
1496
+ if (s) debugger;
1468
1497
  try {
1469
- if (e = await ht(a, t, r), e.result) {
1498
+ if (e = await yt(a, t, s), e.result) {
1470
1499
  for (let n of e.array) {
1471
- let o = null, d = s.ws.findIndex((A) => A.id === n.id);
1500
+ let o = null, d = r.ws.findIndex((k) => k.id === n.id);
1472
1501
  if (d === -1) {
1473
- let A = s.ws.findIndex((m) => m.id === "1");
1474
- A !== -1 ? o = s.ws.at(A) : (o = new ee(), s.ws.push(o));
1502
+ let k = r.ws.findIndex((y) => y.id === "1");
1503
+ k !== -1 ? o = r.ws.at(k) : (o = new ee(), r.ws.push(o));
1475
1504
  } else
1476
- o = s.ws.at(d);
1505
+ o = r.ws.at(d);
1477
1506
  let i = "";
1478
- for (let A of o.associatedUsers) {
1479
- let m = s.us.find((P) => P.oid === A);
1480
- m != null && m.sel && (i = m.oid);
1507
+ for (let k of o.associatedUsers) {
1508
+ let y = r.us.find((P) => P.oid === k);
1509
+ y != null && y.sel && (i = y.oid);
1481
1510
  }
1482
1511
  let c = "";
1483
- for (let A of o.associatedTenants) {
1484
- let m = s.ts.find((P) => P.tid === A);
1485
- m != null && m.sel && (c = m.tid);
1512
+ for (let k of o.associatedTenants) {
1513
+ let y = r.ts.find((P) => P.tid === k);
1514
+ y != null && y.sel && (c = y.tid);
1486
1515
  }
1487
1516
  let u = "";
1488
- for (let A of o.associatedConfigs) {
1489
- let m = s.cs.find((P) => P.id === A);
1490
- m != null && m.sel && (u = m.id);
1517
+ for (let k of o.associatedConfigs) {
1518
+ let y = r.cs.find((P) => P.id === k);
1519
+ y != null && y.sel && (u = y.id);
1491
1520
  }
1492
1521
  o.associatedUsers.length = 0, o.associatedTenants.length = 0, o.associatedConfigs.length = 0, o.id = n.id, o.name = n.name, o.ownerid = n.workspaceOwnerUserId;
1493
- let f = tt(a, t, o.id, r), b = ut(a, t, o.id, r), I = be(a, t, o.id, r), [R, D, h] = await Promise.all([f, b, I]);
1494
- if (!R.result) return R;
1522
+ let f = tt(a, t, o.id, s), b = ht(a, t, o.id, s), I = be(a, t, o.id, s), [v, D, h] = await Promise.all([f, b, I]);
1523
+ if (!v.result) return v;
1495
1524
  if (!D.result) return D;
1496
1525
  if (!h.result) return h;
1497
- Ze(o, s, D.array, c), Ve(o, s, R.array, i), Se(o, s, h.array, u), s.tagWithWorkspaces();
1526
+ Ze(o, r, D.array, c), Ve(o, r, v.array, i), Se(o, r, h.array, u), r.tagWithWorkspaces();
1498
1527
  }
1499
1528
  return e;
1500
1529
  }
@@ -1503,13 +1532,13 @@ async function Qe(a, t, s, r) {
1503
1532
  }
1504
1533
  return e.result = !1, e.status = 500, e;
1505
1534
  }
1506
- async function qt(a, t) {
1507
- let s = "", r = F();
1535
+ async function Yt(a, t) {
1536
+ let r = "", s = F();
1508
1537
  try {
1509
1538
  let e = a.getAllAccounts(), n = t.oid + "." + t.tid, o = null;
1510
1539
  for (let i = 0; i < e.length; i++)
1511
1540
  e[i].homeAccountId == n && (o = e[i]);
1512
- s = (await a.acquireTokenSilent({
1541
+ r = (await a.acquireTokenSilent({
1513
1542
  scopes: [
1514
1543
  "https://analysis.windows.net/powerbi/api/App.Read.All",
1515
1544
  "https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All",
@@ -1517,27 +1546,27 @@ async function qt(a, t) {
1517
1546
  "https://analysis.windows.net/powerbi/api/Workspace.ReadWrite.All"
1518
1547
  ],
1519
1548
  account: o
1520
- })).accessToken, console.log("PowerBI token acquired silently: " + s.slice(0, 20));
1549
+ })).accessToken, console.log("PowerBI token acquired silently: " + r.slice(0, 20));
1521
1550
  } catch {
1522
1551
  console.log("PowerBI token failed to be acquired silently");
1523
1552
  }
1524
- return console.log(r), s;
1553
+ return console.log(s), r;
1525
1554
  }
1526
1555
  async function ae(a, t) {
1527
- const s = new Headers();
1528
- if (s.append("Content-Type", "application/json"), s.append("accept", "*/*"), t.azureAccessToken == null || t.azureAccessToken === "")
1556
+ const r = new Headers();
1557
+ if (r.append("Content-Type", "application/json"), r.append("accept", "*/*"), t.azureAccessToken == null || t.azureAccessToken === "")
1529
1558
  try {
1530
- let r = a.getAllAccounts(), e = t.oid + "." + t.tid, n = null;
1531
- for (let d = 0; d < r.length; d++)
1532
- r[d].homeAccountId == e && (n = r[d]);
1559
+ let s = a.getAllAccounts(), e = t.oid + "." + t.tid, n = null;
1560
+ for (let d = 0; d < s.length; d++)
1561
+ s[d].homeAccountId == e && (n = s[d]);
1533
1562
  let o = await a.acquireTokenSilent({
1534
1563
  scopes: ["https://management.azure.com/user_impersonation"],
1535
1564
  account: n
1536
1565
  });
1537
1566
  t.azureAccessToken = o.accessToken, console.log("Front end token acquired silently: " + t.azureAccessToken.slice(0, 20));
1538
- } catch (r) {
1567
+ } catch (s) {
1539
1568
  try {
1540
- console.log("Front end token silent acquisition failure: " + r);
1569
+ console.log("Front end token silent acquisition failure: " + s);
1541
1570
  let e = a.getAllAccounts(), n = t.oid + "." + t.tid, o = null;
1542
1571
  for (let d = 0; d < e.length; d++)
1543
1572
  e[d].homeAccountId == n && (o = e[d]);
@@ -1549,15 +1578,15 @@ async function ae(a, t) {
1549
1578
  console.log("Front end token popup acquisition failure: " + e);
1550
1579
  }
1551
1580
  }
1552
- return s.append("Authorization", `Bearer ${t.azureAccessToken}`), s;
1581
+ return r.append("Authorization", `Bearer ${t.azureAccessToken}`), r;
1553
1582
  }
1554
- async function Jt(a, t) {
1583
+ async function es(a, t) {
1555
1584
  if (t == null || t.spacode == "")
1556
1585
  return !1;
1557
1586
  try {
1558
- let r = { method: "GET", headers: await ae(a, t) }, e = U.azureListRootAssignments;
1587
+ let s = { method: "GET", headers: await ae(a, t) }, e = U.azureListRootAssignments;
1559
1588
  e += "'", e += t.oid, e += "'";
1560
- let n = await fetch(e, r);
1589
+ let n = await fetch(e, s);
1561
1590
  if (n.status == 200) {
1562
1591
  let o = await n.json();
1563
1592
  o = o;
@@ -1565,29 +1594,29 @@ async function Jt(a, t) {
1565
1594
  console.log("Successful call to Azure Resource Graph list root assignments");
1566
1595
  } else
1567
1596
  return console.log(await S(n)), !1;
1568
- } catch (s) {
1569
- return console.log(s), !1;
1597
+ } catch (r) {
1598
+ return console.log(r), !1;
1570
1599
  }
1571
1600
  return !0;
1572
1601
  }
1573
- async function Kt(a, t) {
1602
+ async function ts(a, t) {
1574
1603
  if (t == null || t.spacode == "")
1575
1604
  return !1;
1576
1605
  try {
1577
- let r = { method: "POST", headers: await ae(a, t) }, e = U.azureElevateAccess, n = await fetch(e, r);
1606
+ let s = { method: "POST", headers: await ae(a, t) }, e = U.azureElevateAccess, n = await fetch(e, s);
1578
1607
  if (n.status == 200)
1579
1608
  console.log("Successful call to Azure Resource Graph list root assignments");
1580
1609
  else
1581
1610
  return console.log(await S(n)), !1;
1582
- } catch (s) {
1583
- return console.log(s), !1;
1611
+ } catch (r) {
1612
+ return console.log(r), !1;
1584
1613
  }
1585
1614
  return !0;
1586
1615
  }
1587
1616
  async function Xe(a, t) {
1588
- let s = new Array();
1617
+ let r = new Array();
1589
1618
  if (t == null || t.spacode == "")
1590
- return s;
1619
+ return r;
1591
1620
  try {
1592
1621
  let e = { method: "GET", headers: await ae(a, t) }, n = U.azureListRootAssignments;
1593
1622
  n += "'", n += t.oid, n += "'";
@@ -1598,26 +1627,26 @@ async function Xe(a, t) {
1598
1627
  debugger;
1599
1628
  console.log("Successful call to Azure Resource Graph list root assignments");
1600
1629
  } else
1601
- return console.log(await S(o)), s;
1602
- } catch (r) {
1603
- return console.log(r), s;
1630
+ return console.log(await S(o)), r;
1631
+ } catch (s) {
1632
+ return console.log(s), r;
1604
1633
  }
1605
- return s;
1634
+ return r;
1606
1635
  }
1607
1636
  function Ye(a) {
1608
- let t = "8d95d21c-c378-4bb0-9f52-88c30d271e7a", s = a.authority.toLowerCase();
1609
- return s.startsWith("https://login.microsoftonline.com/") ? t = "8d95d21c-c378-4bb0-9f52-88c30d271e7a" : s.startsWith("https://login.microsoftonline.us/") ? t = "48da942e-ea3d-49e4-a054-81649012f8f2" : s.startsWith("https://login.partner.microsoftonline.cn/") && (t = "c91d32e4-dcc5-4d77-826a-16e93ffce666"), `api://${t}/Config.Write`;
1637
+ let t = "8d95d21c-c378-4bb0-9f52-88c30d271e7a", r = a.authority.toLowerCase();
1638
+ return r.startsWith("https://login.microsoftonline.com/") ? t = "8d95d21c-c378-4bb0-9f52-88c30d271e7a" : r.startsWith("https://login.microsoftonline.us/") ? t = "48da942e-ea3d-49e4-a054-81649012f8f2" : r.startsWith("https://login.partner.microsoftonline.cn/") && (t = "c91d32e4-dcc5-4d77-826a-16e93ffce666"), `api://${t}/Config.Write`;
1610
1639
  }
1611
- async function k(a, t) {
1612
- const s = new Headers();
1613
- s.append("Content-Type", "application/json"), s.append("accept", "*/*");
1614
- const r = Ye(t);
1640
+ async function A(a, t) {
1641
+ const r = new Headers();
1642
+ r.append("Content-Type", "application/json"), r.append("accept", "*/*");
1643
+ const s = Ye(t);
1615
1644
  try {
1616
1645
  let e = a.getAllAccounts(), n = t.oid + "." + t.tid, o = null;
1617
1646
  for (let i = 0; i < e.length; i++)
1618
1647
  e[i].homeAccountId == n && (o = e[i]);
1619
1648
  let d = await a.acquireTokenSilent({
1620
- scopes: [r],
1649
+ scopes: [s],
1621
1650
  account: o
1622
1651
  });
1623
1652
  t.mindlineAccessToken = d.accessToken, console.log("Front end mindline token acquired silently: " + t.mindlineAccessToken.slice(0, 20));
@@ -1628,40 +1657,40 @@ async function k(a, t) {
1628
1657
  for (let i = 0; i < n.length; i++)
1629
1658
  n[i].homeAccountId == o && (d = n[i]);
1630
1659
  a.acquireTokenRedirect({
1631
- scopes: [r],
1660
+ scopes: [s],
1632
1661
  account: d
1633
1662
  });
1634
1663
  } catch (n) {
1635
1664
  console.log("Front end mindline token redirect acquisition failure: " + n);
1636
1665
  }
1637
1666
  }
1638
- return s.append("Authorization", `Bearer ${t.mindlineAccessToken}`), s;
1667
+ return r.append("Authorization", `Bearer ${t.mindlineAccessToken}`), r;
1639
1668
  }
1640
1669
  async function S(a) {
1641
1670
  let t = "";
1642
1671
  if (a.status === 401 && (t = a.statusText, t != ""))
1643
1672
  return t;
1644
- let s = await a.json();
1645
- if (s.error !== void 0)
1646
- t = `Error: ${s.error} Message: ${s.message}`;
1647
- else if (s.errors !== void 0)
1648
- t = Object.keys(s.errors).reduce(
1649
- (n, o) => n + o + ": " + s.errors[o] + " ",
1673
+ let r = await a.json();
1674
+ if (r.error !== void 0)
1675
+ t = `Error: ${r.error} Message: ${r.message}`;
1676
+ else if (r.errors !== void 0)
1677
+ t = Object.keys(r.errors).reduce(
1678
+ (n, o) => n + o + ": " + r.errors[o] + " ",
1650
1679
  ""
1651
1680
  );
1652
- else if (s.title !== void 0)
1653
- t = s.title;
1681
+ else if (r.title !== void 0)
1682
+ t = r.title;
1654
1683
  else
1655
1684
  debugger;
1656
1685
  return t;
1657
1686
  }
1658
- async function et(a, t, s, r) {
1659
- let e = new y();
1660
- if (s.oid == "" && s.mail == "" || r == "")
1687
+ async function et(a, t, r, s) {
1688
+ let e = new m();
1689
+ if (r.oid == "" && r.mail == "" || s == "")
1661
1690
  return e.result = !1, e.error = "adminDelete: invalid parameters", e.status = 500, e;
1662
1691
  let n = null;
1663
- n = new URL(T.adminEndpoint()), n.searchParams.append("workspaceId", r), n.searchParams.append("email", s.mail);
1664
- let d = { method: "DELETE", headers: await k(a, t) };
1692
+ n = new URL(T.adminEndpoint()), n.searchParams.append("workspaceId", s), n.searchParams.append("email", r.mail);
1693
+ let d = { method: "DELETE", headers: await A(a, t) };
1665
1694
  try {
1666
1695
  console.log("Attempting DELETE from /admin: " + n.href);
1667
1696
  let i = await fetch(n.href, d);
@@ -1671,15 +1700,15 @@ async function et(a, t, s, r) {
1671
1700
  }
1672
1701
  return e;
1673
1702
  }
1674
- async function tt(a, t, s, r) {
1675
- let e = new y();
1676
- if (s === "")
1703
+ async function tt(a, t, r, s) {
1704
+ let e = new m();
1705
+ if (r === "")
1677
1706
  return e.result = !1, e.status = 500, e.error = "adminsGet: no workspace provided", e;
1678
1707
  let n = T.adminsEndpoint(), o = new URL(n);
1679
- o.searchParams.append("workspaceId", s);
1680
- let i = { method: "GET", headers: await k(a, t) };
1708
+ o.searchParams.append("workspaceId", r);
1709
+ let i = { method: "GET", headers: await A(a, t) };
1681
1710
  try {
1682
- if (r) debugger;
1711
+ if (s) debugger;
1683
1712
  console.log("Attempting GET from /admins: " + o.href);
1684
1713
  let c = await fetch(o.href, i);
1685
1714
  if (c.status === 200 && c.statusText === "OK") {
@@ -1692,16 +1721,16 @@ async function tt(a, t, s, r) {
1692
1721
  }
1693
1722
  return e;
1694
1723
  }
1695
- async function st(a, t, s, r) {
1696
- let e = new y();
1697
- if (s.mail == "" || s.authority == "" || s.tid === "")
1724
+ async function st(a, t, r, s) {
1725
+ let e = new m();
1726
+ if (r.mail == "" || r.authority == "" || r.tid === "")
1698
1727
  return e.result = !1, e.error = "adminPost: invalid argument", e.status = 500, e;
1699
1728
  let n = T.adminEndpoint();
1700
- const o = await k(a, t);
1729
+ const o = await A(a, t);
1701
1730
  let d = `
1702
- {"email": "${s.mail}",
1703
- "tenantId": "${s.tid}",
1704
- "workspaceId": "${r}"
1731
+ {"email": "${r.mail}",
1732
+ "tenantId": "${r.tid}",
1733
+ "workspaceId": "${s}"
1705
1734
  }`, i = { method: "POST", headers: o, body: d };
1706
1735
  try {
1707
1736
  console.log("Attempting POST to /admin: " + n);
@@ -1712,13 +1741,72 @@ async function st(a, t, s, r) {
1712
1741
  }
1713
1742
  return e;
1714
1743
  }
1715
- async function rt(a, t, s, r, e) {
1716
- let n = new y(), o = T.configConsentEndpoint(), d = new URL(o);
1717
- d.searchParams.append("configurationId", s);
1718
- const i = await k(a, t);
1744
+ async function rt(a, t, r, s) {
1745
+ a = a, t = t, s = s;
1746
+ let e = new m();
1747
+ if (r.id === "")
1748
+ return e.result = !1, e.error = "auditConfigPost: invalid config ID", e.status = 500, e;
1749
+ let n = T.auditConfigEndpoint();
1750
+ const o = await A(a, t);
1751
+ let d = `
1752
+ {
1753
+ "workspaceId": "${r.workspaceId}",
1754
+ "name": "${r.name}",
1755
+ "description": "${r.description}",
1756
+ "isEnabled": ${r.isEnabled},
1757
+ "email": "${r.email}",
1758
+ "tenantId": "${r.tenantId}"
1759
+ }`, i = { method: "POST", headers: o, body: d };
1760
+ try {
1761
+ if (s) debugger;
1762
+ console.log("Attempting POST to /audit-configuration: " + n);
1763
+ let c = await fetch(n, i);
1764
+ if (c.status === 200 && c.statusText === "OK") {
1765
+ let u = await c.json();
1766
+ return r.id = u, console.log(
1767
+ `Successful AuditConfigID: ${u} from POST to /audit-configuration: ${d}`
1768
+ ), e;
1769
+ } else
1770
+ return e.error = await S(c), console.log(`Failed POST to /audit-configuration: ${d}`), console.log(e.error), e.status = 500, e.result = !1, e;
1771
+ } catch (c) {
1772
+ return e.status = 500, e.result = !1, e.error = c.message, console.log(e.error), e;
1773
+ }
1774
+ return e;
1775
+ }
1776
+ async function nt(a, t, r) {
1777
+ return new m();
1778
+ }
1779
+ async function at(a, t, r) {
1780
+ let s = new m();
1781
+ if (t.mail == null || t.mail == "")
1782
+ return s.result = !1, s.status = 500, s.error = "auditEventsGet: no user provided", s;
1783
+ let e = T.auditEventsEndpoint(), n = new URL(e), d = { method: "GET", headers: await A(a, t) };
1784
+ try {
1785
+ if (r) debugger;
1786
+ console.log("Attempting GET from /audit-events endpoint: " + n.href);
1787
+ let i = await fetch(n.href, d);
1788
+ if (i.status === 200 && i.statusText === "OK") {
1789
+ let c = await i.json();
1790
+ if (Array.isArray(c.data)) {
1791
+ let u = c.data;
1792
+ if (u != null)
1793
+ return s.array = u, console.log(`Successful GET from /audit-events: ${s.array.reduce((b, I) => b + I.initiatedByUser + " ", "")}`), s;
1794
+ }
1795
+ return s.error = "Failed GET from /audit-events: failed to JSON-parse response", console.log(s.error), s.status = 500, s.result = !1, s;
1796
+ } else
1797
+ return console.log(`Failed GET from /audit-events: ${n.href}`), s.error = await S(i), s.status = 500, s.result = !1, console.log(s.error), s;
1798
+ } catch (i) {
1799
+ s.error = i.message, s.status = 500, s.result = !1, console.log(i.message);
1800
+ }
1801
+ return s;
1802
+ }
1803
+ async function ot(a, t, r, s, e) {
1804
+ let n = new m(), o = T.configConsentEndpoint(), d = new URL(o);
1805
+ d.searchParams.append("configurationId", r);
1806
+ const i = await A(a, t);
1719
1807
  let c = `
1720
1808
  {
1721
- "tenantId": "${r}",
1809
+ "tenantId": "${s}",
1722
1810
  "isReadPermissionConsented": ${e ? "true" : "false"}
1723
1811
  }`, u = { method: "PUT", headers: i, body: c };
1724
1812
  try {
@@ -1730,13 +1818,13 @@ async function rt(a, t, s, r, e) {
1730
1818
  }
1731
1819
  return n;
1732
1820
  }
1733
- async function nt(a, t, s, r, e) {
1734
- let n = new y(), o = T.configConsentEndpoint(), d = new URL(o);
1735
- d.searchParams.append("configurationId", s);
1736
- const i = await k(a, t);
1821
+ async function it(a, t, r, s, e) {
1822
+ let n = new m(), o = T.configConsentEndpoint(), d = new URL(o);
1823
+ d.searchParams.append("configurationId", r);
1824
+ const i = await A(a, t);
1737
1825
  let c = `
1738
1826
  {
1739
- "tenantId": "${r}",
1827
+ "tenantId": "${s}",
1740
1828
  "isWritePermissionConsented": ${e ? "true" : "false"}
1741
1829
  }`, u = { method: "PUT", headers: i, body: c };
1742
1830
  try {
@@ -1748,13 +1836,13 @@ async function nt(a, t, s, r, e) {
1748
1836
  }
1749
1837
  return n;
1750
1838
  }
1751
- async function at(a, t, s, r, e) {
1752
- let n = new y();
1753
- if (s.id === "" || r == "")
1839
+ async function lt(a, t, r, s, e) {
1840
+ let n = new m();
1841
+ if (r.id === "" || s == "")
1754
1842
  return n.result = !1, n.error = "configPost: invalid config ID", n.status = 500, n;
1755
1843
  let o = null;
1756
- o = new URL(T.configEndpoint()), o.searchParams.append("configurationId", s.id);
1757
- let i = { method: "DELETE", headers: await k(a, t) };
1844
+ o = new URL(T.configEndpoint()), o.searchParams.append("configurationId", r.id);
1845
+ let i = { method: "DELETE", headers: await A(a, t) };
1758
1846
  try {
1759
1847
  console.log("Attempting DELETE from /config: " + o.href);
1760
1848
  let c = await fetch(o.href, i);
@@ -1764,44 +1852,44 @@ async function at(a, t, s, r, e) {
1764
1852
  }
1765
1853
  return n;
1766
1854
  }
1767
- async function ot(a, t, s, r, e) {
1768
- let n = new y();
1769
- if (s === "")
1855
+ async function ct(a, t, r, s, e) {
1856
+ let n = new m();
1857
+ if (r === "")
1770
1858
  return n.result = !1, n.error = "configPatch: invalid config ID", n.status = 500, n;
1771
1859
  let o = T.configEnabledEndpoint(), d = new URL(o);
1772
- d.searchParams.append("configurationId", s), d.searchParams.append("isEnabled", r.toString());
1773
- let c = { method: "PATCH", headers: await k(a, t) };
1860
+ d.searchParams.append("configurationId", r), d.searchParams.append("isEnabled", s.toString());
1861
+ let c = { method: "PATCH", headers: await A(a, t) };
1774
1862
  try {
1775
1863
  if (e) debugger;
1776
1864
  console.log("Attempting PATCH to /config: " + d.href);
1777
1865
  let u = await fetch(d.href, c);
1778
- return u.status === 200 && u.statusText === "OK" ? (console.log(`Successful PATCH to ${d.href}: ${r.toString()}`), n) : (n.error = await S(u), console.log(`Failed PATCH to ${d.href}: ${r.toString()}`), console.log(n.error), n.status = 500, n.result = !1, n);
1866
+ return u.status === 200 && u.statusText === "OK" ? (console.log(`Successful PATCH to ${d.href}: ${s.toString()}`), n) : (n.error = await S(u), console.log(`Failed PATCH to ${d.href}: ${s.toString()}`), console.log(n.error), n.status = 500, n.result = !1, n);
1779
1867
  } catch (u) {
1780
1868
  n.error = u.message, n.status = 500, n.result = !1, console.log(u.message);
1781
1869
  }
1782
1870
  return n;
1783
1871
  }
1784
- async function it(a, t, s, r, e) {
1785
- let n = new y();
1786
- if (s.id === "")
1872
+ async function dt(a, t, r, s, e) {
1873
+ let n = new m();
1874
+ if (r.id === "")
1787
1875
  return n.result = !1, n.error = "configPost: invalid config ID", n.status = 500, n;
1788
1876
  let o = T.configEndpoint();
1789
- const d = await k(a, t);
1877
+ const d = await A(a, t);
1790
1878
  let i = `
1791
1879
  {
1792
- "workspaceId": "${r}",
1793
- "name": "${s.name}",
1794
- "description": "${s.description}",
1795
- "isEnabled": ${s.isEnabled},
1880
+ "workspaceId": "${s}",
1881
+ "name": "${r.name}",
1882
+ "description": "${r.description}",
1883
+ "isEnabled": ${r.isEnabled},
1796
1884
  "tenants": [`;
1797
- s.tenants.map((u) => {
1798
- let f = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", b = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", I = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", R = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
1885
+ r.tenants.map((u) => {
1886
+ let f = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", b = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", I = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", v = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
1799
1887
  i.slice(-1) === "}" && (i += ","), i += `{
1800
1888
  "tenantId": "${u.tid}",
1801
1889
  "sourceGroupId": ${f},
1802
1890
  "sourceGroupName": ${b},
1803
1891
  "targetGroupId": ${I},
1804
- "targetGroupName": ${R},
1892
+ "targetGroupName": ${v},
1805
1893
  "configurationTenantType": "${u.configurationTenantType}"
1806
1894
  }`;
1807
1895
  }), i += "]}";
@@ -1812,7 +1900,7 @@ async function it(a, t, s, r, e) {
1812
1900
  let u = await fetch(o, c);
1813
1901
  if (u.status === 200 && u.statusText === "OK") {
1814
1902
  let f = await u.json();
1815
- return s.id = f, console.log(
1903
+ return r.id = f, console.log(
1816
1904
  `Successful ConfigID: ${f} from POST to /config: ${i}`
1817
1905
  ), n;
1818
1906
  } else
@@ -1821,26 +1909,26 @@ async function it(a, t, s, r, e) {
1821
1909
  return n.status = 500, n.result = !1, n.error = u.message, console.log(n.error), n;
1822
1910
  }
1823
1911
  }
1824
- async function lt(a, t, s, r) {
1825
- let e = new y();
1826
- if (s.id === "")
1912
+ async function ut(a, t, r, s) {
1913
+ let e = new m();
1914
+ if (r.id === "")
1827
1915
  return e.result = !1, e.error = "configPost: invalid config ID", e.status = 500, e;
1828
1916
  let n = T.configEndpoint(), o = new URL(n);
1829
- o.searchParams.append("configurationId", s.id);
1830
- const d = await k(a, t);
1917
+ o.searchParams.append("configurationId", r.id);
1918
+ const d = await A(a, t);
1831
1919
  let i = `
1832
1920
  {
1833
- "name": "${s.name}",
1834
- "description": "${s.description}",
1921
+ "name": "${r.name}",
1922
+ "description": "${r.description}",
1835
1923
  "tenants": [`;
1836
- s.tenants.map((u) => {
1924
+ r.tenants.map((u) => {
1837
1925
  i.slice(-1) === "}" && (i += ",");
1838
- let b = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", I = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", R = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", D = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
1926
+ let b = u.sourceGroupId != "" ? `"${u.sourceGroupId}"` : "null", I = u.sourceGroupName != "" ? `"${u.sourceGroupName}"` : "null", v = u.targetGroupId != "" ? `"${u.targetGroupId}"` : "null", D = u.targetGroupName != "" ? `"${u.targetGroupName}"` : "null";
1839
1927
  i += `{
1840
1928
  "tenantId": "${u.tid}",
1841
1929
  "sourceGroupId": ${b},
1842
1930
  "sourceGroupName": ${I},
1843
- "targetGroupId": ${R},
1931
+ "targetGroupId": ${v},
1844
1932
  "targetGroupName": ${D},
1845
1933
  "configurationTenantType": "${u.configurationTenantType}",
1846
1934
  "deltaToken": "${u.deltaToken}"
@@ -1848,7 +1936,7 @@ async function lt(a, t, s, r) {
1848
1936
  }), i += "]}";
1849
1937
  let c = { method: "PUT", headers: d, body: i };
1850
1938
  try {
1851
- if (r) debugger;
1939
+ if (s) debugger;
1852
1940
  console.log("Attempting PUT to /config: " + o.href);
1853
1941
  let u = await fetch(o.href, c);
1854
1942
  return u.status === 200 && u.statusText === "OK" ? (console.log(`Successful PUT to ${o.href}: ${i}`), e) : (e.error = await S(u), console.log(`Failed PUT to ${o.href}: ${i}`), console.log(e.error), e.status = 500, e.result = !1, e);
@@ -1857,15 +1945,15 @@ async function lt(a, t, s, r) {
1857
1945
  }
1858
1946
  return e;
1859
1947
  }
1860
- async function be(a, t, s, r) {
1861
- let e = new y();
1862
- if (s === "")
1948
+ async function be(a, t, r, s) {
1949
+ let e = new m();
1950
+ if (r === "")
1863
1951
  return e.result = !1, e.status = 500, e.error = "configsGet: no workspace provided", e;
1864
1952
  let n = T.configsEndpoint(), o = new URL(n);
1865
- o.searchParams.append("workspaceId", s);
1866
- let i = { method: "GET", headers: await k(a, t) };
1953
+ o.searchParams.append("workspaceId", r);
1954
+ let i = { method: "GET", headers: await A(a, t) };
1867
1955
  try {
1868
- if (r) debugger;
1956
+ if (s) debugger;
1869
1957
  console.log("Attempting GET from /configurations: " + o.href);
1870
1958
  let c = await fetch(o.href, i);
1871
1959
  if (c.status === 200 && c.statusText === "OK") {
@@ -1878,12 +1966,12 @@ async function be(a, t, s, r) {
1878
1966
  }
1879
1967
  return e;
1880
1968
  }
1881
- async function ct(a, t, s) {
1882
- let r = new y();
1969
+ async function pt(a, t, r) {
1970
+ let s = new m();
1883
1971
  if (t.companyName === "" || t.companyDomain === "")
1884
- return r.result = !1, r.error = "initPost: invalid company name or domain", r.status = 500, r;
1972
+ return s.result = !1, s.error = "initPost: invalid company name or domain", s.status = 500, s;
1885
1973
  let e = T.initEndpoint();
1886
- const n = await k(a, t);
1974
+ const n = await A(a, t);
1887
1975
  let o = `
1888
1976
  {
1889
1977
  "tenantCreateModel": {
@@ -1895,22 +1983,22 @@ async function ct(a, t, s) {
1895
1983
  }
1896
1984
  }`, d = { method: "POST", headers: n, body: o };
1897
1985
  try {
1898
- if (s) debugger;
1986
+ if (r) debugger;
1899
1987
  console.log("Attempting POST to /configuration/init: " + e);
1900
1988
  let i = await fetch(e, d);
1901
- return i.status === 200 && i.statusText === "OK" ? (console.log(`Successful POST to /configuration/init: ${o}`), r) : (r.error = await S(i), r.status = 500, r.result = !1, console.log(`Failed POST to /configuration/init: ${o}`), console.log(r.error), r);
1989
+ return i.status === 200 && i.statusText === "OK" ? (console.log(`Successful POST to /configuration/init: ${o}`), s) : (s.error = await S(i), s.status = 500, s.result = !1, console.log(`Failed POST to /configuration/init: ${o}`), console.log(s.error), s);
1902
1990
  } catch (i) {
1903
- r.error = i.message, console.log(r.error);
1991
+ s.error = i.message, console.log(s.error);
1904
1992
  }
1905
- return r.status = 500, r.result = !1, r;
1993
+ return s.status = 500, s.result = !1, s;
1906
1994
  }
1907
- async function dt(a, t, s, r, e) {
1908
- let n = new y();
1909
- if (s.tid === "" || r === "")
1995
+ async function ft(a, t, r, s, e) {
1996
+ let n = new m();
1997
+ if (r.tid === "" || s === "")
1910
1998
  return n.result = !1, n.error = "tenantDelete: invalid tid, workspaceId", n.status = 500, n;
1911
1999
  let o = new URL(T.tenantEndpoint());
1912
- o.searchParams.append("tenantId", s.tid), o.searchParams.append("workspaceId", r);
1913
- let i = { method: "DELETE", headers: await k(a, t) };
2000
+ o.searchParams.append("tenantId", r.tid), o.searchParams.append("workspaceId", s);
2001
+ let i = { method: "DELETE", headers: await A(a, t) };
1914
2002
  try {
1915
2003
  console.log("Attempting DELETE from /tenant: " + o.href);
1916
2004
  let c = await fetch(o.href, i);
@@ -1920,15 +2008,15 @@ async function dt(a, t, s, r, e) {
1920
2008
  }
1921
2009
  return n;
1922
2010
  }
1923
- async function ut(a, t, s, r) {
1924
- let e = new y();
1925
- if (s === "")
2011
+ async function ht(a, t, r, s) {
2012
+ let e = new m();
2013
+ if (r === "")
1926
2014
  return e.result = !1, e.status = 500, e.error = "tenantsGet: no workspace provided", e;
1927
2015
  let n = T.tenantsEndpoint(), o = new URL(n);
1928
- o.searchParams.append("workspaceId", s);
1929
- let i = { method: "GET", headers: await k(a, t) };
2016
+ o.searchParams.append("workspaceId", r);
2017
+ let i = { method: "GET", headers: await A(a, t) };
1930
2018
  try {
1931
- if (r) debugger;
2019
+ if (s) debugger;
1932
2020
  console.log(`Attempting GET from /tenants: ${o.href}`);
1933
2021
  let c = await fetch(o.href, i);
1934
2022
  if (c.status === 200 && c.statusText === "OK") {
@@ -1941,19 +2029,19 @@ async function ut(a, t, s, r) {
1941
2029
  }
1942
2030
  return e;
1943
2031
  }
1944
- async function pt(a, t, s, r) {
1945
- let e = new y();
1946
- if (s.tid === "" || s.name === "" || s.domain === "")
2032
+ async function gt(a, t, r, s) {
2033
+ let e = new m();
2034
+ if (r.tid === "" || r.name === "" || r.domain === "")
1947
2035
  return e.result = !1, e.error = "tenantPost: invalid tid, name, domain", e.status = 500, e;
1948
2036
  let n = T.tenantEndpoint(), o = new URL(n);
1949
- o.searchParams.append("workspaceId", r);
1950
- const d = await k(a, t);
2037
+ o.searchParams.append("workspaceId", s);
2038
+ const d = await A(a, t);
1951
2039
  let i = `
1952
- {"tenantId": "${s.tid}",
1953
- "name": "${s.name}",
1954
- "domain": "${s.domain}",
2040
+ {"tenantId": "${r.tid}",
2041
+ "name": "${r.name}",
2042
+ "domain": "${r.domain}",
1955
2043
  "type": 1,
1956
- "authority": "${s.authority}"
2044
+ "authority": "${r.authority}"
1957
2045
  }`, c = { method: "POST", headers: d, body: i };
1958
2046
  try {
1959
2047
  console.log(`Attempting POST to ${o.href}: ${i}`);
@@ -1964,13 +2052,13 @@ async function pt(a, t, s, r) {
1964
2052
  }
1965
2053
  return e;
1966
2054
  }
1967
- async function ft(a, t, s, r) {
1968
- let e = new y();
1969
- if (s == "" || r == "")
2055
+ async function mt(a, t, r, s) {
2056
+ let e = new m();
2057
+ if (r == "" || s == "")
1970
2058
  return e.result = !1, e.error = "workspacePut: invalid workspace ID or name", e.status = 500, e;
1971
2059
  let n = T.workspaceEndpoint(), o = new URL(n);
1972
- o.searchParams.append("workspaceId", s), o.searchParams.append("workspaceName", r);
1973
- let i = { method: "PUT", headers: await k(a, t) };
2060
+ o.searchParams.append("workspaceId", r), o.searchParams.append("workspaceName", s);
2061
+ let i = { method: "PUT", headers: await A(a, t) };
1974
2062
  try {
1975
2063
  console.log("Attempting PUT to /workspace: " + o.href);
1976
2064
  let c = await fetch(o.href, i);
@@ -1980,121 +2068,128 @@ async function ft(a, t, s, r) {
1980
2068
  }
1981
2069
  return e;
1982
2070
  }
1983
- async function ht(a, t, s) {
1984
- let r = new y();
2071
+ async function yt(a, t, r) {
2072
+ let s = new m();
1985
2073
  if (t.mail == null || t.mail == "")
1986
- return r.result = !1, r.status = 500, r.error = "adminsGet: no workspace provided", r;
1987
- let e = T.workspacesEndpoint(), n = new URL(e), d = { method: "GET", headers: await k(a, t) };
2074
+ return s.result = !1, s.status = 500, s.error = "adminsGet: no workspace provided", s;
2075
+ let e = T.workspacesEndpoint(), n = new URL(e), d = { method: "GET", headers: await A(a, t) };
1988
2076
  try {
1989
- if (s) debugger;
2077
+ if (r) debugger;
1990
2078
  console.log("Attempting GET from /workspaces endpoint: " + n.href);
1991
2079
  let i = await fetch(n.href, d);
1992
2080
  if (i.status === 200 && i.statusText === "OK") {
1993
2081
  let c = await i.json();
1994
- return c != null ? (r.array = c, console.log(`Successful GET from /workspaces: ${r.array.reduce((f, b) => f + b.name + " ", "")}`), r) : (r.error = "Failed GET from /workspaces: failed to JSON-parse response", console.log(r.error), r.status = 500, r.result = !1, r);
2082
+ return c != null ? (s.array = c, console.log(`Successful GET from /workspaces: ${s.array.reduce((f, b) => f + b.name + " ", "")}`), s) : (s.error = "Failed GET from /workspaces: failed to JSON-parse response", console.log(s.error), s.status = 500, s.result = !1, s);
1995
2083
  } else
1996
- return console.log(`Failed GET from /workspaces: ${n.href}`), r.error = await S(i), r.status = 500, r.result = !1, console.log(r.error), r;
2084
+ return console.log(`Failed GET from /workspaces: ${n.href}`), s.error = await S(i), s.status = 500, s.result = !1, console.log(s.error), s;
1997
2085
  } catch (i) {
1998
- r.error = i.message, r.status = 500, r.result = !1, console.log(i.message);
2086
+ s.error = i.message, s.status = 500, s.result = !1, console.log(i.message);
1999
2087
  }
2000
- return r;
2088
+ return s;
2001
2089
  }
2002
- async function gt(a, t, s) {
2003
- let r = new y();
2090
+ async function wt(a, t, r) {
2091
+ let s = new m();
2004
2092
  if (a == null || t == null)
2005
- return r.result = !1, r.error = "readerPost: invalid parameters", r.status = 500, r;
2093
+ return s.result = !1, s.error = "readerPost: invalid parameters", s.status = 500, s;
2006
2094
  let e = T.readerStartSyncEndpoint(), n = new URL(e);
2007
- n.searchParams.append("configurationId", s.id);
2008
- let d = { method: "POST", headers: await k(a, t) };
2095
+ n.searchParams.append("configurationId", r.id);
2096
+ let d = { method: "POST", headers: await A(a, t) };
2009
2097
  try {
2010
2098
  console.log("Attempting POST to /startSync: " + n.href);
2011
2099
  let i = await fetch(n.href, d);
2012
2100
  if (i.status === 200 && i.statusText === "OK") {
2013
2101
  console.log(`Successful POST to /startSync: ${e}`);
2014
2102
  let c = await i.json();
2015
- return c.PayloadStr != "" ? r.array = JSON.parse(c.PayloadStr) : (r.result = !1, r.error = "readerPost: blank payload returned, sync may be disabled on back end", r.status = 500), r;
2103
+ return c.PayloadStr != "" ? s.array = JSON.parse(c.PayloadStr) : (s.result = !1, s.error = "readerPost: blank payload returned, sync may be disabled on back end", s.status = 500), s;
2016
2104
  } else
2017
- return r.error = await S(i), console.log(`Failed POST to /startSync: ${e}`), console.log(r.error), r.status = 500, r.result = !1, r;
2105
+ return s.error = await S(i), console.log(`Failed POST to /startSync: ${e}`), console.log(s.error), s.status = 500, s.result = !1, s;
2018
2106
  } catch (i) {
2019
- r.error = i.message, r.status = 500, r.result = !1, console.log(i.message);
2107
+ s.error = i.message, s.status = 500, s.result = !1, console.log(i.message);
2020
2108
  }
2021
- return r;
2109
+ return s;
2022
2110
  }
2023
2111
  export {
2024
- y as APIResult,
2025
- kt as ActorArray,
2112
+ m as APIResult,
2113
+ Rt as ActorArray,
2026
2114
  ze as ActorNode,
2027
- $t as BatchArray,
2115
+ kt as AuditConfig,
2116
+ Pt as BatchArray,
2028
2117
  Y as Config,
2029
- St as Group,
2030
- It as InitInfo,
2118
+ $t as Group,
2119
+ Dt as InitInfo,
2031
2120
  B as Milestone,
2032
2121
  Ue as MilestoneArray,
2033
2122
  we as ResourceArray,
2034
2123
  Le as ResourceNode,
2035
2124
  Q as Task,
2036
- At as TaskArray,
2125
+ vt as TaskArray,
2037
2126
  L as Tenant,
2038
2127
  _e as TenantConfigInfo,
2039
2128
  Fe as TenantConfigType,
2040
2129
  me as TenantNode,
2041
- Ce as TenantPermissionType,
2042
- Ne as TenantType,
2130
+ Ne as TenantPermissionType,
2131
+ Ce as TenantType,
2043
2132
  X as User,
2044
- bt as UserScope,
2133
+ At as UserScope,
2045
2134
  ee as Workspace,
2046
2135
  et as adminDelete,
2047
2136
  st as adminPost,
2048
2137
  tt as adminsGet,
2138
+ _t as auditConfigAdd,
2139
+ nt as auditConfigGet,
2140
+ rt as auditConfigPost,
2141
+ Bt as auditConfigRetrieve,
2142
+ at as auditEventsGet,
2143
+ Ut as auditEventsRetrieve,
2049
2144
  U as azureConfig,
2050
- Jt as canListRootAssignments,
2051
- Ft as configConsentForRead,
2052
- _t as configConsentForWrite,
2053
- rt as configConsentReadPut,
2054
- nt as configConsentWritePut,
2055
- at as configDelete,
2056
- Ct as configEdit,
2057
- Ot as configEnable,
2058
- ot as configPatch,
2059
- it as configPost,
2060
- lt as configPut,
2061
- Wt as configRemove,
2145
+ es as canListRootAssignments,
2146
+ Mt as configConsentForRead,
2147
+ jt as configConsentForWrite,
2148
+ ot as configConsentReadPut,
2149
+ it as configConsentWritePut,
2150
+ lt as configDelete,
2151
+ Lt as configEdit,
2152
+ zt as configEnable,
2153
+ ct as configPatch,
2154
+ dt as configPost,
2155
+ ut as configPut,
2156
+ qt as configRemove,
2062
2157
  be as configsGet,
2063
- Bt as configsRefresh,
2064
- Kt as elevateGlobalAdminToUserAccessAdmin,
2065
- qt as getPowerBIAccessToken,
2158
+ Ht as configsRefresh,
2159
+ ts as elevateGlobalAdminToUserAccessAdmin,
2160
+ Yt as getPowerBIAccessToken,
2066
2161
  F as getSyncVersion,
2067
2162
  p as graphConfig,
2068
- Dt as groupsGet,
2069
- Tt as helloNpm,
2070
- Ut as initGet,
2071
- ct as initPost,
2163
+ Et as groupsGet,
2164
+ It as helloNpm,
2165
+ Jt as initGet,
2166
+ pt as initPost,
2072
2167
  T as mindlineConfig,
2073
2168
  je as oauth2PermissionGrantsGet,
2074
2169
  He as oauth2PermissionGrantsSet,
2075
2170
  S as processErrors,
2076
- gt as readerPost,
2077
- Rt as requestAdminConsent,
2171
+ wt as readerPost,
2172
+ Gt as requestAdminConsent,
2078
2173
  qe as servicePrincipalGet,
2079
- Pt as signIn,
2080
- vt as signInIncrementally,
2081
- Gt as signOut,
2082
- wt as sum,
2083
- Lt as tenantAdd,
2084
- dt as tenantDelete,
2085
- pt as tenantPost,
2086
- Et as tenantRelationshipsGetByDomain,
2174
+ xt as signIn,
2175
+ Ct as signInIncrementally,
2176
+ Nt as signOut,
2177
+ bt as sum,
2178
+ Kt as tenantAdd,
2179
+ ft as tenantDelete,
2180
+ gt as tenantPost,
2181
+ Ot as tenantRelationshipsGetByDomain,
2087
2182
  Je as tenantRelationshipsGetById,
2088
- zt as tenantRemove,
2183
+ Vt as tenantRemove,
2089
2184
  Te as tenantUnauthenticatedLookup,
2090
- ut as tenantsGet,
2091
- Mt as userAdd,
2185
+ ht as tenantsGet,
2186
+ Zt as userAdd,
2092
2187
  Ke as userDelegatedScopesGet,
2093
- xt as userDelegatedScopesRemove,
2094
- jt as userRemove,
2095
- Nt as usersGet,
2096
- Ht as workspaceEdit,
2097
- ft as workspacePut,
2098
- ht as workspacesGet
2188
+ Wt as userDelegatedScopesRemove,
2189
+ Qt as userRemove,
2190
+ Ft as usersGet,
2191
+ Xt as workspaceEdit,
2192
+ mt as workspacePut,
2193
+ yt as workspacesGet
2099
2194
  };
2100
2195
  //# sourceMappingURL=sync.es.js.map