@placeos/ts-client 4.2.2 → 4.2.4

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/index.es.js CHANGED
@@ -23,7 +23,7 @@ var ze = function() {
23
23
  return e;
24
24
  }, ze.apply(this, arguments);
25
25
  };
26
- function Lr(t, e) {
26
+ function jr(t, e) {
27
27
  var n = {};
28
28
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
29
29
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -31,7 +31,7 @@ function Lr(t, e) {
31
31
  e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
32
32
  return n;
33
33
  }
34
- function Wr(t, e, n, r) {
34
+ function Fr(t, e, n, r) {
35
35
  function i(o) {
36
36
  return o instanceof n ? o : new n(function(s) {
37
37
  s(o);
@@ -41,15 +41,15 @@ function Wr(t, e, n, r) {
41
41
  function u(_) {
42
42
  try {
43
43
  l(r.next(_));
44
- } catch (v) {
45
- s(v);
44
+ } catch (m) {
45
+ s(m);
46
46
  }
47
47
  }
48
48
  function c(_) {
49
49
  try {
50
50
  l(r.throw(_));
51
- } catch (v) {
52
- s(v);
51
+ } catch (m) {
52
+ s(m);
53
53
  }
54
54
  }
55
55
  function l(_) {
@@ -58,7 +58,7 @@ function Wr(t, e, n, r) {
58
58
  l((r = r.apply(t, e || [])).next());
59
59
  });
60
60
  }
61
- function Ln(t, e) {
61
+ function Fn(t, e) {
62
62
  var n = { label: 0, sent: function() {
63
63
  if (o[0] & 1) throw o[1];
64
64
  return o[1];
@@ -153,7 +153,7 @@ function pt(t, e, n) {
153
153
  function Ae(t) {
154
154
  return this instanceof Ae ? (this.v = t, this) : new Ae(t);
155
155
  }
156
- function Hr(t, e, n) {
156
+ function zr(t, e, n) {
157
157
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
158
158
  var r = n.apply(t, e || []), i, o = [];
159
159
  return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", s), i[Symbol.asyncIterator] = function() {
@@ -161,13 +161,13 @@ function Hr(t, e, n) {
161
161
  }, i;
162
162
  function s(a) {
163
163
  return function(h) {
164
- return Promise.resolve(h).then(a, v);
164
+ return Promise.resolve(h).then(a, m);
165
165
  };
166
166
  }
167
167
  function u(a, h) {
168
168
  r[a] && (i[a] = function(f) {
169
- return new Promise(function(S, y) {
170
- o.push([a, f, S, y]) > 1 || c(a, f);
169
+ return new Promise(function(S, g) {
170
+ o.push([a, f, S, g]) > 1 || c(a, f);
171
171
  });
172
172
  }, h && (i[a] = h(i[a])));
173
173
  }
@@ -179,19 +179,19 @@ function Hr(t, e, n) {
179
179
  }
180
180
  }
181
181
  function l(a) {
182
- a.value instanceof Ae ? Promise.resolve(a.value.v).then(_, v) : p(o[0][2], a);
182
+ a.value instanceof Ae ? Promise.resolve(a.value.v).then(_, m) : p(o[0][2], a);
183
183
  }
184
184
  function _(a) {
185
185
  c("next", a);
186
186
  }
187
- function v(a) {
187
+ function m(a) {
188
188
  c("throw", a);
189
189
  }
190
190
  function p(a, h) {
191
191
  a(h), o.shift(), o.length && c(o[0][0], o[0][1]);
192
192
  }
193
193
  }
194
- function Br(t) {
194
+ function Lr(t) {
195
195
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
196
196
  var e = t[Symbol.asyncIterator], n;
197
197
  return e ? e.call(t) : (t = typeof Oe == "function" ? Oe(t) : t[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
@@ -213,13 +213,13 @@ function Br(t) {
213
213
  function P(t) {
214
214
  return typeof t == "function";
215
215
  }
216
- function Wn(t) {
216
+ function zn(t) {
217
217
  var e = function(r) {
218
218
  Error.call(r), r.stack = new Error().stack;
219
219
  }, n = t(e);
220
220
  return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
221
221
  }
222
- var Yt = Wn(function(t) {
222
+ var Yt = zn(function(t) {
223
223
  return function(n) {
224
224
  t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
225
225
  ` + n.map(function(r, i) {
@@ -268,11 +268,11 @@ var ge = function() {
268
268
  } catch (f) {
269
269
  o = f instanceof Yt ? f.errors : [f];
270
270
  }
271
- var v = this._finalizers;
272
- if (v) {
271
+ var m = this._finalizers;
272
+ if (m) {
273
273
  this._finalizers = null;
274
274
  try {
275
- for (var p = Oe(v), a = p.next(); !a.done; a = p.next()) {
275
+ for (var p = Oe(m), a = p.next(); !a.done; a = p.next()) {
276
276
  var h = a.value;
277
277
  try {
278
278
  Sn(h);
@@ -322,16 +322,16 @@ var ge = function() {
322
322
  var e = new t();
323
323
  return e.closed = !0, e;
324
324
  }(), t;
325
- }(), Hn = ge.EMPTY;
326
- function Bn(t) {
325
+ }(), Ln = ge.EMPTY;
326
+ function Hn(t) {
327
327
  return t instanceof ge || t && "closed" in t && P(t.remove) && P(t.add) && P(t.unsubscribe);
328
328
  }
329
329
  function Sn(t) {
330
330
  P(t) ? t() : t.unsubscribe();
331
331
  }
332
- var Vr = {
332
+ var Hr = {
333
333
  Promise: void 0
334
- }, Qr = {
334
+ }, Wr = {
335
335
  setTimeout: function(t, e) {
336
336
  for (var n = [], r = 2; r < arguments.length; r++)
337
337
  n[r - 2] = arguments[r];
@@ -342,8 +342,8 @@ var Vr = {
342
342
  },
343
343
  delegate: void 0
344
344
  };
345
- function Vn(t) {
346
- Qr.setTimeout(function() {
345
+ function Wn(t) {
346
+ Wr.setTimeout(function() {
347
347
  throw t;
348
348
  });
349
349
  }
@@ -356,7 +356,7 @@ var At = function(t) {
356
356
  Z(e, t);
357
357
  function e(n) {
358
358
  var r = t.call(this) || this;
359
- return r.isStopped = !1, n ? (r.destination = n, Bn(n) && n.add(r)) : r.destination = Kr, r;
359
+ return r.isStopped = !1, n ? (r.destination = n, Hn(n) && n.add(r)) : r.destination = Qr, r;
360
360
  }
361
361
  return e.create = function(n, r, i) {
362
362
  return new en(n, r, i);
@@ -383,7 +383,7 @@ var At = function(t) {
383
383
  this.unsubscribe();
384
384
  }
385
385
  }, e;
386
- }(ge), Yr = function() {
386
+ }(ge), Br = function() {
387
387
  function t(e) {
388
388
  this.partialObserver = e;
389
389
  }
@@ -422,35 +422,35 @@ var At = function(t) {
422
422
  next: n ?? void 0,
423
423
  error: r ?? void 0,
424
424
  complete: i ?? void 0
425
- } : s = n, o.destination = new Yr(s), o;
425
+ } : s = n, o.destination = new Br(s), o;
426
426
  }
427
427
  return e;
428
428
  }(At);
429
429
  function ct(t) {
430
- Vn(t);
430
+ Wn(t);
431
431
  }
432
- function Jr(t) {
432
+ function Vr(t) {
433
433
  throw t;
434
434
  }
435
- var Kr = {
435
+ var Qr = {
436
436
  closed: !0,
437
437
  next: kn,
438
- error: Jr,
438
+ error: Vr,
439
439
  complete: kn
440
440
  }, on = function() {
441
441
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
442
442
  }();
443
- function Qn(t) {
443
+ function sn(t) {
444
444
  return t;
445
445
  }
446
- function Zr(t) {
447
- return t.length === 0 ? Qn : t.length === 1 ? t[0] : function(n) {
446
+ function Yr(t) {
447
+ return t.length === 0 ? sn : t.length === 1 ? t[0] : function(n) {
448
448
  return t.reduce(function(r, i) {
449
449
  return i(r);
450
450
  }, n);
451
451
  };
452
452
  }
453
- var q = function() {
453
+ var T = function() {
454
454
  function t(e) {
455
455
  e && (this._subscribe = e);
456
456
  }
@@ -458,7 +458,7 @@ var q = function() {
458
458
  var n = new t();
459
459
  return n.source = this, n.operator = e, n;
460
460
  }, t.prototype.subscribe = function(e, n, r) {
461
- var i = this, o = Xr(e) ? e : new en(e, n, r);
461
+ var i = this, o = Kr(e) ? e : new en(e, n, r);
462
462
  return lt(function() {
463
463
  var s = i, u = s.operator, c = s.source;
464
464
  o.add(u ? u.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
@@ -493,7 +493,7 @@ var q = function() {
493
493
  }, t.prototype.pipe = function() {
494
494
  for (var e = [], n = 0; n < arguments.length; n++)
495
495
  e[n] = arguments[n];
496
- return Zr(e)(this);
496
+ return Yr(e)(this);
497
497
  }, t.prototype.toPromise = function(e) {
498
498
  var n = this;
499
499
  return e = xn(e), new e(function(r, i) {
@@ -512,20 +512,20 @@ var q = function() {
512
512
  }();
513
513
  function xn(t) {
514
514
  var e;
515
- return (e = t ?? Vr.Promise) !== null && e !== void 0 ? e : Promise;
515
+ return (e = t ?? Hr.Promise) !== null && e !== void 0 ? e : Promise;
516
516
  }
517
- function Gr(t) {
517
+ function Jr(t) {
518
518
  return t && P(t.next) && P(t.error) && P(t.complete);
519
519
  }
520
- function Xr(t) {
521
- return t && t instanceof At || Gr(t) && Bn(t);
520
+ function Kr(t) {
521
+ return t && t instanceof At || Jr(t) && Hn(t);
522
522
  }
523
- function ei(t) {
523
+ function Zr(t) {
524
524
  return P(t?.lift);
525
525
  }
526
526
  function re(t) {
527
527
  return function(e) {
528
- if (ei(e))
528
+ if (Zr(e))
529
529
  return e.lift(function(n) {
530
530
  try {
531
531
  return t(n, this);
@@ -537,9 +537,9 @@ function re(t) {
537
537
  };
538
538
  }
539
539
  function J(t, e, n, r, i) {
540
- return new ti(t, e, n, r, i);
540
+ return new Gr(t, e, n, r, i);
541
541
  }
542
- var ti = function(t) {
542
+ var Gr = function(t) {
543
543
  Z(e, t);
544
544
  function e(n, r, i, o, s, u) {
545
545
  var c = t.call(this, n) || this;
@@ -574,11 +574,11 @@ var ti = function(t) {
574
574
  t.prototype.unsubscribe.call(this), !r && ((n = this.onFinalize) === null || n === void 0 || n.call(this));
575
575
  }
576
576
  }, e;
577
- }(At), ni = Wn(function(t) {
577
+ }(At), Xr = zn(function(t) {
578
578
  return function() {
579
579
  t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
580
580
  };
581
- }), ae = function(t) {
581
+ }), me = function(t) {
582
582
  Z(e, t);
583
583
  function e() {
584
584
  var n = t.call(this) || this;
@@ -589,7 +589,7 @@ var ti = function(t) {
589
589
  return r.operator = n, r;
590
590
  }, e.prototype._throwIfClosed = function() {
591
591
  if (this.closed)
592
- throw new ni();
592
+ throw new Xr();
593
593
  }, e.prototype.next = function(n) {
594
594
  var r = this;
595
595
  lt(function() {
@@ -645,19 +645,19 @@ var ti = function(t) {
645
645
  return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
646
646
  }, e.prototype._innerSubscribe = function(n) {
647
647
  var r = this, i = this, o = i.hasError, s = i.isStopped, u = i.observers;
648
- return o || s ? Hn : (this.currentObservers = null, u.push(n), new ge(function() {
648
+ return o || s ? Ln : (this.currentObservers = null, u.push(n), new ge(function() {
649
649
  r.currentObservers = null, _t(u, n);
650
650
  }));
651
651
  }, e.prototype._checkFinalizedStatuses = function(n) {
652
652
  var r = this, i = r.hasError, o = r.thrownError, s = r.isStopped;
653
653
  i ? n.error(o) : s && n.complete();
654
654
  }, e.prototype.asObservable = function() {
655
- var n = new q();
655
+ var n = new T();
656
656
  return n.source = this, n;
657
657
  }, e.create = function(n, r) {
658
658
  return new tn(n, r);
659
659
  }, e;
660
- }(q), tn = function(t) {
660
+ }(T), tn = function(t) {
661
661
  Z(e, t);
662
662
  function e(n, r) {
663
663
  var i = t.call(this) || this;
@@ -674,9 +674,9 @@ var ti = function(t) {
674
674
  (r = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || r === void 0 || r.call(n);
675
675
  }, e.prototype._subscribe = function(n) {
676
676
  var r, i;
677
- return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(n)) !== null && i !== void 0 ? i : Hn;
677
+ return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(n)) !== null && i !== void 0 ? i : Ln;
678
678
  }, e;
679
- }(ae), le = function(t) {
679
+ }(me), ae = function(t) {
680
680
  Z(e, t);
681
681
  function e(n) {
682
682
  var r = t.call(this) || this;
@@ -699,15 +699,15 @@ var ti = function(t) {
699
699
  }, e.prototype.next = function(n) {
700
700
  t.prototype.next.call(this, this._value = n);
701
701
  }, e;
702
- }(ae), sn = {
702
+ }(me), un = {
703
703
  now: function() {
704
- return (sn.delegate || Date).now();
704
+ return (un.delegate || Date).now();
705
705
  },
706
706
  delegate: void 0
707
707
  }, Jt = function(t) {
708
708
  Z(e, t);
709
709
  function e(n, r, i) {
710
- n === void 0 && (n = 1 / 0), r === void 0 && (r = 1 / 0), i === void 0 && (i = sn);
710
+ n === void 0 && (n = 1 / 0), r === void 0 && (r = 1 / 0), i === void 0 && (i = un);
711
711
  var o = t.call(this) || this;
712
712
  return o._bufferSize = n, o._windowTime = r, o._timestampProvider = i, o._buffer = [], o._infiniteTimeWindow = !0, o._infiniteTimeWindow = r === 1 / 0, o._bufferSize = Math.max(1, n), o._windowTime = Math.max(1, r), o;
713
713
  }
@@ -727,7 +727,7 @@ var ti = function(t) {
727
727
  l && o.splice(0, l + 1);
728
728
  }
729
729
  }, e;
730
- }(ae), ri = function(t) {
730
+ }(me), ei = function(t) {
731
731
  Z(e, t);
732
732
  function e(n, r) {
733
733
  return t.call(this) || this;
@@ -745,7 +745,7 @@ var ti = function(t) {
745
745
  return clearInterval(t);
746
746
  },
747
747
  delegate: void 0
748
- }, ii = function(t) {
748
+ }, ti = function(t) {
749
749
  Z(e, t);
750
750
  function e(n, r) {
751
751
  var i = t.call(this, n, r) || this;
@@ -787,14 +787,14 @@ var ti = function(t) {
787
787
  this.work = this.state = this.scheduler = null, this.pending = !1, _t(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, t.prototype.unsubscribe.call(this);
788
788
  }
789
789
  }, e;
790
- }(ri), An = function() {
790
+ }(ei), An = function() {
791
791
  function t(e, n) {
792
792
  n === void 0 && (n = t.now), this.schedulerActionCtor = e, this.now = n;
793
793
  }
794
794
  return t.prototype.schedule = function(e, n, r) {
795
795
  return n === void 0 && (n = 0), new this.schedulerActionCtor(this, e).schedule(r, n);
796
- }, t.now = sn.now, t;
797
- }(), oi = function(t) {
796
+ }, t.now = un.now, t;
797
+ }(), ni = function(t) {
798
798
  Z(e, t);
799
799
  function e(n, r) {
800
800
  r === void 0 && (r = An.now);
@@ -819,44 +819,38 @@ var ti = function(t) {
819
819
  throw i;
820
820
  }
821
821
  }, e;
822
- }(An), Yn = new oi(ii), si = Yn, ui = new q(function(t) {
822
+ }(An), Bn = new ni(ti), ri = Bn, ii = new T(function(t) {
823
823
  return t.complete();
824
824
  });
825
- function Jn(t) {
825
+ function oi(t) {
826
826
  return t && P(t.schedule);
827
827
  }
828
- function ci(t) {
829
- return t[t.length - 1];
830
- }
831
- function ai(t) {
832
- return Jn(ci(t)) ? t.pop() : void 0;
833
- }
834
- var Kn = function(t) {
828
+ var Vn = function(t) {
835
829
  return t && typeof t.length == "number" && typeof t != "function";
836
830
  };
837
- function Zn(t) {
831
+ function Qn(t) {
838
832
  return P(t?.then);
839
833
  }
840
- function Gn(t) {
834
+ function Yn(t) {
841
835
  return P(t[on]);
842
836
  }
843
- function Xn(t) {
837
+ function Jn(t) {
844
838
  return Symbol.asyncIterator && P(t?.[Symbol.asyncIterator]);
845
839
  }
846
- function er(t) {
840
+ function Kn(t) {
847
841
  return new TypeError("You provided " + (t !== null && typeof t == "object" ? "an invalid object" : "'" + t + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
848
842
  }
849
- function li() {
843
+ function si() {
850
844
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
851
845
  }
852
- var tr = li();
853
- function nr(t) {
854
- return P(t?.[tr]);
846
+ var Zn = si();
847
+ function Gn(t) {
848
+ return P(t?.[Zn]);
855
849
  }
856
- function rr(t) {
857
- return Hr(this, arguments, function() {
850
+ function Xn(t) {
851
+ return zr(this, arguments, function() {
858
852
  var n, r, i, o;
859
- return Ln(this, function(s) {
853
+ return Fn(this, function(s) {
860
854
  switch (s.label) {
861
855
  case 0:
862
856
  n = t.getReader(), s.label = 1;
@@ -884,54 +878,54 @@ function rr(t) {
884
878
  });
885
879
  });
886
880
  }
887
- function ir(t) {
881
+ function er(t) {
888
882
  return P(t?.getReader);
889
883
  }
890
884
  function ie(t) {
891
- if (t instanceof q)
885
+ if (t instanceof T)
892
886
  return t;
893
887
  if (t != null) {
888
+ if (Yn(t))
889
+ return ui(t);
890
+ if (Vn(t))
891
+ return ci(t);
892
+ if (Qn(t))
893
+ return ai(t);
894
+ if (Jn(t))
895
+ return tr(t);
894
896
  if (Gn(t))
897
+ return li(t);
898
+ if (er(t))
895
899
  return fi(t);
896
- if (Kn(t))
897
- return hi(t);
898
- if (Zn(t))
899
- return di(t);
900
- if (Xn(t))
901
- return or(t);
902
- if (nr(t))
903
- return pi(t);
904
- if (ir(t))
905
- return _i(t);
906
900
  }
907
- throw er(t);
901
+ throw Kn(t);
908
902
  }
909
- function fi(t) {
910
- return new q(function(e) {
903
+ function ui(t) {
904
+ return new T(function(e) {
911
905
  var n = t[on]();
912
906
  if (P(n.subscribe))
913
907
  return n.subscribe(e);
914
908
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
915
909
  });
916
910
  }
917
- function hi(t) {
918
- return new q(function(e) {
911
+ function ci(t) {
912
+ return new T(function(e) {
919
913
  for (var n = 0; n < t.length && !e.closed; n++)
920
914
  e.next(t[n]);
921
915
  e.complete();
922
916
  });
923
917
  }
924
- function di(t) {
925
- return new q(function(e) {
918
+ function ai(t) {
919
+ return new T(function(e) {
926
920
  t.then(function(n) {
927
921
  e.closed || (e.next(n), e.complete());
928
922
  }, function(n) {
929
923
  return e.error(n);
930
- }).then(null, Vn);
924
+ }).then(null, Wn);
931
925
  });
932
926
  }
933
- function pi(t) {
934
- return new q(function(e) {
927
+ function li(t) {
928
+ return new T(function(e) {
935
929
  var n, r;
936
930
  try {
937
931
  for (var i = Oe(t), o = i.next(); !o.done; o = i.next()) {
@@ -951,24 +945,24 @@ function pi(t) {
951
945
  e.complete();
952
946
  });
953
947
  }
954
- function or(t) {
955
- return new q(function(e) {
956
- mi(t, e).catch(function(n) {
948
+ function tr(t) {
949
+ return new T(function(e) {
950
+ hi(t, e).catch(function(n) {
957
951
  return e.error(n);
958
952
  });
959
953
  });
960
954
  }
961
- function _i(t) {
962
- return or(rr(t));
955
+ function fi(t) {
956
+ return tr(Xn(t));
963
957
  }
964
- function mi(t, e) {
958
+ function hi(t, e) {
965
959
  var n, r, i, o;
966
- return Wr(this, void 0, void 0, function() {
960
+ return Fr(this, void 0, void 0, function() {
967
961
  var s, u;
968
- return Ln(this, function(c) {
962
+ return Fn(this, function(c) {
969
963
  switch (c.label) {
970
964
  case 0:
971
- c.trys.push([0, 5, 6, 11]), n = Br(t), c.label = 1;
965
+ c.trys.push([0, 5, 6, 11]), n = Lr(t), c.label = 1;
972
966
  case 1:
973
967
  return [4, n.next()];
974
968
  case 2:
@@ -999,7 +993,7 @@ function mi(t, e) {
999
993
  });
1000
994
  });
1001
995
  }
1002
- function _e(t, e, n, r, i) {
996
+ function pe(t, e, n, r, i) {
1003
997
  r === void 0 && (r = 0), i === void 0 && (i = !1);
1004
998
  var o = e.schedule(function() {
1005
999
  n(), i ? t.add(this.schedule(null, r)) : this.unsubscribe();
@@ -1007,49 +1001,49 @@ function _e(t, e, n, r, i) {
1007
1001
  if (t.add(o), !i)
1008
1002
  return o;
1009
1003
  }
1010
- function sr(t, e) {
1004
+ function nr(t, e) {
1011
1005
  return e === void 0 && (e = 0), re(function(n, r) {
1012
1006
  n.subscribe(J(r, function(i) {
1013
- return _e(r, t, function() {
1007
+ return pe(r, t, function() {
1014
1008
  return r.next(i);
1015
1009
  }, e);
1016
1010
  }, function() {
1017
- return _e(r, t, function() {
1011
+ return pe(r, t, function() {
1018
1012
  return r.complete();
1019
1013
  }, e);
1020
1014
  }, function(i) {
1021
- return _e(r, t, function() {
1015
+ return pe(r, t, function() {
1022
1016
  return r.error(i);
1023
1017
  }, e);
1024
1018
  }));
1025
1019
  });
1026
1020
  }
1027
- function ur(t, e) {
1021
+ function rr(t, e) {
1028
1022
  return e === void 0 && (e = 0), re(function(n, r) {
1029
1023
  r.add(t.schedule(function() {
1030
1024
  return n.subscribe(r);
1031
1025
  }, e));
1032
1026
  });
1033
1027
  }
1034
- function yi(t, e) {
1035
- return ie(t).pipe(ur(e), sr(e));
1028
+ function di(t, e) {
1029
+ return ie(t).pipe(rr(e), nr(e));
1036
1030
  }
1037
- function gi(t, e) {
1038
- return ie(t).pipe(ur(e), sr(e));
1031
+ function pi(t, e) {
1032
+ return ie(t).pipe(rr(e), nr(e));
1039
1033
  }
1040
- function bi(t, e) {
1041
- return new q(function(n) {
1034
+ function _i(t, e) {
1035
+ return new T(function(n) {
1042
1036
  var r = 0;
1043
1037
  return e.schedule(function() {
1044
1038
  r === t.length ? n.complete() : (n.next(t[r++]), n.closed || this.schedule());
1045
1039
  });
1046
1040
  });
1047
1041
  }
1048
- function vi(t, e) {
1049
- return new q(function(n) {
1042
+ function mi(t, e) {
1043
+ return new T(function(n) {
1050
1044
  var r;
1051
- return _e(n, e, function() {
1052
- r = t[tr](), _e(n, e, function() {
1045
+ return pe(n, e, function() {
1046
+ r = t[Zn](), pe(n, e, function() {
1053
1047
  var i, o, s;
1054
1048
  try {
1055
1049
  i = r.next(), o = i.value, s = i.done;
@@ -1064,13 +1058,13 @@ function vi(t, e) {
1064
1058
  };
1065
1059
  });
1066
1060
  }
1067
- function cr(t, e) {
1061
+ function ir(t, e) {
1068
1062
  if (!t)
1069
1063
  throw new Error("Iterable cannot be null");
1070
- return new q(function(n) {
1071
- _e(n, e, function() {
1064
+ return new T(function(n) {
1065
+ pe(n, e, function() {
1072
1066
  var r = t[Symbol.asyncIterator]();
1073
- _e(n, e, function() {
1067
+ pe(n, e, function() {
1074
1068
  r.next().then(function(i) {
1075
1069
  i.done ? n.complete() : n.next(i.value);
1076
1070
  });
@@ -1078,44 +1072,38 @@ function cr(t, e) {
1078
1072
  });
1079
1073
  });
1080
1074
  }
1081
- function Si(t, e) {
1082
- return cr(rr(t), e);
1075
+ function yi(t, e) {
1076
+ return ir(Xn(t), e);
1083
1077
  }
1084
- function ki(t, e) {
1078
+ function gi(t, e) {
1085
1079
  if (t != null) {
1080
+ if (Yn(t))
1081
+ return di(t, e);
1082
+ if (Vn(t))
1083
+ return _i(t, e);
1084
+ if (Qn(t))
1085
+ return pi(t, e);
1086
+ if (Jn(t))
1087
+ return ir(t, e);
1086
1088
  if (Gn(t))
1089
+ return mi(t, e);
1090
+ if (er(t))
1087
1091
  return yi(t, e);
1088
- if (Kn(t))
1089
- return bi(t, e);
1090
- if (Zn(t))
1091
- return gi(t, e);
1092
- if (Xn(t))
1093
- return cr(t, e);
1094
- if (nr(t))
1095
- return vi(t, e);
1096
- if (ir(t))
1097
- return Si(t, e);
1098
1092
  }
1099
- throw er(t);
1100
- }
1101
- function ar(t, e) {
1102
- return e ? ki(t, e) : ie(t);
1093
+ throw Kn(t);
1103
1094
  }
1104
- function wn() {
1105
- for (var t = [], e = 0; e < arguments.length; e++)
1106
- t[e] = arguments[e];
1107
- var n = ai(t);
1108
- return ar(t, n);
1095
+ function vi(t, e) {
1096
+ return e ? gi(t, e) : ie(t);
1109
1097
  }
1110
- function On(t, e) {
1098
+ function bi(t, e) {
1111
1099
  var n = P(t) ? t : function() {
1112
1100
  return t;
1113
1101
  }, r = function(i) {
1114
1102
  return i.error(n());
1115
1103
  };
1116
- return new q(r);
1104
+ return new T(r);
1117
1105
  }
1118
- function xi(t) {
1106
+ function Si(t) {
1119
1107
  return t instanceof Date && !isNaN(t);
1120
1108
  }
1121
1109
  function I(t, e) {
@@ -1126,27 +1114,27 @@ function I(t, e) {
1126
1114
  }));
1127
1115
  });
1128
1116
  }
1129
- function $i(t, e, n, r, i, o, s, u) {
1130
- var c = [], l = 0, _ = 0, v = !1, p = function() {
1131
- v && !c.length && !l && e.complete();
1117
+ function ki(t, e, n, r, i, o, s, u) {
1118
+ var c = [], l = 0, _ = 0, m = !1, p = function() {
1119
+ m && !c.length && !l && e.complete();
1132
1120
  }, a = function(f) {
1133
1121
  return l < r ? h(f) : c.push(f);
1134
1122
  }, h = function(f) {
1135
1123
  l++;
1136
1124
  var S = !1;
1137
- ie(n(f, _++)).subscribe(J(e, function(y) {
1138
- e.next(y);
1125
+ ie(n(f, _++)).subscribe(J(e, function(g) {
1126
+ e.next(g);
1139
1127
  }, function() {
1140
1128
  S = !0;
1141
1129
  }, void 0, function() {
1142
1130
  if (S)
1143
1131
  try {
1144
1132
  l--;
1145
- for (var y = function() {
1133
+ for (var g = function() {
1146
1134
  var k = c.shift();
1147
1135
  s || h(k);
1148
1136
  }; c.length && l < r; )
1149
- y();
1137
+ g();
1150
1138
  p();
1151
1139
  } catch (k) {
1152
1140
  e.error(k);
@@ -1154,24 +1142,24 @@ function $i(t, e, n, r, i, o, s, u) {
1154
1142
  }));
1155
1143
  };
1156
1144
  return t.subscribe(J(e, a, function() {
1157
- v = !0, p();
1145
+ m = !0, p();
1158
1146
  })), function() {
1159
1147
  };
1160
1148
  }
1161
- function un(t, e, n) {
1162
- return n === void 0 && (n = 1 / 0), P(e) ? un(function(r, i) {
1149
+ function or(t, e, n) {
1150
+ return n === void 0 && (n = 1 / 0), P(e) ? or(function(r, i) {
1163
1151
  return I(function(o, s) {
1164
1152
  return e(r, o, i, s);
1165
1153
  })(ie(t(r, i)));
1166
1154
  }, n) : (typeof e == "number" && (n = e), re(function(r, i) {
1167
- return $i(r, i, t, n);
1155
+ return ki(r, i, t, n);
1168
1156
  }));
1169
1157
  }
1170
- function Ai(t, e, n) {
1171
- t === void 0 && (t = 0), n === void 0 && (n = si);
1158
+ function sr(t, e, n) {
1159
+ t === void 0 && (t = 0), n === void 0 && (n = ri);
1172
1160
  var r = -1;
1173
- return e != null && (Jn(e) ? n = e : r = e), new q(function(i) {
1174
- var o = xi(t) ? +t - n.now() : t;
1161
+ return e != null && (oi(e) ? n = e : r = e), new T(function(i) {
1162
+ var o = Si(t) ? +t - n.now() : t;
1175
1163
  o < 0 && (o = 0);
1176
1164
  var s = 0;
1177
1165
  return n.schedule(function() {
@@ -1179,7 +1167,7 @@ function Ai(t, e, n) {
1179
1167
  }, o);
1180
1168
  });
1181
1169
  }
1182
- function wi(t, e) {
1170
+ function xi(t, e) {
1183
1171
  return re(function(n, r) {
1184
1172
  var i = 0;
1185
1173
  n.subscribe(J(r, function(o) {
@@ -1187,9 +1175,9 @@ function wi(t, e) {
1187
1175
  }));
1188
1176
  });
1189
1177
  }
1190
- function lr(t) {
1178
+ function ur(t) {
1191
1179
  return t <= 0 ? function() {
1192
- return ui;
1180
+ return ii;
1193
1181
  } : re(function(e, n) {
1194
1182
  var r = 0;
1195
1183
  e.subscribe(J(n, function(i) {
@@ -1197,25 +1185,25 @@ function lr(t) {
1197
1185
  }));
1198
1186
  });
1199
1187
  }
1200
- function Oi(t) {
1188
+ function $i(t) {
1201
1189
  return I(function() {
1202
1190
  return t;
1203
1191
  });
1204
1192
  }
1205
- function Ei(t, e) {
1206
- return un(function(n, r) {
1207
- return ie(t(n, r)).pipe(lr(1), Oi(n));
1193
+ function Ai(t, e) {
1194
+ return or(function(n, r) {
1195
+ return ie(t(n, r)).pipe(ur(1), $i(n));
1208
1196
  });
1209
1197
  }
1210
- function Ii(t, e) {
1211
- e === void 0 && (e = Yn);
1212
- var n = Ai(t, e);
1213
- return Ei(function() {
1198
+ function wi(t, e) {
1199
+ e === void 0 && (e = Bn);
1200
+ var n = sr(t, e);
1201
+ return Ai(function() {
1214
1202
  return n;
1215
1203
  });
1216
1204
  }
1217
- function Pi(t, e) {
1218
- return e === void 0 && (e = Qn), t = t ?? Ti, re(function(n, r) {
1205
+ function Oi(t, e) {
1206
+ return e === void 0 && (e = sn), t = t ?? Ei, re(function(n, r) {
1219
1207
  var i, o = !0;
1220
1208
  n.subscribe(J(r, function(s) {
1221
1209
  var u = e(s);
@@ -1223,22 +1211,43 @@ function Pi(t, e) {
1223
1211
  }));
1224
1212
  });
1225
1213
  }
1226
- function Ti(t, e) {
1214
+ function Ei(t, e) {
1227
1215
  return t === e;
1228
1216
  }
1229
- function Mi(t) {
1230
- return re(function(e, n) {
1231
- var r, i = !1, o, s = function() {
1232
- r = e.subscribe(J(n, void 0, void 0, function(u) {
1233
- o || (o = new ae(), ie(t(o)).subscribe(J(n, function() {
1234
- return r ? s() : i = !0;
1235
- }))), o && o.next(u);
1236
- })), i && (r.unsubscribe(), r = null, i = !1, s());
1217
+ function Ii(t) {
1218
+ t === void 0 && (t = 1 / 0);
1219
+ var e;
1220
+ t && typeof t == "object" ? e = t : e = {
1221
+ count: t
1222
+ };
1223
+ var n = e.count, r = n === void 0 ? 1 / 0 : n, i = e.delay, o = e.resetOnSuccess, s = o === void 0 ? !1 : o;
1224
+ return r <= 0 ? sn : re(function(u, c) {
1225
+ var l = 0, _, m = function() {
1226
+ var p = !1;
1227
+ _ = u.subscribe(J(c, function(a) {
1228
+ s && (l = 0), c.next(a);
1229
+ }, void 0, function(a) {
1230
+ if (l++ < r) {
1231
+ var h = function() {
1232
+ _ ? (_.unsubscribe(), _ = null, m()) : p = !0;
1233
+ };
1234
+ if (i != null) {
1235
+ var f = typeof i == "number" ? sr(i) : ie(i(a, l)), S = J(c, function() {
1236
+ S.unsubscribe(), h();
1237
+ }, function() {
1238
+ c.complete();
1239
+ });
1240
+ f.subscribe(S);
1241
+ } else
1242
+ h();
1243
+ } else
1244
+ c.error(a);
1245
+ })), p && (_.unsubscribe(), _ = null, m());
1237
1246
  };
1238
- s();
1247
+ m();
1239
1248
  });
1240
1249
  }
1241
- function En(t, e) {
1250
+ function wn(t, e) {
1242
1251
  return re(function(n, r) {
1243
1252
  var i = null, o = 0, s = !1, u = function() {
1244
1253
  return s && !i && r.complete();
@@ -1246,8 +1255,8 @@ function En(t, e) {
1246
1255
  n.subscribe(J(r, function(c) {
1247
1256
  i?.unsubscribe();
1248
1257
  var l = 0, _ = o++;
1249
- ie(t(c, _)).subscribe(i = J(r, function(v) {
1250
- return r.next(e ? e(c, v, _, l++) : v);
1258
+ ie(t(c, _)).subscribe(i = J(r, function(m) {
1259
+ return r.next(e ? e(c, m, _, l++) : m);
1251
1260
  }, function() {
1252
1261
  i = null, u();
1253
1262
  }));
@@ -1258,8 +1267,8 @@ function En(t, e) {
1258
1267
  }
1259
1268
  function cn(t, e) {
1260
1269
  e === void 0 && (e = {});
1261
- var n = e.selector, r = Lr(e, ["selector"]);
1262
- return new q(function(i) {
1270
+ var n = e.selector, r = jr(e, ["selector"]);
1271
+ return new T(function(i) {
1263
1272
  var o = new AbortController(), s = o.signal, u = !0, c = r.signal;
1264
1273
  if (c)
1265
1274
  if (c.aborted)
@@ -1272,14 +1281,14 @@ function cn(t, e) {
1272
1281
  return c.removeEventListener("abort", l);
1273
1282
  });
1274
1283
  }
1275
- var _ = ze(ze({}, r), { signal: s }), v = function(p) {
1284
+ var _ = ze(ze({}, r), { signal: s }), m = function(p) {
1276
1285
  u = !1, i.error(p);
1277
1286
  };
1278
1287
  return fetch(t, _).then(function(p) {
1279
1288
  n ? ie(n(p)).subscribe(J(i, void 0, function() {
1280
1289
  u = !1, i.complete();
1281
- }, v)) : (u = !1, i.next(p), i.complete());
1282
- }).catch(v), function() {
1290
+ }, m)) : (u = !1, i.next(p), i.complete());
1291
+ }).catch(m), function() {
1283
1292
  u && o.abort();
1284
1293
  };
1285
1294
  });
@@ -1349,7 +1358,7 @@ const te = [
1349
1358
  "9",
1350
1359
  "+",
1351
1360
  "/"
1352
- ], In = [
1361
+ ], On = [
1353
1362
  255,
1354
1363
  255,
1355
1364
  255,
@@ -1475,20 +1484,20 @@ const te = [
1475
1484
  51
1476
1485
  ];
1477
1486
  function at(t) {
1478
- if (t >= In.length)
1487
+ if (t >= On.length)
1479
1488
  throw new Error("Unable to parse base64 string.");
1480
- const e = In[t];
1489
+ const e = On[t];
1481
1490
  if (e === 255)
1482
1491
  throw new Error("Unable to parse base64 string.");
1483
1492
  return e;
1484
1493
  }
1485
- function fr(t) {
1494
+ function cr(t) {
1486
1495
  let e = "", n, r = t.length;
1487
1496
  for (n = 2; n < r; n += 3)
1488
1497
  e += te[t[n - 2] >> 2], e += te[(t[n - 2] & 3) << 4 | t[n - 1] >> 4], e += te[(t[n - 1] & 15) << 2 | t[n] >> 6], e += te[t[n] & 63];
1489
1498
  return n === r + 1 && (e += te[t[n - 2] >> 2], e += te[(t[n - 2] & 3) << 4], e += "=="), n === r && (e += te[t[n - 2] >> 2], e += te[(t[n - 2] & 3) << 4 | t[n - 1] >> 4], e += te[(t[n - 1] & 15) << 2], e += "="), e;
1490
1499
  }
1491
- function Ri(t) {
1500
+ function Pi(t) {
1492
1501
  if (t.length % 4 !== 0)
1493
1502
  throw new Error("Unable to parse base64 string.");
1494
1503
  const e = t.indexOf("=");
@@ -1499,12 +1508,12 @@ function Ri(t) {
1499
1508
  o = at(t.charCodeAt(s)) << 18 | at(t.charCodeAt(s + 1)) << 12 | at(t.charCodeAt(s + 2)) << 6 | at(t.charCodeAt(s + 3)), i[u] = o >> 16, i[u + 1] = o >> 8 & 255, i[u + 2] = o & 255;
1500
1509
  return i.subarray(0, i.length - n);
1501
1510
  }
1502
- function Ui(t, e = new TextEncoder()) {
1503
- return fr(e.encode(t));
1511
+ function Ti(t, e = new TextEncoder()) {
1512
+ return cr(e.encode(t));
1504
1513
  }
1505
- var ft = { exports: {} }, Di = ft.exports, Pn;
1506
- function qi() {
1507
- return Pn || (Pn = 1, function(t) {
1514
+ var ft = { exports: {} }, Mi = ft.exports, En;
1515
+ function Ri() {
1516
+ return En || (En = 1, function(t) {
1508
1517
  (function(e, n) {
1509
1518
  var r = {};
1510
1519
  n(r);
@@ -1512,7 +1521,7 @@ function qi() {
1512
1521
  for (var o in r)
1513
1522
  i[o] = r[o];
1514
1523
  t.exports = i;
1515
- })(Di, function(e) {
1524
+ })(Mi, function(e) {
1516
1525
  e.__esModule = !0, e.digestLength = 32, e.blockSize = 64;
1517
1526
  var n = new Uint32Array([
1518
1527
  1116352408,
@@ -1581,14 +1590,14 @@ function qi() {
1581
1590
  3329325298
1582
1591
  ]);
1583
1592
  function r(p, a, h, f, S) {
1584
- for (var y, k, x, W, R, O, G, U, j, D, Ce, Ne, ut; S >= 64; ) {
1585
- for (y = a[0], k = a[1], x = a[2], W = a[3], R = a[4], O = a[5], G = a[6], U = a[7], D = 0; D < 16; D++)
1586
- Ce = f + D * 4, p[D] = (h[Ce] & 255) << 24 | (h[Ce + 1] & 255) << 16 | (h[Ce + 2] & 255) << 8 | h[Ce + 3] & 255;
1587
- for (D = 16; D < 64; D++)
1588
- j = p[D - 2], Ne = (j >>> 17 | j << 15) ^ (j >>> 19 | j << 13) ^ j >>> 10, j = p[D - 15], ut = (j >>> 7 | j << 25) ^ (j >>> 18 | j << 14) ^ j >>> 3, p[D] = (Ne + p[D - 7] | 0) + (ut + p[D - 16] | 0);
1589
- for (D = 0; D < 64; D++)
1590
- Ne = (((R >>> 6 | R << 26) ^ (R >>> 11 | R << 21) ^ (R >>> 25 | R << 7)) + (R & O ^ ~R & G) | 0) + (U + (n[D] + p[D] | 0) | 0) | 0, ut = ((y >>> 2 | y << 30) ^ (y >>> 13 | y << 19) ^ (y >>> 22 | y << 10)) + (y & k ^ y & x ^ k & x) | 0, U = G, G = O, O = R, R = W + Ne | 0, W = x, x = k, k = y, y = Ne + ut | 0;
1591
- a[0] += y, a[1] += k, a[2] += x, a[3] += W, a[4] += R, a[5] += O, a[6] += G, a[7] += U, f += 64, S -= 64;
1593
+ for (var g, k, x, H, U, O, G, D, j, q, Ne, Ce, ut; S >= 64; ) {
1594
+ for (g = a[0], k = a[1], x = a[2], H = a[3], U = a[4], O = a[5], G = a[6], D = a[7], q = 0; q < 16; q++)
1595
+ Ne = f + q * 4, p[q] = (h[Ne] & 255) << 24 | (h[Ne + 1] & 255) << 16 | (h[Ne + 2] & 255) << 8 | h[Ne + 3] & 255;
1596
+ for (q = 16; q < 64; q++)
1597
+ j = p[q - 2], Ce = (j >>> 17 | j << 15) ^ (j >>> 19 | j << 13) ^ j >>> 10, j = p[q - 15], ut = (j >>> 7 | j << 25) ^ (j >>> 18 | j << 14) ^ j >>> 3, p[q] = (Ce + p[q - 7] | 0) + (ut + p[q - 16] | 0);
1598
+ for (q = 0; q < 64; q++)
1599
+ Ce = (((U >>> 6 | U << 26) ^ (U >>> 11 | U << 21) ^ (U >>> 25 | U << 7)) + (U & O ^ ~U & G) | 0) + (D + (n[q] + p[q] | 0) | 0) | 0, ut = ((g >>> 2 | g << 30) ^ (g >>> 13 | g << 19) ^ (g >>> 22 | g << 10)) + (g & k ^ g & x ^ k & x) | 0, D = G, G = O, O = U, U = H + Ce | 0, H = x, x = k, k = g, g = Ce + ut | 0;
1600
+ a[0] += g, a[1] += k, a[2] += x, a[3] += H, a[4] += U, a[5] += O, a[6] += G, a[7] += D, f += 64, S -= 64;
1592
1601
  }
1593
1602
  return f;
1594
1603
  }
@@ -1620,11 +1629,11 @@ function qi() {
1620
1629
  return this;
1621
1630
  }, p.prototype.finish = function(a) {
1622
1631
  if (!this.finished) {
1623
- var h = this.bytesHashed, f = this.bufferLength, S = h / 536870912 | 0, y = h << 3, k = h % 64 < 56 ? 64 : 128;
1632
+ var h = this.bytesHashed, f = this.bufferLength, S = h / 536870912 | 0, g = h << 3, k = h % 64 < 56 ? 64 : 128;
1624
1633
  this.buffer[f] = 128;
1625
1634
  for (var x = f + 1; x < k - 8; x++)
1626
1635
  this.buffer[x] = 0;
1627
- this.buffer[k - 8] = S >>> 24 & 255, this.buffer[k - 7] = S >>> 16 & 255, this.buffer[k - 6] = S >>> 8 & 255, this.buffer[k - 5] = S >>> 0 & 255, this.buffer[k - 4] = y >>> 24 & 255, this.buffer[k - 3] = y >>> 16 & 255, this.buffer[k - 2] = y >>> 8 & 255, this.buffer[k - 1] = y >>> 0 & 255, r(this.temp, this.state, this.buffer, 0, k), this.finished = !0;
1636
+ this.buffer[k - 8] = S >>> 24 & 255, this.buffer[k - 7] = S >>> 16 & 255, this.buffer[k - 6] = S >>> 8 & 255, this.buffer[k - 5] = S >>> 0 & 255, this.buffer[k - 4] = g >>> 24 & 255, this.buffer[k - 3] = g >>> 16 & 255, this.buffer[k - 2] = g >>> 8 & 255, this.buffer[k - 1] = g >>> 0 & 255, r(this.temp, this.state, this.buffer, 0, k), this.finished = !0;
1628
1637
  }
1629
1638
  for (var x = 0; x < 8; x++)
1630
1639
  a[x * 4 + 0] = this.state[x] >>> 24 & 255, a[x * 4 + 1] = this.state[x] >>> 16 & 255, a[x * 4 + 2] = this.state[x] >>> 8 & 255, a[x * 4 + 3] = this.state[x] >>> 0 & 255;
@@ -1699,38 +1708,38 @@ function qi() {
1699
1708
  var l = new Uint8Array(e.digestLength);
1700
1709
  function _(p, a, h, f) {
1701
1710
  a === void 0 && (a = l), f === void 0 && (f = 32);
1702
- for (var S = new Uint8Array([1]), y = u(a, p), k = new o(y), x = new Uint8Array(k.digestLength), W = x.length, R = new Uint8Array(f), O = 0; O < f; O++)
1703
- W === x.length && (c(x, k, h, S), W = 0), R[O] = x[W++];
1704
- return k.clean(), x.fill(0), S.fill(0), R;
1711
+ for (var S = new Uint8Array([1]), g = u(a, p), k = new o(g), x = new Uint8Array(k.digestLength), H = x.length, U = new Uint8Array(f), O = 0; O < f; O++)
1712
+ H === x.length && (c(x, k, h, S), H = 0), U[O] = x[H++];
1713
+ return k.clean(), x.fill(0), S.fill(0), U;
1705
1714
  }
1706
1715
  e.hkdf = _;
1707
- function v(p, a, h, f) {
1708
- for (var S = new o(p), y = S.digestLength, k = new Uint8Array(4), x = new Uint8Array(y), W = new Uint8Array(y), R = new Uint8Array(f), O = 0; O * y < f; O++) {
1716
+ function m(p, a, h, f) {
1717
+ for (var S = new o(p), g = S.digestLength, k = new Uint8Array(4), x = new Uint8Array(g), H = new Uint8Array(g), U = new Uint8Array(f), O = 0; O * g < f; O++) {
1709
1718
  var G = O + 1;
1710
- k[0] = G >>> 24 & 255, k[1] = G >>> 16 & 255, k[2] = G >>> 8 & 255, k[3] = G >>> 0 & 255, S.reset(), S.update(a), S.update(k), S.finish(W);
1711
- for (var U = 0; U < y; U++)
1712
- x[U] = W[U];
1713
- for (var U = 2; U <= h; U++) {
1714
- S.reset(), S.update(W).finish(W);
1715
- for (var j = 0; j < y; j++)
1716
- x[j] ^= W[j];
1719
+ k[0] = G >>> 24 & 255, k[1] = G >>> 16 & 255, k[2] = G >>> 8 & 255, k[3] = G >>> 0 & 255, S.reset(), S.update(a), S.update(k), S.finish(H);
1720
+ for (var D = 0; D < g; D++)
1721
+ x[D] = H[D];
1722
+ for (var D = 2; D <= h; D++) {
1723
+ S.reset(), S.update(H).finish(H);
1724
+ for (var j = 0; j < g; j++)
1725
+ x[j] ^= H[j];
1717
1726
  }
1718
- for (var U = 0; U < y && O * y + U < f; U++)
1719
- R[O * y + U] = x[U];
1727
+ for (var D = 0; D < g && O * g + D < f; D++)
1728
+ U[O * g + D] = x[D];
1720
1729
  }
1721
- for (var O = 0; O < y; O++)
1722
- x[O] = W[O] = 0;
1730
+ for (var O = 0; O < g; O++)
1731
+ x[O] = H[O] = 0;
1723
1732
  for (var O = 0; O < 4; O++)
1724
1733
  k[O] = 0;
1725
- return S.clean(), R;
1734
+ return S.clean(), U;
1726
1735
  }
1727
- e.pbkdf2 = v;
1736
+ e.pbkdf2 = m;
1728
1737
  });
1729
1738
  }(ft)), ft.exports;
1730
1739
  }
1731
- var Ci = qi();
1732
- const Ni = new Int32Array(4);
1733
- class H {
1740
+ var Ui = Ri();
1741
+ const Di = new Int32Array(4);
1742
+ class W {
1734
1743
  static hashStr(e, n = !1) {
1735
1744
  return this.onePassHasher.start().appendStr(e).end(n);
1736
1745
  }
@@ -1765,9 +1774,9 @@ class H {
1765
1774
  static hexChars = "0123456789abcdef";
1766
1775
  static hexOut = [];
1767
1776
  // Permanent instance is to use for one-call hashing
1768
- static onePassHasher = new H();
1777
+ static onePassHasher = new W();
1769
1778
  static _hex(e) {
1770
- const n = H.hexChars, r = H.hexOut;
1779
+ const n = W.hexChars, r = W.hexOut;
1771
1780
  let i, o, s, u;
1772
1781
  for (u = 0; u < 4; u += 1)
1773
1782
  for (o = u * 8, i = e[u], s = 0; s < 8; s += 2)
@@ -1791,7 +1800,7 @@ class H {
1791
1800
  * Initialise buffer to be hashed
1792
1801
  */
1793
1802
  start() {
1794
- return this._dataLength = 0, this._bufferLength = 0, this._state.set(H.stateIdentity), this;
1803
+ return this._dataLength = 0, this._bufferLength = 0, this._state.set(W.stateIdentity), this;
1795
1804
  }
1796
1805
  // Char to code point to to array conversion:
1797
1806
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt
@@ -1817,7 +1826,7 @@ class H {
1817
1826
  );
1818
1827
  n[i++] = (o >>> 18) + 240, n[i++] = o >>> 12 & 63 | 128, n[i++] = o >>> 6 & 63 | 128, n[i++] = o & 63 | 128;
1819
1828
  }
1820
- i >= 64 && (this._dataLength += 64, H._md5cycle(this._state, r), i -= 64, r[0] = r[16]);
1829
+ i >= 64 && (this._dataLength += 64, W._md5cycle(this._state, r), i -= 64, r[0] = r[16]);
1821
1830
  }
1822
1831
  return this._bufferLength = i, this;
1823
1832
  }
@@ -1833,7 +1842,7 @@ class H {
1833
1842
  n[i++] = e.charCodeAt(s++);
1834
1843
  if (i < 64)
1835
1844
  break;
1836
- this._dataLength += 64, H._md5cycle(this._state, r), i = 0;
1845
+ this._dataLength += 64, W._md5cycle(this._state, r), i = 0;
1837
1846
  }
1838
1847
  return this._bufferLength = i, this;
1839
1848
  }
@@ -1849,7 +1858,7 @@ class H {
1849
1858
  n[i++] = e[s++];
1850
1859
  if (i < 64)
1851
1860
  break;
1852
- this._dataLength += 64, H._md5cycle(this._state, r), i = 0;
1861
+ this._dataLength += 64, W._md5cycle(this._state, r), i = 0;
1853
1862
  }
1854
1863
  return this._bufferLength = i, this;
1855
1864
  }
@@ -1883,27 +1892,27 @@ class H {
1883
1892
  const n = this._bufferLength, r = this._buffer8, i = this._buffer32, o = (n >> 2) + 1;
1884
1893
  this._dataLength += n;
1885
1894
  const s = this._dataLength * 8;
1886
- if (r[n] = 128, r[n + 1] = r[n + 2] = r[n + 3] = 0, i.set(H.buffer32Identity.subarray(o), o), n > 55 && (H._md5cycle(this._state, i), i.set(H.buffer32Identity)), s <= 4294967295)
1895
+ if (r[n] = 128, r[n + 1] = r[n + 2] = r[n + 3] = 0, i.set(W.buffer32Identity.subarray(o), o), n > 55 && (W._md5cycle(this._state, i), i.set(W.buffer32Identity)), s <= 4294967295)
1887
1896
  i[14] = s;
1888
1897
  else {
1889
1898
  const u = s.toString(16).match(/(.*?)(.{0,8})$/);
1890
- if (u === null) return e ? Ni : "";
1899
+ if (u === null) return e ? Di : "";
1891
1900
  const c = parseInt(u[2], 16), l = parseInt(u[1], 16) || 0;
1892
1901
  i[14] = c, i[15] = l;
1893
1902
  }
1894
- return H._md5cycle(this._state, i), e ? this._state : H._hex(this._state);
1903
+ return W._md5cycle(this._state, i), e ? this._state : W._hex(this._state);
1895
1904
  }
1896
1905
  }
1897
- if (H.hashStr("hello") !== "5d41402abc4b2a76b9719d911017c592")
1906
+ if (W.hashStr("hello") !== "5d41402abc4b2a76b9719d911017c592")
1898
1907
  throw new Error("Md5 self test failed.");
1899
- const ji = 36e5, Tn = Symbol.for("constructDateFrom");
1908
+ const qi = 36e5, In = Symbol.for("constructDateFrom");
1900
1909
  function mt(t, e) {
1901
- return typeof t == "function" ? t(e) : t && typeof t == "object" && Tn in t ? t[Tn](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
1910
+ return typeof t == "function" ? t(e) : t && typeof t == "object" && In in t ? t[In](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
1902
1911
  }
1903
1912
  function Le(t, e) {
1904
1913
  return mt(t, t);
1905
1914
  }
1906
- function Fi(t, e, n) {
1915
+ function Ni(t, e, n) {
1907
1916
  const r = Le(t);
1908
1917
  if (isNaN(e)) return mt(t, NaN);
1909
1918
  const i = r.getDate(), o = mt(t, r.getTime());
@@ -1915,38 +1924,38 @@ function Fi(t, e, n) {
1915
1924
  i
1916
1925
  ), r);
1917
1926
  }
1918
- function hr(t, e, n) {
1927
+ function ar(t, e, n) {
1919
1928
  return mt(t, +Le(t) + e);
1920
1929
  }
1921
- function zi(t, e, n) {
1922
- return hr(t, e * ji);
1930
+ function Ci(t, e, n) {
1931
+ return ar(t, e * qi);
1923
1932
  }
1924
- function Li(t, e, n) {
1925
- return hr(t, e * 1e3);
1933
+ function ji(t, e, n) {
1934
+ return ar(t, e * 1e3);
1926
1935
  }
1927
- function Wi(t, e, n) {
1928
- return Fi(t, e * 12);
1936
+ function Fi(t, e, n) {
1937
+ return Ni(t, e * 12);
1929
1938
  }
1930
- function Mn(t) {
1939
+ function Pn(t) {
1931
1940
  return Math.trunc(+Le(t) / 1e3);
1932
1941
  }
1933
- function Hi(t, e) {
1942
+ function zi(t, e) {
1934
1943
  return +Le(t) < +Le(e);
1935
1944
  }
1936
1945
  function d(t, e, n, r = "debug", i) {
1937
1946
  if (window.debug) {
1938
1947
  const s = ["color: #0288D1", `color:${i || "#009688"}`, "color: default"];
1939
- n ? Rn() ? console[r](
1948
+ n ? Tn() ? console[r](
1940
1949
  `%c[PlaceOS]%c[${t}] %c${e}`,
1941
1950
  ...s,
1942
1951
  n
1943
- ) : console[r](`[PlaceOS][${t}] ${e}`, n) : Rn() ? console[r](`%c[PlaceOS]%c[${t}] %c${e}`, ...s) : console[r](`[PlaceOS][${t}] ${e}`);
1952
+ ) : console[r](`[PlaceOS][${t}] ${e}`, n) : Tn() ? console[r](`%c[PlaceOS]%c[${t}] %c${e}`, ...s) : console[r](`[PlaceOS][${t}] ${e}`);
1944
1953
  }
1945
1954
  }
1946
- function Rn() {
1955
+ function Tn() {
1947
1956
  return !(document.documentMode || /Edge/.test(navigator.userAgent));
1948
1957
  }
1949
- function dr() {
1958
+ function lr() {
1950
1959
  const t = window.location?.hash ? window.location?.hash.slice(1) : window.location?.href.split("#")[1] || "";
1951
1960
  let e = window.location?.search ? window.location?.search.slice(1) : window.location?.href.split("?")[1] || "", n = {};
1952
1961
  if (t)
@@ -1968,16 +1977,16 @@ function je(t) {
1968
1977
  }
1969
1978
  return e;
1970
1979
  }
1971
- const Un = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
1972
- function Bi(t = 40) {
1980
+ const Mn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
1981
+ function Li(t = 40) {
1973
1982
  let e = "";
1974
1983
  for (let n = 0; n < t; n++)
1975
- e += Un.charAt(
1976
- Math.floor(Math.random() * Un.length)
1984
+ e += Mn.charAt(
1985
+ Math.floor(Math.random() * Mn.length)
1977
1986
  );
1978
1987
  return e;
1979
1988
  }
1980
- function de(t) {
1989
+ function he(t) {
1981
1990
  const e = (window.location?.hash || "").replace(new RegExp(`${t}[a-zA-Z0-9_+-.%=]*&?`, "g"), "").replace(/&&/g, "&").replace(/#&/g, "#").replace(/&$/g, "#"), n = (window.location?.search || "").replace(new RegExp(`${t}[a-zA-Z0-9_+-.%=]*&?`, "g"), "").replace(/&&/g, "&").replace(/\?&/g, "#").replace(/&$/g, "#");
1982
1991
  window.history?.replaceState && window.history?.replaceState(
1983
1992
  null,
@@ -1992,7 +2001,7 @@ function yt(t, e = !1) {
1992
2001
  const r = Math.floor(Math.log(t) / Math.log(n)), i = (e ? "kMGTPE" : "KMGTPE").charAt(r - 1) + (e ? "iB" : "B");
1993
2002
  return (t / Math.pow(n, r)).toFixed(2) + " " + i;
1994
2003
  }
1995
- function Vi(t) {
2004
+ function Hi(t) {
1996
2005
  if (t.length === 0)
1997
2006
  throw new Error("Input must not be of zero length");
1998
2007
  const e = t.split(","), n = {};
@@ -2005,12 +2014,12 @@ function Vi(t) {
2005
2014
  }
2006
2015
  return n;
2007
2016
  }
2008
- function Qi(t, e) {
2017
+ function Wi(t, e) {
2009
2018
  for (const n in t)
2010
2019
  t.hasOwnProperty(n) && e.indexOf(t[n]) >= 0 && delete t[n];
2011
2020
  return t;
2012
2021
  }
2013
- function Yi() {
2022
+ function Bi() {
2014
2023
  return [
2015
2024
  "iPad Simulator",
2016
2025
  "iPhone Simulator",
@@ -2021,13 +2030,13 @@ function Yi() {
2021
2030
  ].includes(navigator.platform) || // iPad on iOS 13 detection
2022
2031
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
2023
2032
  }
2024
- function Ji() {
2033
+ function Vi() {
2025
2034
  return window.location !== window.parent.location;
2026
2035
  }
2027
- function Ki(t = Date.now(), e = 60 * 1e3) {
2036
+ function Qi(t = Date.now(), e = 60 * 1e3) {
2028
2037
  return Math.floor(t / e);
2029
2038
  }
2030
- class Zi {
2039
+ class Yi {
2031
2040
  abort() {
2032
2041
  d("Stub", "Aborted");
2033
2042
  }
@@ -2041,35 +2050,35 @@ function z(t) {
2041
2050
  )}`);
2042
2051
  return e;
2043
2052
  }
2044
- const me = {}, Fe = {}, ue = {};
2045
- function Gi() {
2046
- for (const t in me)
2047
- me.hasOwnProperty(t) && be(t);
2053
+ const _e = {}, Fe = {}, ue = {};
2054
+ function Ji() {
2055
+ for (const t in _e)
2056
+ _e.hasOwnProperty(t) && ve(t);
2048
2057
  for (const t in Fe)
2049
- Fe.hasOwnProperty(t) && Xi(t);
2058
+ Fe.hasOwnProperty(t) && Ki(t);
2050
2059
  for (const t in ue)
2051
- ue.hasOwnProperty(t) && eo(t);
2060
+ ue.hasOwnProperty(t) && Zi(t);
2052
2061
  }
2053
2062
  function ne(t, e, n = 300) {
2054
2063
  if (t && e && e instanceof Function)
2055
- be(t), me[t] = setTimeout(() => {
2056
- e(), delete me[t];
2064
+ ve(t), _e[t] = setTimeout(() => {
2065
+ e(), delete _e[t];
2057
2066
  }, n);
2058
2067
  else
2059
2068
  throw new Error(
2060
2069
  t ? "Cannot create named timeout without a name" : "Cannot create a timeout without a callback"
2061
2070
  );
2062
2071
  }
2063
- function be(t) {
2064
- me[t] && (clearTimeout(me[t]), delete me[t]);
2072
+ function ve(t) {
2073
+ _e[t] && (clearTimeout(_e[t]), delete _e[t]);
2065
2074
  }
2066
- function Xi(t) {
2075
+ function Ki(t) {
2067
2076
  Fe[t] && (clearInterval(Fe[t]), delete Fe[t]);
2068
2077
  }
2069
- function eo(t) {
2078
+ function Zi(t) {
2070
2079
  ue && ue[t] && (ue[t] instanceof ge ? ue[t].unsubscribe() : ue[t](), delete ue[t]);
2071
2080
  }
2072
- const to = {
2081
+ const Gi = {
2073
2082
  id: "mock-authority",
2074
2083
  name: "localhost:4200",
2075
2084
  description: "",
@@ -2081,45 +2090,45 @@ const to = {
2081
2090
  config: {},
2082
2091
  version: "2.0.0"
2083
2092
  };
2084
- let g = {}, A, F;
2093
+ let v = {}, A, F;
2085
2094
  const b = {};
2086
2095
  let w = "", ye = "";
2087
- const Ee = new le(""), wt = new le("");
2096
+ const Ee = new ae(""), wt = new ae("");
2088
2097
  let an = "/api/engine/v2";
2089
- const ce = new le(!1), no = ce.asObservable();
2098
+ const ce = new ae(!1), Xi = ce.asObservable();
2090
2099
  let gt = 0;
2091
- function ve() {
2092
- return `${`${g.secure || window.location?.protocol.indexOf("https") >= 0 ? "https:" : "http:"}//${g.host || window.location?.host}`}${pr()}`;
2100
+ function be() {
2101
+ return `${`${v.secure || window.location?.protocol.indexOf("https") >= 0 ? "https:" : "http:"}//${v.host || window.location?.host}`}${fr()}`;
2093
2102
  }
2094
- function pr() {
2095
- return g.version === "ACA Engine" ? "/control/api" : an;
2103
+ function fr() {
2104
+ return v.version === "ACA Engine" ? "/control/api" : an;
2096
2105
  }
2097
- function ro() {
2098
- return !!g.token_header;
2106
+ function eo() {
2107
+ return !!v.token_header;
2099
2108
  }
2100
- function io() {
2109
+ function to() {
2101
2110
  return w;
2102
2111
  }
2103
- function ys() {
2104
- return g.redirect_uri;
2112
+ function ps() {
2113
+ return v.redirect_uri;
2105
2114
  }
2106
- function gs(t, e = !0) {
2107
- A.setItem(`${w}_x-api-key`, `${t}`), A.setItem("trusted", `${e}`), oo("x-api-key", Wi(/* @__PURE__ */ new Date(), 5).valueOf());
2115
+ function _s(t, e = !0) {
2116
+ A.setItem(`${w}_x-api-key`, `${t}`), A.setItem("trusted", `${e}`), no("x-api-key", Fi(/* @__PURE__ */ new Date(), 5).valueOf());
2108
2117
  }
2109
2118
  function Ot() {
2110
- return vt("x-api-key", !1) || "";
2119
+ return bt("x-api-key", !1) || "";
2111
2120
  }
2112
- function oo(t, e = zi(/* @__PURE__ */ new Date(), 2).valueOf()) {
2113
- g.ignore_api_key && t === "x-api-key" || (A.setItem(`${w}_expires_at`, `${e}`), A.setItem(`${w}_access_token`, t));
2121
+ function no(t, e = Ci(/* @__PURE__ */ new Date(), 2).valueOf()) {
2122
+ v.ignore_api_key && t === "x-api-key" || (A.setItem(`${w}_expires_at`, `${e}`), A.setItem(`${w}_access_token`, t));
2114
2123
  }
2115
2124
  function Y(t = !0) {
2116
- if (g.mock) return "mock-token";
2125
+ if (v.mock) return "mock-token";
2117
2126
  if (!A) return "";
2118
- if (Ot() && !g.ignore_api_key) return "x-api-key";
2127
+ if (Ot() && !v.ignore_api_key) return "x-api-key";
2119
2128
  const e = A.getItem(`${w}_expires_at`) || "", n = Ee.getValue();
2120
- return Hi(+e, /* @__PURE__ */ new Date()) && (d("Auth", "Token expired. Requesting new token..."), hn(), b.load_authority || (gt += 1, ne(
2129
+ return zi(+e, /* @__PURE__ */ new Date()) && (d("Auth", "Token expired. Requesting new token..."), hn(), b.load_authority || (gt += 1, ne(
2121
2130
  "re-authorise",
2122
- () => yr().catch(
2131
+ () => pr().catch(
2123
2132
  (r) => d("Auth", `Failed to get token: ${r}`)
2124
2133
  ),
2125
2134
  200 * Math.min(20, gt)
@@ -2129,59 +2138,59 @@ function nn() {
2129
2138
  return wt.getValue() || A.getItem(`${w}_refresh_token`) || "";
2130
2139
  }
2131
2140
  function rn() {
2132
- return g.host || window.location?.host;
2141
+ return v.host || window.location?.host;
2133
2142
  }
2134
- function so() {
2143
+ function ro() {
2135
2144
  return !!Y();
2136
2145
  }
2137
- function uo() {
2138
- return Ee.pipe(I((t) => !!so()));
2146
+ function io() {
2147
+ return Ee.pipe(I((t) => !!ro()));
2139
2148
  }
2140
- function bt() {
2149
+ function vt() {
2141
2150
  return F;
2142
2151
  }
2143
- function bs() {
2152
+ function ms() {
2144
2153
  return ce.getValue();
2145
2154
  }
2146
2155
  function ln() {
2147
- return !!g.mock;
2156
+ return !!v.mock;
2148
2157
  }
2149
- function co() {
2150
- return !!g.secure;
2158
+ function oo() {
2159
+ return !!v.secure;
2151
2160
  }
2152
- function vs() {
2153
- return no;
2161
+ function ys() {
2162
+ return Xi;
2154
2163
  }
2155
2164
  function fn() {
2156
- return vt("trust") === "true" || vt("trusted") === "true";
2165
+ return bt("trust") === "true" || bt("trusted") === "true";
2157
2166
  }
2158
- function _r() {
2159
- return !!Ot() && !g.ignore_api_key || vt("fixed_device") === "true";
2167
+ function hr() {
2168
+ return !!Ot() && !v.ignore_api_key || bt("fixed_device") === "true";
2160
2169
  }
2161
- function vt(t, e = !0) {
2162
- let r = dr()[t];
2170
+ function bt(t, e = !0) {
2171
+ let r = lr()[t];
2163
2172
  if (A) {
2164
- const i = `${io()}_${t}`;
2173
+ const i = `${to()}_${t}`;
2165
2174
  r = r || A.getItem(i) || A.getItem(t) || "", e && A.setItem(i, `${r}`);
2166
2175
  }
2167
2176
  return r;
2168
2177
  }
2169
- function Ss(t) {
2170
- return g = t || g, g.token_header = g.token_header ?? Ji(), window.AbortController || (window.AbortController = Zi), A = g.storage === "session" ? sessionStorage : localStorage, w = H.hashStr(g.redirect_uri, !1), dn();
2178
+ function gs(t) {
2179
+ return v = t || v, v.token_header = v.token_header ?? Vi(), window.AbortController || (window.AbortController = Yi), A = v.storage === "session" ? sessionStorage : localStorage, w = W.hashStr(v.redirect_uri, !1), dn();
2171
2180
  }
2172
- function ks() {
2173
- g = {}, F = void 0, Ee.next(""), wt.next(""), ce.next(!1), w = "", ye = "", an = "/api/engine/v2";
2181
+ function vs() {
2182
+ v = {}, F = void 0, Ee.next(""), wt.next(""), ce.next(!1), w = "", ye = "", an = "/api/engine/v2";
2174
2183
  for (const t in b)
2175
2184
  t in b && delete b[t];
2176
- Gi();
2185
+ Ji();
2177
2186
  }
2178
- function mr() {
2187
+ function dr() {
2179
2188
  return d("Auth", "Refreshing authorty."), F = void 0, dn();
2180
2189
  }
2181
2190
  function hn() {
2182
2191
  d("Auth", "Invalidating tokens."), A.removeItem(`${w}_access_token`), A.removeItem(`${w}_expires_at`), Ee.getValue() && Ee.next("");
2183
2192
  }
2184
- function yr(t, e = F) {
2193
+ function pr(t, e = F) {
2185
2194
  return b.authorise || (b.authorise = new Promise((n, r) => {
2186
2195
  if (!e)
2187
2196
  return delete b.authorise, r("Authority is not loaded");
@@ -2198,21 +2207,21 @@ function yr(t, e = F) {
2198
2207
  d("Auth", "Failed to generate token."), r("Failed to generate token"), setTimeout(() => delete b.authorise, 200);
2199
2208
  }
2200
2209
  ];
2201
- g && g.auth_type === "password" ? (d("Auth", "Logging in with credentials."), go(g).then(
2210
+ v && v.auth_type === "password" ? (d("Auth", "Logging in with credentials."), _o(v).then(
2202
2211
  ...o
2203
2212
  ), gt = 0) : ye || nn() ? (d(
2204
2213
  "Auth",
2205
2214
  `Generating token with ${ye ? "code" : "refresh token"}`
2206
- ), br().then(...o), gt = 0) : e.session ? (d(
2215
+ ), mr().then(...o), gt = 0) : e.session ? (d(
2207
2216
  "Auth",
2208
2217
  "Users has session. Authorising application..."
2209
- ), ao(t).then(...o)) : (d("Auth", "No user session"), gr(e), r("No user session"), setTimeout(() => delete b.authorise, 200));
2218
+ ), so(t).then(...o)) : (d("Auth", "No user session"), _r(e), r("No user session"), setTimeout(() => delete b.authorise, 200));
2210
2219
  }
2211
2220
  };
2212
- fo().then(i, i);
2221
+ co().then(i, i);
2213
2222
  })), b.authorise;
2214
2223
  }
2215
- function xs() {
2224
+ function bs() {
2216
2225
  const t = F ? F.logout_url : "/logout";
2217
2226
  fetch(t, {
2218
2227
  method: "GET",
@@ -2231,12 +2240,12 @@ function xs() {
2231
2240
  }
2232
2241
  function dn(t = 0) {
2233
2242
  return b.load_authority || (b.load_authority = new Promise((e) => {
2234
- if (ce.next(!1), g.mock) {
2235
- F = to, d("Auth", "System in mock mode"), ce.next(!0), e();
2243
+ if (ce.next(!1), v.mock) {
2244
+ F = Gi, d("Auth", "System in mock mode"), ce.next(!0), e();
2236
2245
  return;
2237
2246
  }
2238
- d("Auth", `Fixed: ${_r()} | Trusted: ${fn()}`), d("Auth", "Loading authority...");
2239
- const n = g.secure || window.location?.protocol.indexOf("https") >= 0, r = (i) => {
2247
+ d("Auth", `Fixed: ${hr()} | Trusted: ${fn()}`), d("Auth", "Loading authority...");
2248
+ const n = v.secure || window.location?.protocol.indexOf("https") >= 0, r = (i) => {
2240
2249
  d("Auth", `Failed to load authority(${i})`), ce.next(!1), ne(
2241
2250
  "load_authority",
2242
2251
  () => {
@@ -2262,17 +2271,17 @@ function dn(t = 0) {
2262
2271
  const o = () => {
2263
2272
  ce.next(!0), d("Auth", "Application set online."), e();
2264
2273
  };
2265
- delete b.load_authority, yr("").then(o, o);
2274
+ delete b.load_authority, pr("").then(o, o);
2266
2275
  }, r);
2267
2276
  })), b.load_authority;
2268
2277
  }
2269
- async function ao(t) {
2270
- const e = po(t);
2271
- if (g.use_iframe)
2272
- return lo(e);
2278
+ async function so(t) {
2279
+ const e = lo(t);
2280
+ if (v.use_iframe)
2281
+ return uo(e);
2273
2282
  window.location?.assign(e);
2274
2283
  }
2275
- function lo(t) {
2284
+ function uo(t) {
2276
2285
  return b.iframe_auth || (b.iframe_auth = new Promise((e, n) => {
2277
2286
  d("Auth", "Authorizing in an iFrame...");
2278
2287
  const r = document.createElement("iframe");
@@ -2280,12 +2289,12 @@ function lo(t) {
2280
2289
  const i = (o) => {
2281
2290
  if (o.origin === window.location?.origin && o.data.type === "place-os") {
2282
2291
  const s = o.data;
2283
- if (d("Auth", "Received credentials from iFrame..."), document.body.removeChild(r), be("iframe_auth"), window.removeEventListener("message", i), delete b.iframe_auth, s.token)
2292
+ if (d("Auth", "Received credentials from iFrame..."), document.body.removeChild(r), ve("iframe_auth"), window.removeEventListener("message", i), delete b.iframe_auth, s.token)
2284
2293
  return e(), pn({
2285
2294
  access_token: s.token,
2286
2295
  ...s
2287
2296
  });
2288
- ye = s.code || "", br().then(
2297
+ ye = s.code || "", mr().then(
2289
2298
  (u) => e(u),
2290
2299
  (u) => n(u)
2291
2300
  );
@@ -2302,37 +2311,37 @@ function lo(t) {
2302
2311
  }, document.body.appendChild(r);
2303
2312
  })), b.iframe_auth;
2304
2313
  }
2305
- let Dn = !1;
2306
- function gr(t) {
2307
- if (g.handle_login !== !1 && !Dn) {
2314
+ let Rn = !1;
2315
+ function _r(t) {
2316
+ if (v.handle_login !== !1 && !Rn) {
2308
2317
  d("Auth", "Redirecting to login page...");
2309
2318
  const e = t.login_url?.replace(
2310
2319
  "{{url}}",
2311
2320
  encodeURIComponent(window.location?.href)
2312
2321
  );
2313
- throw setTimeout(() => window.location?.assign(e), 300), Dn = !0, new Error("Redirecting to login page...");
2322
+ throw setTimeout(() => window.location?.assign(e), 300), Rn = !0, new Error("Redirecting to login page...");
2314
2323
  } else
2315
2324
  d("Auth", "Login being handled locally.");
2316
2325
  delete b.authorise;
2317
2326
  }
2318
- function fo() {
2327
+ function co() {
2319
2328
  return b.check_token || (b.check_token = new Promise(async (t, e) => {
2320
- Y() ? (d("Auth", "Valid token found."), t(Y())) : (d("Auth", "No token. Checking URL for auth credentials..."), await ho() ? t(!0) : e()), delete b.check_token;
2329
+ Y() ? (d("Auth", "Valid token found."), t(Y())) : (d("Auth", "No token. Checking URL for auth credentials..."), await ao() ? t(!0) : e()), delete b.check_token;
2321
2330
  })), b.check_token;
2322
2331
  }
2323
- function ho() {
2332
+ function ao() {
2324
2333
  return b.check_params || (b.check_params = new Promise((t) => {
2325
2334
  d("Auth", "Checking for auth parameters...");
2326
- let e = dr();
2335
+ let e = lr();
2327
2336
  if ((!e || Object.keys(e).length <= 0) && sessionStorage && (e = JSON.parse(
2328
2337
  sessionStorage.getItem("ENGINE.auth.params") || "{}"
2329
2338
  )), e && (e.code || e.access_token || e.refresh_token)) {
2330
- e.code && (ye = e.code, de("code")), e.refresh_token && (A.setItem(
2339
+ e.code && (ye = e.code, he("code")), e.refresh_token && (A.setItem(
2331
2340
  `${w}_refresh_token`,
2332
2341
  e.refresh_token
2333
- ), de("refresh_token"));
2342
+ ), he("refresh_token"));
2334
2343
  const n = A.getItem(`${w}_nonce`) || "", r = (e.state || "").split(";");
2335
- de("state"), de("token_type");
2344
+ he("state"), he("token_type");
2336
2345
  const i = r[0];
2337
2346
  n === i ? (pn(e), t(!!e.access_token)) : t(!1);
2338
2347
  } else
@@ -2344,27 +2353,27 @@ function ho() {
2344
2353
  );
2345
2354
  })), b.check_params;
2346
2355
  }
2347
- function po(t) {
2348
- const e = bo();
2356
+ function lo(t) {
2357
+ const e = mo();
2349
2358
  t = t ? `${e};${t}` : e;
2350
- const n = g ? (g.auth_uri || "").indexOf("?") >= 0 : !1, r = (g ? g.auth_uri : null) || "/auth/oauth/authorize", i = fn() || g.auth_type === "auth_code" ? "code" : "token";
2351
- let o = `${r}${n ? "&" : "?"}response_type=${encodeURIComponent(i)}&client_id=${encodeURIComponent(w)}&state=${encodeURIComponent(t)}&redirect_uri=${encodeURIComponent(g.redirect_uri)}&scope=${encodeURIComponent(g.scope)}`;
2352
- if (g.auth_type === "auth_code") {
2353
- const { challenge: s, verify: u } = _o();
2359
+ const n = v ? (v.auth_uri || "").indexOf("?") >= 0 : !1, r = (v ? v.auth_uri : null) || "/auth/oauth/authorize", i = fn() || v.auth_type === "auth_code" ? "code" : "token";
2360
+ let o = `${r}${n ? "&" : "?"}response_type=${encodeURIComponent(i)}&client_id=${encodeURIComponent(w)}&state=${encodeURIComponent(t)}&redirect_uri=${encodeURIComponent(v.redirect_uri)}&scope=${encodeURIComponent(v.scope)}`;
2361
+ if (v.auth_type === "auth_code") {
2362
+ const { challenge: s, verify: u } = fo();
2354
2363
  sessionStorage.setItem(`${w}_challenge`, s), o += "&code_challenge_method=S256", o += `&code_challenge=${u}`;
2355
2364
  }
2356
2365
  return o;
2357
2366
  }
2358
- const qn = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("");
2359
- function _o(t = 43) {
2367
+ const Un = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("");
2368
+ function fo(t = 43) {
2360
2369
  const e = new Array(t).fill(0).map(
2361
- () => qn[Math.floor(Math.random() * qn.length)]
2362
- ).join(""), n = Ri(Ui(e)), r = fr(Ci.hash(n)).split("=")[0].replace(/\//g, "_").replace(/\+/g, "-");
2370
+ () => Un[Math.floor(Math.random() * Un.length)]
2371
+ ).join(""), n = Pi(Ti(e)), r = cr(Ui.hash(n)).split("=")[0].replace(/\//g, "_").replace(/\+/g, "-");
2363
2372
  return { challenge: e, verify: r };
2364
2373
  }
2365
- function mo() {
2366
- let e = (g.token_uri || "/auth/token") + `?client_id=${encodeURIComponent(w)}`, n = "";
2367
- if (e += `&redirect_uri=${encodeURIComponent(g.redirect_uri)}`, nn()) {
2374
+ function ho() {
2375
+ let e = (v.token_uri || "/auth/token") + `?client_id=${encodeURIComponent(w)}`, n = "";
2376
+ if (e += `&redirect_uri=${encodeURIComponent(v.redirect_uri)}`, nn()) {
2368
2377
  e += `&refresh_token=${encodeURIComponent(nn())}`, e += "&grant_type=refresh_token";
2369
2378
  const r = e.split("?");
2370
2379
  e = r[0], n = r[1];
@@ -2375,7 +2384,7 @@ function mo() {
2375
2384
  }
2376
2385
  return [e, n];
2377
2386
  }
2378
- function yo(t) {
2387
+ function po(t) {
2379
2388
  const e = t.token_uri || "/auth/token", n = z({
2380
2389
  grant_type: "password",
2381
2390
  client_id: w,
@@ -2388,13 +2397,13 @@ function yo(t) {
2388
2397
  });
2389
2398
  return `${e}?${n}`;
2390
2399
  }
2391
- function br() {
2392
- return vr(...mo());
2400
+ function mr() {
2401
+ return yr(...ho());
2393
2402
  }
2394
- function go(t) {
2395
- return vr(yo(t));
2403
+ function _o(t) {
2404
+ return yr(po(t));
2396
2405
  }
2397
- function vr(t, e = "") {
2406
+ function yr(t, e = "") {
2398
2407
  return b.generate_tokens || (b.generate_tokens = new Promise((n, r) => {
2399
2408
  d("Auth", "Generating new token...");
2400
2409
  const i = (o) => {
@@ -2414,25 +2423,25 @@ function vr(t, e = "") {
2414
2423
  })), b.generate_tokens;
2415
2424
  }
2416
2425
  function pn(t) {
2417
- const e = Li(
2426
+ const e = ji(
2418
2427
  /* @__PURE__ */ new Date(),
2419
2428
  Math.max(60, parseInt(t.expires_in, 10) - 300)
2420
2429
  );
2421
2430
  d("Auth", "Tokens generated storing..."), fn() && (t.access_token && (A.setItem(
2422
2431
  `${w}_access_token`,
2423
2432
  t.access_token
2424
- ), de("access_token")), t.refresh_token && (A.setItem(
2433
+ ), he("access_token")), t.refresh_token && (A.setItem(
2425
2434
  `${w}_refresh_token`,
2426
2435
  t.refresh_token
2427
- ), de("refresh_token"))), t.expires_in && (A.setItem(`${w}_expires_at`, `${e.valueOf()}`), de("expires_in")), ce.next(!0), Ee.next(t.access_token || ""), wt.next(t.refresh_token || "");
2436
+ ), he("refresh_token"))), t.expires_in && (A.setItem(`${w}_expires_at`, `${e.valueOf()}`), he("expires_in")), ce.next(!0), Ee.next(t.access_token || ""), wt.next(t.refresh_token || "");
2428
2437
  }
2429
- function bo() {
2430
- const t = Bi();
2438
+ function mo() {
2439
+ const t = Li();
2431
2440
  return A.setItem(`${w}_nonce`, t), t;
2432
2441
  }
2433
2442
  const Et = {};
2434
- function $s(t, e = Et) {
2435
- vo(t.method, t.path, e);
2443
+ function Ss(t, e = Et) {
2444
+ yo(t.method, t.path, e);
2436
2445
  const n = `${t.method}|${t.path}`, r = t.path.replace(/(http|https):\/\/[a-zA-Z0-9.]*:?([0-9]*)?/g, "").replace(/^\//, "").split("/"), i = {
2437
2446
  ...t,
2438
2447
  path_parts: r,
@@ -2442,20 +2451,20 @@ function $s(t, e = Et) {
2442
2451
  };
2443
2452
  e[n] = i, d("HTTP(M)", `+ ${t.method} ${t.path}`);
2444
2453
  }
2445
- function vo(t, e, n = Et) {
2454
+ function yo(t, e, n = Et) {
2446
2455
  const r = `${t}|${e}`;
2447
2456
  n[r] && (delete n[r], d("HTTP(M)", `- ${t} ${e}`));
2448
2457
  }
2449
- function So(t, e, n, r = Et) {
2450
- const i = ko(t, e, r);
2458
+ function go(t, e, n, r = Et) {
2459
+ const i = vo(t, e, r);
2451
2460
  if (i) {
2452
- const o = xo(e, i, n);
2453
- return $o(i, o);
2461
+ const o = bo(e, i, n);
2462
+ return So(i, o);
2454
2463
  }
2455
2464
  return null;
2456
2465
  }
2457
- function ko(t, e, n = Et) {
2458
- const i = e.replace(/(http|https)?:\/\/[a-zA-Z0-9.]*:?([0-9]*)?/g, "").replace(/^\//, "").split("?")[0].split("/"), o = Object.keys(
2466
+ function vo(t, e, n = Et) {
2467
+ const i = e.replace(/(http|https):\/\/[a-zA-Z0-9.]*:?([0-9]*)?/g, "").replace(/^\//, "").split("?")[0].split("/"), o = Object.keys(
2459
2468
  n
2460
2469
  ).reduce((s, u) => (u.indexOf(`${t}|`) === 0 && s.push(n[u]), s), []);
2461
2470
  for (const s of o)
@@ -2471,10 +2480,12 @@ function ko(t, e, n = Et) {
2471
2480
  }
2472
2481
  return null;
2473
2482
  }
2474
- function xo(t, e, n) {
2475
- const r = t.replace(/(http|https):\/\/[a-zA-Z0-9.]*:?([0-9]*)?/g, "").split("?"), i = r[0].replace(/^\//g, ""), o = r[1] || "", s = je(o), u = i.split("/"), c = {};
2476
- for (const _ of e.path_structure)
2477
- _ && (c[_] = u[e.path_structure.indexOf(_)]);
2483
+ function bo(t, e, n) {
2484
+ const r = t.replace(/(http|https):\/\/[a-zA-Z0-9.]*:?([0-9]*)?/g, "").split("?"), i = r[0].replace(/^\//, ""), o = r[1] || "", s = je(o), u = i.split("/"), c = {};
2485
+ for (let _ = 0; _ < e.path_structure.length; _++) {
2486
+ const m = e.path_structure[_];
2487
+ m && (c[m] = u[_]);
2488
+ }
2478
2489
  const l = {
2479
2490
  url: t,
2480
2491
  path: e.path,
@@ -2486,12 +2497,18 @@ function xo(t, e, n) {
2486
2497
  };
2487
2498
  return d("HTTP(M)", `MATCHED ${l.method}:`, l), l;
2488
2499
  }
2489
- function $o(t, e) {
2490
- const n = t.callback ? t.callback(e) : t.metadata, r = t.delay_variance || 100, i = t.delay || 300, o = Math.floor(Math.random() * r - r / 2) + i;
2491
- return d("HTTP(M)", `RESP ${e.method}:`, [e.url, n]), ar([n]).pipe(Ii(Math.max(200, o)));
2500
+ function So(t, e) {
2501
+ let n;
2502
+ try {
2503
+ n = t.callback ? t.callback(e) : t.metadata;
2504
+ } catch (s) {
2505
+ throw d("HTTP(M)", `ERROR ${e.method}:`, [e.url, s]), s;
2506
+ }
2507
+ const r = t.delay_variance || 100, i = t.delay || 300, o = Math.floor(Math.random() * r - r / 2) + i;
2508
+ return d("HTTP(M)", `RESP ${e.method}:`, [e.url, n]), vi([n]).pipe(wi(Math.max(200, o)));
2492
2509
  }
2493
- const Sr = {};
2494
- function Ao(t, e = Sr) {
2510
+ const gr = {};
2511
+ function ko(t, e = gr) {
2495
2512
  return e[t] || {};
2496
2513
  }
2497
2514
  function ee(t, e, n = Be) {
@@ -2500,16 +2517,16 @@ function ee(t, e, n = Be) {
2500
2517
  function Ie(t, e, n, r = Be) {
2501
2518
  return n || (n = { response_type: "json" }), r("POST", t, { body: e, response_type: "json", ...n });
2502
2519
  }
2503
- function We(t, e, n, r = Be) {
2520
+ function He(t, e, n, r = Be) {
2504
2521
  return n || (n = { response_type: "json" }), r("PUT", t, { body: e, response_type: "json", ...n });
2505
2522
  }
2506
2523
  function It(t, e, n, r = Be) {
2507
2524
  return n || (n = { response_type: "json" }), r("PATCH", t, { body: e, response_type: "json", ...n });
2508
2525
  }
2509
- function He(t, e, n = Be) {
2526
+ function We(t, e, n = Be) {
2510
2527
  return e || (e = { response_type: "void" }), n("DELETE", t, { response_type: "void", ...e });
2511
2528
  }
2512
- async function wo(t, e, n = Sr) {
2529
+ async function xo(t, e, n = gr) {
2513
2530
  if (t.headers) {
2514
2531
  const r = {};
2515
2532
  t.headers.forEach ? t.headers.forEach((i, o) => r[o.toLowerCase()] = i) : Object.keys(t.headers).forEach(
@@ -2521,35 +2538,59 @@ async function wo(t, e, n = Sr) {
2521
2538
  return await t.json().catch(() => ({}));
2522
2539
  case "text":
2523
2540
  return await t.text();
2541
+ case "void":
2542
+ return;
2543
+ default:
2544
+ return await t.json().catch(() => ({}));
2524
2545
  }
2525
2546
  }
2526
- const kr = () => {
2527
- hn(), mr().then(
2528
- () => null,
2529
- () => setTimeout(() => kr(), 1e3)
2530
- );
2531
- };
2532
- function Be(t, e, n, r = ln, i = So, o = wo) {
2547
+ const vr = () => (hn(), dr().then(
2548
+ () => Promise.resolve(),
2549
+ () => new Promise((t) => {
2550
+ setTimeout(() => {
2551
+ vr().then(() => t());
2552
+ }, 1e3);
2553
+ })
2554
+ ));
2555
+ function Be(t, e, n, r = ln, i = go, o = xo) {
2533
2556
  if (r()) {
2534
2557
  const s = i(t, e, n?.body);
2535
2558
  if (s)
2536
2559
  return s;
2537
2560
  }
2538
- return n.headers = n.headers || {}, n.headers["Content-Type"] = "application/json", uo().pipe(
2539
- wi((s) => s),
2540
- lr(1),
2541
- En((s) => (Y() === "x-api-key" ? n.headers["X-API-Key"] = Ot() : n.headers.Authorization = `Bearer ${Y()}`, cn(e, {
2542
- ...n,
2543
- body: JSON.stringify(n.body),
2544
- method: t,
2545
- credentials: "same-origin"
2546
- }))),
2547
- En((s) => s.ok ? o(s, n.response_type) : On(s)),
2548
- Mi(
2549
- (s) => s.pipe(
2550
- un((u, c) => u.status === 511 ? (gr(bt()), wn(u)) : c + 1 > 4 || u.status !== 401 ? On(u || {}) : (d("HTTP", "Auth error", u), kr(), wn(u)))
2551
- )
2552
- )
2561
+ return n.headers = n.headers || {}, !n.headers["Content-Type"] && !n.headers["content-type"] && (n.headers["Content-Type"] = "application/json"), io().pipe(
2562
+ xi((s) => s),
2563
+ ur(1),
2564
+ wn((s) => {
2565
+ Y() === "x-api-key" ? n.headers["X-API-Key"] = Ot() : n.headers.Authorization = `Bearer ${Y()}`;
2566
+ const u = {
2567
+ ...n,
2568
+ method: t,
2569
+ credentials: "same-origin"
2570
+ };
2571
+ return ["POST", "PUT", "PATCH"].includes(t) && n.body !== void 0 && (u.body = typeof n.body == "string" ? n.body : JSON.stringify(n.body)), cn(e, u);
2572
+ }),
2573
+ wn((s) => s.ok ? o(s, n.response_type) : bi(s)),
2574
+ Ii({
2575
+ count: 4,
2576
+ delay: (s, u) => new T((c) => {
2577
+ if (s.status === 511) {
2578
+ _r(vt()), c.error(s);
2579
+ return;
2580
+ }
2581
+ if (s.status !== 401) {
2582
+ c.error(s || {});
2583
+ return;
2584
+ }
2585
+ d("HTTP", "Auth error", s);
2586
+ const l = Math.pow(2, u - 1) * 1e3;
2587
+ vr().then(() => {
2588
+ c.next(l), c.complete();
2589
+ }).catch(() => {
2590
+ c.error(s);
2591
+ });
2592
+ })
2593
+ })
2553
2594
  );
2554
2595
  }
2555
2596
  class B {
@@ -2571,10 +2612,10 @@ class B {
2571
2612
  */
2572
2613
  toJSON() {
2573
2614
  const e = { ...this };
2574
- return e.version = this.version, delete e.created_at, Qi(e, [void 0, null, ""]);
2615
+ return e.version = this.version, delete e.created_at, Wi(e, [void 0, null, ""]);
2575
2616
  }
2576
2617
  }
2577
- class Oo extends B {
2618
+ class $o extends B {
2578
2619
  /** Unique identifier of the application */
2579
2620
  uid;
2580
2621
  /** Secret associated with the application */
@@ -2593,19 +2634,19 @@ class Oo extends B {
2593
2634
  super(e), this.uid = e.uid || "", this.secret = e.secret || "", this.owner_id = e.owner_id || "", this.scopes = e.scopes || "", this.redirect_uri = e.redirect_uri || "", this.skip_authorization = e.skip_authorization || !1, this.preserve_client_id = e.preserve_client_id || !1;
2594
2635
  }
2595
2636
  }
2596
- function As(t) {
2597
- return xr[t] || 0;
2637
+ function ks(t) {
2638
+ return br[t] || 0;
2598
2639
  }
2599
- function ws(t) {
2600
- return $r[t] || 0;
2640
+ function xs(t) {
2641
+ return Sr[t] || 0;
2601
2642
  }
2602
- let xr = {}, $r = {}, Cn = "";
2643
+ let br = {}, Sr = {}, Dn = "";
2603
2644
  const Pt = (t) => t;
2604
2645
  function E(t) {
2605
- const { query_params: e, fn: n, path: r, endpoint: i } = t, o = z(e), s = `${i || ve()}${r ? "/" + r : ""}${o ? "?" + o : ""}`;
2646
+ const { query_params: e, fn: n, path: r, endpoint: i } = t, o = z(e), s = `${i || be()}${r ? "/" + r : ""}${o ? "?" + o : ""}`;
2606
2647
  return ee(s).pipe(
2607
2648
  I((u) => {
2608
- const c = Eo(s, o, r);
2649
+ const c = Ao(s, o, r);
2609
2650
  return {
2610
2651
  total: c.total || 0,
2611
2652
  next: c.next ? () => E({
@@ -2620,41 +2661,41 @@ function E(t) {
2620
2661
  );
2621
2662
  }
2622
2663
  function $(t) {
2623
- const { query_params: e, id: n, path: r, fn: i, options: o } = t, s = z(e), u = `${ve()}/${r}/${n}${s ? "?" + s : ""}`;
2664
+ const { query_params: e, id: n, path: r, fn: i, options: o } = t, s = z(e), u = `${be()}/${r}/${n}${s ? "?" + s : ""}`;
2624
2665
  return ee(u, o).pipe(I((c) => (i || Pt)(c)));
2625
2666
  }
2626
- function C(t) {
2627
- const { query_params: e, form_data: n, path: r, fn: i } = t, o = z(e), s = `${ve()}/${r}${o ? "?" + o : ""}`;
2667
+ function N(t) {
2668
+ const { query_params: e, form_data: n, path: r, fn: i } = t, o = z(e), s = `${be()}/${r}${o ? "?" + o : ""}`;
2628
2669
  return Ie(s, n).pipe(
2629
2670
  I((c) => (i || Pt)(c))
2630
2671
  );
2631
2672
  }
2632
- function m(t) {
2633
- const { id: e, task_name: n, form_data: r, method: i, path: o, callback: s } = t, u = z(r), c = `${ve()}/${o}/${e}/${n}`;
2634
- return (i === "post" || i === "put" || !i ? (i === "put" ? We : Ie)(c, r) : (i === "del" ? He : ee)(
2673
+ function y(t) {
2674
+ const { id: e, task_name: n, form_data: r, method: i, path: o, callback: s } = t, u = z(r), c = `${be()}/${o}/${e}/${n}`;
2675
+ return (i === "post" || i === "put" || !i ? (i === "put" ? He : Ie)(c, r) : (i === "del" ? We : ee)(
2635
2676
  `${c}${u ? "?" + u : ""}`,
2636
2677
  {
2637
2678
  response_type: "json"
2638
2679
  }
2639
2680
  )).pipe(
2640
- I((_) => (s || ((v) => v))(_))
2681
+ I((_) => (s || ((m) => m))(_))
2641
2682
  );
2642
2683
  }
2643
- function N(t) {
2684
+ function C(t) {
2644
2685
  const { id: e, query_params: n, form_data: r, method: i, path: o, fn: s } = t, u = z({
2645
2686
  ...n,
2646
2687
  version: r.version || 0
2647
- }), c = `${ve()}/${o}/${e}${u ? "?" + u : ""}`;
2648
- return (i === "put" ? We : It)(c, r).pipe(
2688
+ }), c = `${be()}/${o}/${e}${u ? "?" + u : ""}`;
2689
+ return (i === "put" ? He : It)(c, r).pipe(
2649
2690
  I((l) => (s || Pt)(l))
2650
2691
  );
2651
2692
  }
2652
- function T(t) {
2653
- const { id: e, query_params: n, path: r } = t, i = z(n), o = `${ve()}/${r}/${e}${i ? "?" + i : ""}`;
2654
- return He(o);
2693
+ function M(t) {
2694
+ const { id: e, query_params: n, path: r } = t, i = z(n), o = `${be()}/${r}/${e}${i ? "?" + i : ""}`;
2695
+ return We(o);
2655
2696
  }
2656
- function Eo(t, e, n) {
2657
- const r = Ao(
2697
+ function Ao(t, e, n) {
2698
+ const r = ko(
2658
2699
  t[0] === "/" ? `${location.origin}${t}` : t
2659
2700
  ), i = {
2660
2701
  total: 0,
@@ -2662,22 +2703,22 @@ function Eo(t, e, n) {
2662
2703
  };
2663
2704
  if (r && r["x-total-count"]) {
2664
2705
  const o = +(r["x-total-count"] || 0);
2665
- (e.length < 2 || e.length < 12 && e.indexOf("offset=") >= 0) && (xr[n] = o), $r[n] = o, i.total = o;
2706
+ (e.length < 2 || e.length < 12 && e.indexOf("offset=") >= 0) && (br[n] = o), Sr[n] = o, i.total = o;
2666
2707
  }
2667
- return r && r.link && (Cn = Vi(r.link || "").next, i.next = je(Cn.split("?")[1])), i;
2708
+ return r && r.link && (Dn = Hi(r.link || "").next, i.next = je(Dn.split("?")[1])), i;
2668
2709
  }
2669
2710
  const Ve = "oauth_apps";
2670
2711
  function Tt(t) {
2671
- return new Oo(t);
2712
+ return new $o(t);
2672
2713
  }
2673
- function Os(t = {}) {
2714
+ function $s(t = {}) {
2674
2715
  return E({ query_params: t, fn: Tt, path: Ve });
2675
2716
  }
2676
- function Es(t, e = {}) {
2717
+ function As(t, e = {}) {
2677
2718
  return $({ id: t, query_params: e, fn: Tt, path: Ve });
2678
2719
  }
2679
- function Is(t, e, n = "patch") {
2680
- return N({
2720
+ function ws(t, e, n = "patch") {
2721
+ return C({
2681
2722
  id: t,
2682
2723
  form_data: e,
2683
2724
  query_params: {},
@@ -2686,14 +2727,14 @@ function Is(t, e, n = "patch") {
2686
2727
  path: Ve
2687
2728
  });
2688
2729
  }
2689
- function Ps(t) {
2690
- return C({ form_data: t, query_params: {}, fn: Tt, path: Ve });
2730
+ function Os(t) {
2731
+ return N({ form_data: t, query_params: {}, fn: Tt, path: Ve });
2691
2732
  }
2692
- function Ts(t, e = {}) {
2693
- return T({ id: t, query_params: e, path: Ve });
2733
+ function Es(t, e = {}) {
2734
+ return M({ id: t, query_params: e, path: Ve });
2694
2735
  }
2695
- var Io = /* @__PURE__ */ ((t) => (t[t.Certificate = 0] = "Certificate", t[t.NoAuth = 1] = "NoAuth", t[t.UserPassword = 2] = "UserPassword", t))(Io || {});
2696
- class Po extends B {
2736
+ var wo = /* @__PURE__ */ ((t) => (t[t.Certificate = 0] = "Certificate", t[t.NoAuth = 1] = "NoAuth", t[t.UserPassword = 2] = "UserPassword", t))(wo || {});
2737
+ class Oo extends B {
2697
2738
  /** Unique identifier for the Broker */
2698
2739
  id;
2699
2740
  /** Name of the Broker */
@@ -2724,16 +2765,16 @@ class Po extends B {
2724
2765
  }
2725
2766
  const Qe = "brokers";
2726
2767
  function Mt(t) {
2727
- return new Po(t);
2768
+ return new Oo(t);
2728
2769
  }
2729
- function Ms(t = {}) {
2770
+ function Is(t = {}) {
2730
2771
  return E({ query_params: t, fn: Mt, path: Qe });
2731
2772
  }
2732
- function Rs(t, e = {}) {
2773
+ function Ps(t, e = {}) {
2733
2774
  return $({ id: t, query_params: e, fn: Mt, path: Qe });
2734
2775
  }
2735
- function Us(t, e, n = "patch") {
2736
- return N({
2776
+ function Ts(t, e, n = "patch") {
2777
+ return C({
2737
2778
  id: t,
2738
2779
  form_data: e,
2739
2780
  query_params: {},
@@ -2742,13 +2783,13 @@ function Us(t, e, n = "patch") {
2742
2783
  path: Qe
2743
2784
  });
2744
2785
  }
2745
- function Ds(t) {
2746
- return C({ form_data: t, query_params: {}, fn: Mt, path: Qe });
2786
+ function Ms(t) {
2787
+ return N({ form_data: t, query_params: {}, fn: Mt, path: Qe });
2747
2788
  }
2748
- function qs(t, e = {}) {
2749
- return T({ id: t, query_params: e, path: Qe });
2789
+ function Rs(t, e = {}) {
2790
+ return M({ id: t, query_params: e, path: Qe });
2750
2791
  }
2751
- class To {
2792
+ class Eo {
2752
2793
  /** Unique identifier of the application */
2753
2794
  id;
2754
2795
  /** List of running drivers */
@@ -2796,7 +2837,7 @@ class To {
2796
2837
  })) || [];
2797
2838
  }
2798
2839
  }
2799
- class Mo {
2840
+ class Io {
2800
2841
  /** ID of the cluster associated with the process */
2801
2842
  cluster_id;
2802
2843
  /** Unique identifier of the application */
@@ -2828,26 +2869,26 @@ class Mo {
2828
2869
  }
2829
2870
  }
2830
2871
  const _n = "cluster";
2831
- function Ro(t) {
2832
- return new To(t);
2872
+ function Po(t) {
2873
+ return new Eo(t);
2833
2874
  }
2834
- function Cs(t = {}) {
2835
- return E({ query_params: t, fn: Ro, path: _n });
2875
+ function Us(t = {}) {
2876
+ return E({ query_params: t, fn: Po, path: _n });
2836
2877
  }
2837
- function Ns(t, e = {}) {
2878
+ function Ds(t, e = {}) {
2838
2879
  return $({
2839
2880
  id: t,
2840
2881
  query_params: e,
2841
2882
  fn: (n) => n.map(
2842
- (r) => new Mo(t, r)
2883
+ (r) => new Io(t, r)
2843
2884
  ),
2844
2885
  path: _n
2845
2886
  });
2846
2887
  }
2847
- function js(t, e) {
2848
- return T({ id: t, query_params: { driver: e }, path: _n });
2888
+ function qs(t, e) {
2889
+ return M({ id: t, query_params: { driver: e }, path: _n });
2849
2890
  }
2850
- class Uo extends B {
2891
+ class To extends B {
2851
2892
  /** Domain name */
2852
2893
  domain;
2853
2894
  /** Login URL for the domain */
@@ -2868,16 +2909,16 @@ class Uo extends B {
2868
2909
  }
2869
2910
  const Ye = "domains";
2870
2911
  function Rt(t) {
2871
- return new Uo(t);
2912
+ return new To(t);
2872
2913
  }
2873
- function Fs(t = {}) {
2914
+ function Ns(t = {}) {
2874
2915
  return E({ query_params: t, fn: Rt, path: Ye });
2875
2916
  }
2876
- function zs(t, e = {}) {
2917
+ function Cs(t, e = {}) {
2877
2918
  return $({ id: t, query_params: e, fn: Rt, path: Ye });
2878
2919
  }
2879
- function Ls(t, e, n = "patch") {
2880
- return N({
2920
+ function js(t, e, n = "patch") {
2921
+ return C({
2881
2922
  id: t,
2882
2923
  form_data: e,
2883
2924
  query_params: {},
@@ -2886,11 +2927,11 @@ function Ls(t, e, n = "patch") {
2886
2927
  path: Ye
2887
2928
  });
2888
2929
  }
2889
- function Ws(t) {
2890
- return C({ form_data: t, query_params: {}, fn: Rt, path: Ye });
2930
+ function Fs(t) {
2931
+ return N({ form_data: t, query_params: {}, fn: Rt, path: Ye });
2891
2932
  }
2892
- function Hs(t, e = {}) {
2893
- return T({ id: t, query_params: e, path: Ye });
2933
+ function zs(t, e = {}) {
2934
+ return M({ id: t, query_params: e, path: Ye });
2894
2935
  }
2895
2936
  var Pe = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Support = 1] = "Support", t[t.Admin = 2] = "Admin", t[t.NeverDisplay = 3] = "NeverDisplay", t))(Pe || {});
2896
2937
  class Se extends B {
@@ -2915,7 +2956,7 @@ class Se extends B {
2915
2956
  }
2916
2957
  }
2917
2958
  var St = /* @__PURE__ */ ((t) => (t[t.SSH = 0] = "SSH", t[t.Device = 1] = "Device", t[t.Service = 2] = "Service", t[t.Websocket = 3] = "Websocket", t[t.Logic = 99] = "Logic", t))(St || {});
2918
- class Ar extends B {
2959
+ class kr extends B {
2919
2960
  /** Place class name of the driver */
2920
2961
  class_name;
2921
2962
  /** Description of the driver functionality */
@@ -2950,42 +2991,42 @@ class Ar extends B {
2950
2991
  }));
2951
2992
  }
2952
2993
  }
2953
- const fe = "drivers";
2994
+ const le = "drivers";
2954
2995
  function Ut(t) {
2955
- return new Ar(t);
2996
+ return new kr(t);
2956
2997
  }
2957
- function Bs(t = {}) {
2958
- return E({ query_params: t, fn: Ut, path: fe });
2998
+ function Ls(t = {}) {
2999
+ return E({ query_params: t, fn: Ut, path: le });
2959
3000
  }
2960
- function Vs(t, e = {}) {
2961
- return $({ id: t, query_params: e, fn: Ut, path: fe });
3001
+ function Hs(t, e = {}) {
3002
+ return $({ id: t, query_params: e, fn: Ut, path: le });
2962
3003
  }
2963
- function Qs(t, e, n = "patch") {
2964
- return N({
3004
+ function Ws(t, e, n = "patch") {
3005
+ return C({
2965
3006
  id: t,
2966
3007
  form_data: e,
2967
3008
  query_params: {},
2968
3009
  method: n,
2969
3010
  fn: Ut,
2970
- path: fe
3011
+ path: le
2971
3012
  });
2972
3013
  }
2973
- function Ys(t) {
2974
- return C({ form_data: t, query_params: {}, fn: Ut, path: fe });
3014
+ function Bs(t) {
3015
+ return N({ form_data: t, query_params: {}, fn: Ut, path: le });
2975
3016
  }
2976
- function Js(t, e = {}) {
2977
- return T({ id: t, query_params: e, path: fe });
3017
+ function Vs(t, e = {}) {
3018
+ return M({ id: t, query_params: e, path: le });
2978
3019
  }
2979
- function Ks(t) {
2980
- return m({ id: t, task_name: "recompile", path: fe });
3020
+ function Qs(t) {
3021
+ return y({ id: t, task_name: "recompile", path: le });
2981
3022
  }
2982
- function Zs(t) {
2983
- return m({ id: t, task_name: "reload", path: fe });
3023
+ function Ys(t) {
3024
+ return y({ id: t, task_name: "reload", path: le });
2984
3025
  }
2985
- function Gs(t) {
2986
- return m({ id: t, task_name: "compiled", method: "get", path: fe });
3026
+ function Js(t) {
3027
+ return y({ id: t, task_name: "compiled", method: "get", path: le });
2987
3028
  }
2988
- class Do extends B {
3029
+ class Mo extends B {
2989
3030
  description;
2990
3031
  secret;
2991
3032
  x_api_key;
@@ -3001,16 +3042,16 @@ class Do extends B {
3001
3042
  }
3002
3043
  const Te = "edges";
3003
3044
  function Dt(t) {
3004
- return new Do(t);
3045
+ return new Mo(t);
3005
3046
  }
3006
- function Xs(t = {}) {
3047
+ function Ks(t = {}) {
3007
3048
  return E({ query_params: t, fn: Dt, path: Te });
3008
3049
  }
3009
- function eu(t, e = {}) {
3050
+ function Zs(t, e = {}) {
3010
3051
  return $({ id: t, query_params: e, fn: Dt, path: Te });
3011
3052
  }
3012
- function tu(t, e, n = "patch") {
3013
- return N({
3053
+ function Gs(t, e, n = "patch") {
3054
+ return C({
3014
3055
  id: t,
3015
3056
  form_data: e,
3016
3057
  query_params: {},
@@ -3019,14 +3060,14 @@ function tu(t, e, n = "patch") {
3019
3060
  path: Te
3020
3061
  });
3021
3062
  }
3022
- function nu(t) {
3023
- return C({ form_data: t, query_params: {}, fn: Dt, path: Te });
3063
+ function Xs(t) {
3064
+ return N({ form_data: t, query_params: {}, fn: Dt, path: Te });
3024
3065
  }
3025
- function ru(t, e = {}) {
3026
- return T({ id: t, query_params: e, path: Te });
3066
+ function eu(t, e = {}) {
3067
+ return M({ id: t, query_params: e, path: Te });
3027
3068
  }
3028
- function iu(t, e = {}) {
3029
- return m({
3069
+ function tu(t, e = {}) {
3070
+ return y({
3030
3071
  id: t,
3031
3072
  task_name: "token",
3032
3073
  form_data: e,
@@ -3034,7 +3075,7 @@ function iu(t, e = {}) {
3034
3075
  path: Te
3035
3076
  });
3036
3077
  }
3037
- class qo extends B {
3078
+ class Ro extends B {
3038
3079
  /** Type of auth source */
3039
3080
  type = "ldap";
3040
3081
  /** ID of the authority associted with the auth method */
@@ -3064,16 +3105,16 @@ class qo extends B {
3064
3105
  }
3065
3106
  const Je = "ldap_auths";
3066
3107
  function qt(t) {
3067
- return new qo(t);
3108
+ return new Ro(t);
3068
3109
  }
3069
- function ou(t = {}) {
3110
+ function nu(t = {}) {
3070
3111
  return E({ query_params: t, fn: qt, path: Je });
3071
3112
  }
3072
- function su(t, e = {}) {
3113
+ function ru(t, e = {}) {
3073
3114
  return $({ id: t, query_params: e, fn: qt, path: Je });
3074
3115
  }
3075
- function uu(t, e, n = "patch") {
3076
- return N({
3116
+ function iu(t, e, n = "patch") {
3117
+ return C({
3077
3118
  id: t,
3078
3119
  form_data: e,
3079
3120
  query_params: {},
@@ -3082,13 +3123,13 @@ function uu(t, e, n = "patch") {
3082
3123
  path: Je
3083
3124
  });
3084
3125
  }
3085
- function cu(t) {
3086
- return C({ form_data: t, query_params: {}, fn: qt, path: Je });
3126
+ function ou(t) {
3127
+ return N({ form_data: t, query_params: {}, fn: qt, path: Je });
3087
3128
  }
3088
- function au(t, e = {}) {
3089
- return T({ id: t, query_params: e, path: Je });
3129
+ function su(t, e = {}) {
3130
+ return M({ id: t, query_params: e, path: Je });
3090
3131
  }
3091
- class wr {
3132
+ class xr {
3092
3133
  /** ID of the parent resource associated with the metadata */
3093
3134
  id;
3094
3135
  /** Name/ID of the zone metadata */
@@ -3231,7 +3272,7 @@ class mn extends B {
3231
3272
  ));
3232
3273
  }
3233
3274
  }
3234
- class Co {
3275
+ class Uo {
3235
3276
  /** Zone associated with the metadata */
3236
3277
  zone;
3237
3278
  /** Metadata for zone */
@@ -3242,14 +3283,14 @@ class Co {
3242
3283
  this.zone = new mn(e.zone), this.keys = e.keys || [], this.metadata = {};
3243
3284
  const n = e.metadata || {};
3244
3285
  for (const r of this.keys)
3245
- this.metadata[r] = new wr(n[r]);
3286
+ this.metadata[r] = new xr(n[r]);
3246
3287
  }
3247
3288
  }
3248
3289
  const ke = "metadata";
3249
3290
  function Ke(t) {
3250
- return new wr(t);
3291
+ return new xr(t);
3251
3292
  }
3252
- function lu(t, e = {}) {
3293
+ function uu(t, e = {}) {
3253
3294
  return $({
3254
3295
  id: t,
3255
3296
  query_params: e,
@@ -3257,7 +3298,7 @@ function lu(t, e = {}) {
3257
3298
  path: ke
3258
3299
  });
3259
3300
  }
3260
- function No(t) {
3301
+ function Do(t) {
3261
3302
  const e = [...t], n = [];
3262
3303
  for (; e.length; ) {
3263
3304
  const r = e.pop();
@@ -3265,13 +3306,13 @@ function No(t) {
3265
3306
  }
3266
3307
  return n.reverse();
3267
3308
  }
3268
- function fu(t, e = {}) {
3269
- return m({
3309
+ function cu(t, e = {}) {
3310
+ return y({
3270
3311
  id: t,
3271
3312
  task_name: "history",
3272
3313
  form_data: e,
3273
3314
  method: "get",
3274
- callback: (n) => No(
3315
+ callback: (n) => Do(
3275
3316
  Object.keys(n).map(
3276
3317
  (r) => n[r].map((i) => Ke(i))
3277
3318
  )
@@ -3279,7 +3320,7 @@ function fu(t, e = {}) {
3279
3320
  path: ke
3280
3321
  });
3281
3322
  }
3282
- function hu(t, e, n = {}) {
3323
+ function au(t, e, n = {}) {
3283
3324
  return $({
3284
3325
  id: t,
3285
3326
  query_params: { ...n, name: e },
@@ -3287,8 +3328,8 @@ function hu(t, e, n = {}) {
3287
3328
  path: ke
3288
3329
  });
3289
3330
  }
3290
- function du(t, e, n = "put") {
3291
- return N({
3331
+ function lu(t, e, n = "put") {
3332
+ return C({
3292
3333
  id: t,
3293
3334
  form_data: e,
3294
3335
  query_params: {},
@@ -3297,20 +3338,20 @@ function du(t, e, n = "put") {
3297
3338
  path: ke
3298
3339
  });
3299
3340
  }
3300
- function pu(t) {
3301
- return C({ form_data: t, query_params: {}, fn: Ke, path: ke });
3341
+ function fu(t) {
3342
+ return N({ form_data: t, query_params: {}, fn: Ke, path: ke });
3302
3343
  }
3303
- function _u(t, e = {}) {
3304
- return T({ id: t, query_params: e, path: ke });
3344
+ function hu(t, e = {}) {
3345
+ return M({ id: t, query_params: e, path: ke });
3305
3346
  }
3306
- function mu(t, e) {
3307
- return m({
3347
+ function du(t, e) {
3348
+ return y({
3308
3349
  id: t,
3309
3350
  task_name: "children",
3310
3351
  form_data: e,
3311
3352
  method: "get",
3312
3353
  callback: (n) => n.map(
3313
- (r) => new Co({
3354
+ (r) => new Uo({
3314
3355
  ...r,
3315
3356
  keys: Object.keys(r.metadata)
3316
3357
  })
@@ -3318,7 +3359,7 @@ function mu(t, e) {
3318
3359
  path: ke
3319
3360
  });
3320
3361
  }
3321
- class Or extends B {
3362
+ class $r extends B {
3322
3363
  /** Tuple of user settings of differring encryption levels for the system */
3323
3364
  settings = [null, null, null, null];
3324
3365
  /** Display name of the system */
@@ -3371,11 +3412,11 @@ class Or extends B {
3371
3412
  encryption_level: +n
3372
3413
  }));
3373
3414
  e.module_data && e.module_data instanceof Array && (this.module_list = e.module_data.map(
3374
- (n) => new Er(n)
3415
+ (n) => new Ar(n)
3375
3416
  ));
3376
3417
  }
3377
3418
  }
3378
- class Er extends B {
3419
+ class Ar extends B {
3379
3420
  /** Whether the associated hardware is connected */
3380
3421
  connected;
3381
3422
  /** Whether the module driver is running */
@@ -3423,9 +3464,9 @@ class Er extends B {
3423
3464
  return this.control_system_id;
3424
3465
  }
3425
3466
  constructor(e = {}) {
3426
- super(e), this.driver_id = e.driver_id || e.dependency_id || "", this.control_system_id = e.control_system_id || "", this.edge_id = e.edge_id || "", this.ip = e.ip || "", this.tls = e.tls || !1, this.udp = e.udp || !1, this.port = e.port || 1, this.makebreak = e.makebreak || !1, this.uri = e.uri || "", this.custom_name = e.custom_name || "", this.role = e.role ?? St.Logic, this.notes = e.notes || "", this.ignore_connected = e.ignore_connected || !1, this.connected = e.connected, this.running = e.running || !1, this.updated_at = e.updated_at || 0, this.system = new Or(
3467
+ super(e), this.driver_id = e.driver_id || e.dependency_id || "", this.control_system_id = e.control_system_id || "", this.edge_id = e.edge_id || "", this.ip = e.ip || "", this.tls = e.tls || !1, this.udp = e.udp || !1, this.port = e.port || 1, this.makebreak = e.makebreak || !1, this.uri = e.uri || "", this.custom_name = e.custom_name || "", this.role = e.role ?? St.Logic, this.notes = e.notes || "", this.ignore_connected = e.ignore_connected || !1, this.connected = e.connected, this.running = e.running || !1, this.updated_at = e.updated_at || 0, this.system = new $r(
3427
3468
  e.control_system || e.system
3428
- ), this.has_runtime_error = e.has_runtime_error || !1, this.error_timestamp = e.error_timestamp || 0, this.driver = new Ar(e.dependency || e.driver), this.settings = e.settings || [null, null, null, null], typeof this.settings != "object" && (this.settings = [null, null, null, null]);
3469
+ ), this.has_runtime_error = e.has_runtime_error || !1, this.error_timestamp = e.error_timestamp || 0, this.driver = new kr(e.dependency || e.driver), this.settings = e.settings || [null, null, null, null], typeof this.settings != "object" && (this.settings = [null, null, null, null]);
3429
3470
  for (const n in Pe)
3430
3471
  !isNaN(Number(n)) && !this.settings[n] && (this.settings[n] = new Se({
3431
3472
  parent_id: this.id,
@@ -3441,48 +3482,48 @@ class Er extends B {
3441
3482
  }
3442
3483
  }
3443
3484
  const K = "modules";
3444
- function Ct(t) {
3445
- return new Er(t);
3485
+ function Nt(t) {
3486
+ return new Ar(t);
3446
3487
  }
3447
- function yu(t = {}) {
3448
- return E({ query_params: t, fn: Ct, path: K });
3488
+ function pu(t = {}) {
3489
+ return E({ query_params: t, fn: Nt, path: K });
3449
3490
  }
3450
- function gu(t, e = {}) {
3451
- return $({ id: t, query_params: e, fn: Ct, path: K });
3491
+ function _u(t, e = {}) {
3492
+ return $({ id: t, query_params: e, fn: Nt, path: K });
3452
3493
  }
3453
- function bu(t, e, n = "patch") {
3454
- return N({
3494
+ function mu(t, e, n = "patch") {
3495
+ return C({
3455
3496
  id: t,
3456
3497
  form_data: e,
3457
3498
  query_params: {},
3458
3499
  method: n,
3459
- fn: Ct,
3500
+ fn: Nt,
3460
3501
  path: K
3461
3502
  });
3462
3503
  }
3463
- function vu(t) {
3464
- return C({ form_data: t, query_params: {}, fn: Ct, path: K });
3504
+ function yu(t) {
3505
+ return N({ form_data: t, query_params: {}, fn: Nt, path: K });
3465
3506
  }
3466
- function Su(t, e = {}) {
3467
- return T({ id: t, query_params: e, path: K });
3507
+ function gu(t, e = {}) {
3508
+ return M({ id: t, query_params: e, path: K });
3468
3509
  }
3469
- function ku(t) {
3470
- return m({ id: t, task_name: "start", path: K });
3510
+ function vu(t) {
3511
+ return y({ id: t, task_name: "start", path: K });
3471
3512
  }
3472
- function xu(t) {
3473
- return m({ id: t, task_name: "stop", path: K });
3513
+ function bu(t) {
3514
+ return y({ id: t, task_name: "stop", path: K });
3474
3515
  }
3475
- function $u(t) {
3476
- return m({ id: t, task_name: "state", method: "get", path: K });
3516
+ function Su(t) {
3517
+ return y({ id: t, task_name: "state", method: "get", path: K });
3477
3518
  }
3478
- function Au(t, e) {
3479
- return m({ id: t, task_name: `state${e}`, method: "get", path: K });
3519
+ function ku(t, e) {
3520
+ return y({ id: t, task_name: `state${e}`, method: "get", path: K });
3480
3521
  }
3481
- function wu(t) {
3482
- return m({ id: t, task_name: "load", method: "post", path: K });
3522
+ function xu(t) {
3523
+ return y({ id: t, task_name: "load", method: "post", path: K });
3483
3524
  }
3484
- function Ou(t) {
3485
- return m({
3525
+ function $u(t) {
3526
+ return y({
3486
3527
  id: t,
3487
3528
  task_name: "settings",
3488
3529
  method: "get",
@@ -3490,15 +3531,15 @@ function Ou(t) {
3490
3531
  path: K
3491
3532
  });
3492
3533
  }
3493
- function Eu(t) {
3494
- return m({
3534
+ function Au(t) {
3535
+ return y({
3495
3536
  id: t,
3496
3537
  task_name: "error",
3497
3538
  method: "get",
3498
3539
  path: K
3499
3540
  });
3500
3541
  }
3501
- class jo extends B {
3542
+ class qo extends B {
3502
3543
  /** Type of auth source */
3503
3544
  type = "oauth";
3504
3545
  /** ID of the authority associted with the auth method */
@@ -3532,33 +3573,33 @@ class jo extends B {
3532
3573
  }
3533
3574
  }
3534
3575
  const Ze = "oauth_auths";
3535
- function Nt(t) {
3536
- return new jo(t);
3576
+ function Ct(t) {
3577
+ return new qo(t);
3537
3578
  }
3538
- function Iu(t = {}) {
3539
- return E({ query_params: t, fn: Nt, path: Ze });
3579
+ function wu(t = {}) {
3580
+ return E({ query_params: t, fn: Ct, path: Ze });
3540
3581
  }
3541
- function Pu(t, e = {}) {
3542
- return $({ id: t, query_params: e, fn: Nt, path: Ze });
3582
+ function Ou(t, e = {}) {
3583
+ return $({ id: t, query_params: e, fn: Ct, path: Ze });
3543
3584
  }
3544
- function Tu(t, e, n = "patch") {
3545
- return N({
3585
+ function Eu(t, e, n = "patch") {
3586
+ return C({
3546
3587
  id: t,
3547
3588
  form_data: e,
3548
3589
  query_params: {},
3549
3590
  method: n,
3550
- fn: Nt,
3591
+ fn: Ct,
3551
3592
  path: Ze
3552
3593
  });
3553
3594
  }
3554
- function Mu(t) {
3555
- return C({ form_data: t, query_params: {}, fn: Nt, path: Ze });
3595
+ function Iu(t) {
3596
+ return N({ form_data: t, query_params: {}, fn: Ct, path: Ze });
3556
3597
  }
3557
- function Ru(t, e = {}) {
3558
- return T({ id: t, query_params: e, path: Ze });
3598
+ function Pu(t, e = {}) {
3599
+ return M({ id: t, query_params: e, path: Ze });
3559
3600
  }
3560
- var Ir = /* @__PURE__ */ ((t) => (t.Driver = "driver", t.Interface = "interface", t))(Ir || {});
3561
- class Fo extends B {
3601
+ var wr = /* @__PURE__ */ ((t) => (t.Driver = "driver", t.Interface = "interface", t))(wr || {});
3602
+ class No extends B {
3562
3603
  /** Name of the folder on the server to pull the repository */
3563
3604
  folder_name;
3564
3605
  /** Description of the contents of the repository */
@@ -3575,26 +3616,28 @@ class Fo extends B {
3575
3616
  username;
3576
3617
  /** Password to connect to repository with */
3577
3618
  password;
3619
+ /** Root path of the repository to serve at the `folder_name` path */
3620
+ root_path;
3578
3621
  /** Repository type */
3579
3622
  get type() {
3580
3623
  return this.repo_type;
3581
3624
  }
3582
3625
  constructor(e = {}) {
3583
- super(e), this.folder_name = e.folder_name || "", this.description = e.description || "", this.uri = e.uri || "", this.branch = e.branch || "", this.commit_hash = e.commit_hash || "", this.repo_type = e.repo_type || Ir.Driver, this.username = e.username || "", this.password = e.password || "";
3626
+ super(e), this.folder_name = e.folder_name || "", this.description = e.description || "", this.uri = e.uri || "", this.branch = e.branch || "", this.commit_hash = e.commit_hash || "", this.repo_type = e.repo_type || wr.Driver, this.username = e.username || "", this.password = e.password || "", this.root_path = e.root_path || "";
3584
3627
  }
3585
3628
  }
3586
3629
  const V = "repositories";
3587
3630
  function jt(t) {
3588
- return new Fo(t);
3631
+ return new No(t);
3589
3632
  }
3590
- function Uu(t = {}) {
3633
+ function Tu(t = {}) {
3591
3634
  return E({ query_params: t, fn: jt, path: V });
3592
3635
  }
3593
- function Du(t, e = {}) {
3636
+ function Mu(t, e = {}) {
3594
3637
  return $({ id: t, query_params: e, fn: jt, path: V });
3595
3638
  }
3596
- function qu(t, e, n = "patch") {
3597
- return N({
3639
+ function Ru(t, e, n = "patch") {
3640
+ return C({
3598
3641
  id: t,
3599
3642
  form_data: e,
3600
3643
  query_params: {},
@@ -3603,42 +3646,42 @@ function qu(t, e, n = "patch") {
3603
3646
  path: V
3604
3647
  });
3605
3648
  }
3606
- function Cu(t) {
3607
- return C({ form_data: t, query_params: {}, fn: jt, path: V });
3649
+ function Uu(t) {
3650
+ return N({ form_data: t, query_params: {}, fn: jt, path: V });
3608
3651
  }
3609
- function Nu(t, e = {}) {
3610
- return T({ id: t, query_params: e, path: V });
3652
+ function Du(t, e = {}) {
3653
+ return M({ id: t, query_params: e, path: V });
3611
3654
  }
3612
- function ju(t = {}) {
3655
+ function qu(t = {}) {
3613
3656
  return $({
3614
3657
  id: "interfaces",
3615
3658
  query_params: t,
3616
3659
  path: V
3617
3660
  });
3618
3661
  }
3619
- function Fu(t) {
3662
+ function Nu(t) {
3620
3663
  return $({
3621
3664
  id: "remote_default_branch",
3622
3665
  query_params: t,
3623
3666
  path: V
3624
3667
  });
3625
3668
  }
3626
- function zu(t) {
3669
+ function Cu(t) {
3627
3670
  return $({
3628
3671
  id: "remote_branches",
3629
3672
  query_params: t,
3630
3673
  path: V
3631
3674
  });
3632
3675
  }
3633
- function Lu(t) {
3676
+ function ju(t) {
3634
3677
  return $({
3635
3678
  id: "remote_commits",
3636
3679
  query_params: t,
3637
3680
  path: V
3638
3681
  });
3639
3682
  }
3640
- function Wu(t, e) {
3641
- return m({
3683
+ function Fu(t, e) {
3684
+ return y({
3642
3685
  id: t,
3643
3686
  task_name: "drivers",
3644
3687
  form_data: e,
@@ -3646,8 +3689,8 @@ function Wu(t, e) {
3646
3689
  path: V
3647
3690
  });
3648
3691
  }
3649
- function Hu(t, e) {
3650
- return m({
3692
+ function zu(t, e) {
3693
+ return y({
3651
3694
  id: t,
3652
3695
  task_name: "commits",
3653
3696
  form_data: e,
@@ -3655,24 +3698,24 @@ function Hu(t, e) {
3655
3698
  path: V
3656
3699
  });
3657
3700
  }
3658
- function Bu(t) {
3659
- return m({
3701
+ function Lu(t) {
3702
+ return y({
3660
3703
  id: t,
3661
3704
  task_name: "branches",
3662
3705
  method: "get",
3663
3706
  path: V
3664
3707
  });
3665
3708
  }
3666
- function Vu(t) {
3667
- return m({
3709
+ function Hu(t) {
3710
+ return y({
3668
3711
  id: t,
3669
3712
  task_name: "default_branch",
3670
3713
  method: "get",
3671
3714
  path: V
3672
3715
  });
3673
3716
  }
3674
- function Qu(t, e) {
3675
- return m({
3717
+ function Wu(t, e) {
3718
+ return y({
3676
3719
  id: t,
3677
3720
  task_name: "details",
3678
3721
  form_data: e,
@@ -3680,8 +3723,8 @@ function Qu(t, e) {
3680
3723
  path: V
3681
3724
  });
3682
3725
  }
3683
- function Yu(t, e) {
3684
- return m({
3726
+ function Bu(t, e) {
3727
+ return y({
3685
3728
  id: t,
3686
3729
  task_name: "pull",
3687
3730
  form_data: e,
@@ -3689,7 +3732,7 @@ function Yu(t, e) {
3689
3732
  path: V
3690
3733
  });
3691
3734
  }
3692
- class zo extends B {
3735
+ class Co extends B {
3693
3736
  /** Type of auth source */
3694
3737
  type = "saml";
3695
3738
  /** ID of the authority associted with the auth method */
@@ -3729,16 +3772,16 @@ class zo extends B {
3729
3772
  }
3730
3773
  const Ge = "saml_auths";
3731
3774
  function Ft(t) {
3732
- return new zo(t);
3775
+ return new Co(t);
3733
3776
  }
3734
- function Ju(t = {}) {
3777
+ function Vu(t = {}) {
3735
3778
  return E({ query_params: t, fn: Ft, path: Ge });
3736
3779
  }
3737
- function Ku(t, e = {}) {
3780
+ function Qu(t, e = {}) {
3738
3781
  return $({ id: t, query_params: e, fn: Ft, path: Ge });
3739
3782
  }
3740
- function Zu(t, e, n = "patch") {
3741
- return N({
3783
+ function Yu(t, e, n = "patch") {
3784
+ return C({
3742
3785
  id: t,
3743
3786
  form_data: e,
3744
3787
  query_params: {},
@@ -3747,24 +3790,24 @@ function Zu(t, e, n = "patch") {
3747
3790
  path: Ge
3748
3791
  });
3749
3792
  }
3750
- function Gu(t) {
3751
- return C({ form_data: t, query_params: {}, fn: Ft, path: Ge });
3793
+ function Ju(t) {
3794
+ return N({ form_data: t, query_params: {}, fn: Ft, path: Ge });
3752
3795
  }
3753
- function Xu(t, e = {}) {
3754
- return T({ id: t, query_params: e, path: Ge });
3796
+ function Ku(t, e = {}) {
3797
+ return M({ id: t, query_params: e, path: Ge });
3755
3798
  }
3756
3799
  const Re = "settings";
3757
3800
  function Xe(t) {
3758
3801
  return new Se(t);
3759
3802
  }
3760
- function ec(t = {}) {
3803
+ function Zu(t = {}) {
3761
3804
  return E({ query_params: t, fn: Xe, path: Re });
3762
3805
  }
3763
- function tc(t, e = {}) {
3806
+ function Gu(t, e = {}) {
3764
3807
  return $({ id: t, query_params: e, fn: Xe, path: Re });
3765
3808
  }
3766
- function nc(t, e, n = {}, r = "patch") {
3767
- return N({
3809
+ function Xu(t, e, n = {}, r = "patch") {
3810
+ return C({
3768
3811
  id: t,
3769
3812
  form_data: e,
3770
3813
  query_params: n,
@@ -3773,14 +3816,14 @@ function nc(t, e, n = {}, r = "patch") {
3773
3816
  path: Re
3774
3817
  });
3775
3818
  }
3776
- function rc(t, e = {}) {
3777
- return C({ form_data: t, query_params: e, fn: Xe, path: Re });
3819
+ function ec(t, e = {}) {
3820
+ return N({ form_data: t, query_params: e, fn: Xe, path: Re });
3778
3821
  }
3779
- function ic(t, e = {}) {
3780
- return T({ id: t, query_params: e, path: Re });
3822
+ function tc(t, e = {}) {
3823
+ return M({ id: t, query_params: e, path: Re });
3781
3824
  }
3782
- function oc(t, e = {}) {
3783
- return m({
3825
+ function nc(t, e = {}) {
3826
+ return y({
3784
3827
  id: t,
3785
3828
  task_name: "history",
3786
3829
  form_data: e,
@@ -3789,155 +3832,155 @@ function oc(t, e = {}) {
3789
3832
  path: Re
3790
3833
  });
3791
3834
  }
3792
- const M = "systems";
3835
+ const R = "systems";
3793
3836
  function xe(t) {
3794
- return new Or(t);
3837
+ return new $r(t);
3795
3838
  }
3796
- function sc(t = {}) {
3797
- return E({ query_params: t, fn: xe, path: M });
3839
+ function rc(t = {}) {
3840
+ return E({ query_params: t, fn: xe, path: R });
3798
3841
  }
3799
- function uc(t = {}) {
3800
- return E({ query_params: t, fn: xe, path: `${M}/with_emails` });
3842
+ function ic(t = {}) {
3843
+ return E({ query_params: t, fn: xe, path: `${R}/with_emails` });
3801
3844
  }
3802
- function cc(t, e = {}) {
3803
- return $({ id: t, query_params: e, fn: xe, path: M });
3845
+ function oc(t, e = {}) {
3846
+ return $({ id: t, query_params: e, fn: xe, path: R });
3804
3847
  }
3805
- function ac(t, e, n = "patch") {
3806
- return N({
3848
+ function sc(t, e, n = "patch") {
3849
+ return C({
3807
3850
  id: t,
3808
3851
  form_data: e,
3809
3852
  query_params: {},
3810
3853
  method: n,
3811
3854
  fn: xe,
3812
- path: M
3855
+ path: R
3813
3856
  });
3814
3857
  }
3815
- function lc(t) {
3816
- return C({ form_data: t, query_params: {}, fn: xe, path: M });
3858
+ function uc(t) {
3859
+ return N({ form_data: t, query_params: {}, fn: xe, path: R });
3817
3860
  }
3818
- function fc(t, e = {}) {
3819
- return T({ id: t, query_params: e, path: M });
3861
+ function cc(t, e = {}) {
3862
+ return M({ id: t, query_params: e, path: R });
3820
3863
  }
3821
- function hc(t, e, n = {}) {
3822
- return m({
3864
+ function ac(t, e, n = {}) {
3865
+ return y({
3823
3866
  id: t,
3824
3867
  task_name: `module/${e}`,
3825
3868
  form_data: n,
3826
3869
  method: "put",
3827
3870
  callback: (r) => xe(r),
3828
- path: M
3871
+ path: R
3829
3872
  });
3830
3873
  }
3831
- function dc(t, e) {
3832
- return m({
3874
+ function lc(t, e) {
3875
+ return y({
3833
3876
  id: t,
3834
3877
  task_name: `module/${e}`,
3835
3878
  form_data: {},
3836
3879
  method: "del",
3837
3880
  callback: (n) => xe(n),
3838
- path: M
3881
+ path: R
3839
3882
  });
3840
3883
  }
3841
- function pc(t) {
3842
- return m({
3884
+ function fc(t) {
3885
+ return y({
3843
3886
  id: t,
3844
3887
  task_name: "start",
3845
3888
  form_data: {},
3846
- path: M
3889
+ path: R
3847
3890
  });
3848
3891
  }
3849
- function _c(t) {
3850
- return m({
3892
+ function hc(t) {
3893
+ return y({
3851
3894
  id: t,
3852
3895
  task_name: "stop",
3853
- path: M
3896
+ path: R
3854
3897
  });
3855
3898
  }
3856
- function mc(t, e, n, r = 1, i = []) {
3857
- return m({
3899
+ function dc(t, e, n, r = 1, i = []) {
3900
+ return y({
3858
3901
  id: t,
3859
3902
  task_name: `${n}_${r}/${encodeURIComponent(e)}`,
3860
3903
  form_data: i,
3861
- path: M
3904
+ path: R
3862
3905
  });
3863
3906
  }
3864
- function yc(t, e, n = 1) {
3865
- return m({
3907
+ function pc(t, e, n = 1) {
3908
+ return y({
3866
3909
  id: t,
3867
3910
  task_name: `${e}_${n}`,
3868
3911
  method: "get",
3869
- path: M
3912
+ path: R
3870
3913
  });
3871
3914
  }
3872
- function gc(t, e, n = 1, r) {
3873
- return m({
3915
+ function _c(t, e, n = 1, r) {
3916
+ return y({
3874
3917
  id: t,
3875
3918
  task_name: `${e}_${n}/${r}`,
3876
3919
  method: "get",
3877
- path: M
3920
+ path: R
3878
3921
  });
3879
3922
  }
3880
- function bc(t, e, n = 1) {
3881
- return m({
3923
+ function mc(t, e, n = 1) {
3924
+ return y({
3882
3925
  id: t,
3883
3926
  task_name: `functions/${e}_${n}`,
3884
3927
  method: "get",
3885
- path: M
3928
+ path: R
3886
3929
  });
3887
3930
  }
3888
- function vc(t) {
3931
+ function yc(t) {
3889
3932
  return E({
3890
3933
  query_params: {},
3891
3934
  fn: (e) => new mn(e),
3892
- path: `${M}/${t}/zones`
3935
+ path: `${R}/${t}/zones`
3893
3936
  });
3894
3937
  }
3895
- function Sc(t) {
3938
+ function gc(t) {
3896
3939
  return E({
3897
3940
  query_params: {},
3898
3941
  fn: (e) => new Me(e),
3899
- path: `${M}/${t}/triggers`
3942
+ path: `${R}/${t}/triggers`
3900
3943
  });
3901
3944
  }
3902
- function kc(t, e) {
3903
- return m({
3945
+ function vc(t, e) {
3946
+ return y({
3904
3947
  id: t,
3905
3948
  task_name: "triggers",
3906
3949
  form_data: e,
3907
3950
  method: "post",
3908
3951
  callback: (n) => new Me(n),
3909
- path: M
3952
+ path: R
3910
3953
  });
3911
3954
  }
3912
- function xc(t, e) {
3913
- return m({
3955
+ function bc(t, e) {
3956
+ return y({
3914
3957
  id: t,
3915
3958
  task_name: `triggers/${e}`,
3916
3959
  method: "del",
3917
- path: M
3960
+ path: R
3918
3961
  });
3919
3962
  }
3920
- function $c(t) {
3921
- return m({
3963
+ function Sc(t) {
3964
+ return y({
3922
3965
  id: t,
3923
3966
  task_name: "settings",
3924
3967
  method: "get",
3925
3968
  callback: (e) => e.map((n) => new Se(n)),
3926
- path: M
3969
+ path: R
3927
3970
  });
3928
3971
  }
3929
3972
  const Ue = "triggers";
3930
3973
  function zt(t) {
3931
3974
  return new Me(t);
3932
3975
  }
3933
- function Ac(t = {}) {
3976
+ function kc(t = {}) {
3934
3977
  return E({ query_params: t, fn: zt, path: Ue });
3935
3978
  }
3936
- function wc(t, e = {}) {
3979
+ function xc(t, e = {}) {
3937
3980
  return $({ id: t, query_params: e, fn: zt, path: Ue });
3938
3981
  }
3939
- function Oc(t, e, n = "patch") {
3940
- return N({
3982
+ function $c(t, e, n = "patch") {
3983
+ return C({
3941
3984
  id: t,
3942
3985
  form_data: e,
3943
3986
  query_params: {},
@@ -3946,14 +3989,14 @@ function Oc(t, e, n = "patch") {
3946
3989
  path: Ue
3947
3990
  });
3948
3991
  }
3949
- function Ec(t) {
3950
- return C({ form_data: t, query_params: {}, fn: zt, path: Ue });
3992
+ function Ac(t) {
3993
+ return N({ form_data: t, query_params: {}, fn: zt, path: Ue });
3951
3994
  }
3952
- function Ic(t, e = {}) {
3953
- return T({ id: t, query_params: e, path: Ue });
3995
+ function wc(t, e = {}) {
3996
+ return M({ id: t, query_params: e, path: Ue });
3954
3997
  }
3955
- function Pc(t) {
3956
- return m({
3998
+ function Oc(t) {
3999
+ return y({
3957
4000
  id: t,
3958
4001
  task_name: "instances",
3959
4002
  form_data: {},
@@ -3962,8 +4005,8 @@ function Pc(t) {
3962
4005
  path: Ue
3963
4006
  });
3964
4007
  }
3965
- var Lo = /* @__PURE__ */ ((t) => (t.EQ = "equal", t.NEQ = "not_equal", t.GT = "greater_than", t.GTE = "greater_than_or_equal", t.LT = "less_than", t.LTE = "less_than_or_equal", t.AND = "and", t.OR = "or", t.XOR = "exclusive_or", t))(Lo || {}), Wo = /* @__PURE__ */ ((t) => (t.AT = "at", t.CRON = "cron", t))(Wo || {}), Ho = /* @__PURE__ */ ((t) => (t[t.ExecuteBefore = 0] = "ExecuteBefore", t[t.ExecuteAfter = 1] = "ExecuteAfter", t[t.PayloadOnly = 2] = "PayloadOnly", t[t.IgnorePayload = 3] = "IgnorePayload", t))(Ho || {});
3966
- class Bo extends B {
4008
+ var jo = /* @__PURE__ */ ((t) => (t.EQ = "equal", t.NEQ = "not_equal", t.GT = "greater_than", t.GTE = "greater_than_or_equal", t.LT = "less_than", t.LTE = "less_than_or_equal", t.AND = "and", t.OR = "or", t.XOR = "exclusive_or", t))(jo || {}), Fo = /* @__PURE__ */ ((t) => (t.AT = "at", t.CRON = "cron", t))(Fo || {}), zo = /* @__PURE__ */ ((t) => (t[t.ExecuteBefore = 0] = "ExecuteBefore", t[t.ExecuteAfter = 1] = "ExecuteAfter", t[t.PayloadOnly = 2] = "PayloadOnly", t[t.IgnorePayload = 3] = "IgnorePayload", t))(zo || {});
4009
+ class Lo extends B {
3967
4010
  /** Hash of the email address of the user */
3968
4011
  email_digest;
3969
4012
  /** ID of the authority associated with the user */
@@ -4018,19 +4061,19 @@ class Bo extends B {
4018
4061
  }
4019
4062
  const De = "users";
4020
4063
  function et(t) {
4021
- return new Bo(t);
4064
+ return new Lo(t);
4022
4065
  }
4023
- function Tc(t = {}) {
4066
+ function Ec(t = {}) {
4024
4067
  return E({ query_params: t, fn: et, path: De });
4025
4068
  }
4026
- function Mc(t, e = {}) {
4069
+ function Ic(t, e = {}) {
4027
4070
  return $({ id: t, query_params: e, fn: et, path: De });
4028
4071
  }
4029
- function Rc(t = {}) {
4072
+ function Pc(t = {}) {
4030
4073
  return $({ id: "current", query_params: t, fn: et, path: De });
4031
4074
  }
4032
- function Uc(t, e, n = "patch") {
4033
- return N({
4075
+ function Tc(t, e, n = "patch") {
4076
+ return C({
4034
4077
  id: t,
4035
4078
  form_data: e,
4036
4079
  query_params: {},
@@ -4039,65 +4082,65 @@ function Uc(t, e, n = "patch") {
4039
4082
  path: De
4040
4083
  });
4041
4084
  }
4042
- function Dc(t) {
4043
- return C({ form_data: t, query_params: {}, fn: et, path: De });
4085
+ function Mc(t) {
4086
+ return N({ form_data: t, query_params: {}, fn: et, path: De });
4044
4087
  }
4045
- function qc(t, e = {}) {
4046
- return T({ id: t, query_params: e, path: De });
4088
+ function Rc(t, e = {}) {
4089
+ return M({ id: t, query_params: e, path: De });
4047
4090
  }
4048
- const he = "zones";
4091
+ const fe = "zones";
4049
4092
  function Lt(t) {
4050
4093
  return new mn(t);
4051
4094
  }
4052
- function Cc(t = {}) {
4053
- return E({ query_params: t, fn: Lt, path: he });
4095
+ function Uc(t = {}) {
4096
+ return E({ query_params: t, fn: Lt, path: fe });
4054
4097
  }
4055
- function Nc(t = {}) {
4098
+ function Dc(t = {}) {
4056
4099
  return $({
4057
4100
  id: "tags",
4058
4101
  query_params: t,
4059
4102
  fn: (e) => e,
4060
- path: he
4103
+ path: fe
4061
4104
  });
4062
4105
  }
4063
- function jc(t, e = {}) {
4064
- return $({ id: t, query_params: e, fn: Lt, path: he });
4106
+ function qc(t, e = {}) {
4107
+ return $({ id: t, query_params: e, fn: Lt, path: fe });
4065
4108
  }
4066
- function Fc(t, e, n = "patch") {
4067
- return N({
4109
+ function Nc(t, e, n = "patch") {
4110
+ return C({
4068
4111
  id: t,
4069
4112
  form_data: e,
4070
4113
  query_params: {},
4071
4114
  method: n,
4072
4115
  fn: Lt,
4073
- path: he
4116
+ path: fe
4074
4117
  });
4075
4118
  }
4076
- function zc(t) {
4077
- return C({ form_data: t, query_params: {}, fn: Lt, path: he });
4119
+ function Cc(t) {
4120
+ return N({ form_data: t, query_params: {}, fn: Lt, path: fe });
4078
4121
  }
4079
- function Lc(t, e = {}) {
4080
- return T({ id: t, query_params: e, path: he });
4122
+ function jc(t, e = {}) {
4123
+ return M({ id: t, query_params: e, path: fe });
4081
4124
  }
4082
- function Wc(t, e = {}) {
4125
+ function Fc(t, e = {}) {
4083
4126
  return E({
4084
4127
  query_params: e,
4085
4128
  fn: (n) => new Me(n),
4086
- path: `${he}/${t}/triggers`
4129
+ path: `${fe}/${t}/triggers`
4087
4130
  });
4088
4131
  }
4089
- function Hc(t, e, n, r = 1, i = []) {
4090
- return m({
4132
+ function zc(t, e, n, r = 1, i = []) {
4133
+ return y({
4091
4134
  id: t,
4092
4135
  task_name: `exec/${encodeURIComponent(
4093
4136
  n + "_" + r
4094
4137
  )}/${encodeURIComponent(e)}`,
4095
4138
  form_data: i,
4096
- path: he
4139
+ path: fe
4097
4140
  });
4098
4141
  }
4099
- var Pr = /* @__PURE__ */ ((t) => (t[t.Default = 0] = "Default", t[t.Cut = 1] = "Cut", t[t.CrossFade = 2] = "CrossFade", t[t.SlideTop = 3] = "SlideTop", t[t.SlideLeft = 4] = "SlideLeft", t[t.SlideRight = 5] = "SlideRight", t[t.SlideBottom = 6] = "SlideBottom", t))(Pr || {});
4100
- class Vo {
4142
+ var Or = /* @__PURE__ */ ((t) => (t[t.Default = 0] = "Default", t[t.Cut = 1] = "Cut", t[t.CrossFade = 2] = "CrossFade", t[t.SlideTop = 3] = "SlideTop", t[t.SlideLeft = 4] = "SlideLeft", t[t.SlideRight = 5] = "SlideRight", t[t.SlideBottom = 6] = "SlideBottom", t))(Or || {});
4143
+ class Ho {
4101
4144
  id;
4102
4145
  created_at;
4103
4146
  updated_at;
@@ -4123,7 +4166,7 @@ class Vo {
4123
4166
  return `/api/engine/v2/uploads/${this.thumbnail_id}/url`;
4124
4167
  }
4125
4168
  constructor(e) {
4126
- this.id = e.id || "", this.created_at = e.created_at || Mn(Date.now()), this.updated_at = e.updated_at || Mn(Date.now()), this.name = e.name || "", this.description = e.description || "", this.authority_id = e.authority_id || "", this.start_time = e.start_time || 0, this.play_time = e.play_time || 0, this.video_length = e.video_length || 0, this.animation = e.animation, this.media_type = e.media_type || "unknown", this.orientation = e.orientation || "unspecified", this.media_uri = e.media_uri || "", this.media_id = e.media_id || "", this.thumbnail_id = e.thumbnail_id || "", this.play_count = e.play_count || 0, this.valid_from = e.valid_from, this.valid_until = e.valid_until;
4169
+ this.id = e.id || "", this.created_at = e.created_at || Pn(Date.now()), this.updated_at = e.updated_at || Pn(Date.now()), this.name = e.name || "", this.description = e.description || "", this.authority_id = e.authority_id || "", this.start_time = e.start_time || 0, this.play_time = e.play_time || 0, this.video_length = e.video_length || 0, this.animation = e.animation, this.media_type = e.media_type || "unknown", this.orientation = e.orientation || "unspecified", this.media_uri = e.media_uri || "", this.media_id = e.media_id || "", this.thumbnail_id = e.thumbnail_id || "", this.play_count = e.play_count || 0, this.valid_from = e.valid_from, this.valid_until = e.valid_until;
4127
4170
  }
4128
4171
  }
4129
4172
  class yn {
@@ -4143,7 +4186,7 @@ class yn {
4143
4186
  this.id = e.id || "", this.playlist_id = e.playlist_id || "", this.created_at = e.created_at || 0, this.updated_at = e.updated_at || 0, this.items = e.items || [], this.approved = !!e.approved, this.approved_by_id = e.approved_by_id || "", this.approved_by_email = e.approved_by_email || "", this.approved_by_name = e.approved_by_name || "", this.user_id = e.user_id || "", this.user_name = e.user_name || "", this.user_email = e.user_email || "";
4144
4187
  }
4145
4188
  }
4146
- class Qo {
4189
+ class Wo {
4147
4190
  id;
4148
4191
  created_at;
4149
4192
  updated_at;
@@ -4163,92 +4206,92 @@ class Qo {
4163
4206
  valid_from;
4164
4207
  valid_until;
4165
4208
  constructor(e) {
4166
- this.id = e.id || "", this.created_at = e.created_at || 0, this.updated_at = e.updated_at || 0, this.name = e.name || "", this.description = e.description || "", this.authority_id = e.authority_id || "", this.orientation = e.orientation || "", this.play_count = e.play_count || 0, this.play_through_count = e.play_through_count || 0, this.default_animation = e.default_animation || Pr.Cut, this.random = e.random || !1, this.enabled = e.enabled ?? !0, this.default_duration = e.default_duration ?? 15 * 1e3, this.valid_from = e.valid_from, this.valid_until = e.valid_until, this.play_hours = e.play_hours || "", this.play_at = e.play_at || "", this.play_cron = e.play_cron || "";
4209
+ this.id = e.id || "", this.created_at = e.created_at || 0, this.updated_at = e.updated_at || 0, this.name = e.name || "", this.description = e.description || "", this.authority_id = e.authority_id || "", this.orientation = e.orientation || "", this.play_count = e.play_count || 0, this.play_through_count = e.play_through_count || 0, this.default_animation = e.default_animation || Or.Cut, this.random = e.random || !1, this.enabled = e.enabled ?? !0, this.default_duration = e.default_duration ?? 15 * 1e3, this.valid_from = e.valid_from, this.valid_until = e.valid_until, this.play_hours = e.play_hours || "", this.play_at = e.play_at || "", this.play_cron = e.play_cron || "";
4167
4210
  }
4168
4211
  }
4169
- const Tr = "signage";
4170
- function Bc(t, e = {}, n) {
4171
- return $({ id: t, query_params: e, fn: (r) => r, path: `${Tr}`, options: n });
4212
+ const Er = "signage";
4213
+ function Lc(t, e = {}, n) {
4214
+ return $({ id: t, query_params: e, fn: (r) => r, path: `${Er}`, options: n });
4172
4215
  }
4173
- function Vc(t) {
4174
- return m({
4216
+ function Hc(t) {
4217
+ return y({
4175
4218
  id: t,
4176
4219
  task_name: "metrics",
4177
4220
  form_data: {},
4178
4221
  method: "post",
4179
4222
  callback: (e) => e,
4180
- path: Tr
4223
+ path: Er
4181
4224
  });
4182
4225
  }
4183
4226
  const tt = "signage/media";
4184
- function Wt(t) {
4185
- return new Vo(t);
4227
+ function Ht(t) {
4228
+ return new Ho(t);
4186
4229
  }
4187
- function Qc(t = {}) {
4188
- return E({ query_params: t, fn: Wt, path: tt });
4230
+ function Wc(t = {}) {
4231
+ return E({ query_params: t, fn: Ht, path: tt });
4189
4232
  }
4190
- function Yc(t, e = {}) {
4191
- return $({ id: t, query_params: e, fn: Wt, path: tt });
4233
+ function Bc(t, e = {}) {
4234
+ return $({ id: t, query_params: e, fn: Ht, path: tt });
4192
4235
  }
4193
- function Jc(t, e, n = "patch") {
4194
- return N({
4236
+ function Vc(t, e, n = "patch") {
4237
+ return C({
4195
4238
  id: t,
4196
4239
  form_data: e,
4197
4240
  query_params: {},
4198
4241
  method: n,
4199
- fn: Wt,
4242
+ fn: Ht,
4200
4243
  path: tt
4201
4244
  });
4202
4245
  }
4203
- function Kc(t) {
4204
- return C({
4246
+ function Qc(t) {
4247
+ return N({
4205
4248
  form_data: t,
4206
4249
  query_params: {},
4207
- fn: Wt,
4250
+ fn: Ht,
4208
4251
  path: tt
4209
4252
  });
4210
4253
  }
4211
- function Zc(t, e = {}) {
4212
- return T({ id: t, query_params: e, path: tt });
4254
+ function Yc(t, e = {}) {
4255
+ return M({ id: t, query_params: e, path: tt });
4213
4256
  }
4214
4257
  const oe = "signage/playlists";
4215
- function Ht(t) {
4216
- return new Qo(t);
4258
+ function Wt(t) {
4259
+ return new Wo(t);
4217
4260
  }
4218
- function Gc(t = {}) {
4219
- return E({ query_params: t, fn: Ht, path: oe });
4261
+ function Jc(t = {}) {
4262
+ return E({ query_params: t, fn: Wt, path: oe });
4220
4263
  }
4221
- function Xc(t, e = {}) {
4264
+ function Kc(t, e = {}) {
4222
4265
  return $({
4223
4266
  id: t,
4224
4267
  query_params: e,
4225
- fn: Ht,
4268
+ fn: Wt,
4226
4269
  path: oe
4227
4270
  });
4228
4271
  }
4229
- function ea(t, e, n = "patch") {
4230
- return N({
4272
+ function Zc(t, e, n = "patch") {
4273
+ return C({
4231
4274
  id: t,
4232
4275
  form_data: e,
4233
4276
  query_params: {},
4234
4277
  method: n,
4235
- fn: Ht,
4278
+ fn: Wt,
4236
4279
  path: oe
4237
4280
  });
4238
4281
  }
4239
- function ta(t) {
4240
- return C({
4282
+ function Gc(t) {
4283
+ return N({
4241
4284
  form_data: t,
4242
4285
  query_params: {},
4243
- fn: Ht,
4286
+ fn: Wt,
4244
4287
  path: oe
4245
4288
  });
4246
4289
  }
4247
- function na(t, e = {}) {
4248
- return T({ id: t, query_params: e, path: oe });
4290
+ function Xc(t, e = {}) {
4291
+ return M({ id: t, query_params: e, path: oe });
4249
4292
  }
4250
- function ra(t, e = {}) {
4251
- return m({
4293
+ function ea(t, e = {}) {
4294
+ return y({
4252
4295
  id: t,
4253
4296
  task_name: "media",
4254
4297
  form_data: e,
@@ -4257,8 +4300,8 @@ function ra(t, e = {}) {
4257
4300
  path: oe
4258
4301
  });
4259
4302
  }
4260
- function ia(t, e = {}) {
4261
- return m({
4303
+ function ta(t, e = {}) {
4304
+ return y({
4262
4305
  id: t,
4263
4306
  task_name: "media/revisions",
4264
4307
  form_data: e,
@@ -4269,16 +4312,16 @@ function ia(t, e = {}) {
4269
4312
  path: oe
4270
4313
  });
4271
4314
  }
4272
- function oa(t) {
4273
- return m({
4315
+ function na(t) {
4316
+ return y({
4274
4317
  id: t,
4275
4318
  task_name: "media/approve",
4276
4319
  method: "post",
4277
4320
  path: oe
4278
4321
  });
4279
4322
  }
4280
- function sa(t, e) {
4281
- return m({
4323
+ function ra(t, e) {
4324
+ return y({
4282
4325
  id: t,
4283
4326
  task_name: "media",
4284
4327
  form_data: e,
@@ -4287,7 +4330,7 @@ function sa(t, e) {
4287
4330
  callback: (n) => new yn(n)
4288
4331
  });
4289
4332
  }
4290
- class Mr {
4333
+ class Ir {
4291
4334
  id;
4292
4335
  question_id;
4293
4336
  survey_id;
@@ -4297,16 +4340,16 @@ class Mr {
4297
4340
  this.id = e.id || 0, this.question_id = e.question_id || 0, this.survey_id = e.survey_id || 0, this.type = e.type || "", this.answer_json = e.answer_json || {};
4298
4341
  }
4299
4342
  }
4300
- const Rr = "/api/staff/v1/surveys/answers";
4301
- function ua(t = {}) {
4343
+ const Pr = "/api/staff/v1/surveys/answers";
4344
+ function ia(t = {}) {
4302
4345
  const e = z(t);
4303
- return ee(`${Rr}${e ? "?" + e : ""}`).pipe(
4304
- I((n) => n.map((r) => new Mr(r)))
4346
+ return ee(`${Pr}${e ? "?" + e : ""}`).pipe(
4347
+ I((n) => n.map((r) => new Ir(r)))
4305
4348
  );
4306
4349
  }
4307
- function ca(t) {
4308
- return Ie(`${Rr}`, t).pipe(
4309
- I((e) => e.map((n) => new Mr(n)))
4350
+ function oa(t) {
4351
+ return Ie(`${Pr}`, t).pipe(
4352
+ I((e) => e.map((n) => new Ir(n)))
4310
4353
  );
4311
4354
  }
4312
4355
  class Bt {
@@ -4320,31 +4363,31 @@ class Bt {
4320
4363
  }
4321
4364
  }
4322
4365
  const nt = "/api/staff/v1/surveys/invitations";
4323
- function aa(t = {}) {
4366
+ function sa(t = {}) {
4324
4367
  const e = z(t);
4325
4368
  return ee(`${nt}${e ? "?" + e : ""}`).pipe(
4326
4369
  I((n) => n.map((r) => new Bt(r)))
4327
4370
  );
4328
4371
  }
4329
- function la(t, e = {}) {
4372
+ function ua(t, e = {}) {
4330
4373
  const n = z(e);
4331
4374
  return ee(`${nt}/${t}${n ? "?" + n : ""}`).pipe(
4332
4375
  I((r) => new Bt(r))
4333
4376
  );
4334
4377
  }
4335
- function fa(t, e, n = "patch") {
4336
- return (n === "put" ? We : It)(`${nt}/${t}`, e).pipe(
4378
+ function ca(t, e, n = "patch") {
4379
+ return (n === "put" ? He : It)(`${nt}/${t}`, e).pipe(
4337
4380
  I((r) => new Bt(r))
4338
4381
  );
4339
4382
  }
4340
- function ha(t) {
4383
+ function aa(t) {
4341
4384
  return Ie(`${nt}`, t).pipe(
4342
4385
  I((e) => new Bt(e))
4343
4386
  );
4344
4387
  }
4345
- function da(t, e = {}) {
4388
+ function la(t, e = {}) {
4346
4389
  const n = z(e);
4347
- return He(`${nt}/${t}${n ? "?" + n : ""}`);
4390
+ return We(`${nt}/${t}${n ? "?" + n : ""}`);
4348
4391
  }
4349
4392
  class Vt {
4350
4393
  id;
@@ -4362,31 +4405,31 @@ class Vt {
4362
4405
  }
4363
4406
  }
4364
4407
  const rt = "/api/staff/v1/surveys/questions";
4365
- function pa(t = {}) {
4408
+ function fa(t = {}) {
4366
4409
  const e = z(t);
4367
4410
  return ee(`${rt}${e ? "?" + e : ""}`).pipe(
4368
4411
  I((n) => n.map((r) => new Vt(r)))
4369
4412
  );
4370
4413
  }
4371
- function _a(t, e = {}) {
4414
+ function ha(t, e = {}) {
4372
4415
  const n = z(e);
4373
4416
  return ee(`${rt}/${t}${n ? "?" + n : ""}`).pipe(
4374
4417
  I((r) => new Vt(r))
4375
4418
  );
4376
4419
  }
4377
- function ma(t) {
4420
+ function da(t) {
4378
4421
  return Ie(`${rt}`, t).pipe(
4379
4422
  I((e) => new Vt(e))
4380
4423
  );
4381
4424
  }
4382
- function ya(t, e, n = "patch") {
4383
- return (n === "put" ? We : It)(`${rt}/${t}`, e).pipe(
4425
+ function pa(t, e, n = "patch") {
4426
+ return (n === "put" ? He : It)(`${rt}/${t}`, e).pipe(
4384
4427
  I((r) => new Vt(r))
4385
4428
  );
4386
4429
  }
4387
- function ga(t, e = {}) {
4430
+ function _a(t, e = {}) {
4388
4431
  const n = z(e);
4389
- return He(`${rt}/${t}${n ? "?" + n : ""}`);
4432
+ return We(`${rt}/${t}${n ? "?" + n : ""}`);
4390
4433
  }
4391
4434
  class Qt {
4392
4435
  id;
@@ -4401,31 +4444,31 @@ class Qt {
4401
4444
  }
4402
4445
  }
4403
4446
  const it = "/api/staff/v1/surveys";
4404
- function ba(t = {}) {
4447
+ function ma(t = {}) {
4405
4448
  const e = z(t);
4406
4449
  return ee(`${it}${e ? "?" + e : ""}`).pipe(
4407
4450
  I((n) => n.map((r) => new Qt(r)))
4408
4451
  );
4409
4452
  }
4410
- function va(t, e = {}) {
4453
+ function ya(t, e = {}) {
4411
4454
  const n = z(e);
4412
4455
  return ee(`${it}/${t}${n ? "?" + n : ""}`).pipe(
4413
4456
  I((r) => new Qt(r))
4414
4457
  );
4415
4458
  }
4416
- function Sa(t, e, n = "patch") {
4417
- return (n === "put" ? We : It)(`${it}/${t}`, e).pipe(
4459
+ function ga(t, e, n = "patch") {
4460
+ return (n === "put" ? He : It)(`${it}/${t}`, e).pipe(
4418
4461
  I((r) => new Qt(r))
4419
4462
  );
4420
4463
  }
4421
- function ka(t) {
4464
+ function va(t) {
4422
4465
  return Ie(`${it}`, t).pipe(I((e) => new Qt(e)));
4423
4466
  }
4424
- function xa(t, e = {}) {
4467
+ function ba(t, e = {}) {
4425
4468
  const n = z(e);
4426
- return He(`${it}/${t}${n ? "?" + n : ""}`);
4469
+ return We(`${it}/${t}${n ? "?" + n : ""}`);
4427
4470
  }
4428
- var Yo = {
4471
+ var Bo = {
4429
4472
  url: "",
4430
4473
  deserializer: function(t) {
4431
4474
  return JSON.parse(t.data);
@@ -4433,15 +4476,15 @@ var Yo = {
4433
4476
  serializer: function(t) {
4434
4477
  return JSON.stringify(t);
4435
4478
  }
4436
- }, Jo = "WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }", Ko = function(t) {
4479
+ }, Vo = "WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }", Qo = function(t) {
4437
4480
  Z(e, t);
4438
4481
  function e(n, r) {
4439
4482
  var i = t.call(this) || this;
4440
- if (i._socket = null, n instanceof q)
4483
+ if (i._socket = null, n instanceof T)
4441
4484
  i.destination = r, i.source = n;
4442
4485
  else {
4443
- var o = i._config = ze({}, Yo);
4444
- if (i._output = new ae(), typeof n == "string")
4486
+ var o = i._config = ze({}, Bo);
4487
+ if (i._output = new me(), typeof n == "string")
4445
4488
  o.url = n;
4446
4489
  else
4447
4490
  for (var s in n)
@@ -4458,10 +4501,10 @@ var Yo = {
4458
4501
  var r = new e(this._config, this.destination);
4459
4502
  return r.operator = n, r.source = this, r;
4460
4503
  }, e.prototype._resetState = function() {
4461
- this._socket = null, this.source || (this.destination = new Jt()), this._output = new ae();
4504
+ this._socket = null, this.source || (this.destination = new Jt()), this._output = new me();
4462
4505
  }, e.prototype.multiplex = function(n, r, i) {
4463
4506
  var o = this;
4464
- return new q(function(s) {
4507
+ return new T(function(s) {
4465
4508
  try {
4466
4509
  o.next(n());
4467
4510
  } catch (c) {
@@ -4495,47 +4538,47 @@ var Yo = {
4495
4538
  var n = this, r = this._config, i = r.WebSocketCtor, o = r.protocol, s = r.url, u = r.binaryType, c = this._output, l = null;
4496
4539
  try {
4497
4540
  l = o ? new i(s, o) : new i(s), this._socket = l, u && (this._socket.binaryType = u);
4498
- } catch (v) {
4499
- c.error(v);
4541
+ } catch (m) {
4542
+ c.error(m);
4500
4543
  return;
4501
4544
  }
4502
4545
  var _ = new ge(function() {
4503
4546
  n._socket = null, l && l.readyState === 1 && l.close();
4504
4547
  });
4505
- l.onopen = function(v) {
4548
+ l.onopen = function(m) {
4506
4549
  var p = n._socket;
4507
4550
  if (!p) {
4508
4551
  l.close(), n._resetState();
4509
4552
  return;
4510
4553
  }
4511
4554
  var a = n._config.openObserver;
4512
- a && a.next(v);
4555
+ a && a.next(m);
4513
4556
  var h = n.destination;
4514
4557
  n.destination = At.create(function(f) {
4515
4558
  if (l.readyState === 1)
4516
4559
  try {
4517
4560
  var S = n._config.serializer;
4518
4561
  l.send(S(f));
4519
- } catch (y) {
4520
- n.destination.error(y);
4562
+ } catch (g) {
4563
+ n.destination.error(g);
4521
4564
  }
4522
4565
  }, function(f) {
4523
4566
  var S = n._config.closingObserver;
4524
- S && S.next(void 0), f && f.code ? l.close(f.code, f.reason) : c.error(new TypeError(Jo)), n._resetState();
4567
+ S && S.next(void 0), f && f.code ? l.close(f.code, f.reason) : c.error(new TypeError(Vo)), n._resetState();
4525
4568
  }, function() {
4526
4569
  var f = n._config.closingObserver;
4527
4570
  f && f.next(void 0), l.close(), n._resetState();
4528
4571
  }), h && h instanceof Jt && _.add(h.subscribe(n.destination));
4529
- }, l.onerror = function(v) {
4530
- n._resetState(), c.error(v);
4531
- }, l.onclose = function(v) {
4572
+ }, l.onerror = function(m) {
4573
+ n._resetState(), c.error(m);
4574
+ }, l.onclose = function(m) {
4532
4575
  l === n._socket && n._resetState();
4533
4576
  var p = n._config.closeObserver;
4534
- p && p.next(v), v.wasClean ? c.complete() : c.error(v);
4535
- }, l.onmessage = function(v) {
4577
+ p && p.next(m), m.wasClean ? c.complete() : c.error(m);
4578
+ }, l.onmessage = function(m) {
4536
4579
  try {
4537
4580
  var p = n._config.deserializer;
4538
- c.next(p(v));
4581
+ c.next(p(m));
4539
4582
  } catch (a) {
4540
4583
  c.error(a);
4541
4584
  }
@@ -4551,11 +4594,11 @@ var Yo = {
4551
4594
  n && (n.readyState === 1 || n.readyState === 0) && n.close(), this._resetState(), t.prototype.unsubscribe.call(this);
4552
4595
  }, e;
4553
4596
  }(tn);
4554
- function Zo(t) {
4555
- return new Ko(t);
4597
+ function Yo(t) {
4598
+ return new Qo(t);
4556
4599
  }
4557
- var X = /* @__PURE__ */ ((t) => (t[t.PARSE_ERROR = 0] = "PARSE_ERROR", t[t.BAD_REQUEST = 1] = "BAD_REQUEST", t[t.ACCESS_DENIED = 2] = "ACCESS_DENIED", t[t.REQUEST_FAILED = 3] = "REQUEST_FAILED", t[t.UNKNOWN_CMD = 4] = "UNKNOWN_CMD", t[t.SYS_NOT_FOUND = 5] = "SYS_NOT_FOUND", t[t.MOD_NOT_FOUND = 6] = "MOD_NOT_FOUND", t[t.UNEXPECTED_FAILURE = 7] = "UNEXPECTED_FAILURE", t))(X || {}), Ur = /* @__PURE__ */ ((t) => (t.Info = "info", t.Debug = "debug", t.Warning = "warn", t.Error = "error", t.Fatal = "fatal", t.Trace = "trace", t))(Ur || {});
4558
- class Go {
4600
+ var X = /* @__PURE__ */ ((t) => (t[t.PARSE_ERROR = 0] = "PARSE_ERROR", t[t.BAD_REQUEST = 1] = "BAD_REQUEST", t[t.ACCESS_DENIED = 2] = "ACCESS_DENIED", t[t.REQUEST_FAILED = 3] = "REQUEST_FAILED", t[t.UNKNOWN_CMD = 4] = "UNKNOWN_CMD", t[t.SYS_NOT_FOUND = 5] = "SYS_NOT_FOUND", t[t.MOD_NOT_FOUND = 6] = "MOD_NOT_FOUND", t[t.UNEXPECTED_FAILURE = 7] = "UNEXPECTED_FAILURE", t))(X || {}), Tr = /* @__PURE__ */ ((t) => (t.Info = "info", t.Debug = "debug", t.Warning = "warn", t.Error = "error", t.Fatal = "fatal", t.Trace = "trace", t))(Tr || {});
4601
+ class Jo {
4559
4602
  constructor(e, n) {
4560
4603
  this._system = e;
4561
4604
  const r = Object.getOwnPropertyNames(
@@ -4580,7 +4623,7 @@ class Go {
4580
4623
  * @param next Callback for changes to the property
4581
4624
  */
4582
4625
  listen(e) {
4583
- return !this[`_${e}`] && !(this[`_${e}_obs`] instanceof q) && !this[e] && this.addProperty(e, null), this[`_${e}_obs`];
4626
+ return !this[`_${e}`] && !(this[`_${e}_obs`] instanceof T) && !this[e] && this.addProperty(e, null), this[`_${e}_obs`];
4584
4627
  }
4585
4628
  /**
4586
4629
  * Add method to module
@@ -4596,13 +4639,13 @@ class Go {
4596
4639
  * @param value Initial value of the property
4597
4640
  */
4598
4641
  addProperty(e, n) {
4599
- e[0] === "$" && (e = e.replace("$", "")), this[`_${e}`] = new le(n), this[`_${e}_obs`] = this[`_${e}`].asObservable(), Object.defineProperty(this, e, {
4642
+ e[0] === "$" && (e = e.replace("$", "")), this[`_${e}`] = new ae(n), this[`_${e}_obs`] = this[`_${e}`].asObservable(), Object.defineProperty(this, e, {
4600
4643
  get: () => this[`_${e}`].getValue(),
4601
4644
  set: (r) => this[`_${e}`].next(r)
4602
4645
  });
4603
4646
  }
4604
4647
  }
4605
- class Xo {
4648
+ class Ko {
4606
4649
  constructor(e) {
4607
4650
  for (const n in e)
4608
4651
  e.hasOwnProperty(n) && e[n] && e[n] instanceof Array && e[n].forEach((r) => {
@@ -4615,50 +4658,50 @@ class Xo {
4615
4658
  * @param properties Properties of the new module
4616
4659
  */
4617
4660
  addModule(e, n) {
4618
- this[e] || (this[e] = []), this[e].push(new Go(this, n));
4661
+ this[e] || (this[e] = []), this[e].push(new Jo(this, n));
4619
4662
  }
4620
4663
  }
4621
4664
  const kt = {};
4622
- function $a(t, e) {
4623
- return kt[t] = new Xo(e), kt[t];
4665
+ function Sa(t, e) {
4666
+ return kt[t] = new Ko(e), kt[t];
4624
4667
  }
4625
- function es(t) {
4668
+ function Zo(t) {
4626
4669
  return kt[t];
4627
4670
  }
4628
- function Aa(t) {
4671
+ function ka(t) {
4629
4672
  delete kt[t];
4630
4673
  }
4631
- const Dr = 15;
4632
- let ot = 0, Q, qr = 0;
4633
- const L = {}, gn = {}, $e = {}, ts = {}, pe = new le(!1);
4634
- $e._place_os_status = pe.asObservable();
4635
- const Cr = new le([0, 0]);
4636
- $e._place_os_sync = Cr.asObservable();
4637
- let Nr = Date.now(), we, xt = 0, se = null, ht, bn = 0;
4638
- const st = 10 * 1e3, jr = new ae();
4639
- $e._place_os_debug_events = jr.asObservable();
4674
+ const Mr = 15;
4675
+ let ot = 0, Q, Rr = 0;
4676
+ const L = {}, gn = {}, $e = {}, Go = {}, de = new ae(!1);
4677
+ $e._place_os_status = de.asObservable();
4678
+ const Ur = new ae([0, 0]);
4679
+ $e._place_os_sync = Ur.asObservable();
4680
+ let Dr = Date.now(), we, xt = 0, se = null, ht, vn = 0;
4681
+ const st = 10 * 1e3, qr = new me();
4682
+ $e._place_os_debug_events = qr.asObservable();
4640
4683
  function Kt() {
4641
- return ve().indexOf("/control/") >= 0 ? "/control/websocket" : `${pr()}/systems/control`;
4684
+ return be().indexOf("/control/") >= 0 ? "/control/websocket" : `${fr()}/systems/control`;
4642
4685
  }
4643
- function Fr() {
4644
- return pe.getValue();
4686
+ function Nr() {
4687
+ return de.getValue();
4645
4688
  }
4646
- function ns() {
4689
+ function Xo() {
4647
4690
  return $e._place_os_status;
4648
4691
  }
4649
- function wa() {
4692
+ function xa() {
4650
4693
  return $e._place_os_status;
4651
4694
  }
4652
- function rs(t, e = gn, n = $e) {
4695
+ function es(t, e = gn, n = $e) {
4653
4696
  const r = `${t.sys}|${t.mod}_${t.index}|${t.name}`;
4654
- return e[r] || (e[r] = new le(void 0), n[r] = e[r].asObservable()), n[r];
4697
+ return e[r] || (e[r] = new ae(void 0), n[r] = e[r].asObservable()), n[r];
4655
4698
  }
4656
- function is(t, e = gn) {
4699
+ function ts(t, e = gn) {
4657
4700
  const n = `${t.sys}|${t.mod}_${t.index}|${t.name}`;
4658
4701
  if (e[n])
4659
4702
  return e[n].getValue();
4660
4703
  }
4661
- function Nn(t, e = 0, n = qe) {
4704
+ function qn(t, e = 0, n = qe) {
4662
4705
  const r = {
4663
4706
  id: ++ot,
4664
4707
  cmd: "bind",
@@ -4666,7 +4709,7 @@ function Nn(t, e = 0, n = qe) {
4666
4709
  };
4667
4710
  return n(r, e);
4668
4711
  }
4669
- function os(t, e = 0, n = qe) {
4712
+ function ns(t, e = 0, n = qe) {
4670
4713
  const r = {
4671
4714
  id: ++ot,
4672
4715
  cmd: "unbind",
@@ -4674,7 +4717,7 @@ function os(t, e = 0, n = qe) {
4674
4717
  };
4675
4718
  return n(r, e);
4676
4719
  }
4677
- function ss(t, e = st, n = qe) {
4720
+ function rs(t, e = st, n = qe) {
4678
4721
  const r = {
4679
4722
  id: ++ot,
4680
4723
  cmd: "exec",
@@ -4682,7 +4725,7 @@ function ss(t, e = st, n = qe) {
4682
4725
  };
4683
4726
  return n(r, e);
4684
4727
  }
4685
- function Oa(t, e = st, n = qe) {
4728
+ function $a(t, e = st, n = qe) {
4686
4729
  const r = {
4687
4730
  id: ++ot,
4688
4731
  cmd: "debug",
@@ -4690,7 +4733,7 @@ function Oa(t, e = st, n = qe) {
4690
4733
  };
4691
4734
  return n(r, e);
4692
4735
  }
4693
- function Ea(t, e = st, n = qe) {
4736
+ function Aa(t, e = st, n = qe) {
4694
4737
  const r = {
4695
4738
  id: ++ot,
4696
4739
  cmd: "ignore",
@@ -4699,7 +4742,7 @@ function Ea(t, e = st, n = qe) {
4699
4742
  return n(r, e);
4700
4743
  }
4701
4744
  function qe(t, e = st, n = 0) {
4702
- const r = `${t.cmd}|${t.sys}|${t.mod}${t.index}|${t.name}|${t.args}|${Ki()}`;
4745
+ const r = `${t.cmd}|${t.sys}|${t.mod}${t.index}|${t.name}|${t.args}|${Qi()}`;
4703
4746
  if (L[r])
4704
4747
  d("WS", "Request already in progress. Waiting...", t);
4705
4748
  else {
@@ -4711,8 +4754,8 @@ function qe(t, e = st, n = 0) {
4711
4754
  (c) => s(c)
4712
4755
  );
4713
4756
  };
4714
- if (Q && Fr()) {
4715
- ln() && ds(t, Q, ts), i.resolve = o, i.reject = s;
4757
+ if (Q && Nr()) {
4758
+ ln() && ls(t, Q, Go), i.resolve = o, i.reject = s;
4716
4759
  const c = `${t.sys}, ${t.mod}_${t.index}, ${t.name}`;
4717
4760
  d(
4718
4761
  "WS",
@@ -4725,17 +4768,17 @@ function qe(t, e = st, n = 0) {
4725
4768
  },
4726
4769
  e
4727
4770
  );
4728
- } else se ? setTimeout(() => u(), 1e3) : vn().then(() => u());
4771
+ } else se ? setTimeout(() => u(), 1e3) : bn().then(() => u());
4729
4772
  }), L[r] = i;
4730
4773
  }
4731
4774
  return L[r].promise;
4732
4775
  }
4733
- function zr(t) {
4776
+ function Cr(t) {
4734
4777
  if (t !== "pong" && t instanceof Object) {
4735
4778
  if (t.type === "notify" && t.meta)
4736
- as(t.meta, t.value);
4779
+ ss(t.meta, t.value);
4737
4780
  else if (t.type === "success")
4738
- us(t);
4781
+ is(t);
4739
4782
  else if (t.type === "debug") {
4740
4783
  d(
4741
4784
  "WS",
@@ -4743,23 +4786,23 @@ function zr(t) {
4743
4786
  t.msg
4744
4787
  );
4745
4788
  const e = t.meta || { mod: "", index: "" };
4746
- jr.next({
4789
+ qr.next({
4747
4790
  mod_id: t.mod || "<empty>",
4748
4791
  module: `${e.mod}_${e.index}`,
4749
4792
  class_name: t.klass || "<empty>",
4750
4793
  message: t.msg || "<empty>",
4751
- level: t.level || Ur.Debug,
4794
+ level: t.level || Tr.Debug,
4752
4795
  time: Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3)
4753
4796
  });
4754
- } else t.type === "error" ? cs(t) : t.cmd || d("WS", "Invalid websocket message", t, "error");
4755
- be(`${t.id}`);
4756
- } else t === "pong" && (bn = Date.now(), d("WS", "Pong!"));
4797
+ } else t.type === "error" ? os(t) : t.cmd || d("WS", "Invalid websocket message", t, "error");
4798
+ ve(`${t.id}`);
4799
+ } else t === "pong" && (vn = Date.now(), d("WS", "Pong!"));
4757
4800
  }
4758
- function us(t) {
4801
+ function is(t) {
4759
4802
  const e = Object.keys(L).map((n) => L[n]).find((n) => n?.id === t.id);
4760
4803
  d("WS", `[SUCCESS](${t.id})`), e && e.resolve && (e.resolve(t.value), delete L[e.key]);
4761
4804
  }
4762
- function cs(t) {
4805
+ function os(t) {
4763
4806
  let e = "UNEXPECTED FAILURE";
4764
4807
  switch (t.code) {
4765
4808
  case X.ACCESS_DENIED:
@@ -4791,11 +4834,11 @@ function cs(t) {
4791
4834
  "error"
4792
4835
  );
4793
4836
  const n = Object.keys(L).map((r) => L[r]).filter((r) => r).find((r) => r.id === t.id);
4794
- n && n.reject && (n.reject(t), be(`${n.key}`), delete L[n.key]);
4837
+ n && n.reject && (n.reject(t), ve(`${n.key}`), delete L[n.key]);
4795
4838
  }
4796
- function as(t, e, n = gn, r = $e) {
4839
+ function ss(t, e, n = gn, r = $e) {
4797
4840
  const i = `${t.sys}|${t.mod}_${t.index}|${t.name}`;
4798
- n[i] || (n[i] = new le(null), r[i] = n[i].asObservable());
4841
+ n[i] || (n[i] = new ae(null), r[i] = n[i].asObservable());
4799
4842
  const o = `${t.sys}, ${t.mod}_${t.index}, ${t.name}`;
4800
4843
  d("WS", `[NOTIFY] ${o} changed`, [
4801
4844
  n[i].getValue(),
@@ -4803,29 +4846,29 @@ function as(t, e, n = gn, r = $e) {
4803
4846
  e
4804
4847
  ]), n[i].next(e);
4805
4848
  }
4806
- function vn(t = 0) {
4849
+ function bn(t = 0) {
4807
4850
  return se == null && (se = new Promise((e) => {
4808
4851
  if (t > 40)
4809
4852
  return location.reload();
4810
- xt++, Nr = Date.now(), Q = ln() ? hs() : ls(), Q ? (d("WS(Debug)", "Authority:", [bt()]), d("WS", "Connecting to websocket..."), Q.subscribe(
4853
+ xt++, Dr = Date.now(), Q = ln() ? as() : us(), Q ? (d("WS(Debug)", "Authority:", [vt()]), d("WS", "Connecting to websocket..."), Q.subscribe(
4811
4854
  (n) => {
4812
- pe.getValue() || (d("WS", "Connection established."), e()), pe.next(!0), xt = 0, Zt(), zr(n);
4855
+ de.getValue() || (d("WS", "Connection established."), e()), de.next(!0), xt = 0, Zt(), Cr(n);
4813
4856
  },
4814
4857
  (n) => {
4815
- Q = void 0, se = null, Fn(), Zt(), fs(n);
4858
+ Q = void 0, se = null, Cn(), Zt(), cs(n);
4816
4859
  },
4817
4860
  () => {
4818
- Q = void 0, se = null, Fn(), d("WS", "Connection closed by browser."), pe.next(!1), $t();
4861
+ Q = void 0, se = null, Cn(), d("WS", "Connection closed by browser."), de.next(!1), $t();
4819
4862
  }
4820
- ), we && clearInterval(we), bn = Date.now(), jn(), we = setInterval(
4821
- () => jn(),
4822
- Dr * 1e3
4823
- ), Zt(), qr += 1, ht = setTimeout(() => {
4824
- d("WS", "Unhealthy connection. Reconnecting..."), pe.next(!1), se = null, $t();
4863
+ ), we && clearInterval(we), vn = Date.now(), Nn(), we = setInterval(
4864
+ () => Nn(),
4865
+ Mr * 1e3
4866
+ ), Zt(), Rr += 1, ht = setTimeout(() => {
4867
+ d("WS", "Unhealthy connection. Reconnecting..."), de.next(!1), se = null, $t();
4825
4868
  }, 30 * 1e3)) : (Q ? d(
4826
4869
  "WS",
4827
4870
  `Waiting on auth(${t}). Retrying in ${1e3 * Math.min(10, t + 1)}ms...`,
4828
- [!!Y(), !!bt()],
4871
+ [!!Y(), !!vt()],
4829
4872
  "info"
4830
4873
  ) : d(
4831
4874
  "WS",
@@ -4834,22 +4877,22 @@ function vn(t = 0) {
4834
4877
  "error"
4835
4878
  ), setTimeout(
4836
4879
  () => {
4837
- se = null, vn(t).then((n) => e(n));
4880
+ se = null, bn(t).then((n) => e(n));
4838
4881
  },
4839
4882
  1e3 * Math.min(10, ++t)
4840
4883
  ));
4841
4884
  })), se;
4842
4885
  }
4843
- function ls() {
4844
- if (!bt() || !Y()) return null;
4845
- const t = co() || location.protocol.indexOf("https") >= 0;
4846
- let e = `ws${t ? "s" : ""}://${rn()}${Kt()}${_r() ? "?fixed_device=true" : ""}`;
4886
+ function us() {
4887
+ if (!vt() || !Y()) return null;
4888
+ const t = oo() || location.protocol.indexOf("https") >= 0;
4889
+ let e = `ws${t ? "s" : ""}://${rn()}${Kt()}${hr() ? "?fixed_device=true" : ""}`;
4847
4890
  const n = Y();
4848
4891
  let r = n === "x-api-key" ? `api-key=${Ot()}` : `bearer_token=${n}`;
4849
- return !ro() && !Yi() ? (d("WS", "Authenticating through cookie..."), r += `;max-age=120;path=${Kt()};`, r += `${t ? "secure;" : ""}samesite=strict`, document.cookie = r, d("WS", "Cookies:", [document.cookie, r])) : (d("WS", "Authenticating through URL query parameter..."), e += `${e.indexOf("?") >= 0 ? "&" : "?"}${r}`), d(
4892
+ return !eo() && !Bi() ? (d("WS", "Authenticating through cookie..."), r += `;max-age=120;path=${Kt()};`, r += `${t ? "secure;" : ""}samesite=strict`, document.cookie = r, d("WS", "Cookies:", [document.cookie, r])) : (d("WS", "Authenticating through URL query parameter..."), e += `${e.indexOf("?") >= 0 ? "&" : "?"}${r}`), d(
4850
4893
  "WS",
4851
4894
  `Creating websocket connection to ws${t ? "s" : ""}://${rn()}${Kt()}`
4852
- ), Zo({
4895
+ ), Yo({
4853
4896
  url: e,
4854
4897
  serializer: (i) => typeof i == "object" ? JSON.stringify(i) : i,
4855
4898
  deserializer: (i) => {
@@ -4864,7 +4907,7 @@ function ls() {
4864
4907
  });
4865
4908
  }
4866
4909
  function $t() {
4867
- Cr.next([qr, Date.now() - Nr]), Q && Fr() && (Q.complete(), we && (clearInterval(we), we = void 0)), d(
4910
+ Ur.next([Rr, Date.now() - Dr]), Q && Nr() && (Q.complete(), we && (clearInterval(we), we = void 0)), d(
4868
4911
  "WS",
4869
4912
  `Reconnecting in ${Math.min(
4870
4913
  5e3,
@@ -4872,29 +4915,29 @@ function $t() {
4872
4915
  )}ms...`
4873
4916
  ), ne(
4874
4917
  "reconnect",
4875
- () => vn(),
4918
+ () => bn(),
4876
4919
  Math.min(5e3, (xt + 1) * 300 || 1e3)
4877
4920
  );
4878
4921
  }
4879
- function jn() {
4880
- if (Date.now() - bn > 4 * Dr * 1e3)
4922
+ function Nn() {
4923
+ if (Date.now() - vn > 4 * Mr * 1e3)
4881
4924
  return $t();
4882
4925
  Q?.next("ping");
4883
4926
  }
4884
- function fs(t) {
4885
- pe.next(!1), d("WS", "Websocket error:", t, void 0, "error"), t.status === 401 && hn(), mr(), $t();
4927
+ function cs(t) {
4928
+ de.next(!1), d("WS", "Websocket error:", t, void 0, "error"), t.status === 401 && hn(), dr(), $t();
4886
4929
  }
4887
4930
  function Zt() {
4888
4931
  ht && (clearTimeout(ht), ht = void 0);
4889
4932
  }
4890
- function hs() {
4891
- const t = new ae();
4933
+ function as() {
4934
+ const t = new me();
4892
4935
  return t.subscribe(
4893
- (e) => zr(e)
4936
+ (e) => Cr(e)
4894
4937
  ), t;
4895
4938
  }
4896
- function ds(t, e, n) {
4897
- const r = `${t.sys}|${t.mod}_${t.index}|${t.name}`, i = es(t.sys), o = i && i[t.mod] ? i[t.mod][t.index - 1 || 0] : null;
4939
+ function ls(t, e, n) {
4940
+ const r = `${t.sys}|${t.mod}_${t.index}|${t.name}`, i = Zo(t.sys), o = i && i[t.mod] ? i[t.mod][t.index - 1 || 0] : null;
4898
4941
  if (o) {
4899
4942
  switch (t.cmd) {
4900
4943
  case "bind":
@@ -4913,7 +4956,7 @@ function ds(t, e, n) {
4913
4956
  });
4914
4957
  break;
4915
4958
  case "unbind":
4916
- n[r] && (n[r].unsubscribe(), delete n[r], be(`${r}`));
4959
+ n[r] && (n[r].unsubscribe(), delete n[r], ve(`${r}`));
4917
4960
  break;
4918
4961
  }
4919
4962
  ne(
@@ -4939,14 +4982,14 @@ function ds(t, e, n) {
4939
4982
  10
4940
4983
  );
4941
4984
  }
4942
- function Fn() {
4985
+ function Cn() {
4943
4986
  for (const t in L)
4944
4987
  L[t] && delete L[t];
4945
4988
  }
4946
- class zn {
4989
+ class jn {
4947
4990
  constructor(e, n) {
4948
- this._module = e, this.name = n, ns().pipe(Pi()).subscribe((r) => {
4949
- r && (this._stale_bindings || this._pending === 1) ? (d("VAR", "Re-binding to status variable", this.binding()), this.rebind()) : r || (be(
4991
+ this._module = e, this.name = n, Xo().pipe(Oi()).subscribe((r) => {
4992
+ r && (this._stale_bindings || this._pending === 1) ? (d("VAR", "Re-binding to status variable", this.binding()), this.rebind()) : r || (ve(
4950
4993
  `rebind:${JSON.stringify(this.binding())}`
4951
4994
  ), d(
4952
4995
  "VAR",
@@ -4969,13 +5012,13 @@ class zn {
4969
5012
  }
4970
5013
  /** Current value of the binding */
4971
5014
  get value() {
4972
- return is(this.binding());
5015
+ return ts(this.binding());
4973
5016
  }
4974
5017
  /**
4975
5018
  * Get an observable that emits the current value of the binding
4976
5019
  */
4977
5020
  listen() {
4978
- return rs(this.binding());
5021
+ return es(this.binding());
4979
5022
  }
4980
5023
  /**
4981
5024
  * Subscribe to changes of the variable's binding value.
@@ -4997,7 +5040,7 @@ class zn {
4997
5040
  * Bind to the status variable's value
4998
5041
  */
4999
5042
  bind() {
5000
- return (this._binding_count <= 0 && this._stale_bindings <= 0 || this._pending === 2) && (this._pending = 1, Nn(this.binding()).then(() => {
5043
+ return (this._binding_count <= 0 && this._stale_bindings <= 0 || this._pending === 2) && (this._pending = 1, qn(this.binding()).then(() => {
5001
5044
  this._binding_count++, this._pending = 0;
5002
5045
  }).catch(() => null)), () => this.unbind();
5003
5046
  }
@@ -5005,7 +5048,7 @@ class zn {
5005
5048
  * Unbind from status variable
5006
5049
  */
5007
5050
  unbind() {
5008
- this._binding_count === 1 && this._pending === 0 ? (this._pending = 2, os(this.binding()).then(() => {
5051
+ this._binding_count === 1 && this._pending === 0 ? (this._pending = 2, ns(this.binding()).then(() => {
5009
5052
  this._pending === 2 && (this._pending = 0), this._binding_count--;
5010
5053
  })) : this._binding_count = Math.max(this._binding_count - 1, 0);
5011
5054
  }
@@ -5016,7 +5059,7 @@ class zn {
5016
5059
  !this._stale_bindings && this._pending !== 1 || ne(
5017
5060
  `rebind:${JSON.stringify(this.binding())}`,
5018
5061
  async () => {
5019
- await Nn(this.binding()), this._binding_count = this._stale_bindings || 1, this._stale_bindings = 0;
5062
+ await qn(this.binding()), this._binding_count = this._stale_bindings || 1, this._stale_bindings = 0;
5020
5063
  },
5021
5064
  100
5022
5065
  );
@@ -5033,7 +5076,7 @@ class zn {
5033
5076
  };
5034
5077
  }
5035
5078
  }
5036
- class ps {
5079
+ class fs {
5037
5080
  constructor(e, n) {
5038
5081
  this._system = e, this._id = n;
5039
5082
  }
@@ -5062,14 +5105,14 @@ class ps {
5062
5105
  * @deprecated Use `variable` instead
5063
5106
  */
5064
5107
  binding(e) {
5065
- return this._bindings[e] || (this._bindings[e] = new zn(this, e)), this._bindings[e];
5108
+ return this._bindings[e] || (this._bindings[e] = new jn(this, e)), this._bindings[e];
5066
5109
  }
5067
5110
  /**
5068
5111
  * Get binding with the given name
5069
5112
  * @param name Name of the binding
5070
5113
  */
5071
5114
  variable(e) {
5072
- return this._bindings[e] || (this._bindings[e] = new zn(this, e)), this._bindings[e];
5115
+ return this._bindings[e] || (this._bindings[e] = new jn(this, e)), this._bindings[e];
5073
5116
  }
5074
5117
  /**
5075
5118
  * Execute method on the engine module
@@ -5077,7 +5120,7 @@ class ps {
5077
5120
  * @param args Array of arguments to pass to the method
5078
5121
  */
5079
5122
  execute(e, n, r = st) {
5080
- return ss(
5123
+ return rs(
5081
5124
  {
5082
5125
  sys: this._system.id,
5083
5126
  mod: this.name,
@@ -5089,7 +5132,7 @@ class ps {
5089
5132
  );
5090
5133
  }
5091
5134
  }
5092
- class _s {
5135
+ class hs {
5093
5136
  /** Unique idetifier of the system */
5094
5137
  id;
5095
5138
  /** Mapping of engine modules within the system */
@@ -5110,7 +5153,7 @@ class _s {
5110
5153
  const i = r.join("_");
5111
5154
  for (this._module_list[i] || (this._module_list[i] = []); this._module_list[i].length < n; )
5112
5155
  this._module_list[i].push(
5113
- new ps(
5156
+ new fs(
5114
5157
  this,
5115
5158
  `${i}_${this._module_list[i].length + 1}`
5116
5159
  )
@@ -5119,282 +5162,282 @@ class _s {
5119
5162
  }
5120
5163
  }
5121
5164
  const Gt = {};
5122
- function ms(t) {
5123
- return Gt[t] || (Gt[t] = new _s(t)), Gt[t];
5165
+ function ds(t) {
5166
+ return Gt[t] || (Gt[t] = new hs(t)), Gt[t];
5124
5167
  }
5125
- function Ia(t, e, n = 1) {
5126
- return ms(t).module(e, n);
5168
+ function wa(t, e, n = 1) {
5169
+ return ds(t).module(e, n);
5127
5170
  }
5128
5171
  export {
5129
- Io as AuthType,
5172
+ wo as AuthType,
5130
5173
  Pe as EncryptionLevel,
5131
- Pr as MediaAnimation,
5132
- Go as MockPlaceWebsocketModule,
5133
- Xo as MockPlaceWebsocketSystem,
5134
- Oo as PlaceApplication,
5135
- To as PlaceCluster,
5136
- Uo as PlaceDomain,
5137
- Ar as PlaceDriver,
5174
+ Or as MediaAnimation,
5175
+ Jo as MockPlaceWebsocketModule,
5176
+ Ko as MockPlaceWebsocketSystem,
5177
+ $o as PlaceApplication,
5178
+ Eo as PlaceCluster,
5179
+ To as PlaceDomain,
5180
+ kr as PlaceDriver,
5138
5181
  St as PlaceDriverRole,
5139
- Do as PlaceEdge,
5182
+ Mo as PlaceEdge,
5140
5183
  X as PlaceErrorCodes,
5141
- qo as PlaceLDAPSource,
5142
- Ur as PlaceLogLevel,
5143
- Po as PlaceMQTTBroker,
5144
- wr as PlaceMetadata,
5145
- Er as PlaceModule,
5146
- ps as PlaceModuleBinding,
5147
- jo as PlaceOAuthSource,
5148
- Mo as PlaceProcess,
5149
- Fo as PlaceRepository,
5150
- Ir as PlaceRepositoryType,
5184
+ Ro as PlaceLDAPSource,
5185
+ Tr as PlaceLogLevel,
5186
+ Oo as PlaceMQTTBroker,
5187
+ xr as PlaceMetadata,
5188
+ Ar as PlaceModule,
5189
+ fs as PlaceModuleBinding,
5190
+ qo as PlaceOAuthSource,
5191
+ Io as PlaceProcess,
5192
+ No as PlaceRepository,
5193
+ wr as PlaceRepositoryType,
5151
5194
  B as PlaceResource,
5152
- zo as PlaceSAMLSource,
5195
+ Co as PlaceSAMLSource,
5153
5196
  Se as PlaceSettings,
5154
- Or as PlaceSystem,
5155
- _s as PlaceSystemBinding,
5197
+ $r as PlaceSystem,
5198
+ hs as PlaceSystemBinding,
5156
5199
  Me as PlaceTrigger,
5157
- Bo as PlaceUser,
5158
- zn as PlaceVariableBinding,
5200
+ Lo as PlaceUser,
5201
+ jn as PlaceVariableBinding,
5159
5202
  mn as PlaceZone,
5160
- Co as PlaceZoneMetadata,
5161
- Vo as SignageMedia,
5162
- Qo as SignagePlaylist,
5203
+ Uo as PlaceZoneMetadata,
5204
+ Ho as SignageMedia,
5205
+ Wo as SignagePlaylist,
5163
5206
  yn as SignagePlaylistMedia,
5164
5207
  Qt as Survey,
5165
- Mr as SurveyAnswer,
5208
+ Ir as SurveyAnswer,
5166
5209
  Bt as SurveyInvitation,
5167
5210
  Vt as SurveyQuestion,
5168
- Lo as TriggerConditionOperator,
5169
- Wo as TriggerTimeConditionType,
5170
- Ho as TriggerWebhookType,
5171
- ca as addAnswer,
5172
- Ps as addApplication,
5173
- Ds as addBroker,
5174
- Ws as addDomain,
5175
- Ys as addDriver,
5176
- nu as addEdge,
5177
- ha as addInvitation,
5178
- cu as addLDAPSource,
5179
- pu as addMetadata,
5180
- vu as addModule,
5181
- Mu as addOAuthSource,
5182
- ma as addQuestion,
5183
- Cu as addRepository,
5184
- Gu as addSAMLSource,
5185
- rc as addSettings,
5186
- Kc as addSignageMedia,
5187
- ta as addSignagePlaylist,
5188
- ka as addSurvey,
5189
- lc as addSystem,
5190
- hc as addSystemModule,
5191
- kc as addSystemTrigger,
5192
- Ec as addTrigger,
5193
- Dc as addUser,
5194
- zc as addZone,
5195
- ve as apiEndpoint,
5211
+ jo as TriggerConditionOperator,
5212
+ Fo as TriggerTimeConditionType,
5213
+ zo as TriggerWebhookType,
5214
+ oa as addAnswer,
5215
+ Os as addApplication,
5216
+ Ms as addBroker,
5217
+ Fs as addDomain,
5218
+ Bs as addDriver,
5219
+ Xs as addEdge,
5220
+ aa as addInvitation,
5221
+ ou as addLDAPSource,
5222
+ fu as addMetadata,
5223
+ yu as addModule,
5224
+ Iu as addOAuthSource,
5225
+ da as addQuestion,
5226
+ Uu as addRepository,
5227
+ Ju as addSAMLSource,
5228
+ ec as addSettings,
5229
+ Qc as addSignageMedia,
5230
+ Gc as addSignagePlaylist,
5231
+ va as addSurvey,
5232
+ uc as addSystem,
5233
+ ac as addSystemModule,
5234
+ vc as addSystemTrigger,
5235
+ Ac as addTrigger,
5236
+ Mc as addUser,
5237
+ Cc as addZone,
5238
+ be as apiEndpoint,
5196
5239
  Ot as apiKey,
5197
- oa as approveSignagePlaylist,
5198
- yr as authorise,
5199
- bt as authority,
5200
- Nn as bind,
5201
- Qi as cleanObject,
5202
- ks as cleanupAuth,
5203
- io as clientId,
5204
- wa as connectionState,
5205
- Rn as consoleHasColours,
5240
+ na as approveSignagePlaylist,
5241
+ pr as authorise,
5242
+ vt as authority,
5243
+ qn as bind,
5244
+ Wi as cleanObject,
5245
+ vs as cleanupAuth,
5246
+ to as clientId,
5247
+ xa as connectionState,
5248
+ Tn as consoleHasColours,
5206
5249
  je as convertPairStringToMap,
5207
- C as create,
5208
- Rc as currentUser,
5209
- Oa as debug,
5210
- jr as debug_events,
5211
- He as del,
5212
- vo as deregisterMockEndpoint,
5213
- Aa as deregisterSystem,
5214
- ss as execute,
5215
- mc as executeOnSystem,
5216
- Hc as executeOnZone,
5217
- bc as functionList,
5218
- Bi as generateNonce,
5250
+ N as create,
5251
+ Pc as currentUser,
5252
+ $a as debug,
5253
+ qr as debug_events,
5254
+ We as del,
5255
+ yo as deregisterMockEndpoint,
5256
+ ka as deregisterSystem,
5257
+ rs as execute,
5258
+ dc as executeOnSystem,
5259
+ zc as executeOnZone,
5260
+ mc as functionList,
5261
+ Li as generateNonce,
5219
5262
  ee as get,
5220
- dr as getFragments,
5221
- Ia as getModule,
5222
- ms as getSystem,
5223
- so as hasToken,
5263
+ lr as getFragments,
5264
+ wa as getModule,
5265
+ ds as getSystem,
5266
+ ro as hasToken,
5224
5267
  rn as host,
5225
- pr as httpRoute,
5268
+ fr as httpRoute,
5226
5269
  yt as humanReadableByteCount,
5227
- Ea as ignore,
5270
+ Aa as ignore,
5228
5271
  hn as invalidateToken,
5229
- Gs as isDriverCompiled,
5230
- _r as isFixedDevice,
5231
- Yi as isMobileSafari,
5272
+ Js as isDriverCompiled,
5273
+ hr as isFixedDevice,
5274
+ Bi as isMobileSafari,
5232
5275
  ln as isMock,
5233
- Ji as isNestedFrame,
5234
- bs as isOnline,
5235
- co as isSecure,
5276
+ Vi as isNestedFrame,
5277
+ ms as isOnline,
5278
+ oo as isSecure,
5236
5279
  fn as isTrusted,
5237
- Fr as is_connected,
5238
- ws as lastRequestTotal,
5239
- mu as listChildMetadata,
5240
- ju as listInterfaceRepositories,
5241
- lu as listMetadata,
5242
- fu as listMetadataHistory,
5243
- zu as listRemoteRepositoryBranches,
5244
- Lu as listRemoteRepositoryCommits,
5245
- Fu as listRemoteRepositoryDefaultBranch,
5246
- Bu as listRepositoryBranches,
5247
- Hu as listRepositoryCommits,
5248
- Vu as listRepositoryDefaultBranch,
5249
- Qu as listRepositoryDriverDetails,
5250
- Wu as listRepositoryDrivers,
5251
- ra as listSignagePlaylistMedia,
5252
- ia as listSignagePlaylistMediaRevisions,
5253
- Sc as listSystemTriggers,
5254
- vc as listSystemZones,
5255
- Pc as listTriggerInstances,
5256
- Nc as listZoneTags,
5257
- Wc as listZoneTriggers,
5258
- rs as listen,
5259
- uo as listenForToken,
5260
- wu as loadModule,
5280
+ Nr as is_connected,
5281
+ xs as lastRequestTotal,
5282
+ du as listChildMetadata,
5283
+ qu as listInterfaceRepositories,
5284
+ uu as listMetadata,
5285
+ cu as listMetadataHistory,
5286
+ Cu as listRemoteRepositoryBranches,
5287
+ ju as listRemoteRepositoryCommits,
5288
+ Nu as listRemoteRepositoryDefaultBranch,
5289
+ Lu as listRepositoryBranches,
5290
+ zu as listRepositoryCommits,
5291
+ Hu as listRepositoryDefaultBranch,
5292
+ Wu as listRepositoryDriverDetails,
5293
+ Fu as listRepositoryDrivers,
5294
+ ea as listSignagePlaylistMedia,
5295
+ ta as listSignagePlaylistMediaRevisions,
5296
+ gc as listSystemTriggers,
5297
+ yc as listSystemZones,
5298
+ Oc as listTriggerInstances,
5299
+ Dc as listZoneTags,
5300
+ Fc as listZoneTriggers,
5301
+ es as listen,
5302
+ io as listenForToken,
5303
+ xu as loadModule,
5261
5304
  d as log,
5262
- xs as logout,
5263
- Au as lookupModuleState,
5264
- gc as lookupSystemModuleState,
5265
- es as mockSystem,
5266
- Eu as moduleRuntimeError,
5267
- Ou as moduleSettings,
5268
- $u as moduleState,
5269
- vs as onlineState,
5270
- Vi as parseLinkHeader,
5305
+ bs as logout,
5306
+ ku as lookupModuleState,
5307
+ _c as lookupSystemModuleState,
5308
+ Zo as mockSystem,
5309
+ Au as moduleRuntimeError,
5310
+ $u as moduleSettings,
5311
+ Su as moduleState,
5312
+ ys as onlineState,
5313
+ Hi as parseLinkHeader,
5271
5314
  It as patch,
5272
5315
  Ie as post,
5273
- Yu as pullRepositoryChanges,
5274
- We as put,
5316
+ Bu as pullRepositoryChanges,
5317
+ He as put,
5275
5318
  E as query,
5276
- ua as queryAnswers,
5277
- Os as queryApplications,
5278
- Ms as queryBrokers,
5279
- Cs as queryClusters,
5280
- Fs as queryDomains,
5281
- Bs as queryDrivers,
5282
- Xs as queryEdges,
5283
- aa as queryInvitations,
5284
- ou as queryLDAPSources,
5285
- yu as queryModules,
5286
- Iu as queryOAuthSources,
5287
- Ns as queryProcesses,
5288
- pa as queryQuestions,
5289
- Uu as queryRepositories,
5290
- Ju as querySAMLSources,
5291
- ec as querySettings,
5292
- Qc as querySignageMedia,
5293
- Gc as querySignagePlaylists,
5294
- ba as querySurveys,
5295
- sc as querySystems,
5296
- uc as querySystemsWithEmails,
5297
- Ac as queryTriggers,
5298
- Tc as queryUsers,
5299
- Cc as queryZones,
5300
- Ks as recompileDriver,
5301
- ys as redirectUri,
5302
- mr as refreshAuthority,
5319
+ ia as queryAnswers,
5320
+ $s as queryApplications,
5321
+ Is as queryBrokers,
5322
+ Us as queryClusters,
5323
+ Ns as queryDomains,
5324
+ Ls as queryDrivers,
5325
+ Ks as queryEdges,
5326
+ sa as queryInvitations,
5327
+ nu as queryLDAPSources,
5328
+ pu as queryModules,
5329
+ wu as queryOAuthSources,
5330
+ Ds as queryProcesses,
5331
+ fa as queryQuestions,
5332
+ Tu as queryRepositories,
5333
+ Vu as querySAMLSources,
5334
+ Zu as querySettings,
5335
+ Wc as querySignageMedia,
5336
+ Jc as querySignagePlaylists,
5337
+ ma as querySurveys,
5338
+ rc as querySystems,
5339
+ ic as querySystemsWithEmails,
5340
+ kc as queryTriggers,
5341
+ Ec as queryUsers,
5342
+ Uc as queryZones,
5343
+ Qs as recompileDriver,
5344
+ ps as redirectUri,
5345
+ dr as refreshAuthority,
5303
5346
  nn as refreshToken,
5304
- $s as registerMockEndpoint,
5305
- $a as registerSystem,
5306
- Zs as reloadDriver,
5307
- T as remove,
5308
- Ts as removeApplication,
5309
- qs as removeBroker,
5310
- Hs as removeDomain,
5311
- Js as removeDriver,
5312
- ru as removeEdge,
5313
- de as removeFragment,
5314
- da as removeInvitation,
5315
- au as removeLDAPSource,
5316
- _u as removeMetadata,
5317
- Su as removeModule,
5318
- Ru as removeOAuthSource,
5319
- ga as removeQuestion,
5320
- Nu as removeRepository,
5321
- Xu as removeSAMLSource,
5322
- ic as removeSettings,
5323
- Zc as removeSignageMedia,
5324
- na as removeSignagePlaylist,
5325
- xa as removeSurvey,
5326
- fc as removeSystem,
5327
- dc as removeSystemModule,
5328
- xc as removeSystemTrigger,
5329
- Ic as removeTrigger,
5330
- qc as removeUser,
5331
- Lc as removeZone,
5332
- As as requestTotal,
5333
- Ao as responseHeaders,
5334
- iu as retrieveEdgeToken,
5335
- gs as setAPI_Key,
5336
- oo as setToken,
5337
- oc as settingsHistory,
5338
- Ss as setup,
5347
+ Ss as registerMockEndpoint,
5348
+ Sa as registerSystem,
5349
+ Ys as reloadDriver,
5350
+ M as remove,
5351
+ Es as removeApplication,
5352
+ Rs as removeBroker,
5353
+ zs as removeDomain,
5354
+ Vs as removeDriver,
5355
+ eu as removeEdge,
5356
+ he as removeFragment,
5357
+ la as removeInvitation,
5358
+ su as removeLDAPSource,
5359
+ hu as removeMetadata,
5360
+ gu as removeModule,
5361
+ Pu as removeOAuthSource,
5362
+ _a as removeQuestion,
5363
+ Du as removeRepository,
5364
+ Ku as removeSAMLSource,
5365
+ tc as removeSettings,
5366
+ Yc as removeSignageMedia,
5367
+ Xc as removeSignagePlaylist,
5368
+ ba as removeSurvey,
5369
+ cc as removeSystem,
5370
+ lc as removeSystemModule,
5371
+ bc as removeSystemTrigger,
5372
+ wc as removeTrigger,
5373
+ Rc as removeUser,
5374
+ jc as removeZone,
5375
+ ks as requestTotal,
5376
+ ko as responseHeaders,
5377
+ tu as retrieveEdgeToken,
5378
+ _s as setAPI_Key,
5379
+ no as setToken,
5380
+ nc as settingsHistory,
5381
+ gs as setup,
5339
5382
  $ as show,
5340
- Es as showApplication,
5341
- Rs as showBroker,
5342
- zs as showDomain,
5343
- Vs as showDriver,
5344
- eu as showEdge,
5345
- la as showInvitation,
5346
- su as showLDAPSource,
5347
- hu as showMetadata,
5348
- gu as showModule,
5349
- Pu as showOAuthSource,
5350
- _a as showQuestion,
5351
- Du as showRepository,
5352
- Ku as showSAMLSource,
5353
- tc as showSettings,
5354
- Bc as showSignage,
5355
- Yc as showSignageMedia,
5356
- Vc as showSignageMetrics,
5357
- Xc as showSignagePlaylist,
5358
- va as showSurvey,
5359
- cc as showSystem,
5360
- wc as showTrigger,
5361
- Mc as showUser,
5362
- jc as showZone,
5363
- Ki as simplifiedTime,
5364
- ku as startModule,
5365
- pc as startSystem,
5366
- ns as status,
5367
- xu as stopModule,
5368
- _c as stopSystem,
5369
- yc as systemModuleState,
5370
- $c as systemSettings,
5371
- js as terminateProcess,
5383
+ As as showApplication,
5384
+ Ps as showBroker,
5385
+ Cs as showDomain,
5386
+ Hs as showDriver,
5387
+ Zs as showEdge,
5388
+ ua as showInvitation,
5389
+ ru as showLDAPSource,
5390
+ au as showMetadata,
5391
+ _u as showModule,
5392
+ Ou as showOAuthSource,
5393
+ ha as showQuestion,
5394
+ Mu as showRepository,
5395
+ Qu as showSAMLSource,
5396
+ Gu as showSettings,
5397
+ Lc as showSignage,
5398
+ Bc as showSignageMedia,
5399
+ Hc as showSignageMetrics,
5400
+ Kc as showSignagePlaylist,
5401
+ ya as showSurvey,
5402
+ oc as showSystem,
5403
+ xc as showTrigger,
5404
+ Ic as showUser,
5405
+ qc as showZone,
5406
+ Qi as simplifiedTime,
5407
+ vu as startModule,
5408
+ fc as startSystem,
5409
+ Xo as status,
5410
+ bu as stopModule,
5411
+ hc as stopSystem,
5412
+ pc as systemModuleState,
5413
+ Sc as systemSettings,
5414
+ qs as terminateProcess,
5372
5415
  Y as token,
5373
- os as unbind,
5374
- N as update,
5375
- Is as updateApplication,
5376
- Us as updateBroker,
5377
- Ls as updateDomain,
5378
- Qs as updateDriver,
5379
- tu as updateEdge,
5380
- fa as updateInvitation,
5381
- uu as updateLDAPSource,
5382
- du as updateMetadata,
5383
- bu as updateModule,
5384
- Tu as updateOAuthSource,
5385
- ya as updateQuestion,
5386
- qu as updateRepository,
5387
- Zu as updateSAMLSource,
5388
- nc as updateSettings,
5389
- Jc as updateSignageMedia,
5390
- ea as updateSignagePlaylist,
5391
- sa as updateSignagePlaylistMedia,
5392
- Sa as updateSurvey,
5393
- ac as updateSystem,
5394
- Oc as updateTrigger,
5395
- Uc as updateUser,
5396
- Fc as updateZone,
5397
- is as value,
5416
+ ns as unbind,
5417
+ C as update,
5418
+ ws as updateApplication,
5419
+ Ts as updateBroker,
5420
+ js as updateDomain,
5421
+ Ws as updateDriver,
5422
+ Gs as updateEdge,
5423
+ ca as updateInvitation,
5424
+ iu as updateLDAPSource,
5425
+ lu as updateMetadata,
5426
+ mu as updateModule,
5427
+ Eu as updateOAuthSource,
5428
+ pa as updateQuestion,
5429
+ Ru as updateRepository,
5430
+ Yu as updateSAMLSource,
5431
+ Xu as updateSettings,
5432
+ Vc as updateSignageMedia,
5433
+ Zc as updateSignagePlaylist,
5434
+ ra as updateSignagePlaylistMedia,
5435
+ ga as updateSurvey,
5436
+ sc as updateSystem,
5437
+ $c as updateTrigger,
5438
+ Tc as updateUser,
5439
+ Nc as updateZone,
5440
+ ts as value,
5398
5441
  Kt as websocketRoute
5399
5442
  };
5400
5443
  //# sourceMappingURL=index.es.js.map