@viamrobotics/sdk 0.1.0 → 0.2.0-pre.1
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/extra/stream/client.d.ts +1 -0
- package/dist/gen/component/camera/v1/camera_pb.d.ts +4 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +676 -173
- package/dist/main.umd.js +6 -6
- package/dist/responses.d.ts +8 -0
- package/dist/robot/client.d.ts +4 -2
- package/dist/robot/dial.d.ts +3 -0
- package/dist/robot/robot.d.ts +3 -1
- package/dist/robot.d.ts +1 -1
- package/package.json +3 -2
package/dist/main.es.js
CHANGED
|
@@ -12501,7 +12501,436 @@ var timestamp_pb = {};
|
|
|
12501
12501
|
PEER_CONNECTION_TYPE_WEBRTC: 2
|
|
12502
12502
|
}, s.object.extend(t, proto.viam.robot.v1);
|
|
12503
12503
|
})(robot_pb);
|
|
12504
|
-
var
|
|
12504
|
+
var backoff = {}, options = {}, __assign = commonjsGlobal && commonjsGlobal.__assign || function() {
|
|
12505
|
+
return __assign = Object.assign || function(t) {
|
|
12506
|
+
for (var e, s = 1, i = arguments.length; s < i; s++) {
|
|
12507
|
+
e = arguments[s];
|
|
12508
|
+
for (var u in e)
|
|
12509
|
+
Object.prototype.hasOwnProperty.call(e, u) && (t[u] = e[u]);
|
|
12510
|
+
}
|
|
12511
|
+
return t;
|
|
12512
|
+
}, __assign.apply(this, arguments);
|
|
12513
|
+
};
|
|
12514
|
+
Object.defineProperty(options, "__esModule", { value: !0 });
|
|
12515
|
+
var defaultOptions = {
|
|
12516
|
+
delayFirstAttempt: !1,
|
|
12517
|
+
jitter: "none",
|
|
12518
|
+
maxDelay: 1 / 0,
|
|
12519
|
+
numOfAttempts: 10,
|
|
12520
|
+
retry: function() {
|
|
12521
|
+
return !0;
|
|
12522
|
+
},
|
|
12523
|
+
startingDelay: 100,
|
|
12524
|
+
timeMultiple: 2
|
|
12525
|
+
};
|
|
12526
|
+
function getSanitizedOptions(t) {
|
|
12527
|
+
var e = __assign(__assign({}, defaultOptions), t);
|
|
12528
|
+
return e.numOfAttempts < 1 && (e.numOfAttempts = 1), e;
|
|
12529
|
+
}
|
|
12530
|
+
options.getSanitizedOptions = getSanitizedOptions;
|
|
12531
|
+
var delay_factory = {}, skipFirst_delay = {}, delay_base = {}, jitter_factory = {}, full_jitter = {};
|
|
12532
|
+
Object.defineProperty(full_jitter, "__esModule", { value: !0 });
|
|
12533
|
+
function fullJitter(t) {
|
|
12534
|
+
var e = Math.random() * t;
|
|
12535
|
+
return Math.round(e);
|
|
12536
|
+
}
|
|
12537
|
+
full_jitter.fullJitter = fullJitter;
|
|
12538
|
+
var no_jitter = {};
|
|
12539
|
+
Object.defineProperty(no_jitter, "__esModule", { value: !0 });
|
|
12540
|
+
function noJitter(t) {
|
|
12541
|
+
return t;
|
|
12542
|
+
}
|
|
12543
|
+
no_jitter.noJitter = noJitter;
|
|
12544
|
+
Object.defineProperty(jitter_factory, "__esModule", { value: !0 });
|
|
12545
|
+
var full_jitter_1 = full_jitter, no_jitter_1 = no_jitter;
|
|
12546
|
+
function JitterFactory(t) {
|
|
12547
|
+
switch (t.jitter) {
|
|
12548
|
+
case "full":
|
|
12549
|
+
return full_jitter_1.fullJitter;
|
|
12550
|
+
case "none":
|
|
12551
|
+
default:
|
|
12552
|
+
return no_jitter_1.noJitter;
|
|
12553
|
+
}
|
|
12554
|
+
}
|
|
12555
|
+
jitter_factory.JitterFactory = JitterFactory;
|
|
12556
|
+
Object.defineProperty(delay_base, "__esModule", { value: !0 });
|
|
12557
|
+
var jitter_factory_1 = jitter_factory, Delay = (
|
|
12558
|
+
/** @class */
|
|
12559
|
+
function() {
|
|
12560
|
+
function t(e) {
|
|
12561
|
+
this.options = e, this.attempt = 0;
|
|
12562
|
+
}
|
|
12563
|
+
return t.prototype.apply = function() {
|
|
12564
|
+
var e = this;
|
|
12565
|
+
return new Promise(function(s) {
|
|
12566
|
+
return setTimeout(s, e.jitteredDelay);
|
|
12567
|
+
});
|
|
12568
|
+
}, t.prototype.setAttemptNumber = function(e) {
|
|
12569
|
+
this.attempt = e;
|
|
12570
|
+
}, Object.defineProperty(t.prototype, "jitteredDelay", {
|
|
12571
|
+
get: function() {
|
|
12572
|
+
var e = jitter_factory_1.JitterFactory(this.options);
|
|
12573
|
+
return e(this.delay);
|
|
12574
|
+
},
|
|
12575
|
+
enumerable: !0,
|
|
12576
|
+
configurable: !0
|
|
12577
|
+
}), Object.defineProperty(t.prototype, "delay", {
|
|
12578
|
+
get: function() {
|
|
12579
|
+
var e = this.options.startingDelay, s = this.options.timeMultiple, i = this.numOfDelayedAttempts, u = e * Math.pow(s, i);
|
|
12580
|
+
return Math.min(u, this.options.maxDelay);
|
|
12581
|
+
},
|
|
12582
|
+
enumerable: !0,
|
|
12583
|
+
configurable: !0
|
|
12584
|
+
}), Object.defineProperty(t.prototype, "numOfDelayedAttempts", {
|
|
12585
|
+
get: function() {
|
|
12586
|
+
return this.attempt;
|
|
12587
|
+
},
|
|
12588
|
+
enumerable: !0,
|
|
12589
|
+
configurable: !0
|
|
12590
|
+
}), t;
|
|
12591
|
+
}()
|
|
12592
|
+
);
|
|
12593
|
+
delay_base.Delay = Delay;
|
|
12594
|
+
var __extends$1 = commonjsGlobal && commonjsGlobal.__extends || function() {
|
|
12595
|
+
var t = function(e, s) {
|
|
12596
|
+
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, u) {
|
|
12597
|
+
i.__proto__ = u;
|
|
12598
|
+
} || function(i, u) {
|
|
12599
|
+
for (var g in u)
|
|
12600
|
+
u.hasOwnProperty(g) && (i[g] = u[g]);
|
|
12601
|
+
}, t(e, s);
|
|
12602
|
+
};
|
|
12603
|
+
return function(e, s) {
|
|
12604
|
+
t(e, s);
|
|
12605
|
+
function i() {
|
|
12606
|
+
this.constructor = e;
|
|
12607
|
+
}
|
|
12608
|
+
e.prototype = s === null ? Object.create(s) : (i.prototype = s.prototype, new i());
|
|
12609
|
+
};
|
|
12610
|
+
}(), __awaiter$1 = commonjsGlobal && commonjsGlobal.__awaiter || function(t, e, s, i) {
|
|
12611
|
+
function u(g) {
|
|
12612
|
+
return g instanceof s ? g : new s(function(p) {
|
|
12613
|
+
p(g);
|
|
12614
|
+
});
|
|
12615
|
+
}
|
|
12616
|
+
return new (s || (s = Promise))(function(g, p) {
|
|
12617
|
+
function o(l) {
|
|
12618
|
+
try {
|
|
12619
|
+
n(i.next(l));
|
|
12620
|
+
} catch (c) {
|
|
12621
|
+
p(c);
|
|
12622
|
+
}
|
|
12623
|
+
}
|
|
12624
|
+
function r(l) {
|
|
12625
|
+
try {
|
|
12626
|
+
n(i.throw(l));
|
|
12627
|
+
} catch (c) {
|
|
12628
|
+
p(c);
|
|
12629
|
+
}
|
|
12630
|
+
}
|
|
12631
|
+
function n(l) {
|
|
12632
|
+
l.done ? g(l.value) : u(l.value).then(o, r);
|
|
12633
|
+
}
|
|
12634
|
+
n((i = i.apply(t, e || [])).next());
|
|
12635
|
+
});
|
|
12636
|
+
}, __generator$1 = commonjsGlobal && commonjsGlobal.__generator || function(t, e) {
|
|
12637
|
+
var s = { label: 0, sent: function() {
|
|
12638
|
+
if (g[0] & 1)
|
|
12639
|
+
throw g[1];
|
|
12640
|
+
return g[1];
|
|
12641
|
+
}, trys: [], ops: [] }, i, u, g, p;
|
|
12642
|
+
return p = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (p[Symbol.iterator] = function() {
|
|
12643
|
+
return this;
|
|
12644
|
+
}), p;
|
|
12645
|
+
function o(n) {
|
|
12646
|
+
return function(l) {
|
|
12647
|
+
return r([n, l]);
|
|
12648
|
+
};
|
|
12649
|
+
}
|
|
12650
|
+
function r(n) {
|
|
12651
|
+
if (i)
|
|
12652
|
+
throw new TypeError("Generator is already executing.");
|
|
12653
|
+
for (; s; )
|
|
12654
|
+
try {
|
|
12655
|
+
if (i = 1, u && (g = n[0] & 2 ? u.return : n[0] ? u.throw || ((g = u.return) && g.call(u), 0) : u.next) && !(g = g.call(u, n[1])).done)
|
|
12656
|
+
return g;
|
|
12657
|
+
switch (u = 0, g && (n = [n[0] & 2, g.value]), n[0]) {
|
|
12658
|
+
case 0:
|
|
12659
|
+
case 1:
|
|
12660
|
+
g = n;
|
|
12661
|
+
break;
|
|
12662
|
+
case 4:
|
|
12663
|
+
return s.label++, { value: n[1], done: !1 };
|
|
12664
|
+
case 5:
|
|
12665
|
+
s.label++, u = n[1], n = [0];
|
|
12666
|
+
continue;
|
|
12667
|
+
case 7:
|
|
12668
|
+
n = s.ops.pop(), s.trys.pop();
|
|
12669
|
+
continue;
|
|
12670
|
+
default:
|
|
12671
|
+
if (g = s.trys, !(g = g.length > 0 && g[g.length - 1]) && (n[0] === 6 || n[0] === 2)) {
|
|
12672
|
+
s = 0;
|
|
12673
|
+
continue;
|
|
12674
|
+
}
|
|
12675
|
+
if (n[0] === 3 && (!g || n[1] > g[0] && n[1] < g[3])) {
|
|
12676
|
+
s.label = n[1];
|
|
12677
|
+
break;
|
|
12678
|
+
}
|
|
12679
|
+
if (n[0] === 6 && s.label < g[1]) {
|
|
12680
|
+
s.label = g[1], g = n;
|
|
12681
|
+
break;
|
|
12682
|
+
}
|
|
12683
|
+
if (g && s.label < g[2]) {
|
|
12684
|
+
s.label = g[2], s.ops.push(n);
|
|
12685
|
+
break;
|
|
12686
|
+
}
|
|
12687
|
+
g[2] && s.ops.pop(), s.trys.pop();
|
|
12688
|
+
continue;
|
|
12689
|
+
}
|
|
12690
|
+
n = e.call(t, s);
|
|
12691
|
+
} catch (l) {
|
|
12692
|
+
n = [6, l], u = 0;
|
|
12693
|
+
} finally {
|
|
12694
|
+
i = g = 0;
|
|
12695
|
+
}
|
|
12696
|
+
if (n[0] & 5)
|
|
12697
|
+
throw n[1];
|
|
12698
|
+
return { value: n[0] ? n[1] : void 0, done: !0 };
|
|
12699
|
+
}
|
|
12700
|
+
};
|
|
12701
|
+
Object.defineProperty(skipFirst_delay, "__esModule", { value: !0 });
|
|
12702
|
+
var delay_base_1$1 = delay_base, SkipFirstDelay = (
|
|
12703
|
+
/** @class */
|
|
12704
|
+
function(t) {
|
|
12705
|
+
__extends$1(e, t);
|
|
12706
|
+
function e() {
|
|
12707
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
12708
|
+
}
|
|
12709
|
+
return e.prototype.apply = function() {
|
|
12710
|
+
return __awaiter$1(this, void 0, void 0, function() {
|
|
12711
|
+
return __generator$1(this, function(s) {
|
|
12712
|
+
return [2, this.isFirstAttempt ? !0 : t.prototype.apply.call(this)];
|
|
12713
|
+
});
|
|
12714
|
+
});
|
|
12715
|
+
}, Object.defineProperty(e.prototype, "isFirstAttempt", {
|
|
12716
|
+
get: function() {
|
|
12717
|
+
return this.attempt === 0;
|
|
12718
|
+
},
|
|
12719
|
+
enumerable: !0,
|
|
12720
|
+
configurable: !0
|
|
12721
|
+
}), Object.defineProperty(e.prototype, "numOfDelayedAttempts", {
|
|
12722
|
+
get: function() {
|
|
12723
|
+
return this.attempt - 1;
|
|
12724
|
+
},
|
|
12725
|
+
enumerable: !0,
|
|
12726
|
+
configurable: !0
|
|
12727
|
+
}), e;
|
|
12728
|
+
}(delay_base_1$1.Delay)
|
|
12729
|
+
);
|
|
12730
|
+
skipFirst_delay.SkipFirstDelay = SkipFirstDelay;
|
|
12731
|
+
var always_delay = {}, __extends = commonjsGlobal && commonjsGlobal.__extends || function() {
|
|
12732
|
+
var t = function(e, s) {
|
|
12733
|
+
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, u) {
|
|
12734
|
+
i.__proto__ = u;
|
|
12735
|
+
} || function(i, u) {
|
|
12736
|
+
for (var g in u)
|
|
12737
|
+
u.hasOwnProperty(g) && (i[g] = u[g]);
|
|
12738
|
+
}, t(e, s);
|
|
12739
|
+
};
|
|
12740
|
+
return function(e, s) {
|
|
12741
|
+
t(e, s);
|
|
12742
|
+
function i() {
|
|
12743
|
+
this.constructor = e;
|
|
12744
|
+
}
|
|
12745
|
+
e.prototype = s === null ? Object.create(s) : (i.prototype = s.prototype, new i());
|
|
12746
|
+
};
|
|
12747
|
+
}();
|
|
12748
|
+
Object.defineProperty(always_delay, "__esModule", { value: !0 });
|
|
12749
|
+
var delay_base_1 = delay_base, AlwaysDelay = (
|
|
12750
|
+
/** @class */
|
|
12751
|
+
function(t) {
|
|
12752
|
+
__extends(e, t);
|
|
12753
|
+
function e() {
|
|
12754
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
12755
|
+
}
|
|
12756
|
+
return e;
|
|
12757
|
+
}(delay_base_1.Delay)
|
|
12758
|
+
);
|
|
12759
|
+
always_delay.AlwaysDelay = AlwaysDelay;
|
|
12760
|
+
Object.defineProperty(delay_factory, "__esModule", { value: !0 });
|
|
12761
|
+
var skip_first_delay_1 = skipFirst_delay, always_delay_1 = always_delay;
|
|
12762
|
+
function DelayFactory(t, e) {
|
|
12763
|
+
var s = initDelayClass(t);
|
|
12764
|
+
return s.setAttemptNumber(e), s;
|
|
12765
|
+
}
|
|
12766
|
+
delay_factory.DelayFactory = DelayFactory;
|
|
12767
|
+
function initDelayClass(t) {
|
|
12768
|
+
return t.delayFirstAttempt ? new always_delay_1.AlwaysDelay(t) : new skip_first_delay_1.SkipFirstDelay(t);
|
|
12769
|
+
}
|
|
12770
|
+
var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function(t, e, s, i) {
|
|
12771
|
+
function u(g) {
|
|
12772
|
+
return g instanceof s ? g : new s(function(p) {
|
|
12773
|
+
p(g);
|
|
12774
|
+
});
|
|
12775
|
+
}
|
|
12776
|
+
return new (s || (s = Promise))(function(g, p) {
|
|
12777
|
+
function o(l) {
|
|
12778
|
+
try {
|
|
12779
|
+
n(i.next(l));
|
|
12780
|
+
} catch (c) {
|
|
12781
|
+
p(c);
|
|
12782
|
+
}
|
|
12783
|
+
}
|
|
12784
|
+
function r(l) {
|
|
12785
|
+
try {
|
|
12786
|
+
n(i.throw(l));
|
|
12787
|
+
} catch (c) {
|
|
12788
|
+
p(c);
|
|
12789
|
+
}
|
|
12790
|
+
}
|
|
12791
|
+
function n(l) {
|
|
12792
|
+
l.done ? g(l.value) : u(l.value).then(o, r);
|
|
12793
|
+
}
|
|
12794
|
+
n((i = i.apply(t, e || [])).next());
|
|
12795
|
+
});
|
|
12796
|
+
}, __generator = commonjsGlobal && commonjsGlobal.__generator || function(t, e) {
|
|
12797
|
+
var s = { label: 0, sent: function() {
|
|
12798
|
+
if (g[0] & 1)
|
|
12799
|
+
throw g[1];
|
|
12800
|
+
return g[1];
|
|
12801
|
+
}, trys: [], ops: [] }, i, u, g, p;
|
|
12802
|
+
return p = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (p[Symbol.iterator] = function() {
|
|
12803
|
+
return this;
|
|
12804
|
+
}), p;
|
|
12805
|
+
function o(n) {
|
|
12806
|
+
return function(l) {
|
|
12807
|
+
return r([n, l]);
|
|
12808
|
+
};
|
|
12809
|
+
}
|
|
12810
|
+
function r(n) {
|
|
12811
|
+
if (i)
|
|
12812
|
+
throw new TypeError("Generator is already executing.");
|
|
12813
|
+
for (; s; )
|
|
12814
|
+
try {
|
|
12815
|
+
if (i = 1, u && (g = n[0] & 2 ? u.return : n[0] ? u.throw || ((g = u.return) && g.call(u), 0) : u.next) && !(g = g.call(u, n[1])).done)
|
|
12816
|
+
return g;
|
|
12817
|
+
switch (u = 0, g && (n = [n[0] & 2, g.value]), n[0]) {
|
|
12818
|
+
case 0:
|
|
12819
|
+
case 1:
|
|
12820
|
+
g = n;
|
|
12821
|
+
break;
|
|
12822
|
+
case 4:
|
|
12823
|
+
return s.label++, { value: n[1], done: !1 };
|
|
12824
|
+
case 5:
|
|
12825
|
+
s.label++, u = n[1], n = [0];
|
|
12826
|
+
continue;
|
|
12827
|
+
case 7:
|
|
12828
|
+
n = s.ops.pop(), s.trys.pop();
|
|
12829
|
+
continue;
|
|
12830
|
+
default:
|
|
12831
|
+
if (g = s.trys, !(g = g.length > 0 && g[g.length - 1]) && (n[0] === 6 || n[0] === 2)) {
|
|
12832
|
+
s = 0;
|
|
12833
|
+
continue;
|
|
12834
|
+
}
|
|
12835
|
+
if (n[0] === 3 && (!g || n[1] > g[0] && n[1] < g[3])) {
|
|
12836
|
+
s.label = n[1];
|
|
12837
|
+
break;
|
|
12838
|
+
}
|
|
12839
|
+
if (n[0] === 6 && s.label < g[1]) {
|
|
12840
|
+
s.label = g[1], g = n;
|
|
12841
|
+
break;
|
|
12842
|
+
}
|
|
12843
|
+
if (g && s.label < g[2]) {
|
|
12844
|
+
s.label = g[2], s.ops.push(n);
|
|
12845
|
+
break;
|
|
12846
|
+
}
|
|
12847
|
+
g[2] && s.ops.pop(), s.trys.pop();
|
|
12848
|
+
continue;
|
|
12849
|
+
}
|
|
12850
|
+
n = e.call(t, s);
|
|
12851
|
+
} catch (l) {
|
|
12852
|
+
n = [6, l], u = 0;
|
|
12853
|
+
} finally {
|
|
12854
|
+
i = g = 0;
|
|
12855
|
+
}
|
|
12856
|
+
if (n[0] & 5)
|
|
12857
|
+
throw n[1];
|
|
12858
|
+
return { value: n[0] ? n[1] : void 0, done: !0 };
|
|
12859
|
+
}
|
|
12860
|
+
};
|
|
12861
|
+
Object.defineProperty(backoff, "__esModule", { value: !0 });
|
|
12862
|
+
var options_1 = options, delay_factory_1 = delay_factory;
|
|
12863
|
+
function backOff(t, e) {
|
|
12864
|
+
return e === void 0 && (e = {}), __awaiter(this, void 0, void 0, function() {
|
|
12865
|
+
var s, i;
|
|
12866
|
+
return __generator(this, function(u) {
|
|
12867
|
+
switch (u.label) {
|
|
12868
|
+
case 0:
|
|
12869
|
+
return s = options_1.getSanitizedOptions(e), i = new BackOff(t, s), [4, i.execute()];
|
|
12870
|
+
case 1:
|
|
12871
|
+
return [2, u.sent()];
|
|
12872
|
+
}
|
|
12873
|
+
});
|
|
12874
|
+
});
|
|
12875
|
+
}
|
|
12876
|
+
var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
12877
|
+
/** @class */
|
|
12878
|
+
function() {
|
|
12879
|
+
function t(e, s) {
|
|
12880
|
+
this.request = e, this.options = s, this.attemptNumber = 0;
|
|
12881
|
+
}
|
|
12882
|
+
return t.prototype.execute = function() {
|
|
12883
|
+
return __awaiter(this, void 0, void 0, function() {
|
|
12884
|
+
var e, s;
|
|
12885
|
+
return __generator(this, function(i) {
|
|
12886
|
+
switch (i.label) {
|
|
12887
|
+
case 0:
|
|
12888
|
+
if (this.attemptLimitReached)
|
|
12889
|
+
return [3, 7];
|
|
12890
|
+
i.label = 1;
|
|
12891
|
+
case 1:
|
|
12892
|
+
return i.trys.push([1, 4, , 6]), [4, this.applyDelay()];
|
|
12893
|
+
case 2:
|
|
12894
|
+
return i.sent(), [4, this.request()];
|
|
12895
|
+
case 3:
|
|
12896
|
+
return [2, i.sent()];
|
|
12897
|
+
case 4:
|
|
12898
|
+
return e = i.sent(), this.attemptNumber++, [4, this.options.retry(e, this.attemptNumber)];
|
|
12899
|
+
case 5:
|
|
12900
|
+
if (s = i.sent(), !s || this.attemptLimitReached)
|
|
12901
|
+
throw e;
|
|
12902
|
+
return [3, 6];
|
|
12903
|
+
case 6:
|
|
12904
|
+
return [3, 0];
|
|
12905
|
+
case 7:
|
|
12906
|
+
throw new Error("Something went wrong.");
|
|
12907
|
+
}
|
|
12908
|
+
});
|
|
12909
|
+
});
|
|
12910
|
+
}, Object.defineProperty(t.prototype, "attemptLimitReached", {
|
|
12911
|
+
get: function() {
|
|
12912
|
+
return this.attemptNumber >= this.options.numOfAttempts;
|
|
12913
|
+
},
|
|
12914
|
+
enumerable: !0,
|
|
12915
|
+
configurable: !0
|
|
12916
|
+
}), t.prototype.applyDelay = function() {
|
|
12917
|
+
return __awaiter(this, void 0, void 0, function() {
|
|
12918
|
+
var e;
|
|
12919
|
+
return __generator(this, function(s) {
|
|
12920
|
+
switch (s.label) {
|
|
12921
|
+
case 0:
|
|
12922
|
+
return e = delay_factory_1.DelayFactory(this.options, this.attemptNumber), [4, e.apply()];
|
|
12923
|
+
case 1:
|
|
12924
|
+
return s.sent(), [
|
|
12925
|
+
2
|
|
12926
|
+
/*return*/
|
|
12927
|
+
];
|
|
12928
|
+
}
|
|
12929
|
+
});
|
|
12930
|
+
});
|
|
12931
|
+
}, t;
|
|
12932
|
+
}()
|
|
12933
|
+
), __webpack_modules__ = { 37: function(t) {
|
|
12505
12934
|
t.exports = function(e) {
|
|
12506
12935
|
var s = {};
|
|
12507
12936
|
function i(u) {
|
|
@@ -13087,8 +13516,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13087
13516
|
else if (this.position === this.buffer.byteLength)
|
|
13088
13517
|
this.buffer = v, this.position = 0;
|
|
13089
13518
|
else {
|
|
13090
|
-
var M = this.buffer.byteLength - this.position, h = new Uint8Array(M + v.byteLength),
|
|
13091
|
-
h.set(
|
|
13519
|
+
var M = this.buffer.byteLength - this.position, h = new Uint8Array(M + v.byteLength), O = c(this.buffer, this.position);
|
|
13520
|
+
h.set(O, 0);
|
|
13092
13521
|
var w = new Uint8Array(v);
|
|
13093
13522
|
h.set(w, M), this.buffer = h, this.position = 0;
|
|
13094
13523
|
}
|
|
@@ -19632,8 +20061,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19632
20061
|
C += "".concat(q, ": ").concat(N.join(", "), `\r
|
|
19633
20062
|
`);
|
|
19634
20063
|
}), n(C);
|
|
19635
|
-
}(b),
|
|
19636
|
-
new DataView(
|
|
20064
|
+
}(b), O = new ArrayBuffer(h.length + 5);
|
|
20065
|
+
new DataView(O, 0, 1).setUint8(0, 128), new DataView(O, 1, 4).setUint32(0, h.length, !1), new Uint8Array(O, 5).set(h), this.opts.onChunk(new Uint8Array(O)), y !== 0 ? this.closeWithRecvError(new p.GRPCError(y, f)) : this.closeWithRecvError();
|
|
19637
20066
|
} }), m;
|
|
19638
20067
|
}(g.BaseStream);
|
|
19639
20068
|
function n(d) {
|
|
@@ -19664,19 +20093,19 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19664
20093
|
}, 512: (t, e, s) => {
|
|
19665
20094
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.dialWebRTC = e.dialDirect = void 0;
|
|
19666
20095
|
var i = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), n = s(165), l = s(400), c = s(982), d = s(958), m = s(93);
|
|
19667
|
-
function v(h,
|
|
20096
|
+
function v(h, O) {
|
|
19668
20097
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
19669
20098
|
var w, C;
|
|
19670
20099
|
return i.__generator(this, function(q) {
|
|
19671
|
-
return M(
|
|
20100
|
+
return M(O), w = function(N) {
|
|
19672
20101
|
return u.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(N);
|
|
19673
|
-
}, !
|
|
20102
|
+
}, !O?.accessToken || O?.externalAuthAddress && O?.externalAuthToEntity ? O && (O?.credentials || O?.accessToken) ? [2, y(h, w, O)] : [2, w] : ((C = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(O.accessToken)), [2, function(N) {
|
|
19674
20103
|
return new f(N, w, C);
|
|
19675
20104
|
}]);
|
|
19676
20105
|
});
|
|
19677
20106
|
});
|
|
19678
20107
|
}
|
|
19679
|
-
function y(h,
|
|
20108
|
+
function y(h, O, w) {
|
|
19680
20109
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
19681
20110
|
var C, q, N, x = this;
|
|
19682
20111
|
return i.__generator(this, function(U) {
|
|
@@ -19684,31 +20113,31 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19684
20113
|
case 0:
|
|
19685
20114
|
return C = "", q = function() {
|
|
19686
20115
|
return i.__awaiter(x, void 0, void 0, function() {
|
|
19687
|
-
var
|
|
20116
|
+
var I, z, k, S, R, _, E, F, P, T;
|
|
19688
20117
|
return i.__generator(this, function(j) {
|
|
19689
20118
|
switch (j.label) {
|
|
19690
20119
|
case 0:
|
|
19691
|
-
return C != "" ? [3, 5] : (
|
|
20120
|
+
return C != "" ? [3, 5] : (I = "", w.accessToken && w.accessToken !== "" ? [3, 2] : ((E = new n.AuthenticateRequest()).setEntity(w.authEntity ? w.authEntity : h.replace(/^(.*:\/\/)/, "")), (S = new n.Credentials()).setType((P = w.credentials) === null || P === void 0 ? void 0 : P.type), S.setPayload((T = w.credentials) === null || T === void 0 ? void 0 : T.payload), E.setCredentials(S), _ = new Promise(function(A, D) {
|
|
19692
20121
|
z = A, k = D;
|
|
19693
|
-
}), u.grpc.invoke(l.AuthService.Authenticate, { request: E, host: w.externalAuthAddress ? w.externalAuthAddress : h, transport:
|
|
19694
|
-
|
|
20122
|
+
}), u.grpc.invoke(l.AuthService.Authenticate, { request: E, host: w.externalAuthAddress ? w.externalAuthAddress : h, transport: O, onMessage: function(A) {
|
|
20123
|
+
I = A.getAccessToken();
|
|
19695
20124
|
}, onEnd: function(A, D, B) {
|
|
19696
20125
|
A == u.grpc.Code.OK ? z(F) : k(D);
|
|
19697
|
-
} }), [4,
|
|
20126
|
+
} }), [4, _]));
|
|
19698
20127
|
case 1:
|
|
19699
20128
|
return j.sent(), [3, 3];
|
|
19700
20129
|
case 2:
|
|
19701
|
-
|
|
20130
|
+
I = w.accessToken, j.label = 3;
|
|
19702
20131
|
case 3:
|
|
19703
|
-
return C =
|
|
20132
|
+
return C = I, w.externalAuthAddress && w.externalAuthToEntity ? ((R = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(C)), _ = new Promise(function(A, D) {
|
|
19704
20133
|
z = A, k = D;
|
|
19705
|
-
}),
|
|
19706
|
-
|
|
20134
|
+
}), I = "", (E = new n.AuthenticateToRequest()).setEntity(w.externalAuthToEntity), u.grpc.invoke(l.ExternalAuthService.AuthenticateTo, { request: E, host: w.externalAuthAddress, transport: O, metadata: R, onMessage: function(A) {
|
|
20135
|
+
I = A.getAccessToken();
|
|
19707
20136
|
}, onEnd: function(A, D, B) {
|
|
19708
20137
|
A == u.grpc.Code.OK ? z(R) : k(D);
|
|
19709
|
-
} }), [4,
|
|
20138
|
+
} }), [4, _]) : [3, 5];
|
|
19710
20139
|
case 4:
|
|
19711
|
-
j.sent(), C =
|
|
20140
|
+
j.sent(), C = I, j.label = 5;
|
|
19712
20141
|
case 5:
|
|
19713
20142
|
return (F = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(C)), [2, F];
|
|
19714
20143
|
}
|
|
@@ -19716,8 +20145,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19716
20145
|
});
|
|
19717
20146
|
}, [4, q()];
|
|
19718
20147
|
case 1:
|
|
19719
|
-
return N = U.sent(), [2, function(
|
|
19720
|
-
return new f(
|
|
20148
|
+
return N = U.sent(), [2, function(I) {
|
|
20149
|
+
return new f(I, O, N);
|
|
19721
20150
|
}];
|
|
19722
20151
|
}
|
|
19723
20152
|
});
|
|
@@ -19725,40 +20154,40 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19725
20154
|
}
|
|
19726
20155
|
e.dialDirect = v;
|
|
19727
20156
|
var f = function() {
|
|
19728
|
-
function h(
|
|
19729
|
-
Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts =
|
|
20157
|
+
function h(O, w, C) {
|
|
20158
|
+
Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts = O, this.extraMetadata = C, this.transport = w(O);
|
|
19730
20159
|
}
|
|
19731
|
-
return Object.defineProperty(h.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(
|
|
20160
|
+
return Object.defineProperty(h.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(O) {
|
|
19732
20161
|
this.extraMetadata.forEach(function(w, C) {
|
|
19733
|
-
|
|
19734
|
-
}), this.transport.start(
|
|
19735
|
-
} }), Object.defineProperty(h.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(
|
|
19736
|
-
this.transport.sendMessage(
|
|
20162
|
+
O.set(w, C);
|
|
20163
|
+
}), this.transport.start(O);
|
|
20164
|
+
} }), Object.defineProperty(h.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(O) {
|
|
20165
|
+
this.transport.sendMessage(O);
|
|
19737
20166
|
} }), Object.defineProperty(h.prototype, "finishSend", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
19738
20167
|
this.transport.finishSend();
|
|
19739
20168
|
} }), Object.defineProperty(h.prototype, "cancel", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
19740
20169
|
this.transport.cancel();
|
|
19741
20170
|
} }), h;
|
|
19742
20171
|
}();
|
|
19743
|
-
function b(h,
|
|
20172
|
+
function b(h, O, w) {
|
|
19744
20173
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
19745
|
-
var C, q, N, x, U,
|
|
20174
|
+
var C, q, N, x, U, I;
|
|
19746
20175
|
return i.__generator(this, function(z) {
|
|
19747
20176
|
switch (z.label) {
|
|
19748
20177
|
case 0:
|
|
19749
20178
|
return C = i.__assign({}, w), [4, v(h, C)];
|
|
19750
20179
|
case 1:
|
|
19751
|
-
return q = z.sent(),
|
|
20180
|
+
return q = z.sent(), I = new Promise(function(k, S) {
|
|
19752
20181
|
N = k, x = S;
|
|
19753
|
-
}), u.grpc.unary(d.SignalingService.OptionalWebRTCConfig, { request: new c.OptionalWebRTCConfigRequest(), metadata: { "rpc-host":
|
|
19754
|
-
var S = k.status, R = k.statusMessage,
|
|
19755
|
-
if (S === u.grpc.Code.OK &&
|
|
19756
|
-
if (!(U =
|
|
20182
|
+
}), u.grpc.unary(d.SignalingService.OptionalWebRTCConfig, { request: new c.OptionalWebRTCConfigRequest(), metadata: { "rpc-host": O }, host: h, transport: q, onEnd: function(k) {
|
|
20183
|
+
var S = k.status, R = k.statusMessage, _ = k.message;
|
|
20184
|
+
if (S === u.grpc.Code.OK && _) {
|
|
20185
|
+
if (!(U = _.getConfig()))
|
|
19757
20186
|
return void N(new c.WebRTCConfig());
|
|
19758
20187
|
N(U);
|
|
19759
20188
|
} else
|
|
19760
20189
|
x(R);
|
|
19761
|
-
} }), [4,
|
|
20190
|
+
} }), [4, I];
|
|
19762
20191
|
case 2:
|
|
19763
20192
|
if (z.sent(), !U)
|
|
19764
20193
|
throw new Error("no config");
|
|
@@ -19768,7 +20197,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19768
20197
|
});
|
|
19769
20198
|
}
|
|
19770
20199
|
function M(h) {
|
|
19771
|
-
var
|
|
20200
|
+
var O;
|
|
19772
20201
|
if (h) {
|
|
19773
20202
|
if (h.accessToken && h.accessToken.length > 0) {
|
|
19774
20203
|
if (h.authEntity)
|
|
@@ -19784,7 +20213,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19784
20213
|
throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken");
|
|
19785
20214
|
}
|
|
19786
20215
|
}
|
|
19787
|
-
if (!((
|
|
20216
|
+
if (!((O = h?.webrtcOptions) === null || O === void 0) && O.signalingAccessToken && h.webrtcOptions.signalingAccessToken.length > 0) {
|
|
19788
20217
|
if (h.webrtcOptions.signalingAuthEntity)
|
|
19789
20218
|
throw new Error("cannot set webrtcOptions.signalingAuthEntity with webrtcOptions.signalingAccessToken");
|
|
19790
20219
|
if (h.webrtcOptions.signalingCredentials)
|
|
@@ -19792,30 +20221,30 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19792
20221
|
}
|
|
19793
20222
|
}
|
|
19794
20223
|
}
|
|
19795
|
-
e.dialWebRTC = function(h,
|
|
19796
|
-
var C, q, N, x, U,
|
|
20224
|
+
e.dialWebRTC = function(h, O, w) {
|
|
20225
|
+
var C, q, N, x, U, I, z;
|
|
19797
20226
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
19798
|
-
var k, S, R,
|
|
20227
|
+
var k, S, R, _, E, F, P, T, j, A, D, B, W, V, Z, oe, re, ge, ae, ne, pe, ie, le, se, ce, ue, de = this;
|
|
19799
20228
|
return i.__generator(this, function(J) {
|
|
19800
20229
|
switch (J.label) {
|
|
19801
20230
|
case 0:
|
|
19802
|
-
return M(w), [4, b(h,
|
|
20231
|
+
return h = h.replace(/(\/)$/, ""), M(w), [4, b(h, O, w)];
|
|
19803
20232
|
case 1:
|
|
19804
20233
|
return k = J.sent(), S = k.toObject().additionalIceServersList.map(function(L) {
|
|
19805
20234
|
return { urls: L.urlsList, credential: L.credential, username: L.username };
|
|
19806
20235
|
}), w || (w = {}), w.webrtcOptions ? (R = w.webrtcOptions).rtcConfig ? R.rtcConfig.iceServers = i.__spreadArray(i.__spreadArray([], R.rtcConfig.iceServers || [], !0), S, !0) : R.rtcConfig = { iceServers: S } : R = { disableTrickleICE: k.getDisableTrickle(), rtcConfig: { iceServers: S } }, [4, (0, m.newPeerConnectionForClient)(R !== void 0 && R.disableTrickleICE, R?.rtcConfig)];
|
|
19807
20236
|
case 2:
|
|
19808
|
-
|
|
20237
|
+
_ = J.sent(), E = _.pc, F = _.dc, P = !1, J.label = 3;
|
|
19809
20238
|
case 3:
|
|
19810
|
-
return J.trys.push([3, , 10, 11]), T = w, w && (T = i.__assign({}, w), w.accessToken || (T.authEntity = (C = w?.webrtcOptions) === null || C === void 0 ? void 0 : C.signalingAuthEntity, T.authEntity || (T.externalAuthAddress ? T.authEntity = (q = w.externalAuthAddress) === null || q === void 0 ? void 0 : q.replace(/^(.*:\/\/)/, "") : T.authEntity = h.replace(/^(.*:\/\/)/, "")), T.credentials = (N = w?.webrtcOptions) === null || N === void 0 ? void 0 : N.signalingCredentials, T.accessToken = (x = w?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingAccessToken), T.externalAuthAddress = (U = w?.webrtcOptions) === null || U === void 0 ? void 0 : U.signalingExternalAuthAddress, T.externalAuthToEntity = (
|
|
20239
|
+
return J.trys.push([3, , 10, 11]), T = w, w && (T = i.__assign({}, w), w.accessToken || (T.authEntity = (C = w?.webrtcOptions) === null || C === void 0 ? void 0 : C.signalingAuthEntity, T.authEntity || (T.externalAuthAddress ? T.authEntity = (q = w.externalAuthAddress) === null || q === void 0 ? void 0 : q.replace(/^(.*:\/\/)/, "") : T.authEntity = h.replace(/^(.*:\/\/)/, "")), T.credentials = (N = w?.webrtcOptions) === null || N === void 0 ? void 0 : N.signalingCredentials, T.accessToken = (x = w?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingAccessToken), T.externalAuthAddress = (U = w?.webrtcOptions) === null || U === void 0 ? void 0 : U.signalingExternalAuthAddress, T.externalAuthToEntity = (I = w?.webrtcOptions) === null || I === void 0 ? void 0 : I.signalingExternalAuthToEntity), [4, v(h, T)];
|
|
19811
20240
|
case 4:
|
|
19812
20241
|
return j = J.sent(), A = u.grpc.client(d.SignalingService.Call, { host: h, transport: j }), D = "", B = !1, W = function(L) {
|
|
19813
20242
|
if (!B) {
|
|
19814
20243
|
B = !0;
|
|
19815
|
-
var
|
|
19816
|
-
|
|
20244
|
+
var G = new c.CallUpdateRequest();
|
|
20245
|
+
G.setUuid(D);
|
|
19817
20246
|
var $ = new r.Status();
|
|
19818
|
-
$.setCode(o.Code.UNKNOWN), $.setMessage(L),
|
|
20247
|
+
$.setCode(o.Code.UNKNOWN), $.setMessage(L), G.setError($), u.grpc.unary(d.SignalingService.CallUpdate, { request: G, metadata: { "rpc-host": O }, host: h, transport: j, onEnd: function(Y) {
|
|
19819
20248
|
var H = Y.status, K = Y.statusMessage, Q = Y.message;
|
|
19820
20249
|
H === u.grpc.Code.OK && Q || console.error(K);
|
|
19821
20250
|
} });
|
|
@@ -19824,8 +20253,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19824
20253
|
if (!B) {
|
|
19825
20254
|
B = !0;
|
|
19826
20255
|
var L = new c.CallUpdateRequest();
|
|
19827
|
-
L.setUuid(D), L.setDone(!0), u.grpc.unary(d.SignalingService.CallUpdate, { request: L, metadata: { "rpc-host":
|
|
19828
|
-
var $ =
|
|
20256
|
+
L.setUuid(D), L.setDone(!0), u.grpc.unary(d.SignalingService.CallUpdate, { request: L, metadata: { "rpc-host": O }, host: h, transport: j, onEnd: function(G) {
|
|
20257
|
+
var $ = G.status, Y = G.statusMessage, H = G.message;
|
|
19829
20258
|
$ === u.grpc.Code.OK && H || console.error(Y);
|
|
19830
20259
|
} });
|
|
19831
20260
|
}
|
|
@@ -19835,13 +20264,13 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19835
20264
|
case 5:
|
|
19836
20265
|
return ge = J.sent(), ae = !1, E.onicecandidate = function(L) {
|
|
19837
20266
|
return i.__awaiter(de, void 0, void 0, function() {
|
|
19838
|
-
var
|
|
20267
|
+
var G, $;
|
|
19839
20268
|
return i.__generator(this, function(Y) {
|
|
19840
20269
|
switch (Y.label) {
|
|
19841
20270
|
case 0:
|
|
19842
20271
|
return [4, oe];
|
|
19843
20272
|
case 1:
|
|
19844
|
-
return Y.sent(), re ? [2] : L.candidate === null ? (ae = !0, V(), [2]) : (H = L.candidate, (K = new c.ICECandidate()).setCandidate(H.candidate), H.sdpMid && K.setSdpMid(H.sdpMid), H.sdpMLineIndex && K.setSdpmLineIndex(H.sdpMLineIndex), H.usernameFragment && K.setUsernameFragment(H.usernameFragment),
|
|
20273
|
+
return Y.sent(), re ? [2] : L.candidate === null ? (ae = !0, V(), [2]) : (H = L.candidate, (K = new c.ICECandidate()).setCandidate(H.candidate), H.sdpMid && K.setSdpMid(H.sdpMid), H.sdpMLineIndex && K.setSdpmLineIndex(H.sdpMLineIndex), H.usernameFragment && K.setUsernameFragment(H.usernameFragment), G = K, ($ = new c.CallUpdateRequest()).setUuid(D), $.setCandidate(G), u.grpc.unary(d.SignalingService.CallUpdate, { request: $, metadata: { "rpc-host": O }, host: h, transport: j, onEnd: function(Q) {
|
|
19845
20274
|
var ee = Q.status, X = Q.statusMessage, te = Q.message;
|
|
19846
20275
|
ee === u.grpc.Code.OK && te || re || ae || console.error("error sending candidate", X);
|
|
19847
20276
|
} }), [2]);
|
|
@@ -19855,21 +20284,21 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19855
20284
|
case 7:
|
|
19856
20285
|
return ne = !1, A.onMessage(function(L) {
|
|
19857
20286
|
return i.__awaiter(de, void 0, void 0, function() {
|
|
19858
|
-
var
|
|
20287
|
+
var G, $, Y, H, K, Q;
|
|
19859
20288
|
return i.__generator(this, function(ee) {
|
|
19860
20289
|
switch (ee.label) {
|
|
19861
20290
|
case 0:
|
|
19862
|
-
return (
|
|
20291
|
+
return (G = L).hasInit() ? ne ? (W("got init stage more than once"), [2]) : ($ = G.getInit(), ne = !0, D = G.getUuid(), Y = new RTCSessionDescription(JSON.parse(atob($.getSdp()))), [4, E.setRemoteDescription(Y)]) : [3, 2];
|
|
19863
20292
|
case 1:
|
|
19864
20293
|
return ee.sent(), Z(!0), R?.disableTrickleICE ? (re = !0, V(), [2]) : [3, 8];
|
|
19865
20294
|
case 2:
|
|
19866
|
-
if (!
|
|
20295
|
+
if (!G.hasUpdate())
|
|
19867
20296
|
return [3, 7];
|
|
19868
20297
|
if (!ne)
|
|
19869
20298
|
return W("got update stage before init stage"), [2];
|
|
19870
|
-
if (
|
|
19871
|
-
return W("uuid mismatch; have=".concat(
|
|
19872
|
-
H =
|
|
20299
|
+
if (G.getUuid() !== D)
|
|
20300
|
+
return W("uuid mismatch; have=".concat(G.getUuid(), " want=").concat(D)), [2];
|
|
20301
|
+
H = G.getUpdate(), X = H.getCandidate(), te = { candidate: X.getCandidate() }, X.hasSdpMid() && (te.sdpMid = X.getSdpMid()), X.hasSdpmLineIndex() && (te.sdpMLineIndex = X.getSdpmLineIndex()), X.hasUsernameFragment() && (te.usernameFragment = X.getUsernameFragment()), K = te, ee.label = 3;
|
|
19873
20302
|
case 3:
|
|
19874
20303
|
return ee.trys.push([3, 5, , 6]), [4, E.addIceCandidate(K)];
|
|
19875
20304
|
case 4:
|
|
@@ -19886,11 +20315,11 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
19886
20315
|
var X, te;
|
|
19887
20316
|
});
|
|
19888
20317
|
});
|
|
19889
|
-
}), le = new Promise(function(L,
|
|
19890
|
-
pe = L, ie =
|
|
19891
|
-
}), A.onEnd(function(L,
|
|
19892
|
-
L !== u.grpc.Code.OK ?
|
|
19893
|
-
}), A.start({ "rpc-host":
|
|
20318
|
+
}), le = new Promise(function(L, G) {
|
|
20319
|
+
pe = L, ie = G;
|
|
20320
|
+
}), A.onEnd(function(L, G, $) {
|
|
20321
|
+
L !== u.grpc.Code.OK ? G !== "Response closed without headers" ? (console.error(G), ie(G)) : ie(new p.ConnectionClosedError("failed to dial")) : pe();
|
|
20322
|
+
}), A.start({ "rpc-host": O }), se = new c.CallRequest(), ce = btoa(JSON.stringify(E.localDescription)), se.setSdp(ce), R && R.disableTrickleICE && se.setDisableTrickle(R.disableTrickleICE), A.send(se), (ue = new g.ClientChannel(E, F)).ready.then(function() {
|
|
19894
20323
|
return pe();
|
|
19895
20324
|
}).catch(function(L) {
|
|
19896
20325
|
return ie(L);
|
|
@@ -20002,62 +20431,62 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20002
20431
|
});
|
|
20003
20432
|
};
|
|
20004
20433
|
}, 655: (t, e, s) => {
|
|
20005
|
-
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => w, __asyncGenerator: () =>
|
|
20434
|
+
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => w, __asyncGenerator: () => O, __asyncValues: () => C, __await: () => h, __awaiter: () => l, __classPrivateFieldGet: () => I, __classPrivateFieldIn: () => k, __classPrivateFieldSet: () => z, __createBinding: () => d, __decorate: () => o, __exportStar: () => m, __extends: () => u, __generator: () => c, __importDefault: () => U, __importStar: () => x, __makeTemplateObject: () => q, __metadata: () => n, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => M, __spreadArrays: () => b, __values: () => v });
|
|
20006
20435
|
var i = function(S, R) {
|
|
20007
|
-
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
20008
|
-
|
|
20009
|
-
} || function(
|
|
20436
|
+
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, E) {
|
|
20437
|
+
_.__proto__ = E;
|
|
20438
|
+
} || function(_, E) {
|
|
20010
20439
|
for (var F in E)
|
|
20011
|
-
Object.prototype.hasOwnProperty.call(E, F) && (
|
|
20440
|
+
Object.prototype.hasOwnProperty.call(E, F) && (_[F] = E[F]);
|
|
20012
20441
|
}, i(S, R);
|
|
20013
20442
|
};
|
|
20014
20443
|
function u(S, R) {
|
|
20015
20444
|
if (typeof R != "function" && R !== null)
|
|
20016
20445
|
throw new TypeError("Class extends value " + String(R) + " is not a constructor or null");
|
|
20017
|
-
function
|
|
20446
|
+
function _() {
|
|
20018
20447
|
this.constructor = S;
|
|
20019
20448
|
}
|
|
20020
|
-
i(S, R), S.prototype = R === null ? Object.create(R) : (
|
|
20449
|
+
i(S, R), S.prototype = R === null ? Object.create(R) : (_.prototype = R.prototype, new _());
|
|
20021
20450
|
}
|
|
20022
20451
|
var g = function() {
|
|
20023
20452
|
return g = Object.assign || function(S) {
|
|
20024
|
-
for (var R,
|
|
20025
|
-
for (var F in R = arguments[
|
|
20453
|
+
for (var R, _ = 1, E = arguments.length; _ < E; _++)
|
|
20454
|
+
for (var F in R = arguments[_])
|
|
20026
20455
|
Object.prototype.hasOwnProperty.call(R, F) && (S[F] = R[F]);
|
|
20027
20456
|
return S;
|
|
20028
20457
|
}, g.apply(this, arguments);
|
|
20029
20458
|
};
|
|
20030
20459
|
function p(S, R) {
|
|
20031
|
-
var
|
|
20460
|
+
var _ = {};
|
|
20032
20461
|
for (var E in S)
|
|
20033
|
-
Object.prototype.hasOwnProperty.call(S, E) && R.indexOf(E) < 0 && (
|
|
20462
|
+
Object.prototype.hasOwnProperty.call(S, E) && R.indexOf(E) < 0 && (_[E] = S[E]);
|
|
20034
20463
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
20035
20464
|
var F = 0;
|
|
20036
20465
|
for (E = Object.getOwnPropertySymbols(S); F < E.length; F++)
|
|
20037
|
-
R.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (
|
|
20466
|
+
R.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (_[E[F]] = S[E[F]]);
|
|
20038
20467
|
}
|
|
20039
|
-
return
|
|
20468
|
+
return _;
|
|
20040
20469
|
}
|
|
20041
|
-
function o(S, R,
|
|
20042
|
-
var F, P = arguments.length, T = P < 3 ? R : E === null ? E = Object.getOwnPropertyDescriptor(R,
|
|
20470
|
+
function o(S, R, _, E) {
|
|
20471
|
+
var F, P = arguments.length, T = P < 3 ? R : E === null ? E = Object.getOwnPropertyDescriptor(R, _) : E;
|
|
20043
20472
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
20044
|
-
T = Reflect.decorate(S, R,
|
|
20473
|
+
T = Reflect.decorate(S, R, _, E);
|
|
20045
20474
|
else
|
|
20046
20475
|
for (var j = S.length - 1; j >= 0; j--)
|
|
20047
|
-
(F = S[j]) && (T = (P < 3 ? F(T) : P > 3 ? F(R,
|
|
20048
|
-
return P > 3 && T && Object.defineProperty(R,
|
|
20476
|
+
(F = S[j]) && (T = (P < 3 ? F(T) : P > 3 ? F(R, _, T) : F(R, _)) || T);
|
|
20477
|
+
return P > 3 && T && Object.defineProperty(R, _, T), T;
|
|
20049
20478
|
}
|
|
20050
20479
|
function r(S, R) {
|
|
20051
|
-
return function(
|
|
20052
|
-
R(
|
|
20480
|
+
return function(_, E) {
|
|
20481
|
+
R(_, E, S);
|
|
20053
20482
|
};
|
|
20054
20483
|
}
|
|
20055
20484
|
function n(S, R) {
|
|
20056
20485
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
20057
20486
|
return Reflect.metadata(S, R);
|
|
20058
20487
|
}
|
|
20059
|
-
function l(S, R,
|
|
20060
|
-
return new (
|
|
20488
|
+
function l(S, R, _, E) {
|
|
20489
|
+
return new (_ || (_ = Promise))(function(F, P) {
|
|
20061
20490
|
function T(D) {
|
|
20062
20491
|
try {
|
|
20063
20492
|
A(E.next(D));
|
|
@@ -20074,7 +20503,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20074
20503
|
}
|
|
20075
20504
|
function A(D) {
|
|
20076
20505
|
var B;
|
|
20077
|
-
D.done ? F(D.value) : (B = D.value, B instanceof
|
|
20506
|
+
D.done ? F(D.value) : (B = D.value, B instanceof _ ? B : new _(function(W) {
|
|
20078
20507
|
W(B);
|
|
20079
20508
|
})).then(T, j);
|
|
20080
20509
|
}
|
|
@@ -20082,7 +20511,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20082
20511
|
});
|
|
20083
20512
|
}
|
|
20084
20513
|
function c(S, R) {
|
|
20085
|
-
var
|
|
20514
|
+
var _, E, F, P, T = { label: 0, sent: function() {
|
|
20086
20515
|
if (1 & F[0])
|
|
20087
20516
|
throw F[1];
|
|
20088
20517
|
return F[1];
|
|
@@ -20093,11 +20522,11 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20093
20522
|
function j(A) {
|
|
20094
20523
|
return function(D) {
|
|
20095
20524
|
return function(B) {
|
|
20096
|
-
if (
|
|
20525
|
+
if (_)
|
|
20097
20526
|
throw new TypeError("Generator is already executing.");
|
|
20098
20527
|
for (; P && (P = 0, B[0] && (T = 0)), T; )
|
|
20099
20528
|
try {
|
|
20100
|
-
if (
|
|
20529
|
+
if (_ = 1, E && (F = 2 & B[0] ? E.return : B[0] ? E.throw || ((F = E.return) && F.call(E), 0) : E.next) && !(F = F.call(E, B[1])).done)
|
|
20101
20530
|
return F;
|
|
20102
20531
|
switch (E = 0, F && (B = [2 & B[0], F.value]), B[0]) {
|
|
20103
20532
|
case 0:
|
|
@@ -20136,7 +20565,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20136
20565
|
} catch (W) {
|
|
20137
20566
|
B = [6, W], E = 0;
|
|
20138
20567
|
} finally {
|
|
20139
|
-
|
|
20568
|
+
_ = F = 0;
|
|
20140
20569
|
}
|
|
20141
20570
|
if (5 & B[0])
|
|
20142
20571
|
throw B[1];
|
|
@@ -20145,23 +20574,23 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20145
20574
|
};
|
|
20146
20575
|
}
|
|
20147
20576
|
}
|
|
20148
|
-
var d = Object.create ? function(S, R,
|
|
20149
|
-
E === void 0 && (E =
|
|
20150
|
-
var F = Object.getOwnPropertyDescriptor(R,
|
|
20577
|
+
var d = Object.create ? function(S, R, _, E) {
|
|
20578
|
+
E === void 0 && (E = _);
|
|
20579
|
+
var F = Object.getOwnPropertyDescriptor(R, _);
|
|
20151
20580
|
F && !("get" in F ? !R.__esModule : F.writable || F.configurable) || (F = { enumerable: !0, get: function() {
|
|
20152
|
-
return R[
|
|
20581
|
+
return R[_];
|
|
20153
20582
|
} }), Object.defineProperty(S, E, F);
|
|
20154
|
-
} : function(S, R,
|
|
20155
|
-
E === void 0 && (E =
|
|
20583
|
+
} : function(S, R, _, E) {
|
|
20584
|
+
E === void 0 && (E = _), S[E] = R[_];
|
|
20156
20585
|
};
|
|
20157
20586
|
function m(S, R) {
|
|
20158
|
-
for (var
|
|
20159
|
-
|
|
20587
|
+
for (var _ in S)
|
|
20588
|
+
_ === "default" || Object.prototype.hasOwnProperty.call(R, _) || d(R, S, _);
|
|
20160
20589
|
}
|
|
20161
20590
|
function v(S) {
|
|
20162
|
-
var R = typeof Symbol == "function" && Symbol.iterator,
|
|
20163
|
-
if (
|
|
20164
|
-
return
|
|
20591
|
+
var R = typeof Symbol == "function" && Symbol.iterator, _ = R && S[R], E = 0;
|
|
20592
|
+
if (_)
|
|
20593
|
+
return _.call(S);
|
|
20165
20594
|
if (S && typeof S.length == "number")
|
|
20166
20595
|
return { next: function() {
|
|
20167
20596
|
return S && E >= S.length && (S = void 0), { value: S && S[E++], done: !S };
|
|
@@ -20169,10 +20598,10 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20169
20598
|
throw new TypeError(R ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
20170
20599
|
}
|
|
20171
20600
|
function y(S, R) {
|
|
20172
|
-
var
|
|
20173
|
-
if (!
|
|
20601
|
+
var _ = typeof Symbol == "function" && S[Symbol.iterator];
|
|
20602
|
+
if (!_)
|
|
20174
20603
|
return S;
|
|
20175
|
-
var E, F, P =
|
|
20604
|
+
var E, F, P = _.call(S), T = [];
|
|
20176
20605
|
try {
|
|
20177
20606
|
for (; (R === void 0 || R-- > 0) && !(E = P.next()).done; )
|
|
20178
20607
|
T.push(E.value);
|
|
@@ -20180,7 +20609,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20180
20609
|
F = { error: j };
|
|
20181
20610
|
} finally {
|
|
20182
20611
|
try {
|
|
20183
|
-
E && !E.done && (
|
|
20612
|
+
E && !E.done && (_ = P.return) && _.call(P);
|
|
20184
20613
|
} finally {
|
|
20185
20614
|
if (F)
|
|
20186
20615
|
throw F.error;
|
|
@@ -20194,16 +20623,16 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20194
20623
|
return S;
|
|
20195
20624
|
}
|
|
20196
20625
|
function b() {
|
|
20197
|
-
for (var S = 0, R = 0,
|
|
20626
|
+
for (var S = 0, R = 0, _ = arguments.length; R < _; R++)
|
|
20198
20627
|
S += arguments[R].length;
|
|
20199
20628
|
var E = Array(S), F = 0;
|
|
20200
|
-
for (R = 0; R <
|
|
20629
|
+
for (R = 0; R < _; R++)
|
|
20201
20630
|
for (var P = arguments[R], T = 0, j = P.length; T < j; T++, F++)
|
|
20202
20631
|
E[F] = P[T];
|
|
20203
20632
|
return E;
|
|
20204
20633
|
}
|
|
20205
|
-
function M(S, R,
|
|
20206
|
-
if (
|
|
20634
|
+
function M(S, R, _) {
|
|
20635
|
+
if (_ || arguments.length === 2)
|
|
20207
20636
|
for (var E, F = 0, P = R.length; F < P; F++)
|
|
20208
20637
|
!E && F in R || (E || (E = Array.prototype.slice.call(R, 0, F)), E[F] = R[F]);
|
|
20209
20638
|
return S.concat(E || Array.prototype.slice.call(R));
|
|
@@ -20211,10 +20640,10 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20211
20640
|
function h(S) {
|
|
20212
20641
|
return this instanceof h ? (this.v = S, this) : new h(S);
|
|
20213
20642
|
}
|
|
20214
|
-
function
|
|
20643
|
+
function O(S, R, _) {
|
|
20215
20644
|
if (!Symbol.asyncIterator)
|
|
20216
20645
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20217
|
-
var E, F =
|
|
20646
|
+
var E, F = _.apply(S, R || []), P = [];
|
|
20218
20647
|
return E = {}, T("next"), T("throw"), T("return"), E[Symbol.asyncIterator] = function() {
|
|
20219
20648
|
return this;
|
|
20220
20649
|
}, E;
|
|
@@ -20244,7 +20673,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20244
20673
|
}
|
|
20245
20674
|
}
|
|
20246
20675
|
function w(S) {
|
|
20247
|
-
var R,
|
|
20676
|
+
var R, _;
|
|
20248
20677
|
return R = {}, E("next"), E("throw", function(F) {
|
|
20249
20678
|
throw F;
|
|
20250
20679
|
}), E("return"), R[Symbol.iterator] = function() {
|
|
@@ -20252,15 +20681,15 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20252
20681
|
}, R;
|
|
20253
20682
|
function E(F, P) {
|
|
20254
20683
|
R[F] = S[F] ? function(T) {
|
|
20255
|
-
return (
|
|
20684
|
+
return (_ = !_) ? { value: h(S[F](T)), done: F === "return" } : P ? P(T) : T;
|
|
20256
20685
|
} : P;
|
|
20257
20686
|
}
|
|
20258
20687
|
}
|
|
20259
20688
|
function C(S) {
|
|
20260
20689
|
if (!Symbol.asyncIterator)
|
|
20261
20690
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20262
|
-
var R,
|
|
20263
|
-
return
|
|
20691
|
+
var R, _ = S[Symbol.asyncIterator];
|
|
20692
|
+
return _ ? _.call(S) : (S = v(S), R = {}, E("next"), E("throw"), E("return"), R[Symbol.asyncIterator] = function() {
|
|
20264
20693
|
return this;
|
|
20265
20694
|
}, R);
|
|
20266
20695
|
function E(F) {
|
|
@@ -20288,28 +20717,28 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20288
20717
|
return S;
|
|
20289
20718
|
var R = {};
|
|
20290
20719
|
if (S != null)
|
|
20291
|
-
for (var
|
|
20292
|
-
|
|
20720
|
+
for (var _ in S)
|
|
20721
|
+
_ !== "default" && Object.prototype.hasOwnProperty.call(S, _) && d(R, S, _);
|
|
20293
20722
|
return N(R, S), R;
|
|
20294
20723
|
}
|
|
20295
20724
|
function U(S) {
|
|
20296
20725
|
return S && S.__esModule ? S : { default: S };
|
|
20297
20726
|
}
|
|
20298
|
-
function
|
|
20299
|
-
if (
|
|
20727
|
+
function I(S, R, _, E) {
|
|
20728
|
+
if (_ === "a" && !E)
|
|
20300
20729
|
throw new TypeError("Private accessor was defined without a getter");
|
|
20301
20730
|
if (typeof R == "function" ? S !== R || !E : !R.has(S))
|
|
20302
20731
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20303
|
-
return
|
|
20732
|
+
return _ === "m" ? E : _ === "a" ? E.call(S) : E ? E.value : R.get(S);
|
|
20304
20733
|
}
|
|
20305
|
-
function z(S, R,
|
|
20734
|
+
function z(S, R, _, E, F) {
|
|
20306
20735
|
if (E === "m")
|
|
20307
20736
|
throw new TypeError("Private method is not writable");
|
|
20308
20737
|
if (E === "a" && !F)
|
|
20309
20738
|
throw new TypeError("Private accessor was defined without a setter");
|
|
20310
20739
|
if (typeof R == "function" ? S !== R || !F : !R.has(S))
|
|
20311
20740
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
20312
|
-
return E === "a" ? F.call(S,
|
|
20741
|
+
return E === "a" ? F.call(S, _) : F ? F.value = _ : R.set(S, _), _;
|
|
20313
20742
|
}
|
|
20314
20743
|
function k(S, R) {
|
|
20315
20744
|
if (R === null || typeof R != "object" && typeof R != "function")
|
|
@@ -22458,9 +22887,9 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22458
22887
|
return f.slice(b, M);
|
|
22459
22888
|
var h = f.length;
|
|
22460
22889
|
M !== void 0 && (h = M);
|
|
22461
|
-
for (var
|
|
22462
|
-
|
|
22463
|
-
return
|
|
22890
|
+
for (var O = new Uint8Array(h - b), w = 0, C = b; C < h; C++)
|
|
22891
|
+
O[w++] = f[C];
|
|
22892
|
+
return O;
|
|
22464
22893
|
}
|
|
22465
22894
|
g.decodeASCII = l, g.encodeASCII = function(f) {
|
|
22466
22895
|
for (var b = new Uint8Array(f.length), M = 0; M !== f.length; ++M) {
|
|
@@ -22480,7 +22909,7 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22480
22909
|
return f.prototype.parse = function(b, M) {
|
|
22481
22910
|
if (b.length === 0 && M)
|
|
22482
22911
|
return [];
|
|
22483
|
-
var h,
|
|
22912
|
+
var h, O = [];
|
|
22484
22913
|
if (this.buffer == null)
|
|
22485
22914
|
this.buffer = b, this.position = 0;
|
|
22486
22915
|
else if (this.position === this.buffer.byteLength)
|
|
@@ -22493,14 +22922,14 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22493
22922
|
}
|
|
22494
22923
|
for (; ; ) {
|
|
22495
22924
|
if (!m(this.buffer, this.position, 5))
|
|
22496
|
-
return
|
|
22497
|
-
var x = v(this.buffer, this.position, this.position + 5), U = new DataView(x.buffer, x.byteOffset, x.byteLength),
|
|
22498
|
-
if (!m(this.buffer, this.position, 5 +
|
|
22499
|
-
return
|
|
22500
|
-
var z = v(this.buffer, this.position + 5, this.position + 5 +
|
|
22501
|
-
if (this.position += 5 +
|
|
22502
|
-
return
|
|
22503
|
-
|
|
22925
|
+
return O;
|
|
22926
|
+
var x = v(this.buffer, this.position, this.position + 5), U = new DataView(x.buffer, x.byteOffset, x.byteLength), I = d(U);
|
|
22927
|
+
if (!m(this.buffer, this.position, 5 + I))
|
|
22928
|
+
return O;
|
|
22929
|
+
var z = v(this.buffer, this.position + 5, this.position + 5 + I);
|
|
22930
|
+
if (this.position += 5 + I, c(U))
|
|
22931
|
+
return O.push({ chunkType: o.TRAILERS, trailers: (h = z, new r.Metadata(l(h))) }), O;
|
|
22932
|
+
O.push({ chunkType: o.MESSAGE, data: z });
|
|
22504
22933
|
}
|
|
22505
22934
|
}, f;
|
|
22506
22935
|
}();
|
|
@@ -22565,9 +22994,9 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22565
22994
|
this.props.debug && l.debug("onHeaders.gRPCStatus", M);
|
|
22566
22995
|
var h = M && M >= 0 ? M : n.httpStatusToCode(b);
|
|
22567
22996
|
this.props.debug && l.debug("onHeaders.code", h);
|
|
22568
|
-
var
|
|
22569
|
-
if (this.props.debug && l.debug("onHeaders.gRPCMessage",
|
|
22570
|
-
var w = this.decodeGRPCStatus(
|
|
22997
|
+
var O = f.get("grpc-message") || [];
|
|
22998
|
+
if (this.props.debug && l.debug("onHeaders.gRPCMessage", O), this.rawOnHeaders(f), h !== n.Code.OK) {
|
|
22999
|
+
var w = this.decodeGRPCStatus(O[0]);
|
|
22571
23000
|
this.rawOnError(h, w, f);
|
|
22572
23001
|
}
|
|
22573
23002
|
}
|
|
@@ -22584,8 +23013,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22584
23013
|
}
|
|
22585
23014
|
M.forEach(function(h) {
|
|
22586
23015
|
if (h.chunkType === r.ChunkType.MESSAGE) {
|
|
22587
|
-
var
|
|
22588
|
-
b.rawOnMessage(
|
|
23016
|
+
var O = b.methodDefinition.responseType.deserializeBinary(h.data);
|
|
23017
|
+
b.rawOnMessage(O);
|
|
22589
23018
|
} else
|
|
22590
23019
|
h.chunkType === r.ChunkType.TRAILERS && (b.responseHeaders ? (b.responseTrailers = new o.Metadata(h.trailers), b.props.debug && l.debug("onChunk.trailers", b.responseTrailers)) : (b.responseHeaders = new o.Metadata(h.trailers), b.rawOnHeaders(b.responseHeaders)));
|
|
22591
23020
|
});
|
|
@@ -22603,10 +23032,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22603
23032
|
} else {
|
|
22604
23033
|
if (this.responseHeaders === void 0)
|
|
22605
23034
|
return void this.rawOnError(n.Code.Unknown, "Response closed without headers");
|
|
22606
|
-
var h = v(this.responseHeaders),
|
|
22607
|
-
if (this.props.debug && l.debug("grpc.headers only response ", h,
|
|
23035
|
+
var h = v(this.responseHeaders), O = this.responseHeaders.get("grpc-message");
|
|
23036
|
+
if (this.props.debug && l.debug("grpc.headers only response ", h, O), h === null)
|
|
22608
23037
|
return void this.rawOnEnd(n.Code.Unknown, "Response closed without grpc-status (Headers only)", this.responseHeaders);
|
|
22609
|
-
var w = this.decodeGRPCStatus(
|
|
23038
|
+
var w = this.decodeGRPCStatus(O[0]);
|
|
22610
23039
|
this.rawOnEnd(h, w, this.responseHeaders);
|
|
22611
23040
|
}
|
|
22612
23041
|
}, y.prototype.decodeGRPCStatus = function(f) {
|
|
@@ -22619,10 +23048,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22619
23048
|
}
|
|
22620
23049
|
}, y.prototype.rawOnEnd = function(f, b, M) {
|
|
22621
23050
|
var h = this;
|
|
22622
|
-
this.props.debug && l.debug("rawOnEnd", f, b, M), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
23051
|
+
this.props.debug && l.debug("rawOnEnd", f, b, M), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(O) {
|
|
22623
23052
|
if (!h.closed)
|
|
22624
23053
|
try {
|
|
22625
|
-
|
|
23054
|
+
O(f, b, M);
|
|
22626
23055
|
} catch (w) {
|
|
22627
23056
|
setTimeout(function() {
|
|
22628
23057
|
throw w;
|
|
@@ -22641,10 +23070,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22641
23070
|
});
|
|
22642
23071
|
}, y.prototype.rawOnError = function(f, b, M) {
|
|
22643
23072
|
var h = this;
|
|
22644
|
-
M === void 0 && (M = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
23073
|
+
M === void 0 && (M = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(O) {
|
|
22645
23074
|
if (!h.closed)
|
|
22646
23075
|
try {
|
|
22647
|
-
|
|
23076
|
+
O(f, b, M);
|
|
22648
23077
|
} catch (w) {
|
|
22649
23078
|
setTimeout(function() {
|
|
22650
23079
|
throw w;
|
|
@@ -22827,8 +23256,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22827
23256
|
return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(M, h) {
|
|
22828
23257
|
M.__proto__ = h;
|
|
22829
23258
|
} || function(M, h) {
|
|
22830
|
-
for (var
|
|
22831
|
-
Object.prototype.hasOwnProperty.call(h,
|
|
23259
|
+
for (var O in h)
|
|
23260
|
+
Object.prototype.hasOwnProperty.call(h, O) && (M[O] = h[O]);
|
|
22832
23261
|
})(f, b);
|
|
22833
23262
|
}, function(f, b) {
|
|
22834
23263
|
function M() {
|
|
@@ -22868,10 +23297,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22868
23297
|
var M = this;
|
|
22869
23298
|
this.metadata = b;
|
|
22870
23299
|
var h = new XMLHttpRequest();
|
|
22871
|
-
this.xhr = h, h.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(
|
|
22872
|
-
h.setRequestHeader(
|
|
22873
|
-
}), h.withCredentials = !!this.init.withCredentials, h.addEventListener("readystatechange", this.onStateChange.bind(this)), h.addEventListener("progress", this.onProgressEvent.bind(this)), h.addEventListener("loadend", this.onLoadEvent.bind(this)), h.addEventListener("error", function(
|
|
22874
|
-
M.options.debug && l.debug("XHR.error",
|
|
23300
|
+
this.xhr = h, h.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(O, w) {
|
|
23301
|
+
h.setRequestHeader(O, w.join(", "));
|
|
23302
|
+
}), h.withCredentials = !!this.init.withCredentials, h.addEventListener("readystatechange", this.onStateChange.bind(this)), h.addEventListener("progress", this.onProgressEvent.bind(this)), h.addEventListener("loadend", this.onLoadEvent.bind(this)), h.addEventListener("error", function(O) {
|
|
23303
|
+
M.options.debug && l.debug("XHR.error", O), M.options.onEnd(O.error);
|
|
22875
23304
|
});
|
|
22876
23305
|
}, f.prototype.configureXhr = function() {
|
|
22877
23306
|
this.xhr.responseType = "text", this.xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
|
@@ -22901,8 +23330,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22901
23330
|
}
|
|
22902
23331
|
function y(f) {
|
|
22903
23332
|
for (var b = new Uint8Array(f.length), M = 0, h = 0; h < f.length; h++) {
|
|
22904
|
-
var
|
|
22905
|
-
b[M++] = 255 &
|
|
23333
|
+
var O = String.prototype.codePointAt ? f.codePointAt(h) : v(f, h);
|
|
23334
|
+
b[M++] = 255 & O;
|
|
22906
23335
|
}
|
|
22907
23336
|
return b;
|
|
22908
23337
|
}
|
|
@@ -22969,8 +23398,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22969
23398
|
}, start: function(b) {
|
|
22970
23399
|
(m = new WebSocket(v, ["grpc-websockets"])).binaryType = "arraybuffer", m.onopen = function() {
|
|
22971
23400
|
var M;
|
|
22972
|
-
d.debug && r.debug("websocketRequest.onopen"), m.send((M = "", b.forEach(function(h,
|
|
22973
|
-
M += h + ": " +
|
|
23401
|
+
d.debug && r.debug("websocketRequest.onopen"), m.send((M = "", b.forEach(function(h, O) {
|
|
23402
|
+
M += h + ": " + O.join(", ") + `\r
|
|
22974
23403
|
`;
|
|
22975
23404
|
}), n.encodeASCII(M))), y.forEach(function(h) {
|
|
22976
23405
|
f(h);
|
|
@@ -37998,6 +38427,18 @@ class EventDispatcher {
|
|
|
37998
38427
|
}
|
|
37999
38428
|
}
|
|
38000
38429
|
const events = new EventDispatcher();
|
|
38430
|
+
class ViamResponseStream extends EventDispatcher {
|
|
38431
|
+
stream;
|
|
38432
|
+
constructor(e) {
|
|
38433
|
+
super(), this.stream = e;
|
|
38434
|
+
}
|
|
38435
|
+
on(e, s) {
|
|
38436
|
+
return super.on(e, s), this;
|
|
38437
|
+
}
|
|
38438
|
+
cancel() {
|
|
38439
|
+
this.listeners = {}, this.stream.cancel();
|
|
38440
|
+
}
|
|
38441
|
+
}
|
|
38001
38442
|
class SessionTransport {
|
|
38002
38443
|
opts;
|
|
38003
38444
|
transport;
|
|
@@ -38286,6 +38727,9 @@ class RobotClient {
|
|
|
38286
38727
|
const i = { transport: s };
|
|
38287
38728
|
return new e(this.serviceHost, i);
|
|
38288
38729
|
}
|
|
38730
|
+
get peerConnection() {
|
|
38731
|
+
return this.peerConn;
|
|
38732
|
+
}
|
|
38289
38733
|
async disconnect() {
|
|
38290
38734
|
for (; this.connecting; )
|
|
38291
38735
|
await this.connecting;
|
|
@@ -38316,7 +38760,25 @@ class RobotClient {
|
|
|
38316
38760
|
this.webrtcOptions.host,
|
|
38317
38761
|
i
|
|
38318
38762
|
);
|
|
38319
|
-
this.peerConn = p.peerConnection, this.
|
|
38763
|
+
this.peerConn = p.peerConnection, this.peerConn.addEventListener("iceconnectionstatechange", () => {
|
|
38764
|
+
if (this.peerConn?.iceConnectionState === "closed") {
|
|
38765
|
+
if (this.webrtcOptions?.noReconnect)
|
|
38766
|
+
return;
|
|
38767
|
+
let o = 0;
|
|
38768
|
+
console.debug("connection closed, will try to reconnect"), backOff_1(
|
|
38769
|
+
() => this.connect().then(
|
|
38770
|
+
() => {
|
|
38771
|
+
console.debug("reconnected successfully!"), events.emit("reconnected", {});
|
|
38772
|
+
},
|
|
38773
|
+
(r) => {
|
|
38774
|
+
throw console.debug(
|
|
38775
|
+
`failed to reconnect - retries count: ${o}`
|
|
38776
|
+
), o += 1, r;
|
|
38777
|
+
}
|
|
38778
|
+
)
|
|
38779
|
+
);
|
|
38780
|
+
}
|
|
38781
|
+
}), this.transportFactory = p.transportFactory, p.peerConnection.ontrack = (o) => {
|
|
38320
38782
|
const [r] = o.streams;
|
|
38321
38783
|
if (!r)
|
|
38322
38784
|
throw events.emit("track", o), new Error("expected event stream to exist");
|
|
@@ -38440,9 +38902,20 @@ class RobotClient {
|
|
|
38440
38902
|
const { robotService: s } = this, i = new robot_pb.GetStatusRequest();
|
|
38441
38903
|
return i.setResourceNamesList(e), (await promisify(s.getStatus.bind(s), i)).getStatusList();
|
|
38442
38904
|
}
|
|
38443
|
-
|
|
38905
|
+
streamStatus(e, s) {
|
|
38444
38906
|
const { robotService: i } = this, u = new robot_pb.StreamStatusRequest();
|
|
38445
|
-
|
|
38907
|
+
u.setResourceNamesList(e), u.setEvery(s);
|
|
38908
|
+
const g = i.streamStatus(u);
|
|
38909
|
+
if (!g)
|
|
38910
|
+
throw new Error("no stream");
|
|
38911
|
+
const p = new ViamResponseStream(g);
|
|
38912
|
+
return g.on("data", (o) => {
|
|
38913
|
+
p.emit("data", o.getStatusList());
|
|
38914
|
+
}), g.on("status", (o) => {
|
|
38915
|
+
p.emit("status", o);
|
|
38916
|
+
}), g.on("end", (o) => {
|
|
38917
|
+
p.emit("end", o);
|
|
38918
|
+
}), p;
|
|
38446
38919
|
}
|
|
38447
38920
|
}
|
|
38448
38921
|
const isLocalConnection = (t) => t.includes(".local"), dialDirect = async (t) => {
|
|
@@ -38450,19 +38923,25 @@ const isLocalConnection = (t) => t.includes(".local"), dialDirect = async (t) =>
|
|
|
38450
38923
|
throw new Error(
|
|
38451
38924
|
`cannot dial "${t.host}" directly, please use a local url instead.`
|
|
38452
38925
|
);
|
|
38453
|
-
|
|
38454
|
-
|
|
38455
|
-
|
|
38926
|
+
let e;
|
|
38927
|
+
t.disableSessions && (e = { disabled: !0 });
|
|
38928
|
+
const s = new RobotClient(t.host, void 0, e);
|
|
38929
|
+
let i;
|
|
38930
|
+
return t.credential && (i = t.credential), await s.connect(t.authEntity, i), console.debug("connected via gRPC"), s;
|
|
38456
38931
|
}, dialWebRTC = async (t) => {
|
|
38457
38932
|
console.debug("dialing via WebRTC...");
|
|
38458
38933
|
const e = t.host, { signalingAddress: s } = t, u = { iceServers: t.iceServers ?? [] }, g = {
|
|
38459
38934
|
enabled: !0,
|
|
38460
38935
|
host: t.host,
|
|
38461
38936
|
signalingAddress: s,
|
|
38462
|
-
rtcConfig: u
|
|
38463
|
-
|
|
38464
|
-
|
|
38465
|
-
|
|
38937
|
+
rtcConfig: u,
|
|
38938
|
+
noReconnect: t.noReconnect
|
|
38939
|
+
};
|
|
38940
|
+
let p;
|
|
38941
|
+
t.disableSessions && (p = { disabled: !0 });
|
|
38942
|
+
const o = new RobotClient(e, g, p);
|
|
38943
|
+
let r;
|
|
38944
|
+
return t.credential && (r = t.credential), await o.connect(e, r), console.debug("connected via WebRTC"), o;
|
|
38466
38945
|
}, isDialWebRTCConf = (t) => {
|
|
38467
38946
|
const e = t;
|
|
38468
38947
|
return typeof e.signalingAddress != "string" ? !1 : !e.iceServers || Array.isArray(e.iceServers);
|
|
@@ -39552,7 +40031,8 @@ var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
|
39552
40031
|
var n = {
|
|
39553
40032
|
widthPx: e.Message.getFieldWithDefault(r, 1, 0),
|
|
39554
40033
|
heightPx: e.Message.getFieldWithDefault(r, 2, 0),
|
|
39555
|
-
frameFormat: e.Message.getFieldWithDefault(r, 3, "")
|
|
40034
|
+
frameFormat: e.Message.getFieldWithDefault(r, 3, ""),
|
|
40035
|
+
frameRate: e.Message.getFloatingPointFieldWithDefault(r, 4, 0)
|
|
39556
40036
|
};
|
|
39557
40037
|
return o && (n.$jspbMessageInstance = r), n;
|
|
39558
40038
|
}), proto.viam.component.camera.v1.Property.deserializeBinary = function(o) {
|
|
@@ -39583,6 +40063,13 @@ var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
|
39583
40063
|
);
|
|
39584
40064
|
o.setFrameFormat(l);
|
|
39585
40065
|
break;
|
|
40066
|
+
case 4:
|
|
40067
|
+
var l = (
|
|
40068
|
+
/** @type {number} */
|
|
40069
|
+
r.readFloat()
|
|
40070
|
+
);
|
|
40071
|
+
o.setFrameRate(l);
|
|
40072
|
+
break;
|
|
39586
40073
|
default:
|
|
39587
40074
|
r.skipField();
|
|
39588
40075
|
break;
|
|
@@ -39603,6 +40090,9 @@ var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
|
39603
40090
|
), n = o.getFrameFormat(), n.length > 0 && r.writeString(
|
|
39604
40091
|
3,
|
|
39605
40092
|
n
|
|
40093
|
+
), n = o.getFrameRate(), n !== 0 && r.writeFloat(
|
|
40094
|
+
4,
|
|
40095
|
+
n
|
|
39606
40096
|
);
|
|
39607
40097
|
}, proto.viam.component.camera.v1.Property.prototype.getWidthPx = function() {
|
|
39608
40098
|
return (
|
|
@@ -39625,6 +40115,13 @@ var camera_pb = {}, httpbody_pb = {}, any_pb = {};
|
|
|
39625
40115
|
);
|
|
39626
40116
|
}, proto.viam.component.camera.v1.Property.prototype.setFrameFormat = function(o) {
|
|
39627
40117
|
return e.Message.setProto3StringField(this, 3, o);
|
|
40118
|
+
}, proto.viam.component.camera.v1.Property.prototype.getFrameRate = function() {
|
|
40119
|
+
return (
|
|
40120
|
+
/** @type {number} */
|
|
40121
|
+
e.Message.getFloatingPointFieldWithDefault(this, 4, 0)
|
|
40122
|
+
);
|
|
40123
|
+
}, proto.viam.component.camera.v1.Property.prototype.setFrameRate = function(o) {
|
|
40124
|
+
return e.Message.setProto3FloatField(this, 4, o);
|
|
39628
40125
|
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.camera.v1.IntrinsicParameters.prototype.toObject = function(o) {
|
|
39629
40126
|
return proto.viam.component.camera.v1.IntrinsicParameters.toObject(o, this);
|
|
39630
40127
|
}, proto.viam.component.camera.v1.IntrinsicParameters.toObject = function(o, r) {
|
|
@@ -40777,8 +41274,14 @@ const getValidSDPTrackName = (t) => t.replaceAll(":", "+");
|
|
|
40777
41274
|
class StreamClient extends EventDispatcher {
|
|
40778
41275
|
client;
|
|
40779
41276
|
options;
|
|
41277
|
+
streams;
|
|
40780
41278
|
constructor(e, s = {}) {
|
|
40781
|
-
super(), this.client = e.createServiceClient(StreamServiceClient_1), this.options = s, events.on("track", (i) =>
|
|
41279
|
+
super(), this.client = e.createServiceClient(StreamServiceClient_1), this.options = s, this.streams = /* @__PURE__ */ new Set(), events.on("track", (i) => {
|
|
41280
|
+
this.emit("track", i);
|
|
41281
|
+
}), events.on("reconnected", () => {
|
|
41282
|
+
for (const i of this.streams.values())
|
|
41283
|
+
this.add(i);
|
|
41284
|
+
});
|
|
40782
41285
|
}
|
|
40783
41286
|
get streamService() {
|
|
40784
41287
|
return this.client;
|
|
@@ -40790,12 +41293,12 @@ class StreamClient extends EventDispatcher {
|
|
|
40790
41293
|
await promisify(
|
|
40791
41294
|
s.addStream.bind(s),
|
|
40792
41295
|
i
|
|
40793
|
-
);
|
|
41296
|
+
), this.streams.add(e);
|
|
40794
41297
|
} catch {
|
|
40795
41298
|
i.setName(e), this.options.requestLogger?.(i), await promisify(
|
|
40796
41299
|
s.addStream.bind(s),
|
|
40797
41300
|
i
|
|
40798
|
-
);
|
|
41301
|
+
), this.streams.add(e);
|
|
40799
41302
|
}
|
|
40800
41303
|
}
|
|
40801
41304
|
async remove(e) {
|
|
@@ -40805,12 +41308,12 @@ class StreamClient extends EventDispatcher {
|
|
|
40805
41308
|
await promisify(
|
|
40806
41309
|
s.removeStream.bind(s),
|
|
40807
41310
|
i
|
|
40808
|
-
);
|
|
41311
|
+
), this.streams.delete(e);
|
|
40809
41312
|
} catch {
|
|
40810
41313
|
i.setName(e), this.options.requestLogger?.(i), await promisify(
|
|
40811
41314
|
s.removeStream.bind(s),
|
|
40812
41315
|
i
|
|
40813
|
-
);
|
|
41316
|
+
), this.streams.delete(e);
|
|
40814
41317
|
}
|
|
40815
41318
|
}
|
|
40816
41319
|
}
|
|
@@ -41165,7 +41668,7 @@ class ServoClient {
|
|
|
41165
41668
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
41166
41669
|
}
|
|
41167
41670
|
}
|
|
41168
|
-
const version = "0.
|
|
41671
|
+
const version = "0.2.0-pre.1";
|
|
41169
41672
|
export {
|
|
41170
41673
|
ArmClient,
|
|
41171
41674
|
BaseClient,
|