taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
97 lines (96 loc) • 2.35 kB
JavaScript
import { bw as a, bx as p, by as v, bz as b } from "./JBrowsePanel-BNE3gNW1.js";
var h = {
Promise: void 0
};
function y(r) {
r();
}
var l = (function() {
return typeof Symbol == "function" && Symbol.observable || "@@observable";
})();
function d(r) {
return r;
}
function S(r) {
return r.length === 0 ? d : r.length === 1 ? r[0] : function(n) {
return r.reduce(function(u, o) {
return o(u);
}, n);
};
}
var w = (function() {
function r(t) {
t && (this._subscribe = t);
}
return r.prototype.lift = function(t) {
var n = new r();
return n.source = this, n.operator = t, n;
}, r.prototype.subscribe = function(t, n, u) {
var o = this, e = m(t) ? t : new a(t, n, u);
return y(function() {
var i = o, c = i.operator, s = i.source;
e.add(c ? c.call(e, s) : s ? o._subscribe(e) : o._trySubscribe(e));
}), e;
}, r.prototype._trySubscribe = function(t) {
try {
return this._subscribe(t);
} catch (n) {
t.error(n);
}
}, r.prototype.forEach = function(t, n) {
var u = this;
return n = f(n), new n(function(o, e) {
var i = new a({
next: function(c) {
try {
t(c);
} catch (s) {
e(s), i.unsubscribe();
}
},
error: e,
complete: o
});
u.subscribe(i);
});
}, r.prototype._subscribe = function(t) {
var n;
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t);
}, r.prototype[l] = function() {
return this;
}, r.prototype.pipe = function() {
for (var t = [], n = 0; n < arguments.length; n++)
t[n] = arguments[n];
return S(t)(this);
}, r.prototype.toPromise = function(t) {
var n = this;
return t = f(t), new t(function(u, o) {
var e;
n.subscribe(function(i) {
return e = i;
}, function(i) {
return o(i);
}, function() {
return u(e);
});
});
}, r.create = function(t) {
return new r(t);
}, r;
})();
function f(r) {
var t;
return (t = r ?? h.Promise) !== null && t !== void 0 ? t : Promise;
}
function _(r) {
return r && b(r.next) && b(r.error) && b(r.complete);
}
function m(r) {
return r && r instanceof v || _(r) && p(r);
}
export {
w as O,
d as i,
l as o
};
//# sourceMappingURL=Observable-bHPg1QB7.js.map