@allincart-ag/dive
Version:
Allincart Spatial Framework
1,513 lines • 146 kB
JavaScript
var _p = Object.defineProperty;
var pp = (p, g, o) => g in p ? _p(p, g, { enumerable: !0, configurable: !0, writable: !0, value: o }) : p[g] = o;
var fn = (p, g, o) => pp(p, typeof g != "symbol" ? g + "" : g, o);
import { g as dp } from "../../chunks/MathUtils-CFGjHuVF.mjs";
import "../../chunks/FileTypes-CXnW0NAe.mjs";
import "three";
import { a as _o, i as vp } from "../../chunks/PovSchema-DWWvr_ED.mjs";
import { i as po } from "../../chunks/SelectTool-DFpr9XHT.mjs";
const vo = {};
function G(p, g) {
vo[p] = g;
}
function wp(p) {
return vo[p];
}
class F {
constructor(g, o) {
fn(this, "_payload");
fn(this, "_dependencies");
this._payload = g, this._dependencies = o;
}
/**
* Factory method to create a new Action class with the specified description and execution logic.
*
* @template T - The type of the payload (use void for actions without payload)
* @template D - The type of dependencies
* @template R - The return type of the action
* @param options - Configuration options for the action
* @param options.description - A description of what the action does
* @param options.execute - The function that implements the action's logic
* @returns A new Action class that can be instantiated with payload and dependencies
*/
static define({
description: g,
execute: o
}) {
return class extends F {
constructor(E, B) {
super(E, B);
fn(this, "_description", g);
fn(this, "_payload");
this._payload = E;
}
execute() {
return o(this._payload, this._dependencies);
}
};
}
}
const xp = F.define({
description: "Launches AR mode in native capabilities. (iOS: AR Quick Look, Android: Google Scene Viewer)",
execute: async (p, { getARSystem: g }) => g().then((o) => {
o.launch(p.uri, p.options);
})
});
G("LAUNCH_AR", xp);
const Ap = F.define({
description: "Calculates the camera position and target to view the whole scene. (experimental).",
execute: (p, { engine: g, controller: o }) => {
const m = g.scene.computeSceneBB();
return o.computeEncompassingView(m);
}
});
G(
"COMPUTE_ENCOMPASSING_VIEW",
Ap
);
const Ep = F.define({
description: "Gets the current camera position and target.",
execute: (p, { controller: g }) => ({
position: g.object.position.clone(),
target: g.target.clone()
})
});
G(
"GET_CAMERA_TRANSFORM",
Ep
);
const mp = F.define({
description: "Moves the camera to a new position and target.",
execute: async (p, { controller: g, registered: o, getAnimationSystem: m, engine: E }) => {
let B = { x: 0, y: 0, z: 0 }, K = { x: 0, y: 0, z: 0 };
if ("id" in p) {
const Y = o.get(p.id);
if (!Y)
throw new Error(
`POV with id ${p.id} not registered. Registered: ${o}`
);
if (!_o(Y))
throw new Error(
`Object with id ${p.id} is not a POV. Object: ${Y}`
);
B = Y.position, K = Y.target;
} else
B = p.position, K = p.target;
const V = await m().then(
(Y) => {
E.clock.hasTicker(Y) || E.clock.addTicker(Y), g.enabled = !0;
const sr = Y.animate(
g.object.position,
B,
p.duration,
{
easing: Y.TWEEN.Easing.Quadratic.Out
}
).play(), ve = Y.animate(g.target, K, p.duration, {
easing: Y.TWEEN.Easing.Quadratic.Out,
onUpdate: () => {
g.object.lookAt(g.target);
},
onComplete: () => {
g.enabled = !p.locked;
}
}).play();
return [
sr,
ve
];
}
);
return {
stop: () => V.forEach((Y) => Y.stop())
};
}
});
G("MOVE_CAMERA", mp);
const Sp = F.define({
description: "Sets the camera layer to a certain layer.",
execute: (p, { controller: g }) => {
g.object.setCameraLayer(p.layer);
}
});
G("SET_CAMERA_LAYER", Sp);
const bp = F.define({
description: "Sets the camera position and target.",
execute: (p, { controller: g }) => {
g.object.position.copy(p.position), g.target.copy(p.target), g.update();
}
});
G(
"SET_CAMERA_TRANSFORM",
bp
);
const Op = F.define({
description: "Zooms the camera in or out by a certain amount.",
execute: (p, { controller: g }) => {
p.direction === "IN" && g.zoomIn(p.by), p.direction === "OUT" && g.zoomOut(p.by);
}
});
G("ZOOM_CAMERA", Op);
const Tp = F.define({
description: "Generates a screenshot, stores it in a Blob and returns a Promise of a valid URI.",
execute: async (p, { registered: g, getMediaCreator: o }) => {
let m = { x: 0, y: 0, z: 0 }, E = { x: 0, y: 0, z: 0 };
if ("id" in p) {
const B = g.get(p.id);
if (!B)
throw new Error(
`Object with id ${p.id} not registered. Registered: ${g}`
);
if (!_o(B))
throw new Error(
`Object with id ${p.id} is not a POV. Object: ${B}`
);
m = B.position, E = B.target;
} else
m = p.position, E = p.target;
return o().then((B) => B.generateMedia(
m,
E,
p.width,
p.height
));
}
});
G("GENERATE_MEDIA", Tp);
const Ip = F.define({
description: "Adds an object to the scene.",
execute: (p, { engine: g, registered: o }) => {
o.get(p.id) || (p.parentId === void 0 && (p.parentId = null), o.set(p.id, p), g.scene.root.addSceneObject(p));
}
});
G("ADD_OBJECT", Ip);
var or = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, at = { exports: {} };
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var Rp = at.exports, ho;
function Cp() {
return ho || (ho = 1, function(p, g) {
(function() {
var o, m = "4.17.21", E = 200, B = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", K = "Expected a function", V = "Invalid `variable` option passed into `_.template`", Y = "__lodash_hash_undefined__", sr = 500, ve = "__lodash_placeholder__", kn = 1, Li = 2, we = 4, xe = 1, ht = 2, Rn = 1, Ae = 2, Mi = 4, Nn = 8, Ge = 16, Gn = 32, $e = 64, $n = 128, He = 256, cr = 512, xo = 30, Ao = "...", Eo = 800, mo = 16, Di = 1, So = 2, bo = 3, gt = 1 / 0, Ee = 9007199254740991, Oo = 17976931348623157e292, _t = NaN, Bn = 4294967295, To = Bn - 1, Io = Bn >>> 1, Ro = [
["ary", $n],
["bind", Rn],
["bindKey", Ae],
["curry", Nn],
["curryRight", Ge],
["flip", cr],
["partial", Gn],
["partialRight", $e],
["rearg", He]
], me = "[object Arguments]", pt = "[object Array]", Co = "[object AsyncFunction]", ze = "[object Boolean]", qe = "[object Date]", yo = "[object DOMException]", dt = "[object Error]", vt = "[object Function]", Pi = "[object GeneratorFunction]", Cn = "[object Map]", Ke = "[object Number]", Lo = "[object Null]", Hn = "[object Object]", Bi = "[object Promise]", Mo = "[object Proxy]", Ze = "[object RegExp]", yn = "[object Set]", Ye = "[object String]", wt = "[object Symbol]", Do = "[object Undefined]", Je = "[object WeakMap]", Po = "[object WeakSet]", Xe = "[object ArrayBuffer]", Se = "[object DataView]", lr = "[object Float32Array]", ar = "[object Float64Array]", hr = "[object Int8Array]", gr = "[object Int16Array]", _r = "[object Int32Array]", pr = "[object Uint8Array]", dr = "[object Uint8ClampedArray]", vr = "[object Uint16Array]", wr = "[object Uint32Array]", Bo = /\b__p \+= '';/g, Wo = /\b(__p \+=) '' \+/g, Uo = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Wi = /&(?:amp|lt|gt|quot|#39);/g, Ui = /[&<>"']/g, Fo = RegExp(Wi.source), No = RegExp(Ui.source), Go = /<%-([\s\S]+?)%>/g, $o = /<%([\s\S]+?)%>/g, Fi = /<%=([\s\S]+?)%>/g, Ho = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, zo = /^\w*$/, qo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, xr = /[\\^$.*+?()[\]{}|]/g, Ko = RegExp(xr.source), Ar = /^\s+/, Zo = /\s/, Yo = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Jo = /\{\n\/\* \[wrapped with (.+)\] \*/, Xo = /,? & /, Qo = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Vo = /[()=,{}\[\]\/\s]/, ko = /\\(\\)?/g, jo = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Ni = /\w*$/, ns = /^[-+]0x[0-9a-f]+$/i, es = /^0b[01]+$/i, ts = /^\[object .+?Constructor\]$/, rs = /^0o[0-7]+$/i, is = /^(?:0|[1-9]\d*)$/, us = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, xt = /($^)/, fs = /['\n\r\u2028\u2029\\]/g, At = "\\ud800-\\udfff", os = "\\u0300-\\u036f", ss = "\\ufe20-\\ufe2f", cs = "\\u20d0-\\u20ff", Gi = os + ss + cs, $i = "\\u2700-\\u27bf", Hi = "a-z\\xdf-\\xf6\\xf8-\\xff", ls = "\\xac\\xb1\\xd7\\xf7", as = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hs = "\\u2000-\\u206f", gs = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", zi = "A-Z\\xc0-\\xd6\\xd8-\\xde", qi = "\\ufe0e\\ufe0f", Ki = ls + as + hs + gs, Er = "['’]", _s = "[" + At + "]", Zi = "[" + Ki + "]", Et = "[" + Gi + "]", Yi = "\\d+", ps = "[" + $i + "]", Ji = "[" + Hi + "]", Xi = "[^" + At + Ki + Yi + $i + Hi + zi + "]", mr = "\\ud83c[\\udffb-\\udfff]", ds = "(?:" + Et + "|" + mr + ")", Qi = "[^" + At + "]", Sr = "(?:\\ud83c[\\udde6-\\uddff]){2}", br = "[\\ud800-\\udbff][\\udc00-\\udfff]", be = "[" + zi + "]", Vi = "\\u200d", ki = "(?:" + Ji + "|" + Xi + ")", vs = "(?:" + be + "|" + Xi + ")", ji = "(?:" + Er + "(?:d|ll|m|re|s|t|ve))?", nu = "(?:" + Er + "(?:D|LL|M|RE|S|T|VE))?", eu = ds + "?", tu = "[" + qi + "]?", ws = "(?:" + Vi + "(?:" + [Qi, Sr, br].join("|") + ")" + tu + eu + ")*", xs = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", As = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", ru = tu + eu + ws, Es = "(?:" + [ps, Sr, br].join("|") + ")" + ru, ms = "(?:" + [Qi + Et + "?", Et, Sr, br, _s].join("|") + ")", Ss = RegExp(Er, "g"), bs = RegExp(Et, "g"), Or = RegExp(mr + "(?=" + mr + ")|" + ms + ru, "g"), Os = RegExp([
be + "?" + Ji + "+" + ji + "(?=" + [Zi, be, "$"].join("|") + ")",
vs + "+" + nu + "(?=" + [Zi, be + ki, "$"].join("|") + ")",
be + "?" + ki + "+" + ji,
be + "+" + nu,
As,
xs,
Yi,
Es
].join("|"), "g"), Ts = RegExp("[" + Vi + At + Gi + qi + "]"), Is = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Rs = [
"Array",
"Buffer",
"DataView",
"Date",
"Error",
"Float32Array",
"Float64Array",
"Function",
"Int8Array",
"Int16Array",
"Int32Array",
"Map",
"Math",
"Object",
"Promise",
"RegExp",
"Set",
"String",
"Symbol",
"TypeError",
"Uint8Array",
"Uint8ClampedArray",
"Uint16Array",
"Uint32Array",
"WeakMap",
"_",
"clearTimeout",
"isFinite",
"parseInt",
"setTimeout"
], Cs = -1, z = {};
z[lr] = z[ar] = z[hr] = z[gr] = z[_r] = z[pr] = z[dr] = z[vr] = z[wr] = !0, z[me] = z[pt] = z[Xe] = z[ze] = z[Se] = z[qe] = z[dt] = z[vt] = z[Cn] = z[Ke] = z[Hn] = z[Ze] = z[yn] = z[Ye] = z[Je] = !1;
var H = {};
H[me] = H[pt] = H[Xe] = H[Se] = H[ze] = H[qe] = H[lr] = H[ar] = H[hr] = H[gr] = H[_r] = H[Cn] = H[Ke] = H[Hn] = H[Ze] = H[yn] = H[Ye] = H[wt] = H[pr] = H[dr] = H[vr] = H[wr] = !0, H[dt] = H[vt] = H[Je] = !1;
var ys = {
// Latin-1 Supplement block.
À: "A",
Á: "A",
Â: "A",
Ã: "A",
Ä: "A",
Å: "A",
à: "a",
á: "a",
â: "a",
ã: "a",
ä: "a",
å: "a",
Ç: "C",
ç: "c",
Ð: "D",
ð: "d",
È: "E",
É: "E",
Ê: "E",
Ë: "E",
è: "e",
é: "e",
ê: "e",
ë: "e",
Ì: "I",
Í: "I",
Î: "I",
Ï: "I",
ì: "i",
í: "i",
î: "i",
ï: "i",
Ñ: "N",
ñ: "n",
Ò: "O",
Ó: "O",
Ô: "O",
Õ: "O",
Ö: "O",
Ø: "O",
ò: "o",
ó: "o",
ô: "o",
õ: "o",
ö: "o",
ø: "o",
Ù: "U",
Ú: "U",
Û: "U",
Ü: "U",
ù: "u",
ú: "u",
û: "u",
ü: "u",
Ý: "Y",
ý: "y",
ÿ: "y",
Æ: "Ae",
æ: "ae",
Þ: "Th",
þ: "th",
ß: "ss",
// Latin Extended-A block.
Ā: "A",
Ă: "A",
Ą: "A",
ā: "a",
ă: "a",
ą: "a",
Ć: "C",
Ĉ: "C",
Ċ: "C",
Č: "C",
ć: "c",
ĉ: "c",
ċ: "c",
č: "c",
Ď: "D",
Đ: "D",
ď: "d",
đ: "d",
Ē: "E",
Ĕ: "E",
Ė: "E",
Ę: "E",
Ě: "E",
ē: "e",
ĕ: "e",
ė: "e",
ę: "e",
ě: "e",
Ĝ: "G",
Ğ: "G",
Ġ: "G",
Ģ: "G",
ĝ: "g",
ğ: "g",
ġ: "g",
ģ: "g",
Ĥ: "H",
Ħ: "H",
ĥ: "h",
ħ: "h",
Ĩ: "I",
Ī: "I",
Ĭ: "I",
Į: "I",
İ: "I",
ĩ: "i",
ī: "i",
ĭ: "i",
į: "i",
ı: "i",
Ĵ: "J",
ĵ: "j",
Ķ: "K",
ķ: "k",
ĸ: "k",
Ĺ: "L",
Ļ: "L",
Ľ: "L",
Ŀ: "L",
Ł: "L",
ĺ: "l",
ļ: "l",
ľ: "l",
ŀ: "l",
ł: "l",
Ń: "N",
Ņ: "N",
Ň: "N",
Ŋ: "N",
ń: "n",
ņ: "n",
ň: "n",
ŋ: "n",
Ō: "O",
Ŏ: "O",
Ő: "O",
ō: "o",
ŏ: "o",
ő: "o",
Ŕ: "R",
Ŗ: "R",
Ř: "R",
ŕ: "r",
ŗ: "r",
ř: "r",
Ś: "S",
Ŝ: "S",
Ş: "S",
Š: "S",
ś: "s",
ŝ: "s",
ş: "s",
š: "s",
Ţ: "T",
Ť: "T",
Ŧ: "T",
ţ: "t",
ť: "t",
ŧ: "t",
Ũ: "U",
Ū: "U",
Ŭ: "U",
Ů: "U",
Ű: "U",
Ų: "U",
ũ: "u",
ū: "u",
ŭ: "u",
ů: "u",
ű: "u",
ų: "u",
Ŵ: "W",
ŵ: "w",
Ŷ: "Y",
ŷ: "y",
Ÿ: "Y",
Ź: "Z",
Ż: "Z",
Ž: "Z",
ź: "z",
ż: "z",
ž: "z",
IJ: "IJ",
ij: "ij",
Œ: "Oe",
œ: "oe",
ʼn: "'n",
ſ: "s"
}, Ls = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}, Ms = {
"&": "&",
"<": "<",
">": ">",
""": '"',
"'": "'"
}, Ds = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}, Ps = parseFloat, Bs = parseInt, iu = typeof or == "object" && or && or.Object === Object && or, Ws = typeof self == "object" && self && self.Object === Object && self, en = iu || Ws || Function("return this")(), Tr = g && !g.nodeType && g, se = Tr && !0 && p && !p.nodeType && p, uu = se && se.exports === Tr, Ir = uu && iu.process, An = function() {
try {
var l = se && se.require && se.require("util").types;
return l || Ir && Ir.binding && Ir.binding("util");
} catch {
}
}(), fu = An && An.isArrayBuffer, ou = An && An.isDate, su = An && An.isMap, cu = An && An.isRegExp, lu = An && An.isSet, au = An && An.isTypedArray;
function _n(l, _, h) {
switch (h.length) {
case 0:
return l.call(_);
case 1:
return l.call(_, h[0]);
case 2:
return l.call(_, h[0], h[1]);
case 3:
return l.call(_, h[0], h[1], h[2]);
}
return l.apply(_, h);
}
function Us(l, _, h, A) {
for (var I = -1, W = l == null ? 0 : l.length; ++I < W; ) {
var k = l[I];
_(A, k, h(k), l);
}
return A;
}
function En(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A && _(l[h], h, l) !== !1; )
;
return l;
}
function Fs(l, _) {
for (var h = l == null ? 0 : l.length; h-- && _(l[h], h, l) !== !1; )
;
return l;
}
function hu(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A; )
if (!_(l[h], h, l))
return !1;
return !0;
}
function jn(l, _) {
for (var h = -1, A = l == null ? 0 : l.length, I = 0, W = []; ++h < A; ) {
var k = l[h];
_(k, h, l) && (W[I++] = k);
}
return W;
}
function mt(l, _) {
var h = l == null ? 0 : l.length;
return !!h && Oe(l, _, 0) > -1;
}
function Rr(l, _, h) {
for (var A = -1, I = l == null ? 0 : l.length; ++A < I; )
if (h(_, l[A]))
return !0;
return !1;
}
function q(l, _) {
for (var h = -1, A = l == null ? 0 : l.length, I = Array(A); ++h < A; )
I[h] = _(l[h], h, l);
return I;
}
function ne(l, _) {
for (var h = -1, A = _.length, I = l.length; ++h < A; )
l[I + h] = _[h];
return l;
}
function Cr(l, _, h, A) {
var I = -1, W = l == null ? 0 : l.length;
for (A && W && (h = l[++I]); ++I < W; )
h = _(h, l[I], I, l);
return h;
}
function Ns(l, _, h, A) {
var I = l == null ? 0 : l.length;
for (A && I && (h = l[--I]); I--; )
h = _(h, l[I], I, l);
return h;
}
function yr(l, _) {
for (var h = -1, A = l == null ? 0 : l.length; ++h < A; )
if (_(l[h], h, l))
return !0;
return !1;
}
var Gs = Lr("length");
function $s(l) {
return l.split("");
}
function Hs(l) {
return l.match(Qo) || [];
}
function gu(l, _, h) {
var A;
return h(l, function(I, W, k) {
if (_(I, W, k))
return A = W, !1;
}), A;
}
function St(l, _, h, A) {
for (var I = l.length, W = h + (A ? 1 : -1); A ? W-- : ++W < I; )
if (_(l[W], W, l))
return W;
return -1;
}
function Oe(l, _, h) {
return _ === _ ? nc(l, _, h) : St(l, _u, h);
}
function zs(l, _, h, A) {
for (var I = h - 1, W = l.length; ++I < W; )
if (A(l[I], _))
return I;
return -1;
}
function _u(l) {
return l !== l;
}
function pu(l, _) {
var h = l == null ? 0 : l.length;
return h ? Dr(l, _) / h : _t;
}
function Lr(l) {
return function(_) {
return _ == null ? o : _[l];
};
}
function Mr(l) {
return function(_) {
return l == null ? o : l[_];
};
}
function du(l, _, h, A, I) {
return I(l, function(W, k, $) {
h = A ? (A = !1, W) : _(h, W, k, $);
}), h;
}
function qs(l, _) {
var h = l.length;
for (l.sort(_); h--; )
l[h] = l[h].value;
return l;
}
function Dr(l, _) {
for (var h, A = -1, I = l.length; ++A < I; ) {
var W = _(l[A]);
W !== o && (h = h === o ? W : h + W);
}
return h;
}
function Pr(l, _) {
for (var h = -1, A = Array(l); ++h < l; )
A[h] = _(h);
return A;
}
function Ks(l, _) {
return q(_, function(h) {
return [h, l[h]];
});
}
function vu(l) {
return l && l.slice(0, Eu(l) + 1).replace(Ar, "");
}
function pn(l) {
return function(_) {
return l(_);
};
}
function Br(l, _) {
return q(_, function(h) {
return l[h];
});
}
function Qe(l, _) {
return l.has(_);
}
function wu(l, _) {
for (var h = -1, A = l.length; ++h < A && Oe(_, l[h], 0) > -1; )
;
return h;
}
function xu(l, _) {
for (var h = l.length; h-- && Oe(_, l[h], 0) > -1; )
;
return h;
}
function Zs(l, _) {
for (var h = l.length, A = 0; h--; )
l[h] === _ && ++A;
return A;
}
var Ys = Mr(ys), Js = Mr(Ls);
function Xs(l) {
return "\\" + Ds[l];
}
function Qs(l, _) {
return l == null ? o : l[_];
}
function Te(l) {
return Ts.test(l);
}
function Vs(l) {
return Is.test(l);
}
function ks(l) {
for (var _, h = []; !(_ = l.next()).done; )
h.push(_.value);
return h;
}
function Wr(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A, I) {
h[++_] = [I, A];
}), h;
}
function Au(l, _) {
return function(h) {
return l(_(h));
};
}
function ee(l, _) {
for (var h = -1, A = l.length, I = 0, W = []; ++h < A; ) {
var k = l[h];
(k === _ || k === ve) && (l[h] = ve, W[I++] = h);
}
return W;
}
function bt(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A) {
h[++_] = A;
}), h;
}
function js(l) {
var _ = -1, h = Array(l.size);
return l.forEach(function(A) {
h[++_] = [A, A];
}), h;
}
function nc(l, _, h) {
for (var A = h - 1, I = l.length; ++A < I; )
if (l[A] === _)
return A;
return -1;
}
function ec(l, _, h) {
for (var A = h + 1; A--; )
if (l[A] === _)
return A;
return A;
}
function Ie(l) {
return Te(l) ? rc(l) : Gs(l);
}
function Ln(l) {
return Te(l) ? ic(l) : $s(l);
}
function Eu(l) {
for (var _ = l.length; _-- && Zo.test(l.charAt(_)); )
;
return _;
}
var tc = Mr(Ms);
function rc(l) {
for (var _ = Or.lastIndex = 0; Or.test(l); )
++_;
return _;
}
function ic(l) {
return l.match(Or) || [];
}
function uc(l) {
return l.match(Os) || [];
}
var fc = function l(_) {
_ = _ == null ? en : Re.defaults(en.Object(), _, Re.pick(en, Rs));
var h = _.Array, A = _.Date, I = _.Error, W = _.Function, k = _.Math, $ = _.Object, Ur = _.RegExp, oc = _.String, mn = _.TypeError, Ot = h.prototype, sc = W.prototype, Ce = $.prototype, Tt = _["__core-js_shared__"], It = sc.toString, N = Ce.hasOwnProperty, cc = 0, mu = function() {
var n = /[^.]+$/.exec(Tt && Tt.keys && Tt.keys.IE_PROTO || "");
return n ? "Symbol(src)_1." + n : "";
}(), Rt = Ce.toString, lc = It.call($), ac = en._, hc = Ur(
"^" + It.call(N).replace(xr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
), Ct = uu ? _.Buffer : o, te = _.Symbol, yt = _.Uint8Array, Su = Ct ? Ct.allocUnsafe : o, Lt = Au($.getPrototypeOf, $), bu = $.create, Ou = Ce.propertyIsEnumerable, Mt = Ot.splice, Tu = te ? te.isConcatSpreadable : o, Ve = te ? te.iterator : o, ce = te ? te.toStringTag : o, Dt = function() {
try {
var n = _e($, "defineProperty");
return n({}, "", {}), n;
} catch {
}
}(), gc = _.clearTimeout !== en.clearTimeout && _.clearTimeout, _c = A && A.now !== en.Date.now && A.now, pc = _.setTimeout !== en.setTimeout && _.setTimeout, Pt = k.ceil, Bt = k.floor, Fr = $.getOwnPropertySymbols, dc = Ct ? Ct.isBuffer : o, Iu = _.isFinite, vc = Ot.join, wc = Au($.keys, $), j = k.max, rn = k.min, xc = A.now, Ac = _.parseInt, Ru = k.random, Ec = Ot.reverse, Nr = _e(_, "DataView"), ke = _e(_, "Map"), Gr = _e(_, "Promise"), ye = _e(_, "Set"), je = _e(_, "WeakMap"), nt = _e($, "create"), Wt = je && new je(), Le = {}, mc = pe(Nr), Sc = pe(ke), bc = pe(Gr), Oc = pe(ye), Tc = pe(je), Ut = te ? te.prototype : o, et = Ut ? Ut.valueOf : o, Cu = Ut ? Ut.toString : o;
function u(n) {
if (J(n) && !R(n) && !(n instanceof D)) {
if (n instanceof Sn)
return n;
if (N.call(n, "__wrapped__"))
return Lf(n);
}
return new Sn(n);
}
var Me = /* @__PURE__ */ function() {
function n() {
}
return function(e) {
if (!Z(e))
return {};
if (bu)
return bu(e);
n.prototype = e;
var t = new n();
return n.prototype = o, t;
};
}();
function Ft() {
}
function Sn(n, e) {
this.__wrapped__ = n, this.__actions__ = [], this.__chain__ = !!e, this.__index__ = 0, this.__values__ = o;
}
u.templateSettings = {
/**
* Used to detect `data` property values to be HTML-escaped.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
escape: Go,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
evaluate: $o,
/**
* Used to detect `data` property values to inject.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
interpolate: Fi,
/**
* Used to reference the data object in the template text.
*
* @memberOf _.templateSettings
* @type {string}
*/
variable: "",
/**
* Used to import variables into the compiled template.
*
* @memberOf _.templateSettings
* @type {Object}
*/
imports: {
/**
* A reference to the `lodash` function.
*
* @memberOf _.templateSettings.imports
* @type {Function}
*/
_: u
}
}, u.prototype = Ft.prototype, u.prototype.constructor = u, Sn.prototype = Me(Ft.prototype), Sn.prototype.constructor = Sn;
function D(n) {
this.__wrapped__ = n, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = Bn, this.__views__ = [];
}
function Ic() {
var n = new D(this.__wrapped__);
return n.__actions__ = ln(this.__actions__), n.__dir__ = this.__dir__, n.__filtered__ = this.__filtered__, n.__iteratees__ = ln(this.__iteratees__), n.__takeCount__ = this.__takeCount__, n.__views__ = ln(this.__views__), n;
}
function Rc() {
if (this.__filtered__) {
var n = new D(this);
n.__dir__ = -1, n.__filtered__ = !0;
} else
n = this.clone(), n.__dir__ *= -1;
return n;
}
function Cc() {
var n = this.__wrapped__.value(), e = this.__dir__, t = R(n), r = e < 0, i = t ? n.length : 0, f = $l(0, i, this.__views__), s = f.start, c = f.end, a = c - s, d = r ? c : s - 1, v = this.__iteratees__, w = v.length, x = 0, S = rn(a, this.__takeCount__);
if (!t || !r && i == a && S == a)
return ju(n, this.__actions__);
var O = [];
n:
for (; a-- && x < S; ) {
d += e;
for (var y = -1, T = n[d]; ++y < w; ) {
var M = v[y], P = M.iteratee, wn = M.type, cn = P(T);
if (wn == So)
T = cn;
else if (!cn) {
if (wn == Di)
continue n;
break n;
}
}
O[x++] = T;
}
return O;
}
D.prototype = Me(Ft.prototype), D.prototype.constructor = D;
function le(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var r = n[e];
this.set(r[0], r[1]);
}
}
function yc() {
this.__data__ = nt ? nt(null) : {}, this.size = 0;
}
function Lc(n) {
var e = this.has(n) && delete this.__data__[n];
return this.size -= e ? 1 : 0, e;
}
function Mc(n) {
var e = this.__data__;
if (nt) {
var t = e[n];
return t === Y ? o : t;
}
return N.call(e, n) ? e[n] : o;
}
function Dc(n) {
var e = this.__data__;
return nt ? e[n] !== o : N.call(e, n);
}
function Pc(n, e) {
var t = this.__data__;
return this.size += this.has(n) ? 0 : 1, t[n] = nt && e === o ? Y : e, this;
}
le.prototype.clear = yc, le.prototype.delete = Lc, le.prototype.get = Mc, le.prototype.has = Dc, le.prototype.set = Pc;
function zn(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var r = n[e];
this.set(r[0], r[1]);
}
}
function Bc() {
this.__data__ = [], this.size = 0;
}
function Wc(n) {
var e = this.__data__, t = Nt(e, n);
if (t < 0)
return !1;
var r = e.length - 1;
return t == r ? e.pop() : Mt.call(e, t, 1), --this.size, !0;
}
function Uc(n) {
var e = this.__data__, t = Nt(e, n);
return t < 0 ? o : e[t][1];
}
function Fc(n) {
return Nt(this.__data__, n) > -1;
}
function Nc(n, e) {
var t = this.__data__, r = Nt(t, n);
return r < 0 ? (++this.size, t.push([n, e])) : t[r][1] = e, this;
}
zn.prototype.clear = Bc, zn.prototype.delete = Wc, zn.prototype.get = Uc, zn.prototype.has = Fc, zn.prototype.set = Nc;
function qn(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.clear(); ++e < t; ) {
var r = n[e];
this.set(r[0], r[1]);
}
}
function Gc() {
this.size = 0, this.__data__ = {
hash: new le(),
map: new (ke || zn)(),
string: new le()
};
}
function $c(n) {
var e = Vt(this, n).delete(n);
return this.size -= e ? 1 : 0, e;
}
function Hc(n) {
return Vt(this, n).get(n);
}
function zc(n) {
return Vt(this, n).has(n);
}
function qc(n, e) {
var t = Vt(this, n), r = t.size;
return t.set(n, e), this.size += t.size == r ? 0 : 1, this;
}
qn.prototype.clear = Gc, qn.prototype.delete = $c, qn.prototype.get = Hc, qn.prototype.has = zc, qn.prototype.set = qc;
function ae(n) {
var e = -1, t = n == null ? 0 : n.length;
for (this.__data__ = new qn(); ++e < t; )
this.add(n[e]);
}
function Kc(n) {
return this.__data__.set(n, Y), this;
}
function Zc(n) {
return this.__data__.has(n);
}
ae.prototype.add = ae.prototype.push = Kc, ae.prototype.has = Zc;
function Mn(n) {
var e = this.__data__ = new zn(n);
this.size = e.size;
}
function Yc() {
this.__data__ = new zn(), this.size = 0;
}
function Jc(n) {
var e = this.__data__, t = e.delete(n);
return this.size = e.size, t;
}
function Xc(n) {
return this.__data__.get(n);
}
function Qc(n) {
return this.__data__.has(n);
}
function Vc(n, e) {
var t = this.__data__;
if (t instanceof zn) {
var r = t.__data__;
if (!ke || r.length < E - 1)
return r.push([n, e]), this.size = ++t.size, this;
t = this.__data__ = new qn(r);
}
return t.set(n, e), this.size = t.size, this;
}
Mn.prototype.clear = Yc, Mn.prototype.delete = Jc, Mn.prototype.get = Xc, Mn.prototype.has = Qc, Mn.prototype.set = Vc;
function yu(n, e) {
var t = R(n), r = !t && de(n), i = !t && !r && oe(n), f = !t && !r && !i && We(n), s = t || r || i || f, c = s ? Pr(n.length, oc) : [], a = c.length;
for (var d in n)
(e || N.call(n, d)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
(d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
i && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
f && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
Jn(d, a))) && c.push(d);
return c;
}
function Lu(n) {
var e = n.length;
return e ? n[Vr(0, e - 1)] : o;
}
function kc(n, e) {
return kt(ln(n), he(e, 0, n.length));
}
function jc(n) {
return kt(ln(n));
}
function $r(n, e, t) {
(t !== o && !Dn(n[e], t) || t === o && !(e in n)) && Kn(n, e, t);
}
function tt(n, e, t) {
var r = n[e];
(!(N.call(n, e) && Dn(r, t)) || t === o && !(e in n)) && Kn(n, e, t);
}
function Nt(n, e) {
for (var t = n.length; t--; )
if (Dn(n[t][0], e))
return t;
return -1;
}
function nl(n, e, t, r) {
return re(n, function(i, f, s) {
e(r, i, t(i), s);
}), r;
}
function Mu(n, e) {
return n && Un(e, nn(e), n);
}
function el(n, e) {
return n && Un(e, hn(e), n);
}
function Kn(n, e, t) {
e == "__proto__" && Dt ? Dt(n, e, {
configurable: !0,
enumerable: !0,
value: t,
writable: !0
}) : n[e] = t;
}
function Hr(n, e) {
for (var t = -1, r = e.length, i = h(r), f = n == null; ++t < r; )
i[t] = f ? o : mi(n, e[t]);
return i;
}
function he(n, e, t) {
return n === n && (t !== o && (n = n <= t ? n : t), e !== o && (n = n >= e ? n : e)), n;
}
function bn(n, e, t, r, i, f) {
var s, c = e & kn, a = e & Li, d = e & we;
if (t && (s = i ? t(n, r, i, f) : t(n)), s !== o)
return s;
if (!Z(n))
return n;
var v = R(n);
if (v) {
if (s = zl(n), !c)
return ln(n, s);
} else {
var w = un(n), x = w == vt || w == Pi;
if (oe(n))
return tf(n, c);
if (w == Hn || w == me || x && !i) {
if (s = a || x ? {} : mf(n), !c)
return a ? Ml(n, el(s, n)) : Ll(n, Mu(s, n));
} else {
if (!H[w])
return i ? n : {};
s = ql(n, w, c);
}
}
f || (f = new Mn());
var S = f.get(n);
if (S)
return S;
f.set(n, s), Vf(n) ? n.forEach(function(T) {
s.add(bn(T, e, t, T, n, f));
}) : Xf(n) && n.forEach(function(T, M) {
s.set(M, bn(T, e, t, M, n, f));
});
var O = d ? a ? si : oi : a ? hn : nn, y = v ? o : O(n);
return En(y || n, function(T, M) {
y && (M = T, T = n[M]), tt(s, M, bn(T, e, t, M, n, f));
}), s;
}
function tl(n) {
var e = nn(n);
return function(t) {
return Du(t, n, e);
};
}
function Du(n, e, t) {
var r = t.length;
if (n == null)
return !r;
for (n = $(n); r--; ) {
var i = t[r], f = e[i], s = n[i];
if (s === o && !(i in n) || !f(s))
return !1;
}
return !0;
}
function Pu(n, e, t) {
if (typeof n != "function")
throw new mn(K);
return ct(function() {
n.apply(o, t);
}, e);
}
function rt(n, e, t, r) {
var i = -1, f = mt, s = !0, c = n.length, a = [], d = e.length;
if (!c)
return a;
t && (e = q(e, pn(t))), r ? (f = Rr, s = !1) : e.length >= E && (f = Qe, s = !1, e = new ae(e));
n:
for (; ++i < c; ) {
var v = n[i], w = t == null ? v : t(v);
if (v = r || v !== 0 ? v : 0, s && w === w) {
for (var x = d; x--; )
if (e[x] === w)
continue n;
a.push(v);
} else f(e, w, r) || a.push(v);
}
return a;
}
var re = sf(Wn), Bu = sf(qr, !0);
function rl(n, e) {
var t = !0;
return re(n, function(r, i, f) {
return t = !!e(r, i, f), t;
}), t;
}
function Gt(n, e, t) {
for (var r = -1, i = n.length; ++r < i; ) {
var f = n[r], s = e(f);
if (s != null && (c === o ? s === s && !vn(s) : t(s, c)))
var c = s, a = f;
}
return a;
}
function il(n, e, t, r) {
var i = n.length;
for (t = C(t), t < 0 && (t = -t > i ? 0 : i + t), r = r === o || r > i ? i : C(r), r < 0 && (r += i), r = t > r ? 0 : jf(r); t < r; )
n[t++] = e;
return n;
}
function Wu(n, e) {
var t = [];
return re(n, function(r, i, f) {
e(r, i, f) && t.push(r);
}), t;
}
function tn(n, e, t, r, i) {
var f = -1, s = n.length;
for (t || (t = Zl), i || (i = []); ++f < s; ) {
var c = n[f];
e > 0 && t(c) ? e > 1 ? tn(c, e - 1, t, r, i) : ne(i, c) : r || (i[i.length] = c);
}
return i;
}
var zr = cf(), Uu = cf(!0);
function Wn(n, e) {
return n && zr(n, e, nn);
}
function qr(n, e) {
return n && Uu(n, e, nn);
}
function $t(n, e) {
return jn(e, function(t) {
return Xn(n[t]);
});
}
function ge(n, e) {
e = ue(e, n);
for (var t = 0, r = e.length; n != null && t < r; )
n = n[Fn(e[t++])];
return t && t == r ? n : o;
}
function Fu(n, e, t) {
var r = e(n);
return R(n) ? r : ne(r, t(n));
}
function on(n) {
return n == null ? n === o ? Do : Lo : ce && ce in $(n) ? Gl(n) : jl(n);
}
function Kr(n, e) {
return n > e;
}
function ul(n, e) {
return n != null && N.call(n, e);
}
function fl(n, e) {
return n != null && e in $(n);
}
function ol(n, e, t) {
return n >= rn(e, t) && n < j(e, t);
}
function Zr(n, e, t) {
for (var r = t ? Rr : mt, i = n[0].length, f = n.length, s = f, c = h(f), a = 1 / 0, d = []; s--; ) {
var v = n[s];
s && e && (v = q(v, pn(e))), a = rn(v.length, a), c[s] = !t && (e || i >= 120 && v.length >= 120) ? new ae(s && v) : o;
}
v = n[0];
var w = -1, x = c[0];
n:
for (; ++w < i && d.length < a; ) {
var S = v[w], O = e ? e(S) : S;
if (S = t || S !== 0 ? S : 0, !(x ? Qe(x, O) : r(d, O, t))) {
for (s = f; --s; ) {
var y = c[s];
if (!(y ? Qe(y, O) : r(n[s], O, t)))
continue n;
}
x && x.push(O), d.push(S);
}
}
return d;
}
function sl(n, e, t, r) {
return Wn(n, function(i, f, s) {
e(r, t(i), f, s);
}), r;
}
function it(n, e, t) {
e = ue(e, n), n = Tf(n, e);
var r = n == null ? n : n[Fn(Tn(e))];
return r == null ? o : _n(r, n, t);
}
function Nu(n) {
return J(n) && on(n) == me;
}
function cl(n) {
return J(n) && on(n) == Xe;
}
function ll(n) {
return J(n) && on(n) == qe;
}
function ut(n, e, t, r, i) {
return n === e ? !0 : n == null || e == null || !J(n) && !J(e) ? n !== n && e !== e : al(n, e, t, r, ut, i);
}
function al(n, e, t, r, i, f) {
var s = R(n), c = R(e), a = s ? pt : un(n), d = c ? pt : un(e);
a = a == me ? Hn : a, d = d == me ? Hn : d;
var v = a == Hn, w = d == Hn, x = a == d;
if (x && oe(n)) {
if (!oe(e))
return !1;
s = !0, v = !1;
}
if (x && !v)
return f || (f = new Mn()), s || We(n) ? xf(n, e, t, r, i, f) : Fl(n, e, a, t, r, i, f);
if (!(t & xe)) {
var S = v && N.call(n, "__wrapped__"), O = w && N.call(e, "__wrapped__");
if (S || O) {
var y = S ? n.value() : n, T = O ? e.value() : e;
return f || (f = new Mn()), i(y, T, t, r, f);
}
}
return x ? (f || (f = new Mn()), Nl(n, e, t, r, i, f)) : !1;
}
function hl(n) {
return J(n) && un(n) == Cn;
}
function Yr(n, e, t, r) {
var i = t.length, f = i, s = !r;
if (n == null)
return !f;
for (n = $(n); i--; ) {
var c = t[i];
if (s && c[2] ? c[1] !== n[c[0]] : !(c[0] in n))
return !1;
}
for (; ++i < f; ) {
c = t[i];
var a = c[0], d = n[a], v = c[1];
if (s && c[2]) {
if (d === o && !(a in n))
return !1;
} else {
var w = new Mn();
if (r)
var x = r(d, v, a, n, e, w);
if (!(x === o ? ut(v, d, xe | ht, r, w) : x))
return !1;
}
}
return !0;
}
function Gu(n) {
if (!Z(n) || Jl(n))
return !1;
var e = Xn(n) ? hc : ts;
return e.test(pe(n));
}
function gl(n) {
return J(n) && on(n) == Ze;
}
function _l(n) {
return J(n) && un(n) == yn;
}
function pl(n) {
return J(n) && ir(n.length) && !!z[on(n)];
}
function $u(n) {
return typeof n == "function" ? n : n == null ? gn : typeof n == "object" ? R(n) ? qu(n[0], n[1]) : zu(n) : lo(n);
}
function Jr(n) {
if (!st(n))
return wc(n);
var e = [];
for (var t in $(n))
N.call(n, t) && t != "constructor" && e.push(t);
return e;
}
function dl(n) {
if (!Z(n))
return kl(n);
var e = st(n), t = [];
for (var r in n)
r == "constructor" && (e || !N.call(n, r)) || t.push(r);
return t;
}
function Xr(n, e) {
return n < e;
}
function Hu(n, e) {
var t = -1, r = an(n) ? h(n.length) : [];
return re(n, function(i, f, s) {
r[++t] = e(i, f, s);
}), r;
}
function zu(n) {
var e = li(n);
return e.length == 1 && e[0][2] ? bf(e[0][0], e[0][1]) : function(t) {
return t === n || Yr(t, n, e);
};
}
function qu(n, e) {
return hi(n) && Sf(e) ? bf(Fn(n), e) : function(t) {
var r = mi(t, n);
return r === o && r === e ? Si(t, n) : ut(e, r, xe | ht);
};
}
function Ht(n, e, t, r, i) {
n !== e && zr(e, function(f, s) {
if (i || (i = new Mn()), Z(f))
vl(n, e, s, t, Ht, r, i);
else {
var c = r ? r(_i(n, s), f, s + "", n, e, i) : o;
c === o && (c = f), $r(n, s, c);
}
}, hn);
}
function vl(n, e, t, r, i, f, s) {
var c = _i(n, t), a = _i(e, t), d = s.get(a);
if (d) {
$r(n, t, d);
return;
}
var v = f ? f(c, a, t + "", n, e, s) : o, w = v === o;
if (w) {
var x = R(a), S = !x && oe(a), O = !x && !S && We(a);
v = a, x || S || O ? R(c) ? v = c : X(c) ? v = ln(c) : S ? (w = !1, v = tf(a, !0)) : O ? (w = !1, v = rf(a, !0)) : v = [] : lt(a) || de(a) ? (v = c, de(c) ? v = no(c) : (!Z(c) || Xn(c)) && (v = mf(a))) : w = !1;
}
w && (s.set(a, v), i(v, a, r, f, s), s.delete(a)), $r(n, t, v);
}
function Ku(n, e) {
var t = n.length;
if (t)
return e += e < 0 ? t : 0, Jn(e, t) ? n[e] : o;
}
function Zu(n, e, t) {
e.length ? e = q(e, function(f) {
return R(f) ? function(s) {
return ge(s, f.length === 1 ? f[0] : f);
} : f;
}) : e = [gn];
var r = -1;
e = q(e, pn(b()));
var i = Hu(n, function(f, s, c) {
var a = q(e, function(d) {
return d(f);
});
return { criteria: a, index: ++r, value: f };
});
return qs(i, function(f, s) {
return yl(f, s, t);
});
}
function wl(n, e) {
return Yu(n, e, function(t, r) {
return Si(n, r);
});
}
function Yu(n, e, t) {
for (var r = -1, i = e.length, f = {}; ++r < i; ) {
var s = e[r], c = ge(n, s);
t(c, s) && ft(f, ue(s, n), c);
}
return f;
}
function xl(n) {
return function(e) {
return ge(e, n);
};
}
function Qr(n, e, t, r) {
var i = r ? zs : Oe, f = -1, s = e.length, c = n;
for (n === e && (e = ln(e)), t && (c = q(n, pn(t))); ++f < s; )
for (var a = 0, d = e[f], v = t ? t(d) : d; (a = i(c, v, a, r)) > -1; )
c !== n && Mt.call(c, a, 1), Mt.call(n, a, 1);
return n;
}
function Ju(n, e) {
for (var t = n ? e.length : 0, r = t - 1; t--; ) {
var i = e[t];
if (t == r || i !== f) {
var f = i;
Jn(i) ? Mt.call(n, i, 1) : ni(n, i);
}
}
return n;
}
function Vr(n, e) {
return n + Bt(Ru() * (e - n + 1));
}
function Al(n, e, t, r) {
for (var i = -1, f = j(Pt((e - n) / (t || 1)), 0), s = h(f); f--; )
s[r ? f : ++i] = n, n += t;
return s;
}
function kr(n, e) {
var t = "";
if (!n || e < 1 || e > Ee)
return t;
do
e % 2 && (t += n), e = Bt(e / 2), e && (n += n);
while (e);
return t;
}
function L(n, e) {
return pi(Of(n, e, gn), n + "");
}
function El(n) {
return Lu(Ue(n));
}
function ml(n, e) {
var t = Ue(n);
return kt(t, he(e, 0, t.length));
}
function ft(n, e, t, r) {
if (!Z(n))
return n;
e = ue(e, n);
for (var i = -1, f = e.length, s = f - 1, c = n; c != null && ++i < f; ) {
var a = Fn(e[i]), d = t;
if (a === "__proto__" || a === "constructor" || a === "prototype")
return n;
if (i != s) {
var v = c[a];
d = r ? r(v, a, c) : o, d === o && (d = Z(v) ? v : Jn(e[i + 1]) ? [] : {});
}
tt(c, a, d), c = c[a];
}
return n;
}
var Xu = Wt ? function(n, e) {
return Wt.set(n, e), n;
} : gn, Sl = Dt ? function(n, e) {
return Dt(n, "toString", {
configurable: !0,
enumerable: !1,
value: Oi(e),
writable: !0
});
} : gn;
function bl(n) {
return kt(Ue(n));
}
function On(n, e, t) {
var r = -1, i = n.length;
e < 0 && (e = -e > i ? 0 : i + e), t = t > i ? i : t, t < 0 && (t += i), i = e > t ? 0 : t - e >>> 0, e >>>= 0;
for (var f = h(i); ++r < i; )
f[r] = n[r + e];
return f;
}
function Ol(n, e) {
var t;
return re(n, function(r, i, f) {
return t = e(r, i, f), !t;
}), !!t;
}
function zt(n, e, t) {
var r = 0, i = n == null ? r : n.length;
if (typeof e == "number" && e === e && i <= Io) {
for (; r < i; ) {
var f = r + i >>> 1, s = n[f];
s !== null && !vn(s) && (t ? s <= e : s < e) ? r = f + 1 : i = f;
}
return i;
}
return jr(n, e, gn, t);
}
function jr(n, e, t, r) {
var i = 0, f = n == null ? 0 : n.length;
if (f === 0)
return 0;
e = t(e);
for (var s = e !== e, c = e === null, a = vn(e), d = e