mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Was on the 2026-07-25 build. Carries an adversarial audit's fixes, the ones that matter most for a site that hands the widget real identities: - Origin binding is enforced INSIDE the crypto worker and derived from self.location instead of a caller-supplied field, so a page cannot read or adopt a wallet connection bound to a different site. - Phrase recovery no longer trips the rollback alarm on every later login (the mark is keyed by the everyday pubkey, which recovery preserves, while the recovered capsule restarts at generation 0) -- users who had ever rotated a password previously saw "possibly revoked credentials" forever, with no way to clear it. - quorumMet counts relays that ANSWERED rather than ones that merely accepted a socket, and relay responses are now checked against the address requested, so a single junk event can no longer block registration, rotation, and recovery. - Password rotation checks the new capsule reached quorum BEFORE publishing the tombstone that destroys the old one; a failed rotation used to be able to leave neither password working. - Derived secrets (Argon2id output, both PRKs, the BIP-39 seed) are now wiped at their derivation site, as the spec always claimed. - The worker RPC validates message shapes, times out, and rejects pending calls when the worker dies, so a torn-down worker surfaces as an error instead of a permanent hang. - Synthetic (script-dispatched) clicks no longer drive consent UI. Verified: the 10 pre-existing test failures in this suite are unchanged by this update (checked by stashing the vendor directory and re-running -- 1330 pass / 10 fail either way), and the BitLogin auth-provider tests pass. dist/ is gitignored build output and regenerates. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CMr9Yt8SYmZcfgrg3CV2G1
8270 lines
472 KiB
JavaScript
8270 lines
472 KiB
JavaScript
import { a8 as Ye } from "./bitlogin-shared-B2Rc9khL.js";
|
|
function We(we, je) {
|
|
for (var Ie = 0; Ie < je.length; Ie++) {
|
|
const Ae = je[Ie];
|
|
if (typeof Ae != "string" && !Array.isArray(Ae)) {
|
|
for (const Ce in Ae)
|
|
if (Ce !== "default" && !(Ce in we)) {
|
|
const N = Object.getOwnPropertyDescriptor(Ae, Ce);
|
|
N && Object.defineProperty(we, Ce, N.get ? N : {
|
|
enumerable: !0,
|
|
get: () => Ae[Ce]
|
|
});
|
|
}
|
|
}
|
|
}
|
|
return Object.freeze(Object.defineProperty(we, Symbol.toStringTag, { value: "Module" }));
|
|
}
|
|
var Fe = { exports: {} };
|
|
/*! For license information please see index.js.LICENSE.txt */
|
|
var Ze = Fe.exports, He;
|
|
function ze() {
|
|
return He || (He = 1, (function(we, je) {
|
|
(function(Ie, Ae) {
|
|
we.exports = Ae();
|
|
})(Ze, () => (() => {
|
|
var Ie = { 7289(N, O, E) {
|
|
var h = E(6763);
|
|
(() => {
|
|
const d = () => {
|
|
const a = new Error("not implemented");
|
|
return a.code = "ENOSYS", a;
|
|
};
|
|
if (!globalThis.fs) {
|
|
let a = "";
|
|
globalThis.fs = { constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, writeSync(i, n) {
|
|
a += f.decode(n);
|
|
const r = a.lastIndexOf(`
|
|
`);
|
|
return r != -1 && (h.log(a.substring(0, r)), a = a.substring(r + 1)), n.length;
|
|
}, write(i, n, r, e, t, c) {
|
|
r === 0 && e === n.length && t === null ? c(null, this.writeSync(i, n)) : c(d());
|
|
}, chmod(i, n, r) {
|
|
r(d());
|
|
}, chown(i, n, r, e) {
|
|
e(d());
|
|
}, close(i, n) {
|
|
n(d());
|
|
}, fchmod(i, n, r) {
|
|
r(d());
|
|
}, fchown(i, n, r, e) {
|
|
e(d());
|
|
}, fstat(i, n) {
|
|
n(d());
|
|
}, fsync(i, n) {
|
|
n(null);
|
|
}, ftruncate(i, n, r) {
|
|
r(d());
|
|
}, lchown(i, n, r, e) {
|
|
e(d());
|
|
}, link(i, n, r) {
|
|
r(d());
|
|
}, lstat(i, n) {
|
|
n(d());
|
|
}, mkdir(i, n, r) {
|
|
r(d());
|
|
}, open(i, n, r, e) {
|
|
e(d());
|
|
}, read(i, n, r, e, t, c) {
|
|
c(d());
|
|
}, readdir(i, n) {
|
|
n(d());
|
|
}, readlink(i, n) {
|
|
n(d());
|
|
}, rename(i, n, r) {
|
|
r(d());
|
|
}, rmdir(i, n) {
|
|
n(d());
|
|
}, stat(i, n) {
|
|
n(d());
|
|
}, symlink(i, n, r) {
|
|
r(d());
|
|
}, truncate(i, n, r) {
|
|
r(d());
|
|
}, unlink(i, n) {
|
|
n(d());
|
|
}, utimes(i, n, r, e) {
|
|
e(d());
|
|
} };
|
|
}
|
|
if (globalThis.process || (globalThis.process = { getuid: () => -1, getgid: () => -1, geteuid: () => -1, getegid: () => -1, getgroups() {
|
|
throw d();
|
|
}, pid: -1, ppid: -1, umask() {
|
|
throw d();
|
|
}, cwd() {
|
|
throw d();
|
|
}, chdir() {
|
|
throw d();
|
|
} }), !globalThis.crypto) throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
|
|
if (!globalThis.performance) throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");
|
|
if (!globalThis.TextEncoder) throw new Error("globalThis.TextEncoder is not available, polyfill required");
|
|
if (!globalThis.TextDecoder) throw new Error("globalThis.TextDecoder is not available, polyfill required");
|
|
const o = new TextEncoder("utf-8"), f = new TextDecoder("utf-8");
|
|
globalThis.Go = class {
|
|
constructor() {
|
|
this.argv = ["js"], this.env = {}, this.exit = (u) => {
|
|
u !== 0 && h.warn("exit code:", u);
|
|
}, this._exitPromise = new Promise((u) => {
|
|
this._resolveExitPromise = u;
|
|
}), this._pendingEvent = null, this._scheduledTimeouts = /* @__PURE__ */ new Map(), this._nextCallbackTimeoutID = 1;
|
|
const a = (u, p) => {
|
|
this.mem.setUint32(u + 0, p, !0), this.mem.setUint32(u + 4, Math.floor(p / 4294967296), !0);
|
|
}, i = (u) => this.mem.getUint32(u + 0, !0) + 4294967296 * this.mem.getInt32(u + 4, !0), n = (u) => {
|
|
const p = this.mem.getFloat64(u, !0);
|
|
if (p === 0) return;
|
|
if (!isNaN(p)) return p;
|
|
const l = this.mem.getUint32(u, !0);
|
|
return this._values[l];
|
|
}, r = (u, p) => {
|
|
if (typeof p == "number" && p !== 0) return isNaN(p) ? (this.mem.setUint32(u + 4, 2146959360, !0), void this.mem.setUint32(u, 0, !0)) : void this.mem.setFloat64(u, p, !0);
|
|
if (p === void 0) return void this.mem.setFloat64(u, 0, !0);
|
|
let v = this._ids.get(p);
|
|
v === void 0 && (v = this._idPool.pop(), v === void 0 && (v = this._values.length), this._values[v] = p, this._goRefCounts[v] = 0, this._ids.set(p, v)), this._goRefCounts[v]++;
|
|
let y = 0;
|
|
switch (typeof p) {
|
|
case "object":
|
|
p !== null && (y = 1);
|
|
break;
|
|
case "string":
|
|
y = 2;
|
|
break;
|
|
case "symbol":
|
|
y = 3;
|
|
break;
|
|
case "function":
|
|
y = 4;
|
|
}
|
|
this.mem.setUint32(u + 4, 2146959360 | y, !0), this.mem.setUint32(u, v, !0);
|
|
}, e = (u) => {
|
|
const p = i(u + 0), l = i(u + 8);
|
|
return new Uint8Array(this._inst.exports.mem.buffer, p, l);
|
|
}, t = (u) => {
|
|
const p = i(u + 0), l = i(u + 8), v = new Array(l);
|
|
for (let y = 0; y < l; y++) v[y] = n(p + 8 * y);
|
|
return v;
|
|
}, c = (u) => {
|
|
const p = i(u + 0), l = i(u + 8);
|
|
return f.decode(new DataView(this._inst.exports.mem.buffer, p, l));
|
|
}, s = Date.now() - performance.now();
|
|
this.importObject = { _gotest: { add: (u, p) => u + p }, gojs: { "runtime.wasmExit": (u) => {
|
|
u >>>= 0;
|
|
const p = this.mem.getInt32(u + 8, !0);
|
|
this.exited = !0, delete this._inst, delete this._values, delete this._goRefCounts, delete this._ids, delete this._idPool, this.exit(p);
|
|
}, "runtime.wasmWrite": (u) => {
|
|
const p = i((u >>>= 0) + 8), l = i(u + 16), v = this.mem.getInt32(u + 24, !0);
|
|
fs.writeSync(p, new Uint8Array(this._inst.exports.mem.buffer, l, v));
|
|
}, "runtime.resetMemoryDataView": (u) => {
|
|
this.mem = new DataView(this._inst.exports.mem.buffer);
|
|
}, "runtime.nanotime1": (u) => {
|
|
a((u >>>= 0) + 8, 1e6 * (s + performance.now()));
|
|
}, "runtime.walltime": (u) => {
|
|
u >>>= 0;
|
|
const p = (/* @__PURE__ */ new Date()).getTime();
|
|
a(u + 8, p / 1e3), this.mem.setInt32(u + 16, p % 1e3 * 1e6, !0);
|
|
}, "runtime.scheduleTimeoutEvent": (u) => {
|
|
u >>>= 0;
|
|
const p = this._nextCallbackTimeoutID;
|
|
this._nextCallbackTimeoutID++, this._scheduledTimeouts.set(p, setTimeout(() => {
|
|
for (this._resume(); this._scheduledTimeouts.has(p); ) h.warn("scheduleTimeoutEvent: missed timeout event"), this._resume();
|
|
}, i(u + 8))), this.mem.setInt32(u + 16, p, !0);
|
|
}, "runtime.clearTimeoutEvent": (u) => {
|
|
u >>>= 0;
|
|
const p = this.mem.getInt32(u + 8, !0);
|
|
clearTimeout(this._scheduledTimeouts.get(p)), this._scheduledTimeouts.delete(p);
|
|
}, "runtime.getRandomData": (u) => {
|
|
u >>>= 0, crypto.getRandomValues(e(u + 8));
|
|
}, "syscall/js.finalizeRef": (u) => {
|
|
u >>>= 0;
|
|
const p = this.mem.getUint32(u + 8, !0);
|
|
if (this._goRefCounts[p]--, this._goRefCounts[p] === 0) {
|
|
const l = this._values[p];
|
|
this._values[p] = null, this._ids.delete(l), this._idPool.push(p);
|
|
}
|
|
}, "syscall/js.stringVal": (u) => {
|
|
r((u >>>= 0) + 24, c(u + 8));
|
|
}, "syscall/js.valueGet": (u) => {
|
|
u >>>= 0;
|
|
const p = Reflect.get(n(u + 8), c(u + 16));
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 32, p);
|
|
}, "syscall/js.valueSet": (u) => {
|
|
u >>>= 0, Reflect.set(n(u + 8), c(u + 16), n(u + 32));
|
|
}, "syscall/js.valueDelete": (u) => {
|
|
u >>>= 0, Reflect.deleteProperty(n(u + 8), c(u + 16));
|
|
}, "syscall/js.valueIndex": (u) => {
|
|
r((u >>>= 0) + 24, Reflect.get(n(u + 8), i(u + 16)));
|
|
}, "syscall/js.valueSetIndex": (u) => {
|
|
u >>>= 0, Reflect.set(n(u + 8), i(u + 16), n(u + 24));
|
|
}, "syscall/js.valueCall": (u) => {
|
|
u >>>= 0;
|
|
try {
|
|
const p = n(u + 8), l = Reflect.get(p, c(u + 16)), v = t(u + 32), y = Reflect.apply(l, p, v);
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 56, y), this.mem.setUint8(u + 64, 1);
|
|
} catch (p) {
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 56, p), this.mem.setUint8(u + 64, 0);
|
|
}
|
|
}, "syscall/js.valueInvoke": (u) => {
|
|
u >>>= 0;
|
|
try {
|
|
const p = n(u + 8), l = t(u + 16), v = Reflect.apply(p, void 0, l);
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 40, v), this.mem.setUint8(u + 48, 1);
|
|
} catch (p) {
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 40, p), this.mem.setUint8(u + 48, 0);
|
|
}
|
|
}, "syscall/js.valueNew": (u) => {
|
|
u >>>= 0;
|
|
try {
|
|
const p = n(u + 8), l = t(u + 16), v = Reflect.construct(p, l);
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 40, v), this.mem.setUint8(u + 48, 1);
|
|
} catch (p) {
|
|
u = this._inst.exports.getsp() >>> 0, r(u + 40, p), this.mem.setUint8(u + 48, 0);
|
|
}
|
|
}, "syscall/js.valueLength": (u) => {
|
|
a((u >>>= 0) + 16, parseInt(n(u + 8).length));
|
|
}, "syscall/js.valuePrepareString": (u) => {
|
|
u >>>= 0;
|
|
const p = o.encode(String(n(u + 8)));
|
|
r(u + 16, p), a(u + 24, p.length);
|
|
}, "syscall/js.valueLoadString": (u) => {
|
|
const p = n((u >>>= 0) + 8);
|
|
e(u + 16).set(p);
|
|
}, "syscall/js.valueInstanceOf": (u) => {
|
|
u >>>= 0, this.mem.setUint8(u + 24, n(u + 8) instanceof n(u + 16) ? 1 : 0);
|
|
}, "syscall/js.copyBytesToGo": (u) => {
|
|
const p = e((u >>>= 0) + 8), l = n(u + 32);
|
|
if (!(l instanceof Uint8Array || l instanceof Uint8ClampedArray)) return void this.mem.setUint8(u + 48, 0);
|
|
const v = l.subarray(0, p.length);
|
|
p.set(v), a(u + 40, v.length), this.mem.setUint8(u + 48, 1);
|
|
}, "syscall/js.copyBytesToJS": (u) => {
|
|
const p = n((u >>>= 0) + 8), l = e(u + 16);
|
|
if (!(p instanceof Uint8Array || p instanceof Uint8ClampedArray)) return void this.mem.setUint8(u + 48, 0);
|
|
const v = l.subarray(0, p.length);
|
|
p.set(v), a(u + 40, v.length), this.mem.setUint8(u + 48, 1);
|
|
}, debug: (u) => {
|
|
h.log(u);
|
|
} } };
|
|
}
|
|
async run(a) {
|
|
if (!(a instanceof WebAssembly.Instance)) throw new Error("Go.run: WebAssembly.Instance expected");
|
|
this._inst = a, this.mem = new DataView(this._inst.exports.mem.buffer), this._values = [NaN, 0, null, !0, !1, globalThis, this], this._goRefCounts = new Array(this._values.length).fill(1 / 0), this._ids = /* @__PURE__ */ new Map([[0, 1], [null, 2], [!0, 3], [!1, 4], [globalThis, 5], [this, 6]]), this._idPool = [], this.exited = !1;
|
|
let i = 4096;
|
|
const n = (c) => {
|
|
const s = i, u = o.encode(c + "\0");
|
|
return new Uint8Array(this.mem.buffer, i, u.length).set(u), i += u.length, i % 8 != 0 && (i += 8 - i % 8), s;
|
|
}, r = this.argv.length, e = [];
|
|
this.argv.forEach((c) => {
|
|
e.push(n(c));
|
|
}), e.push(0), Object.keys(this.env).sort().forEach((c) => {
|
|
e.push(n(`${c}=${this.env[c]}`));
|
|
}), e.push(0);
|
|
const t = i;
|
|
if (e.forEach((c) => {
|
|
this.mem.setUint32(i, c, !0), this.mem.setUint32(i + 4, 0, !0), i += 8;
|
|
}), i >= 12288) throw new Error("total length of command line and environment variables exceeds limit");
|
|
this._inst.exports.run(r, t), this.exited && this._resolveExitPromise(), await this._exitPromise;
|
|
}
|
|
_resume() {
|
|
if (this.exited) throw new Error("Go program has already exited");
|
|
this._inst.exports.resume(), this.exited && this._resolveExitPromise();
|
|
}
|
|
_makeFuncWrapper(a) {
|
|
const i = this;
|
|
return function() {
|
|
const n = { id: a, this: this, args: arguments };
|
|
return i._pendingEvent = n, i._resume(), n.result;
|
|
};
|
|
}
|
|
};
|
|
})();
|
|
}, 3318(N) {
|
|
var O;
|
|
O = () => (() => {
|
|
var E = { 5804(d, o, f) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
var a = f(2495);
|
|
o.default = function(i, n) {
|
|
this.faradayServer = i(a.serviceNames.frdrpc.FaradayServer, n);
|
|
};
|
|
}, 3586(d, o, f) {
|
|
var a = this && this.__importDefault || function(s) {
|
|
return s && s.__esModule ? s : { default: s };
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.LitApi = o.TaprootAssetsApi = o.FaradayApi = o.PoolApi = o.LoopApi = o.LndApi = void 0;
|
|
var i = f(728);
|
|
Object.defineProperty(o, "LndApi", { enumerable: !0, get: function() {
|
|
return a(i).default;
|
|
} });
|
|
var n = f(3762);
|
|
Object.defineProperty(o, "LoopApi", { enumerable: !0, get: function() {
|
|
return a(n).default;
|
|
} });
|
|
var r = f(7082);
|
|
Object.defineProperty(o, "PoolApi", { enumerable: !0, get: function() {
|
|
return a(r).default;
|
|
} });
|
|
var e = f(5804);
|
|
Object.defineProperty(o, "FaradayApi", { enumerable: !0, get: function() {
|
|
return a(e).default;
|
|
} });
|
|
var t = f(9147);
|
|
Object.defineProperty(o, "TaprootAssetsApi", { enumerable: !0, get: function() {
|
|
return a(t).default;
|
|
} });
|
|
var c = f(2191);
|
|
Object.defineProperty(o, "LitApi", { enumerable: !0, get: function() {
|
|
return a(c).default;
|
|
} });
|
|
}, 2191(d, o, f) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
var a = f(2495);
|
|
o.default = function(i, n) {
|
|
this.autopilot = i(a.serviceNames.litrpc.Autopilot, n), this.firewall = i(a.serviceNames.litrpc.Firewall, n), this.sessions = i(a.serviceNames.litrpc.Sessions, n), this.status = i(a.serviceNames.litrpc.Status, n);
|
|
};
|
|
}, 728(d, o, f) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
var a = f(2495);
|
|
o.default = function(i, n) {
|
|
this.autopilot = i(a.serviceNames.autopilotrpc.Autopilot, n), this.chainNotifier = i(a.serviceNames.chainrpc.ChainNotifier, n), this.invoices = i(a.serviceNames.invoicesrpc.Invoices, n), this.lightning = i(a.serviceNames.lnrpc.Lightning, n), this.router = i(a.serviceNames.routerrpc.Router, n), this.signer = i(a.serviceNames.signrpc.Signer, n), this.walletKit = i(a.serviceNames.walletrpc.WalletKit, n), this.walletUnlocker = i(a.serviceNames.lnrpc.WalletUnlocker, n), this.watchtower = i(a.serviceNames.watchtowerrpc.Watchtower, n), this.watchtowerClient = i(a.serviceNames.wtclientrpc.WatchtowerClient, n);
|
|
};
|
|
}, 3762(d, o, f) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
var a = f(2495);
|
|
o.default = function(i, n) {
|
|
this.swapClient = i(a.serviceNames.looprpc.SwapClient, n), this.debug = i(a.serviceNames.looprpc.Debug, n);
|
|
};
|
|
}, 7082(d, o, f) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
var a = f(2495);
|
|
o.default = function(i, n) {
|
|
this.trader = i(a.serviceNames.poolrpc.Trader, n), this.channelAuctioneer = i(a.serviceNames.poolrpc.ChannelAuctioneer, n), this.hashmail = i(a.serviceNames.poolrpc.HashMail, n);
|
|
};
|
|
}, 9147(d, o, f) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
var a = f(2495);
|
|
o.default = function(i, n) {
|
|
this.taprootAssets = i(a.serviceNames.taprpc.TaprootAssets, n), this.assetWallet = i(a.serviceNames.assetwalletrpc.AssetWallet, n), this.mint = i(a.serviceNames.mintrpc.Mint, n), this.priceOracle = i(a.serviceNames.priceoraclerpc.PriceOracle, n), this.rfq = i(a.serviceNames.rfqrpc.Rfq, n), this.tapChannels = i(a.serviceNames.tapchannelrpc.TaprootAssetChannels, n), this.tapDev = i(a.serviceNames.tapdevrpc.TapDev, n), this.universe = i(a.serviceNames.universerpc.Universe, n);
|
|
};
|
|
}, 4245(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(t, c, s, u) {
|
|
u === void 0 && (u = s), Object.defineProperty(t, u, { enumerable: !0, get: function() {
|
|
return c[s];
|
|
} });
|
|
} : function(t, c, s, u) {
|
|
u === void 0 && (u = s), t[u] = c[s];
|
|
}), i = this && this.__exportStar || function(t, c) {
|
|
for (var s in t) s === "default" || Object.prototype.hasOwnProperty.call(c, s) || a(c, t, s);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.subscriptionMethods = o.TaprootAssetsApi = o.LitApi = o.FaradayApi = o.PoolApi = o.LoopApi = o.LndApi = o.snakeKeysToCamel = o.isObject = o.camelKeysToSnake = void 0, i(f(4578), o);
|
|
var n = f(1022);
|
|
Object.defineProperty(o, "camelKeysToSnake", { enumerable: !0, get: function() {
|
|
return n.camelKeysToSnake;
|
|
} }), Object.defineProperty(o, "isObject", { enumerable: !0, get: function() {
|
|
return n.isObject;
|
|
} }), Object.defineProperty(o, "snakeKeysToCamel", { enumerable: !0, get: function() {
|
|
return n.snakeKeysToCamel;
|
|
} });
|
|
var r = f(3586);
|
|
Object.defineProperty(o, "LndApi", { enumerable: !0, get: function() {
|
|
return r.LndApi;
|
|
} }), Object.defineProperty(o, "LoopApi", { enumerable: !0, get: function() {
|
|
return r.LoopApi;
|
|
} }), Object.defineProperty(o, "PoolApi", { enumerable: !0, get: function() {
|
|
return r.PoolApi;
|
|
} }), Object.defineProperty(o, "FaradayApi", { enumerable: !0, get: function() {
|
|
return r.FaradayApi;
|
|
} }), Object.defineProperty(o, "LitApi", { enumerable: !0, get: function() {
|
|
return r.LitApi;
|
|
} }), Object.defineProperty(o, "TaprootAssetsApi", { enumerable: !0, get: function() {
|
|
return r.TaprootAssetsApi;
|
|
} });
|
|
var e = f(2495);
|
|
Object.defineProperty(o, "subscriptionMethods", { enumerable: !0, get: function() {
|
|
return e.subscriptionMethods;
|
|
} });
|
|
}, 9444(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(5712), o);
|
|
}, 1241(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(4376), o);
|
|
}, 9926(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(2277), o);
|
|
}, 6636(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(8647), o);
|
|
}, 8925(d, o) {
|
|
var f, a, i, n;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.CloseRecommendationRequest_Metric = o.EntryType = o.FiatBackend = o.Granularity = void 0, (n = o.Granularity || (o.Granularity = {})).UNKNOWN_GRANULARITY = "UNKNOWN_GRANULARITY", n.MINUTE = "MINUTE", n.FIVE_MINUTES = "FIVE_MINUTES", n.FIFTEEN_MINUTES = "FIFTEEN_MINUTES", n.THIRTY_MINUTES = "THIRTY_MINUTES", n.HOUR = "HOUR", n.SIX_HOURS = "SIX_HOURS", n.TWELVE_HOURS = "TWELVE_HOURS", n.DAY = "DAY", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.FiatBackend || (o.FiatBackend = {})).UNKNOWN_FIATBACKEND = "UNKNOWN_FIATBACKEND", i.COINCAP = "COINCAP", i.COINDESK = "COINDESK", i.CUSTOM = "CUSTOM", i.COINGECKO = "COINGECKO", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.EntryType || (o.EntryType = {})).UNKNOWN = "UNKNOWN", a.LOCAL_CHANNEL_OPEN = "LOCAL_CHANNEL_OPEN", a.REMOTE_CHANNEL_OPEN = "REMOTE_CHANNEL_OPEN", a.CHANNEL_OPEN_FEE = "CHANNEL_OPEN_FEE", a.CHANNEL_CLOSE = "CHANNEL_CLOSE", a.RECEIPT = "RECEIPT", a.PAYMENT = "PAYMENT", a.FEE = "FEE", a.CIRCULAR_RECEIPT = "CIRCULAR_RECEIPT", a.FORWARD = "FORWARD", a.FORWARD_FEE = "FORWARD_FEE", a.CIRCULAR_PAYMENT = "CIRCULAR_PAYMENT", a.CIRCULAR_FEE = "CIRCULAR_FEE", a.SWEEP = "SWEEP", a.SWEEP_FEE = "SWEEP_FEE", a.CHANNEL_CLOSE_FEE = "CHANNEL_CLOSE_FEE", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.CloseRecommendationRequest_Metric || (o.CloseRecommendationRequest_Metric = {})).UNKNOWN = "UNKNOWN", f.UPTIME = "UPTIME", f.REVENUE = "REVENUE", f.INCOMING_VOLUME = "INCOMING_VOLUME", f.OUTGOING_VOLUME = "OUTGOING_VOLUME", f.TOTAL_VOLUME = "TOTAL_VOLUME", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 8507(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(8925), o);
|
|
}, 4578(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(S, M, j, H) {
|
|
H === void 0 && (H = j), Object.defineProperty(S, H, { enumerable: !0, get: function() {
|
|
return M[j];
|
|
} });
|
|
} : function(S, M, j, H) {
|
|
H === void 0 && (H = j), S[H] = M[j];
|
|
}), i = this && this.__setModuleDefault || (Object.create ? function(S, M) {
|
|
Object.defineProperty(S, "default", { enumerable: !0, value: M });
|
|
} : function(S, M) {
|
|
S.default = M;
|
|
}), n = this && this.__importStar || function(S) {
|
|
if (S && S.__esModule) return S;
|
|
var M = {};
|
|
if (S != null) for (var j in S) j !== "default" && Object.prototype.hasOwnProperty.call(S, j) && a(M, S, j);
|
|
return i(M, S), M;
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.universerpc = o.taprpc = o.tapdevrpc = o.tapchannelrpc = o.rfqrpc = o.priceoraclerpc = o.mintrpc = o.authmailboxrpc = o.assetwalletrpc = o.poolrpc = o.looprpc = o.wtclientrpc = o.watchtowerrpc = o.walletrpc = o.signrpc = o.routerrpc = o.peersrpc = o.lnrpc = o.invoicesrpc = o.chainrpc = o.autopilotrpc = o.litrpc = o.frdrpc = void 0;
|
|
var r = n(f(8507));
|
|
o.frdrpc = r;
|
|
var e = n(f(2844));
|
|
o.litrpc = e;
|
|
var t = n(f(9926));
|
|
o.autopilotrpc = t;
|
|
var c = n(f(6636));
|
|
o.chainrpc = c;
|
|
var s = n(f(8561));
|
|
o.invoicesrpc = s;
|
|
var u = n(f(1419));
|
|
o.lnrpc = u;
|
|
var p = n(f(1908));
|
|
o.peersrpc = p;
|
|
var l = n(f(6534));
|
|
o.routerrpc = l;
|
|
var v = n(f(8054));
|
|
o.signrpc = v;
|
|
var y = n(f(718));
|
|
o.walletrpc = y;
|
|
var g = n(f(5109));
|
|
o.watchtowerrpc = g;
|
|
var _ = n(f(7685));
|
|
o.wtclientrpc = _;
|
|
var T = n(f(7967));
|
|
o.looprpc = T;
|
|
var b = n(f(2471));
|
|
o.poolrpc = b;
|
|
var A = n(f(9444));
|
|
o.assetwalletrpc = A;
|
|
var m = n(f(1241));
|
|
o.authmailboxrpc = m;
|
|
var I = n(f(1393));
|
|
o.mintrpc = I;
|
|
var P = n(f(2162));
|
|
o.priceoraclerpc = P;
|
|
var x = n(f(4386));
|
|
o.rfqrpc = x;
|
|
var F = n(f(8933));
|
|
o.tapchannelrpc = F;
|
|
var K = n(f(8753));
|
|
o.tapdevrpc = K;
|
|
var Y = n(f(5600));
|
|
o.taprpc = Y;
|
|
var Q = n(f(7164));
|
|
o.universerpc = Q;
|
|
}, 8561(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(4195), o);
|
|
}, 8650(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.ActionState = void 0, (f = o.ActionState || (o.ActionState = {})).STATE_UNKNOWN = "STATE_UNKNOWN", f.STATE_PENDING = "STATE_PENDING", f.STATE_DONE = "STATE_DONE", f.STATE_ERROR = "STATE_ERROR", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 5547(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 1199(d, o) {
|
|
var f, a;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.SessionState = o.SessionType = void 0, (a = o.SessionType || (o.SessionType = {})).TYPE_MACAROON_READONLY = "TYPE_MACAROON_READONLY", a.TYPE_MACAROON_ADMIN = "TYPE_MACAROON_ADMIN", a.TYPE_MACAROON_CUSTOM = "TYPE_MACAROON_CUSTOM", a.TYPE_UI_PASSWORD = "TYPE_UI_PASSWORD", a.TYPE_AUTOPILOT = "TYPE_AUTOPILOT", a.TYPE_MACAROON_ACCOUNT = "TYPE_MACAROON_ACCOUNT", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.SessionState || (o.SessionState = {})).STATE_CREATED = "STATE_CREATED", f.STATE_IN_USE = "STATE_IN_USE", f.STATE_REVOKED = "STATE_REVOKED", f.STATE_EXPIRED = "STATE_EXPIRED", f.STATE_RESERVED = "STATE_RESERVED", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 6440(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 2844(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(8650), o), i(f(5547), o), i(f(1199), o), i(f(6440), o);
|
|
}, 2277(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 8647(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 4195(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.LookupModifier = void 0, (f = o.LookupModifier || (o.LookupModifier = {})).DEFAULT = "DEFAULT", f.HTLC_SET_ONLY = "HTLC_SET_ONLY", f.HTLC_SET_BLANK = "HTLC_SET_BLANK", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 4377(d, o) {
|
|
var f, a, i, n, r, e, t, c, s, u, p, l, v, y, g, _, T, b, A, m, I;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.Failure_FailureCode = o.HTLCAttempt_HTLCStatus = o.Payment_PaymentStatus = o.Invoice_InvoiceState = o.ChannelEventUpdate_UpdateType = o.PendingChannelsResponse_ForceClosedChannel_AnchorState = o.PeerEvent_EventType = o.Peer_SyncType = o.ChannelCloseSummary_ClosureType = o.UpdateFailure = o.FeatureBit = o.PaymentFailureReason = o.InvoiceHTLCState = o.NodeMetricType = o.ResolutionOutcome = o.ResolutionType = o.Initiator = o.CommitmentType = o.AddressType = o.CoinSelectionStrategy = o.OutputScriptType = void 0, (I = o.OutputScriptType || (o.OutputScriptType = {})).SCRIPT_TYPE_PUBKEY_HASH = "SCRIPT_TYPE_PUBKEY_HASH", I.SCRIPT_TYPE_SCRIPT_HASH = "SCRIPT_TYPE_SCRIPT_HASH", I.SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH = "SCRIPT_TYPE_WITNESS_V0_PUBKEY_HASH", I.SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH = "SCRIPT_TYPE_WITNESS_V0_SCRIPT_HASH", I.SCRIPT_TYPE_PUBKEY = "SCRIPT_TYPE_PUBKEY", I.SCRIPT_TYPE_MULTISIG = "SCRIPT_TYPE_MULTISIG", I.SCRIPT_TYPE_NULLDATA = "SCRIPT_TYPE_NULLDATA", I.SCRIPT_TYPE_NON_STANDARD = "SCRIPT_TYPE_NON_STANDARD", I.SCRIPT_TYPE_WITNESS_UNKNOWN = "SCRIPT_TYPE_WITNESS_UNKNOWN", I.SCRIPT_TYPE_WITNESS_V1_TAPROOT = "SCRIPT_TYPE_WITNESS_V1_TAPROOT", I.UNRECOGNIZED = "UNRECOGNIZED", (m = o.CoinSelectionStrategy || (o.CoinSelectionStrategy = {})).STRATEGY_USE_GLOBAL_CONFIG = "STRATEGY_USE_GLOBAL_CONFIG", m.STRATEGY_LARGEST = "STRATEGY_LARGEST", m.STRATEGY_RANDOM = "STRATEGY_RANDOM", m.UNRECOGNIZED = "UNRECOGNIZED", (A = o.AddressType || (o.AddressType = {})).WITNESS_PUBKEY_HASH = "WITNESS_PUBKEY_HASH", A.NESTED_PUBKEY_HASH = "NESTED_PUBKEY_HASH", A.UNUSED_WITNESS_PUBKEY_HASH = "UNUSED_WITNESS_PUBKEY_HASH", A.UNUSED_NESTED_PUBKEY_HASH = "UNUSED_NESTED_PUBKEY_HASH", A.TAPROOT_PUBKEY = "TAPROOT_PUBKEY", A.UNUSED_TAPROOT_PUBKEY = "UNUSED_TAPROOT_PUBKEY", A.UNRECOGNIZED = "UNRECOGNIZED", (b = o.CommitmentType || (o.CommitmentType = {})).UNKNOWN_COMMITMENT_TYPE = "UNKNOWN_COMMITMENT_TYPE", b.LEGACY = "LEGACY", b.STATIC_REMOTE_KEY = "STATIC_REMOTE_KEY", b.ANCHORS = "ANCHORS", b.SCRIPT_ENFORCED_LEASE = "SCRIPT_ENFORCED_LEASE", b.SIMPLE_TAPROOT = "SIMPLE_TAPROOT", b.SIMPLE_TAPROOT_OVERLAY = "SIMPLE_TAPROOT_OVERLAY", b.UNRECOGNIZED = "UNRECOGNIZED", (T = o.Initiator || (o.Initiator = {})).INITIATOR_UNKNOWN = "INITIATOR_UNKNOWN", T.INITIATOR_LOCAL = "INITIATOR_LOCAL", T.INITIATOR_REMOTE = "INITIATOR_REMOTE", T.INITIATOR_BOTH = "INITIATOR_BOTH", T.UNRECOGNIZED = "UNRECOGNIZED", (_ = o.ResolutionType || (o.ResolutionType = {})).TYPE_UNKNOWN = "TYPE_UNKNOWN", _.ANCHOR = "ANCHOR", _.INCOMING_HTLC = "INCOMING_HTLC", _.OUTGOING_HTLC = "OUTGOING_HTLC", _.COMMIT = "COMMIT", _.UNRECOGNIZED = "UNRECOGNIZED", (g = o.ResolutionOutcome || (o.ResolutionOutcome = {})).OUTCOME_UNKNOWN = "OUTCOME_UNKNOWN", g.CLAIMED = "CLAIMED", g.UNCLAIMED = "UNCLAIMED", g.ABANDONED = "ABANDONED", g.FIRST_STAGE = "FIRST_STAGE", g.TIMEOUT = "TIMEOUT", g.UNRECOGNIZED = "UNRECOGNIZED", (y = o.NodeMetricType || (o.NodeMetricType = {})).UNKNOWN = "UNKNOWN", y.BETWEENNESS_CENTRALITY = "BETWEENNESS_CENTRALITY", y.UNRECOGNIZED = "UNRECOGNIZED", (v = o.InvoiceHTLCState || (o.InvoiceHTLCState = {})).ACCEPTED = "ACCEPTED", v.SETTLED = "SETTLED", v.CANCELED = "CANCELED", v.UNRECOGNIZED = "UNRECOGNIZED", (l = o.PaymentFailureReason || (o.PaymentFailureReason = {})).FAILURE_REASON_NONE = "FAILURE_REASON_NONE", l.FAILURE_REASON_TIMEOUT = "FAILURE_REASON_TIMEOUT", l.FAILURE_REASON_NO_ROUTE = "FAILURE_REASON_NO_ROUTE", l.FAILURE_REASON_ERROR = "FAILURE_REASON_ERROR", l.FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = "FAILURE_REASON_INCORRECT_PAYMENT_DETAILS", l.FAILURE_REASON_INSUFFICIENT_BALANCE = "FAILURE_REASON_INSUFFICIENT_BALANCE", l.FAILURE_REASON_CANCELED = "FAILURE_REASON_CANCELED", l.UNRECOGNIZED = "UNRECOGNIZED", (p = o.FeatureBit || (o.FeatureBit = {})).DATALOSS_PROTECT_REQ = "DATALOSS_PROTECT_REQ", p.DATALOSS_PROTECT_OPT = "DATALOSS_PROTECT_OPT", p.INITIAL_ROUING_SYNC = "INITIAL_ROUING_SYNC", p.UPFRONT_SHUTDOWN_SCRIPT_REQ = "UPFRONT_SHUTDOWN_SCRIPT_REQ", p.UPFRONT_SHUTDOWN_SCRIPT_OPT = "UPFRONT_SHUTDOWN_SCRIPT_OPT", p.GOSSIP_QUERIES_REQ = "GOSSIP_QUERIES_REQ", p.GOSSIP_QUERIES_OPT = "GOSSIP_QUERIES_OPT", p.TLV_ONION_REQ = "TLV_ONION_REQ", p.TLV_ONION_OPT = "TLV_ONION_OPT", p.EXT_GOSSIP_QUERIES_REQ = "EXT_GOSSIP_QUERIES_REQ", p.EXT_GOSSIP_QUERIES_OPT = "EXT_GOSSIP_QUERIES_OPT", p.STATIC_REMOTE_KEY_REQ = "STATIC_REMOTE_KEY_REQ", p.STATIC_REMOTE_KEY_OPT = "STATIC_REMOTE_KEY_OPT", p.PAYMENT_ADDR_REQ = "PAYMENT_ADDR_REQ", p.PAYMENT_ADDR_OPT = "PAYMENT_ADDR_OPT", p.MPP_REQ = "MPP_REQ", p.MPP_OPT = "MPP_OPT", p.WUMBO_CHANNELS_REQ = "WUMBO_CHANNELS_REQ", p.WUMBO_CHANNELS_OPT = "WUMBO_CHANNELS_OPT", p.ANCHORS_REQ = "ANCHORS_REQ", p.ANCHORS_OPT = "ANCHORS_OPT", p.ANCHORS_ZERO_FEE_HTLC_REQ = "ANCHORS_ZERO_FEE_HTLC_REQ", p.ANCHORS_ZERO_FEE_HTLC_OPT = "ANCHORS_ZERO_FEE_HTLC_OPT", p.ROUTE_BLINDING_REQUIRED = "ROUTE_BLINDING_REQUIRED", p.ROUTE_BLINDING_OPTIONAL = "ROUTE_BLINDING_OPTIONAL", p.AMP_REQ = "AMP_REQ", p.AMP_OPT = "AMP_OPT", p.UNRECOGNIZED = "UNRECOGNIZED", (u = o.UpdateFailure || (o.UpdateFailure = {})).UPDATE_FAILURE_UNKNOWN = "UPDATE_FAILURE_UNKNOWN", u.UPDATE_FAILURE_PENDING = "UPDATE_FAILURE_PENDING", u.UPDATE_FAILURE_NOT_FOUND = "UPDATE_FAILURE_NOT_FOUND", u.UPDATE_FAILURE_INTERNAL_ERR = "UPDATE_FAILURE_INTERNAL_ERR", u.UPDATE_FAILURE_INVALID_PARAMETER = "UPDATE_FAILURE_INVALID_PARAMETER", u.UNRECOGNIZED = "UNRECOGNIZED", (s = o.ChannelCloseSummary_ClosureType || (o.ChannelCloseSummary_ClosureType = {})).COOPERATIVE_CLOSE = "COOPERATIVE_CLOSE", s.LOCAL_FORCE_CLOSE = "LOCAL_FORCE_CLOSE", s.REMOTE_FORCE_CLOSE = "REMOTE_FORCE_CLOSE", s.BREACH_CLOSE = "BREACH_CLOSE", s.FUNDING_CANCELED = "FUNDING_CANCELED", s.ABANDONED = "ABANDONED", s.UNRECOGNIZED = "UNRECOGNIZED", (c = o.Peer_SyncType || (o.Peer_SyncType = {})).UNKNOWN_SYNC = "UNKNOWN_SYNC", c.ACTIVE_SYNC = "ACTIVE_SYNC", c.PASSIVE_SYNC = "PASSIVE_SYNC", c.PINNED_SYNC = "PINNED_SYNC", c.UNRECOGNIZED = "UNRECOGNIZED", (t = o.PeerEvent_EventType || (o.PeerEvent_EventType = {})).PEER_ONLINE = "PEER_ONLINE", t.PEER_OFFLINE = "PEER_OFFLINE", t.UNRECOGNIZED = "UNRECOGNIZED", (e = o.PendingChannelsResponse_ForceClosedChannel_AnchorState || (o.PendingChannelsResponse_ForceClosedChannel_AnchorState = {})).LIMBO = "LIMBO", e.RECOVERED = "RECOVERED", e.LOST = "LOST", e.UNRECOGNIZED = "UNRECOGNIZED", (r = o.ChannelEventUpdate_UpdateType || (o.ChannelEventUpdate_UpdateType = {})).OPEN_CHANNEL = "OPEN_CHANNEL", r.CLOSED_CHANNEL = "CLOSED_CHANNEL", r.ACTIVE_CHANNEL = "ACTIVE_CHANNEL", r.INACTIVE_CHANNEL = "INACTIVE_CHANNEL", r.PENDING_OPEN_CHANNEL = "PENDING_OPEN_CHANNEL", r.FULLY_RESOLVED_CHANNEL = "FULLY_RESOLVED_CHANNEL", r.CHANNEL_FUNDING_TIMEOUT = "CHANNEL_FUNDING_TIMEOUT", r.UNRECOGNIZED = "UNRECOGNIZED", (n = o.Invoice_InvoiceState || (o.Invoice_InvoiceState = {})).OPEN = "OPEN", n.SETTLED = "SETTLED", n.CANCELED = "CANCELED", n.ACCEPTED = "ACCEPTED", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.Payment_PaymentStatus || (o.Payment_PaymentStatus = {})).UNKNOWN = "UNKNOWN", i.IN_FLIGHT = "IN_FLIGHT", i.SUCCEEDED = "SUCCEEDED", i.FAILED = "FAILED", i.INITIATED = "INITIATED", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.HTLCAttempt_HTLCStatus || (o.HTLCAttempt_HTLCStatus = {})).IN_FLIGHT = "IN_FLIGHT", a.SUCCEEDED = "SUCCEEDED", a.FAILED = "FAILED", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.Failure_FailureCode || (o.Failure_FailureCode = {})).RESERVED = "RESERVED", f.INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = "INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS", f.INCORRECT_PAYMENT_AMOUNT = "INCORRECT_PAYMENT_AMOUNT", f.FINAL_INCORRECT_CLTV_EXPIRY = "FINAL_INCORRECT_CLTV_EXPIRY", f.FINAL_INCORRECT_HTLC_AMOUNT = "FINAL_INCORRECT_HTLC_AMOUNT", f.FINAL_EXPIRY_TOO_SOON = "FINAL_EXPIRY_TOO_SOON", f.INVALID_REALM = "INVALID_REALM", f.EXPIRY_TOO_SOON = "EXPIRY_TOO_SOON", f.INVALID_ONION_VERSION = "INVALID_ONION_VERSION", f.INVALID_ONION_HMAC = "INVALID_ONION_HMAC", f.INVALID_ONION_KEY = "INVALID_ONION_KEY", f.AMOUNT_BELOW_MINIMUM = "AMOUNT_BELOW_MINIMUM", f.FEE_INSUFFICIENT = "FEE_INSUFFICIENT", f.INCORRECT_CLTV_EXPIRY = "INCORRECT_CLTV_EXPIRY", f.CHANNEL_DISABLED = "CHANNEL_DISABLED", f.TEMPORARY_CHANNEL_FAILURE = "TEMPORARY_CHANNEL_FAILURE", f.REQUIRED_NODE_FEATURE_MISSING = "REQUIRED_NODE_FEATURE_MISSING", f.REQUIRED_CHANNEL_FEATURE_MISSING = "REQUIRED_CHANNEL_FEATURE_MISSING", f.UNKNOWN_NEXT_PEER = "UNKNOWN_NEXT_PEER", f.TEMPORARY_NODE_FAILURE = "TEMPORARY_NODE_FAILURE", f.PERMANENT_NODE_FAILURE = "PERMANENT_NODE_FAILURE", f.PERMANENT_CHANNEL_FAILURE = "PERMANENT_CHANNEL_FAILURE", f.EXPIRY_TOO_FAR = "EXPIRY_TOO_FAR", f.MPP_TIMEOUT = "MPP_TIMEOUT", f.INVALID_ONION_PAYLOAD = "INVALID_ONION_PAYLOAD", f.INVALID_ONION_BLINDING = "INVALID_ONION_BLINDING", f.INTERNAL_FAILURE = "INTERNAL_FAILURE", f.UNKNOWN_FAILURE = "UNKNOWN_FAILURE", f.UNREADABLE_FAILURE = "UNREADABLE_FAILURE", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 9353(d, o) {
|
|
var f, a;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.FeatureSet = o.UpdateAction = void 0, (a = o.UpdateAction || (o.UpdateAction = {})).ADD = "ADD", a.REMOVE = "REMOVE", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.FeatureSet || (o.FeatureSet = {})).SET_INIT = "SET_INIT", f.SET_LEGACY_GLOBAL = "SET_LEGACY_GLOBAL", f.SET_NODE_ANN = "SET_NODE_ANN", f.SET_INVOICE = "SET_INVOICE", f.SET_INVOICE_AMP = "SET_INVOICE_AMP", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 7543(d, o) {
|
|
var f, a, i, n, r, e;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.HtlcEvent_EventType = o.MissionControlConfig_ProbabilityModel = o.ChanStatusAction = o.ResolveHoldForwardAction = o.PaymentState = o.FailureDetail = void 0, (e = o.FailureDetail || (o.FailureDetail = {})).UNKNOWN = "UNKNOWN", e.NO_DETAIL = "NO_DETAIL", e.ONION_DECODE = "ONION_DECODE", e.LINK_NOT_ELIGIBLE = "LINK_NOT_ELIGIBLE", e.ON_CHAIN_TIMEOUT = "ON_CHAIN_TIMEOUT", e.HTLC_EXCEEDS_MAX = "HTLC_EXCEEDS_MAX", e.INSUFFICIENT_BALANCE = "INSUFFICIENT_BALANCE", e.INCOMPLETE_FORWARD = "INCOMPLETE_FORWARD", e.HTLC_ADD_FAILED = "HTLC_ADD_FAILED", e.FORWARDS_DISABLED = "FORWARDS_DISABLED", e.INVOICE_CANCELED = "INVOICE_CANCELED", e.INVOICE_UNDERPAID = "INVOICE_UNDERPAID", e.INVOICE_EXPIRY_TOO_SOON = "INVOICE_EXPIRY_TOO_SOON", e.INVOICE_NOT_OPEN = "INVOICE_NOT_OPEN", e.MPP_INVOICE_TIMEOUT = "MPP_INVOICE_TIMEOUT", e.ADDRESS_MISMATCH = "ADDRESS_MISMATCH", e.SET_TOTAL_MISMATCH = "SET_TOTAL_MISMATCH", e.SET_TOTAL_TOO_LOW = "SET_TOTAL_TOO_LOW", e.SET_OVERPAID = "SET_OVERPAID", e.UNKNOWN_INVOICE = "UNKNOWN_INVOICE", e.INVALID_KEYSEND = "INVALID_KEYSEND", e.MPP_IN_PROGRESS = "MPP_IN_PROGRESS", e.CIRCULAR_ROUTE = "CIRCULAR_ROUTE", e.UNRECOGNIZED = "UNRECOGNIZED", (r = o.PaymentState || (o.PaymentState = {})).IN_FLIGHT = "IN_FLIGHT", r.SUCCEEDED = "SUCCEEDED", r.FAILED_TIMEOUT = "FAILED_TIMEOUT", r.FAILED_NO_ROUTE = "FAILED_NO_ROUTE", r.FAILED_ERROR = "FAILED_ERROR", r.FAILED_INCORRECT_PAYMENT_DETAILS = "FAILED_INCORRECT_PAYMENT_DETAILS", r.FAILED_INSUFFICIENT_BALANCE = "FAILED_INSUFFICIENT_BALANCE", r.UNRECOGNIZED = "UNRECOGNIZED", (n = o.ResolveHoldForwardAction || (o.ResolveHoldForwardAction = {})).SETTLE = "SETTLE", n.FAIL = "FAIL", n.RESUME = "RESUME", n.RESUME_MODIFIED = "RESUME_MODIFIED", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.ChanStatusAction || (o.ChanStatusAction = {})).ENABLE = "ENABLE", i.DISABLE = "DISABLE", i.AUTO = "AUTO", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.MissionControlConfig_ProbabilityModel || (o.MissionControlConfig_ProbabilityModel = {})).APRIORI = "APRIORI", a.BIMODAL = "BIMODAL", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.HtlcEvent_EventType || (o.HtlcEvent_EventType = {})).UNKNOWN = "UNKNOWN", f.SEND = "SEND", f.RECEIVE = "RECEIVE", f.FORWARD = "FORWARD", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 5636(d, o) {
|
|
var f, a;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.MuSig2Version = o.SignMethod = void 0, (a = o.SignMethod || (o.SignMethod = {})).SIGN_METHOD_WITNESS_V0 = "SIGN_METHOD_WITNESS_V0", a.SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086 = "SIGN_METHOD_TAPROOT_KEY_SPEND_BIP0086", a.SIGN_METHOD_TAPROOT_KEY_SPEND = "SIGN_METHOD_TAPROOT_KEY_SPEND", a.SIGN_METHOD_TAPROOT_SCRIPT_SPEND = "SIGN_METHOD_TAPROOT_SCRIPT_SPEND", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.MuSig2Version || (o.MuSig2Version = {})).MUSIG2_VERSION_UNDEFINED = "MUSIG2_VERSION_UNDEFINED", f.MUSIG2_VERSION_V040 = "MUSIG2_VERSION_V040", f.MUSIG2_VERSION_V100RC2 = "MUSIG2_VERSION_V100RC2", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 4219(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.WalletState = void 0, (f = o.WalletState || (o.WalletState = {})).NON_EXISTING = "NON_EXISTING", f.LOCKED = "LOCKED", f.UNLOCKED = "UNLOCKED", f.RPC_ACTIVE = "RPC_ACTIVE", f.SERVER_ACTIVE = "SERVER_ACTIVE", f.WAITING_TO_START = "WAITING_TO_START", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 5779(d, o) {
|
|
var f, a, i;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.ChangeAddressType = o.WitnessType = o.AddressType = void 0, (i = o.AddressType || (o.AddressType = {})).UNKNOWN = "UNKNOWN", i.WITNESS_PUBKEY_HASH = "WITNESS_PUBKEY_HASH", i.NESTED_WITNESS_PUBKEY_HASH = "NESTED_WITNESS_PUBKEY_HASH", i.HYBRID_NESTED_WITNESS_PUBKEY_HASH = "HYBRID_NESTED_WITNESS_PUBKEY_HASH", i.TAPROOT_PUBKEY = "TAPROOT_PUBKEY", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.WitnessType || (o.WitnessType = {})).UNKNOWN_WITNESS = "UNKNOWN_WITNESS", a.COMMITMENT_TIME_LOCK = "COMMITMENT_TIME_LOCK", a.COMMITMENT_NO_DELAY = "COMMITMENT_NO_DELAY", a.COMMITMENT_REVOKE = "COMMITMENT_REVOKE", a.HTLC_OFFERED_REVOKE = "HTLC_OFFERED_REVOKE", a.HTLC_ACCEPTED_REVOKE = "HTLC_ACCEPTED_REVOKE", a.HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = "HTLC_OFFERED_TIMEOUT_SECOND_LEVEL", a.HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = "HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL", a.HTLC_OFFERED_REMOTE_TIMEOUT = "HTLC_OFFERED_REMOTE_TIMEOUT", a.HTLC_ACCEPTED_REMOTE_SUCCESS = "HTLC_ACCEPTED_REMOTE_SUCCESS", a.HTLC_SECOND_LEVEL_REVOKE = "HTLC_SECOND_LEVEL_REVOKE", a.WITNESS_KEY_HASH = "WITNESS_KEY_HASH", a.NESTED_WITNESS_KEY_HASH = "NESTED_WITNESS_KEY_HASH", a.COMMITMENT_ANCHOR = "COMMITMENT_ANCHOR", a.COMMITMENT_NO_DELAY_TWEAKLESS = "COMMITMENT_NO_DELAY_TWEAKLESS", a.COMMITMENT_TO_REMOTE_CONFIRMED = "COMMITMENT_TO_REMOTE_CONFIRMED", a.HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED = "HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_INPUT_CONFIRMED", a.HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED = "HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_INPUT_CONFIRMED", a.LEASE_COMMITMENT_TIME_LOCK = "LEASE_COMMITMENT_TIME_LOCK", a.LEASE_COMMITMENT_TO_REMOTE_CONFIRMED = "LEASE_COMMITMENT_TO_REMOTE_CONFIRMED", a.LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = "LEASE_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL", a.LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = "LEASE_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL", a.TAPROOT_PUB_KEY_SPEND = "TAPROOT_PUB_KEY_SPEND", a.TAPROOT_LOCAL_COMMIT_SPEND = "TAPROOT_LOCAL_COMMIT_SPEND", a.TAPROOT_REMOTE_COMMIT_SPEND = "TAPROOT_REMOTE_COMMIT_SPEND", a.TAPROOT_ANCHOR_SWEEP_SPEND = "TAPROOT_ANCHOR_SWEEP_SPEND", a.TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL = "TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL", a.TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL = "TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL", a.TAPROOT_HTLC_SECOND_LEVEL_REVOKE = "TAPROOT_HTLC_SECOND_LEVEL_REVOKE", a.TAPROOT_HTLC_ACCEPTED_REVOKE = "TAPROOT_HTLC_ACCEPTED_REVOKE", a.TAPROOT_HTLC_OFFERED_REVOKE = "TAPROOT_HTLC_OFFERED_REVOKE", a.TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT = "TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT", a.TAPROOT_HTLC_LOCAL_OFFERED_TIMEOUT = "TAPROOT_HTLC_LOCAL_OFFERED_TIMEOUT", a.TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS = "TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS", a.TAPROOT_HTLC_ACCEPTED_LOCAL_SUCCESS = "TAPROOT_HTLC_ACCEPTED_LOCAL_SUCCESS", a.TAPROOT_COMMITMENT_REVOKE = "TAPROOT_COMMITMENT_REVOKE", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.ChangeAddressType || (o.ChangeAddressType = {})).CHANGE_ADDRESS_TYPE_UNSPECIFIED = "CHANGE_ADDRESS_TYPE_UNSPECIFIED", f.CHANGE_ADDRESS_TYPE_P2TR = "CHANGE_ADDRESS_TYPE_P2TR", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 5577(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 4899(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 6035(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.PolicyType = void 0, (f = o.PolicyType || (o.PolicyType = {})).LEGACY = "LEGACY", f.ANCHOR = "ANCHOR", f.TAPROOT = "TAPROOT", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 1419(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(4377), o), i(f(4219), o), i(f(5577), o);
|
|
}, 1730(d, o) {
|
|
var f, a, i, n, r, e, t, c, s;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.ListSwapsFilter_SwapTypeFilter = o.StaticAddressLoopInSwapState = o.DepositState = o.AutoReason = o.LiquidityRuleType = o.FailureReason = o.SwapState = o.SwapType = o.AddressType = void 0, (s = o.AddressType || (o.AddressType = {})).ADDRESS_TYPE_UNKNOWN = "ADDRESS_TYPE_UNKNOWN", s.TAPROOT_PUBKEY = "TAPROOT_PUBKEY", s.UNRECOGNIZED = "UNRECOGNIZED", (c = o.SwapType || (o.SwapType = {})).LOOP_OUT = "LOOP_OUT", c.LOOP_IN = "LOOP_IN", c.UNRECOGNIZED = "UNRECOGNIZED", (t = o.SwapState || (o.SwapState = {})).INITIATED = "INITIATED", t.PREIMAGE_REVEALED = "PREIMAGE_REVEALED", t.HTLC_PUBLISHED = "HTLC_PUBLISHED", t.SUCCESS = "SUCCESS", t.FAILED = "FAILED", t.INVOICE_SETTLED = "INVOICE_SETTLED", t.UNRECOGNIZED = "UNRECOGNIZED", (e = o.FailureReason || (o.FailureReason = {})).FAILURE_REASON_NONE = "FAILURE_REASON_NONE", e.FAILURE_REASON_OFFCHAIN = "FAILURE_REASON_OFFCHAIN", e.FAILURE_REASON_TIMEOUT = "FAILURE_REASON_TIMEOUT", e.FAILURE_REASON_SWEEP_TIMEOUT = "FAILURE_REASON_SWEEP_TIMEOUT", e.FAILURE_REASON_INSUFFICIENT_VALUE = "FAILURE_REASON_INSUFFICIENT_VALUE", e.FAILURE_REASON_TEMPORARY = "FAILURE_REASON_TEMPORARY", e.FAILURE_REASON_INCORRECT_AMOUNT = "FAILURE_REASON_INCORRECT_AMOUNT", e.FAILURE_REASON_ABANDONED = "FAILURE_REASON_ABANDONED", e.FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE = "FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE", e.FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT = "FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT", e.UNRECOGNIZED = "UNRECOGNIZED", (r = o.LiquidityRuleType || (o.LiquidityRuleType = {})).UNKNOWN = "UNKNOWN", r.THRESHOLD = "THRESHOLD", r.UNRECOGNIZED = "UNRECOGNIZED", (n = o.AutoReason || (o.AutoReason = {})).AUTO_REASON_UNKNOWN = "AUTO_REASON_UNKNOWN", n.AUTO_REASON_BUDGET_NOT_STARTED = "AUTO_REASON_BUDGET_NOT_STARTED", n.AUTO_REASON_SWEEP_FEES = "AUTO_REASON_SWEEP_FEES", n.AUTO_REASON_BUDGET_ELAPSED = "AUTO_REASON_BUDGET_ELAPSED", n.AUTO_REASON_IN_FLIGHT = "AUTO_REASON_IN_FLIGHT", n.AUTO_REASON_SWAP_FEE = "AUTO_REASON_SWAP_FEE", n.AUTO_REASON_MINER_FEE = "AUTO_REASON_MINER_FEE", n.AUTO_REASON_PREPAY = "AUTO_REASON_PREPAY", n.AUTO_REASON_FAILURE_BACKOFF = "AUTO_REASON_FAILURE_BACKOFF", n.AUTO_REASON_LOOP_OUT = "AUTO_REASON_LOOP_OUT", n.AUTO_REASON_LOOP_IN = "AUTO_REASON_LOOP_IN", n.AUTO_REASON_LIQUIDITY_OK = "AUTO_REASON_LIQUIDITY_OK", n.AUTO_REASON_BUDGET_INSUFFICIENT = "AUTO_REASON_BUDGET_INSUFFICIENT", n.AUTO_REASON_FEE_INSUFFICIENT = "AUTO_REASON_FEE_INSUFFICIENT", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.DepositState || (o.DepositState = {})).UNKNOWN_STATE = "UNKNOWN_STATE", i.DEPOSITED = "DEPOSITED", i.WITHDRAWING = "WITHDRAWING", i.WITHDRAWN = "WITHDRAWN", i.LOOPING_IN = "LOOPING_IN", i.LOOPED_IN = "LOOPED_IN", i.SWEEP_HTLC_TIMEOUT = "SWEEP_HTLC_TIMEOUT", i.HTLC_TIMEOUT_SWEPT = "HTLC_TIMEOUT_SWEPT", i.PUBLISH_EXPIRED = "PUBLISH_EXPIRED", i.WAIT_FOR_EXPIRY_SWEEP = "WAIT_FOR_EXPIRY_SWEEP", i.EXPIRED = "EXPIRED", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.StaticAddressLoopInSwapState || (o.StaticAddressLoopInSwapState = {})).UNKNOWN_STATIC_ADDRESS_SWAP_STATE = "UNKNOWN_STATIC_ADDRESS_SWAP_STATE", a.INIT_HTLC = "INIT_HTLC", a.SIGN_HTLC_TX = "SIGN_HTLC_TX", a.MONITOR_INVOICE_HTLC_TX = "MONITOR_INVOICE_HTLC_TX", a.PAYMENT_RECEIVED = "PAYMENT_RECEIVED", a.SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT = "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", a.MONITOR_HTLC_TIMEOUT_SWEEP = "MONITOR_HTLC_TIMEOUT_SWEEP", a.HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT = "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", a.SUCCEEDED = "SUCCEEDED", a.SUCCEEDED_TRANSITIONING_FAILED = "SUCCEEDED_TRANSITIONING_FAILED", a.UNLOCK_DEPOSITS = "UNLOCK_DEPOSITS", a.FAILED_STATIC_ADDRESS_SWAP = "FAILED_STATIC_ADDRESS_SWAP", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.ListSwapsFilter_SwapTypeFilter || (o.ListSwapsFilter_SwapTypeFilter = {})).ANY = "ANY", f.LOOP_OUT = "LOOP_OUT", f.LOOP_IN = "LOOP_IN", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 66(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 7967(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(1730), o), i(f(66), o);
|
|
}, 1393(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(5398), o);
|
|
}, 1908(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(9353), o);
|
|
}, 3029(d, o) {
|
|
var f, a, i, n, r, e, t, c, s, u, p, l, v, y;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.InvalidOrder_FailReason = o.AccountDiff_AccountState = o.SubscribeError_Error = o.OrderReject_OrderRejectReason = o.OrderMatchReject_RejectReason = o.DurationBucketState = o.OrderState = o.ChannelConfirmationConstraints = o.ChannelAnnouncementConstraints = o.NodeTier = o.AuctionType = o.OrderChannelType = o.AuctionAccountState = o.ChannelType = void 0, (y = o.ChannelType || (o.ChannelType = {})).TWEAKLESS = "TWEAKLESS", y.ANCHORS = "ANCHORS", y.SCRIPT_ENFORCED_LEASE = "SCRIPT_ENFORCED_LEASE", y.UNRECOGNIZED = "UNRECOGNIZED", (v = o.AuctionAccountState || (o.AuctionAccountState = {})).STATE_PENDING_OPEN = "STATE_PENDING_OPEN", v.STATE_OPEN = "STATE_OPEN", v.STATE_EXPIRED = "STATE_EXPIRED", v.STATE_PENDING_UPDATE = "STATE_PENDING_UPDATE", v.STATE_CLOSED = "STATE_CLOSED", v.STATE_PENDING_BATCH = "STATE_PENDING_BATCH", v.STATE_EXPIRED_PENDING_UPDATE = "STATE_EXPIRED_PENDING_UPDATE", v.UNRECOGNIZED = "UNRECOGNIZED", (l = o.OrderChannelType || (o.OrderChannelType = {})).ORDER_CHANNEL_TYPE_UNKNOWN = "ORDER_CHANNEL_TYPE_UNKNOWN", l.ORDER_CHANNEL_TYPE_PEER_DEPENDENT = "ORDER_CHANNEL_TYPE_PEER_DEPENDENT", l.ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED = "ORDER_CHANNEL_TYPE_SCRIPT_ENFORCED", l.UNRECOGNIZED = "UNRECOGNIZED", (p = o.AuctionType || (o.AuctionType = {})).AUCTION_TYPE_BTC_INBOUND_LIQUIDITY = "AUCTION_TYPE_BTC_INBOUND_LIQUIDITY", p.AUCTION_TYPE_BTC_OUTBOUND_LIQUIDITY = "AUCTION_TYPE_BTC_OUTBOUND_LIQUIDITY", p.UNRECOGNIZED = "UNRECOGNIZED", (u = o.NodeTier || (o.NodeTier = {})).TIER_DEFAULT = "TIER_DEFAULT", u.TIER_0 = "TIER_0", u.TIER_1 = "TIER_1", u.UNRECOGNIZED = "UNRECOGNIZED", (s = o.ChannelAnnouncementConstraints || (o.ChannelAnnouncementConstraints = {})).ANNOUNCEMENT_NO_PREFERENCE = "ANNOUNCEMENT_NO_PREFERENCE", s.ONLY_ANNOUNCED = "ONLY_ANNOUNCED", s.ONLY_UNANNOUNCED = "ONLY_UNANNOUNCED", s.UNRECOGNIZED = "UNRECOGNIZED", (c = o.ChannelConfirmationConstraints || (o.ChannelConfirmationConstraints = {})).CONFIRMATION_NO_PREFERENCE = "CONFIRMATION_NO_PREFERENCE", c.ONLY_CONFIRMED = "ONLY_CONFIRMED", c.ONLY_ZEROCONF = "ONLY_ZEROCONF", c.UNRECOGNIZED = "UNRECOGNIZED", (t = o.OrderState || (o.OrderState = {})).ORDER_SUBMITTED = "ORDER_SUBMITTED", t.ORDER_CLEARED = "ORDER_CLEARED", t.ORDER_PARTIALLY_FILLED = "ORDER_PARTIALLY_FILLED", t.ORDER_EXECUTED = "ORDER_EXECUTED", t.ORDER_CANCELED = "ORDER_CANCELED", t.ORDER_EXPIRED = "ORDER_EXPIRED", t.ORDER_FAILED = "ORDER_FAILED", t.UNRECOGNIZED = "UNRECOGNIZED", (e = o.DurationBucketState || (o.DurationBucketState = {})).NO_MARKET = "NO_MARKET", e.MARKET_CLOSED = "MARKET_CLOSED", e.ACCEPTING_ORDERS = "ACCEPTING_ORDERS", e.MARKET_OPEN = "MARKET_OPEN", e.UNRECOGNIZED = "UNRECOGNIZED", (r = o.OrderMatchReject_RejectReason || (o.OrderMatchReject_RejectReason = {})).UNKNOWN = "UNKNOWN", r.SERVER_MISBEHAVIOR = "SERVER_MISBEHAVIOR", r.BATCH_VERSION_MISMATCH = "BATCH_VERSION_MISMATCH", r.PARTIAL_REJECT = "PARTIAL_REJECT", r.UNRECOGNIZED = "UNRECOGNIZED", (n = o.OrderReject_OrderRejectReason || (o.OrderReject_OrderRejectReason = {})).DUPLICATE_PEER = "DUPLICATE_PEER", n.CHANNEL_FUNDING_FAILED = "CHANNEL_FUNDING_FAILED", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.SubscribeError_Error || (o.SubscribeError_Error = {})).UNKNOWN = "UNKNOWN", i.SERVER_SHUTDOWN = "SERVER_SHUTDOWN", i.ACCOUNT_DOES_NOT_EXIST = "ACCOUNT_DOES_NOT_EXIST", i.INCOMPLETE_ACCOUNT_RESERVATION = "INCOMPLETE_ACCOUNT_RESERVATION", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.AccountDiff_AccountState || (o.AccountDiff_AccountState = {})).OUTPUT_RECREATED = "OUTPUT_RECREATED", a.OUTPUT_DUST_EXTENDED_OFFCHAIN = "OUTPUT_DUST_EXTENDED_OFFCHAIN", a.OUTPUT_DUST_ADDED_TO_FEES = "OUTPUT_DUST_ADDED_TO_FEES", a.OUTPUT_FULLY_SPENT = "OUTPUT_FULLY_SPENT", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.InvalidOrder_FailReason || (o.InvalidOrder_FailReason = {})).INVALID_AMT = "INVALID_AMT", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 4541(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 7521(d, o) {
|
|
var f, a, i, n;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.MatchRejectReason = o.MatchState = o.AccountState = o.AccountVersion = void 0, (n = o.AccountVersion || (o.AccountVersion = {})).ACCOUNT_VERSION_LND_DEPENDENT = "ACCOUNT_VERSION_LND_DEPENDENT", n.ACCOUNT_VERSION_LEGACY = "ACCOUNT_VERSION_LEGACY", n.ACCOUNT_VERSION_TAPROOT = "ACCOUNT_VERSION_TAPROOT", n.ACCOUNT_VERSION_TAPROOT_V2 = "ACCOUNT_VERSION_TAPROOT_V2", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.AccountState || (o.AccountState = {})).PENDING_OPEN = "PENDING_OPEN", i.PENDING_UPDATE = "PENDING_UPDATE", i.OPEN = "OPEN", i.EXPIRED = "EXPIRED", i.PENDING_CLOSED = "PENDING_CLOSED", i.CLOSED = "CLOSED", i.RECOVERY_FAILED = "RECOVERY_FAILED", i.PENDING_BATCH = "PENDING_BATCH", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.MatchState || (o.MatchState = {})).PREPARE = "PREPARE", a.ACCEPTED = "ACCEPTED", a.REJECTED = "REJECTED", a.SIGNED = "SIGNED", a.FINALIZED = "FINALIZED", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.MatchRejectReason || (o.MatchRejectReason = {})).NONE = "NONE", f.SERVER_MISBEHAVIOR = "SERVER_MISBEHAVIOR", f.BATCH_VERSION_MISMATCH = "BATCH_VERSION_MISMATCH", f.PARTIAL_REJECT_COLLATERAL = "PARTIAL_REJECT_COLLATERAL", f.PARTIAL_REJECT_DUPLICATE_PEER = "PARTIAL_REJECT_DUPLICATE_PEER", f.PARTIAL_REJECT_CHANNEL_FUNDING_FAILED = "PARTIAL_REJECT_CHANNEL_FUNDING_FAILED", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 2471(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(3029), o), i(f(4541), o), i(f(7521), o);
|
|
}, 2162(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(9719), o);
|
|
}, 4386(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(1380), o);
|
|
}, 6534(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(7543), o);
|
|
}, 2495(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.subscriptionMethods = o.serviceNames = void 0, o.serviceNames = { frdrpc: { FaradayServer: "frdrpc.FaradayServer" }, litrpc: { Firewall: "litrpc.Firewall", Autopilot: "litrpc.Autopilot", Sessions: "litrpc.Sessions", Status: "litrpc.Status" }, autopilotrpc: { Autopilot: "autopilotrpc.Autopilot" }, chainrpc: { ChainNotifier: "chainrpc.ChainNotifier" }, invoicesrpc: { Invoices: "invoicesrpc.Invoices" }, lnrpc: { Lightning: "lnrpc.Lightning", State: "lnrpc.State", WalletUnlocker: "lnrpc.WalletUnlocker" }, peersrpc: { Peers: "peersrpc.Peers" }, routerrpc: { Router: "routerrpc.Router" }, signrpc: { Signer: "signrpc.Signer" }, walletrpc: { WalletKit: "walletrpc.WalletKit" }, watchtowerrpc: { Watchtower: "watchtowerrpc.Watchtower" }, wtclientrpc: { WatchtowerClient: "wtclientrpc.WatchtowerClient" }, looprpc: { SwapClient: "looprpc.SwapClient", Debug: "looprpc.Debug" }, poolrpc: { ChannelAuctioneer: "poolrpc.ChannelAuctioneer", HashMail: "poolrpc.HashMail", Trader: "poolrpc.Trader" }, assetwalletrpc: { AssetWallet: "assetwalletrpc.AssetWallet" }, authmailboxrpc: { Mailbox: "authmailboxrpc.Mailbox" }, mintrpc: { Mint: "mintrpc.Mint" }, priceoraclerpc: { PriceOracle: "priceoraclerpc.PriceOracle" }, rfqrpc: { Rfq: "rfqrpc.Rfq" }, tapchannelrpc: { TaprootAssetChannels: "tapchannelrpc.TaprootAssetChannels" }, tapdevrpc: { TapDev: "tapdevrpc.TapDev" }, taprpc: { TaprootAssets: "taprpc.TaprootAssets" }, universerpc: { Universe: "universerpc.Universe" } }, o.subscriptionMethods = ["chainrpc.ChainNotifier.RegisterConfirmationsNtfn", "chainrpc.ChainNotifier.RegisterSpendNtfn", "chainrpc.ChainNotifier.RegisterBlockEpochNtfn", "invoicesrpc.Invoices.SubscribeSingleInvoice", "invoicesrpc.Invoices.HtlcModifier", "lnrpc.Lightning.SubscribeTransactions", "lnrpc.Lightning.SubscribePeerEvents", "lnrpc.Lightning.SubscribeChannelEvents", "lnrpc.Lightning.OpenChannel", "lnrpc.Lightning.ChannelAcceptor", "lnrpc.Lightning.CloseChannel", "lnrpc.Lightning.SendPayment", "lnrpc.Lightning.SendToRoute", "lnrpc.Lightning.SubscribeInvoices", "lnrpc.Lightning.SubscribeChannelGraph", "lnrpc.Lightning.SubscribeChannelBackups", "lnrpc.Lightning.RegisterRPCMiddleware", "lnrpc.Lightning.SubscribeCustomMessages", "routerrpc.Router.SendPaymentV2", "routerrpc.Router.TrackPaymentV2", "routerrpc.Router.TrackPayments", "routerrpc.Router.SubscribeHtlcEvents", "routerrpc.Router.SendPayment", "routerrpc.Router.TrackPayment", "routerrpc.Router.HtlcInterceptor", "lnrpc.State.SubscribeState", "looprpc.SwapClient.Monitor", "poolrpc.ChannelAuctioneer.SubscribeBatchAuction", "poolrpc.ChannelAuctioneer.SubscribeSidecar", "poolrpc.HashMail.RecvStream", "authmailboxrpc.Mailbox.ReceiveMessages", "lnrpc.Lightning.SubscribeTransactions", "lnrpc.Lightning.SubscribePeerEvents", "lnrpc.Lightning.SubscribeChannelEvents", "lnrpc.Lightning.OpenChannel", "lnrpc.Lightning.ChannelAcceptor", "lnrpc.Lightning.CloseChannel", "lnrpc.Lightning.SendPayment", "lnrpc.Lightning.SendToRoute", "lnrpc.Lightning.SubscribeInvoices", "lnrpc.Lightning.SubscribeChannelGraph", "lnrpc.Lightning.SubscribeChannelBackups", "lnrpc.Lightning.RegisterRPCMiddleware", "lnrpc.Lightning.SubscribeCustomMessages", "mintrpc.Mint.SubscribeMintEvents", "rfqrpc.Rfq.SubscribeRfqEventNtfns", "routerrpc.Router.SendPaymentV2", "routerrpc.Router.TrackPaymentV2", "routerrpc.Router.TrackPayments", "routerrpc.Router.SubscribeHtlcEvents", "routerrpc.Router.SendPayment", "routerrpc.Router.TrackPayment", "routerrpc.Router.HtlcInterceptor", "tapchannelrpc.TaprootAssetChannels.SendPayment", "tapdevrpc.TapDev.SubscribeSendAssetEventNtfns", "tapdevrpc.TapDev.SubscribeReceiveAssetEventNtfns", "taprpc.TaprootAssets.SubscribeReceiveEvents", "taprpc.TaprootAssets.SubscribeSendEvents"];
|
|
}, 8054(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(5636), o);
|
|
}, 8933(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(6190), o);
|
|
}, 5712(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.CoinSelectType = void 0, (f = o.CoinSelectType || (o.CoinSelectType = {})).COIN_SELECT_DEFAULT = "COIN_SELECT_DEFAULT", f.COIN_SELECT_BIP86_ONLY = "COIN_SELECT_BIP86_ONLY", f.COIN_SELECT_SCRIPT_TREES_ALLOWED = "COIN_SELECT_SCRIPT_TREES_ALLOWED", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 4376(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 5398(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.BatchState = void 0, (f = o.BatchState || (o.BatchState = {})).BATCH_STATE_UNKNOWN = "BATCH_STATE_UNKNOWN", f.BATCH_STATE_PENDING = "BATCH_STATE_PENDING", f.BATCH_STATE_FROZEN = "BATCH_STATE_FROZEN", f.BATCH_STATE_COMMITTED = "BATCH_STATE_COMMITTED", f.BATCH_STATE_BROADCAST = "BATCH_STATE_BROADCAST", f.BATCH_STATE_CONFIRMED = "BATCH_STATE_CONFIRMED", f.BATCH_STATE_FINALIZED = "BATCH_STATE_FINALIZED", f.BATCH_STATE_SEEDLING_CANCELLED = "BATCH_STATE_SEEDLING_CANCELLED", f.BATCH_STATE_SPROUT_CANCELLED = "BATCH_STATE_SPROUT_CANCELLED", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 9719(d, o) {
|
|
var f, a;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.Intent = o.TransactionType = void 0, (a = o.TransactionType || (o.TransactionType = {})).PURCHASE = "PURCHASE", a.SALE = "SALE", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.Intent || (o.Intent = {})).INTENT_UNSPECIFIED = "INTENT_UNSPECIFIED", f.INTENT_PAY_INVOICE_HINT = "INTENT_PAY_INVOICE_HINT", f.INTENT_PAY_INVOICE = "INTENT_PAY_INVOICE", f.INTENT_PAY_INVOICE_QUALIFY = "INTENT_PAY_INVOICE_QUALIFY", f.INTENT_RECV_PAYMENT_HINT = "INTENT_RECV_PAYMENT_HINT", f.INTENT_RECV_PAYMENT = "INTENT_RECV_PAYMENT", f.INTENT_RECV_PAYMENT_QUALIFY = "INTENT_RECV_PAYMENT_QUALIFY", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 1380(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.QuoteRespStatus = void 0, (f = o.QuoteRespStatus || (o.QuoteRespStatus = {})).INVALID_ASSET_RATES = "INVALID_ASSET_RATES", f.INVALID_EXPIRY = "INVALID_EXPIRY", f.PRICE_ORACLE_QUERY_ERR = "PRICE_ORACLE_QUERY_ERR", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 6190(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
}, 3126(d, o) {
|
|
var f;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.ProofTransferType = void 0, (f = o.ProofTransferType || (o.ProofTransferType = {})).PROOF_TRANSFER_TYPE_SEND = "PROOF_TRANSFER_TYPE_SEND", f.PROOF_TRANSFER_TYPE_RECEIVE = "PROOF_TRANSFER_TYPE_RECEIVE", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 8960(d, o) {
|
|
var f, a, i, n, r, e, t, c, s, u;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.ParcelType = o.SendState = o.AddrEventStatus = o.ScriptKeyType = o.AddrVersion = o.ProofDeliveryStatus = o.OutputType = o.AssetVersion = o.AssetMetaType = o.AssetType = void 0, (u = o.AssetType || (o.AssetType = {})).NORMAL = "NORMAL", u.COLLECTIBLE = "COLLECTIBLE", u.UNRECOGNIZED = "UNRECOGNIZED", (s = o.AssetMetaType || (o.AssetMetaType = {})).META_TYPE_OPAQUE = "META_TYPE_OPAQUE", s.META_TYPE_JSON = "META_TYPE_JSON", s.UNRECOGNIZED = "UNRECOGNIZED", (c = o.AssetVersion || (o.AssetVersion = {})).ASSET_VERSION_V0 = "ASSET_VERSION_V0", c.ASSET_VERSION_V1 = "ASSET_VERSION_V1", c.UNRECOGNIZED = "UNRECOGNIZED", (t = o.OutputType || (o.OutputType = {})).OUTPUT_TYPE_SIMPLE = "OUTPUT_TYPE_SIMPLE", t.OUTPUT_TYPE_SPLIT_ROOT = "OUTPUT_TYPE_SPLIT_ROOT", t.UNRECOGNIZED = "UNRECOGNIZED", (e = o.ProofDeliveryStatus || (o.ProofDeliveryStatus = {})).PROOF_DELIVERY_STATUS_NOT_APPLICABLE = "PROOF_DELIVERY_STATUS_NOT_APPLICABLE", e.PROOF_DELIVERY_STATUS_COMPLETE = "PROOF_DELIVERY_STATUS_COMPLETE", e.PROOF_DELIVERY_STATUS_PENDING = "PROOF_DELIVERY_STATUS_PENDING", e.UNRECOGNIZED = "UNRECOGNIZED", (r = o.AddrVersion || (o.AddrVersion = {})).ADDR_VERSION_UNSPECIFIED = "ADDR_VERSION_UNSPECIFIED", r.ADDR_VERSION_V0 = "ADDR_VERSION_V0", r.ADDR_VERSION_V1 = "ADDR_VERSION_V1", r.ADDR_VERSION_V2 = "ADDR_VERSION_V2", r.UNRECOGNIZED = "UNRECOGNIZED", (n = o.ScriptKeyType || (o.ScriptKeyType = {})).SCRIPT_KEY_UNKNOWN = "SCRIPT_KEY_UNKNOWN", n.SCRIPT_KEY_BIP86 = "SCRIPT_KEY_BIP86", n.SCRIPT_KEY_SCRIPT_PATH_EXTERNAL = "SCRIPT_KEY_SCRIPT_PATH_EXTERNAL", n.SCRIPT_KEY_BURN = "SCRIPT_KEY_BURN", n.SCRIPT_KEY_TOMBSTONE = "SCRIPT_KEY_TOMBSTONE", n.SCRIPT_KEY_CHANNEL = "SCRIPT_KEY_CHANNEL", n.SCRIPT_KEY_UNIQUE_PEDERSEN = "SCRIPT_KEY_UNIQUE_PEDERSEN", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.AddrEventStatus || (o.AddrEventStatus = {})).ADDR_EVENT_STATUS_UNKNOWN = "ADDR_EVENT_STATUS_UNKNOWN", i.ADDR_EVENT_STATUS_TRANSACTION_DETECTED = "ADDR_EVENT_STATUS_TRANSACTION_DETECTED", i.ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED = "ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED", i.ADDR_EVENT_STATUS_PROOF_RECEIVED = "ADDR_EVENT_STATUS_PROOF_RECEIVED", i.ADDR_EVENT_STATUS_COMPLETED = "ADDR_EVENT_STATUS_COMPLETED", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.SendState || (o.SendState = {})).SEND_STATE_VIRTUAL_INPUT_SELECT = "SEND_STATE_VIRTUAL_INPUT_SELECT", a.SEND_STATE_VIRTUAL_SIGN = "SEND_STATE_VIRTUAL_SIGN", a.SEND_STATE_ANCHOR_SIGN = "SEND_STATE_ANCHOR_SIGN", a.SEND_STATE_LOG_COMMITMENT = "SEND_STATE_LOG_COMMITMENT", a.SEND_STATE_BROADCAST = "SEND_STATE_BROADCAST", a.SEND_STATE_WAIT_CONFIRMATION = "SEND_STATE_WAIT_CONFIRMATION", a.SEND_STATE_STORE_PROOFS = "SEND_STATE_STORE_PROOFS", a.SEND_STATE_TRANSFER_PROOFS = "SEND_STATE_TRANSFER_PROOFS", a.SEND_STATE_COMPLETED = "SEND_STATE_COMPLETED", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.ParcelType || (o.ParcelType = {})).PARCEL_TYPE_ADDRESS = "PARCEL_TYPE_ADDRESS", f.PARCEL_TYPE_PRE_SIGNED = "PARCEL_TYPE_PRE_SIGNED", f.PARCEL_TYPE_PENDING = "PARCEL_TYPE_PENDING", f.PARCEL_TYPE_PRE_ANCHORED = "PARCEL_TYPE_PRE_ANCHORED", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 5558(d, o) {
|
|
var f, a, i, n, r;
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.AssetTypeFilter = o.SortDirection = o.AssetQuerySort = o.UniverseSyncMode = o.ProofType = void 0, (r = o.ProofType || (o.ProofType = {})).PROOF_TYPE_UNSPECIFIED = "PROOF_TYPE_UNSPECIFIED", r.PROOF_TYPE_ISSUANCE = "PROOF_TYPE_ISSUANCE", r.PROOF_TYPE_TRANSFER = "PROOF_TYPE_TRANSFER", r.UNRECOGNIZED = "UNRECOGNIZED", (n = o.UniverseSyncMode || (o.UniverseSyncMode = {})).SYNC_ISSUANCE_ONLY = "SYNC_ISSUANCE_ONLY", n.SYNC_FULL = "SYNC_FULL", n.UNRECOGNIZED = "UNRECOGNIZED", (i = o.AssetQuerySort || (o.AssetQuerySort = {})).SORT_BY_NONE = "SORT_BY_NONE", i.SORT_BY_ASSET_NAME = "SORT_BY_ASSET_NAME", i.SORT_BY_ASSET_ID = "SORT_BY_ASSET_ID", i.SORT_BY_ASSET_TYPE = "SORT_BY_ASSET_TYPE", i.SORT_BY_TOTAL_SYNCS = "SORT_BY_TOTAL_SYNCS", i.SORT_BY_TOTAL_PROOFS = "SORT_BY_TOTAL_PROOFS", i.SORT_BY_GENESIS_HEIGHT = "SORT_BY_GENESIS_HEIGHT", i.SORT_BY_TOTAL_SUPPLY = "SORT_BY_TOTAL_SUPPLY", i.UNRECOGNIZED = "UNRECOGNIZED", (a = o.SortDirection || (o.SortDirection = {})).SORT_DIRECTION_ASC = "SORT_DIRECTION_ASC", a.SORT_DIRECTION_DESC = "SORT_DIRECTION_DESC", a.UNRECOGNIZED = "UNRECOGNIZED", (f = o.AssetTypeFilter || (o.AssetTypeFilter = {})).FILTER_ASSET_NONE = "FILTER_ASSET_NONE", f.FILTER_ASSET_NORMAL = "FILTER_ASSET_NORMAL", f.FILTER_ASSET_COLLECTIBLE = "FILTER_ASSET_COLLECTIBLE", f.UNRECOGNIZED = "UNRECOGNIZED";
|
|
}, 8753(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(3126), o);
|
|
}, 5600(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(8960), o);
|
|
}, 7164(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(5558), o);
|
|
}, 718(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(5779), o);
|
|
}, 5109(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(4899), o);
|
|
}, 7685(d, o, f) {
|
|
var a = this && this.__createBinding || (Object.create ? function(n, r, e, t) {
|
|
t === void 0 && (t = e), Object.defineProperty(n, t, { enumerable: !0, get: function() {
|
|
return r[e];
|
|
} });
|
|
} : function(n, r, e, t) {
|
|
t === void 0 && (t = e), n[t] = r[e];
|
|
}), i = this && this.__exportStar || function(n, r) {
|
|
for (var e in n) e === "default" || Object.prototype.hasOwnProperty.call(r, e) || a(r, n, e);
|
|
};
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), i(f(6035), o);
|
|
}, 1022(d, o) {
|
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.camelKeysToSnake = o.snakeKeysToCamel = o.isObject = void 0;
|
|
var f = function(a) {
|
|
return Array.isArray(a);
|
|
};
|
|
o.isObject = function(a) {
|
|
return a === Object(a) && !f(a) && typeof a != "function";
|
|
}, o.snakeKeysToCamel = function(a) {
|
|
if ((0, o.isObject)(a)) {
|
|
var i = {};
|
|
return Object.keys(a).forEach(function(n) {
|
|
var r;
|
|
i[r = n, r.replace(/([-_][a-z])/gi, function(e) {
|
|
return e.toUpperCase().replace("-", "").replace("_", "");
|
|
})] = (0, o.snakeKeysToCamel)(a[n]);
|
|
}), i;
|
|
}
|
|
return f(a) ? a.map(function(n) {
|
|
return (0, o.snakeKeysToCamel)(n);
|
|
}) : a;
|
|
}, o.camelKeysToSnake = function(a) {
|
|
if ((0, o.isObject)(a)) {
|
|
var i = {};
|
|
return Object.keys(a).forEach(function(n) {
|
|
var r;
|
|
i[r = n, r.replace(/[A-Z]/g, function(e) {
|
|
return "_".concat(e.toLowerCase());
|
|
})] = (0, o.camelKeysToSnake)(a[n]);
|
|
}), i;
|
|
}
|
|
return f(a) ? a.map(function(n) {
|
|
return (0, o.camelKeysToSnake)(n);
|
|
}) : a;
|
|
};
|
|
} }, h = {};
|
|
return (function d(o) {
|
|
var f = h[o];
|
|
if (f !== void 0) return f.exports;
|
|
var a = h[o] = { exports: {} };
|
|
return E[o].call(a.exports, a, a.exports, d), a.exports;
|
|
})(4245);
|
|
})(), N.exports = O();
|
|
}, 4148(N, O, E) {
|
|
var h = E(5606), d = E(6763);
|
|
function o(w) {
|
|
return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(C) {
|
|
return typeof C;
|
|
} : function(C) {
|
|
return C && typeof Symbol == "function" && C.constructor === Symbol && C !== Symbol.prototype ? "symbol" : typeof C;
|
|
}, o(w);
|
|
}
|
|
function f(w, C, R) {
|
|
return Object.defineProperty(w, "prototype", { writable: !1 }), w;
|
|
}
|
|
var a, i, n = E(9597).codes, r = n.ERR_AMBIGUOUS_ARGUMENT, e = n.ERR_INVALID_ARG_TYPE, t = n.ERR_INVALID_ARG_VALUE, c = n.ERR_INVALID_RETURN_VALUE, s = n.ERR_MISSING_ARGS, u = E(3918), p = E(537).inspect, l = E(537).types, v = l.isPromise, y = l.isRegExp, g = E(9133)(), _ = E(9394)(), T = E(8075)("RegExp.prototype.test");
|
|
function b() {
|
|
var w = E(2299);
|
|
a = w.isDeepEqual, i = w.isDeepStrictEqual;
|
|
}
|
|
var A = !1, m = N.exports = F, I = {};
|
|
function P(w) {
|
|
throw w.message instanceof Error ? w.message : new u(w);
|
|
}
|
|
function x(w, C, R, B) {
|
|
if (!R) {
|
|
var D = !1;
|
|
if (C === 0) D = !0, B = "No value argument passed to `assert.ok()`";
|
|
else if (B instanceof Error) throw B;
|
|
var U = new u({ actual: R, expected: !0, message: B, operator: "==", stackStartFn: w });
|
|
throw U.generatedMessage = D, U;
|
|
}
|
|
}
|
|
function F() {
|
|
for (var w = arguments.length, C = new Array(w), R = 0; R < w; R++) C[R] = arguments[R];
|
|
x.apply(void 0, [F, C.length].concat(C));
|
|
}
|
|
m.fail = function w(C, R, B, D, U) {
|
|
var k, G = arguments.length;
|
|
if (G === 0 ? k = "Failed" : G === 1 ? (B = C, C = void 0) : (A === !1 && (A = !0, (h.emitWarning ? h.emitWarning : d.warn.bind(d))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094")), G === 2 && (D = "!=")), B instanceof Error) throw B;
|
|
var V = { actual: C, expected: R, operator: D === void 0 ? "fail" : D, stackStartFn: U || w };
|
|
B !== void 0 && (V.message = B);
|
|
var W = new u(V);
|
|
throw k && (W.message = k, W.generatedMessage = !0), W;
|
|
}, m.AssertionError = u, m.ok = F, m.equal = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
C != R && P({ actual: C, expected: R, message: B, operator: "==", stackStartFn: w });
|
|
}, m.notEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
C == R && P({ actual: C, expected: R, message: B, operator: "!=", stackStartFn: w });
|
|
}, m.deepEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
a === void 0 && b(), a(C, R) || P({ actual: C, expected: R, message: B, operator: "deepEqual", stackStartFn: w });
|
|
}, m.notDeepEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
a === void 0 && b(), a(C, R) && P({ actual: C, expected: R, message: B, operator: "notDeepEqual", stackStartFn: w });
|
|
}, m.deepStrictEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
a === void 0 && b(), i(C, R) || P({ actual: C, expected: R, message: B, operator: "deepStrictEqual", stackStartFn: w });
|
|
}, m.notDeepStrictEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
a === void 0 && b(), i(C, R) && P({ actual: C, expected: R, message: B, operator: "notDeepStrictEqual", stackStartFn: w });
|
|
}, m.strictEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
_(C, R) || P({ actual: C, expected: R, message: B, operator: "strictEqual", stackStartFn: w });
|
|
}, m.notStrictEqual = function w(C, R, B) {
|
|
if (arguments.length < 2) throw new s("actual", "expected");
|
|
_(C, R) && P({ actual: C, expected: R, message: B, operator: "notStrictEqual", stackStartFn: w });
|
|
};
|
|
var K = f(function w(C, R, B) {
|
|
var D = this;
|
|
(function(U, k) {
|
|
if (!(U instanceof k)) throw new TypeError("Cannot call a class as a function");
|
|
})(this, w), R.forEach(function(U) {
|
|
U in C && (B !== void 0 && typeof B[U] == "string" && y(C[U]) && T(C[U], B[U]) ? D[U] = B[U] : D[U] = C[U]);
|
|
});
|
|
});
|
|
function Y(w, C, R, B) {
|
|
if (typeof C != "function") {
|
|
if (y(C)) return T(C, w);
|
|
if (arguments.length === 2) throw new e("expected", ["Function", "RegExp"], C);
|
|
if (o(w) !== "object" || w === null) {
|
|
var D = new u({ actual: w, expected: C, message: R, operator: "deepStrictEqual", stackStartFn: B });
|
|
throw D.operator = B.name, D;
|
|
}
|
|
var U = Object.keys(C);
|
|
if (C instanceof Error) U.push("name", "message");
|
|
else if (U.length === 0) throw new t("error", C, "may not be an empty object");
|
|
return a === void 0 && b(), U.forEach(function(k) {
|
|
typeof w[k] == "string" && y(C[k]) && T(C[k], w[k]) || (function(G, V, W, z, q, $) {
|
|
if (!(W in G) || !i(G[W], V[W])) {
|
|
if (!z) {
|
|
var te = new K(G, q), re = new K(V, q, G), ie = new u({ actual: te, expected: re, operator: "deepStrictEqual", stackStartFn: $ });
|
|
throw ie.actual = G, ie.expected = V, ie.operator = $.name, ie;
|
|
}
|
|
P({ actual: G, expected: V, message: z, operator: $.name, stackStartFn: $ });
|
|
}
|
|
})(w, C, k, R, U, B);
|
|
}), !0;
|
|
}
|
|
return C.prototype !== void 0 && w instanceof C || !Error.isPrototypeOf(C) && C.call({}, w) === !0;
|
|
}
|
|
function Q(w) {
|
|
if (typeof w != "function") throw new e("fn", "Function", w);
|
|
try {
|
|
w();
|
|
} catch (C) {
|
|
return C;
|
|
}
|
|
return I;
|
|
}
|
|
function S(w) {
|
|
return v(w) || w !== null && o(w) === "object" && typeof w.then == "function" && typeof w.catch == "function";
|
|
}
|
|
function M(w) {
|
|
return Promise.resolve().then(function() {
|
|
var C;
|
|
if (typeof w == "function") {
|
|
if (!S(C = w())) throw new c("instance of Promise", "promiseFn", C);
|
|
} else {
|
|
if (!S(w)) throw new e("promiseFn", ["Function", "Promise"], w);
|
|
C = w;
|
|
}
|
|
return Promise.resolve().then(function() {
|
|
return C;
|
|
}).then(function() {
|
|
return I;
|
|
}).catch(function(R) {
|
|
return R;
|
|
});
|
|
});
|
|
}
|
|
function j(w, C, R, B) {
|
|
if (typeof R == "string") {
|
|
if (arguments.length === 4) throw new e("error", ["Object", "Error", "Function", "RegExp"], R);
|
|
if (o(C) === "object" && C !== null) {
|
|
if (C.message === R) throw new r("error/message", 'The error message "'.concat(C.message, '" is identical to the message.'));
|
|
} else if (C === R) throw new r("error/message", 'The error "'.concat(C, '" is identical to the message.'));
|
|
B = R, R = void 0;
|
|
} else if (R != null && o(R) !== "object" && typeof R != "function") throw new e("error", ["Object", "Error", "Function", "RegExp"], R);
|
|
if (C === I) {
|
|
var D = "";
|
|
R && R.name && (D += " (".concat(R.name, ")")), D += B ? ": ".concat(B) : ".";
|
|
var U = w.name === "rejects" ? "rejection" : "exception";
|
|
P({ actual: void 0, expected: R, operator: w.name, message: "Missing expected ".concat(U).concat(D), stackStartFn: w });
|
|
}
|
|
if (R && !Y(C, R, B, w)) throw C;
|
|
}
|
|
function H(w, C, R, B) {
|
|
if (C !== I) {
|
|
if (typeof R == "string" && (B = R, R = void 0), !R || Y(C, R)) {
|
|
var D = B ? ": ".concat(B) : ".", U = w.name === "doesNotReject" ? "rejection" : "exception";
|
|
P({ actual: C, expected: R, operator: w.name, message: "Got unwanted ".concat(U).concat(D, `
|
|
`) + 'Actual message: "'.concat(C && C.message, '"'), stackStartFn: w });
|
|
}
|
|
throw C;
|
|
}
|
|
}
|
|
function Z(w, C, R, B, D) {
|
|
if (!y(C)) throw new e("regexp", "RegExp", C);
|
|
var U = D === "match";
|
|
if (typeof w != "string" || T(C, w) !== U) {
|
|
if (R instanceof Error) throw R;
|
|
var k = !R;
|
|
R = R || (typeof w != "string" ? 'The "string" argument must be of type string. Received type ' + "".concat(o(w), " (").concat(p(w), ")") : (U ? "The input did not match the regular expression " : "The input was expected to not match the regular expression ") + "".concat(p(C), `. Input:
|
|
|
|
`).concat(p(w), `
|
|
`));
|
|
var G = new u({ actual: w, expected: C, message: R, operator: D, stackStartFn: B });
|
|
throw G.generatedMessage = k, G;
|
|
}
|
|
}
|
|
function L() {
|
|
for (var w = arguments.length, C = new Array(w), R = 0; R < w; R++) C[R] = arguments[R];
|
|
x.apply(void 0, [L, C.length].concat(C));
|
|
}
|
|
m.throws = function w(C) {
|
|
for (var R = arguments.length, B = new Array(R > 1 ? R - 1 : 0), D = 1; D < R; D++) B[D - 1] = arguments[D];
|
|
j.apply(void 0, [w, Q(C)].concat(B));
|
|
}, m.rejects = function w(C) {
|
|
for (var R = arguments.length, B = new Array(R > 1 ? R - 1 : 0), D = 1; D < R; D++) B[D - 1] = arguments[D];
|
|
return M(C).then(function(U) {
|
|
return j.apply(void 0, [w, U].concat(B));
|
|
});
|
|
}, m.doesNotThrow = function w(C) {
|
|
for (var R = arguments.length, B = new Array(R > 1 ? R - 1 : 0), D = 1; D < R; D++) B[D - 1] = arguments[D];
|
|
H.apply(void 0, [w, Q(C)].concat(B));
|
|
}, m.doesNotReject = function w(C) {
|
|
for (var R = arguments.length, B = new Array(R > 1 ? R - 1 : 0), D = 1; D < R; D++) B[D - 1] = arguments[D];
|
|
return M(C).then(function(U) {
|
|
return H.apply(void 0, [w, U].concat(B));
|
|
});
|
|
}, m.ifError = function w(C) {
|
|
if (C != null) {
|
|
var R = "ifError got unwanted exception: ";
|
|
o(C) === "object" && typeof C.message == "string" ? C.message.length === 0 && C.constructor ? R += C.constructor.name : R += C.message : R += p(C);
|
|
var B = new u({ actual: C, expected: null, operator: "ifError", message: R, stackStartFn: w }), D = C.stack;
|
|
if (typeof D == "string") {
|
|
var U = D.split(`
|
|
`);
|
|
U.shift();
|
|
for (var k = B.stack.split(`
|
|
`), G = 0; G < U.length; G++) {
|
|
var V = k.indexOf(U[G]);
|
|
if (V !== -1) {
|
|
k = k.slice(0, V);
|
|
break;
|
|
}
|
|
}
|
|
B.stack = "".concat(k.join(`
|
|
`), `
|
|
`).concat(U.join(`
|
|
`));
|
|
}
|
|
throw B;
|
|
}
|
|
}, m.match = function w(C, R, B) {
|
|
Z(C, R, B, w, "match");
|
|
}, m.doesNotMatch = function w(C, R, B) {
|
|
Z(C, R, B, w, "doesNotMatch");
|
|
}, m.strict = g(L, m, { equal: m.strictEqual, deepEqual: m.deepStrictEqual, notEqual: m.notStrictEqual, notDeepEqual: m.notDeepStrictEqual }), m.strict.strict = m.strict;
|
|
}, 3918(N, O, E) {
|
|
var h = E(5606);
|
|
function d(P, x) {
|
|
var F = Object.keys(P);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var K = Object.getOwnPropertySymbols(P);
|
|
x && (K = K.filter(function(Y) {
|
|
return Object.getOwnPropertyDescriptor(P, Y).enumerable;
|
|
})), F.push.apply(F, K);
|
|
}
|
|
return F;
|
|
}
|
|
function o(P) {
|
|
for (var x = 1; x < arguments.length; x++) {
|
|
var F = arguments[x] != null ? arguments[x] : {};
|
|
x % 2 ? d(Object(F), !0).forEach(function(K) {
|
|
var Y, Q, S;
|
|
Y = P, Q = K, S = F[K], (Q = a(Q)) in Y ? Object.defineProperty(Y, Q, { value: S, enumerable: !0, configurable: !0, writable: !0 }) : Y[Q] = S;
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(P, Object.getOwnPropertyDescriptors(F)) : d(Object(F)).forEach(function(K) {
|
|
Object.defineProperty(P, K, Object.getOwnPropertyDescriptor(F, K));
|
|
});
|
|
}
|
|
return P;
|
|
}
|
|
function f(P, x) {
|
|
for (var F = 0; F < x.length; F++) {
|
|
var K = x[F];
|
|
K.enumerable = K.enumerable || !1, K.configurable = !0, "value" in K && (K.writable = !0), Object.defineProperty(P, a(K.key), K);
|
|
}
|
|
}
|
|
function a(P) {
|
|
var x = (function(F) {
|
|
if (u(F) !== "object" || F === null) return F;
|
|
var K = F[Symbol.toPrimitive];
|
|
if (K !== void 0) {
|
|
var Y = K.call(F, "string");
|
|
if (u(Y) !== "object") return Y;
|
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
}
|
|
return String(F);
|
|
})(P);
|
|
return u(x) === "symbol" ? x : String(x);
|
|
}
|
|
function i(P, x) {
|
|
if (x && (u(x) === "object" || typeof x == "function")) return x;
|
|
if (x !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
return n(P);
|
|
}
|
|
function n(P) {
|
|
if (P === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
return P;
|
|
}
|
|
function r(P) {
|
|
var x = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
return r = function(F) {
|
|
if (F === null || (K = F, Function.toString.call(K).indexOf("[native code]") === -1)) return F;
|
|
var K;
|
|
if (typeof F != "function") throw new TypeError("Super expression must either be null or a function");
|
|
if (x !== void 0) {
|
|
if (x.has(F)) return x.get(F);
|
|
x.set(F, Y);
|
|
}
|
|
function Y() {
|
|
return e(F, arguments, s(this).constructor);
|
|
}
|
|
return Y.prototype = Object.create(F.prototype, { constructor: { value: Y, enumerable: !1, writable: !0, configurable: !0 } }), c(Y, F);
|
|
}, r(P);
|
|
}
|
|
function e(P, x, F) {
|
|
return e = t() ? Reflect.construct.bind() : function(K, Y, Q) {
|
|
var S = [null];
|
|
S.push.apply(S, Y);
|
|
var M = new (Function.bind.apply(K, S))();
|
|
return Q && c(M, Q.prototype), M;
|
|
}, e.apply(null, arguments);
|
|
}
|
|
function t() {
|
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
if (typeof Proxy == "function") return !0;
|
|
try {
|
|
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
})), !0;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}
|
|
function c(P, x) {
|
|
return c = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(F, K) {
|
|
return F.__proto__ = K, F;
|
|
}, c(P, x);
|
|
}
|
|
function s(P) {
|
|
return s = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(x) {
|
|
return x.__proto__ || Object.getPrototypeOf(x);
|
|
}, s(P);
|
|
}
|
|
function u(P) {
|
|
return u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(x) {
|
|
return typeof x;
|
|
} : function(x) {
|
|
return x && typeof Symbol == "function" && x.constructor === Symbol && x !== Symbol.prototype ? "symbol" : typeof x;
|
|
}, u(P);
|
|
}
|
|
var p = E(537).inspect, l = E(9597).codes.ERR_INVALID_ARG_TYPE;
|
|
function v(P, x, F) {
|
|
return (F === void 0 || F > P.length) && (F = P.length), P.substring(F - x.length, F) === x;
|
|
}
|
|
var y = "", g = "", _ = "", T = "", b = { deepStrictEqual: "Expected values to be strictly deep-equal:", strictEqual: "Expected values to be strictly equal:", strictEqualObject: 'Expected "actual" to be reference-equal to "expected":', deepEqual: "Expected values to be loosely deep-equal:", equal: "Expected values to be loosely equal:", notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:', notStrictEqual: 'Expected "actual" to be strictly unequal to:', notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":', notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', notEqual: 'Expected "actual" to be loosely unequal to:', notIdentical: "Values identical but not reference-equal:" };
|
|
function A(P) {
|
|
var x = Object.keys(P), F = Object.create(Object.getPrototypeOf(P));
|
|
return x.forEach(function(K) {
|
|
F[K] = P[K];
|
|
}), Object.defineProperty(F, "message", { value: P.message }), F;
|
|
}
|
|
function m(P) {
|
|
return p(P, { compact: !1, customInspect: !1, depth: 1e3, maxArrayLength: 1 / 0, showHidden: !1, breakLength: 1 / 0, showProxy: !1, sorted: !0, getters: !0 });
|
|
}
|
|
var I = (function(P, x) {
|
|
(function(j, H) {
|
|
if (typeof H != "function" && H !== null) throw new TypeError("Super expression must either be null or a function");
|
|
j.prototype = Object.create(H && H.prototype, { constructor: { value: j, writable: !0, configurable: !0 } }), Object.defineProperty(j, "prototype", { writable: !1 }), H && c(j, H);
|
|
})(M, P);
|
|
var F, K, Y, Q, S = (F = M, K = t(), function() {
|
|
var j, H = s(F);
|
|
if (K) {
|
|
var Z = s(this).constructor;
|
|
j = Reflect.construct(H, arguments, Z);
|
|
} else j = H.apply(this, arguments);
|
|
return i(this, j);
|
|
});
|
|
function M(j) {
|
|
var H;
|
|
if ((function(W, z) {
|
|
if (!(W instanceof z)) throw new TypeError("Cannot call a class as a function");
|
|
})(this, M), u(j) !== "object" || j === null) throw new l("options", "Object", j);
|
|
var Z = j.message, L = j.operator, w = j.stackStartFn, C = j.actual, R = j.expected, B = Error.stackTraceLimit;
|
|
if (Error.stackTraceLimit = 0, Z != null) H = S.call(this, String(Z));
|
|
else if (h.stderr && h.stderr.isTTY && (h.stderr && h.stderr.getColorDepth && h.stderr.getColorDepth() !== 1 ? (y = "\x1B[34m", g = "\x1B[32m", T = "\x1B[39m", _ = "\x1B[31m") : (y = "", g = "", T = "", _ = "")), u(C) === "object" && C !== null && u(R) === "object" && R !== null && "stack" in C && C instanceof Error && "stack" in R && R instanceof Error && (C = A(C), R = A(R)), L === "deepStrictEqual" || L === "strictEqual") H = S.call(this, (function(W, z, q) {
|
|
var $ = "", te = "", re = 0, ie = "", ue = !1, ne = m(W), X = ne.split(`
|
|
`), ee = m(z).split(`
|
|
`), J = 0, ce = "";
|
|
if (q === "strictEqual" && u(W) === "object" && u(z) === "object" && W !== null && z !== null && (q = "strictEqualObject"), X.length === 1 && ee.length === 1 && X[0] !== ee[0]) {
|
|
var _e = X[0].length + ee[0].length;
|
|
if (_e <= 10) {
|
|
if (!(u(W) === "object" && W !== null || u(z) === "object" && z !== null || W === 0 && z === 0)) return "".concat(b[q], `
|
|
|
|
`) + "".concat(X[0], " !== ").concat(ee[0], `
|
|
`);
|
|
} else if (q !== "strictEqualObject" && _e < (h.stderr && h.stderr.isTTY ? h.stderr.columns : 80)) {
|
|
for (; X[0][J] === ee[0][J]; ) J++;
|
|
J > 2 && (ce = `
|
|
`.concat((function(oe, Ee) {
|
|
if (Ee = Math.floor(Ee), oe.length == 0 || Ee == 0) return "";
|
|
var Se = oe.length * Ee;
|
|
for (Ee = Math.floor(Math.log(Ee) / Math.log(2)); Ee; ) oe += oe, Ee--;
|
|
return oe + oe.substring(0, Se - oe.length);
|
|
})(" ", J), "^"), J = 0);
|
|
}
|
|
}
|
|
for (var pe = X[X.length - 1], ye = ee[ee.length - 1]; pe === ye && (J++ < 2 ? ie = `
|
|
`.concat(pe).concat(ie) : $ = pe, X.pop(), ee.pop(), X.length !== 0 && ee.length !== 0); ) pe = X[X.length - 1], ye = ee[ee.length - 1];
|
|
var Te = Math.max(X.length, ee.length);
|
|
if (Te === 0) {
|
|
var ae = ne.split(`
|
|
`);
|
|
if (ae.length > 30) for (ae[26] = "".concat(y, "...").concat(T); ae.length > 27; ) ae.pop();
|
|
return "".concat(b.notIdentical, `
|
|
|
|
`).concat(ae.join(`
|
|
`), `
|
|
`);
|
|
}
|
|
J > 3 && (ie = `
|
|
`.concat(y, "...").concat(T).concat(ie), ue = !0), $ !== "" && (ie = `
|
|
`.concat($).concat(ie), $ = "");
|
|
var le = 0, ve = b[q] + `
|
|
`.concat(g, "+ actual").concat(T, " ").concat(_, "- expected").concat(T), Oe = " ".concat(y, "...").concat(T, " Lines skipped");
|
|
for (J = 0; J < Te; J++) {
|
|
var se = J - re;
|
|
if (X.length < J + 1) se > 1 && J > 2 && (se > 4 ? (te += `
|
|
`.concat(y, "...").concat(T), ue = !0) : se > 3 && (te += `
|
|
`.concat(ee[J - 2]), le++), te += `
|
|
`.concat(ee[J - 1]), le++), re = J, $ += `
|
|
`.concat(_, "-").concat(T, " ").concat(ee[J]), le++;
|
|
else if (ee.length < J + 1) se > 1 && J > 2 && (se > 4 ? (te += `
|
|
`.concat(y, "...").concat(T), ue = !0) : se > 3 && (te += `
|
|
`.concat(X[J - 2]), le++), te += `
|
|
`.concat(X[J - 1]), le++), re = J, te += `
|
|
`.concat(g, "+").concat(T, " ").concat(X[J]), le++;
|
|
else {
|
|
var de = ee[J], fe = X[J], ge = fe !== de && (!v(fe, ",") || fe.slice(0, -1) !== de);
|
|
ge && v(de, ",") && de.slice(0, -1) === fe && (ge = !1, fe += ","), ge ? (se > 1 && J > 2 && (se > 4 ? (te += `
|
|
`.concat(y, "...").concat(T), ue = !0) : se > 3 && (te += `
|
|
`.concat(X[J - 2]), le++), te += `
|
|
`.concat(X[J - 1]), le++), re = J, te += `
|
|
`.concat(g, "+").concat(T, " ").concat(fe), $ += `
|
|
`.concat(_, "-").concat(T, " ").concat(de), le += 2) : (te += $, $ = "", se !== 1 && J !== 0 || (te += `
|
|
`.concat(fe), le++));
|
|
}
|
|
if (le > 20 && J < Te - 2) return "".concat(ve).concat(Oe, `
|
|
`).concat(te, `
|
|
`).concat(y, "...").concat(T).concat($, `
|
|
`) + "".concat(y, "...").concat(T);
|
|
}
|
|
return "".concat(ve).concat(ue ? Oe : "", `
|
|
`).concat(te).concat($).concat(ie).concat(ce);
|
|
})(C, R, L));
|
|
else if (L === "notDeepStrictEqual" || L === "notStrictEqual") {
|
|
var D = b[L], U = m(C).split(`
|
|
`);
|
|
if (L === "notStrictEqual" && u(C) === "object" && C !== null && (D = b.notStrictEqualObject), U.length > 30) for (U[26] = "".concat(y, "...").concat(T); U.length > 27; ) U.pop();
|
|
H = U.length === 1 ? S.call(this, "".concat(D, " ").concat(U[0])) : S.call(this, "".concat(D, `
|
|
|
|
`).concat(U.join(`
|
|
`), `
|
|
`));
|
|
} else {
|
|
var k = m(C), G = "", V = b[L];
|
|
L === "notDeepEqual" || L === "notEqual" ? (k = "".concat(b[L], `
|
|
|
|
`).concat(k)).length > 1024 && (k = "".concat(k.slice(0, 1021), "...")) : (G = "".concat(m(R)), k.length > 512 && (k = "".concat(k.slice(0, 509), "...")), G.length > 512 && (G = "".concat(G.slice(0, 509), "...")), L === "deepEqual" || L === "equal" ? k = "".concat(V, `
|
|
|
|
`).concat(k, `
|
|
|
|
should equal
|
|
|
|
`) : G = " ".concat(L, " ").concat(G)), H = S.call(this, "".concat(k).concat(G));
|
|
}
|
|
return Error.stackTraceLimit = B, H.generatedMessage = !Z, Object.defineProperty(n(H), "name", { value: "AssertionError [ERR_ASSERTION]", enumerable: !1, writable: !0, configurable: !0 }), H.code = "ERR_ASSERTION", H.actual = C, H.expected = R, H.operator = L, Error.captureStackTrace && Error.captureStackTrace(n(H), w), H.stack, H.name = "AssertionError", i(H);
|
|
}
|
|
return Y = M, (Q = [{ key: "toString", value: function() {
|
|
return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
|
|
} }, { key: x, value: function(j, H) {
|
|
return p(this, o(o({}, H), {}, { customInspect: !1, depth: 0 }));
|
|
} }]) && f(Y.prototype, Q), Object.defineProperty(Y, "prototype", { writable: !1 }), M;
|
|
})(r(Error), p.custom);
|
|
N.exports = I;
|
|
}, 9597(N, O, E) {
|
|
function h(e) {
|
|
return h = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
return typeof t;
|
|
} : function(t) {
|
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
}, h(e);
|
|
}
|
|
function d(e, t) {
|
|
return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(c, s) {
|
|
return c.__proto__ = s, c;
|
|
}, d(e, t);
|
|
}
|
|
function o(e) {
|
|
return o = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
}, o(e);
|
|
}
|
|
var f, a, i = {};
|
|
function n(e, t, c) {
|
|
c || (c = Error);
|
|
var s = (function(u) {
|
|
(function(_, T) {
|
|
if (typeof T != "function" && T !== null) throw new TypeError("Super expression must either be null or a function");
|
|
_.prototype = Object.create(T && T.prototype, { constructor: { value: _, writable: !0, configurable: !0 } }), Object.defineProperty(_, "prototype", { writable: !1 }), T && d(_, T);
|
|
})(g, u);
|
|
var p, l, v, y = (l = g, v = (function() {
|
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
if (typeof Proxy == "function") return !0;
|
|
try {
|
|
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
})), !0;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
})(), function() {
|
|
var _, T = o(l);
|
|
if (v) {
|
|
var b = o(this).constructor;
|
|
_ = Reflect.construct(T, arguments, b);
|
|
} else _ = T.apply(this, arguments);
|
|
return (function(A, m) {
|
|
if (m && (h(m) === "object" || typeof m == "function")) return m;
|
|
if (m !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
return (function(I) {
|
|
if (I === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
return I;
|
|
})(A);
|
|
})(this, _);
|
|
});
|
|
function g(_, T, b) {
|
|
var A;
|
|
return (function(m, I) {
|
|
if (!(m instanceof I)) throw new TypeError("Cannot call a class as a function");
|
|
})(this, g), A = y.call(this, (function(m, I, P) {
|
|
return typeof t == "string" ? t : t(m, I, P);
|
|
})(_, T, b)), A.code = e, A;
|
|
}
|
|
return p = g, Object.defineProperty(p, "prototype", { writable: !1 }), p;
|
|
})(c);
|
|
i[e] = s;
|
|
}
|
|
function r(e, t) {
|
|
if (Array.isArray(e)) {
|
|
var c = e.length;
|
|
return e = e.map(function(s) {
|
|
return String(s);
|
|
}), c > 2 ? "one of ".concat(t, " ").concat(e.slice(0, c - 1).join(", "), ", or ") + e[c - 1] : c === 2 ? "one of ".concat(t, " ").concat(e[0], " or ").concat(e[1]) : "of ".concat(t, " ").concat(e[0]);
|
|
}
|
|
return "of ".concat(t, " ").concat(String(e));
|
|
}
|
|
n("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError), n("ERR_INVALID_ARG_TYPE", function(e, t, c) {
|
|
var s, u, p, l, v;
|
|
if (f === void 0 && (f = E(4148)), f(typeof e == "string", "'name' must be a string"), typeof t == "string" && (u = "not ", t.substr(0, 4) === u) ? (s = "must not be", t = t.replace(/^not /, "")) : s = "must be", (function(g, _, T) {
|
|
return (T === void 0 || T > g.length) && (T = g.length), g.substring(T - 9, T) === _;
|
|
})(e, " argument")) p = "The ".concat(e, " ").concat(s, " ").concat(r(t, "type"));
|
|
else {
|
|
var y = (typeof v != "number" && (v = 0), v + 1 > (l = e).length || l.indexOf(".", v) === -1 ? "argument" : "property");
|
|
p = 'The "'.concat(e, '" ').concat(y, " ").concat(s, " ").concat(r(t, "type"));
|
|
}
|
|
return p + ". Received type ".concat(h(c));
|
|
}, TypeError), n("ERR_INVALID_ARG_VALUE", function(e, t) {
|
|
var c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
|
|
a === void 0 && (a = E(537));
|
|
var s = a.inspect(t);
|
|
return s.length > 128 && (s = "".concat(s.slice(0, 128), "...")), "The argument '".concat(e, "' ").concat(c, ". Received ").concat(s);
|
|
}, TypeError), n("ERR_INVALID_RETURN_VALUE", function(e, t, c) {
|
|
var s;
|
|
return s = c && c.constructor && c.constructor.name ? "instance of ".concat(c.constructor.name) : "type ".concat(h(c)), "Expected ".concat(e, ' to be returned from the "').concat(t, '"') + " function but got ".concat(s, ".");
|
|
}, TypeError), n("ERR_MISSING_ARGS", function() {
|
|
for (var e = arguments.length, t = new Array(e), c = 0; c < e; c++) t[c] = arguments[c];
|
|
f === void 0 && (f = E(4148)), f(t.length > 0, "At least one arg needs to be specified");
|
|
var s = "The ", u = t.length;
|
|
switch (t = t.map(function(p) {
|
|
return '"'.concat(p, '"');
|
|
}), u) {
|
|
case 1:
|
|
s += "".concat(t[0], " argument");
|
|
break;
|
|
case 2:
|
|
s += "".concat(t[0], " and ").concat(t[1], " arguments");
|
|
break;
|
|
default:
|
|
s += t.slice(0, u - 1).join(", "), s += ", and ".concat(t[u - 1], " arguments");
|
|
}
|
|
return "".concat(s, " must be specified");
|
|
}, TypeError), N.exports.codes = i;
|
|
}, 2299(N, O, E) {
|
|
function h(D, U) {
|
|
return (function(k) {
|
|
if (Array.isArray(k)) return k;
|
|
})(D) || (function(k, G) {
|
|
var V = k == null ? null : typeof Symbol < "u" && k[Symbol.iterator] || k["@@iterator"];
|
|
if (V != null) {
|
|
var W, z, q, $, te = [], re = !0, ie = !1;
|
|
try {
|
|
if (q = (V = V.call(k)).next, G !== 0) for (; !(re = (W = q.call(V)).done) && (te.push(W.value), te.length !== G); re = !0) ;
|
|
} catch (ue) {
|
|
ie = !0, z = ue;
|
|
} finally {
|
|
try {
|
|
if (!re && V.return != null && ($ = V.return(), Object($) !== $)) return;
|
|
} finally {
|
|
if (ie) throw z;
|
|
}
|
|
}
|
|
return te;
|
|
}
|
|
})(D, U) || (function(k, G) {
|
|
if (k) {
|
|
if (typeof k == "string") return d(k, G);
|
|
var V = Object.prototype.toString.call(k).slice(8, -1);
|
|
return V === "Object" && k.constructor && (V = k.constructor.name), V === "Map" || V === "Set" ? Array.from(k) : V === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V) ? d(k, G) : void 0;
|
|
}
|
|
})(D, U) || (function() {
|
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
})();
|
|
}
|
|
function d(D, U) {
|
|
(U == null || U > D.length) && (U = D.length);
|
|
for (var k = 0, G = new Array(U); k < U; k++) G[k] = D[k];
|
|
return G;
|
|
}
|
|
function o(D) {
|
|
return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(U) {
|
|
return typeof U;
|
|
} : function(U) {
|
|
return U && typeof Symbol == "function" && U.constructor === Symbol && U !== Symbol.prototype ? "symbol" : typeof U;
|
|
}, o(D);
|
|
}
|
|
var f = /a/g.flags !== void 0, a = function(D) {
|
|
var U = [];
|
|
return D.forEach(function(k) {
|
|
return U.push(k);
|
|
}), U;
|
|
}, i = function(D) {
|
|
var U = [];
|
|
return D.forEach(function(k, G) {
|
|
return U.push([G, k]);
|
|
}), U;
|
|
}, n = Object.is ? Object.is : E(7653), r = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
|
|
return [];
|
|
}, e = Number.isNaN ? Number.isNaN : E(4133);
|
|
function t(D) {
|
|
return D.call.bind(D);
|
|
}
|
|
var c = t(Object.prototype.hasOwnProperty), s = t(Object.prototype.propertyIsEnumerable), u = t(Object.prototype.toString), p = E(537).types, l = p.isAnyArrayBuffer, v = p.isArrayBufferView, y = p.isDate, g = p.isMap, _ = p.isRegExp, T = p.isSet, b = p.isNativeError, A = p.isBoxedPrimitive, m = p.isNumberObject, I = p.isStringObject, P = p.isBooleanObject, x = p.isBigIntObject, F = p.isSymbolObject, K = p.isFloat32Array, Y = p.isFloat64Array;
|
|
function Q(D) {
|
|
if (D.length === 0 || D.length > 10) return !0;
|
|
for (var U = 0; U < D.length; U++) {
|
|
var k = D.charCodeAt(U);
|
|
if (k < 48 || k > 57) return !0;
|
|
}
|
|
return D.length === 10 && D >= Math.pow(2, 32);
|
|
}
|
|
function S(D) {
|
|
return Object.keys(D).filter(Q).concat(r(D).filter(Object.prototype.propertyIsEnumerable.bind(D)));
|
|
}
|
|
function M(D, U) {
|
|
if (D === U) return 0;
|
|
for (var k = D.length, G = U.length, V = 0, W = Math.min(k, G); V < W; ++V) if (D[V] !== U[V]) {
|
|
k = D[V], G = U[V];
|
|
break;
|
|
}
|
|
return k < G ? -1 : G < k ? 1 : 0;
|
|
}
|
|
function j(D, U, k, G) {
|
|
if (D === U) return D !== 0 || !k || n(D, U);
|
|
if (k) {
|
|
if (o(D) !== "object") return typeof D == "number" && e(D) && e(U);
|
|
if (o(U) !== "object" || D === null || U === null || Object.getPrototypeOf(D) !== Object.getPrototypeOf(U)) return !1;
|
|
} else {
|
|
if (D === null || o(D) !== "object") return (U === null || o(U) !== "object") && D == U;
|
|
if (U === null || o(U) !== "object") return !1;
|
|
}
|
|
var V, W, z, q, $ = u(D);
|
|
if ($ !== u(U)) return !1;
|
|
if (Array.isArray(D)) {
|
|
if (D.length !== U.length) return !1;
|
|
var te = S(D), re = S(U);
|
|
return te.length === re.length && Z(D, U, k, G, 1, te);
|
|
}
|
|
if ($ === "[object Object]" && (!g(D) && g(U) || !T(D) && T(U))) return !1;
|
|
if (y(D)) {
|
|
if (!y(U) || Date.prototype.getTime.call(D) !== Date.prototype.getTime.call(U)) return !1;
|
|
} else if (_(D)) {
|
|
if (!_(U) || (z = D, q = U, !(f ? z.source === q.source && z.flags === q.flags : RegExp.prototype.toString.call(z) === RegExp.prototype.toString.call(q)))) return !1;
|
|
} else if (b(D) || D instanceof Error) {
|
|
if (D.message !== U.message || D.name !== U.name) return !1;
|
|
} else {
|
|
if (v(D)) {
|
|
if (k || !K(D) && !Y(D)) {
|
|
if (!(function(ne, X) {
|
|
return ne.byteLength === X.byteLength && M(new Uint8Array(ne.buffer, ne.byteOffset, ne.byteLength), new Uint8Array(X.buffer, X.byteOffset, X.byteLength)) === 0;
|
|
})(D, U)) return !1;
|
|
} else if (!(function(ne, X) {
|
|
if (ne.byteLength !== X.byteLength) return !1;
|
|
for (var ee = 0; ee < ne.byteLength; ee++) if (ne[ee] !== X[ee]) return !1;
|
|
return !0;
|
|
})(D, U)) return !1;
|
|
var ie = S(D), ue = S(U);
|
|
return ie.length === ue.length && Z(D, U, k, G, 0, ie);
|
|
}
|
|
if (T(D)) return !(!T(U) || D.size !== U.size) && Z(D, U, k, G, 2);
|
|
if (g(D)) return !(!g(U) || D.size !== U.size) && Z(D, U, k, G, 3);
|
|
if (l(D)) {
|
|
if (W = U, (V = D).byteLength !== W.byteLength || M(new Uint8Array(V), new Uint8Array(W)) !== 0) return !1;
|
|
} else if (A(D) && !(function(ne, X) {
|
|
return m(ne) ? m(X) && n(Number.prototype.valueOf.call(ne), Number.prototype.valueOf.call(X)) : I(ne) ? I(X) && String.prototype.valueOf.call(ne) === String.prototype.valueOf.call(X) : P(ne) ? P(X) && Boolean.prototype.valueOf.call(ne) === Boolean.prototype.valueOf.call(X) : x(ne) ? x(X) && BigInt.prototype.valueOf.call(ne) === BigInt.prototype.valueOf.call(X) : F(X) && Symbol.prototype.valueOf.call(ne) === Symbol.prototype.valueOf.call(X);
|
|
})(D, U)) return !1;
|
|
}
|
|
return Z(D, U, k, G, 0);
|
|
}
|
|
function H(D, U) {
|
|
return U.filter(function(k) {
|
|
return s(D, k);
|
|
});
|
|
}
|
|
function Z(D, U, k, G, V, W) {
|
|
if (arguments.length === 5) {
|
|
W = Object.keys(D);
|
|
var z = Object.keys(U);
|
|
if (W.length !== z.length) return !1;
|
|
}
|
|
for (var q = 0; q < W.length; q++) if (!c(U, W[q])) return !1;
|
|
if (k && arguments.length === 5) {
|
|
var $ = r(D);
|
|
if ($.length !== 0) {
|
|
var te = 0;
|
|
for (q = 0; q < $.length; q++) {
|
|
var re = $[q];
|
|
if (s(D, re)) {
|
|
if (!s(U, re)) return !1;
|
|
W.push(re), te++;
|
|
} else if (s(U, re)) return !1;
|
|
}
|
|
var ie = r(U);
|
|
if ($.length !== ie.length && H(U, ie).length !== te) return !1;
|
|
} else {
|
|
var ue = r(U);
|
|
if (ue.length !== 0 && H(U, ue).length !== 0) return !1;
|
|
}
|
|
}
|
|
if (W.length === 0 && (V === 0 || V === 1 && D.length === 0 || D.size === 0)) return !0;
|
|
if (G === void 0) G = { val1: /* @__PURE__ */ new Map(), val2: /* @__PURE__ */ new Map(), position: 0 };
|
|
else {
|
|
var ne = G.val1.get(D);
|
|
if (ne !== void 0) {
|
|
var X = G.val2.get(U);
|
|
if (X !== void 0) return ne === X;
|
|
}
|
|
G.position++;
|
|
}
|
|
G.val1.set(D, G.position), G.val2.set(U, G.position);
|
|
var ee = (function(J, ce, _e, pe, ye, Te) {
|
|
var ae = 0;
|
|
if (Te === 2) {
|
|
if (!(function(se, de, fe, ge) {
|
|
for (var oe = null, Ee = a(se), Se = 0; Se < Ee.length; Se++) {
|
|
var be = Ee[Se];
|
|
if (o(be) === "object" && be !== null) oe === null && (oe = /* @__PURE__ */ new Set()), oe.add(be);
|
|
else if (!de.has(be)) {
|
|
if (fe || !C(se, de, be)) return !1;
|
|
oe === null && (oe = /* @__PURE__ */ new Set()), oe.add(be);
|
|
}
|
|
}
|
|
if (oe !== null) {
|
|
for (var he = a(de), Re = 0; Re < he.length; Re++) {
|
|
var Ne = he[Re];
|
|
if (o(Ne) === "object" && Ne !== null) {
|
|
if (!L(oe, Ne, fe, ge)) return !1;
|
|
} else if (!fe && !se.has(Ne) && !L(oe, Ne, fe, ge)) return !1;
|
|
}
|
|
return oe.size === 0;
|
|
}
|
|
return !0;
|
|
})(J, ce, _e, ye)) return !1;
|
|
} else if (Te === 3) {
|
|
if (!(function(se, de, fe, ge) {
|
|
for (var oe = null, Ee = i(se), Se = 0; Se < Ee.length; Se++) {
|
|
var be = h(Ee[Se], 2), he = be[0], Re = be[1];
|
|
if (o(he) === "object" && he !== null) oe === null && (oe = /* @__PURE__ */ new Set()), oe.add(he);
|
|
else {
|
|
var Ne = de.get(he);
|
|
if (Ne === void 0 && !de.has(he) || !j(Re, Ne, fe, ge)) {
|
|
if (fe || !R(se, de, he, Re, ge)) return !1;
|
|
oe === null && (oe = /* @__PURE__ */ new Set()), oe.add(he);
|
|
}
|
|
}
|
|
}
|
|
if (oe !== null) {
|
|
for (var Le = i(de), Pe = 0; Pe < Le.length; Pe++) {
|
|
var Me = h(Le[Pe], 2), me = Me[0], De = Me[1];
|
|
if (o(me) === "object" && me !== null) {
|
|
if (!B(oe, se, me, De, fe, ge)) return !1;
|
|
} else if (!(fe || se.has(me) && j(se.get(me), De, !1, ge) || B(oe, se, me, De, !1, ge))) return !1;
|
|
}
|
|
return oe.size === 0;
|
|
}
|
|
return !0;
|
|
})(J, ce, _e, ye)) return !1;
|
|
} else if (Te === 1) for (; ae < J.length; ae++) {
|
|
if (!c(J, ae)) {
|
|
if (c(ce, ae)) return !1;
|
|
for (var le = Object.keys(J); ae < le.length; ae++) {
|
|
var ve = le[ae];
|
|
if (!c(ce, ve) || !j(J[ve], ce[ve], _e, ye)) return !1;
|
|
}
|
|
return le.length === Object.keys(ce).length;
|
|
}
|
|
if (!c(ce, ae) || !j(J[ae], ce[ae], _e, ye)) return !1;
|
|
}
|
|
for (ae = 0; ae < pe.length; ae++) {
|
|
var Oe = pe[ae];
|
|
if (!j(J[Oe], ce[Oe], _e, ye)) return !1;
|
|
}
|
|
return !0;
|
|
})(D, U, k, W, G, V);
|
|
return G.val1.delete(D), G.val2.delete(U), ee;
|
|
}
|
|
function L(D, U, k, G) {
|
|
for (var V = a(D), W = 0; W < V.length; W++) {
|
|
var z = V[W];
|
|
if (j(U, z, k, G)) return D.delete(z), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
function w(D) {
|
|
switch (o(D)) {
|
|
case "undefined":
|
|
return null;
|
|
case "object":
|
|
return;
|
|
case "symbol":
|
|
return !1;
|
|
case "string":
|
|
D = +D;
|
|
case "number":
|
|
if (e(D)) return !1;
|
|
}
|
|
return !0;
|
|
}
|
|
function C(D, U, k) {
|
|
var G = w(k);
|
|
return G ?? (U.has(G) && !D.has(G));
|
|
}
|
|
function R(D, U, k, G, V) {
|
|
var W = w(k);
|
|
if (W != null) return W;
|
|
var z = U.get(W);
|
|
return !(z === void 0 && !U.has(W) || !j(G, z, !1, V)) && !D.has(W) && j(G, z, !1, V);
|
|
}
|
|
function B(D, U, k, G, V, W) {
|
|
for (var z = a(D), q = 0; q < z.length; q++) {
|
|
var $ = z[q];
|
|
if (j(k, $, V, W) && j(G, U.get($), V, W)) return D.delete($), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
N.exports = { isDeepEqual: function(D, U) {
|
|
return j(D, U, !1);
|
|
}, isDeepStrictEqual: function(D, U) {
|
|
return j(D, U, !0);
|
|
} };
|
|
}, 3144(N, O, E) {
|
|
var h = E(6743), d = E(1002), o = E(76), f = E(7119);
|
|
N.exports = f || h.call(o, d);
|
|
}, 2205(N, O, E) {
|
|
var h = E(6743), d = E(1002), o = E(3144);
|
|
N.exports = function() {
|
|
return o(h, d, arguments);
|
|
};
|
|
}, 1002(N) {
|
|
N.exports = Function.prototype.apply;
|
|
}, 76(N) {
|
|
N.exports = Function.prototype.call;
|
|
}, 3126(N, O, E) {
|
|
var h = E(6743), d = E(9675), o = E(76), f = E(3144);
|
|
N.exports = function(a) {
|
|
if (a.length < 1 || typeof a[0] != "function") throw new d("a function is required");
|
|
return f(h, o, a);
|
|
};
|
|
}, 7119(N) {
|
|
N.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
}, 8075(N, O, E) {
|
|
var h = E(453), d = E(487), o = d(h("String.prototype.indexOf"));
|
|
N.exports = function(f, a) {
|
|
var i = h(f, !!a);
|
|
return typeof i == "function" && o(f, ".prototype.") > -1 ? d(i) : i;
|
|
};
|
|
}, 487(N, O, E) {
|
|
var h = E(6897), d = E(655), o = E(3126), f = E(2205);
|
|
N.exports = function(a) {
|
|
var i = o(arguments), n = a.length - (arguments.length - 1);
|
|
return h(i, 1 + (n > 0 ? n : 0), !0);
|
|
}, d ? d(N.exports, "apply", { value: f }) : N.exports.apply = f;
|
|
}, 6556(N, O, E) {
|
|
var h = E(453), d = E(3126), o = d([h("%String.prototype.indexOf%")]);
|
|
N.exports = function(f, a) {
|
|
var i = h(f, !!a);
|
|
return typeof i == "function" && o(f, ".prototype.") > -1 ? d([i]) : i;
|
|
};
|
|
}, 6763(N, O, E) {
|
|
var h = E(537), d = E(4148);
|
|
function o() {
|
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
}
|
|
var f, a = Array.prototype.slice, i = {};
|
|
f = E.g !== void 0 && E.g.console ? E.g.console : typeof window < "u" && window.console ? window.console : {};
|
|
for (var n = [[function() {
|
|
}, "log"], [function() {
|
|
f.log.apply(f, arguments);
|
|
}, "info"], [function() {
|
|
f.log.apply(f, arguments);
|
|
}, "warn"], [function() {
|
|
f.warn.apply(f, arguments);
|
|
}, "error"], [function(s) {
|
|
i[s] = o();
|
|
}, "time"], [function(s) {
|
|
var u = i[s];
|
|
if (!u) throw new Error("No such label: " + s);
|
|
delete i[s];
|
|
var p = o() - u;
|
|
f.log(s + ": " + p + "ms");
|
|
}, "timeEnd"], [function() {
|
|
var s = new Error();
|
|
s.name = "Trace", s.message = h.format.apply(null, arguments), f.error(s.stack);
|
|
}, "trace"], [function(s) {
|
|
f.log(h.inspect(s) + `
|
|
`);
|
|
}, "dir"], [function(s) {
|
|
if (!s) {
|
|
var u = a.call(arguments, 1);
|
|
d.ok(!1, h.format.apply(null, u));
|
|
}
|
|
}, "assert"]], r = 0; r < n.length; r++) {
|
|
var e = n[r], t = e[0], c = e[1];
|
|
f[c] || (f[c] = t);
|
|
}
|
|
N.exports = f;
|
|
}, 955(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(754), E(4636), E(9506), E(7165), (function() {
|
|
var d = h, o = d.lib.BlockCipher, f = d.algo, a = [], i = [], n = [], r = [], e = [], t = [], c = [], s = [], u = [], p = [];
|
|
(function() {
|
|
for (var y = [], g = 0; g < 256; g++) y[g] = g < 128 ? g << 1 : g << 1 ^ 283;
|
|
var _ = 0, T = 0;
|
|
for (g = 0; g < 256; g++) {
|
|
var b = T ^ T << 1 ^ T << 2 ^ T << 3 ^ T << 4;
|
|
b = b >>> 8 ^ 255 & b ^ 99, a[_] = b, i[b] = _;
|
|
var A = y[_], m = y[A], I = y[m], P = 257 * y[b] ^ 16843008 * b;
|
|
n[_] = P << 24 | P >>> 8, r[_] = P << 16 | P >>> 16, e[_] = P << 8 | P >>> 24, t[_] = P, P = 16843009 * I ^ 65537 * m ^ 257 * A ^ 16843008 * _, c[b] = P << 24 | P >>> 8, s[b] = P << 16 | P >>> 16, u[b] = P << 8 | P >>> 24, p[b] = P, _ ? (_ = A ^ y[y[y[I ^ A]]], T ^= y[y[T]]) : _ = T = 1;
|
|
}
|
|
})();
|
|
var l = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], v = f.AES = o.extend({ _doReset: function() {
|
|
if (!this._nRounds || this._keyPriorReset !== this._key) {
|
|
for (var y = this._keyPriorReset = this._key, g = y.words, _ = y.sigBytes / 4, T = 4 * ((this._nRounds = _ + 6) + 1), b = this._keySchedule = [], A = 0; A < T; A++) A < _ ? b[A] = g[A] : (P = b[A - 1], A % _ ? _ > 6 && A % _ == 4 && (P = a[P >>> 24] << 24 | a[P >>> 16 & 255] << 16 | a[P >>> 8 & 255] << 8 | a[255 & P]) : (P = a[(P = P << 8 | P >>> 24) >>> 24] << 24 | a[P >>> 16 & 255] << 16 | a[P >>> 8 & 255] << 8 | a[255 & P], P ^= l[A / _ | 0] << 24), b[A] = b[A - _] ^ P);
|
|
for (var m = this._invKeySchedule = [], I = 0; I < T; I++) {
|
|
if (A = T - I, I % 4) var P = b[A];
|
|
else P = b[A - 4];
|
|
m[I] = I < 4 || A <= 4 ? P : c[a[P >>> 24]] ^ s[a[P >>> 16 & 255]] ^ u[a[P >>> 8 & 255]] ^ p[a[255 & P]];
|
|
}
|
|
}
|
|
}, encryptBlock: function(y, g) {
|
|
this._doCryptBlock(y, g, this._keySchedule, n, r, e, t, a);
|
|
}, decryptBlock: function(y, g) {
|
|
var _ = y[g + 1];
|
|
y[g + 1] = y[g + 3], y[g + 3] = _, this._doCryptBlock(y, g, this._invKeySchedule, c, s, u, p, i), _ = y[g + 1], y[g + 1] = y[g + 3], y[g + 3] = _;
|
|
}, _doCryptBlock: function(y, g, _, T, b, A, m, I) {
|
|
for (var P = this._nRounds, x = y[g] ^ _[0], F = y[g + 1] ^ _[1], K = y[g + 2] ^ _[2], Y = y[g + 3] ^ _[3], Q = 4, S = 1; S < P; S++) {
|
|
var M = T[x >>> 24] ^ b[F >>> 16 & 255] ^ A[K >>> 8 & 255] ^ m[255 & Y] ^ _[Q++], j = T[F >>> 24] ^ b[K >>> 16 & 255] ^ A[Y >>> 8 & 255] ^ m[255 & x] ^ _[Q++], H = T[K >>> 24] ^ b[Y >>> 16 & 255] ^ A[x >>> 8 & 255] ^ m[255 & F] ^ _[Q++], Z = T[Y >>> 24] ^ b[x >>> 16 & 255] ^ A[F >>> 8 & 255] ^ m[255 & K] ^ _[Q++];
|
|
x = M, F = j, K = H, Y = Z;
|
|
}
|
|
M = (I[x >>> 24] << 24 | I[F >>> 16 & 255] << 16 | I[K >>> 8 & 255] << 8 | I[255 & Y]) ^ _[Q++], j = (I[F >>> 24] << 24 | I[K >>> 16 & 255] << 16 | I[Y >>> 8 & 255] << 8 | I[255 & x]) ^ _[Q++], H = (I[K >>> 24] << 24 | I[Y >>> 16 & 255] << 16 | I[x >>> 8 & 255] << 8 | I[255 & F]) ^ _[Q++], Z = (I[Y >>> 24] << 24 | I[x >>> 16 & 255] << 16 | I[F >>> 8 & 255] << 8 | I[255 & K]) ^ _[Q++], y[g] = M, y[g + 1] = j, y[g + 2] = H, y[g + 3] = Z;
|
|
}, keySize: 8 });
|
|
d.AES = o._createHelper(v);
|
|
})(), h.AES);
|
|
}, 3128(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(754), E(4636), E(9506), E(7165), (function() {
|
|
var d = h, o = d.lib.BlockCipher, f = d.algo;
|
|
const a = 16, i = [608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731], n = [[3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946], [1266315497, 3048417604, 3681880366, 3289982499, 290971e4, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055], [3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504], [976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409e3, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]];
|
|
var r = { pbox: [], sbox: [] };
|
|
function e(s, u) {
|
|
let p = u >> 24 & 255, l = u >> 16 & 255, v = u >> 8 & 255, y = 255 & u, g = s.sbox[0][p] + s.sbox[1][l];
|
|
return g ^= s.sbox[2][v], g += s.sbox[3][y], g;
|
|
}
|
|
function t(s, u, p) {
|
|
let l, v = u, y = p;
|
|
for (let g = 0; g < a; ++g) v ^= s.pbox[g], y = e(s, v) ^ y, l = v, v = y, y = l;
|
|
return l = v, v = y, y = l, y ^= s.pbox[a], v ^= s.pbox[17], { left: v, right: y };
|
|
}
|
|
var c = f.Blowfish = o.extend({ _doReset: function() {
|
|
if (this._keyPriorReset !== this._key) {
|
|
var s = this._keyPriorReset = this._key, u = s.words, p = s.sigBytes / 4;
|
|
(function(l, v, y) {
|
|
for (let A = 0; A < 4; A++) {
|
|
l.sbox[A] = [];
|
|
for (let m = 0; m < 256; m++) l.sbox[A][m] = n[A][m];
|
|
}
|
|
let g = 0;
|
|
for (let A = 0; A < 18; A++) l.pbox[A] = i[A] ^ v[g], g++, g >= y && (g = 0);
|
|
let _ = 0, T = 0, b = 0;
|
|
for (let A = 0; A < 18; A += 2) b = t(l, _, T), _ = b.left, T = b.right, l.pbox[A] = _, l.pbox[A + 1] = T;
|
|
for (let A = 0; A < 4; A++) for (let m = 0; m < 256; m += 2) b = t(l, _, T), _ = b.left, T = b.right, l.sbox[A][m] = _, l.sbox[A][m + 1] = T;
|
|
})(r, u, p);
|
|
}
|
|
}, encryptBlock: function(s, u) {
|
|
var p = t(r, s[u], s[u + 1]);
|
|
s[u] = p.left, s[u + 1] = p.right;
|
|
}, decryptBlock: function(s, u) {
|
|
var p = (function(l, v, y) {
|
|
let g, _ = v, T = y;
|
|
for (let b = 17; b > 1; --b) _ ^= l.pbox[b], T = e(l, _) ^ T, g = _, _ = T, T = g;
|
|
return g = _, _ = T, T = g, T ^= l.pbox[1], _ ^= l.pbox[0], { left: _, right: T };
|
|
})(r, s[u], s[u + 1]);
|
|
s[u] = p.left, s[u + 1] = p.right;
|
|
}, blockSize: 2, keySize: 4, ivSize: 2 });
|
|
d.Blowfish = o._createHelper(c);
|
|
})(), h.Blowfish);
|
|
}, 7165(N, O, E) {
|
|
var h, d, o, f, a, i, n, r, e, t, c, s, u, p, l, v, y, g, _;
|
|
N.exports = (h = E(9021), E(9506), void (h.lib.Cipher || (d = h, o = d.lib, f = o.Base, a = o.WordArray, i = o.BufferedBlockAlgorithm, n = d.enc, n.Utf8, r = n.Base64, e = d.algo.EvpKDF, t = o.Cipher = i.extend({ cfg: f.extend(), createEncryptor: function(T, b) {
|
|
return this.create(this._ENC_XFORM_MODE, T, b);
|
|
}, createDecryptor: function(T, b) {
|
|
return this.create(this._DEC_XFORM_MODE, T, b);
|
|
}, init: function(T, b, A) {
|
|
this.cfg = this.cfg.extend(A), this._xformMode = T, this._key = b, this.reset();
|
|
}, reset: function() {
|
|
i.reset.call(this), this._doReset();
|
|
}, process: function(T) {
|
|
return this._append(T), this._process();
|
|
}, finalize: function(T) {
|
|
return T && this._append(T), this._doFinalize();
|
|
}, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: /* @__PURE__ */ (function() {
|
|
function T(b) {
|
|
return typeof b == "string" ? _ : y;
|
|
}
|
|
return function(b) {
|
|
return { encrypt: function(A, m, I) {
|
|
return T(m).encrypt(b, A, m, I);
|
|
}, decrypt: function(A, m, I) {
|
|
return T(m).decrypt(b, A, m, I);
|
|
} };
|
|
};
|
|
})() }), o.StreamCipher = t.extend({ _doFinalize: function() {
|
|
return this._process(!0);
|
|
}, blockSize: 1 }), c = d.mode = {}, s = o.BlockCipherMode = f.extend({ createEncryptor: function(T, b) {
|
|
return this.Encryptor.create(T, b);
|
|
}, createDecryptor: function(T, b) {
|
|
return this.Decryptor.create(T, b);
|
|
}, init: function(T, b) {
|
|
this._cipher = T, this._iv = b;
|
|
} }), u = c.CBC = (function() {
|
|
var T = s.extend();
|
|
function b(A, m, I) {
|
|
var P, x = this._iv;
|
|
x ? (P = x, this._iv = void 0) : P = this._prevBlock;
|
|
for (var F = 0; F < I; F++) A[m + F] ^= P[F];
|
|
}
|
|
return T.Encryptor = T.extend({ processBlock: function(A, m) {
|
|
var I = this._cipher, P = I.blockSize;
|
|
b.call(this, A, m, P), I.encryptBlock(A, m), this._prevBlock = A.slice(m, m + P);
|
|
} }), T.Decryptor = T.extend({ processBlock: function(A, m) {
|
|
var I = this._cipher, P = I.blockSize, x = A.slice(m, m + P);
|
|
I.decryptBlock(A, m), b.call(this, A, m, P), this._prevBlock = x;
|
|
} }), T;
|
|
})(), p = (d.pad = {}).Pkcs7 = { pad: function(T, b) {
|
|
for (var A = 4 * b, m = A - T.sigBytes % A, I = m << 24 | m << 16 | m << 8 | m, P = [], x = 0; x < m; x += 4) P.push(I);
|
|
var F = a.create(P, m);
|
|
T.concat(F);
|
|
}, unpad: function(T) {
|
|
var b = 255 & T.words[T.sigBytes - 1 >>> 2];
|
|
T.sigBytes -= b;
|
|
} }, o.BlockCipher = t.extend({ cfg: t.cfg.extend({ mode: u, padding: p }), reset: function() {
|
|
var T;
|
|
t.reset.call(this);
|
|
var b = this.cfg, A = b.iv, m = b.mode;
|
|
this._xformMode == this._ENC_XFORM_MODE ? T = m.createEncryptor : (T = m.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == T ? this._mode.init(this, A && A.words) : (this._mode = T.call(m, this, A && A.words), this._mode.__creator = T);
|
|
}, _doProcessBlock: function(T, b) {
|
|
this._mode.processBlock(T, b);
|
|
}, _doFinalize: function() {
|
|
var T, b = this.cfg.padding;
|
|
return this._xformMode == this._ENC_XFORM_MODE ? (b.pad(this._data, this.blockSize), T = this._process(!0)) : (T = this._process(!0), b.unpad(T)), T;
|
|
}, blockSize: 4 }), l = o.CipherParams = f.extend({ init: function(T) {
|
|
this.mixIn(T);
|
|
}, toString: function(T) {
|
|
return (T || this.formatter).stringify(this);
|
|
} }), v = (d.format = {}).OpenSSL = { stringify: function(T) {
|
|
var b = T.ciphertext, A = T.salt;
|
|
return (A ? a.create([1398893684, 1701076831]).concat(A).concat(b) : b).toString(r);
|
|
}, parse: function(T) {
|
|
var b, A = r.parse(T), m = A.words;
|
|
return m[0] == 1398893684 && m[1] == 1701076831 && (b = a.create(m.slice(2, 4)), m.splice(0, 4), A.sigBytes -= 16), l.create({ ciphertext: A, salt: b });
|
|
} }, y = o.SerializableCipher = f.extend({ cfg: f.extend({ format: v }), encrypt: function(T, b, A, m) {
|
|
m = this.cfg.extend(m);
|
|
var I = T.createEncryptor(A, m), P = I.finalize(b), x = I.cfg;
|
|
return l.create({ ciphertext: P, key: A, iv: x.iv, algorithm: T, mode: x.mode, padding: x.padding, blockSize: T.blockSize, formatter: m.format });
|
|
}, decrypt: function(T, b, A, m) {
|
|
return m = this.cfg.extend(m), b = this._parse(b, m.format), T.createDecryptor(A, m).finalize(b.ciphertext);
|
|
}, _parse: function(T, b) {
|
|
return typeof T == "string" ? b.parse(T, this) : T;
|
|
} }), g = (d.kdf = {}).OpenSSL = { execute: function(T, b, A, m, I) {
|
|
if (m || (m = a.random(8)), I) P = e.create({ keySize: b + A, hasher: I }).compute(T, m);
|
|
else var P = e.create({ keySize: b + A }).compute(T, m);
|
|
var x = a.create(P.words.slice(b), 4 * A);
|
|
return P.sigBytes = 4 * b, l.create({ key: P, iv: x, salt: m });
|
|
} }, _ = o.PasswordBasedCipher = y.extend({ cfg: y.cfg.extend({ kdf: g }), encrypt: function(T, b, A, m) {
|
|
var I = (m = this.cfg.extend(m)).kdf.execute(A, T.keySize, T.ivSize, m.salt, m.hasher);
|
|
m.iv = I.iv;
|
|
var P = y.encrypt.call(this, T, b, I.key, m);
|
|
return P.mixIn(I), P;
|
|
}, decrypt: function(T, b, A, m) {
|
|
m = this.cfg.extend(m), b = this._parse(b, m.format);
|
|
var I = m.kdf.execute(A, T.keySize, T.ivSize, b.salt, m.hasher);
|
|
return m.iv = I.iv, y.decrypt.call(this, T, b, I.key, m);
|
|
} }))));
|
|
}, 9021(N, O, E) {
|
|
var h;
|
|
N.exports = (h = h || (function(d) {
|
|
var o;
|
|
if (typeof window < "u" && window.crypto && (o = window.crypto), typeof self < "u" && self.crypto && (o = self.crypto), typeof globalThis < "u" && globalThis.crypto && (o = globalThis.crypto), !o && typeof window < "u" && window.msCrypto && (o = window.msCrypto), !o && E.g !== void 0 && E.g.crypto && (o = E.g.crypto), !o) try {
|
|
o = E(477);
|
|
} catch {
|
|
}
|
|
var f = function() {
|
|
if (o) {
|
|
if (typeof o.getRandomValues == "function") try {
|
|
return o.getRandomValues(new Uint32Array(1))[0];
|
|
} catch {
|
|
}
|
|
if (typeof o.randomBytes == "function") try {
|
|
return o.randomBytes(4).readInt32LE();
|
|
} catch {
|
|
}
|
|
}
|
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
}, a = Object.create || /* @__PURE__ */ (function() {
|
|
function v() {
|
|
}
|
|
return function(y) {
|
|
var g;
|
|
return v.prototype = y, g = new v(), v.prototype = null, g;
|
|
};
|
|
})(), i = {}, n = i.lib = {}, r = n.Base = { extend: function(v) {
|
|
var y = a(this);
|
|
return v && y.mixIn(v), y.hasOwnProperty("init") && this.init !== y.init || (y.init = function() {
|
|
y.$super.init.apply(this, arguments);
|
|
}), y.init.prototype = y, y.$super = this, y;
|
|
}, create: function() {
|
|
var v = this.extend();
|
|
return v.init.apply(v, arguments), v;
|
|
}, init: function() {
|
|
}, mixIn: function(v) {
|
|
for (var y in v) v.hasOwnProperty(y) && (this[y] = v[y]);
|
|
v.hasOwnProperty("toString") && (this.toString = v.toString);
|
|
}, clone: function() {
|
|
return this.init.prototype.extend(this);
|
|
} }, e = n.WordArray = r.extend({ init: function(v, y) {
|
|
v = this.words = v || [], this.sigBytes = y ?? 4 * v.length;
|
|
}, toString: function(v) {
|
|
return (v || c).stringify(this);
|
|
}, concat: function(v) {
|
|
var y = this.words, g = v.words, _ = this.sigBytes, T = v.sigBytes;
|
|
if (this.clamp(), _ % 4) for (var b = 0; b < T; b++) {
|
|
var A = g[b >>> 2] >>> 24 - b % 4 * 8 & 255;
|
|
y[_ + b >>> 2] |= A << 24 - (_ + b) % 4 * 8;
|
|
}
|
|
else for (var m = 0; m < T; m += 4) y[_ + m >>> 2] = g[m >>> 2];
|
|
return this.sigBytes += T, this;
|
|
}, clamp: function() {
|
|
var v = this.words, y = this.sigBytes;
|
|
v[y >>> 2] &= 4294967295 << 32 - y % 4 * 8, v.length = d.ceil(y / 4);
|
|
}, clone: function() {
|
|
var v = r.clone.call(this);
|
|
return v.words = this.words.slice(0), v;
|
|
}, random: function(v) {
|
|
for (var y = [], g = 0; g < v; g += 4) y.push(f());
|
|
return new e.init(y, v);
|
|
} }), t = i.enc = {}, c = t.Hex = { stringify: function(v) {
|
|
for (var y = v.words, g = v.sigBytes, _ = [], T = 0; T < g; T++) {
|
|
var b = y[T >>> 2] >>> 24 - T % 4 * 8 & 255;
|
|
_.push((b >>> 4).toString(16)), _.push((15 & b).toString(16));
|
|
}
|
|
return _.join("");
|
|
}, parse: function(v) {
|
|
for (var y = v.length, g = [], _ = 0; _ < y; _ += 2) g[_ >>> 3] |= parseInt(v.substr(_, 2), 16) << 24 - _ % 8 * 4;
|
|
return new e.init(g, y / 2);
|
|
} }, s = t.Latin1 = { stringify: function(v) {
|
|
for (var y = v.words, g = v.sigBytes, _ = [], T = 0; T < g; T++) {
|
|
var b = y[T >>> 2] >>> 24 - T % 4 * 8 & 255;
|
|
_.push(String.fromCharCode(b));
|
|
}
|
|
return _.join("");
|
|
}, parse: function(v) {
|
|
for (var y = v.length, g = [], _ = 0; _ < y; _++) g[_ >>> 2] |= (255 & v.charCodeAt(_)) << 24 - _ % 4 * 8;
|
|
return new e.init(g, y);
|
|
} }, u = t.Utf8 = { stringify: function(v) {
|
|
try {
|
|
return decodeURIComponent(escape(s.stringify(v)));
|
|
} catch {
|
|
throw new Error("Malformed UTF-8 data");
|
|
}
|
|
}, parse: function(v) {
|
|
return s.parse(unescape(encodeURIComponent(v)));
|
|
} }, p = n.BufferedBlockAlgorithm = r.extend({ reset: function() {
|
|
this._data = new e.init(), this._nDataBytes = 0;
|
|
}, _append: function(v) {
|
|
typeof v == "string" && (v = u.parse(v)), this._data.concat(v), this._nDataBytes += v.sigBytes;
|
|
}, _process: function(v) {
|
|
var y, g = this._data, _ = g.words, T = g.sigBytes, b = this.blockSize, A = T / (4 * b), m = (A = v ? d.ceil(A) : d.max((0 | A) - this._minBufferSize, 0)) * b, I = d.min(4 * m, T);
|
|
if (m) {
|
|
for (var P = 0; P < m; P += b) this._doProcessBlock(_, P);
|
|
y = _.splice(0, m), g.sigBytes -= I;
|
|
}
|
|
return new e.init(y, I);
|
|
}, clone: function() {
|
|
var v = r.clone.call(this);
|
|
return v._data = this._data.clone(), v;
|
|
}, _minBufferSize: 0 }), l = (n.Hasher = p.extend({ cfg: r.extend(), init: function(v) {
|
|
this.cfg = this.cfg.extend(v), this.reset();
|
|
}, reset: function() {
|
|
p.reset.call(this), this._doReset();
|
|
}, update: function(v) {
|
|
return this._append(v), this._process(), this;
|
|
}, finalize: function(v) {
|
|
return v && this._append(v), this._doFinalize();
|
|
}, blockSize: 16, _createHelper: function(v) {
|
|
return function(y, g) {
|
|
return new v.init(g).finalize(y);
|
|
};
|
|
}, _createHmacHelper: function(v) {
|
|
return function(y, g) {
|
|
return new l.HMAC.init(v, g).finalize(y);
|
|
};
|
|
} }), i.algo = {});
|
|
return i;
|
|
})(Math), h);
|
|
}, 754(N, O, E) {
|
|
var h, d, o;
|
|
N.exports = (h = E(9021), o = (d = h).lib.WordArray, d.enc.Base64 = { stringify: function(f) {
|
|
var a = f.words, i = f.sigBytes, n = this._map;
|
|
f.clamp();
|
|
for (var r = [], e = 0; e < i; e += 3) for (var t = (a[e >>> 2] >>> 24 - e % 4 * 8 & 255) << 16 | (a[e + 1 >>> 2] >>> 24 - (e + 1) % 4 * 8 & 255) << 8 | a[e + 2 >>> 2] >>> 24 - (e + 2) % 4 * 8 & 255, c = 0; c < 4 && e + 0.75 * c < i; c++) r.push(n.charAt(t >>> 6 * (3 - c) & 63));
|
|
var s = n.charAt(64);
|
|
if (s) for (; r.length % 4; ) r.push(s);
|
|
return r.join("");
|
|
}, parse: function(f) {
|
|
var a = f.length, i = this._map, n = this._reverseMap;
|
|
if (!n) {
|
|
n = this._reverseMap = [];
|
|
for (var r = 0; r < i.length; r++) n[i.charCodeAt(r)] = r;
|
|
}
|
|
var e = i.charAt(64);
|
|
if (e) {
|
|
var t = f.indexOf(e);
|
|
t !== -1 && (a = t);
|
|
}
|
|
return (function(c, s, u) {
|
|
for (var p = [], l = 0, v = 0; v < s; v++) if (v % 4) {
|
|
var y = u[c.charCodeAt(v - 1)] << v % 4 * 2 | u[c.charCodeAt(v)] >>> 6 - v % 4 * 2;
|
|
p[l >>> 2] |= y << 24 - l % 4 * 8, l++;
|
|
}
|
|
return o.create(p, l);
|
|
})(f, a, n);
|
|
}, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }, h.enc.Base64);
|
|
}, 4725(N, O, E) {
|
|
var h, d, o;
|
|
N.exports = (h = E(9021), o = (d = h).lib.WordArray, d.enc.Base64url = { stringify: function(f, a) {
|
|
a === void 0 && (a = !0);
|
|
var i = f.words, n = f.sigBytes, r = a ? this._safe_map : this._map;
|
|
f.clamp();
|
|
for (var e = [], t = 0; t < n; t += 3) for (var c = (i[t >>> 2] >>> 24 - t % 4 * 8 & 255) << 16 | (i[t + 1 >>> 2] >>> 24 - (t + 1) % 4 * 8 & 255) << 8 | i[t + 2 >>> 2] >>> 24 - (t + 2) % 4 * 8 & 255, s = 0; s < 4 && t + 0.75 * s < n; s++) e.push(r.charAt(c >>> 6 * (3 - s) & 63));
|
|
var u = r.charAt(64);
|
|
if (u) for (; e.length % 4; ) e.push(u);
|
|
return e.join("");
|
|
}, parse: function(f, a) {
|
|
a === void 0 && (a = !0);
|
|
var i = f.length, n = a ? this._safe_map : this._map, r = this._reverseMap;
|
|
if (!r) {
|
|
r = this._reverseMap = [];
|
|
for (var e = 0; e < n.length; e++) r[n.charCodeAt(e)] = e;
|
|
}
|
|
var t = n.charAt(64);
|
|
if (t) {
|
|
var c = f.indexOf(t);
|
|
c !== -1 && (i = c);
|
|
}
|
|
return (function(s, u, p) {
|
|
for (var l = [], v = 0, y = 0; y < u; y++) if (y % 4) {
|
|
var g = p[s.charCodeAt(y - 1)] << y % 4 * 2 | p[s.charCodeAt(y)] >>> 6 - y % 4 * 2;
|
|
l[v >>> 2] |= g << 24 - v % 4 * 8, v++;
|
|
}
|
|
return o.create(l, v);
|
|
})(f, i, r);
|
|
}, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" }, h.enc.Base64url);
|
|
}, 5503(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), (function() {
|
|
var d = h, o = d.lib.WordArray, f = d.enc;
|
|
function a(i) {
|
|
return i << 8 & 4278255360 | i >>> 8 & 16711935;
|
|
}
|
|
f.Utf16 = f.Utf16BE = { stringify: function(i) {
|
|
for (var n = i.words, r = i.sigBytes, e = [], t = 0; t < r; t += 2) {
|
|
var c = n[t >>> 2] >>> 16 - t % 4 * 8 & 65535;
|
|
e.push(String.fromCharCode(c));
|
|
}
|
|
return e.join("");
|
|
}, parse: function(i) {
|
|
for (var n = i.length, r = [], e = 0; e < n; e++) r[e >>> 1] |= i.charCodeAt(e) << 16 - e % 2 * 16;
|
|
return o.create(r, 2 * n);
|
|
} }, f.Utf16LE = { stringify: function(i) {
|
|
for (var n = i.words, r = i.sigBytes, e = [], t = 0; t < r; t += 2) {
|
|
var c = a(n[t >>> 2] >>> 16 - t % 4 * 8 & 65535);
|
|
e.push(String.fromCharCode(c));
|
|
}
|
|
return e.join("");
|
|
}, parse: function(i) {
|
|
for (var n = i.length, r = [], e = 0; e < n; e++) r[e >>> 1] |= a(i.charCodeAt(e) << 16 - e % 2 * 16);
|
|
return o.create(r, 2 * n);
|
|
} };
|
|
})(), h.enc.Utf16);
|
|
}, 9506(N, O, E) {
|
|
var h, d, o, f, a, i, n, r;
|
|
N.exports = (r = E(9021), E(5471), E(1025), o = (d = (h = r).lib).Base, f = d.WordArray, i = (a = h.algo).MD5, n = a.EvpKDF = o.extend({ cfg: o.extend({ keySize: 4, hasher: i, iterations: 1 }), init: function(e) {
|
|
this.cfg = this.cfg.extend(e);
|
|
}, compute: function(e, t) {
|
|
for (var c, s = this.cfg, u = s.hasher.create(), p = f.create(), l = p.words, v = s.keySize, y = s.iterations; l.length < v; ) {
|
|
c && u.update(c), c = u.update(e).finalize(t), u.reset();
|
|
for (var g = 1; g < y; g++) c = u.finalize(c), u.reset();
|
|
p.concat(c);
|
|
}
|
|
return p.sigBytes = 4 * v, p;
|
|
} }), h.EvpKDF = function(e, t, c) {
|
|
return n.create(c).compute(e, t);
|
|
}, r.EvpKDF);
|
|
}, 25(N, O, E) {
|
|
var h, d, o, f;
|
|
N.exports = (f = E(9021), E(7165), d = (h = f).lib.CipherParams, o = h.enc.Hex, h.format.Hex = { stringify: function(a) {
|
|
return a.ciphertext.toString(o);
|
|
}, parse: function(a) {
|
|
var i = o.parse(a);
|
|
return d.create({ ciphertext: i });
|
|
} }, f.format.Hex);
|
|
}, 1025(N, O, E) {
|
|
var h, d, o;
|
|
N.exports = (d = (h = E(9021)).lib.Base, o = h.enc.Utf8, void (h.algo.HMAC = d.extend({ init: function(f, a) {
|
|
f = this._hasher = new f.init(), typeof a == "string" && (a = o.parse(a));
|
|
var i = f.blockSize, n = 4 * i;
|
|
a.sigBytes > n && (a = f.finalize(a)), a.clamp();
|
|
for (var r = this._oKey = a.clone(), e = this._iKey = a.clone(), t = r.words, c = e.words, s = 0; s < i; s++) t[s] ^= 1549556828, c[s] ^= 909522486;
|
|
r.sigBytes = e.sigBytes = n, this.reset();
|
|
}, reset: function() {
|
|
var f = this._hasher;
|
|
f.reset(), f.update(this._iKey);
|
|
}, update: function(f) {
|
|
return this._hasher.update(f), this;
|
|
}, finalize: function(f) {
|
|
var a = this._hasher, i = a.finalize(f);
|
|
return a.reset(), a.finalize(this._oKey.clone().concat(i));
|
|
} })));
|
|
}, 1396(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(3240), E(6440), E(5503), E(754), E(4725), E(4636), E(5471), E(3009), E(6308), E(1380), E(9557), E(5953), E(8056), E(1025), E(19), E(9506), E(7165), E(2169), E(6939), E(6372), E(3797), E(8454), E(2073), E(4905), E(482), E(2155), E(8124), E(25), E(955), E(7628), E(7193), E(6298), E(2696), E(3128), h);
|
|
}, 6440(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), (function() {
|
|
if (typeof ArrayBuffer == "function") {
|
|
var d = h.lib.WordArray, o = d.init, f = d.init = function(a) {
|
|
if (a instanceof ArrayBuffer && (a = new Uint8Array(a)), (a instanceof Int8Array || typeof Uint8ClampedArray < "u" && a instanceof Uint8ClampedArray || a instanceof Int16Array || a instanceof Uint16Array || a instanceof Int32Array || a instanceof Uint32Array || a instanceof Float32Array || a instanceof Float64Array) && (a = new Uint8Array(a.buffer, a.byteOffset, a.byteLength)), a instanceof Uint8Array) {
|
|
for (var i = a.byteLength, n = [], r = 0; r < i; r++) n[r >>> 2] |= a[r] << 24 - r % 4 * 8;
|
|
o.call(this, n, i);
|
|
} else o.apply(this, arguments);
|
|
};
|
|
f.prototype = d;
|
|
}
|
|
})(), h.lib.WordArray);
|
|
}, 4636(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), (function(d) {
|
|
var o = h, f = o.lib, a = f.WordArray, i = f.Hasher, n = o.algo, r = [];
|
|
(function() {
|
|
for (var p = 0; p < 64; p++) r[p] = 4294967296 * d.abs(d.sin(p + 1)) | 0;
|
|
})();
|
|
var e = n.MD5 = i.extend({ _doReset: function() {
|
|
this._hash = new a.init([1732584193, 4023233417, 2562383102, 271733878]);
|
|
}, _doProcessBlock: function(p, l) {
|
|
for (var v = 0; v < 16; v++) {
|
|
var y = l + v, g = p[y];
|
|
p[y] = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8);
|
|
}
|
|
var _ = this._hash.words, T = p[l + 0], b = p[l + 1], A = p[l + 2], m = p[l + 3], I = p[l + 4], P = p[l + 5], x = p[l + 6], F = p[l + 7], K = p[l + 8], Y = p[l + 9], Q = p[l + 10], S = p[l + 11], M = p[l + 12], j = p[l + 13], H = p[l + 14], Z = p[l + 15], L = _[0], w = _[1], C = _[2], R = _[3];
|
|
L = t(L, w, C, R, T, 7, r[0]), R = t(R, L, w, C, b, 12, r[1]), C = t(C, R, L, w, A, 17, r[2]), w = t(w, C, R, L, m, 22, r[3]), L = t(L, w, C, R, I, 7, r[4]), R = t(R, L, w, C, P, 12, r[5]), C = t(C, R, L, w, x, 17, r[6]), w = t(w, C, R, L, F, 22, r[7]), L = t(L, w, C, R, K, 7, r[8]), R = t(R, L, w, C, Y, 12, r[9]), C = t(C, R, L, w, Q, 17, r[10]), w = t(w, C, R, L, S, 22, r[11]), L = t(L, w, C, R, M, 7, r[12]), R = t(R, L, w, C, j, 12, r[13]), C = t(C, R, L, w, H, 17, r[14]), L = c(L, w = t(w, C, R, L, Z, 22, r[15]), C, R, b, 5, r[16]), R = c(R, L, w, C, x, 9, r[17]), C = c(C, R, L, w, S, 14, r[18]), w = c(w, C, R, L, T, 20, r[19]), L = c(L, w, C, R, P, 5, r[20]), R = c(R, L, w, C, Q, 9, r[21]), C = c(C, R, L, w, Z, 14, r[22]), w = c(w, C, R, L, I, 20, r[23]), L = c(L, w, C, R, Y, 5, r[24]), R = c(R, L, w, C, H, 9, r[25]), C = c(C, R, L, w, m, 14, r[26]), w = c(w, C, R, L, K, 20, r[27]), L = c(L, w, C, R, j, 5, r[28]), R = c(R, L, w, C, A, 9, r[29]), C = c(C, R, L, w, F, 14, r[30]), L = s(L, w = c(w, C, R, L, M, 20, r[31]), C, R, P, 4, r[32]), R = s(R, L, w, C, K, 11, r[33]), C = s(C, R, L, w, S, 16, r[34]), w = s(w, C, R, L, H, 23, r[35]), L = s(L, w, C, R, b, 4, r[36]), R = s(R, L, w, C, I, 11, r[37]), C = s(C, R, L, w, F, 16, r[38]), w = s(w, C, R, L, Q, 23, r[39]), L = s(L, w, C, R, j, 4, r[40]), R = s(R, L, w, C, T, 11, r[41]), C = s(C, R, L, w, m, 16, r[42]), w = s(w, C, R, L, x, 23, r[43]), L = s(L, w, C, R, Y, 4, r[44]), R = s(R, L, w, C, M, 11, r[45]), C = s(C, R, L, w, Z, 16, r[46]), L = u(L, w = s(w, C, R, L, A, 23, r[47]), C, R, T, 6, r[48]), R = u(R, L, w, C, F, 10, r[49]), C = u(C, R, L, w, H, 15, r[50]), w = u(w, C, R, L, P, 21, r[51]), L = u(L, w, C, R, M, 6, r[52]), R = u(R, L, w, C, m, 10, r[53]), C = u(C, R, L, w, Q, 15, r[54]), w = u(w, C, R, L, b, 21, r[55]), L = u(L, w, C, R, K, 6, r[56]), R = u(R, L, w, C, Z, 10, r[57]), C = u(C, R, L, w, x, 15, r[58]), w = u(w, C, R, L, j, 21, r[59]), L = u(L, w, C, R, I, 6, r[60]), R = u(R, L, w, C, S, 10, r[61]), C = u(C, R, L, w, A, 15, r[62]), w = u(w, C, R, L, Y, 21, r[63]), _[0] = _[0] + L | 0, _[1] = _[1] + w | 0, _[2] = _[2] + C | 0, _[3] = _[3] + R | 0;
|
|
}, _doFinalize: function() {
|
|
var p = this._data, l = p.words, v = 8 * this._nDataBytes, y = 8 * p.sigBytes;
|
|
l[y >>> 5] |= 128 << 24 - y % 32;
|
|
var g = d.floor(v / 4294967296), _ = v;
|
|
l[15 + (y + 64 >>> 9 << 4)] = 16711935 & (g << 8 | g >>> 24) | 4278255360 & (g << 24 | g >>> 8), l[14 + (y + 64 >>> 9 << 4)] = 16711935 & (_ << 8 | _ >>> 24) | 4278255360 & (_ << 24 | _ >>> 8), p.sigBytes = 4 * (l.length + 1), this._process();
|
|
for (var T = this._hash, b = T.words, A = 0; A < 4; A++) {
|
|
var m = b[A];
|
|
b[A] = 16711935 & (m << 8 | m >>> 24) | 4278255360 & (m << 24 | m >>> 8);
|
|
}
|
|
return T;
|
|
}, clone: function() {
|
|
var p = i.clone.call(this);
|
|
return p._hash = this._hash.clone(), p;
|
|
} });
|
|
function t(p, l, v, y, g, _, T) {
|
|
var b = p + (l & v | ~l & y) + g + T;
|
|
return (b << _ | b >>> 32 - _) + l;
|
|
}
|
|
function c(p, l, v, y, g, _, T) {
|
|
var b = p + (l & y | v & ~y) + g + T;
|
|
return (b << _ | b >>> 32 - _) + l;
|
|
}
|
|
function s(p, l, v, y, g, _, T) {
|
|
var b = p + (l ^ v ^ y) + g + T;
|
|
return (b << _ | b >>> 32 - _) + l;
|
|
}
|
|
function u(p, l, v, y, g, _, T) {
|
|
var b = p + (v ^ (l | ~y)) + g + T;
|
|
return (b << _ | b >>> 32 - _) + l;
|
|
}
|
|
o.MD5 = i._createHelper(e), o.HmacMD5 = i._createHmacHelper(e);
|
|
})(Math), h.MD5);
|
|
}, 2169(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.mode.CFB = (function() {
|
|
var d = h.lib.BlockCipherMode.extend();
|
|
function o(f, a, i, n) {
|
|
var r, e = this._iv;
|
|
e ? (r = e.slice(0), this._iv = void 0) : r = this._prevBlock, n.encryptBlock(r, 0);
|
|
for (var t = 0; t < i; t++) f[a + t] ^= r[t];
|
|
}
|
|
return d.Encryptor = d.extend({ processBlock: function(f, a) {
|
|
var i = this._cipher, n = i.blockSize;
|
|
o.call(this, f, a, n, i), this._prevBlock = f.slice(a, a + n);
|
|
} }), d.Decryptor = d.extend({ processBlock: function(f, a) {
|
|
var i = this._cipher, n = i.blockSize, r = f.slice(a, a + n);
|
|
o.call(this, f, a, n, i), this._prevBlock = r;
|
|
} }), d;
|
|
})(), h.mode.CFB);
|
|
}, 6372(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.mode.CTRGladman = (function() {
|
|
var d = h.lib.BlockCipherMode.extend();
|
|
function o(a) {
|
|
if (255 & ~(a >> 24)) a += 16777216;
|
|
else {
|
|
var i = a >> 16 & 255, n = a >> 8 & 255, r = 255 & a;
|
|
i === 255 ? (i = 0, n === 255 ? (n = 0, r === 255 ? r = 0 : ++r) : ++n) : ++i, a = 0, a += i << 16, a += n << 8, a += r;
|
|
}
|
|
return a;
|
|
}
|
|
var f = d.Encryptor = d.extend({ processBlock: function(a, i) {
|
|
var n = this._cipher, r = n.blockSize, e = this._iv, t = this._counter;
|
|
e && (t = this._counter = e.slice(0), this._iv = void 0), (function(u) {
|
|
(u[0] = o(u[0])) === 0 && (u[1] = o(u[1]));
|
|
})(t);
|
|
var c = t.slice(0);
|
|
n.encryptBlock(c, 0);
|
|
for (var s = 0; s < r; s++) a[i + s] ^= c[s];
|
|
} });
|
|
return d.Decryptor = f, d;
|
|
})(), h.mode.CTRGladman);
|
|
}, 6939(N, O, E) {
|
|
var h, d, o;
|
|
N.exports = (o = E(9021), E(7165), o.mode.CTR = (d = (h = o.lib.BlockCipherMode.extend()).Encryptor = h.extend({ processBlock: function(f, a) {
|
|
var i = this._cipher, n = i.blockSize, r = this._iv, e = this._counter;
|
|
r && (e = this._counter = r.slice(0), this._iv = void 0);
|
|
var t = e.slice(0);
|
|
i.encryptBlock(t, 0), e[n - 1] = e[n - 1] + 1 | 0;
|
|
for (var c = 0; c < n; c++) f[a + c] ^= t[c];
|
|
} }), h.Decryptor = d, h), o.mode.CTR);
|
|
}, 8454(N, O, E) {
|
|
var h, d;
|
|
N.exports = (d = E(9021), E(7165), d.mode.ECB = ((h = d.lib.BlockCipherMode.extend()).Encryptor = h.extend({ processBlock: function(o, f) {
|
|
this._cipher.encryptBlock(o, f);
|
|
} }), h.Decryptor = h.extend({ processBlock: function(o, f) {
|
|
this._cipher.decryptBlock(o, f);
|
|
} }), h), d.mode.ECB);
|
|
}, 3797(N, O, E) {
|
|
var h, d, o;
|
|
N.exports = (o = E(9021), E(7165), o.mode.OFB = (d = (h = o.lib.BlockCipherMode.extend()).Encryptor = h.extend({ processBlock: function(f, a) {
|
|
var i = this._cipher, n = i.blockSize, r = this._iv, e = this._keystream;
|
|
r && (e = this._keystream = r.slice(0), this._iv = void 0), i.encryptBlock(e, 0);
|
|
for (var t = 0; t < n; t++) f[a + t] ^= e[t];
|
|
} }), h.Decryptor = d, h), o.mode.OFB);
|
|
}, 2073(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.pad.AnsiX923 = { pad: function(d, o) {
|
|
var f = d.sigBytes, a = 4 * o, i = a - f % a, n = f + i - 1;
|
|
d.clamp(), d.words[n >>> 2] |= i << 24 - n % 4 * 8, d.sigBytes += i;
|
|
}, unpad: function(d) {
|
|
var o = 255 & d.words[d.sigBytes - 1 >>> 2];
|
|
d.sigBytes -= o;
|
|
} }, h.pad.Ansix923);
|
|
}, 4905(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.pad.Iso10126 = { pad: function(d, o) {
|
|
var f = 4 * o, a = f - d.sigBytes % f;
|
|
d.concat(h.lib.WordArray.random(a - 1)).concat(h.lib.WordArray.create([a << 24], 1));
|
|
}, unpad: function(d) {
|
|
var o = 255 & d.words[d.sigBytes - 1 >>> 2];
|
|
d.sigBytes -= o;
|
|
} }, h.pad.Iso10126);
|
|
}, 482(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.pad.Iso97971 = { pad: function(d, o) {
|
|
d.concat(h.lib.WordArray.create([2147483648], 1)), h.pad.ZeroPadding.pad(d, o);
|
|
}, unpad: function(d) {
|
|
h.pad.ZeroPadding.unpad(d), d.sigBytes--;
|
|
} }, h.pad.Iso97971);
|
|
}, 8124(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.pad.NoPadding = { pad: function() {
|
|
}, unpad: function() {
|
|
} }, h.pad.NoPadding);
|
|
}, 2155(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(7165), h.pad.ZeroPadding = { pad: function(d, o) {
|
|
var f = 4 * o;
|
|
d.clamp(), d.sigBytes += f - (d.sigBytes % f || f);
|
|
}, unpad: function(d) {
|
|
var o = d.words, f = d.sigBytes - 1;
|
|
for (f = d.sigBytes - 1; f >= 0; f--) if (o[f >>> 2] >>> 24 - f % 4 * 8 & 255) {
|
|
d.sigBytes = f + 1;
|
|
break;
|
|
}
|
|
} }, h.pad.ZeroPadding);
|
|
}, 19(N, O, E) {
|
|
var h, d, o, f, a, i, n, r, e;
|
|
N.exports = (e = E(9021), E(3009), E(1025), o = (d = (h = e).lib).Base, f = d.WordArray, i = (a = h.algo).SHA256, n = a.HMAC, r = a.PBKDF2 = o.extend({ cfg: o.extend({ keySize: 4, hasher: i, iterations: 25e4 }), init: function(t) {
|
|
this.cfg = this.cfg.extend(t);
|
|
}, compute: function(t, c) {
|
|
for (var s = this.cfg, u = n.create(s.hasher, t), p = f.create(), l = f.create([1]), v = p.words, y = l.words, g = s.keySize, _ = s.iterations; v.length < g; ) {
|
|
var T = u.update(c).finalize(l);
|
|
u.reset();
|
|
for (var b = T.words, A = b.length, m = T, I = 1; I < _; I++) {
|
|
m = u.finalize(m), u.reset();
|
|
for (var P = m.words, x = 0; x < A; x++) b[x] ^= P[x];
|
|
}
|
|
p.concat(T), y[0]++;
|
|
}
|
|
return p.sigBytes = 4 * g, p;
|
|
} }), h.PBKDF2 = function(t, c, s) {
|
|
return r.create(s).compute(t, c);
|
|
}, e.PBKDF2);
|
|
}, 2696(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(754), E(4636), E(9506), E(7165), (function() {
|
|
var d = h, o = d.lib.StreamCipher, f = d.algo, a = [], i = [], n = [], r = f.RabbitLegacy = o.extend({ _doReset: function() {
|
|
var t = this._key.words, c = this.cfg.iv, s = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], u = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]];
|
|
this._b = 0;
|
|
for (var p = 0; p < 4; p++) e.call(this);
|
|
for (p = 0; p < 8; p++) u[p] ^= s[p + 4 & 7];
|
|
if (c) {
|
|
var l = c.words, v = l[0], y = l[1], g = 16711935 & (v << 8 | v >>> 24) | 4278255360 & (v << 24 | v >>> 8), _ = 16711935 & (y << 8 | y >>> 24) | 4278255360 & (y << 24 | y >>> 8), T = g >>> 16 | 4294901760 & _, b = _ << 16 | 65535 & g;
|
|
for (u[0] ^= g, u[1] ^= T, u[2] ^= _, u[3] ^= b, u[4] ^= g, u[5] ^= T, u[6] ^= _, u[7] ^= b, p = 0; p < 4; p++) e.call(this);
|
|
}
|
|
}, _doProcessBlock: function(t, c) {
|
|
var s = this._X;
|
|
e.call(this), a[0] = s[0] ^ s[5] >>> 16 ^ s[3] << 16, a[1] = s[2] ^ s[7] >>> 16 ^ s[5] << 16, a[2] = s[4] ^ s[1] >>> 16 ^ s[7] << 16, a[3] = s[6] ^ s[3] >>> 16 ^ s[1] << 16;
|
|
for (var u = 0; u < 4; u++) a[u] = 16711935 & (a[u] << 8 | a[u] >>> 24) | 4278255360 & (a[u] << 24 | a[u] >>> 8), t[c + u] ^= a[u];
|
|
}, blockSize: 4, ivSize: 2 });
|
|
function e() {
|
|
for (var t = this._X, c = this._C, s = 0; s < 8; s++) i[s] = c[s];
|
|
for (c[0] = c[0] + 1295307597 + this._b | 0, c[1] = c[1] + 3545052371 + (c[0] >>> 0 < i[0] >>> 0 ? 1 : 0) | 0, c[2] = c[2] + 886263092 + (c[1] >>> 0 < i[1] >>> 0 ? 1 : 0) | 0, c[3] = c[3] + 1295307597 + (c[2] >>> 0 < i[2] >>> 0 ? 1 : 0) | 0, c[4] = c[4] + 3545052371 + (c[3] >>> 0 < i[3] >>> 0 ? 1 : 0) | 0, c[5] = c[5] + 886263092 + (c[4] >>> 0 < i[4] >>> 0 ? 1 : 0) | 0, c[6] = c[6] + 1295307597 + (c[5] >>> 0 < i[5] >>> 0 ? 1 : 0) | 0, c[7] = c[7] + 3545052371 + (c[6] >>> 0 < i[6] >>> 0 ? 1 : 0) | 0, this._b = c[7] >>> 0 < i[7] >>> 0 ? 1 : 0, s = 0; s < 8; s++) {
|
|
var u = t[s] + c[s], p = 65535 & u, l = u >>> 16, v = ((p * p >>> 17) + p * l >>> 15) + l * l, y = ((4294901760 & u) * u | 0) + ((65535 & u) * u | 0);
|
|
n[s] = v ^ y;
|
|
}
|
|
t[0] = n[0] + (n[7] << 16 | n[7] >>> 16) + (n[6] << 16 | n[6] >>> 16) | 0, t[1] = n[1] + (n[0] << 8 | n[0] >>> 24) + n[7] | 0, t[2] = n[2] + (n[1] << 16 | n[1] >>> 16) + (n[0] << 16 | n[0] >>> 16) | 0, t[3] = n[3] + (n[2] << 8 | n[2] >>> 24) + n[1] | 0, t[4] = n[4] + (n[3] << 16 | n[3] >>> 16) + (n[2] << 16 | n[2] >>> 16) | 0, t[5] = n[5] + (n[4] << 8 | n[4] >>> 24) + n[3] | 0, t[6] = n[6] + (n[5] << 16 | n[5] >>> 16) + (n[4] << 16 | n[4] >>> 16) | 0, t[7] = n[7] + (n[6] << 8 | n[6] >>> 24) + n[5] | 0;
|
|
}
|
|
d.RabbitLegacy = o._createHelper(r);
|
|
})(), h.RabbitLegacy);
|
|
}, 6298(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(754), E(4636), E(9506), E(7165), (function() {
|
|
var d = h, o = d.lib.StreamCipher, f = d.algo, a = [], i = [], n = [], r = f.Rabbit = o.extend({ _doReset: function() {
|
|
for (var t = this._key.words, c = this.cfg.iv, s = 0; s < 4; s++) t[s] = 16711935 & (t[s] << 8 | t[s] >>> 24) | 4278255360 & (t[s] << 24 | t[s] >>> 8);
|
|
var u = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], p = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]];
|
|
for (this._b = 0, s = 0; s < 4; s++) e.call(this);
|
|
for (s = 0; s < 8; s++) p[s] ^= u[s + 4 & 7];
|
|
if (c) {
|
|
var l = c.words, v = l[0], y = l[1], g = 16711935 & (v << 8 | v >>> 24) | 4278255360 & (v << 24 | v >>> 8), _ = 16711935 & (y << 8 | y >>> 24) | 4278255360 & (y << 24 | y >>> 8), T = g >>> 16 | 4294901760 & _, b = _ << 16 | 65535 & g;
|
|
for (p[0] ^= g, p[1] ^= T, p[2] ^= _, p[3] ^= b, p[4] ^= g, p[5] ^= T, p[6] ^= _, p[7] ^= b, s = 0; s < 4; s++) e.call(this);
|
|
}
|
|
}, _doProcessBlock: function(t, c) {
|
|
var s = this._X;
|
|
e.call(this), a[0] = s[0] ^ s[5] >>> 16 ^ s[3] << 16, a[1] = s[2] ^ s[7] >>> 16 ^ s[5] << 16, a[2] = s[4] ^ s[1] >>> 16 ^ s[7] << 16, a[3] = s[6] ^ s[3] >>> 16 ^ s[1] << 16;
|
|
for (var u = 0; u < 4; u++) a[u] = 16711935 & (a[u] << 8 | a[u] >>> 24) | 4278255360 & (a[u] << 24 | a[u] >>> 8), t[c + u] ^= a[u];
|
|
}, blockSize: 4, ivSize: 2 });
|
|
function e() {
|
|
for (var t = this._X, c = this._C, s = 0; s < 8; s++) i[s] = c[s];
|
|
for (c[0] = c[0] + 1295307597 + this._b | 0, c[1] = c[1] + 3545052371 + (c[0] >>> 0 < i[0] >>> 0 ? 1 : 0) | 0, c[2] = c[2] + 886263092 + (c[1] >>> 0 < i[1] >>> 0 ? 1 : 0) | 0, c[3] = c[3] + 1295307597 + (c[2] >>> 0 < i[2] >>> 0 ? 1 : 0) | 0, c[4] = c[4] + 3545052371 + (c[3] >>> 0 < i[3] >>> 0 ? 1 : 0) | 0, c[5] = c[5] + 886263092 + (c[4] >>> 0 < i[4] >>> 0 ? 1 : 0) | 0, c[6] = c[6] + 1295307597 + (c[5] >>> 0 < i[5] >>> 0 ? 1 : 0) | 0, c[7] = c[7] + 3545052371 + (c[6] >>> 0 < i[6] >>> 0 ? 1 : 0) | 0, this._b = c[7] >>> 0 < i[7] >>> 0 ? 1 : 0, s = 0; s < 8; s++) {
|
|
var u = t[s] + c[s], p = 65535 & u, l = u >>> 16, v = ((p * p >>> 17) + p * l >>> 15) + l * l, y = ((4294901760 & u) * u | 0) + ((65535 & u) * u | 0);
|
|
n[s] = v ^ y;
|
|
}
|
|
t[0] = n[0] + (n[7] << 16 | n[7] >>> 16) + (n[6] << 16 | n[6] >>> 16) | 0, t[1] = n[1] + (n[0] << 8 | n[0] >>> 24) + n[7] | 0, t[2] = n[2] + (n[1] << 16 | n[1] >>> 16) + (n[0] << 16 | n[0] >>> 16) | 0, t[3] = n[3] + (n[2] << 8 | n[2] >>> 24) + n[1] | 0, t[4] = n[4] + (n[3] << 16 | n[3] >>> 16) + (n[2] << 16 | n[2] >>> 16) | 0, t[5] = n[5] + (n[4] << 8 | n[4] >>> 24) + n[3] | 0, t[6] = n[6] + (n[5] << 16 | n[5] >>> 16) + (n[4] << 16 | n[4] >>> 16) | 0, t[7] = n[7] + (n[6] << 8 | n[6] >>> 24) + n[5] | 0;
|
|
}
|
|
d.Rabbit = o._createHelper(r);
|
|
})(), h.Rabbit);
|
|
}, 7193(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(754), E(4636), E(9506), E(7165), (function() {
|
|
var d = h, o = d.lib.StreamCipher, f = d.algo, a = f.RC4 = o.extend({ _doReset: function() {
|
|
for (var r = this._key, e = r.words, t = r.sigBytes, c = this._S = [], s = 0; s < 256; s++) c[s] = s;
|
|
s = 0;
|
|
for (var u = 0; s < 256; s++) {
|
|
var p = s % t, l = e[p >>> 2] >>> 24 - p % 4 * 8 & 255;
|
|
u = (u + c[s] + l) % 256;
|
|
var v = c[s];
|
|
c[s] = c[u], c[u] = v;
|
|
}
|
|
this._i = this._j = 0;
|
|
}, _doProcessBlock: function(r, e) {
|
|
r[e] ^= i.call(this);
|
|
}, keySize: 8, ivSize: 0 });
|
|
function i() {
|
|
for (var r = this._S, e = this._i, t = this._j, c = 0, s = 0; s < 4; s++) {
|
|
t = (t + r[e = (e + 1) % 256]) % 256;
|
|
var u = r[e];
|
|
r[e] = r[t], r[t] = u, c |= r[(r[e] + r[t]) % 256] << 24 - 8 * s;
|
|
}
|
|
return this._i = e, this._j = t, c;
|
|
}
|
|
d.RC4 = o._createHelper(a);
|
|
var n = f.RC4Drop = a.extend({ cfg: a.cfg.extend({ drop: 192 }), _doReset: function() {
|
|
a._doReset.call(this);
|
|
for (var r = this.cfg.drop; r > 0; r--) i.call(this);
|
|
} });
|
|
d.RC4Drop = o._createHelper(n);
|
|
})(), h.RC4);
|
|
}, 8056(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), (function() {
|
|
var d = h, o = d.lib, f = o.WordArray, a = o.Hasher, i = d.algo, n = f.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), r = f.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), e = f.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), t = f.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), c = f.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), s = f.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), u = i.RIPEMD160 = a.extend({ _doReset: function() {
|
|
this._hash = f.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
}, _doProcessBlock: function(T, b) {
|
|
for (var A = 0; A < 16; A++) {
|
|
var m = b + A, I = T[m];
|
|
T[m] = 16711935 & (I << 8 | I >>> 24) | 4278255360 & (I << 24 | I >>> 8);
|
|
}
|
|
var P, x, F, K, Y, Q, S, M, j, H, Z, L = this._hash.words, w = c.words, C = s.words, R = n.words, B = r.words, D = e.words, U = t.words;
|
|
for (Q = P = L[0], S = x = L[1], M = F = L[2], j = K = L[3], H = Y = L[4], A = 0; A < 80; A += 1) Z = P + T[b + R[A]] | 0, Z += A < 16 ? p(x, F, K) + w[0] : A < 32 ? l(x, F, K) + w[1] : A < 48 ? v(x, F, K) + w[2] : A < 64 ? y(x, F, K) + w[3] : g(x, F, K) + w[4], Z = (Z = _(Z |= 0, D[A])) + Y | 0, P = Y, Y = K, K = _(F, 10), F = x, x = Z, Z = Q + T[b + B[A]] | 0, Z += A < 16 ? g(S, M, j) + C[0] : A < 32 ? y(S, M, j) + C[1] : A < 48 ? v(S, M, j) + C[2] : A < 64 ? l(S, M, j) + C[3] : p(S, M, j) + C[4], Z = (Z = _(Z |= 0, U[A])) + H | 0, Q = H, H = j, j = _(M, 10), M = S, S = Z;
|
|
Z = L[1] + F + j | 0, L[1] = L[2] + K + H | 0, L[2] = L[3] + Y + Q | 0, L[3] = L[4] + P + S | 0, L[4] = L[0] + x + M | 0, L[0] = Z;
|
|
}, _doFinalize: function() {
|
|
var T = this._data, b = T.words, A = 8 * this._nDataBytes, m = 8 * T.sigBytes;
|
|
b[m >>> 5] |= 128 << 24 - m % 32, b[14 + (m + 64 >>> 9 << 4)] = 16711935 & (A << 8 | A >>> 24) | 4278255360 & (A << 24 | A >>> 8), T.sigBytes = 4 * (b.length + 1), this._process();
|
|
for (var I = this._hash, P = I.words, x = 0; x < 5; x++) {
|
|
var F = P[x];
|
|
P[x] = 16711935 & (F << 8 | F >>> 24) | 4278255360 & (F << 24 | F >>> 8);
|
|
}
|
|
return I;
|
|
}, clone: function() {
|
|
var T = a.clone.call(this);
|
|
return T._hash = this._hash.clone(), T;
|
|
} });
|
|
function p(T, b, A) {
|
|
return T ^ b ^ A;
|
|
}
|
|
function l(T, b, A) {
|
|
return T & b | ~T & A;
|
|
}
|
|
function v(T, b, A) {
|
|
return (T | ~b) ^ A;
|
|
}
|
|
function y(T, b, A) {
|
|
return T & A | b & ~A;
|
|
}
|
|
function g(T, b, A) {
|
|
return T ^ (b | ~A);
|
|
}
|
|
function _(T, b) {
|
|
return T << b | T >>> 32 - b;
|
|
}
|
|
d.RIPEMD160 = a._createHelper(u), d.HmacRIPEMD160 = a._createHmacHelper(u);
|
|
})(), h.RIPEMD160);
|
|
}, 5471(N, O, E) {
|
|
var h, d, o, f, a, i, n, r;
|
|
N.exports = (d = (h = r = E(9021)).lib, o = d.WordArray, f = d.Hasher, a = h.algo, i = [], n = a.SHA1 = f.extend({ _doReset: function() {
|
|
this._hash = new o.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
}, _doProcessBlock: function(e, t) {
|
|
for (var c = this._hash.words, s = c[0], u = c[1], p = c[2], l = c[3], v = c[4], y = 0; y < 80; y++) {
|
|
if (y < 16) i[y] = 0 | e[t + y];
|
|
else {
|
|
var g = i[y - 3] ^ i[y - 8] ^ i[y - 14] ^ i[y - 16];
|
|
i[y] = g << 1 | g >>> 31;
|
|
}
|
|
var _ = (s << 5 | s >>> 27) + v + i[y];
|
|
_ += y < 20 ? 1518500249 + (u & p | ~u & l) : y < 40 ? 1859775393 + (u ^ p ^ l) : y < 60 ? (u & p | u & l | p & l) - 1894007588 : (u ^ p ^ l) - 899497514, v = l, l = p, p = u << 30 | u >>> 2, u = s, s = _;
|
|
}
|
|
c[0] = c[0] + s | 0, c[1] = c[1] + u | 0, c[2] = c[2] + p | 0, c[3] = c[3] + l | 0, c[4] = c[4] + v | 0;
|
|
}, _doFinalize: function() {
|
|
var e = this._data, t = e.words, c = 8 * this._nDataBytes, s = 8 * e.sigBytes;
|
|
return t[s >>> 5] |= 128 << 24 - s % 32, t[14 + (s + 64 >>> 9 << 4)] = Math.floor(c / 4294967296), t[15 + (s + 64 >>> 9 << 4)] = c, e.sigBytes = 4 * t.length, this._process(), this._hash;
|
|
}, clone: function() {
|
|
var e = f.clone.call(this);
|
|
return e._hash = this._hash.clone(), e;
|
|
} }), h.SHA1 = f._createHelper(n), h.HmacSHA1 = f._createHmacHelper(n), r.SHA1);
|
|
}, 6308(N, O, E) {
|
|
var h, d, o, f, a, i;
|
|
N.exports = (i = E(9021), E(3009), d = (h = i).lib.WordArray, o = h.algo, f = o.SHA256, a = o.SHA224 = f.extend({ _doReset: function() {
|
|
this._hash = new d.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
|
|
}, _doFinalize: function() {
|
|
var n = f._doFinalize.call(this);
|
|
return n.sigBytes -= 4, n;
|
|
} }), h.SHA224 = f._createHelper(a), h.HmacSHA224 = f._createHmacHelper(a), i.SHA224);
|
|
}, 3009(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), (function(d) {
|
|
var o = h, f = o.lib, a = f.WordArray, i = f.Hasher, n = o.algo, r = [], e = [];
|
|
(function() {
|
|
function s(v) {
|
|
for (var y = d.sqrt(v), g = 2; g <= y; g++) if (!(v % g)) return !1;
|
|
return !0;
|
|
}
|
|
function u(v) {
|
|
return 4294967296 * (v - (0 | v)) | 0;
|
|
}
|
|
for (var p = 2, l = 0; l < 64; ) s(p) && (l < 8 && (r[l] = u(d.pow(p, 0.5))), e[l] = u(d.pow(p, 0.3333333333333333)), l++), p++;
|
|
})();
|
|
var t = [], c = n.SHA256 = i.extend({ _doReset: function() {
|
|
this._hash = new a.init(r.slice(0));
|
|
}, _doProcessBlock: function(s, u) {
|
|
for (var p = this._hash.words, l = p[0], v = p[1], y = p[2], g = p[3], _ = p[4], T = p[5], b = p[6], A = p[7], m = 0; m < 64; m++) {
|
|
if (m < 16) t[m] = 0 | s[u + m];
|
|
else {
|
|
var I = t[m - 15], P = (I << 25 | I >>> 7) ^ (I << 14 | I >>> 18) ^ I >>> 3, x = t[m - 2], F = (x << 15 | x >>> 17) ^ (x << 13 | x >>> 19) ^ x >>> 10;
|
|
t[m] = P + t[m - 7] + F + t[m - 16];
|
|
}
|
|
var K = l & v ^ l & y ^ v & y, Y = (l << 30 | l >>> 2) ^ (l << 19 | l >>> 13) ^ (l << 10 | l >>> 22), Q = A + ((_ << 26 | _ >>> 6) ^ (_ << 21 | _ >>> 11) ^ (_ << 7 | _ >>> 25)) + (_ & T ^ ~_ & b) + e[m] + t[m];
|
|
A = b, b = T, T = _, _ = g + Q | 0, g = y, y = v, v = l, l = Q + (Y + K) | 0;
|
|
}
|
|
p[0] = p[0] + l | 0, p[1] = p[1] + v | 0, p[2] = p[2] + y | 0, p[3] = p[3] + g | 0, p[4] = p[4] + _ | 0, p[5] = p[5] + T | 0, p[6] = p[6] + b | 0, p[7] = p[7] + A | 0;
|
|
}, _doFinalize: function() {
|
|
var s = this._data, u = s.words, p = 8 * this._nDataBytes, l = 8 * s.sigBytes;
|
|
return u[l >>> 5] |= 128 << 24 - l % 32, u[14 + (l + 64 >>> 9 << 4)] = d.floor(p / 4294967296), u[15 + (l + 64 >>> 9 << 4)] = p, s.sigBytes = 4 * u.length, this._process(), this._hash;
|
|
}, clone: function() {
|
|
var s = i.clone.call(this);
|
|
return s._hash = this._hash.clone(), s;
|
|
} });
|
|
o.SHA256 = i._createHelper(c), o.HmacSHA256 = i._createHmacHelper(c);
|
|
})(Math), h.SHA256);
|
|
}, 5953(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(3240), (function(d) {
|
|
var o = h, f = o.lib, a = f.WordArray, i = f.Hasher, n = o.x64.Word, r = o.algo, e = [], t = [], c = [];
|
|
(function() {
|
|
for (var p = 1, l = 0, v = 0; v < 24; v++) {
|
|
e[p + 5 * l] = (v + 1) * (v + 2) / 2 % 64;
|
|
var y = (2 * p + 3 * l) % 5;
|
|
p = l % 5, l = y;
|
|
}
|
|
for (p = 0; p < 5; p++) for (l = 0; l < 5; l++) t[p + 5 * l] = l + (2 * p + 3 * l) % 5 * 5;
|
|
for (var g = 1, _ = 0; _ < 24; _++) {
|
|
for (var T = 0, b = 0, A = 0; A < 7; A++) {
|
|
if (1 & g) {
|
|
var m = (1 << A) - 1;
|
|
m < 32 ? b ^= 1 << m : T ^= 1 << m - 32;
|
|
}
|
|
128 & g ? g = g << 1 ^ 113 : g <<= 1;
|
|
}
|
|
c[_] = n.create(T, b);
|
|
}
|
|
})();
|
|
var s = [];
|
|
(function() {
|
|
for (var p = 0; p < 25; p++) s[p] = n.create();
|
|
})();
|
|
var u = r.SHA3 = i.extend({ cfg: i.cfg.extend({ outputLength: 512 }), _doReset: function() {
|
|
for (var p = this._state = [], l = 0; l < 25; l++) p[l] = new n.init();
|
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
}, _doProcessBlock: function(p, l) {
|
|
for (var v = this._state, y = this.blockSize / 2, g = 0; g < y; g++) {
|
|
var _ = p[l + 2 * g], T = p[l + 2 * g + 1];
|
|
_ = 16711935 & (_ << 8 | _ >>> 24) | 4278255360 & (_ << 24 | _ >>> 8), T = 16711935 & (T << 8 | T >>> 24) | 4278255360 & (T << 24 | T >>> 8), (C = v[g]).high ^= T, C.low ^= _;
|
|
}
|
|
for (var b = 0; b < 24; b++) {
|
|
for (var A = 0; A < 5; A++) {
|
|
for (var m = 0, I = 0, P = 0; P < 5; P++) m ^= (C = v[A + 5 * P]).high, I ^= C.low;
|
|
var x = s[A];
|
|
x.high = m, x.low = I;
|
|
}
|
|
for (A = 0; A < 5; A++) {
|
|
var F = s[(A + 4) % 5], K = s[(A + 1) % 5], Y = K.high, Q = K.low;
|
|
for (m = F.high ^ (Y << 1 | Q >>> 31), I = F.low ^ (Q << 1 | Y >>> 31), P = 0; P < 5; P++) (C = v[A + 5 * P]).high ^= m, C.low ^= I;
|
|
}
|
|
for (var S = 1; S < 25; S++) {
|
|
var M = (C = v[S]).high, j = C.low, H = e[S];
|
|
H < 32 ? (m = M << H | j >>> 32 - H, I = j << H | M >>> 32 - H) : (m = j << H - 32 | M >>> 64 - H, I = M << H - 32 | j >>> 64 - H);
|
|
var Z = s[t[S]];
|
|
Z.high = m, Z.low = I;
|
|
}
|
|
var L = s[0], w = v[0];
|
|
for (L.high = w.high, L.low = w.low, A = 0; A < 5; A++) for (P = 0; P < 5; P++) {
|
|
var C = v[S = A + 5 * P], R = s[S], B = s[(A + 1) % 5 + 5 * P], D = s[(A + 2) % 5 + 5 * P];
|
|
C.high = R.high ^ ~B.high & D.high, C.low = R.low ^ ~B.low & D.low;
|
|
}
|
|
C = v[0];
|
|
var U = c[b];
|
|
C.high ^= U.high, C.low ^= U.low;
|
|
}
|
|
}, _doFinalize: function() {
|
|
var p = this._data, l = p.words, v = (this._nDataBytes, 8 * p.sigBytes), y = 32 * this.blockSize;
|
|
l[v >>> 5] |= 1 << 24 - v % 32, l[(d.ceil((v + 1) / y) * y >>> 5) - 1] |= 128, p.sigBytes = 4 * l.length, this._process();
|
|
for (var g = this._state, _ = this.cfg.outputLength / 8, T = _ / 8, b = [], A = 0; A < T; A++) {
|
|
var m = g[A], I = m.high, P = m.low;
|
|
I = 16711935 & (I << 8 | I >>> 24) | 4278255360 & (I << 24 | I >>> 8), P = 16711935 & (P << 8 | P >>> 24) | 4278255360 & (P << 24 | P >>> 8), b.push(P), b.push(I);
|
|
}
|
|
return new a.init(b, _);
|
|
}, clone: function() {
|
|
for (var p = i.clone.call(this), l = p._state = this._state.slice(0), v = 0; v < 25; v++) l[v] = l[v].clone();
|
|
return p;
|
|
} });
|
|
o.SHA3 = i._createHelper(u), o.HmacSHA3 = i._createHmacHelper(u);
|
|
})(Math), h.SHA3);
|
|
}, 9557(N, O, E) {
|
|
var h, d, o, f, a, i, n, r;
|
|
N.exports = (r = E(9021), E(3240), E(1380), d = (h = r).x64, o = d.Word, f = d.WordArray, a = h.algo, i = a.SHA512, n = a.SHA384 = i.extend({ _doReset: function() {
|
|
this._hash = new f.init([new o.init(3418070365, 3238371032), new o.init(1654270250, 914150663), new o.init(2438529370, 812702999), new o.init(355462360, 4144912697), new o.init(1731405415, 4290775857), new o.init(2394180231, 1750603025), new o.init(3675008525, 1694076839), new o.init(1203062813, 3204075428)]);
|
|
}, _doFinalize: function() {
|
|
var e = i._doFinalize.call(this);
|
|
return e.sigBytes -= 16, e;
|
|
} }), h.SHA384 = i._createHelper(n), h.HmacSHA384 = i._createHmacHelper(n), r.SHA384);
|
|
}, 1380(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(3240), (function() {
|
|
var d = h, o = d.lib.Hasher, f = d.x64, a = f.Word, i = f.WordArray, n = d.algo;
|
|
function r() {
|
|
return a.create.apply(a, arguments);
|
|
}
|
|
var e = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], t = [];
|
|
(function() {
|
|
for (var s = 0; s < 80; s++) t[s] = r();
|
|
})();
|
|
var c = n.SHA512 = o.extend({ _doReset: function() {
|
|
this._hash = new i.init([new a.init(1779033703, 4089235720), new a.init(3144134277, 2227873595), new a.init(1013904242, 4271175723), new a.init(2773480762, 1595750129), new a.init(1359893119, 2917565137), new a.init(2600822924, 725511199), new a.init(528734635, 4215389547), new a.init(1541459225, 327033209)]);
|
|
}, _doProcessBlock: function(s, u) {
|
|
for (var p = this._hash.words, l = p[0], v = p[1], y = p[2], g = p[3], _ = p[4], T = p[5], b = p[6], A = p[7], m = l.high, I = l.low, P = v.high, x = v.low, F = y.high, K = y.low, Y = g.high, Q = g.low, S = _.high, M = _.low, j = T.high, H = T.low, Z = b.high, L = b.low, w = A.high, C = A.low, R = m, B = I, D = P, U = x, k = F, G = K, V = Y, W = Q, z = S, q = M, $ = j, te = H, re = Z, ie = L, ue = w, ne = C, X = 0; X < 80; X++) {
|
|
var ee, J, ce = t[X];
|
|
if (X < 16) J = ce.high = 0 | s[u + 2 * X], ee = ce.low = 0 | s[u + 2 * X + 1];
|
|
else {
|
|
var _e = t[X - 15], pe = _e.high, ye = _e.low, Te = (pe >>> 1 | ye << 31) ^ (pe >>> 8 | ye << 24) ^ pe >>> 7, ae = (ye >>> 1 | pe << 31) ^ (ye >>> 8 | pe << 24) ^ (ye >>> 7 | pe << 25), le = t[X - 2], ve = le.high, Oe = le.low, se = (ve >>> 19 | Oe << 13) ^ (ve << 3 | Oe >>> 29) ^ ve >>> 6, de = (Oe >>> 19 | ve << 13) ^ (Oe << 3 | ve >>> 29) ^ (Oe >>> 6 | ve << 26), fe = t[X - 7], ge = fe.high, oe = fe.low, Ee = t[X - 16], Se = Ee.high, be = Ee.low;
|
|
J = (J = (J = Te + ge + ((ee = ae + oe) >>> 0 < ae >>> 0 ? 1 : 0)) + se + ((ee += de) >>> 0 < de >>> 0 ? 1 : 0)) + Se + ((ee += be) >>> 0 < be >>> 0 ? 1 : 0), ce.high = J, ce.low = ee;
|
|
}
|
|
var he, Re = z & $ ^ ~z & re, Ne = q & te ^ ~q & ie, Le = R & D ^ R & k ^ D & k, Pe = B & U ^ B & G ^ U & G, Me = (R >>> 28 | B << 4) ^ (R << 30 | B >>> 2) ^ (R << 25 | B >>> 7), me = (B >>> 28 | R << 4) ^ (B << 30 | R >>> 2) ^ (B << 25 | R >>> 7), De = (z >>> 14 | q << 18) ^ (z >>> 18 | q << 14) ^ (z << 23 | q >>> 9), Ke = (q >>> 14 | z << 18) ^ (q >>> 18 | z << 14) ^ (q << 23 | z >>> 9), xe = e[X], Ve = xe.high, ke = xe.low, Ue = ue + De + ((he = ne + Ke) >>> 0 < ne >>> 0 ? 1 : 0), Be = me + Pe;
|
|
ue = re, ne = ie, re = $, ie = te, $ = z, te = q, z = V + (Ue = (Ue = (Ue = Ue + Re + ((he += Ne) >>> 0 < Ne >>> 0 ? 1 : 0)) + Ve + ((he += ke) >>> 0 < ke >>> 0 ? 1 : 0)) + J + ((he += ee) >>> 0 < ee >>> 0 ? 1 : 0)) + ((q = W + he | 0) >>> 0 < W >>> 0 ? 1 : 0) | 0, V = k, W = G, k = D, G = U, D = R, U = B, R = Ue + (Me + Le + (Be >>> 0 < me >>> 0 ? 1 : 0)) + ((B = he + Be | 0) >>> 0 < he >>> 0 ? 1 : 0) | 0;
|
|
}
|
|
I = l.low = I + B, l.high = m + R + (I >>> 0 < B >>> 0 ? 1 : 0), x = v.low = x + U, v.high = P + D + (x >>> 0 < U >>> 0 ? 1 : 0), K = y.low = K + G, y.high = F + k + (K >>> 0 < G >>> 0 ? 1 : 0), Q = g.low = Q + W, g.high = Y + V + (Q >>> 0 < W >>> 0 ? 1 : 0), M = _.low = M + q, _.high = S + z + (M >>> 0 < q >>> 0 ? 1 : 0), H = T.low = H + te, T.high = j + $ + (H >>> 0 < te >>> 0 ? 1 : 0), L = b.low = L + ie, b.high = Z + re + (L >>> 0 < ie >>> 0 ? 1 : 0), C = A.low = C + ne, A.high = w + ue + (C >>> 0 < ne >>> 0 ? 1 : 0);
|
|
}, _doFinalize: function() {
|
|
var s = this._data, u = s.words, p = 8 * this._nDataBytes, l = 8 * s.sigBytes;
|
|
return u[l >>> 5] |= 128 << 24 - l % 32, u[30 + (l + 128 >>> 10 << 5)] = Math.floor(p / 4294967296), u[31 + (l + 128 >>> 10 << 5)] = p, s.sigBytes = 4 * u.length, this._process(), this._hash.toX32();
|
|
}, clone: function() {
|
|
var s = o.clone.call(this);
|
|
return s._hash = this._hash.clone(), s;
|
|
}, blockSize: 32 });
|
|
d.SHA512 = o._createHelper(c), d.HmacSHA512 = o._createHmacHelper(c);
|
|
})(), h.SHA512);
|
|
}, 7628(N, O, E) {
|
|
var h;
|
|
N.exports = (h = E(9021), E(754), E(4636), E(9506), E(7165), (function() {
|
|
var d = h, o = d.lib, f = o.WordArray, a = o.BlockCipher, i = d.algo, n = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], r = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], e = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], t = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], c = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], s = i.DES = a.extend({ _doReset: function() {
|
|
for (var v = this._key.words, y = [], g = 0; g < 56; g++) {
|
|
var _ = n[g] - 1;
|
|
y[g] = v[_ >>> 5] >>> 31 - _ % 32 & 1;
|
|
}
|
|
for (var T = this._subKeys = [], b = 0; b < 16; b++) {
|
|
var A = T[b] = [], m = e[b];
|
|
for (g = 0; g < 24; g++) A[g / 6 | 0] |= y[(r[g] - 1 + m) % 28] << 31 - g % 6, A[4 + (g / 6 | 0)] |= y[28 + (r[g + 24] - 1 + m) % 28] << 31 - g % 6;
|
|
for (A[0] = A[0] << 1 | A[0] >>> 31, g = 1; g < 7; g++) A[g] = A[g] >>> 4 * (g - 1) + 3;
|
|
A[7] = A[7] << 5 | A[7] >>> 27;
|
|
}
|
|
var I = this._invSubKeys = [];
|
|
for (g = 0; g < 16; g++) I[g] = T[15 - g];
|
|
}, encryptBlock: function(v, y) {
|
|
this._doCryptBlock(v, y, this._subKeys);
|
|
}, decryptBlock: function(v, y) {
|
|
this._doCryptBlock(v, y, this._invSubKeys);
|
|
}, _doCryptBlock: function(v, y, g) {
|
|
this._lBlock = v[y], this._rBlock = v[y + 1], u.call(this, 4, 252645135), u.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), u.call(this, 1, 1431655765);
|
|
for (var _ = 0; _ < 16; _++) {
|
|
for (var T = g[_], b = this._lBlock, A = this._rBlock, m = 0, I = 0; I < 8; I++) m |= t[I][((A ^ T[I]) & c[I]) >>> 0];
|
|
this._lBlock = A, this._rBlock = b ^ m;
|
|
}
|
|
var P = this._lBlock;
|
|
this._lBlock = this._rBlock, this._rBlock = P, u.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), u.call(this, 16, 65535), u.call(this, 4, 252645135), v[y] = this._lBlock, v[y + 1] = this._rBlock;
|
|
}, keySize: 2, ivSize: 2, blockSize: 2 });
|
|
function u(v, y) {
|
|
var g = (this._lBlock >>> v ^ this._rBlock) & y;
|
|
this._rBlock ^= g, this._lBlock ^= g << v;
|
|
}
|
|
function p(v, y) {
|
|
var g = (this._rBlock >>> v ^ this._lBlock) & y;
|
|
this._lBlock ^= g, this._rBlock ^= g << v;
|
|
}
|
|
d.DES = a._createHelper(s);
|
|
var l = i.TripleDES = a.extend({ _doReset: function() {
|
|
var v = this._key.words;
|
|
if (v.length !== 2 && v.length !== 4 && v.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
var y = v.slice(0, 2), g = v.length < 4 ? v.slice(0, 2) : v.slice(2, 4), _ = v.length < 6 ? v.slice(0, 2) : v.slice(4, 6);
|
|
this._des1 = s.createEncryptor(f.create(y)), this._des2 = s.createEncryptor(f.create(g)), this._des3 = s.createEncryptor(f.create(_));
|
|
}, encryptBlock: function(v, y) {
|
|
this._des1.encryptBlock(v, y), this._des2.decryptBlock(v, y), this._des3.encryptBlock(v, y);
|
|
}, decryptBlock: function(v, y) {
|
|
this._des3.decryptBlock(v, y), this._des2.encryptBlock(v, y), this._des1.decryptBlock(v, y);
|
|
}, keySize: 6, ivSize: 2, blockSize: 2 });
|
|
d.TripleDES = a._createHelper(l);
|
|
})(), h.TripleDES);
|
|
}, 3240(N, O, E) {
|
|
var h, d, o, f, a, i;
|
|
N.exports = (h = E(9021), o = (d = h).lib, f = o.Base, a = o.WordArray, (i = d.x64 = {}).Word = f.extend({ init: function(n, r) {
|
|
this.high = n, this.low = r;
|
|
} }), i.WordArray = f.extend({ init: function(n, r) {
|
|
n = this.words = n || [], this.sigBytes = r ?? 8 * n.length;
|
|
}, toX32: function() {
|
|
for (var n = this.words, r = n.length, e = [], t = 0; t < r; t++) {
|
|
var c = n[t];
|
|
e.push(c.high), e.push(c.low);
|
|
}
|
|
return a.create(e, this.sigBytes);
|
|
}, clone: function() {
|
|
for (var n = f.clone.call(this), r = n.words = this.words.slice(0), e = r.length, t = 0; t < e; t++) r[t] = r[t].clone();
|
|
return n;
|
|
} }), h);
|
|
}, 7833(N, O, E) {
|
|
var h = E(6763), d = E(5606);
|
|
O.formatArgs = function(f) {
|
|
if (f[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + f[0] + (this.useColors ? "%c " : " ") + "+" + N.exports.humanize(this.diff), !this.useColors) return;
|
|
const a = "color: " + this.color;
|
|
f.splice(1, 0, a, "color: inherit");
|
|
let i = 0, n = 0;
|
|
f[0].replace(/%[a-zA-Z%]/g, (r) => {
|
|
r !== "%%" && (i++, r === "%c" && (n = i));
|
|
}), f.splice(n, 0, a);
|
|
}, O.save = function(f) {
|
|
try {
|
|
f ? O.storage.setItem("debug", f) : O.storage.removeItem("debug");
|
|
} catch {
|
|
}
|
|
}, O.load = function() {
|
|
let f;
|
|
try {
|
|
f = O.storage.getItem("debug") || O.storage.getItem("DEBUG");
|
|
} catch {
|
|
}
|
|
return !f && d !== void 0 && "env" in d && (f = d.env.DEBUG), f;
|
|
}, O.useColors = function() {
|
|
if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
|
|
if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
|
|
let f;
|
|
return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (f = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(f[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
}, O.storage = (function() {
|
|
try {
|
|
return localStorage;
|
|
} catch {
|
|
}
|
|
})(), O.destroy = /* @__PURE__ */ (() => {
|
|
let f = !1;
|
|
return () => {
|
|
f || (f = !0, h.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
};
|
|
})(), O.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], O.log = h.debug || h.log || (() => {
|
|
}), N.exports = E(736)(O);
|
|
const { formatters: o } = N.exports;
|
|
o.j = function(f) {
|
|
try {
|
|
return JSON.stringify(f);
|
|
} catch (a) {
|
|
return "[UnexpectedJSONParseError]: " + a.message;
|
|
}
|
|
};
|
|
}, 736(N, O, E) {
|
|
var h = E(6763);
|
|
N.exports = function(d) {
|
|
function o(i) {
|
|
let n, r, e, t = null;
|
|
function c(...s) {
|
|
if (!c.enabled) return;
|
|
const u = c, p = Number(/* @__PURE__ */ new Date()), l = p - (n || p);
|
|
u.diff = l, u.prev = n, u.curr = p, n = p, s[0] = o.coerce(s[0]), typeof s[0] != "string" && s.unshift("%O");
|
|
let v = 0;
|
|
s[0] = s[0].replace(/%([a-zA-Z%])/g, (y, g) => {
|
|
if (y === "%%") return "%";
|
|
v++;
|
|
const _ = o.formatters[g];
|
|
if (typeof _ == "function") {
|
|
const T = s[v];
|
|
y = _.call(u, T), s.splice(v, 1), v--;
|
|
}
|
|
return y;
|
|
}), o.formatArgs.call(u, s), (u.log || o.log).apply(u, s);
|
|
}
|
|
return c.namespace = i, c.useColors = o.useColors(), c.color = o.selectColor(i), c.extend = f, c.destroy = o.destroy, Object.defineProperty(c, "enabled", { enumerable: !0, configurable: !1, get: () => t !== null ? t : (r !== o.namespaces && (r = o.namespaces, e = o.enabled(i)), e), set: (s) => {
|
|
t = s;
|
|
} }), typeof o.init == "function" && o.init(c), c;
|
|
}
|
|
function f(i, n) {
|
|
const r = o(this.namespace + (n === void 0 ? ":" : n) + i);
|
|
return r.log = this.log, r;
|
|
}
|
|
function a(i, n) {
|
|
let r = 0, e = 0, t = -1, c = 0;
|
|
for (; r < i.length; ) if (e < n.length && (n[e] === i[r] || n[e] === "*")) n[e] === "*" ? (t = e, c = r, e++) : (r++, e++);
|
|
else {
|
|
if (t === -1) return !1;
|
|
e = t + 1, c++, r = c;
|
|
}
|
|
for (; e < n.length && n[e] === "*"; ) e++;
|
|
return e === n.length;
|
|
}
|
|
return o.debug = o, o.default = o, o.coerce = function(i) {
|
|
return i instanceof Error ? i.stack || i.message : i;
|
|
}, o.disable = function() {
|
|
const i = [...o.names, ...o.skips.map((n) => "-" + n)].join(",");
|
|
return o.enable(""), i;
|
|
}, o.enable = function(i) {
|
|
o.save(i), o.namespaces = i, o.names = [], o.skips = [];
|
|
const n = (typeof i == "string" ? i : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
for (const r of n) r[0] === "-" ? o.skips.push(r.slice(1)) : o.names.push(r);
|
|
}, o.enabled = function(i) {
|
|
for (const n of o.skips) if (a(i, n)) return !1;
|
|
for (const n of o.names) if (a(i, n)) return !0;
|
|
return !1;
|
|
}, o.humanize = E(6585), o.destroy = function() {
|
|
h.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
}, Object.keys(d).forEach((i) => {
|
|
o[i] = d[i];
|
|
}), o.names = [], o.skips = [], o.formatters = {}, o.selectColor = function(i) {
|
|
let n = 0;
|
|
for (let r = 0; r < i.length; r++) n = (n << 5) - n + i.charCodeAt(r), n |= 0;
|
|
return o.colors[Math.abs(n) % o.colors.length];
|
|
}, o.enable(o.load()), o;
|
|
};
|
|
}, 41(N, O, E) {
|
|
var h = E(655), d = E(8068), o = E(9675), f = E(5795);
|
|
N.exports = function(a, i, n) {
|
|
if (!a || typeof a != "object" && typeof a != "function") throw new o("`obj` must be an object or a function`");
|
|
if (typeof i != "string" && typeof i != "symbol") throw new o("`property` must be a string or a symbol`");
|
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null) throw new o("`nonEnumerable`, if provided, must be a boolean or null");
|
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null) throw new o("`nonWritable`, if provided, must be a boolean or null");
|
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null) throw new o("`nonConfigurable`, if provided, must be a boolean or null");
|
|
if (arguments.length > 6 && typeof arguments[6] != "boolean") throw new o("`loose`, if provided, must be a boolean");
|
|
var r = arguments.length > 3 ? arguments[3] : null, e = arguments.length > 4 ? arguments[4] : null, t = arguments.length > 5 ? arguments[5] : null, c = arguments.length > 6 && arguments[6], s = !!f && f(a, i);
|
|
if (h) h(a, i, { configurable: t === null && s ? s.configurable : !t, enumerable: r === null && s ? s.enumerable : !r, value: n, writable: e === null && s ? s.writable : !e });
|
|
else {
|
|
if (!c && (r || e || t)) throw new d("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
a[i] = n;
|
|
}
|
|
};
|
|
}, 8452(N, O, E) {
|
|
var h = E(1189), d = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", o = Object.prototype.toString, f = Array.prototype.concat, a = E(41), i = E(592)(), n = function(e, t, c, s) {
|
|
if (t in e) {
|
|
if (s === !0) {
|
|
if (e[t] === c) return;
|
|
} else if (typeof (u = s) != "function" || o.call(u) !== "[object Function]" || !s()) return;
|
|
}
|
|
var u;
|
|
i ? a(e, t, c, !0) : a(e, t, c);
|
|
}, r = function(e, t) {
|
|
var c = arguments.length > 2 ? arguments[2] : {}, s = h(t);
|
|
d && (s = f.call(s, Object.getOwnPropertySymbols(t)));
|
|
for (var u = 0; u < s.length; u += 1) n(e, s[u], t[s[u]], c[s[u]]);
|
|
};
|
|
r.supportsDescriptors = !!i, N.exports = r;
|
|
}, 7176(N, O, E) {
|
|
var h, d = E(3126), o = E(5795);
|
|
try {
|
|
h = [].__proto__ === Array.prototype;
|
|
} catch (n) {
|
|
if (!n || typeof n != "object" || !("code" in n) || n.code !== "ERR_PROTO_ACCESS") throw n;
|
|
}
|
|
var f = !!h && o && o(Object.prototype, "__proto__"), a = Object, i = a.getPrototypeOf;
|
|
N.exports = f && typeof f.get == "function" ? d([f.get]) : typeof i == "function" && function(n) {
|
|
return i(n == null ? n : a(n));
|
|
};
|
|
}, 655(N) {
|
|
var O = Object.defineProperty || !1;
|
|
if (O) try {
|
|
O({}, "a", { value: 1 });
|
|
} catch {
|
|
O = !1;
|
|
}
|
|
N.exports = O;
|
|
}, 1237(N) {
|
|
N.exports = EvalError;
|
|
}, 9383(N) {
|
|
N.exports = Error;
|
|
}, 9290(N) {
|
|
N.exports = RangeError;
|
|
}, 9538(N) {
|
|
N.exports = ReferenceError;
|
|
}, 8068(N) {
|
|
N.exports = SyntaxError;
|
|
}, 9675(N) {
|
|
N.exports = TypeError;
|
|
}, 5345(N) {
|
|
N.exports = URIError;
|
|
}, 9612(N) {
|
|
N.exports = Object;
|
|
}, 2682(N, O, E) {
|
|
var h = E(9600), d = Object.prototype.toString, o = Object.prototype.hasOwnProperty;
|
|
N.exports = function(f, a, i) {
|
|
if (!h(a)) throw new TypeError("iterator must be a function");
|
|
var n, r;
|
|
arguments.length >= 3 && (n = i), r = f, d.call(r) === "[object Array]" ? (function(e, t, c) {
|
|
for (var s = 0, u = e.length; s < u; s++) o.call(e, s) && (c == null ? t(e[s], s, e) : t.call(c, e[s], s, e));
|
|
})(f, a, n) : typeof f == "string" ? (function(e, t, c) {
|
|
for (var s = 0, u = e.length; s < u; s++) c == null ? t(e.charAt(s), s, e) : t.call(c, e.charAt(s), s, e);
|
|
})(f, a, n) : (function(e, t, c) {
|
|
for (var s in e) o.call(e, s) && (c == null ? t(e[s], s, e) : t.call(c, e[s], s, e));
|
|
})(f, a, n);
|
|
};
|
|
}, 9353(N) {
|
|
var O = Object.prototype.toString, E = Math.max, h = function(d, o) {
|
|
for (var f = [], a = 0; a < d.length; a += 1) f[a] = d[a];
|
|
for (var i = 0; i < o.length; i += 1) f[i + d.length] = o[i];
|
|
return f;
|
|
};
|
|
N.exports = function(d) {
|
|
var o = this;
|
|
if (typeof o != "function" || O.apply(o) !== "[object Function]") throw new TypeError("Function.prototype.bind called on incompatible " + o);
|
|
for (var f, a = (function(t) {
|
|
for (var c = [], s = 1, u = 0; s < t.length; s += 1, u += 1) c[u] = t[s];
|
|
return c;
|
|
})(arguments), i = E(0, o.length - a.length), n = [], r = 0; r < i; r++) n[r] = "$" + r;
|
|
if (f = Function("binder", "return function (" + (function(t) {
|
|
for (var c = "", s = 0; s < t.length; s += 1) c += t[s], s + 1 < t.length && (c += ",");
|
|
return c;
|
|
})(n) + "){ return binder.apply(this,arguments); }")(function() {
|
|
if (this instanceof f) {
|
|
var t = o.apply(this, h(a, arguments));
|
|
return Object(t) === t ? t : this;
|
|
}
|
|
return o.apply(d, h(a, arguments));
|
|
}), o.prototype) {
|
|
var e = function() {
|
|
};
|
|
e.prototype = o.prototype, f.prototype = new e(), e.prototype = null;
|
|
}
|
|
return f;
|
|
};
|
|
}, 6743(N, O, E) {
|
|
var h = E(9353);
|
|
N.exports = Function.prototype.bind || h;
|
|
}, 453(N, O, E) {
|
|
var h, d = E(9612), o = E(9383), f = E(1237), a = E(9290), i = E(9538), n = E(8068), r = E(9675), e = E(5345), t = E(1514), c = E(8968), s = E(6188), u = E(8002), p = E(5880), l = E(414), v = E(3093), y = Function, g = function(V) {
|
|
try {
|
|
return y('"use strict"; return (' + V + ").constructor;")();
|
|
} catch {
|
|
}
|
|
}, _ = E(5795), T = E(655), b = function() {
|
|
throw new r();
|
|
}, A = _ ? (function() {
|
|
try {
|
|
return b;
|
|
} catch {
|
|
try {
|
|
return _(arguments, "callee").get;
|
|
} catch {
|
|
return b;
|
|
}
|
|
}
|
|
})() : b, m = E(4039)(), I = E(3628), P = E(1064), x = E(8648), F = E(1002), K = E(76), Y = {}, Q = typeof Uint8Array < "u" && I ? I(Uint8Array) : h, S = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? h : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? h : ArrayBuffer, "%ArrayIteratorPrototype%": m && I ? I([][Symbol.iterator]()) : h, "%AsyncFromSyncIteratorPrototype%": h, "%AsyncFunction%": Y, "%AsyncGenerator%": Y, "%AsyncGeneratorFunction%": Y, "%AsyncIteratorPrototype%": Y, "%Atomics%": typeof Atomics > "u" ? h : Atomics, "%BigInt%": typeof BigInt > "u" ? h : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? h : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? h : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? h : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": o, "%eval%": eval, "%EvalError%": f, "%Float16Array%": typeof Float16Array > "u" ? h : Float16Array, "%Float32Array%": typeof Float32Array > "u" ? h : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? h : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? h : FinalizationRegistry, "%Function%": y, "%GeneratorFunction%": Y, "%Int8Array%": typeof Int8Array > "u" ? h : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? h : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? h : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": m && I ? I(I([][Symbol.iterator]())) : h, "%JSON%": typeof JSON == "object" ? JSON : h, "%Map%": typeof Map > "u" ? h : Map, "%MapIteratorPrototype%": typeof Map < "u" && m && I ? I((/* @__PURE__ */ new Map())[Symbol.iterator]()) : h, "%Math%": Math, "%Number%": Number, "%Object%": d, "%Object.getOwnPropertyDescriptor%": _, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? h : Promise, "%Proxy%": typeof Proxy > "u" ? h : Proxy, "%RangeError%": a, "%ReferenceError%": i, "%Reflect%": typeof Reflect > "u" ? h : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? h : Set, "%SetIteratorPrototype%": typeof Set < "u" && m && I ? I((/* @__PURE__ */ new Set())[Symbol.iterator]()) : h, "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? h : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": m && I ? I(""[Symbol.iterator]()) : h, "%Symbol%": m ? Symbol : h, "%SyntaxError%": n, "%ThrowTypeError%": A, "%TypedArray%": Q, "%TypeError%": r, "%Uint8Array%": typeof Uint8Array > "u" ? h : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? h : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? h : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? h : Uint32Array, "%URIError%": e, "%WeakMap%": typeof WeakMap > "u" ? h : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? h : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? h : WeakSet, "%Function.prototype.call%": K, "%Function.prototype.apply%": F, "%Object.defineProperty%": T, "%Object.getPrototypeOf%": P, "%Math.abs%": t, "%Math.floor%": c, "%Math.max%": s, "%Math.min%": u, "%Math.pow%": p, "%Math.round%": l, "%Math.sign%": v, "%Reflect.getPrototypeOf%": x };
|
|
if (I) try {
|
|
null.error;
|
|
} catch (V) {
|
|
var M = I(I(V));
|
|
S["%Error.prototype%"] = M;
|
|
}
|
|
var j = function V(W) {
|
|
var z;
|
|
if (W === "%AsyncFunction%") z = g("async function () {}");
|
|
else if (W === "%GeneratorFunction%") z = g("function* () {}");
|
|
else if (W === "%AsyncGeneratorFunction%") z = g("async function* () {}");
|
|
else if (W === "%AsyncGenerator%") {
|
|
var q = V("%AsyncGeneratorFunction%");
|
|
q && (z = q.prototype);
|
|
} else if (W === "%AsyncIteratorPrototype%") {
|
|
var $ = V("%AsyncGenerator%");
|
|
$ && I && (z = I($.prototype));
|
|
}
|
|
return S[W] = z, z;
|
|
}, H = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, Z = E(6743), L = E(9957), w = Z.call(K, Array.prototype.concat), C = Z.call(F, Array.prototype.splice), R = Z.call(K, String.prototype.replace), B = Z.call(K, String.prototype.slice), D = Z.call(K, RegExp.prototype.exec), U = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, k = /\\(\\)?/g, G = function(V, W) {
|
|
var z, q = V;
|
|
if (L(H, q) && (q = "%" + (z = H[q])[0] + "%"), L(S, q)) {
|
|
var $ = S[q];
|
|
if ($ === Y && ($ = j(q)), $ === void 0 && !W) throw new r("intrinsic " + V + " exists, but is not available. Please file an issue!");
|
|
return { alias: z, name: q, value: $ };
|
|
}
|
|
throw new n("intrinsic " + V + " does not exist!");
|
|
};
|
|
N.exports = function(V, W) {
|
|
if (typeof V != "string" || V.length === 0) throw new r("intrinsic name must be a non-empty string");
|
|
if (arguments.length > 1 && typeof W != "boolean") throw new r('"allowMissing" argument must be a boolean');
|
|
if (D(/^%?[^%]*%?$/, V) === null) throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
var z = (function(pe) {
|
|
var ye = B(pe, 0, 1), Te = B(pe, -1);
|
|
if (ye === "%" && Te !== "%") throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
if (Te === "%" && ye !== "%") throw new n("invalid intrinsic syntax, expected opening `%`");
|
|
var ae = [];
|
|
return R(pe, U, function(le, ve, Oe, se) {
|
|
ae[ae.length] = Oe ? R(se, k, "$1") : ve || le;
|
|
}), ae;
|
|
})(V), q = z.length > 0 ? z[0] : "", $ = G("%" + q + "%", W), te = $.name, re = $.value, ie = !1, ue = $.alias;
|
|
ue && (q = ue[0], C(z, w([0, 1], ue)));
|
|
for (var ne = 1, X = !0; ne < z.length; ne += 1) {
|
|
var ee = z[ne], J = B(ee, 0, 1), ce = B(ee, -1);
|
|
if ((J === '"' || J === "'" || J === "`" || ce === '"' || ce === "'" || ce === "`") && J !== ce) throw new n("property names with quotes must have matching quotes");
|
|
if (ee !== "constructor" && X || (ie = !0), L(S, te = "%" + (q += "." + ee) + "%")) re = S[te];
|
|
else if (re != null) {
|
|
if (!(ee in re)) {
|
|
if (!W) throw new r("base intrinsic for " + V + " exists, but the property is not available.");
|
|
return;
|
|
}
|
|
if (_ && ne + 1 >= z.length) {
|
|
var _e = _(re, ee);
|
|
re = (X = !!_e) && "get" in _e && !("originalValue" in _e.get) ? _e.get : re[ee];
|
|
} else X = L(re, ee), re = re[ee];
|
|
X && !ie && (S[te] = re);
|
|
}
|
|
}
|
|
return re;
|
|
};
|
|
}, 1064(N, O, E) {
|
|
var h = E(9612);
|
|
N.exports = h.getPrototypeOf || null;
|
|
}, 8648(N) {
|
|
N.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
}, 3628(N, O, E) {
|
|
var h = E(8648), d = E(1064), o = E(7176);
|
|
N.exports = h ? function(f) {
|
|
return h(f);
|
|
} : d ? function(f) {
|
|
if (!f || typeof f != "object" && typeof f != "function") throw new TypeError("getProto: not an object");
|
|
return d(f);
|
|
} : o ? function(f) {
|
|
return o(f);
|
|
} : null;
|
|
}, 6549(N) {
|
|
N.exports = Object.getOwnPropertyDescriptor;
|
|
}, 5795(N, O, E) {
|
|
var h = E(6549);
|
|
if (h) try {
|
|
h([], "length");
|
|
} catch {
|
|
h = null;
|
|
}
|
|
N.exports = h;
|
|
}, 592(N, O, E) {
|
|
var h = E(655), d = function() {
|
|
return !!h;
|
|
};
|
|
d.hasArrayLengthDefineBug = function() {
|
|
if (!h) return null;
|
|
try {
|
|
return h([], "length", { value: 1 }).length !== 1;
|
|
} catch {
|
|
return !0;
|
|
}
|
|
}, N.exports = d;
|
|
}, 4039(N, O, E) {
|
|
var h = typeof Symbol < "u" && Symbol, d = E(1333);
|
|
N.exports = function() {
|
|
return typeof h == "function" && typeof Symbol == "function" && typeof h("foo") == "symbol" && typeof Symbol("bar") == "symbol" && d();
|
|
};
|
|
}, 1333(N) {
|
|
N.exports = function() {
|
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
|
|
if (typeof Symbol.iterator == "symbol") return !0;
|
|
var O = {}, E = Symbol("test"), h = Object(E);
|
|
if (typeof E == "string" || Object.prototype.toString.call(E) !== "[object Symbol]" || Object.prototype.toString.call(h) !== "[object Symbol]") return !1;
|
|
for (var d in O[E] = 42, O) return !1;
|
|
if (typeof Object.keys == "function" && Object.keys(O).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(O).length !== 0) return !1;
|
|
var o = Object.getOwnPropertySymbols(O);
|
|
if (o.length !== 1 || o[0] !== E || !Object.prototype.propertyIsEnumerable.call(O, E)) return !1;
|
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
var f = Object.getOwnPropertyDescriptor(O, E);
|
|
if (f.value !== 42 || f.enumerable !== !0) return !1;
|
|
}
|
|
return !0;
|
|
};
|
|
}, 9092(N, O, E) {
|
|
var h = E(1333);
|
|
N.exports = function() {
|
|
return h() && !!Symbol.toStringTag;
|
|
};
|
|
}, 9957(N, O, E) {
|
|
var h = Function.prototype.call, d = Object.prototype.hasOwnProperty, o = E(6743);
|
|
N.exports = o.call(h, d);
|
|
}, 6698(N) {
|
|
typeof Object.create == "function" ? N.exports = function(O, E) {
|
|
E && (O.super_ = E, O.prototype = Object.create(E.prototype, { constructor: { value: O, enumerable: !1, writable: !0, configurable: !0 } }));
|
|
} : N.exports = function(O, E) {
|
|
if (E) {
|
|
O.super_ = E;
|
|
var h = function() {
|
|
};
|
|
h.prototype = E.prototype, O.prototype = new h(), O.prototype.constructor = O;
|
|
}
|
|
};
|
|
}, 7244(N, O, E) {
|
|
var h = E(9092)(), d = E(6556)("Object.prototype.toString"), o = function(i) {
|
|
return !(h && i && typeof i == "object" && Symbol.toStringTag in i) && d(i) === "[object Arguments]";
|
|
}, f = function(i) {
|
|
return !!o(i) || i !== null && typeof i == "object" && "length" in i && typeof i.length == "number" && i.length >= 0 && d(i) !== "[object Array]" && "callee" in i && d(i.callee) === "[object Function]";
|
|
}, a = (function() {
|
|
return o(arguments);
|
|
})();
|
|
o.isLegacyArguments = f, N.exports = a ? o : f;
|
|
}, 9600(N) {
|
|
var O, E, h = Function.prototype.toString, d = typeof Reflect == "object" && Reflect !== null && Reflect.apply;
|
|
if (typeof d == "function" && typeof Object.defineProperty == "function") try {
|
|
O = Object.defineProperty({}, "length", { get: function() {
|
|
throw E;
|
|
} }), E = {}, d(function() {
|
|
throw 42;
|
|
}, null, O);
|
|
} catch (c) {
|
|
c !== E && (d = null);
|
|
}
|
|
else d = null;
|
|
var o = /^\s*class\b/, f = function(c) {
|
|
try {
|
|
var s = h.call(c);
|
|
return o.test(s);
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}, a = function(c) {
|
|
try {
|
|
return !f(c) && (h.call(c), !0);
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}, i = Object.prototype.toString, n = typeof Symbol == "function" && !!Symbol.toStringTag, r = !(0 in [,]), e = function() {
|
|
return !1;
|
|
};
|
|
if (typeof document == "object") {
|
|
var t = document.all;
|
|
i.call(t) === i.call(document.all) && (e = function(c) {
|
|
if ((r || !c) && (c === void 0 || typeof c == "object")) try {
|
|
var s = i.call(c);
|
|
return (s === "[object HTMLAllCollection]" || s === "[object HTML document.all class]" || s === "[object HTMLCollection]" || s === "[object Object]") && c("") == null;
|
|
} catch {
|
|
}
|
|
return !1;
|
|
});
|
|
}
|
|
N.exports = d ? function(c) {
|
|
if (e(c)) return !0;
|
|
if (!c || typeof c != "function" && typeof c != "object") return !1;
|
|
try {
|
|
d(c, null, O);
|
|
} catch (s) {
|
|
if (s !== E) return !1;
|
|
}
|
|
return !f(c) && a(c);
|
|
} : function(c) {
|
|
if (e(c)) return !0;
|
|
if (!c || typeof c != "function" && typeof c != "object") return !1;
|
|
if (n) return a(c);
|
|
if (f(c)) return !1;
|
|
var s = i.call(c);
|
|
return !(s !== "[object Function]" && s !== "[object GeneratorFunction]" && !/^\[object HTML/.test(s)) && a(c);
|
|
};
|
|
}, 8184(N, O, E) {
|
|
var h, d = E(6556), o = E(9721)(/^\s*(?:function)?\*/), f = E(9092)(), a = E(3628), i = d("Object.prototype.toString"), n = d("Function.prototype.toString");
|
|
N.exports = function(r) {
|
|
if (typeof r != "function") return !1;
|
|
if (o(n(r))) return !0;
|
|
if (!f) return i(r) === "[object GeneratorFunction]";
|
|
if (!a) return !1;
|
|
if (h === void 0) {
|
|
var e = (function() {
|
|
if (!f) return !1;
|
|
try {
|
|
return Function("return function*() {}")();
|
|
} catch {
|
|
}
|
|
})();
|
|
h = !!e && a(e);
|
|
}
|
|
return a(r) === h;
|
|
};
|
|
}, 3003(N) {
|
|
N.exports = function(O) {
|
|
return O != O;
|
|
};
|
|
}, 4133(N, O, E) {
|
|
var h = E(487), d = E(8452), o = E(3003), f = E(6642), a = E(2464), i = h(f(), Number);
|
|
d(i, { getPolyfill: f, implementation: o, shim: a }), N.exports = i;
|
|
}, 6642(N, O, E) {
|
|
var h = E(3003);
|
|
N.exports = function() {
|
|
return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a") ? Number.isNaN : h;
|
|
};
|
|
}, 2464(N, O, E) {
|
|
var h = E(8452), d = E(6642);
|
|
N.exports = function() {
|
|
var o = d();
|
|
return h(Number, { isNaN: o }, { isNaN: function() {
|
|
return Number.isNaN !== o;
|
|
} }), o;
|
|
};
|
|
}, 4035(N, O, E) {
|
|
var h, d = E(6556), o = E(9092)(), f = E(9957), a = E(5795);
|
|
if (o) {
|
|
var i = d("RegExp.prototype.exec"), n = {}, r = function() {
|
|
throw n;
|
|
}, e = { toString: r, valueOf: r };
|
|
typeof Symbol.toPrimitive == "symbol" && (e[Symbol.toPrimitive] = r), h = function(c) {
|
|
if (!c || typeof c != "object") return !1;
|
|
var s = a(c, "lastIndex");
|
|
if (!s || !f(s, "value")) return !1;
|
|
try {
|
|
i(c, e);
|
|
} catch (u) {
|
|
return u === n;
|
|
}
|
|
};
|
|
} else {
|
|
var t = d("Object.prototype.toString");
|
|
h = function(c) {
|
|
return !(!c || typeof c != "object" && typeof c != "function") && t(c) === "[object RegExp]";
|
|
};
|
|
}
|
|
N.exports = h;
|
|
}, 5680(N, O, E) {
|
|
var h = E(5767);
|
|
N.exports = function(d) {
|
|
return !!h(d);
|
|
};
|
|
}, 1514(N) {
|
|
N.exports = Math.abs;
|
|
}, 8968(N) {
|
|
N.exports = Math.floor;
|
|
}, 4459(N) {
|
|
N.exports = Number.isNaN || function(O) {
|
|
return O != O;
|
|
};
|
|
}, 6188(N) {
|
|
N.exports = Math.max;
|
|
}, 8002(N) {
|
|
N.exports = Math.min;
|
|
}, 5880(N) {
|
|
N.exports = Math.pow;
|
|
}, 414(N) {
|
|
N.exports = Math.round;
|
|
}, 3093(N, O, E) {
|
|
var h = E(4459);
|
|
N.exports = function(d) {
|
|
return h(d) || d === 0 ? d : d < 0 ? -1 : 1;
|
|
};
|
|
}, 6585(N) {
|
|
var O = 1e3, E = 60 * O, h = 60 * E, d = 24 * h, o = 7 * d;
|
|
function f(a, i, n, r) {
|
|
var e = i >= 1.5 * n;
|
|
return Math.round(a / n) + " " + r + (e ? "s" : "");
|
|
}
|
|
N.exports = function(a, i) {
|
|
i = i || {};
|
|
var n, r, e = typeof a;
|
|
if (e === "string" && a.length > 0) return (function(t) {
|
|
if (!((t = String(t)).length > 100)) {
|
|
var c = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);
|
|
if (c) {
|
|
var s = parseFloat(c[1]);
|
|
switch ((c[2] || "ms").toLowerCase()) {
|
|
case "years":
|
|
case "year":
|
|
case "yrs":
|
|
case "yr":
|
|
case "y":
|
|
return 315576e5 * s;
|
|
case "weeks":
|
|
case "week":
|
|
case "w":
|
|
return s * o;
|
|
case "days":
|
|
case "day":
|
|
case "d":
|
|
return s * d;
|
|
case "hours":
|
|
case "hour":
|
|
case "hrs":
|
|
case "hr":
|
|
case "h":
|
|
return s * h;
|
|
case "minutes":
|
|
case "minute":
|
|
case "mins":
|
|
case "min":
|
|
case "m":
|
|
return s * E;
|
|
case "seconds":
|
|
case "second":
|
|
case "secs":
|
|
case "sec":
|
|
case "s":
|
|
return s * O;
|
|
case "milliseconds":
|
|
case "millisecond":
|
|
case "msecs":
|
|
case "msec":
|
|
case "ms":
|
|
return s;
|
|
default:
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
})(a);
|
|
if (e === "number" && isFinite(a)) return i.long ? (n = a, (r = Math.abs(n)) >= d ? f(n, r, d, "day") : r >= h ? f(n, r, h, "hour") : r >= E ? f(n, r, E, "minute") : r >= O ? f(n, r, O, "second") : n + " ms") : (function(t) {
|
|
var c = Math.abs(t);
|
|
return c >= d ? Math.round(t / d) + "d" : c >= h ? Math.round(t / h) + "h" : c >= E ? Math.round(t / E) + "m" : c >= O ? Math.round(t / O) + "s" : t + "ms";
|
|
})(a);
|
|
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(a));
|
|
};
|
|
}, 9211(N) {
|
|
var O = function(E) {
|
|
return E != E;
|
|
};
|
|
N.exports = function(E, h) {
|
|
return E === 0 && h === 0 ? 1 / E == 1 / h : E === h || !(!O(E) || !O(h));
|
|
};
|
|
}, 7653(N, O, E) {
|
|
var h = E(8452), d = E(487), o = E(9211), f = E(9394), a = E(6576), i = d(f(), Object);
|
|
h(i, { getPolyfill: f, implementation: o, shim: a }), N.exports = i;
|
|
}, 9394(N, O, E) {
|
|
var h = E(9211);
|
|
N.exports = function() {
|
|
return typeof Object.is == "function" ? Object.is : h;
|
|
};
|
|
}, 6576(N, O, E) {
|
|
var h = E(9394), d = E(8452);
|
|
N.exports = function() {
|
|
var o = h();
|
|
return d(Object, { is: o }, { is: function() {
|
|
return Object.is !== o;
|
|
} }), o;
|
|
};
|
|
}, 8875(N, O, E) {
|
|
var h;
|
|
if (!Object.keys) {
|
|
var d = Object.prototype.hasOwnProperty, o = Object.prototype.toString, f = E(1093), a = Object.prototype.propertyIsEnumerable, i = !a.call({ toString: null }, "toString"), n = a.call(function() {
|
|
}, "prototype"), r = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], e = function(s) {
|
|
var u = s.constructor;
|
|
return u && u.prototype === s;
|
|
}, t = { $applicationCache: !0, $console: !0, $external: !0, $frame: !0, $frameElement: !0, $frames: !0, $innerHeight: !0, $innerWidth: !0, $onmozfullscreenchange: !0, $onmozfullscreenerror: !0, $outerHeight: !0, $outerWidth: !0, $pageXOffset: !0, $pageYOffset: !0, $parent: !0, $scrollLeft: !0, $scrollTop: !0, $scrollX: !0, $scrollY: !0, $self: !0, $webkitIndexedDB: !0, $webkitStorageInfo: !0, $window: !0 }, c = (function() {
|
|
if (typeof window > "u") return !1;
|
|
for (var s in window) try {
|
|
if (!t["$" + s] && d.call(window, s) && window[s] !== null && typeof window[s] == "object") try {
|
|
e(window[s]);
|
|
} catch {
|
|
return !0;
|
|
}
|
|
} catch {
|
|
return !0;
|
|
}
|
|
return !1;
|
|
})();
|
|
h = function(s) {
|
|
var u = s !== null && typeof s == "object", p = o.call(s) === "[object Function]", l = f(s), v = u && o.call(s) === "[object String]", y = [];
|
|
if (!u && !p && !l) throw new TypeError("Object.keys called on a non-object");
|
|
var g = n && p;
|
|
if (v && s.length > 0 && !d.call(s, 0)) for (var _ = 0; _ < s.length; ++_) y.push(String(_));
|
|
if (l && s.length > 0) for (var T = 0; T < s.length; ++T) y.push(String(T));
|
|
else for (var b in s) g && b === "prototype" || !d.call(s, b) || y.push(String(b));
|
|
if (i) for (var A = (function(I) {
|
|
if (typeof window > "u" || !c) return e(I);
|
|
try {
|
|
return e(I);
|
|
} catch {
|
|
return !1;
|
|
}
|
|
})(s), m = 0; m < r.length; ++m) A && r[m] === "constructor" || !d.call(s, r[m]) || y.push(r[m]);
|
|
return y;
|
|
};
|
|
}
|
|
N.exports = h;
|
|
}, 1189(N, O, E) {
|
|
var h = Array.prototype.slice, d = E(1093), o = Object.keys, f = o ? function(i) {
|
|
return o(i);
|
|
} : E(8875), a = Object.keys;
|
|
f.shim = function() {
|
|
if (Object.keys) {
|
|
var i = (function() {
|
|
var n = Object.keys(arguments);
|
|
return n && n.length === arguments.length;
|
|
})(1, 2);
|
|
i || (Object.keys = function(n) {
|
|
return d(n) ? a(h.call(n)) : a(n);
|
|
});
|
|
} else Object.keys = f;
|
|
return Object.keys || f;
|
|
}, N.exports = f;
|
|
}, 1093(N) {
|
|
var O = Object.prototype.toString;
|
|
N.exports = function(E) {
|
|
var h = O.call(E), d = h === "[object Arguments]";
|
|
return d || (d = h !== "[object Array]" && E !== null && typeof E == "object" && typeof E.length == "number" && E.length >= 0 && O.call(E.callee) === "[object Function]"), d;
|
|
};
|
|
}, 8403(N, O, E) {
|
|
var h = E(1189), d = E(1333)(), o = E(6556), f = E(9612), a = o("Array.prototype.push"), i = o("Object.prototype.propertyIsEnumerable"), n = d ? f.getOwnPropertySymbols : null;
|
|
N.exports = function(r, e) {
|
|
if (r == null) throw new TypeError("target must be an object");
|
|
var t = f(r);
|
|
if (arguments.length === 1) return t;
|
|
for (var c = 1; c < arguments.length; ++c) {
|
|
var s = f(arguments[c]), u = h(s), p = d && (f.getOwnPropertySymbols || n);
|
|
if (p) for (var l = p(s), v = 0; v < l.length; ++v) {
|
|
var y = l[v];
|
|
i(s, y) && a(u, y);
|
|
}
|
|
for (var g = 0; g < u.length; ++g) {
|
|
var _ = u[g];
|
|
if (i(s, _)) {
|
|
var T = s[_];
|
|
t[_] = T;
|
|
}
|
|
}
|
|
}
|
|
return t;
|
|
};
|
|
}, 9133(N, O, E) {
|
|
var h = E(8403);
|
|
N.exports = function() {
|
|
return Object.assign ? (function() {
|
|
if (!Object.assign) return !1;
|
|
for (var d = "abcdefghijklmnopqrst", o = d.split(""), f = {}, a = 0; a < o.length; ++a) f[o[a]] = o[a];
|
|
var i = Object.assign({}, f), n = "";
|
|
for (var r in i) n += r;
|
|
return d !== n;
|
|
})() || (function() {
|
|
if (!Object.assign || !Object.preventExtensions) return !1;
|
|
var d = Object.preventExtensions({ 1: 2 });
|
|
try {
|
|
Object.assign(d, "xy");
|
|
} catch {
|
|
return d[1] === "y";
|
|
}
|
|
return !1;
|
|
})() ? h : Object.assign : h;
|
|
};
|
|
}, 6578(N) {
|
|
N.exports = ["Float16Array", "Float32Array", "Float64Array", "Int8Array", "Int16Array", "Int32Array", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "BigInt64Array", "BigUint64Array"];
|
|
}, 5606(N) {
|
|
var O, E, h = N.exports = {};
|
|
function d() {
|
|
throw new Error("setTimeout has not been defined");
|
|
}
|
|
function o() {
|
|
throw new Error("clearTimeout has not been defined");
|
|
}
|
|
function f(u) {
|
|
if (O === setTimeout) return setTimeout(u, 0);
|
|
if ((O === d || !O) && setTimeout) return O = setTimeout, setTimeout(u, 0);
|
|
try {
|
|
return O(u, 0);
|
|
} catch {
|
|
try {
|
|
return O.call(null, u, 0);
|
|
} catch {
|
|
return O.call(this, u, 0);
|
|
}
|
|
}
|
|
}
|
|
(function() {
|
|
try {
|
|
O = typeof setTimeout == "function" ? setTimeout : d;
|
|
} catch {
|
|
O = d;
|
|
}
|
|
try {
|
|
E = typeof clearTimeout == "function" ? clearTimeout : o;
|
|
} catch {
|
|
E = o;
|
|
}
|
|
})();
|
|
var a, i = [], n = !1, r = -1;
|
|
function e() {
|
|
n && a && (n = !1, a.length ? i = a.concat(i) : r = -1, i.length && t());
|
|
}
|
|
function t() {
|
|
if (!n) {
|
|
var u = f(e);
|
|
n = !0;
|
|
for (var p = i.length; p; ) {
|
|
for (a = i, i = []; ++r < p; ) a && a[r].run();
|
|
r = -1, p = i.length;
|
|
}
|
|
a = null, n = !1, (function(l) {
|
|
if (E === clearTimeout) return clearTimeout(l);
|
|
if ((E === o || !E) && clearTimeout) return E = clearTimeout, clearTimeout(l);
|
|
try {
|
|
return E(l);
|
|
} catch {
|
|
try {
|
|
return E.call(null, l);
|
|
} catch {
|
|
return E.call(this, l);
|
|
}
|
|
}
|
|
})(u);
|
|
}
|
|
}
|
|
function c(u, p) {
|
|
this.fun = u, this.array = p;
|
|
}
|
|
function s() {
|
|
}
|
|
h.nextTick = function(u) {
|
|
var p = new Array(arguments.length - 1);
|
|
if (arguments.length > 1) for (var l = 1; l < arguments.length; l++) p[l - 1] = arguments[l];
|
|
i.push(new c(u, p)), i.length !== 1 || n || f(t);
|
|
}, c.prototype.run = function() {
|
|
this.fun.apply(null, this.array);
|
|
}, h.title = "browser", h.browser = !0, h.env = {}, h.argv = [], h.version = "", h.versions = {}, h.on = s, h.addListener = s, h.once = s, h.off = s, h.removeListener = s, h.removeAllListeners = s, h.emit = s, h.prependListener = s, h.prependOnceListener = s, h.listeners = function(u) {
|
|
return [];
|
|
}, h.binding = function(u) {
|
|
throw new Error("process.binding is not supported");
|
|
}, h.cwd = function() {
|
|
return "/";
|
|
}, h.chdir = function(u) {
|
|
throw new Error("process.chdir is not supported");
|
|
}, h.umask = function() {
|
|
return 0;
|
|
};
|
|
}, 9721(N, O, E) {
|
|
var h = E(6556), d = E(4035), o = h("RegExp.prototype.exec"), f = E(9675);
|
|
N.exports = function(a) {
|
|
if (!d(a)) throw new f("`regex` must be a RegExp");
|
|
return function(i) {
|
|
return o(a, i) !== null;
|
|
};
|
|
};
|
|
}, 6897(N, O, E) {
|
|
var h = E(453), d = E(41), o = E(592)(), f = E(5795), a = E(9675), i = h("%Math.floor%");
|
|
N.exports = function(n, r) {
|
|
if (typeof n != "function") throw new a("`fn` is not a function");
|
|
if (typeof r != "number" || r < 0 || r > 4294967295 || i(r) !== r) throw new a("`length` must be a positive 32-bit integer");
|
|
var e = arguments.length > 2 && !!arguments[2], t = !0, c = !0;
|
|
if ("length" in n && f) {
|
|
var s = f(n, "length");
|
|
s && !s.configurable && (t = !1), s && !s.writable && (c = !1);
|
|
}
|
|
return (t || c || !e) && (o ? d(n, "length", r, !0, !0) : d(n, "length", r)), n;
|
|
};
|
|
}, 4717(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.createRpc = f;
|
|
var o = E(3318);
|
|
function f(a, i) {
|
|
return new Proxy({}, { get: function(n, r) {
|
|
var e, t = this, c = (e = r.toString()) && e[0].toUpperCase() + e.slice(1), s = "".concat(a, ".").concat(c);
|
|
return o.subscriptionMethods.includes(s) ? function(u, p, l) {
|
|
i.subscribe(s, u, p, l);
|
|
} : function(u) {
|
|
return h(t, void 0, void 0, function() {
|
|
return d(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
return [4, i.request(s, u)];
|
|
case 1:
|
|
return [2, p.sent()];
|
|
}
|
|
});
|
|
});
|
|
};
|
|
} });
|
|
}
|
|
O.default = f;
|
|
}, 6315(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.PasskeyEncryptionService = void 0;
|
|
var o = E(1389), f = (function() {
|
|
function a(i, n) {
|
|
this.isUnlockedState = !1, this.namespace = i, this.displayName = n || "LNC User (".concat(i, ")");
|
|
}
|
|
return Object.defineProperty(a.prototype, "method", { get: function() {
|
|
return "passkey";
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(a.prototype, "isUnlocked", { get: function() {
|
|
return this.isUnlockedState && !!this.encryptionKey;
|
|
}, enumerable: !1, configurable: !0 }), a.prototype.encrypt = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n, r, e, t, c, s;
|
|
return d(this, function(u) {
|
|
switch (u.label) {
|
|
case 0:
|
|
if (!this.isUnlocked || !this.encryptionKey) throw new Error("Passkey encryption service is locked. Call unlock() first.");
|
|
u.label = 1;
|
|
case 1:
|
|
return u.trys.push([1, 3, , 4]), n = crypto.getRandomValues(new Uint8Array(12)), r = new TextEncoder(), e = r.encode(i), [4, crypto.subtle.encrypt({ name: "AES-GCM", iv: n }, this.encryptionKey, e)];
|
|
case 2:
|
|
return t = u.sent(), (c = new Uint8Array(n.length + t.byteLength)).set(n), c.set(new Uint8Array(t), n.length), [2, (0, o.arrayBufferToBase64)(c.buffer)];
|
|
case 3:
|
|
throw s = u.sent(), new Error("Passkey encryption failed: ".concat(s.message));
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.decrypt = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n, r, e, t, c;
|
|
return d(this, function(s) {
|
|
switch (s.label) {
|
|
case 0:
|
|
if (!this.isUnlocked || !this.encryptionKey) throw new Error("Passkey encryption service is locked. Call unlock() first.");
|
|
s.label = 1;
|
|
case 1:
|
|
return s.trys.push([1, 3, , 4]), n = (0, o.base64ToArrayBuffer)(i), r = n.slice(0, 12), e = n.slice(12), [4, crypto.subtle.decrypt({ name: "AES-GCM", iv: r }, this.encryptionKey, e)];
|
|
case 2:
|
|
return t = s.sent(), [2, new TextDecoder().decode(t)];
|
|
case 3:
|
|
throw c = s.sent(), new Error("Passkey decryption failed: ".concat(c.message));
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.unlock = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
if (i.method !== "passkey") throw new Error("Passkey encryption service requires passkey unlock method");
|
|
r.label = 1;
|
|
case 1:
|
|
return r.trys.push([1, 14, , 15]), !i.credentialId || i.createIfMissing ? [3, 3] : [4, this.authenticateWithExistingPasskey(i.credentialId)];
|
|
case 2:
|
|
return r.sent(), [3, 13];
|
|
case 3:
|
|
if (!i.createIfMissing) return [3, 12];
|
|
if (!i.credentialId) return [3, 9];
|
|
r.label = 4;
|
|
case 4:
|
|
return r.trys.push([4, 6, , 8]), [4, this.authenticateWithExistingPasskey(i.credentialId)];
|
|
case 5:
|
|
return r.sent(), [3, 8];
|
|
case 6:
|
|
return r.sent(), [4, this.createNewPasskey()];
|
|
case 7:
|
|
return r.sent(), [3, 8];
|
|
case 8:
|
|
return [3, 11];
|
|
case 9:
|
|
return [4, this.createNewPasskey()];
|
|
case 10:
|
|
r.sent(), r.label = 11;
|
|
case 11:
|
|
return [3, 13];
|
|
case 12:
|
|
throw new Error("No passkey credential available and createIfMissing is false");
|
|
case 13:
|
|
return this.isUnlockedState = !0, [3, 15];
|
|
case 14:
|
|
throw n = r.sent(), new Error("Passkey unlock failed: ".concat(n.message));
|
|
case 15:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.lock = function() {
|
|
this.encryptionKey = void 0, this.credentialId = void 0, this.isUnlockedState = !1;
|
|
}, a.prototype.canHandle = function(i) {
|
|
return i === "passkey";
|
|
}, a.prototype.getCredentialId = function() {
|
|
if (!this.credentialId) throw new Error("No credential ID available - unlock first");
|
|
return this.credentialId;
|
|
}, a.isSupported = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
return r.trys.push([0, 2, , 3]), window.PublicKeyCredential ? [4, PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()] : [2, !1];
|
|
case 1:
|
|
return r.sent() ? (i = PublicKeyCredential, (n = i.getClientExtensionResults) === null || n === void 0 || n.call(i), [2, !0]) : [2, !1];
|
|
case 2:
|
|
return r.sent(), [2, !1];
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.createNewPasskey = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n, r;
|
|
return d(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
return [4, this.generateDeterministicChallenge()];
|
|
case 1:
|
|
return i = e.sent(), n = crypto.getRandomValues(new Uint8Array(16)), [4, navigator.credentials.create({ publicKey: { challenge: i.buffer, rp: { name: this.namespace, id: window.location.hostname }, user: { id: n, name: this.displayName, displayName: this.displayName }, pubKeyCredParams: [{ alg: -7, type: "public-key" }, { alg: -257, type: "public-key" }], authenticatorSelection: { authenticatorAttachment: "platform", userVerification: "required", residentKey: "required" }, extensions: { prf: { eval: { first: i.buffer } } } } })];
|
|
case 2:
|
|
if (!(r = e.sent())) throw new Error("Failed to create passkey credential");
|
|
return this.credentialId = r.id, [4, this.deriveEncryptionKey(r, i)];
|
|
case 3:
|
|
return e.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.authenticateWithExistingPasskey = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n, r;
|
|
return d(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
return [4, this.generateDeterministicChallenge()];
|
|
case 1:
|
|
return n = e.sent(), [4, navigator.credentials.get({ publicKey: { challenge: n.buffer, allowCredentials: [{ type: "public-key", id: (0, o.base64ToArrayBuffer)(i) }], userVerification: "required", extensions: { prf: { eval: { first: n.buffer } } } } })];
|
|
case 2:
|
|
if (!(r = e.sent())) throw new Error("Failed to authenticate with passkey");
|
|
return this.credentialId = i, [4, this.deriveEncryptionKey(r, n)];
|
|
case 3:
|
|
return e.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.deriveEncryptionKey = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e, t, c, s, u, p;
|
|
return d(this, function(l) {
|
|
switch (l.label) {
|
|
case 0:
|
|
if (r = ((s = i.getClientExtensionResults) === null || s === void 0 ? void 0 : s.call(i)) || {}, !(!((p = (u = r.prf) === null || u === void 0 ? void 0 : u.results) === null || p === void 0) && p.first)) throw new Error("PRF extension not supported or failed");
|
|
return e = new Uint8Array(r.prf.results.first), [4, crypto.subtle.importKey("raw", e, "HKDF", !1, ["deriveKey"])];
|
|
case 1:
|
|
return t = l.sent(), c = this, [4, crypto.subtle.deriveKey({ name: "HKDF", hash: "SHA-256", salt: new Uint8Array(n), info: new TextEncoder().encode(this.namespace) }, t, { name: "AES-GCM", length: 256 }, !1, ["encrypt", "decrypt"])];
|
|
case 2:
|
|
return c.encryptionKey = l.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.generateDeterministicChallenge = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n, r;
|
|
return d(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
return i = new TextEncoder(), n = i.encode(this.namespace), [4, crypto.subtle.digest("SHA-256", n)];
|
|
case 1:
|
|
return r = e.sent(), [2, new Uint8Array(r)];
|
|
}
|
|
});
|
|
});
|
|
}, a;
|
|
})();
|
|
O.PasskeyEncryptionService = f;
|
|
}, 6200(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.PasswordEncryptionService = void 0;
|
|
var o = E(5105), f = (function() {
|
|
function a() {
|
|
this.isUnlockedState = !1;
|
|
}
|
|
return Object.defineProperty(a.prototype, "method", { get: function() {
|
|
return "password";
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(a.prototype, "isUnlocked", { get: function() {
|
|
return this.isUnlockedState && !!this.password && !!this.salt;
|
|
}, enumerable: !1, configurable: !0 }), a.prototype.encrypt = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
if (!this.isUnlocked || !this.password || !this.salt) throw new Error("Encryption service is locked. Call unlock() first.");
|
|
return [2, (0, o.encrypt)(i, this.password, this.salt)];
|
|
});
|
|
});
|
|
}, a.prototype.decrypt = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
if (!this.isUnlocked || !this.password || !this.salt) throw new Error("Encryption service is locked. Call unlock() first.");
|
|
return [2, (0, o.decrypt)(i, this.password, this.salt)];
|
|
});
|
|
});
|
|
}, a.prototype.unlock = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
if (i.method !== "password") throw new Error("Password encryption service requires password unlock method");
|
|
if (!i.password) throw new Error("Password is required for password unlock");
|
|
if (this.password = i.password, i.salt) {
|
|
if (this.salt = i.salt, i.cipher) try {
|
|
if (!(0, o.verifyTestCipher)(i.cipher, this.password, this.salt)) throw new Error("Invalid password");
|
|
} catch {
|
|
throw new Error("Invalid password");
|
|
}
|
|
} else this.salt = (0, o.generateSalt)();
|
|
return this.isUnlockedState = !0, [2];
|
|
});
|
|
});
|
|
}, a.prototype.lock = function() {
|
|
this.password = void 0, this.salt = void 0, this.isUnlockedState = !1;
|
|
}, a.prototype.canHandle = function(i) {
|
|
return i === "password";
|
|
}, a.prototype.getSalt = function() {
|
|
if (!this.salt) throw new Error("No salt available - unlock first");
|
|
return this.salt;
|
|
}, a.prototype.createTestCipher = function() {
|
|
if (!this.password || !this.salt) throw new Error("No password/salt available - unlock first");
|
|
return (0, o.createTestCipher)(this.password, this.salt);
|
|
}, a;
|
|
})();
|
|
O.PasswordEncryptionService = f;
|
|
}, 4245(N, O, E) {
|
|
var h = this && this.__createBinding || (Object.create ? function(e, t, c, s) {
|
|
s === void 0 && (s = c);
|
|
var u = Object.getOwnPropertyDescriptor(t, c);
|
|
u && !("get" in u ? !t.__esModule : u.writable || u.configurable) || (u = { enumerable: !0, get: function() {
|
|
return t[c];
|
|
} }), Object.defineProperty(e, s, u);
|
|
} : function(e, t, c, s) {
|
|
s === void 0 && (s = c), e[s] = t[c];
|
|
}), d = this && this.__exportStar || function(e, t) {
|
|
for (var c in e) c === "default" || Object.prototype.hasOwnProperty.call(t, c) || h(t, e, c);
|
|
}, o = this && this.__awaiter || function(e, t, c, s) {
|
|
return new (c || (c = Promise))(function(u, p) {
|
|
function l(g) {
|
|
try {
|
|
y(s.next(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function v(g) {
|
|
try {
|
|
y(s.throw(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function y(g) {
|
|
var _;
|
|
g.done ? u(g.value) : (_ = g.value, _ instanceof c ? _ : new c(function(T) {
|
|
T(_);
|
|
})).then(l, v);
|
|
}
|
|
y((s = s.apply(e, t || [])).next());
|
|
});
|
|
}, f = this && this.__generator || function(e, t) {
|
|
var c, s, u, p = { label: 0, sent: function() {
|
|
if (1 & u[0]) throw u[1];
|
|
return u[1];
|
|
}, trys: [], ops: [] }, l = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return l.next = v(0), l.throw = v(1), l.return = v(2), typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
return this;
|
|
}), l;
|
|
function v(y) {
|
|
return function(g) {
|
|
return (function(_) {
|
|
if (c) throw new TypeError("Generator is already executing.");
|
|
for (; l && (l = 0, _[0] && (p = 0)), p; ) try {
|
|
if (c = 1, s && (u = 2 & _[0] ? s.return : _[0] ? s.throw || ((u = s.return) && u.call(s), 0) : s.next) && !(u = u.call(s, _[1])).done) return u;
|
|
switch (s = 0, u && (_ = [2 & _[0], u.value]), _[0]) {
|
|
case 0:
|
|
case 1:
|
|
u = _;
|
|
break;
|
|
case 4:
|
|
return p.label++, { value: _[1], done: !1 };
|
|
case 5:
|
|
p.label++, s = _[1], _ = [0];
|
|
continue;
|
|
case 7:
|
|
_ = p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((u = (u = p.trys).length > 0 && u[u.length - 1]) || _[0] !== 6 && _[0] !== 2)) {
|
|
p = 0;
|
|
continue;
|
|
}
|
|
if (_[0] === 3 && (!u || _[1] > u[0] && _[1] < u[3])) {
|
|
p.label = _[1];
|
|
break;
|
|
}
|
|
if (_[0] === 6 && p.label < u[1]) {
|
|
p.label = u[1], u = _;
|
|
break;
|
|
}
|
|
if (u && p.label < u[2]) {
|
|
p.label = u[2], p.ops.push(_);
|
|
break;
|
|
}
|
|
u[2] && p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
}
|
|
_ = t.call(e, p);
|
|
} catch (T) {
|
|
_ = [6, T], s = 0;
|
|
} finally {
|
|
c = u = 0;
|
|
}
|
|
if (5 & _[0]) throw _[1];
|
|
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
})([y, g]);
|
|
};
|
|
}
|
|
}, a = this && this.__importDefault || function(e) {
|
|
return e && e.__esModule ? e : { default: e };
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.WasmManager = O.LightningNodeConnect = void 0, E(7289);
|
|
var i = a(E(2293));
|
|
O.LightningNodeConnect = i.default;
|
|
var n = a(E(4038)), r = E(254);
|
|
Object.defineProperty(O, "WasmManager", { enumerable: !0, get: function() {
|
|
return r.WasmManager;
|
|
} }), WebAssembly.instantiateStreaming || (WebAssembly.instantiateStreaming = function(e, t) {
|
|
return o(void 0, void 0, void 0, function() {
|
|
var c;
|
|
return f(this, function(s) {
|
|
switch (s.label) {
|
|
case 0:
|
|
return [4, e];
|
|
case 1:
|
|
return [4, s.sent().arrayBuffer()];
|
|
case 2:
|
|
return c = s.sent(), [4, WebAssembly.instantiate(c, t)];
|
|
case 3:
|
|
return [2, s.sent()];
|
|
}
|
|
});
|
|
});
|
|
}), d(E(3318), O), O.default = n.default;
|
|
}, 2293(N, O, E) {
|
|
var h = this && this.__assign || function() {
|
|
return h = Object.assign || function(y) {
|
|
for (var g, _ = 1, T = arguments.length; _ < T; _++) for (var b in g = arguments[_]) Object.prototype.hasOwnProperty.call(g, b) && (y[b] = g[b]);
|
|
return y;
|
|
}, h.apply(this, arguments);
|
|
}, d = this && this.__awaiter || function(y, g, _, T) {
|
|
return new (_ || (_ = Promise))(function(b, A) {
|
|
function m(x) {
|
|
try {
|
|
P(T.next(x));
|
|
} catch (F) {
|
|
A(F);
|
|
}
|
|
}
|
|
function I(x) {
|
|
try {
|
|
P(T.throw(x));
|
|
} catch (F) {
|
|
A(F);
|
|
}
|
|
}
|
|
function P(x) {
|
|
var F;
|
|
x.done ? b(x.value) : (F = x.value, F instanceof _ ? F : new _(function(K) {
|
|
K(F);
|
|
})).then(m, I);
|
|
}
|
|
P((T = T.apply(y, g || [])).next());
|
|
});
|
|
}, o = this && this.__generator || function(y, g) {
|
|
var _, T, b, A = { label: 0, sent: function() {
|
|
if (1 & b[0]) throw b[1];
|
|
return b[1];
|
|
}, trys: [], ops: [] }, m = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return m.next = I(0), m.throw = I(1), m.return = I(2), typeof Symbol == "function" && (m[Symbol.iterator] = function() {
|
|
return this;
|
|
}), m;
|
|
function I(P) {
|
|
return function(x) {
|
|
return (function(F) {
|
|
if (_) throw new TypeError("Generator is already executing.");
|
|
for (; m && (m = 0, F[0] && (A = 0)), A; ) try {
|
|
if (_ = 1, T && (b = 2 & F[0] ? T.return : F[0] ? T.throw || ((b = T.return) && b.call(T), 0) : T.next) && !(b = b.call(T, F[1])).done) return b;
|
|
switch (T = 0, b && (F = [2 & F[0], b.value]), F[0]) {
|
|
case 0:
|
|
case 1:
|
|
b = F;
|
|
break;
|
|
case 4:
|
|
return A.label++, { value: F[1], done: !1 };
|
|
case 5:
|
|
A.label++, T = F[1], F = [0];
|
|
continue;
|
|
case 7:
|
|
F = A.ops.pop(), A.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((b = (b = A.trys).length > 0 && b[b.length - 1]) || F[0] !== 6 && F[0] !== 2)) {
|
|
A = 0;
|
|
continue;
|
|
}
|
|
if (F[0] === 3 && (!b || F[1] > b[0] && F[1] < b[3])) {
|
|
A.label = F[1];
|
|
break;
|
|
}
|
|
if (F[0] === 6 && A.label < b[1]) {
|
|
A.label = b[1], b = F;
|
|
break;
|
|
}
|
|
if (b && A.label < b[2]) {
|
|
A.label = b[2], A.ops.push(F);
|
|
break;
|
|
}
|
|
b[2] && A.ops.pop(), A.trys.pop();
|
|
continue;
|
|
}
|
|
F = g.call(y, A);
|
|
} catch (K) {
|
|
F = [6, K], T = 0;
|
|
} finally {
|
|
_ = b = 0;
|
|
}
|
|
if (5 & F[0]) throw F[1];
|
|
return { value: F[0] ? F[1] : void 0, done: !0 };
|
|
})([P, x]);
|
|
};
|
|
}
|
|
}, f = this && this.__importDefault || function(y) {
|
|
return y && y.__esModule ? y : { default: y };
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.DEFAULT_CONFIG = void 0;
|
|
var a = E(3318), i = E(4717), n = E(6315), r = f(E(9440)), e = E(3666), t = E(6041), c = E(9792), s = E(8348), u = E(9764), p = E(254), l = (0, u.createLogger)("LightningNodeConnect");
|
|
O.DEFAULT_CONFIG = { wasmClientCode: "https://lightning.engineering/lnc-v0.3.6-alpha.wasm", namespace: "default", serverHost: "mailbox.terminal.lightning.today:443", allowPasskeys: !0, enableSessions: !0 };
|
|
var v = (function() {
|
|
function y(g) {
|
|
var _, T = this, b = Object.assign({}, O.DEFAULT_CONFIG, { passkeyDisplayName: "LNC User (".concat(g?.namespace || "default", ")") }, g);
|
|
this._config = b, this._credentialCache = new t.CredentialCache(), b.enableSessions !== !1 && (_ = new r.default(b.namespace, b.session)), this._strategyManager = new s.StrategyManager({ namespace: b.namespace, allowPasskeys: b.allowPasskeys, passkeyDisplayName: b.passkeyDisplayName }, _), this._sessionCoordinator = new c.SessionCoordinator(_), this._authCoordinator = new e.AuthenticationCoordinator(this._strategyManager, this._credentialCache, this._sessionCoordinator), this._wasmManager = new p.WasmManager(b.namespace, b.wasmClientCode, { onLocalKeyCreated: function(A) {
|
|
T._credentialCache.set("localKey", A);
|
|
}, onRemoteKeyReceived: function(A) {
|
|
T._credentialCache.set("remoteKey", A);
|
|
} }), this.lnd = new a.LndApi(i.createRpc, this), this.loop = new a.LoopApi(i.createRpc, this), this.pool = new a.PoolApi(i.createRpc, this), this.faraday = new a.FaradayApi(i.createRpc, this), this.tapd = new a.TaprootAssetsApi(i.createRpc, this), this.lit = new a.LitApi(i.createRpc, this);
|
|
}
|
|
return Object.defineProperty(y.prototype, "isReady", { get: function() {
|
|
return this._wasmManager.isReady;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(y.prototype, "isConnected", { get: function() {
|
|
return this._wasmManager.isConnected;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(y.prototype, "status", { get: function() {
|
|
return this._wasmManager.status;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(y.prototype, "expiry", { get: function() {
|
|
return this._wasmManager.expiry;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(y.prototype, "isReadOnly", { get: function() {
|
|
return this._wasmManager.isReadOnly;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(y.prototype, "serverHost", { get: function() {
|
|
return this._credentialCache.get("serverHost") || this._config.serverHost;
|
|
}, set: function(g) {
|
|
this._credentialCache.set("serverHost", g);
|
|
}, enumerable: !1, configurable: !0 }), y.prototype.hasPerms = function(g) {
|
|
return this._wasmManager.hasPerms(g);
|
|
}, y.prototype.preload = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(g) {
|
|
switch (g.label) {
|
|
case 0:
|
|
return [4, this._wasmManager.preload()];
|
|
case 1:
|
|
return g.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, y.prototype.connect = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
var g, _, T, b;
|
|
return o(this, function(A) {
|
|
switch (A.label) {
|
|
case 0:
|
|
if (g = this._credentialCache.get("pairingPhrase") || "", _ = this._credentialCache.get("localKey") || "", !g && !_) throw new Error("No pairing phrase or local key available. Call pair() or unlock() first.");
|
|
return T = { pairingPhrase: g, serverHost: this._credentialCache.get("serverHost") || this._config.serverHost, localKey: _, remoteKey: this._credentialCache.get("remoteKey") || "" }, [4, this._wasmManager.connect(T)];
|
|
case 1:
|
|
if (A.sent(), this._config.enableSessions === !1) return [3, 5];
|
|
A.label = 2;
|
|
case 2:
|
|
return A.trys.push([2, 4, , 5]), [4, this._authCoordinator.createSessionAfterConnection()];
|
|
case 3:
|
|
return A.sent(), [3, 5];
|
|
case 4:
|
|
return b = A.sent(), l.error("Session creation failed after successful connection; session-based refresh will be unavailable:", b), [3, 5];
|
|
case 5:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, y.prototype.disconnect = function() {
|
|
this._wasmManager.disconnect();
|
|
}, y.prototype.request = function(g, _) {
|
|
return this._wasmManager.request(g, _);
|
|
}, y.prototype.subscribe = function(g, _, T, b) {
|
|
this._wasmManager.subscribe(g, _, T, b);
|
|
}, y.prototype.pair = function(g, _) {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(T) {
|
|
switch (T.label) {
|
|
case 0:
|
|
return [4, this._authCoordinator.waitForSessionRestoration()];
|
|
case 1:
|
|
return T.sent(), this._credentialCache.set("pairingPhrase", g), this._credentialCache.get("serverHost") || this._credentialCache.set("serverHost", this._config.serverHost), [4, this.run()];
|
|
case 2:
|
|
return T.sent(), [4, this.connect()];
|
|
case 3:
|
|
return T.sent(), _ ? _.method !== "password" ? [3, 5] : [4, this.persistWithPassword(_.password)] : [3, 7];
|
|
case 4:
|
|
return T.sent(), [3, 7];
|
|
case 5:
|
|
return [4, this.persistWithPasskey(_)];
|
|
case 6:
|
|
T.sent(), T.label = 7;
|
|
case 7:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, y.prototype.login = function(g) {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(_) {
|
|
switch (_.label) {
|
|
case 0:
|
|
return [4, this.unlock(g)];
|
|
case 1:
|
|
if (!_.sent()) throw new Error("Failed to unlock with method '".concat(g.method, "'"));
|
|
return [4, this.connect()];
|
|
case 2:
|
|
return _.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, y.prototype.unlock = function(g) {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(_) {
|
|
return [2, this._authCoordinator.unlock(g)];
|
|
});
|
|
});
|
|
}, y.prototype.persistWithPassword = function(g) {
|
|
return d(this, void 0, void 0, function() {
|
|
var _;
|
|
return o(this, function(T) {
|
|
switch (T.label) {
|
|
case 0:
|
|
if (!this.isConnected) throw new Error("Must be connected before persisting credentials");
|
|
if (!(_ = this._strategyManager.getStrategy("password"))) throw new Error("Password strategy not available");
|
|
return [4, _.unlock({ method: "password", password: g })];
|
|
case 1:
|
|
if (!T.sent()) throw new Error("Failed to unlock password strategy");
|
|
return [4, this._authCoordinator.persistCachedCredentials(_)];
|
|
case 2:
|
|
return T.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, y.prototype.persistWithPasskey = function(g) {
|
|
return d(this, void 0, void 0, function() {
|
|
var _;
|
|
return o(this, function(T) {
|
|
switch (T.label) {
|
|
case 0:
|
|
if (!this.isConnected) throw new Error("Must be connected before persisting credentials");
|
|
if (!(_ = this._strategyManager.getStrategy("passkey"))) throw new Error("Passkey strategy not available");
|
|
return [4, _.unlock(h({ method: "passkey", createIfMissing: !0 }, g))];
|
|
case 1:
|
|
if (!T.sent()) throw new Error("Failed to unlock passkey strategy");
|
|
return [4, this._authCoordinator.persistCachedCredentials(_)];
|
|
case 2:
|
|
return T.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, y.prototype.tryAutoRestore = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(g) {
|
|
return [2, this._authCoordinator.tryAutoRestore()];
|
|
});
|
|
});
|
|
}, y.prototype.getAuthenticationInfo = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(g) {
|
|
return [2, this._authCoordinator.getAuthenticationInfo()];
|
|
});
|
|
});
|
|
}, y.prototype.supportsPasskeys = function() {
|
|
if (this._config.allowPasskeys === !1) return !1;
|
|
var g = this._strategyManager.getStrategy("passkey");
|
|
return !!g && g.isSupported;
|
|
}, y.isPasskeySupported = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(g) {
|
|
return [2, n.PasskeyEncryptionService.isSupported()];
|
|
});
|
|
});
|
|
}, y.prototype.clear = function(g) {
|
|
var _ = g?.session !== !1, T = g?.persisted === !0;
|
|
_ && this._authCoordinator.clearSession(), T && this._strategyManager.clearAll();
|
|
}, y.prototype.run = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(g) {
|
|
switch (g.label) {
|
|
case 0:
|
|
return [4, this._wasmManager.run()];
|
|
case 1:
|
|
return g.sent(), [4, this._wasmManager.waitTilReady()];
|
|
case 2:
|
|
return g.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, y;
|
|
})();
|
|
O.default = v;
|
|
}, 4038(N, O, E) {
|
|
var h = this && this.__awaiter || function(e, t, c, s) {
|
|
return new (c || (c = Promise))(function(u, p) {
|
|
function l(g) {
|
|
try {
|
|
y(s.next(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function v(g) {
|
|
try {
|
|
y(s.throw(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function y(g) {
|
|
var _;
|
|
g.done ? u(g.value) : (_ = g.value, _ instanceof c ? _ : new c(function(T) {
|
|
T(_);
|
|
})).then(l, v);
|
|
}
|
|
y((s = s.apply(e, t || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(e, t) {
|
|
var c, s, u, p = { label: 0, sent: function() {
|
|
if (1 & u[0]) throw u[1];
|
|
return u[1];
|
|
}, trys: [], ops: [] }, l = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return l.next = v(0), l.throw = v(1), l.return = v(2), typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
return this;
|
|
}), l;
|
|
function v(y) {
|
|
return function(g) {
|
|
return (function(_) {
|
|
if (c) throw new TypeError("Generator is already executing.");
|
|
for (; l && (l = 0, _[0] && (p = 0)), p; ) try {
|
|
if (c = 1, s && (u = 2 & _[0] ? s.return : _[0] ? s.throw || ((u = s.return) && u.call(s), 0) : s.next) && !(u = u.call(s, _[1])).done) return u;
|
|
switch (s = 0, u && (_ = [2 & _[0], u.value]), _[0]) {
|
|
case 0:
|
|
case 1:
|
|
u = _;
|
|
break;
|
|
case 4:
|
|
return p.label++, { value: _[1], done: !1 };
|
|
case 5:
|
|
p.label++, s = _[1], _ = [0];
|
|
continue;
|
|
case 7:
|
|
_ = p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((u = (u = p.trys).length > 0 && u[u.length - 1]) || _[0] !== 6 && _[0] !== 2)) {
|
|
p = 0;
|
|
continue;
|
|
}
|
|
if (_[0] === 3 && (!u || _[1] > u[0] && _[1] < u[3])) {
|
|
p.label = _[1];
|
|
break;
|
|
}
|
|
if (_[0] === 6 && p.label < u[1]) {
|
|
p.label = u[1], u = _;
|
|
break;
|
|
}
|
|
if (u && p.label < u[2]) {
|
|
p.label = u[2], p.ops.push(_);
|
|
break;
|
|
}
|
|
u[2] && p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
}
|
|
_ = t.call(e, p);
|
|
} catch (T) {
|
|
_ = [6, T], s = 0;
|
|
} finally {
|
|
c = u = 0;
|
|
}
|
|
if (5 & _[0]) throw _[1];
|
|
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
})([y, g]);
|
|
};
|
|
}
|
|
}, o = this && this.__importDefault || function(e) {
|
|
return e && e.__esModule ? e : { default: e };
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.DEFAULT_CONFIG = void 0;
|
|
var f = E(3318), a = E(4717), i = o(E(5820)), n = E(254);
|
|
O.DEFAULT_CONFIG = { wasmClientCode: "https://lightning.engineering/lnc-v0.3.6-alpha.wasm", namespace: "default", serverHost: "mailbox.terminal.lightning.today:443" };
|
|
var r = (function() {
|
|
function e(t) {
|
|
var c = this, s = Object.assign({}, O.DEFAULT_CONFIG, t);
|
|
s.credentialStore ? this.credentials = s.credentialStore : this.credentials = new i.default(s.namespace, s.password), !this.credentials.isPaired && s.serverHost && (this.credentials.serverHost = s.serverHost), s.pairingPhrase && (this.credentials.pairingPhrase = s.pairingPhrase), this.wasmManager = new n.WasmManager(s.namespace, s.wasmClientCode, { onLocalKeyCreated: function(u) {
|
|
c.credentials.localKey = u;
|
|
}, onRemoteKeyReceived: function(u) {
|
|
c.credentials.remoteKey = u;
|
|
} }), this.lnd = new f.LndApi(a.createRpc, this), this.loop = new f.LoopApi(a.createRpc, this), this.pool = new f.PoolApi(a.createRpc, this), this.faraday = new f.FaradayApi(a.createRpc, this), this.tapd = new f.TaprootAssetsApi(a.createRpc, this), this.lit = new f.LitApi(a.createRpc, this);
|
|
}
|
|
return Object.defineProperty(e.prototype, "isReady", { get: function() {
|
|
return this.wasmManager.isReady;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "isConnected", { get: function() {
|
|
return this.wasmManager.isConnected;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "status", { get: function() {
|
|
return this.wasmManager.status;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "expiry", { get: function() {
|
|
return this.wasmManager.expiry;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "isReadOnly", { get: function() {
|
|
return this.wasmManager.isReadOnly;
|
|
}, enumerable: !1, configurable: !0 }), e.prototype.hasPerms = function(t) {
|
|
return this.wasmManager.hasPerms(t);
|
|
}, e.prototype.preload = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return [4, this.wasmManager.preload()];
|
|
case 1:
|
|
return t.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.run = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return [4, this.wasmManager.run()];
|
|
case 1:
|
|
return t.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.connect = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var t;
|
|
return d(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
return t = { pairingPhrase: this.credentials.pairingPhrase, serverHost: this.credentials.serverHost, localKey: this.credentials.localKey || "", remoteKey: this.credentials.remoteKey || "" }, [4, this.wasmManager.connect(t)];
|
|
case 1:
|
|
return c.sent(), this.credentials.password && this.credentials.clear(!0), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.disconnect = function() {
|
|
this.wasmManager.disconnect();
|
|
}, e.prototype.waitTilReady = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return [4, this.wasmManager.waitTilReady()];
|
|
case 1:
|
|
return t.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.request = function(t, c) {
|
|
return this.wasmManager.request(t, c);
|
|
}, e.prototype.subscribe = function(t, c, s, u) {
|
|
this.wasmManager.subscribe(t, c, s, u);
|
|
}, e;
|
|
})();
|
|
O.default = r;
|
|
}, 2637(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.BaseCredentialRepository = void 0;
|
|
var o = (0, E(9764).createLogger)("CredentialRepository"), f = (function() {
|
|
function a(i) {
|
|
this.namespace = i, this.credentials = /* @__PURE__ */ new Map();
|
|
}
|
|
return Object.defineProperty(a.prototype, "hasAnyCredentials", { get: function() {
|
|
return this.loadedCredentials.size > 0;
|
|
}, enumerable: !1, configurable: !0 }), a.prototype.removeCredential = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
return this.remove(i), [2];
|
|
});
|
|
});
|
|
}, a.prototype.hasCredential = function(i) {
|
|
return this.loadedCredentials.has(i);
|
|
}, a.prototype.clear = function() {
|
|
this.credentials.clear(), this.save();
|
|
}, Object.defineProperty(a.prototype, "storageKey", { get: function() {
|
|
return "".concat("lnc-web:").concat(this.namespace);
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(a.prototype, "loadedCredentials", { get: function() {
|
|
return this.credentials.size === 0 && this.load(), this.credentials;
|
|
}, enumerable: !1, configurable: !0 }), a.prototype.get = function(i) {
|
|
var n;
|
|
return (n = this.loadedCredentials.get(i)) !== null && n !== void 0 ? n : void 0;
|
|
}, a.prototype.set = function(i, n) {
|
|
this.credentials.set(i, n), this.save(i);
|
|
}, a.prototype.remove = function(i) {
|
|
this.credentials.delete(i), this.save();
|
|
}, a.prototype.save = function(i) {
|
|
if (globalThis.localStorage !== void 0) if (this.credentials.size !== 0) {
|
|
var n = Object.fromEntries(this.credentials.entries()), r = i ? " (".concat(i, " updated)") : "";
|
|
o.info("Saving credentials to localStorage".concat(r)), globalThis.localStorage.setItem(this.storageKey, JSON.stringify(n));
|
|
} else globalThis.localStorage.removeItem(this.storageKey);
|
|
}, a.prototype.load = function() {
|
|
if (globalThis.localStorage !== void 0) {
|
|
var i = globalThis.localStorage.getItem(this.storageKey);
|
|
if (i) try {
|
|
var n = JSON.parse(i);
|
|
this.credentials = new Map(Object.entries(n)), o.info("loaded credentials from localStorage");
|
|
} catch (r) {
|
|
o.error("Failed to parse cached credentials for ".concat(this.namespace, ":"), r);
|
|
}
|
|
}
|
|
}, a;
|
|
})();
|
|
O.BaseCredentialRepository = f;
|
|
}, 4279(N, O, E) {
|
|
var h, d = this && this.__extends || (h = function(e, t) {
|
|
return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, s) {
|
|
c.__proto__ = s;
|
|
} || function(c, s) {
|
|
for (var u in s) Object.prototype.hasOwnProperty.call(s, u) && (c[u] = s[u]);
|
|
}, h(e, t);
|
|
}, function(e, t) {
|
|
if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
function c() {
|
|
this.constructor = e;
|
|
}
|
|
h(e, t), e.prototype = t === null ? Object.create(t) : (c.prototype = t.prototype, new c());
|
|
}), o = this && this.__awaiter || function(e, t, c, s) {
|
|
return new (c || (c = Promise))(function(u, p) {
|
|
function l(g) {
|
|
try {
|
|
y(s.next(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function v(g) {
|
|
try {
|
|
y(s.throw(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function y(g) {
|
|
var _;
|
|
g.done ? u(g.value) : (_ = g.value, _ instanceof c ? _ : new c(function(T) {
|
|
T(_);
|
|
})).then(l, v);
|
|
}
|
|
y((s = s.apply(e, t || [])).next());
|
|
});
|
|
}, f = this && this.__generator || function(e, t) {
|
|
var c, s, u, p = { label: 0, sent: function() {
|
|
if (1 & u[0]) throw u[1];
|
|
return u[1];
|
|
}, trys: [], ops: [] }, l = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return l.next = v(0), l.throw = v(1), l.return = v(2), typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
return this;
|
|
}), l;
|
|
function v(y) {
|
|
return function(g) {
|
|
return (function(_) {
|
|
if (c) throw new TypeError("Generator is already executing.");
|
|
for (; l && (l = 0, _[0] && (p = 0)), p; ) try {
|
|
if (c = 1, s && (u = 2 & _[0] ? s.return : _[0] ? s.throw || ((u = s.return) && u.call(s), 0) : s.next) && !(u = u.call(s, _[1])).done) return u;
|
|
switch (s = 0, u && (_ = [2 & _[0], u.value]), _[0]) {
|
|
case 0:
|
|
case 1:
|
|
u = _;
|
|
break;
|
|
case 4:
|
|
return p.label++, { value: _[1], done: !1 };
|
|
case 5:
|
|
p.label++, s = _[1], _ = [0];
|
|
continue;
|
|
case 7:
|
|
_ = p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((u = (u = p.trys).length > 0 && u[u.length - 1]) || _[0] !== 6 && _[0] !== 2)) {
|
|
p = 0;
|
|
continue;
|
|
}
|
|
if (_[0] === 3 && (!u || _[1] > u[0] && _[1] < u[3])) {
|
|
p.label = _[1];
|
|
break;
|
|
}
|
|
if (_[0] === 6 && p.label < u[1]) {
|
|
p.label = u[1], u = _;
|
|
break;
|
|
}
|
|
if (u && p.label < u[2]) {
|
|
p.label = u[2], p.ops.push(_);
|
|
break;
|
|
}
|
|
u[2] && p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
}
|
|
_ = t.call(e, p);
|
|
} catch (T) {
|
|
_ = [6, T], s = 0;
|
|
} finally {
|
|
c = u = 0;
|
|
}
|
|
if (5 & _[0]) throw _[1];
|
|
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
})([y, g]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.PasskeyCredentialRepository = void 0;
|
|
var a = E(9764), i = E(2637), n = (0, a.createLogger)("PasskeyCredentialRepository"), r = (function(e) {
|
|
function t(c, s) {
|
|
var u = e.call(this, c) || this;
|
|
return u.encryption = s, u;
|
|
}
|
|
return d(t, e), t.prototype.unlock = function(c) {
|
|
return o(this, void 0, void 0, function() {
|
|
var s, u, p, l;
|
|
return f(this, function(v) {
|
|
switch (v.label) {
|
|
case 0:
|
|
if (c.method !== "passkey") throw new Error("Passkey repository requires passkey unlock method");
|
|
return s = (p = this.get("passkeyCredentialId")) !== null && p !== void 0 ? p : c.credentialId, [4, this.encryption.unlock({ method: "passkey", credentialId: s, createIfMissing: (l = c.createIfMissing) !== null && l !== void 0 && l })];
|
|
case 1:
|
|
return v.sent(), this.encryption.isUnlocked && (u = this.encryption.getCredentialId(), this.set("passkeyCredentialId", u)), [2];
|
|
}
|
|
});
|
|
});
|
|
}, t.prototype.getCredential = function(c) {
|
|
return o(this, void 0, void 0, function() {
|
|
var s, u;
|
|
return f(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
if (!(s = this.get(c))) return [2, void 0];
|
|
p.label = 1;
|
|
case 1:
|
|
return p.trys.push([1, 3, , 4]), [4, this.encryption.decrypt(s)];
|
|
case 2:
|
|
return [2, p.sent()];
|
|
case 3:
|
|
return u = p.sent(), n.error("Failed to decrypt credential ".concat(c, ":"), u), [2, void 0];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, t.prototype.setCredential = function(c, s) {
|
|
return o(this, void 0, void 0, function() {
|
|
var u;
|
|
return f(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
if (!this.encryption.isUnlocked) throw new Error("Repository is locked. Call unlock() first.");
|
|
return [4, this.encryption.encrypt(s)];
|
|
case 1:
|
|
return u = p.sent(), this.set(c, u), [2];
|
|
}
|
|
});
|
|
});
|
|
}, Object.defineProperty(t.prototype, "isUnlocked", { get: function() {
|
|
return this.encryption.isUnlocked;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "hasStoredAuthData", { get: function() {
|
|
return this.hasCredential("passkeyCredentialId");
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "storedCredentialId", { get: function() {
|
|
return this.get("passkeyCredentialId");
|
|
}, enumerable: !1, configurable: !0 }), t.prototype.lock = function() {
|
|
this.encryption.lock();
|
|
}, t;
|
|
})(i.BaseCredentialRepository);
|
|
O.PasskeyCredentialRepository = r;
|
|
}, 2672(N, O, E) {
|
|
var h, d = this && this.__extends || (h = function(e, t) {
|
|
return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, s) {
|
|
c.__proto__ = s;
|
|
} || function(c, s) {
|
|
for (var u in s) Object.prototype.hasOwnProperty.call(s, u) && (c[u] = s[u]);
|
|
}, h(e, t);
|
|
}, function(e, t) {
|
|
if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
function c() {
|
|
this.constructor = e;
|
|
}
|
|
h(e, t), e.prototype = t === null ? Object.create(t) : (c.prototype = t.prototype, new c());
|
|
}), o = this && this.__awaiter || function(e, t, c, s) {
|
|
return new (c || (c = Promise))(function(u, p) {
|
|
function l(g) {
|
|
try {
|
|
y(s.next(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function v(g) {
|
|
try {
|
|
y(s.throw(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function y(g) {
|
|
var _;
|
|
g.done ? u(g.value) : (_ = g.value, _ instanceof c ? _ : new c(function(T) {
|
|
T(_);
|
|
})).then(l, v);
|
|
}
|
|
y((s = s.apply(e, t || [])).next());
|
|
});
|
|
}, f = this && this.__generator || function(e, t) {
|
|
var c, s, u, p = { label: 0, sent: function() {
|
|
if (1 & u[0]) throw u[1];
|
|
return u[1];
|
|
}, trys: [], ops: [] }, l = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return l.next = v(0), l.throw = v(1), l.return = v(2), typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
return this;
|
|
}), l;
|
|
function v(y) {
|
|
return function(g) {
|
|
return (function(_) {
|
|
if (c) throw new TypeError("Generator is already executing.");
|
|
for (; l && (l = 0, _[0] && (p = 0)), p; ) try {
|
|
if (c = 1, s && (u = 2 & _[0] ? s.return : _[0] ? s.throw || ((u = s.return) && u.call(s), 0) : s.next) && !(u = u.call(s, _[1])).done) return u;
|
|
switch (s = 0, u && (_ = [2 & _[0], u.value]), _[0]) {
|
|
case 0:
|
|
case 1:
|
|
u = _;
|
|
break;
|
|
case 4:
|
|
return p.label++, { value: _[1], done: !1 };
|
|
case 5:
|
|
p.label++, s = _[1], _ = [0];
|
|
continue;
|
|
case 7:
|
|
_ = p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((u = (u = p.trys).length > 0 && u[u.length - 1]) || _[0] !== 6 && _[0] !== 2)) {
|
|
p = 0;
|
|
continue;
|
|
}
|
|
if (_[0] === 3 && (!u || _[1] > u[0] && _[1] < u[3])) {
|
|
p.label = _[1];
|
|
break;
|
|
}
|
|
if (_[0] === 6 && p.label < u[1]) {
|
|
p.label = u[1], u = _;
|
|
break;
|
|
}
|
|
if (u && p.label < u[2]) {
|
|
p.label = u[2], p.ops.push(_);
|
|
break;
|
|
}
|
|
u[2] && p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
}
|
|
_ = t.call(e, p);
|
|
} catch (T) {
|
|
_ = [6, T], s = 0;
|
|
} finally {
|
|
c = u = 0;
|
|
}
|
|
if (5 & _[0]) throw _[1];
|
|
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
})([y, g]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.PasswordCredentialRepository = void 0;
|
|
var a = E(9764), i = E(2637), n = (0, a.createLogger)("PasswordCredentialRepository"), r = (function(e) {
|
|
function t(c, s) {
|
|
var u = e.call(this, c) || this;
|
|
return u.encryption = s, u;
|
|
}
|
|
return d(t, e), Object.defineProperty(t.prototype, "isUnlocked", { get: function() {
|
|
return this.encryption.isUnlocked;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "hasStoredAuthData", { get: function() {
|
|
return this.hasCredential("salt") && this.hasCredential("cipher");
|
|
}, enumerable: !1, configurable: !0 }), t.prototype.unlock = function(c) {
|
|
return o(this, void 0, void 0, function() {
|
|
var s, u;
|
|
return f(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
if (c.method !== "password") throw new Error("Password repository requires password unlock method");
|
|
return s = this.get("salt"), u = this.get("cipher"), [4, this.encryption.unlock({ method: "password", password: c.password, salt: s, cipher: u })];
|
|
case 1:
|
|
return p.sent(), s || (this.set("salt", this.encryption.getSalt()), this.set("cipher", this.encryption.createTestCipher())), [2];
|
|
}
|
|
});
|
|
});
|
|
}, t.prototype.getCredential = function(c) {
|
|
return o(this, void 0, void 0, function() {
|
|
var s, u;
|
|
return f(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
if (!(s = this.get(c))) return n.debug("No encrypted credential found for ".concat(c, " in ").concat(this.namespace)), [2, void 0];
|
|
p.label = 1;
|
|
case 1:
|
|
return p.trys.push([1, 3, , 4]), [4, this.encryption.decrypt(s)];
|
|
case 2:
|
|
return [2, p.sent()];
|
|
case 3:
|
|
return u = p.sent(), n.error("Failed to decrypt credential ".concat(c, ":"), u), [2, void 0];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, t.prototype.setCredential = function(c, s) {
|
|
return o(this, void 0, void 0, function() {
|
|
var u;
|
|
return f(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
if (!this.encryption.isUnlocked) throw new Error("Repository is locked. Call unlock() first.");
|
|
return [4, this.encryption.encrypt(s)];
|
|
case 1:
|
|
return u = p.sent(), this.set(c, u), [2];
|
|
}
|
|
});
|
|
});
|
|
}, t.prototype.lock = function() {
|
|
this.encryption.lock();
|
|
}, t;
|
|
})(i.BaseCredentialRepository);
|
|
O.PasswordCredentialRepository = r;
|
|
}, 1313(N, O) {
|
|
var E = this && this.__awaiter || function(o, f, a, i) {
|
|
return new (a || (a = Promise))(function(n, r) {
|
|
function e(s) {
|
|
try {
|
|
c(i.next(s));
|
|
} catch (u) {
|
|
r(u);
|
|
}
|
|
}
|
|
function t(s) {
|
|
try {
|
|
c(i.throw(s));
|
|
} catch (u) {
|
|
r(u);
|
|
}
|
|
}
|
|
function c(s) {
|
|
var u;
|
|
s.done ? n(s.value) : (u = s.value, u instanceof a ? u : new a(function(p) {
|
|
p(u);
|
|
})).then(e, t);
|
|
}
|
|
c((i = i.apply(o, f || [])).next());
|
|
});
|
|
}, h = this && this.__generator || function(o, f) {
|
|
var a, i, n, r = { label: 0, sent: function() {
|
|
if (1 & n[0]) throw n[1];
|
|
return n[1];
|
|
}, trys: [], ops: [] }, e = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return e.next = t(0), e.throw = t(1), e.return = t(2), typeof Symbol == "function" && (e[Symbol.iterator] = function() {
|
|
return this;
|
|
}), e;
|
|
function t(c) {
|
|
return function(s) {
|
|
return (function(u) {
|
|
if (a) throw new TypeError("Generator is already executing.");
|
|
for (; e && (e = 0, u[0] && (r = 0)), r; ) try {
|
|
if (a = 1, i && (n = 2 & u[0] ? i.return : u[0] ? i.throw || ((n = i.return) && n.call(i), 0) : i.next) && !(n = n.call(i, u[1])).done) return n;
|
|
switch (i = 0, n && (u = [2 & u[0], n.value]), u[0]) {
|
|
case 0:
|
|
case 1:
|
|
n = u;
|
|
break;
|
|
case 4:
|
|
return r.label++, { value: u[1], done: !1 };
|
|
case 5:
|
|
r.label++, i = u[1], u = [0];
|
|
continue;
|
|
case 7:
|
|
u = r.ops.pop(), r.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((n = (n = r.trys).length > 0 && n[n.length - 1]) || u[0] !== 6 && u[0] !== 2)) {
|
|
r = 0;
|
|
continue;
|
|
}
|
|
if (u[0] === 3 && (!n || u[1] > n[0] && u[1] < n[3])) {
|
|
r.label = u[1];
|
|
break;
|
|
}
|
|
if (u[0] === 6 && r.label < n[1]) {
|
|
r.label = n[1], n = u;
|
|
break;
|
|
}
|
|
if (n && r.label < n[2]) {
|
|
r.label = n[2], r.ops.push(u);
|
|
break;
|
|
}
|
|
n[2] && r.ops.pop(), r.trys.pop();
|
|
continue;
|
|
}
|
|
u = f.call(o, r);
|
|
} catch (p) {
|
|
u = [6, p], i = 0;
|
|
} finally {
|
|
a = n = 0;
|
|
}
|
|
if (5 & u[0]) throw u[1];
|
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
})([c, s]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.CredentialsEncrypter = void 0;
|
|
var d = (function() {
|
|
function o(f) {
|
|
this.cryptoService = f;
|
|
}
|
|
return o.prototype.encrypt = function(f) {
|
|
return E(this, void 0, void 0, function() {
|
|
var a, i, n, r;
|
|
return h(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
return [4, this.cryptoService.generateRandomCredentialsKey()];
|
|
case 1:
|
|
return a = e.sent(), [4, this.cryptoService.encryptCredentials(a, JSON.stringify(f))];
|
|
case 2:
|
|
return i = e.sent(), n = i.ciphertextB64, r = i.ivB64, [2, { credentialsKey: a, ciphertextB64: n, ivB64: r }];
|
|
}
|
|
});
|
|
});
|
|
}, o.prototype.decrypt = function(f) {
|
|
return E(this, void 0, void 0, function() {
|
|
var a, i, n, r, e;
|
|
return h(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return a = f.credentialsKey, i = f.ciphertextB64, n = f.ivB64, [4, this.cryptoService.decryptCredentials(a, i, n)];
|
|
case 1:
|
|
if (r = t.sent(), !((c = e = JSON.parse(r)) && typeof c == "object" && "localKey" in c && typeof c.localKey == "string" && "remoteKey" in c && typeof c.remoteKey == "string" && "pairingPhrase" in c && typeof c.pairingPhrase == "string" && "serverHost" in c && typeof c.serverHost == "string")) throw new Error("Decrypted credentials have an invalid shape");
|
|
return [2, e];
|
|
}
|
|
var c;
|
|
});
|
|
});
|
|
}, o;
|
|
})();
|
|
O.CredentialsEncrypter = d;
|
|
}, 7027(N, O) {
|
|
var E = this && this.__awaiter || function(o, f, a, i) {
|
|
return new (a || (a = Promise))(function(n, r) {
|
|
function e(s) {
|
|
try {
|
|
c(i.next(s));
|
|
} catch (u) {
|
|
r(u);
|
|
}
|
|
}
|
|
function t(s) {
|
|
try {
|
|
c(i.throw(s));
|
|
} catch (u) {
|
|
r(u);
|
|
}
|
|
}
|
|
function c(s) {
|
|
var u;
|
|
s.done ? n(s.value) : (u = s.value, u instanceof a ? u : new a(function(p) {
|
|
p(u);
|
|
})).then(e, t);
|
|
}
|
|
c((i = i.apply(o, f || [])).next());
|
|
});
|
|
}, h = this && this.__generator || function(o, f) {
|
|
var a, i, n, r = { label: 0, sent: function() {
|
|
if (1 & n[0]) throw n[1];
|
|
return n[1];
|
|
}, trys: [], ops: [] }, e = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return e.next = t(0), e.throw = t(1), e.return = t(2), typeof Symbol == "function" && (e[Symbol.iterator] = function() {
|
|
return this;
|
|
}), e;
|
|
function t(c) {
|
|
return function(s) {
|
|
return (function(u) {
|
|
if (a) throw new TypeError("Generator is already executing.");
|
|
for (; e && (e = 0, u[0] && (r = 0)), r; ) try {
|
|
if (a = 1, i && (n = 2 & u[0] ? i.return : u[0] ? i.throw || ((n = i.return) && n.call(i), 0) : i.next) && !(n = n.call(i, u[1])).done) return n;
|
|
switch (i = 0, n && (u = [2 & u[0], n.value]), u[0]) {
|
|
case 0:
|
|
case 1:
|
|
n = u;
|
|
break;
|
|
case 4:
|
|
return r.label++, { value: u[1], done: !1 };
|
|
case 5:
|
|
r.label++, i = u[1], u = [0];
|
|
continue;
|
|
case 7:
|
|
u = r.ops.pop(), r.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((n = (n = r.trys).length > 0 && n[n.length - 1]) || u[0] !== 6 && u[0] !== 2)) {
|
|
r = 0;
|
|
continue;
|
|
}
|
|
if (u[0] === 3 && (!n || u[1] > n[0] && u[1] < n[3])) {
|
|
r.label = u[1];
|
|
break;
|
|
}
|
|
if (u[0] === 6 && r.label < n[1]) {
|
|
r.label = n[1], n = u;
|
|
break;
|
|
}
|
|
if (n && r.label < n[2]) {
|
|
r.label = n[2], r.ops.push(u);
|
|
break;
|
|
}
|
|
n[2] && r.ops.pop(), r.trys.pop();
|
|
continue;
|
|
}
|
|
u = f.call(o, r);
|
|
} catch (p) {
|
|
u = [6, p], i = 0;
|
|
} finally {
|
|
a = n = 0;
|
|
}
|
|
if (5 & u[0]) throw u[1];
|
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
})([c, s]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.KeyWrapper = void 0;
|
|
var d = (function() {
|
|
function o(f) {
|
|
this.cryptoService = f;
|
|
}
|
|
return o.prototype.wrapCredentialsKey = function(f, a, i) {
|
|
return E(this, void 0, void 0, function() {
|
|
var n, r;
|
|
return h(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
return [4, this.cryptoService.wrapWithDeviceKey(f, a)];
|
|
case 1:
|
|
return n = e.sent(), [4, this.cryptoService.wrapWithOriginKey(f, i)];
|
|
case 2:
|
|
return r = e.sent(), [2, { deviceWrap: n, originWrap: r }];
|
|
}
|
|
});
|
|
});
|
|
}, o.prototype.unwrapCredentialsKey = function(f, a, i) {
|
|
return E(this, void 0, void 0, function() {
|
|
var n, r;
|
|
return h(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
return [4, this.cryptoService.unwrapWithDeviceKey(a, f.deviceWrap.keyB64, f.deviceWrap.ivB64)];
|
|
case 1:
|
|
return n = e.sent(), [4, this.cryptoService.unwrapWithOriginKey(i, f.originWrap.keyB64, f.originWrap.ivB64)];
|
|
case 2:
|
|
return r = e.sent(), [4, this.keysMatch(n, r)];
|
|
case 3:
|
|
if (!e.sent()) throw new Error("Key unwrapping mismatch");
|
|
return [2, n];
|
|
}
|
|
});
|
|
});
|
|
}, o.prototype.keysMatch = function(f, a) {
|
|
return E(this, void 0, void 0, function() {
|
|
var i, n, r, e;
|
|
return h(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return t.trys.push([0, 3, , 4]), i = new TextEncoder().encode("verification"), n = new Uint8Array(12), [4, crypto.subtle.encrypt({ name: "AES-GCM", iv: n }, f, i)];
|
|
case 1:
|
|
return r = t.sent(), [4, crypto.subtle.encrypt({ name: "AES-GCM", iv: n }, a, i)];
|
|
case 2:
|
|
return e = t.sent(), [2, this.arraysEqual(new Uint8Array(r), new Uint8Array(e))];
|
|
case 3:
|
|
return t.sent(), [2, !1];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, o.prototype.arraysEqual = function(f, a) {
|
|
if (f.length !== a.length) return !1;
|
|
for (var i = !0, n = 0; n < f.length; n++) f[n] !== a[n] && (i = !1);
|
|
return i;
|
|
}, o;
|
|
})();
|
|
O.KeyWrapper = d;
|
|
}, 9124(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
var o = E(1389), f = (function() {
|
|
function a() {
|
|
}
|
|
return a.prototype.generateRandomCredentialsKey = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i;
|
|
return d(this, function(n) {
|
|
switch (n.label) {
|
|
case 0:
|
|
return n.trys.push([0, 2, , 3]), [4, crypto.subtle.generateKey({ name: "AES-GCM", length: 256 }, !0, ["encrypt", "decrypt"])];
|
|
case 1:
|
|
return [2, n.sent()];
|
|
case 2:
|
|
throw i = n.sent(), new Error("[CryptoService] Credentials key generation failed: ".concat(i.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.encryptCredentials = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e, t, c, s;
|
|
return d(this, function(u) {
|
|
switch (u.label) {
|
|
case 0:
|
|
return u.trys.push([0, 2, , 3]), r = crypto.getRandomValues(new Uint8Array(12)), e = new TextEncoder(), t = e.encode(n), [4, crypto.subtle.encrypt({ name: "AES-GCM", iv: r }, i, t)];
|
|
case 1:
|
|
return c = u.sent(), [2, { ciphertextB64: (0, o.arrayBufferToBase64)(c), ivB64: (0, o.arrayBufferToBase64)(r.buffer) }];
|
|
case 2:
|
|
throw s = u.sent(), new Error("[CryptoService] Credential encryption failed: ".concat(s.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.decryptCredentials = function(i, n, r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e, t, c, s;
|
|
return d(this, function(u) {
|
|
switch (u.label) {
|
|
case 0:
|
|
return u.trys.push([0, 2, , 3]), e = (0, o.base64ToArrayBuffer)(n), t = (0, o.base64ToArrayBuffer)(r), [4, crypto.subtle.decrypt({ name: "AES-GCM", iv: t }, i, e)];
|
|
case 1:
|
|
return c = u.sent(), [2, new TextDecoder().decode(c)];
|
|
case 2:
|
|
throw s = u.sent(), new Error("[CryptoService] Credential decryption failed: ".concat(s.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.wrapWithDeviceKey = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e, t;
|
|
return d(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
return c.trys.push([0, 2, , 3]), r = crypto.getRandomValues(new Uint8Array(12)), [4, crypto.subtle.wrapKey("raw", i, n, { name: "AES-GCM", iv: r })];
|
|
case 1:
|
|
return e = c.sent(), [2, { keyB64: (0, o.arrayBufferToBase64)(e), ivB64: (0, o.arrayBufferToBase64)(r.buffer) }];
|
|
case 2:
|
|
throw t = c.sent(), new Error("[CryptoService] Device key wrapping failed: ".concat(t.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.unwrapWithDeviceKey = function(i, n, r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e, t, c;
|
|
return d(this, function(s) {
|
|
switch (s.label) {
|
|
case 0:
|
|
return s.trys.push([0, 2, , 3]), e = (0, o.base64ToArrayBuffer)(n), t = (0, o.base64ToArrayBuffer)(r), [4, crypto.subtle.unwrapKey("raw", e, i, { name: "AES-GCM", iv: t }, { name: "AES-GCM", length: 256 }, !1, ["encrypt", "decrypt"])];
|
|
case 1:
|
|
return [2, s.sent()];
|
|
case 2:
|
|
throw c = s.sent(), new Error("[CryptoService] Device key unwrapping failed: ".concat(c.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.wrapWithOriginKey = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e, t;
|
|
return d(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
return c.trys.push([0, 2, , 3]), r = crypto.getRandomValues(new Uint8Array(12)), [4, crypto.subtle.wrapKey("raw", i, n, { name: "AES-GCM", iv: r })];
|
|
case 1:
|
|
return e = c.sent(), [2, { keyB64: (0, o.arrayBufferToBase64)(e), ivB64: (0, o.arrayBufferToBase64)(r.buffer) }];
|
|
case 2:
|
|
throw t = c.sent(), new Error("[CryptoService] Origin key wrapping failed: ".concat(t.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.unwrapWithOriginKey = function(i, n, r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e, t, c;
|
|
return d(this, function(s) {
|
|
switch (s.label) {
|
|
case 0:
|
|
return s.trys.push([0, 2, , 3]), e = (0, o.base64ToArrayBuffer)(n), t = (0, o.base64ToArrayBuffer)(r), [4, crypto.subtle.unwrapKey("raw", e, i, { name: "AES-GCM", iv: t }, { name: "AES-GCM", length: 256 }, !1, ["encrypt", "decrypt"])];
|
|
case 1:
|
|
return [2, s.sent()];
|
|
case 2:
|
|
throw c = s.sent(), new Error("[CryptoService] Origin key unwrapping failed: ".concat(c.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a;
|
|
})();
|
|
O.default = f;
|
|
}, 9242(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.DeviceBinder = void 0;
|
|
var o = E(1389), f = (function() {
|
|
function a() {
|
|
}
|
|
return a.prototype.generateFingerprint = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n, r, e, t;
|
|
return d(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
if (!(!((e = globalThis.screen) === null || e === void 0) && e.width) || !(!((t = globalThis.screen) === null || t === void 0) && t.height)) throw new Error("Device fingerprinting requires a browser environment with screen access");
|
|
return i = "".concat(globalThis.screen.width, "x").concat(globalThis.screen.height, "x").concat(globalThis.screen.colorDepth), n = Intl.DateTimeFormat().resolvedOptions().timeZone, [4, this.generateCanvasFingerprint()];
|
|
case 1:
|
|
return r = c.sent(), [2, this.hashFingerprint("".concat(i, "|").concat(n, "|").concat(r))];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.deriveSessionKey = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return r = new TextEncoder().encode(i), [4, crypto.subtle.importKey("raw", r, "HKDF", !1, ["deriveKey"])];
|
|
case 1:
|
|
return e = t.sent(), [2, crypto.subtle.deriveKey({ name: "HKDF", hash: "SHA-256", salt: new TextEncoder().encode(n), info: new TextEncoder().encode("lnc-session-device-key") }, e, { name: "AES-GCM", length: 256 }, !1, ["wrapKey", "unwrapKey"])];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.generateCanvasFingerprint = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n, r, e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (t.trys.push([0, 2, , 3]), i = document.createElement("canvas"), !(n = i.getContext("2d"))) throw new Error("Canvas 2D context unavailable");
|
|
return n.textBaseline = "top", n.font = "14px Arial", n.fillText("Device fingerprint test", 2, 2), r = i.toDataURL(), [4, crypto.subtle.digest("SHA-256", new TextEncoder().encode(r))];
|
|
case 1:
|
|
return e = t.sent(), [2, (0, o.arrayBufferToHex)(e)];
|
|
case 2:
|
|
throw t.sent(), new Error("Canvas fingerprinting required for session security");
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.hashFingerprint = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
return [4, crypto.subtle.digest("SHA-256", new TextEncoder().encode(i))];
|
|
case 1:
|
|
return n = r.sent(), [2, (0, o.arrayBufferToHex)(n)];
|
|
}
|
|
});
|
|
});
|
|
}, a;
|
|
})();
|
|
O.DeviceBinder = f;
|
|
}, 1228(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.OriginKeyManager = void 0;
|
|
var o = (0, E(9764).createLogger)("OriginKeyManager"), f = (function() {
|
|
function a(i) {
|
|
this.dbName = "lnc-origin-keys", this.dbVersion = 1, this.storeName = "keys", this.namespace = i;
|
|
}
|
|
return a.prototype.isExpired = function(i) {
|
|
return Date.now() > i;
|
|
}, a.prototype.getOrCreateOriginKey = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n, r, e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return t.trys.push([0, 4, , 5]), [4, this.loadOriginKey()];
|
|
case 1:
|
|
return (i = t.sent()) && !this.isExpired(i.expiresAt) ? [2, i] : [4, crypto.subtle.generateKey({ name: "AES-GCM", length: 256 }, !1, ["wrapKey", "unwrapKey"])];
|
|
case 2:
|
|
return n = t.sent(), r = Date.now() + 864e5, [4, this.saveOriginKey(n, r)];
|
|
case 3:
|
|
return t.sent(), [2, { originKey: n, expiresAt: r }];
|
|
case 4:
|
|
throw e = t.sent(), new Error("Failed to get or create origin key: ".concat(e.message));
|
|
case 5:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.loadOriginKey = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n = this;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
return r.trys.push([0, 2, , 3]), [4, this.withDB(function(e) {
|
|
return new Promise(function(t) {
|
|
var c = e.transaction([n.storeName], "readonly").objectStore(n.storeName).get(n.namespace);
|
|
c.onsuccess = function() {
|
|
var s = c.result;
|
|
s && s.originKey && typeof s.originKey == "object" && !Array.isArray(s.originKey) && typeof s.expiresAt == "number" && Number.isFinite(s.expiresAt) ? t({ originKey: s.originKey, expiresAt: s.expiresAt }) : t(void 0);
|
|
}, c.onerror = function() {
|
|
return t(void 0);
|
|
};
|
|
});
|
|
})];
|
|
case 1:
|
|
return [2, r.sent()];
|
|
case 2:
|
|
return i = r.sent(), o.error("Failed to load origin key: ".concat(i.message)), [2, void 0];
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.saveOriginKey = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e = this;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return t.trys.push([0, 2, , 3]), [4, this.withDB(function(c) {
|
|
var s = { namespace: e.namespace, originKey: i, expiresAt: n, createdAt: Date.now() };
|
|
return new Promise(function(u, p) {
|
|
var l = c.transaction([e.storeName], "readwrite").objectStore(e.storeName).put(s);
|
|
l.onsuccess = function() {
|
|
return u();
|
|
}, l.onerror = function() {
|
|
var v;
|
|
p(new Error("Failed to save origin key: ".concat((v = l.error) === null || v === void 0 ? void 0 : v.message)));
|
|
};
|
|
});
|
|
})];
|
|
case 1:
|
|
return t.sent(), [3, 3];
|
|
case 2:
|
|
throw r = t.sent(), o.error("Failed to save origin key: ".concat(r.message), r), new Error("Failed to save origin key: ".concat(r.message));
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.clearOriginKey = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n = this;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
return r.trys.push([0, 2, , 3]), [4, this.withDB(function(e) {
|
|
return new Promise(function(t, c) {
|
|
var s = e.transaction([n.storeName], "readwrite").objectStore(n.storeName).delete(n.namespace);
|
|
s.onsuccess = function() {
|
|
o.info("Origin key cleared", { namespace: n.namespace }), t();
|
|
}, s.onerror = function() {
|
|
var u;
|
|
return c(new Error("Failed to clear origin key: ".concat((u = s.error) === null || u === void 0 ? void 0 : u.message)));
|
|
};
|
|
});
|
|
})];
|
|
case 1:
|
|
return r.sent(), [3, 3];
|
|
case 2:
|
|
return i = r.sent(), o.warn("Failed to clear origin key:", i), [3, 3];
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.withDB = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
return [4, this.openDB()];
|
|
case 1:
|
|
n = r.sent(), r.label = 2;
|
|
case 2:
|
|
return r.trys.push([2, , 4, 5]), [4, i(n)];
|
|
case 3:
|
|
return [2, r.sent()];
|
|
case 4:
|
|
return n.close(), [7];
|
|
case 5:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.openDB = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i = this;
|
|
return d(this, function(n) {
|
|
return [2, new Promise(function(r, e) {
|
|
var t = indexedDB.open(i.dbName, i.dbVersion);
|
|
t.onupgradeneeded = function(c) {
|
|
var s = c.target.result;
|
|
s.objectStoreNames.contains(i.storeName) || s.createObjectStore(i.storeName, { keyPath: "namespace" }).createIndex("expiresAt", "expiresAt", { unique: !1 });
|
|
}, t.onsuccess = function() {
|
|
return r(t.result);
|
|
}, t.onerror = function() {
|
|
return e(new Error("Failed to open IndexedDB"));
|
|
};
|
|
})];
|
|
});
|
|
});
|
|
}, a;
|
|
})();
|
|
O.OriginKeyManager = f;
|
|
}, 9440(N, O, E) {
|
|
var h = this && this.__awaiter || function(p, l, v, y) {
|
|
return new (v || (v = Promise))(function(g, _) {
|
|
function T(m) {
|
|
try {
|
|
A(y.next(m));
|
|
} catch (I) {
|
|
_(I);
|
|
}
|
|
}
|
|
function b(m) {
|
|
try {
|
|
A(y.throw(m));
|
|
} catch (I) {
|
|
_(I);
|
|
}
|
|
}
|
|
function A(m) {
|
|
var I;
|
|
m.done ? g(m.value) : (I = m.value, I instanceof v ? I : new v(function(P) {
|
|
P(I);
|
|
})).then(T, b);
|
|
}
|
|
A((y = y.apply(p, l || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(p, l) {
|
|
var v, y, g, _ = { label: 0, sent: function() {
|
|
if (1 & g[0]) throw g[1];
|
|
return g[1];
|
|
}, trys: [], ops: [] }, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return T.next = b(0), T.throw = b(1), T.return = b(2), typeof Symbol == "function" && (T[Symbol.iterator] = function() {
|
|
return this;
|
|
}), T;
|
|
function b(A) {
|
|
return function(m) {
|
|
return (function(I) {
|
|
if (v) throw new TypeError("Generator is already executing.");
|
|
for (; T && (T = 0, I[0] && (_ = 0)), _; ) try {
|
|
if (v = 1, y && (g = 2 & I[0] ? y.return : I[0] ? y.throw || ((g = y.return) && g.call(y), 0) : y.next) && !(g = g.call(y, I[1])).done) return g;
|
|
switch (y = 0, g && (I = [2 & I[0], g.value]), I[0]) {
|
|
case 0:
|
|
case 1:
|
|
g = I;
|
|
break;
|
|
case 4:
|
|
return _.label++, { value: I[1], done: !1 };
|
|
case 5:
|
|
_.label++, y = I[1], I = [0];
|
|
continue;
|
|
case 7:
|
|
I = _.ops.pop(), _.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((g = (g = _.trys).length > 0 && g[g.length - 1]) || I[0] !== 6 && I[0] !== 2)) {
|
|
_ = 0;
|
|
continue;
|
|
}
|
|
if (I[0] === 3 && (!g || I[1] > g[0] && I[1] < g[3])) {
|
|
_.label = I[1];
|
|
break;
|
|
}
|
|
if (I[0] === 6 && _.label < g[1]) {
|
|
_.label = g[1], g = I;
|
|
break;
|
|
}
|
|
if (g && _.label < g[2]) {
|
|
_.label = g[2], _.ops.push(I);
|
|
break;
|
|
}
|
|
g[2] && _.ops.pop(), _.trys.pop();
|
|
continue;
|
|
}
|
|
I = l.call(p, _);
|
|
} catch (P) {
|
|
I = [6, P], y = 0;
|
|
} finally {
|
|
v = g = 0;
|
|
}
|
|
if (5 & I[0]) throw I[1];
|
|
return { value: I[0] ? I[1] : void 0, done: !0 };
|
|
})([A, m]);
|
|
};
|
|
}
|
|
}, o = this && this.__importDefault || function(p) {
|
|
return p && p.__esModule ? p : { default: p };
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
var f = E(9764), a = E(1313), i = E(7027), n = o(E(9124)), r = E(9242), e = E(1228), t = E(7424), c = (0, f.createLogger)("SessionManager"), s = Object.freeze({ sessionDurationMs: 864e5, enableActivityRefresh: !0, maxRefreshes: 10, maxSessionAgeMs: 6048e5 }), u = (function() {
|
|
function p(l, v) {
|
|
this.isRefreshing = !1, this.namespace = l;
|
|
var y = new n.default();
|
|
this.encrypter = new a.CredentialsEncrypter(y), this.keyWrapper = new i.KeyWrapper(y), this.deviceBinder = new r.DeviceBinder(), this.originKeyManager = new e.OriginKeyManager(l), this.storage = new t.SessionStorage(l), this.config = this.validateConfig(v);
|
|
}
|
|
return Object.defineProperty(p.prototype, "canAutoRestore", { get: function() {
|
|
return this.storage.hasData();
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(p.prototype, "sessionTimeRemaining", { get: function() {
|
|
var l = this.storage.load();
|
|
return l ? Math.max(0, l.expiresAt - Date.now()) : 0;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(p.prototype, "hasActiveSession", { get: function() {
|
|
var l = this.storage.load();
|
|
return l != null && Date.now() < l.expiresAt;
|
|
}, enumerable: !1, configurable: !0 }), p.prototype.getNamespace = function() {
|
|
return this.namespace;
|
|
}, p.prototype.clearSession = function() {
|
|
this.storage.clear();
|
|
}, p.prototype.hasValidSession = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(l) {
|
|
switch (l.label) {
|
|
case 0:
|
|
return this.hasActiveSession ? [4, this.restoreSession()] : [2, !1];
|
|
case 1:
|
|
return [2, !!l.sent()];
|
|
}
|
|
});
|
|
});
|
|
}, p.prototype.createSession = function(l) {
|
|
return h(this, void 0, void 0, function() {
|
|
var v, y, g, _, T, b, A, m, I;
|
|
return d(this, function(P) {
|
|
switch (P.label) {
|
|
case 0:
|
|
return v = this.generateSecureSessionId(), y = Date.now(), g = y + this.config.sessionDurationMs, [4, this.deviceBinder.generateFingerprint()];
|
|
case 1:
|
|
return _ = P.sent(), [4, this.encrypter.encrypt(l)];
|
|
case 2:
|
|
return T = P.sent(), [4, this.deviceBinder.deriveSessionKey(_, v)];
|
|
case 3:
|
|
return b = P.sent(), [4, this.originKeyManager.getOrCreateOriginKey()];
|
|
case 4:
|
|
return A = P.sent(), [4, this.keyWrapper.wrapCredentialsKey(T.credentialsKey, b, A.originKey)];
|
|
case 5:
|
|
return m = P.sent(), I = { sessionId: v, createdAt: y, expiresAt: g, refreshCount: 0, encryptedCredentials: T.ciphertextB64, credentialsIV: T.ivB64, device: m.deviceWrap, origin: m.originWrap }, this.storage.save(I), c.info("Session created successfully"), [2];
|
|
}
|
|
});
|
|
});
|
|
}, p.prototype.restoreSession = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var l, v;
|
|
return d(this, function(y) {
|
|
switch (y.label) {
|
|
case 0:
|
|
return y.trys.push([0, 2, , 3]), [4, this.restoreSessionOrThrow()];
|
|
case 1:
|
|
return (l = y.sent()) || this.storage.clear(), [2, l];
|
|
case 2:
|
|
return v = y.sent(), c.error("Session restoration failed:", v), this.storage.clear(), [2, void 0];
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, p.prototype.refreshSession = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(l) {
|
|
switch (l.label) {
|
|
case 0:
|
|
if (this.isRefreshing && this.refreshPromise) return c.warn("Refresh already in progress; waiting for result"), [2, this.refreshPromise];
|
|
this.isRefreshing = !0, this.refreshPromise = this.refreshSessionInternal(), l.label = 1;
|
|
case 1:
|
|
return l.trys.push([1, , 3, 4]), [4, this.refreshPromise];
|
|
case 2:
|
|
return [2, l.sent()];
|
|
case 3:
|
|
return this.isRefreshing = !1, this.refreshPromise = void 0, [7];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, p.prototype.refreshSessionInternal = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var l, v, y, g, _, T, b, A, m;
|
|
return d(this, function(I) {
|
|
switch (I.label) {
|
|
case 0:
|
|
return (l = this.storage.load()) ? l.refreshCount >= this.config.maxRefreshes ? (c.warn("Maximum refresh count reached"), [2, !1]) : Date.now() - l.createdAt >= this.config.maxSessionAgeMs ? (c.warn("Maximum session age exceeded"), [2, !1]) : [4, this.restoreSessionOrThrow()] : (c.warn("No session data available for refresh"), [2, !1]);
|
|
case 1:
|
|
return (v = I.sent()) ? [4, this.encrypter.encrypt(v)] : (c.warn("Refresh aborted: session could not be restored"), [2, !1]);
|
|
case 2:
|
|
return y = I.sent(), T = (_ = this.deviceBinder).deriveSessionKey, [4, this.deviceBinder.generateFingerprint()];
|
|
case 3:
|
|
return [4, T.apply(_, [I.sent(), l.sessionId])];
|
|
case 4:
|
|
return g = I.sent(), [4, this.originKeyManager.getOrCreateOriginKey()];
|
|
case 5:
|
|
return b = I.sent(), [4, this.keyWrapper.wrapCredentialsKey(y.credentialsKey, g, b.originKey)];
|
|
case 6:
|
|
return A = I.sent(), m = { sessionId: l.sessionId, createdAt: l.createdAt, expiresAt: Date.now() + this.config.sessionDurationMs, refreshCount: l.refreshCount + 1, encryptedCredentials: y.ciphertextB64, credentialsIV: y.ivB64, device: A.deviceWrap, origin: A.originWrap }, this.storage.save(m), [2, !0];
|
|
}
|
|
});
|
|
});
|
|
}, p.prototype.restoreSessionOrThrow = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var l, v, y, g, _, T;
|
|
return d(this, function(b) {
|
|
switch (b.label) {
|
|
case 0:
|
|
return c.info("Starting session restoration..."), (l = this.storage.load()) ? Date.now() > l.expiresAt ? (c.info("Session expired"), [2, void 0]) : [4, this.deviceBinder.generateFingerprint()] : (c.info("No session data found"), [2, void 0]);
|
|
case 1:
|
|
return v = b.sent(), [4, this.deviceBinder.deriveSessionKey(v, l.sessionId)];
|
|
case 2:
|
|
return y = b.sent(), [4, this.originKeyManager.loadOriginKey()];
|
|
case 3:
|
|
if (!(g = b.sent())) throw new Error("Origin key missing");
|
|
if (this.originKeyManager.isExpired(g.expiresAt)) throw new Error("Origin key expired");
|
|
return [4, this.keyWrapper.unwrapCredentialsKey({ deviceWrap: l.device, originWrap: l.origin }, y, g.originKey)];
|
|
case 4:
|
|
return _ = b.sent(), [4, this.encrypter.decrypt({ credentialsKey: _, ciphertextB64: l.encryptedCredentials, ivB64: l.credentialsIV })];
|
|
case 5:
|
|
return T = b.sent(), c.info("Session restoration successful!"), [2, T];
|
|
}
|
|
});
|
|
});
|
|
}, p.prototype.generateSecureSessionId = function() {
|
|
if (crypto.randomUUID) return crypto.randomUUID();
|
|
var l = new Uint8Array(16);
|
|
return crypto.getRandomValues(l), Array.from(l, function(v) {
|
|
return v.toString(16).padStart(2, "0");
|
|
}).join("");
|
|
}, p.prototype.validateConfig = function(l) {
|
|
var v = l ? Object.fromEntries(Object.entries(l).filter(function(g) {
|
|
return g[1] !== void 0;
|
|
})) : {}, y = Object.assign({}, s, v);
|
|
if (!Number.isFinite(y.sessionDurationMs) || y.sessionDurationMs <= 0) throw new Error("sessionDurationMs must be a finite positive number");
|
|
if (!Number.isInteger(y.maxRefreshes) || y.maxRefreshes < 0) throw new Error("maxRefreshes must be a non-negative integer");
|
|
if (typeof y.enableActivityRefresh != "boolean") throw new Error("enableActivityRefresh must be a boolean");
|
|
if (!Number.isFinite(y.maxSessionAgeMs) || y.maxSessionAgeMs <= 0) throw new Error("maxSessionAgeMs must be a finite positive number");
|
|
if (y.maxSessionAgeMs < y.sessionDurationMs) throw new Error("maxSessionAgeMs must be >= sessionDurationMs");
|
|
return Object.freeze(y);
|
|
}, p;
|
|
})();
|
|
O.default = u;
|
|
}, 5673(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
var o = (0, E(9764).createLogger)("SessionRefreshManager"), f = (function() {
|
|
function a(i) {
|
|
this.sessionManager = i, this.lastActivity = Date.now(), this.activityListeners = [], this.isRunning = !1, this.hasVisibilityListener = !1, this.consecutiveErrors = 0, this.isRefreshing = !1, this.config = i.config, this.visibilityHandler = this.handleVisibilityChange.bind(this), this.refreshTriggerMs = Math.min(144e5, 0.25 * this.config.sessionDurationMs);
|
|
}
|
|
return a.prototype.start = function() {
|
|
if (!this.isRunning && this.config.enableActivityRefresh) if (typeof document < "u") {
|
|
if (this.config.sessionDurationMs < 12e5) {
|
|
var i = this.config.sessionDurationMs / 6e4;
|
|
o.warn("Session duration (".concat(i, "m) is less ") + "than the minimum recommended for auto-refresh (".concat(20, "m). ") + "The periodic check may not observe the session inside the refresh window before it expires.");
|
|
}
|
|
this.isRunning = !0, this.lastActivity = Date.now(), this.consecutiveErrors = 0, this.setupActivityMonitoring(), this.resumeRefreshTimer(), this.visibilityHandler && (document.addEventListener("visibilitychange", this.visibilityHandler), this.hasVisibilityListener = !0);
|
|
} else o.warn("No document available; activity monitoring disabled");
|
|
}, a.prototype.stop = function() {
|
|
this.isRunning && (this.isRunning = !1, this.cleanupTimersAndListeners(), this.hasVisibilityListener && this.visibilityHandler && (document.removeEventListener("visibilitychange", this.visibilityHandler), this.hasVisibilityListener = !1));
|
|
}, a.prototype.setupActivityMonitoring = function() {
|
|
var i = this, n = this.createThrottledActivityUpdater();
|
|
["click", "keydown", "mousemove", "scroll", "touchstart"].forEach(function(r) {
|
|
var e = function() {
|
|
return n();
|
|
};
|
|
document.addEventListener(r, e, { passive: !0 }), i.activityListeners.push({ event: r, handler: e });
|
|
});
|
|
}, a.prototype.createThrottledActivityUpdater = function() {
|
|
var i = this, n = !1;
|
|
return function() {
|
|
n || (n = !0, i.lastActivity = Date.now(), i.activityThrottleTimer = setTimeout(function() {
|
|
n = !1;
|
|
}, 3e4));
|
|
};
|
|
}, a.prototype.resumeRefreshTimer = function() {
|
|
var i = this;
|
|
this.refreshTimer && clearTimeout(this.refreshTimer), this.refreshTimer = setTimeout(function() {
|
|
return h(i, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
switch (n.label) {
|
|
case 0:
|
|
return [4, this.checkAndRefreshSession()];
|
|
case 1:
|
|
return n.sent(), this.isRunning && this.resumeRefreshTimer(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, 3e5);
|
|
}, a.prototype.pauseRefreshTimer = function() {
|
|
this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = void 0);
|
|
}, a.prototype.checkAndRefreshSession = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var i, n, r;
|
|
return d(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
if (this.isRefreshing) return [2];
|
|
this.isRefreshing = !0, e.label = 1;
|
|
case 1:
|
|
return e.trys.push([1, 4, 5, 6]), (i = Date.now() - this.lastActivity) >= 18e5 ? (o.debug("Refresh suppressed: user inactive " + "for ".concat(Math.round(i / 1e3), "s")), [2]) : (n = this.sessionManager.sessionTimeRemaining) > 0 && n < this.refreshTriggerMs ? [4, this.sessionManager.refreshSession()] : [3, 3];
|
|
case 2:
|
|
e.sent() ? (this.consecutiveErrors = 0, o.info("Session automatically refreshed")) : (o.warn("Session refresh declined (max refreshes or max age reached). Stopping."), this.stop()), e.label = 3;
|
|
case 3:
|
|
return [3, 6];
|
|
case 4:
|
|
return r = e.sent(), this.consecutiveErrors++, o.error("Refresh check failed " + "(attempt ".concat(this.consecutiveErrors, "/").concat(3, "):"), r), this.consecutiveErrors >= 3 && (o.error("Stopping after repeated failures"), this.stop()), [3, 6];
|
|
case 5:
|
|
return this.isRefreshing = !1, [7];
|
|
case 6:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.handleVisibilityChange = function() {
|
|
this.isRunning && (document.hidden ? this.pauseRefreshTimer() : (this.lastActivity = Date.now(), this.resumeRefreshTimer()));
|
|
}, a.prototype.cleanupTimersAndListeners = function() {
|
|
this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = void 0), this.activityThrottleTimer && (clearTimeout(this.activityThrottleTimer), this.activityThrottleTimer = void 0), this.activityListeners.forEach(function(i) {
|
|
var n = i.event, r = i.handler;
|
|
document.removeEventListener(n, r);
|
|
}), this.activityListeners = [];
|
|
}, a.prototype.getLastActivity = function() {
|
|
return this.lastActivity;
|
|
}, a.prototype.isActive = function() {
|
|
return this.isRunning;
|
|
}, a.prototype.forceRefreshCheck = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(i) {
|
|
switch (i.label) {
|
|
case 0:
|
|
return this.isRunning ? [4, this.checkAndRefreshSession()] : (o.warn("forceRefreshCheck called while not running"), [2, !1]);
|
|
case 1:
|
|
return i.sent(), [2, this.isRunning];
|
|
}
|
|
});
|
|
});
|
|
}, a;
|
|
})();
|
|
O.default = f;
|
|
}, 7424(N, O, E) {
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.SessionStorage = void 0;
|
|
var h = (0, E(9764).createLogger)("SessionStorage"), d = "lnc-session:", o = function(a) {
|
|
if (!a || typeof a != "object") return !1;
|
|
var i = a;
|
|
return typeof i.keyB64 == "string" && typeof i.ivB64 == "string";
|
|
}, f = (function() {
|
|
function a(i) {
|
|
this._cache = void 0, this._namespace = i;
|
|
}
|
|
return a.prototype.save = function(i) {
|
|
if (typeof sessionStorage < "u") try {
|
|
var n = "".concat(d).concat(this._namespace);
|
|
sessionStorage.setItem(n, JSON.stringify(i)), this._cache = i, h.info("Session saved to sessionStorage", { namespace: this._namespace, sessionId: i.sessionId, createdAt: i.createdAt, expiresAt: i.expiresAt, refreshCount: i.refreshCount });
|
|
} catch (r) {
|
|
throw h.error("Failed to save session data", { namespace: this._namespace, error: r }), r;
|
|
}
|
|
}, a.prototype.load = function() {
|
|
var i;
|
|
if (typeof sessionStorage < "u") {
|
|
if (this._cache !== void 0) return (i = this._cache) !== null && i !== void 0 ? i : void 0;
|
|
try {
|
|
var n = "".concat(d).concat(this._namespace), r = sessionStorage.getItem(n);
|
|
if (!r) return void (this._cache = null);
|
|
var e = JSON.parse(r);
|
|
if (!e || typeof e != "object" || !(c = e) || typeof c.sessionId != "string" || typeof c.createdAt != "number" || typeof c.expiresAt != "number" || typeof c.refreshCount != "number" || typeof c.encryptedCredentials != "string" || typeof c.credentialsIV != "string" || !Number.isFinite(c.createdAt) || !Number.isFinite(c.expiresAt) || c.createdAt <= 0 || c.expiresAt <= 0 || c.createdAt > c.expiresAt || !Number.isInteger(c.refreshCount) || c.refreshCount < 0 || c.sessionId.length === 0 || !o(c.device) || !o(c.origin)) return h.error("Invalid session data", { namespace: this._namespace }), sessionStorage.removeItem(n), void (this._cache = null);
|
|
var t = e;
|
|
return this._cache = t, h.info("Session loaded from sessionStorage", { namespace: this._namespace, sessionId: t.sessionId, createdAt: t.createdAt, expiresAt: t.expiresAt, refreshCount: t.refreshCount }), t;
|
|
} catch (s) {
|
|
h.error("Failed to load session data", { namespace: this._namespace, error: s });
|
|
try {
|
|
n = "".concat(d).concat(this._namespace), sessionStorage.removeItem(n);
|
|
} catch (u) {
|
|
h.warn("Cleanup failed during error recovery", { namespace: this._namespace, cleanupError: u });
|
|
}
|
|
return void (this._cache = null);
|
|
}
|
|
var c;
|
|
}
|
|
}, a.prototype.clear = function() {
|
|
if (typeof sessionStorage < "u") try {
|
|
var i = "".concat(d).concat(this._namespace);
|
|
sessionStorage.removeItem(i), this._cache = null;
|
|
} catch (n) {
|
|
h.error("Failed to clear session data", { namespace: this._namespace, error: n });
|
|
}
|
|
}, a.prototype.hasData = function() {
|
|
return typeof sessionStorage < "u" && (this._cache === void 0 && this.load(), this._cache != null);
|
|
}, a;
|
|
})();
|
|
O.SessionStorage = f;
|
|
}, 3666(N, O, E) {
|
|
var h = this && this.__awaiter || function(i, n, r, e) {
|
|
return new (r || (r = Promise))(function(t, c) {
|
|
function s(l) {
|
|
try {
|
|
p(e.next(l));
|
|
} catch (v) {
|
|
c(v);
|
|
}
|
|
}
|
|
function u(l) {
|
|
try {
|
|
p(e.throw(l));
|
|
} catch (v) {
|
|
c(v);
|
|
}
|
|
}
|
|
function p(l) {
|
|
var v;
|
|
l.done ? t(l.value) : (v = l.value, v instanceof r ? v : new r(function(y) {
|
|
y(v);
|
|
})).then(s, u);
|
|
}
|
|
p((e = e.apply(i, n || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(i, n) {
|
|
var r, e, t, c = { label: 0, sent: function() {
|
|
if (1 & t[0]) throw t[1];
|
|
return t[1];
|
|
}, trys: [], ops: [] }, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return s.next = u(0), s.throw = u(1), s.return = u(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
return this;
|
|
}), s;
|
|
function u(p) {
|
|
return function(l) {
|
|
return (function(v) {
|
|
if (r) throw new TypeError("Generator is already executing.");
|
|
for (; s && (s = 0, v[0] && (c = 0)), c; ) try {
|
|
if (r = 1, e && (t = 2 & v[0] ? e.return : v[0] ? e.throw || ((t = e.return) && t.call(e), 0) : e.next) && !(t = t.call(e, v[1])).done) return t;
|
|
switch (e = 0, t && (v = [2 & v[0], t.value]), v[0]) {
|
|
case 0:
|
|
case 1:
|
|
t = v;
|
|
break;
|
|
case 4:
|
|
return c.label++, { value: v[1], done: !1 };
|
|
case 5:
|
|
c.label++, e = v[1], v = [0];
|
|
continue;
|
|
case 7:
|
|
v = c.ops.pop(), c.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((t = (t = c.trys).length > 0 && t[t.length - 1]) || v[0] !== 6 && v[0] !== 2)) {
|
|
c = 0;
|
|
continue;
|
|
}
|
|
if (v[0] === 3 && (!t || v[1] > t[0] && v[1] < t[3])) {
|
|
c.label = v[1];
|
|
break;
|
|
}
|
|
if (v[0] === 6 && c.label < t[1]) {
|
|
c.label = t[1], t = v;
|
|
break;
|
|
}
|
|
if (t && c.label < t[2]) {
|
|
c.label = t[2], c.ops.push(v);
|
|
break;
|
|
}
|
|
t[2] && c.ops.pop(), c.trys.pop();
|
|
continue;
|
|
}
|
|
v = n.call(i, c);
|
|
} catch (y) {
|
|
v = [6, y], e = 0;
|
|
} finally {
|
|
r = t = 0;
|
|
}
|
|
if (5 & v[0]) throw v[1];
|
|
return { value: v[0] ? v[1] : void 0, done: !0 };
|
|
})([p, l]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.AuthenticationCoordinator = void 0;
|
|
var o = (0, E(9764).createLogger)("AuthenticationCoordinator"), f = ["localKey", "remoteKey", "pairingPhrase", "serverHost"], a = (function() {
|
|
function i(n, r, e) {
|
|
this.strategyManager = n, this.credentialCache = r, this.sessionCoordinator = e, this.sessionRestored = !1, this.initializeCachePromise = this.initializeCache();
|
|
}
|
|
return Object.defineProperty(i.prototype, "isUnlocked", { get: function() {
|
|
return !!this.activeStrategy && this.activeStrategy.isUnlocked;
|
|
}, enumerable: !1, configurable: !0 }), i.prototype.getActiveStrategy = function() {
|
|
return this.activeStrategy;
|
|
}, i.prototype.clearSession = function() {
|
|
this.credentialCache.clear(), this.sessionCoordinator.clearSession(), this.sessionRestored = !1, this.activeStrategy = void 0, o.info("Cleared session state");
|
|
}, i.prototype.unlock = function(n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return t.trys.push([0, 4, , 5]), [4, this.waitForSessionRestoration()];
|
|
case 1:
|
|
return t.sent(), n.method === "session" && this.sessionRestored ? [2, !0] : (r = this.strategyManager.getStrategy(n.method)) ? [4, r.unlock(n)] : (o.error("Authentication method '".concat(n.method, "' not supported")), [2, !1]);
|
|
case 2:
|
|
return t.sent() ? (this.activeStrategy = r, [4, this.loadCredentialsFromStrategy(r)]) : (o.error("Failed to unlock with ".concat(n.method)), [2, !1]);
|
|
case 3:
|
|
return t.sent(), [2, !0];
|
|
case 4:
|
|
return e = t.sent(), o.error("Unlock failed:", e), this.credentialCache.clear(), this.activeStrategy = void 0, [2, !1];
|
|
case 5:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.getAuthenticationInfo = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var n, r, e, t, c, s, u, p;
|
|
return d(this, function(l) {
|
|
switch (l.label) {
|
|
case 0:
|
|
return [4, this.waitForSessionRestoration()];
|
|
case 1:
|
|
return l.sent(), n = this.strategyManager.hasAnyCredentials, r = this.sessionCoordinator.hasActiveSession, [4, this.sessionCoordinator.getTimeRemaining()];
|
|
case 2:
|
|
return e = l.sent(), t = this.strategyManager.getStrategy("passkey"), c = !!t && t.isSupported, s = c && ((u = t?.hasStoredAuthData) === null || u === void 0 ? void 0 : u.call(t)) === !0, [2, { isUnlocked: this.isUnlocked, hasStoredCredentials: n, hasActiveSession: r, sessionTimeRemaining: e, supportsPasskeys: c, hasPasskey: s, preferredUnlockMethod: this.strategyManager.preferredMethod, passkeyCredentialId: s ? (p = t?.getCredentialId) === null || p === void 0 ? void 0 : p.call(t) : void 0 }];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.tryAutoRestore = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var n, r, e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (!this.sessionCoordinator.isSessionAvailable || this.sessionRestored) return [2, !1];
|
|
if (!(n = this.strategyManager.getStrategy("session"))) return [2, !1];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.sessionCoordinator.tryAutoRestore()];
|
|
case 2:
|
|
return (r = t.sent()) ? (this.credentialCache.hydrateFromSession(r), this.sessionRestored = !0, this.activeStrategy = n, [2, !0]) : [2, !1];
|
|
case 3:
|
|
return e = t.sent(), o.error("Auto-restore failed:", e), [3, 4];
|
|
case 4:
|
|
return [2, !1];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.createSessionAfterConnection = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
switch (n.label) {
|
|
case 0:
|
|
return this.sessionCoordinator.isSessionAvailable ? [4, this.sessionCoordinator.createSession({ localKey: this.getCachedCredential("localKey"), remoteKey: this.getCachedCredential("remoteKey"), pairingPhrase: this.getCachedCredential("pairingPhrase"), serverHost: this.getCachedCredential("serverHost") })] : [3, 2];
|
|
case 1:
|
|
n.sent(), n.label = 2;
|
|
case 2:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.getCachedCredential = function(n) {
|
|
return this.credentialCache.get(n) || "";
|
|
}, i.prototype.initializeCache = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
switch (n.label) {
|
|
case 0:
|
|
return [4, this.tryAutoRestore()];
|
|
case 1:
|
|
return n.sent(), this.sessionRestored || !this.activeStrategy ? [3, 3] : [4, this.loadCredentialsFromStrategy(this.activeStrategy)];
|
|
case 2:
|
|
n.sent(), n.label = 3;
|
|
case 3:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.waitForSessionRestoration = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(n) {
|
|
switch (n.label) {
|
|
case 0:
|
|
return !this.sessionCoordinator.isSessionAvailable || this.sessionRestored ? [2] : this.initializeCachePromise ? [4, this.initializeCachePromise] : [3, 2];
|
|
case 1:
|
|
return n.sent(), [3, 4];
|
|
case 2:
|
|
return [4, this.tryAutoRestore()];
|
|
case 3:
|
|
n.sent(), n.label = 4;
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.persistCachedCredentials = function(n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e, t, c, s, u;
|
|
return d(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
if (this.activeStrategy = n, n.method === "session") return [2];
|
|
r = [], e = 0, t = f, p.label = 1;
|
|
case 1:
|
|
if (!(e < t.length)) return [3, 6];
|
|
if (c = t[e], !(s = this.credentialCache.get(c))) return [3, 5];
|
|
p.label = 2;
|
|
case 2:
|
|
return p.trys.push([2, 4, , 5]), [4, n.setCredential(c, s)];
|
|
case 3:
|
|
return p.sent(), [3, 5];
|
|
case 4:
|
|
return u = p.sent(), o.error("Failed to persist ".concat(c, ":"), u), r.push(c), [3, 5];
|
|
case 5:
|
|
return e++, [3, 1];
|
|
case 6:
|
|
if (r.length > 0) throw new Error("Failed to persist credentials: ".concat(r.join(", ")));
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, i.prototype.loadCredentialsFromStrategy = function(n) {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e, t, c, s, u;
|
|
return d(this, function(p) {
|
|
switch (p.label) {
|
|
case 0:
|
|
r = [], e = 0, t = f, p.label = 1;
|
|
case 1:
|
|
if (!(e < t.length)) return [3, 6];
|
|
c = t[e], p.label = 2;
|
|
case 2:
|
|
return p.trys.push([2, 4, , 5]), [4, n.getCredential(c)];
|
|
case 3:
|
|
return (s = p.sent()) && this.credentialCache.set(c, s), [3, 5];
|
|
case 4:
|
|
return u = p.sent(), o.error("Failed to load credential ".concat(c, ":"), u), r.push(c), [3, 5];
|
|
case 5:
|
|
return e++, [3, 1];
|
|
case 6:
|
|
if (r.length > 0) throw new Error("Failed to load credentials: ".concat(r.join(", ")));
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, i;
|
|
})();
|
|
O.AuthenticationCoordinator = a;
|
|
}, 6041(N, O, E) {
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.CredentialCache = void 0;
|
|
var h = (0, E(9764).createLogger)("CredentialCache"), d = (function() {
|
|
function o() {
|
|
this.cache = /* @__PURE__ */ new Map();
|
|
}
|
|
return Object.defineProperty(o.prototype, "size", { get: function() {
|
|
return this.cache.size;
|
|
}, enumerable: !1, configurable: !0 }), o.prototype.get = function(f) {
|
|
return this.cache.get(f);
|
|
}, o.prototype.set = function(f, a) {
|
|
this.cache.set(f, a);
|
|
}, o.prototype.has = function(f) {
|
|
return this.cache.has(f);
|
|
}, o.prototype.hasAny = function() {
|
|
return this.cache.size > 0;
|
|
}, o.prototype.clear = function() {
|
|
this.cache.clear(), h.info("Cache cleared");
|
|
}, o.prototype.getAll = function() {
|
|
return new Map(this.cache);
|
|
}, o.prototype.hydrate = function(f) {
|
|
for (var a = 0, i = Object.entries(f); a < i.length; a++) {
|
|
var n = i[a], r = n[0], e = n[1];
|
|
this.cache.set(r, e);
|
|
}
|
|
h.info("Hydrated with credentials:", { keys: Object.keys(f) });
|
|
}, o.prototype.hydrateFromSession = function(f) {
|
|
this.cache.set("localKey", f.localKey), this.cache.set("remoteKey", f.remoteKey), this.cache.set("pairingPhrase", f.pairingPhrase), this.cache.set("serverHost", f.serverHost), h.info("Hydrated from session:", { hasLocalKey: !!f.localKey, hasRemoteKey: !!f.remoteKey, hasPairingPhrase: !!f.pairingPhrase, serverHost: f.serverHost });
|
|
}, o.prototype.keys = function() {
|
|
return Array.from(this.cache.keys());
|
|
}, o.prototype.values = function() {
|
|
return Array.from(this.cache.values());
|
|
}, o.prototype.entries = function() {
|
|
return Array.from(this.cache.entries());
|
|
}, o.prototype.snapshot = function() {
|
|
return Object.fromEntries(this.cache.entries());
|
|
}, o;
|
|
})();
|
|
O.CredentialCache = d;
|
|
}, 9389(N, O, E) {
|
|
var h = this && this.__awaiter || function(n, r, e, t) {
|
|
return new (e || (e = Promise))(function(c, s) {
|
|
function u(v) {
|
|
try {
|
|
l(t.next(v));
|
|
} catch (y) {
|
|
s(y);
|
|
}
|
|
}
|
|
function p(v) {
|
|
try {
|
|
l(t.throw(v));
|
|
} catch (y) {
|
|
s(y);
|
|
}
|
|
}
|
|
function l(v) {
|
|
var y;
|
|
v.done ? c(v.value) : (y = v.value, y instanceof e ? y : new e(function(g) {
|
|
g(y);
|
|
})).then(u, p);
|
|
}
|
|
l((t = t.apply(n, r || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(n, r) {
|
|
var e, t, c, s = { label: 0, sent: function() {
|
|
if (1 & c[0]) throw c[1];
|
|
return c[1];
|
|
}, trys: [], ops: [] }, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return u.next = p(0), u.throw = p(1), u.return = p(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
return this;
|
|
}), u;
|
|
function p(l) {
|
|
return function(v) {
|
|
return (function(y) {
|
|
if (e) throw new TypeError("Generator is already executing.");
|
|
for (; u && (u = 0, y[0] && (s = 0)), s; ) try {
|
|
if (e = 1, t && (c = 2 & y[0] ? t.return : y[0] ? t.throw || ((c = t.return) && c.call(t), 0) : t.next) && !(c = c.call(t, y[1])).done) return c;
|
|
switch (t = 0, c && (y = [2 & y[0], c.value]), y[0]) {
|
|
case 0:
|
|
case 1:
|
|
c = y;
|
|
break;
|
|
case 4:
|
|
return s.label++, { value: y[1], done: !1 };
|
|
case 5:
|
|
s.label++, t = y[1], y = [0];
|
|
continue;
|
|
case 7:
|
|
y = s.ops.pop(), s.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((c = (c = s.trys).length > 0 && c[c.length - 1]) || y[0] !== 6 && y[0] !== 2)) {
|
|
s = 0;
|
|
continue;
|
|
}
|
|
if (y[0] === 3 && (!c || y[1] > c[0] && y[1] < c[3])) {
|
|
s.label = y[1];
|
|
break;
|
|
}
|
|
if (y[0] === 6 && s.label < c[1]) {
|
|
s.label = c[1], c = y;
|
|
break;
|
|
}
|
|
if (c && s.label < c[2]) {
|
|
s.label = c[2], s.ops.push(y);
|
|
break;
|
|
}
|
|
c[2] && s.ops.pop(), s.trys.pop();
|
|
continue;
|
|
}
|
|
y = r.call(n, s);
|
|
} catch (g) {
|
|
y = [6, g], t = 0;
|
|
} finally {
|
|
e = c = 0;
|
|
}
|
|
if (5 & y[0]) throw y[1];
|
|
return { value: y[0] ? y[1] : void 0, done: !0 };
|
|
})([l, v]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.PasskeyStrategy = void 0;
|
|
var o = E(6315), f = E(4279), a = (0, E(9764).createLogger)("PasskeyStrategy"), i = (function() {
|
|
function n(r, e) {
|
|
this.method = "passkey";
|
|
var t = new o.PasskeyEncryptionService(r, e);
|
|
this.repository = new f.PasskeyCredentialRepository(r, t);
|
|
}
|
|
return Object.defineProperty(n.prototype, "isSupported", { get: function() {
|
|
return typeof window < "u" && !(!window.PublicKeyCredential || !window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable);
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "isUnlocked", { get: function() {
|
|
return this.repository.isUnlocked;
|
|
}, enumerable: !1, configurable: !0 }), n.prototype.unlock = function(r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (r.method !== "passkey") return [2, !1];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.repository.unlock(r)];
|
|
case 2:
|
|
return t.sent(), [2, !0];
|
|
case 3:
|
|
return e = t.sent(), a.error("Unlock failed:", e), [2, !1];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, Object.defineProperty(n.prototype, "hasAnyCredentials", { get: function() {
|
|
return this.repository.hasAnyCredentials;
|
|
}, enumerable: !1, configurable: !0 }), n.prototype.hasStoredAuthData = function() {
|
|
return this.repository.hasStoredAuthData;
|
|
}, n.prototype.getCredentialId = function() {
|
|
return this.repository.storedCredentialId;
|
|
}, n.prototype.getCredential = function(r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (!this.isUnlocked) return a.warn("Cannot get credential - not unlocked"), [2, void 0];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.repository.getCredential(r)];
|
|
case 2:
|
|
return [2, t.sent()];
|
|
case 3:
|
|
return e = t.sent(), a.error("Failed to get credential ".concat(r, ":"), e), [2, void 0];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.setCredential = function(r, e) {
|
|
return h(this, void 0, void 0, function() {
|
|
var t;
|
|
return d(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
if (!this.isUnlocked) return a.warn("Cannot set credential - not unlocked"), [2];
|
|
c.label = 1;
|
|
case 1:
|
|
return c.trys.push([1, 3, , 4]), [4, this.repository.setCredential(r, e)];
|
|
case 2:
|
|
return c.sent(), [3, 4];
|
|
case 3:
|
|
throw t = c.sent(), a.error("Failed to set credential ".concat(r, ":"), t), t;
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.clear = function() {
|
|
this.repository.clear();
|
|
}, n;
|
|
})();
|
|
O.PasskeyStrategy = i;
|
|
}, 8562(N, O, E) {
|
|
var h = this && this.__awaiter || function(n, r, e, t) {
|
|
return new (e || (e = Promise))(function(c, s) {
|
|
function u(v) {
|
|
try {
|
|
l(t.next(v));
|
|
} catch (y) {
|
|
s(y);
|
|
}
|
|
}
|
|
function p(v) {
|
|
try {
|
|
l(t.throw(v));
|
|
} catch (y) {
|
|
s(y);
|
|
}
|
|
}
|
|
function l(v) {
|
|
var y;
|
|
v.done ? c(v.value) : (y = v.value, y instanceof e ? y : new e(function(g) {
|
|
g(y);
|
|
})).then(u, p);
|
|
}
|
|
l((t = t.apply(n, r || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(n, r) {
|
|
var e, t, c, s = { label: 0, sent: function() {
|
|
if (1 & c[0]) throw c[1];
|
|
return c[1];
|
|
}, trys: [], ops: [] }, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return u.next = p(0), u.throw = p(1), u.return = p(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
return this;
|
|
}), u;
|
|
function p(l) {
|
|
return function(v) {
|
|
return (function(y) {
|
|
if (e) throw new TypeError("Generator is already executing.");
|
|
for (; u && (u = 0, y[0] && (s = 0)), s; ) try {
|
|
if (e = 1, t && (c = 2 & y[0] ? t.return : y[0] ? t.throw || ((c = t.return) && c.call(t), 0) : t.next) && !(c = c.call(t, y[1])).done) return c;
|
|
switch (t = 0, c && (y = [2 & y[0], c.value]), y[0]) {
|
|
case 0:
|
|
case 1:
|
|
c = y;
|
|
break;
|
|
case 4:
|
|
return s.label++, { value: y[1], done: !1 };
|
|
case 5:
|
|
s.label++, t = y[1], y = [0];
|
|
continue;
|
|
case 7:
|
|
y = s.ops.pop(), s.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((c = (c = s.trys).length > 0 && c[c.length - 1]) || y[0] !== 6 && y[0] !== 2)) {
|
|
s = 0;
|
|
continue;
|
|
}
|
|
if (y[0] === 3 && (!c || y[1] > c[0] && y[1] < c[3])) {
|
|
s.label = y[1];
|
|
break;
|
|
}
|
|
if (y[0] === 6 && s.label < c[1]) {
|
|
s.label = c[1], c = y;
|
|
break;
|
|
}
|
|
if (c && s.label < c[2]) {
|
|
s.label = c[2], s.ops.push(y);
|
|
break;
|
|
}
|
|
c[2] && s.ops.pop(), s.trys.pop();
|
|
continue;
|
|
}
|
|
y = r.call(n, s);
|
|
} catch (g) {
|
|
y = [6, g], t = 0;
|
|
} finally {
|
|
e = c = 0;
|
|
}
|
|
if (5 & y[0]) throw y[1];
|
|
return { value: y[0] ? y[1] : void 0, done: !0 };
|
|
})([l, v]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.PasswordStrategy = void 0;
|
|
var o = E(6200), f = E(2672), a = (0, E(9764).createLogger)("PasswordStrategy"), i = (function() {
|
|
function n(r) {
|
|
this.method = "password";
|
|
var e = new o.PasswordEncryptionService();
|
|
this.repository = new f.PasswordCredentialRepository(r, e);
|
|
}
|
|
return Object.defineProperty(n.prototype, "isSupported", { get: function() {
|
|
return !0;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "isUnlocked", { get: function() {
|
|
return this.repository.isUnlocked;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "hasAnyCredentials", { get: function() {
|
|
return this.repository.hasAnyCredentials;
|
|
}, enumerable: !1, configurable: !0 }), n.prototype.unlock = function(r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (r.method !== "password") return [2, !1];
|
|
if (!r.password) return a.error("Password required for unlock"), [2, !1];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.repository.unlock(r)];
|
|
case 2:
|
|
return t.sent(), [2, !0];
|
|
case 3:
|
|
return e = t.sent(), a.error("Unlock failed:", e), [2, !1];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.getCredential = function(r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (!this.isUnlocked) return a.warn("Cannot get credential - not unlocked"), [2, void 0];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.repository.getCredential(r)];
|
|
case 2:
|
|
return [2, t.sent()];
|
|
case 3:
|
|
return e = t.sent(), a.error("Failed to get credential ".concat(r, ":"), e), [2, void 0];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.setCredential = function(r, e) {
|
|
return h(this, void 0, void 0, function() {
|
|
var t;
|
|
return d(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
if (!this.isUnlocked) return a.warn("Cannot set credential - not unlocked"), [2];
|
|
c.label = 1;
|
|
case 1:
|
|
return c.trys.push([1, 3, , 4]), [4, this.repository.setCredential(r, e)];
|
|
case 2:
|
|
return c.sent(), [3, 4];
|
|
case 3:
|
|
throw t = c.sent(), a.error("Failed to set credential ".concat(r, ":"), t), t;
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.clear = function() {
|
|
this.repository.clear();
|
|
}, n;
|
|
})();
|
|
O.PasswordStrategy = i;
|
|
}, 9792(N, O, E) {
|
|
var h = this && this.__awaiter || function(n, r, e, t) {
|
|
return new (e || (e = Promise))(function(c, s) {
|
|
function u(v) {
|
|
try {
|
|
l(t.next(v));
|
|
} catch (y) {
|
|
s(y);
|
|
}
|
|
}
|
|
function p(v) {
|
|
try {
|
|
l(t.throw(v));
|
|
} catch (y) {
|
|
s(y);
|
|
}
|
|
}
|
|
function l(v) {
|
|
var y;
|
|
v.done ? c(v.value) : (y = v.value, y instanceof e ? y : new e(function(g) {
|
|
g(y);
|
|
})).then(u, p);
|
|
}
|
|
l((t = t.apply(n, r || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(n, r) {
|
|
var e, t, c, s = { label: 0, sent: function() {
|
|
if (1 & c[0]) throw c[1];
|
|
return c[1];
|
|
}, trys: [], ops: [] }, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return u.next = p(0), u.throw = p(1), u.return = p(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
return this;
|
|
}), u;
|
|
function p(l) {
|
|
return function(v) {
|
|
return (function(y) {
|
|
if (e) throw new TypeError("Generator is already executing.");
|
|
for (; u && (u = 0, y[0] && (s = 0)), s; ) try {
|
|
if (e = 1, t && (c = 2 & y[0] ? t.return : y[0] ? t.throw || ((c = t.return) && c.call(t), 0) : t.next) && !(c = c.call(t, y[1])).done) return c;
|
|
switch (t = 0, c && (y = [2 & y[0], c.value]), y[0]) {
|
|
case 0:
|
|
case 1:
|
|
c = y;
|
|
break;
|
|
case 4:
|
|
return s.label++, { value: y[1], done: !1 };
|
|
case 5:
|
|
s.label++, t = y[1], y = [0];
|
|
continue;
|
|
case 7:
|
|
y = s.ops.pop(), s.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((c = (c = s.trys).length > 0 && c[c.length - 1]) || y[0] !== 6 && y[0] !== 2)) {
|
|
s = 0;
|
|
continue;
|
|
}
|
|
if (y[0] === 3 && (!c || y[1] > c[0] && y[1] < c[3])) {
|
|
s.label = y[1];
|
|
break;
|
|
}
|
|
if (y[0] === 6 && s.label < c[1]) {
|
|
s.label = c[1], c = y;
|
|
break;
|
|
}
|
|
if (c && s.label < c[2]) {
|
|
s.label = c[2], s.ops.push(y);
|
|
break;
|
|
}
|
|
c[2] && s.ops.pop(), s.trys.pop();
|
|
continue;
|
|
}
|
|
y = r.call(n, s);
|
|
} catch (g) {
|
|
y = [6, g], t = 0;
|
|
} finally {
|
|
e = c = 0;
|
|
}
|
|
if (5 & y[0]) throw y[1];
|
|
return { value: y[0] ? y[1] : void 0, done: !0 };
|
|
})([l, v]);
|
|
};
|
|
}
|
|
}, o = this && this.__importDefault || function(n) {
|
|
return n && n.__esModule ? n : { default: n };
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.SessionCoordinator = void 0;
|
|
var f = o(E(5673)), a = (0, E(9764).createLogger)("SessionCoordinator"), i = (function() {
|
|
function n(r) {
|
|
r && (this.sessionManager = r, this.refreshManager = new f.default(r));
|
|
}
|
|
return Object.defineProperty(n.prototype, "hasActiveSession", { get: function() {
|
|
return !!this.sessionManager && this.sessionManager.hasActiveSession;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "isSessionAvailable", { get: function() {
|
|
return !!this.sessionManager;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "sessionExpiry", { get: function() {
|
|
if (this.sessionManager) {
|
|
var r = this.sessionManager.sessionTimeRemaining;
|
|
return r > 0 ? new Date(Date.now() + r) : void 0;
|
|
}
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "isAutoRefreshActive", { get: function() {
|
|
var r, e;
|
|
return (e = (r = this.refreshManager) === null || r === void 0 ? void 0 : r.isActive()) !== null && e !== void 0 && e;
|
|
}, enumerable: !1, configurable: !0 }), n.prototype.getSessionManager = function() {
|
|
return this.sessionManager;
|
|
}, n.prototype.clearSession = function() {
|
|
this.sessionManager && (this.stopRefreshManager(), this.sessionManager.clearSession(), a.info("Session cleared"));
|
|
}, n.prototype.canAutoRestore = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(r) {
|
|
return this.sessionManager && this.sessionManager.canAutoRestore ? [2, this.sessionManager.hasValidSession()] : [2, !1];
|
|
});
|
|
});
|
|
}, n.prototype.tryAutoRestore = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
var r, e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (!this.sessionManager) return [2, void 0];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.sessionManager.restoreSession()];
|
|
case 2:
|
|
return (r = t.sent()) && this.startRefreshManager(), [2, r];
|
|
case 3:
|
|
return e = t.sent(), a.error("Session auto-restoration error:", e), [2, void 0];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.createSession = function(r) {
|
|
return h(this, void 0, void 0, function() {
|
|
var e;
|
|
return d(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
if (!this.sessionManager) return a.warn("No session manager available - skipping session creation"), [2];
|
|
t.label = 1;
|
|
case 1:
|
|
return t.trys.push([1, 3, , 4]), [4, this.sessionManager.createSession(r)];
|
|
case 2:
|
|
return t.sent(), this.startRefreshManager(), [3, 4];
|
|
case 3:
|
|
throw e = t.sent(), a.error("Failed to create session:", e), e;
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, n.prototype.refreshSession = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(r) {
|
|
return this.sessionManager ? [2, this.sessionManager.refreshSession()] : [2, !1];
|
|
});
|
|
});
|
|
}, n.prototype.getTimeRemaining = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(r) {
|
|
return this.sessionManager ? [2, this.sessionManager.sessionTimeRemaining] : [2, 0];
|
|
});
|
|
});
|
|
}, n.prototype.startRefreshManager = function() {
|
|
var r;
|
|
!((r = this.sessionManager) === null || r === void 0) && r.config.enableActivityRefresh && this.refreshManager && !this.refreshManager.isActive() && (this.refreshManager.start(), a.info("Automatic session refresh started"));
|
|
}, n.prototype.stopRefreshManager = function() {
|
|
this.refreshManager && this.refreshManager.isActive() && (this.refreshManager.stop(), a.info("Automatic session refresh stopped"));
|
|
}, n;
|
|
})();
|
|
O.SessionCoordinator = i;
|
|
}, 3581(N, O, E) {
|
|
var h = this && this.__awaiter || function(a, i, n, r) {
|
|
return new (n || (n = Promise))(function(e, t) {
|
|
function c(p) {
|
|
try {
|
|
u(r.next(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function s(p) {
|
|
try {
|
|
u(r.throw(p));
|
|
} catch (l) {
|
|
t(l);
|
|
}
|
|
}
|
|
function u(p) {
|
|
var l;
|
|
p.done ? e(p.value) : (l = p.value, l instanceof n ? l : new n(function(v) {
|
|
v(l);
|
|
})).then(c, s);
|
|
}
|
|
u((r = r.apply(a, i || [])).next());
|
|
});
|
|
}, d = this && this.__generator || function(a, i) {
|
|
var n, r, e, t = { label: 0, sent: function() {
|
|
if (1 & e[0]) throw e[1];
|
|
return e[1];
|
|
}, trys: [], ops: [] }, c = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return c.next = s(0), c.throw = s(1), c.return = s(2), typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
return this;
|
|
}), c;
|
|
function s(u) {
|
|
return function(p) {
|
|
return (function(l) {
|
|
if (n) throw new TypeError("Generator is already executing.");
|
|
for (; c && (c = 0, l[0] && (t = 0)), t; ) try {
|
|
if (n = 1, r && (e = 2 & l[0] ? r.return : l[0] ? r.throw || ((e = r.return) && e.call(r), 0) : r.next) && !(e = e.call(r, l[1])).done) return e;
|
|
switch (r = 0, e && (l = [2 & l[0], e.value]), l[0]) {
|
|
case 0:
|
|
case 1:
|
|
e = l;
|
|
break;
|
|
case 4:
|
|
return t.label++, { value: l[1], done: !1 };
|
|
case 5:
|
|
t.label++, r = l[1], l = [0];
|
|
continue;
|
|
case 7:
|
|
l = t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((e = (e = t.trys).length > 0 && e[e.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
t = 0;
|
|
continue;
|
|
}
|
|
if (l[0] === 3 && (!e || l[1] > e[0] && l[1] < e[3])) {
|
|
t.label = l[1];
|
|
break;
|
|
}
|
|
if (l[0] === 6 && t.label < e[1]) {
|
|
t.label = e[1], e = l;
|
|
break;
|
|
}
|
|
if (e && t.label < e[2]) {
|
|
t.label = e[2], t.ops.push(l);
|
|
break;
|
|
}
|
|
e[2] && t.ops.pop(), t.trys.pop();
|
|
continue;
|
|
}
|
|
l = i.call(a, t);
|
|
} catch (v) {
|
|
l = [6, v], r = 0;
|
|
} finally {
|
|
n = e = 0;
|
|
}
|
|
if (5 & l[0]) throw l[1];
|
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
})([u, p]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.SessionStrategy = void 0;
|
|
var o = (0, E(9764).createLogger)("SessionStrategy"), f = (function() {
|
|
function a(i) {
|
|
this.sessionManager = i, this.method = "session";
|
|
}
|
|
return Object.defineProperty(a.prototype, "isSupported", { get: function() {
|
|
return !0;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(a.prototype, "isUnlocked", { get: function() {
|
|
return this.sessionManager.hasActiveSession;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(a.prototype, "hasAnyCredentials", { get: function() {
|
|
return this.sessionManager.hasActiveSession;
|
|
}, enumerable: !1, configurable: !0 }), a.prototype.clear = function() {
|
|
this.sessionManager.clearSession();
|
|
}, a.prototype.unlock = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n;
|
|
return d(this, function(r) {
|
|
switch (r.label) {
|
|
case 0:
|
|
if (i.method !== "session") return [2, !1];
|
|
r.label = 1;
|
|
case 1:
|
|
return r.trys.push([1, 3, , 4]), [4, this.sessionManager.restoreSession()];
|
|
case 2:
|
|
return [2, !!r.sent()];
|
|
case 3:
|
|
return n = r.sent(), o.error("Session restore failed:", n), [2, !1];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.canAutoRestore = function() {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(i) {
|
|
switch (i.label) {
|
|
case 0:
|
|
return this.sessionManager.canAutoRestore ? [4, this.sessionManager.hasValidSession()] : [2, !1];
|
|
case 1:
|
|
return [2, i.sent()];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.getCredential = function(i) {
|
|
return h(this, void 0, void 0, function() {
|
|
var n, r;
|
|
return d(this, function(e) {
|
|
switch (e.label) {
|
|
case 0:
|
|
if (!this.isUnlocked) return o.warn("Cannot get credential - no active session"), [2, void 0];
|
|
e.label = 1;
|
|
case 1:
|
|
return e.trys.push([1, 3, , 4]), [4, this.sessionManager.restoreSession()];
|
|
case 2:
|
|
return (n = e.sent()) && i in n ? [2, n[i].toString()] : [2, void 0];
|
|
case 3:
|
|
return r = e.sent(), o.error("Failed to get credential ".concat(i, ":"), r), [2, void 0];
|
|
case 4:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, a.prototype.setCredential = function(i, n) {
|
|
return h(this, void 0, void 0, function() {
|
|
return d(this, function(r) {
|
|
throw o.warn("setCredential(".concat(i, ") not supported - use createSession() instead")), new Error("SessionStrategy does not support direct credential storage");
|
|
});
|
|
});
|
|
}, a;
|
|
})();
|
|
O.SessionStrategy = f;
|
|
}, 8348(N, O, E) {
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.StrategyManager = void 0;
|
|
var h = E(9764), d = E(9389), o = E(8562), f = E(3581), a = (0, h.createLogger)("StrategyManager"), i = (function() {
|
|
function n(r, e) {
|
|
this.strategies = /* @__PURE__ */ new Map(), this.registerStrategies(r, e);
|
|
}
|
|
return Object.defineProperty(n.prototype, "hasAnyCredentials", { get: function() {
|
|
return Array.from(this.strategies.entries()).some(function(r) {
|
|
var e = r[0], t = r[1];
|
|
return e !== "session" && t.hasAnyCredentials;
|
|
});
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "preferredMethod", { get: function() {
|
|
var r, e = this.strategies.get("session");
|
|
if (e?.hasAnyCredentials || e?.isUnlocked) return "session";
|
|
var t = this.strategies.get("passkey");
|
|
if (t?.isSupported && (!((r = t.hasStoredAuthData) === null || r === void 0) && r.call(t))) return "passkey";
|
|
var c = this.strategies.get("password");
|
|
return c?.hasAnyCredentials, "password";
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "supportedMethods", { get: function() {
|
|
var r = [];
|
|
return Array.from(this.strategies.entries()).forEach(function(e) {
|
|
var t = e[0];
|
|
e[1].isSupported && r.push(t);
|
|
}), r;
|
|
}, enumerable: !1, configurable: !0 }), n.prototype.getStrategy = function(r) {
|
|
return this.strategies.get(r);
|
|
}, n.prototype.clearAll = function() {
|
|
this.strategies.forEach(function(r) {
|
|
return r.clear();
|
|
}), a.info("Cleared all strategies");
|
|
}, n.prototype.registerStrategies = function(r, e) {
|
|
var t = r.namespace || "default";
|
|
if (this.strategies.set("password", new o.PasswordStrategy(t)), r.allowPasskeys) {
|
|
var c = r.passkeyDisplayName || "LNC User (".concat(t, ")");
|
|
this.strategies.set("passkey", new d.PasskeyStrategy(t, c));
|
|
}
|
|
e && this.strategies.set("session", new f.SessionStrategy(e)), a.info("Registered strategies: ".concat(Array.from(this.strategies.keys()).join(", ")));
|
|
}, n;
|
|
})();
|
|
O.StrategyManager = i;
|
|
}, 6482(N, O) {
|
|
var E = this && this.__awaiter || function(d, o, f, a) {
|
|
return new (f || (f = Promise))(function(i, n) {
|
|
function r(c) {
|
|
try {
|
|
t(a.next(c));
|
|
} catch (s) {
|
|
n(s);
|
|
}
|
|
}
|
|
function e(c) {
|
|
try {
|
|
t(a.throw(c));
|
|
} catch (s) {
|
|
n(s);
|
|
}
|
|
}
|
|
function t(c) {
|
|
var s;
|
|
c.done ? i(c.value) : (s = c.value, s instanceof f ? s : new f(function(u) {
|
|
u(s);
|
|
})).then(r, e);
|
|
}
|
|
t((a = a.apply(d, o || [])).next());
|
|
});
|
|
}, h = this && this.__generator || function(d, o) {
|
|
var f, a, i, n = { label: 0, sent: function() {
|
|
if (1 & i[0]) throw i[1];
|
|
return i[1];
|
|
}, trys: [], ops: [] }, r = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return r.next = e(0), r.throw = e(1), r.return = e(2), typeof Symbol == "function" && (r[Symbol.iterator] = function() {
|
|
return this;
|
|
}), r;
|
|
function e(t) {
|
|
return function(c) {
|
|
return (function(s) {
|
|
if (f) throw new TypeError("Generator is already executing.");
|
|
for (; r && (r = 0, s[0] && (n = 0)), n; ) try {
|
|
if (f = 1, a && (i = 2 & s[0] ? a.return : s[0] ? a.throw || ((i = a.return) && i.call(a), 0) : a.next) && !(i = i.call(a, s[1])).done) return i;
|
|
switch (a = 0, i && (s = [2 & s[0], i.value]), s[0]) {
|
|
case 0:
|
|
case 1:
|
|
i = s;
|
|
break;
|
|
case 4:
|
|
return n.label++, { value: s[1], done: !1 };
|
|
case 5:
|
|
n.label++, a = s[1], s = [0];
|
|
continue;
|
|
case 7:
|
|
s = n.ops.pop(), n.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((i = (i = n.trys).length > 0 && i[i.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
|
|
n = 0;
|
|
continue;
|
|
}
|
|
if (s[0] === 3 && (!i || s[1] > i[0] && s[1] < i[3])) {
|
|
n.label = s[1];
|
|
break;
|
|
}
|
|
if (s[0] === 6 && n.label < i[1]) {
|
|
n.label = i[1], i = s;
|
|
break;
|
|
}
|
|
if (i && n.label < i[2]) {
|
|
n.label = i[2], n.ops.push(s);
|
|
break;
|
|
}
|
|
i[2] && n.ops.pop(), n.trys.pop();
|
|
continue;
|
|
}
|
|
s = o.call(d, n);
|
|
} catch (u) {
|
|
s = [6, u], a = 0;
|
|
} finally {
|
|
f = i = 0;
|
|
}
|
|
if (5 & s[0]) throw s[1];
|
|
return { value: s[0] ? s[1] : void 0, done: !0 };
|
|
})([t, c]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.waitFor = function(d, o) {
|
|
return E(this, void 0, void 0, function() {
|
|
return h(this, function(f) {
|
|
return [2, new Promise(function(a, i) {
|
|
var n = 0, r = setInterval(function() {
|
|
n++, d() ? (clearInterval(r), a()) : n > 20 && (clearInterval(r), i(new Error(o)));
|
|
}, 500);
|
|
})];
|
|
});
|
|
});
|
|
};
|
|
}, 5820(N, O, E) {
|
|
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
var h = E(5105), d = "lnc-web", o = (function() {
|
|
function f(a, i) {
|
|
this.persisted = { salt: "", cipher: "", serverHost: "", localKey: "", remoteKey: "", pairingPhrase: "" }, this._localKey = "", this._remoteKey = "", this._pairingPhrase = "", this.namespace = "default", a && (this.namespace = a), this._load(), i && (this.password = i);
|
|
}
|
|
return Object.defineProperty(f.prototype, "password", { get: function() {
|
|
return this._password || "";
|
|
}, set: function(a) {
|
|
if (this.persisted.cipher) {
|
|
var i = this.persisted, n = i.cipher, r = i.salt;
|
|
if (!(0, h.verifyTestCipher)(n, a, r)) throw new Error("The password provided is not valid");
|
|
this._password = a, this._pairingPhrase = this._decrypt(this.persisted.pairingPhrase), this._localKey = this._decrypt(this.persisted.localKey), this._remoteKey = this._decrypt(this.persisted.remoteKey);
|
|
} else this._password = a, this.persisted.salt = (0, h.generateSalt)(), this.persisted.cipher = (0, h.createTestCipher)(a, this.persisted.salt), this.pairingPhrase && (this.persisted.pairingPhrase = this._encrypt(this.pairingPhrase)), this.localKey && (this.persisted.localKey = this._encrypt(this.localKey)), this.remoteKey && (this.persisted.remoteKey = this._encrypt(this.remoteKey)), this._save(), this.clear(!0);
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(f.prototype, "serverHost", { get: function() {
|
|
return this.persisted.serverHost;
|
|
}, set: function(a) {
|
|
this.persisted.serverHost = a, this._save();
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(f.prototype, "pairingPhrase", { get: function() {
|
|
return this._pairingPhrase;
|
|
}, set: function(a) {
|
|
this._pairingPhrase = a, this._password && (this.persisted.pairingPhrase = this._encrypt(a), this._save());
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(f.prototype, "localKey", { get: function() {
|
|
return this._localKey;
|
|
}, set: function(a) {
|
|
this._localKey = a, this._password && (this.persisted.localKey = this._encrypt(a), this._save());
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(f.prototype, "remoteKey", { get: function() {
|
|
return this._remoteKey;
|
|
}, set: function(a) {
|
|
this._remoteKey = a, this._password && (this.persisted.remoteKey = this._encrypt(a), this._save());
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(f.prototype, "isPaired", { get: function() {
|
|
return !!this.persisted.remoteKey || !!this.persisted.pairingPhrase;
|
|
}, enumerable: !1, configurable: !0 }), f.prototype.clear = function(a) {
|
|
if (!a) {
|
|
var i = "".concat(d, ":").concat(this.namespace);
|
|
localStorage.removeItem(i), this.persisted = { salt: "", cipher: "", serverHost: this.persisted.serverHost, localKey: "", remoteKey: "", pairingPhrase: "" };
|
|
}
|
|
this._localKey = "", this._remoteKey = "", this._pairingPhrase = "", this._password = void 0;
|
|
}, f.prototype._load = function() {
|
|
if (typeof localStorage < "u") try {
|
|
var a = "".concat(d, ":").concat(this.namespace), i = localStorage.getItem(a);
|
|
if (!i) return;
|
|
this.persisted = JSON.parse(i);
|
|
} catch (r) {
|
|
var n = r.message;
|
|
throw new Error("Failed to load secure data: ".concat(n));
|
|
}
|
|
}, f.prototype._save = function() {
|
|
if (typeof localStorage < "u") {
|
|
var a = "".concat(d, ":").concat(this.namespace);
|
|
localStorage.setItem(a, JSON.stringify(this.persisted));
|
|
}
|
|
}, f.prototype._encrypt = function(a) {
|
|
return a && this._password ? (0, h.encrypt)(a, this._password, this.persisted.salt) : "";
|
|
}, f.prototype._decrypt = function(a) {
|
|
return a && this._password ? (0, h.decrypt)(a, this._password, this.persisted.salt) : "";
|
|
}, f;
|
|
})();
|
|
O.default = o;
|
|
}, 1389(N, O) {
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.arrayBufferToBase64 = function(E) {
|
|
for (var h = new Uint8Array(E), d = "", o = 0; o < h.byteLength; o++) d += String.fromCharCode(h[o]);
|
|
return btoa(d);
|
|
}, O.base64ToArrayBuffer = function(E) {
|
|
for (var h = E.replace(/-/g, "+").replace(/_/g, "/"), d = h.padEnd(h.length + (4 - h.length % 4) % 4, "="), o = atob(d), f = new Uint8Array(o.length), a = 0; a < o.length; a++) f[a] = o.charCodeAt(a);
|
|
return f.buffer;
|
|
}, O.arrayBufferToHex = function(E) {
|
|
return Array.from(new Uint8Array(E)).map(function(h) {
|
|
return h.toString(16).padStart(2, "0");
|
|
}).join("");
|
|
};
|
|
}, 5105(N, O, E) {
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.verifyTestCipher = O.createTestCipher = O.decrypt = O.encrypt = O.generateSalt = void 0;
|
|
var h = E(1396), d = "Irrelevant data for password verification";
|
|
O.generateSalt = function() {
|
|
var o = new Uint8Array(32);
|
|
globalThis.crypto.getRandomValues(o);
|
|
var f = Array.from(o, function(a) {
|
|
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charCodeAt(a % 62);
|
|
});
|
|
return String.fromCharCode.apply(String, f);
|
|
}, O.encrypt = function(o, f, a) {
|
|
return h.AES.encrypt(JSON.stringify(o), f + a).toString();
|
|
}, O.decrypt = function(o, f, a) {
|
|
var i = h.AES.decrypt(o, f + a);
|
|
return JSON.parse(i.toString(h.enc.Utf8));
|
|
}, O.createTestCipher = function(o, f) {
|
|
return (0, O.encrypt)(d, o, f);
|
|
}, O.verifyTestCipher = function(o, f, a) {
|
|
try {
|
|
return (0, O.decrypt)(o, f, a) === d;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
};
|
|
}, 9764(N, O, E) {
|
|
var h = this && this.__spreadArray || function(i, n, r) {
|
|
if (r || arguments.length === 2) for (var e, t = 0, c = n.length; t < c; t++) !e && t in n || (e || (e = Array.prototype.slice.call(n, 0, t)), e[t] = n[t]);
|
|
return i.concat(e || Array.prototype.slice.call(n));
|
|
}, d = this && this.__importDefault || function(i) {
|
|
return i && i.__esModule ? i : { default: i };
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.wasmLog = O.log = O.Logger = O.LogLevel = void 0, O.createLogger = function(i) {
|
|
return a.fromEnv(i);
|
|
};
|
|
var o, f = d(E(7833));
|
|
(function(i) {
|
|
i[i.debug = 1] = "debug", i[i.info = 2] = "info", i[i.warn = 3] = "warn", i[i.error = 4] = "error", i[i.none = 5] = "none";
|
|
})(o || (O.LogLevel = o = {}));
|
|
var a = (function() {
|
|
function i(n, r) {
|
|
var e = this;
|
|
this.debug = function(t) {
|
|
for (var c = [], s = 1; s < arguments.length; s++) c[s - 1] = arguments[s];
|
|
return e._log(o.debug, t, c);
|
|
}, this.info = function(t) {
|
|
for (var c = [], s = 1; s < arguments.length; s++) c[s - 1] = arguments[s];
|
|
return e._log(o.info, t, c);
|
|
}, this.warn = function(t) {
|
|
for (var c = [], s = 1; s < arguments.length; s++) c[s - 1] = arguments[s];
|
|
return e._log(o.warn, t, c);
|
|
}, this.error = function(t) {
|
|
for (var c = [], s = 1; s < arguments.length; s++) c[s - 1] = arguments[s];
|
|
return e._log(o.error, t, c);
|
|
}, this._levelToOutput = n, this._logger = (0, f.default)(r);
|
|
}
|
|
return Object.defineProperty(i.prototype, "level", { get: function() {
|
|
return this._levelToOutput;
|
|
}, enumerable: !1, configurable: !0 }), i.fromEnv = function(n) {
|
|
var r = o.none;
|
|
if (globalThis.localStorage && globalThis.localStorage.getItem("debug")) {
|
|
var e = globalThis.localStorage.getItem("debug-level") || "debug";
|
|
r = o[e];
|
|
}
|
|
return new i(r, n);
|
|
}, i.prototype._log = function(n, r, e) {
|
|
if (!(this._levelToOutput > n)) {
|
|
var t = Object.keys(o).reduce(function(c, s) {
|
|
return n === o[s] ? s : c;
|
|
}, "??");
|
|
this._logger.apply(this, h(["[".concat(t, "] ").concat(r)], e, !1));
|
|
}
|
|
}, i;
|
|
})();
|
|
O.Logger = a, O.log = a.fromEnv("main"), O.wasmLog = a.fromEnv("wasm");
|
|
}, 254(N, O, E) {
|
|
var h = this && this.__assign || function() {
|
|
return h = Object.assign || function(e) {
|
|
for (var t, c = 1, s = arguments.length; c < s; c++) for (var u in t = arguments[c]) Object.prototype.hasOwnProperty.call(t, u) && (e[u] = t[u]);
|
|
return e;
|
|
}, h.apply(this, arguments);
|
|
}, d = this && this.__awaiter || function(e, t, c, s) {
|
|
return new (c || (c = Promise))(function(u, p) {
|
|
function l(g) {
|
|
try {
|
|
y(s.next(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function v(g) {
|
|
try {
|
|
y(s.throw(g));
|
|
} catch (_) {
|
|
p(_);
|
|
}
|
|
}
|
|
function y(g) {
|
|
var _;
|
|
g.done ? u(g.value) : (_ = g.value, _ instanceof c ? _ : new c(function(T) {
|
|
T(_);
|
|
})).then(l, v);
|
|
}
|
|
y((s = s.apply(e, t || [])).next());
|
|
});
|
|
}, o = this && this.__generator || function(e, t) {
|
|
var c, s, u, p = { label: 0, sent: function() {
|
|
if (1 & u[0]) throw u[1];
|
|
return u[1];
|
|
}, trys: [], ops: [] }, l = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
return l.next = v(0), l.throw = v(1), l.return = v(2), typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
return this;
|
|
}), l;
|
|
function v(y) {
|
|
return function(g) {
|
|
return (function(_) {
|
|
if (c) throw new TypeError("Generator is already executing.");
|
|
for (; l && (l = 0, _[0] && (p = 0)), p; ) try {
|
|
if (c = 1, s && (u = 2 & _[0] ? s.return : _[0] ? s.throw || ((u = s.return) && u.call(s), 0) : s.next) && !(u = u.call(s, _[1])).done) return u;
|
|
switch (s = 0, u && (_ = [2 & _[0], u.value]), _[0]) {
|
|
case 0:
|
|
case 1:
|
|
u = _;
|
|
break;
|
|
case 4:
|
|
return p.label++, { value: _[1], done: !1 };
|
|
case 5:
|
|
p.label++, s = _[1], _ = [0];
|
|
continue;
|
|
case 7:
|
|
_ = p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!((u = (u = p.trys).length > 0 && u[u.length - 1]) || _[0] !== 6 && _[0] !== 2)) {
|
|
p = 0;
|
|
continue;
|
|
}
|
|
if (_[0] === 3 && (!u || _[1] > u[0] && _[1] < u[3])) {
|
|
p.label = _[1];
|
|
break;
|
|
}
|
|
if (_[0] === 6 && p.label < u[1]) {
|
|
p.label = u[1], u = _;
|
|
break;
|
|
}
|
|
if (u && p.label < u[2]) {
|
|
p.label = u[2], p.ops.push(_);
|
|
break;
|
|
}
|
|
u[2] && p.ops.pop(), p.trys.pop();
|
|
continue;
|
|
}
|
|
_ = t.call(e, p);
|
|
} catch (T) {
|
|
_ = [6, T], s = 0;
|
|
} finally {
|
|
c = u = 0;
|
|
}
|
|
if (5 & _[0]) throw _[1];
|
|
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
})([y, g]);
|
|
};
|
|
}
|
|
};
|
|
Object.defineProperty(O, "__esModule", { value: !0 }), O.WasmManager = O.lncGlobal = void 0;
|
|
var f = E(3318), a = E(6482), i = E(9764);
|
|
O.lncGlobal = globalThis;
|
|
var n = { wasmClientIsReady: function() {
|
|
return !1;
|
|
}, wasmClientIsConnected: function() {
|
|
return !1;
|
|
}, wasmClientConnectServer: function() {
|
|
throw new Error("WASM client not initialized");
|
|
}, wasmClientDisconnect: function() {
|
|
throw new Error("WASM client not initialized");
|
|
}, wasmClientInvokeRPC: function() {
|
|
throw new Error("WASM client not initialized");
|
|
}, wasmClientHasPerms: function() {
|
|
return !1;
|
|
}, wasmClientIsReadOnly: function() {
|
|
return !1;
|
|
}, wasmClientStatus: function() {
|
|
return "uninitialized";
|
|
}, wasmClientGetExpiry: function() {
|
|
return 0;
|
|
} }, r = (function() {
|
|
function e(t, c, s) {
|
|
this._namespace = t, this._wasmClientCode = c, this._callbacks = s, this.go = new O.lncGlobal.Go();
|
|
}
|
|
return Object.defineProperty(e.prototype, "wasm", { get: function() {
|
|
return O.lncGlobal[this._namespace];
|
|
}, set: function(t) {
|
|
O.lncGlobal[this._namespace] = t;
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "isReady", { get: function() {
|
|
return this.wasm && this.wasm.wasmClientIsReady && this.wasm.wasmClientIsReady();
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "isConnected", { get: function() {
|
|
return this.wasm && this.wasm.wasmClientIsConnected && this.wasm.wasmClientIsConnected();
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "status", { get: function() {
|
|
return this.wasm && this.wasm.wasmClientStatus && this.wasm.wasmClientStatus();
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "expiry", { get: function() {
|
|
return this.wasm && this.wasm.wasmClientGetExpiry && new Date(1e3 * this.wasm.wasmClientGetExpiry());
|
|
}, enumerable: !1, configurable: !0 }), Object.defineProperty(e.prototype, "isReadOnly", { get: function() {
|
|
return this.wasm && this.wasm.wasmClientIsReadOnly && this.wasm.wasmClientIsReadOnly();
|
|
}, enumerable: !1, configurable: !0 }), e.prototype.hasPerms = function(t) {
|
|
return this.wasm && this.wasm.wasmClientHasPerms && this.wasm.wasmClientHasPerms(t);
|
|
}, e.prototype.preload = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
var t;
|
|
return o(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
return this._preloadPromise ? [4, this._preloadPromise] : [3, 2];
|
|
case 1:
|
|
return c.sent(), [2];
|
|
case 2:
|
|
return this._preloadPromise = WebAssembly.instantiateStreaming(fetch(this._wasmClientCode), this.go.importObject), t = this, [4, this._preloadPromise];
|
|
case 3:
|
|
return t.result = c.sent(), i.wasmLog.info("downloaded WASM file"), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.run = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
return o(this, function(t) {
|
|
switch (t.label) {
|
|
case 0:
|
|
return this.isReady ? [3, 2] : [4, this.preload()];
|
|
case 1:
|
|
t.sent(), t.label = 2;
|
|
case 2:
|
|
return typeof this.wasm != "object" && (this.wasm = h({}, n)), this.setupWasmCallbacks(), this.go.argv = ["wasm-client", "--debuglevel=debug,GOBN=info,GRPC=info", "--namespace=" + this._namespace, "--onlocalprivcreate=".concat(this._namespace, ".onLocalPrivCreate"), "--onremotekeyreceive=".concat(this._namespace, ".onRemoteKeyReceive"), "--onauthdata=".concat(this._namespace, ".onAuthData")], this.result ? (this.go.run(this.result.instance), [4, WebAssembly.instantiate(this.result.module, this.go.importObject)]) : [3, 4];
|
|
case 3:
|
|
return t.sent(), [3, 5];
|
|
case 4:
|
|
throw new Error("Can't find WASM instance.");
|
|
case 5:
|
|
return [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.waitTilReady = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
var t = this;
|
|
return o(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
return [4, (0, a.waitFor)(function() {
|
|
return t.isReady;
|
|
}, "Failed to load the WASM client")];
|
|
case 1:
|
|
return c.sent(), i.wasmLog.info("The WASM client is ready"), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.connect = function(t) {
|
|
return d(this, void 0, void 0, function() {
|
|
var c, s, u, p;
|
|
return o(this, function(l) {
|
|
switch (l.label) {
|
|
case 0:
|
|
return this.isConnected ? [2] : this.isReady ? [3, 3] : [4, this.run()];
|
|
case 1:
|
|
return l.sent(), [4, this.waitTilReady()];
|
|
case 2:
|
|
l.sent(), l.label = 3;
|
|
case 3:
|
|
return c = t.pairingPhrase, s = t.localKey, u = t.remoteKey, p = t.serverHost, this.wasm.wasmClientConnectServer(p, !1, c, s ?? "", u ?? ""), typeof window < "u" ? window.addEventListener("unload", this.wasm.wasmClientDisconnect) : i.wasmLog.info("No unload event listener added. window is not available"), [4, this.waitForConnection()];
|
|
case 4:
|
|
return l.sent(), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.disconnect = function() {
|
|
typeof window < "u" && window.removeEventListener("unload", this.wasm.wasmClientDisconnect), this.wasm.wasmClientDisconnect();
|
|
}, e.prototype.request = function(t, c) {
|
|
var s = this;
|
|
return new Promise(function(u, p) {
|
|
i.wasmLog.debug("".concat(t, " request"), c);
|
|
var l = JSON.stringify(c || {});
|
|
s.wasm.wasmClientInvokeRPC(t, l, function(v) {
|
|
try {
|
|
var y = JSON.parse(v), g = (0, f.snakeKeysToCamel)(y);
|
|
i.wasmLog.debug("".concat(t, " response"), g), u(g);
|
|
} catch (_) {
|
|
i.wasmLog.debug("".concat(t, " parser error"), { response: v, error: _ }), p(new Error(v));
|
|
}
|
|
});
|
|
});
|
|
}, e.prototype.subscribe = function(t, c, s, u) {
|
|
i.wasmLog.debug("".concat(t, " request"), c);
|
|
var p = JSON.stringify(c || {});
|
|
this.wasm.wasmClientInvokeRPC(t, p, function(l) {
|
|
try {
|
|
var v = JSON.parse(l), y = (0, f.snakeKeysToCamel)(v);
|
|
i.wasmLog.debug("".concat(t, " response"), y), s && s(y);
|
|
} catch (_) {
|
|
i.wasmLog.debug("".concat(t, " error"), _);
|
|
var g = new Error(l);
|
|
u && u(g);
|
|
}
|
|
});
|
|
}, e.prototype.setupWasmCallbacks = function() {
|
|
var t = this;
|
|
this.wasm.onLocalPrivCreate || (this.wasm.onLocalPrivCreate = function(c) {
|
|
t._callbacks.onLocalKeyCreated(c);
|
|
}), this.wasm.onRemoteKeyReceive || (this.wasm.onRemoteKeyReceive = function(c) {
|
|
t._callbacks.onRemoteKeyReceived(c);
|
|
}), this.wasm.onAuthData || (this.wasm.onAuthData = function(c) {
|
|
i.wasmLog.debug("auth data received: " + c);
|
|
});
|
|
}, e.prototype.waitForConnection = function() {
|
|
return d(this, void 0, void 0, function() {
|
|
var t = this;
|
|
return o(this, function(c) {
|
|
switch (c.label) {
|
|
case 0:
|
|
return [4, (0, a.waitFor)(function() {
|
|
return t.isConnected;
|
|
}, "Failed to connect the WASM client to the proxy server")];
|
|
case 1:
|
|
return c.sent(), i.wasmLog.info("The WASM client is connected to the server"), [2];
|
|
}
|
|
});
|
|
});
|
|
}, e;
|
|
})();
|
|
O.WasmManager = r;
|
|
}, 1135(N) {
|
|
N.exports = function(O) {
|
|
return O && typeof O == "object" && typeof O.copy == "function" && typeof O.fill == "function" && typeof O.readUInt8 == "function";
|
|
};
|
|
}, 9032(N, O, E) {
|
|
var h = E(7244), d = E(8184), o = E(5767), f = E(5680);
|
|
function a(S) {
|
|
return S.call.bind(S);
|
|
}
|
|
var i = typeof BigInt < "u", n = typeof Symbol < "u", r = a(Object.prototype.toString), e = a(Number.prototype.valueOf), t = a(String.prototype.valueOf), c = a(Boolean.prototype.valueOf);
|
|
if (i) var s = a(BigInt.prototype.valueOf);
|
|
if (n) var u = a(Symbol.prototype.valueOf);
|
|
function p(S, M) {
|
|
if (typeof S != "object") return !1;
|
|
try {
|
|
return M(S), !0;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}
|
|
function l(S) {
|
|
return r(S) === "[object Map]";
|
|
}
|
|
function v(S) {
|
|
return r(S) === "[object Set]";
|
|
}
|
|
function y(S) {
|
|
return r(S) === "[object WeakMap]";
|
|
}
|
|
function g(S) {
|
|
return r(S) === "[object WeakSet]";
|
|
}
|
|
function _(S) {
|
|
return r(S) === "[object ArrayBuffer]";
|
|
}
|
|
function T(S) {
|
|
return typeof ArrayBuffer < "u" && (_.working ? _(S) : S instanceof ArrayBuffer);
|
|
}
|
|
function b(S) {
|
|
return r(S) === "[object DataView]";
|
|
}
|
|
function A(S) {
|
|
return typeof DataView < "u" && (b.working ? b(S) : S instanceof DataView);
|
|
}
|
|
O.isArgumentsObject = h, O.isGeneratorFunction = d, O.isTypedArray = f, O.isPromise = function(S) {
|
|
return typeof Promise < "u" && S instanceof Promise || S !== null && typeof S == "object" && typeof S.then == "function" && typeof S.catch == "function";
|
|
}, O.isArrayBufferView = function(S) {
|
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(S) : f(S) || A(S);
|
|
}, O.isUint8Array = function(S) {
|
|
return o(S) === "Uint8Array";
|
|
}, O.isUint8ClampedArray = function(S) {
|
|
return o(S) === "Uint8ClampedArray";
|
|
}, O.isUint16Array = function(S) {
|
|
return o(S) === "Uint16Array";
|
|
}, O.isUint32Array = function(S) {
|
|
return o(S) === "Uint32Array";
|
|
}, O.isInt8Array = function(S) {
|
|
return o(S) === "Int8Array";
|
|
}, O.isInt16Array = function(S) {
|
|
return o(S) === "Int16Array";
|
|
}, O.isInt32Array = function(S) {
|
|
return o(S) === "Int32Array";
|
|
}, O.isFloat32Array = function(S) {
|
|
return o(S) === "Float32Array";
|
|
}, O.isFloat64Array = function(S) {
|
|
return o(S) === "Float64Array";
|
|
}, O.isBigInt64Array = function(S) {
|
|
return o(S) === "BigInt64Array";
|
|
}, O.isBigUint64Array = function(S) {
|
|
return o(S) === "BigUint64Array";
|
|
}, l.working = typeof Map < "u" && l(/* @__PURE__ */ new Map()), O.isMap = function(S) {
|
|
return typeof Map < "u" && (l.working ? l(S) : S instanceof Map);
|
|
}, v.working = typeof Set < "u" && v(/* @__PURE__ */ new Set()), O.isSet = function(S) {
|
|
return typeof Set < "u" && (v.working ? v(S) : S instanceof Set);
|
|
}, y.working = typeof WeakMap < "u" && y(/* @__PURE__ */ new WeakMap()), O.isWeakMap = function(S) {
|
|
return typeof WeakMap < "u" && (y.working ? y(S) : S instanceof WeakMap);
|
|
}, g.working = typeof WeakSet < "u" && g(/* @__PURE__ */ new WeakSet()), O.isWeakSet = function(S) {
|
|
return g(S);
|
|
}, _.working = typeof ArrayBuffer < "u" && _(new ArrayBuffer()), O.isArrayBuffer = T, b.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && b(new DataView(new ArrayBuffer(1), 0, 1)), O.isDataView = A;
|
|
var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
function I(S) {
|
|
return r(S) === "[object SharedArrayBuffer]";
|
|
}
|
|
function P(S) {
|
|
return m !== void 0 && (I.working === void 0 && (I.working = I(new m())), I.working ? I(S) : S instanceof m);
|
|
}
|
|
function x(S) {
|
|
return p(S, e);
|
|
}
|
|
function F(S) {
|
|
return p(S, t);
|
|
}
|
|
function K(S) {
|
|
return p(S, c);
|
|
}
|
|
function Y(S) {
|
|
return i && p(S, s);
|
|
}
|
|
function Q(S) {
|
|
return n && p(S, u);
|
|
}
|
|
O.isSharedArrayBuffer = P, O.isAsyncFunction = function(S) {
|
|
return r(S) === "[object AsyncFunction]";
|
|
}, O.isMapIterator = function(S) {
|
|
return r(S) === "[object Map Iterator]";
|
|
}, O.isSetIterator = function(S) {
|
|
return r(S) === "[object Set Iterator]";
|
|
}, O.isGeneratorObject = function(S) {
|
|
return r(S) === "[object Generator]";
|
|
}, O.isWebAssemblyCompiledModule = function(S) {
|
|
return r(S) === "[object WebAssembly.Module]";
|
|
}, O.isNumberObject = x, O.isStringObject = F, O.isBooleanObject = K, O.isBigIntObject = Y, O.isSymbolObject = Q, O.isBoxedPrimitive = function(S) {
|
|
return x(S) || F(S) || K(S) || Y(S) || Q(S);
|
|
}, O.isAnyArrayBuffer = function(S) {
|
|
return typeof Uint8Array < "u" && (T(S) || P(S));
|
|
}, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(S) {
|
|
Object.defineProperty(O, S, { enumerable: !1, value: function() {
|
|
throw new Error(S + " is not supported in userland");
|
|
} });
|
|
});
|
|
}, 537(N, O, E) {
|
|
var h = E(5606), d = E(6763), o = Object.getOwnPropertyDescriptors || function(S) {
|
|
for (var M = Object.keys(S), j = {}, H = 0; H < M.length; H++) j[M[H]] = Object.getOwnPropertyDescriptor(S, M[H]);
|
|
return j;
|
|
}, f = /%[sdj%]/g;
|
|
O.format = function(S) {
|
|
if (!g(S)) {
|
|
for (var M = [], j = 0; j < arguments.length; j++) M.push(r(arguments[j]));
|
|
return M.join(" ");
|
|
}
|
|
j = 1;
|
|
for (var H = arguments, Z = H.length, L = String(S).replace(f, function(C) {
|
|
if (C === "%%") return "%";
|
|
if (j >= Z) return C;
|
|
switch (C) {
|
|
case "%s":
|
|
return String(H[j++]);
|
|
case "%d":
|
|
return Number(H[j++]);
|
|
case "%j":
|
|
try {
|
|
return JSON.stringify(H[j++]);
|
|
} catch {
|
|
return "[Circular]";
|
|
}
|
|
default:
|
|
return C;
|
|
}
|
|
}), w = H[j]; j < Z; w = H[++j]) v(w) || !b(w) ? L += " " + w : L += " " + r(w);
|
|
return L;
|
|
}, O.deprecate = function(S, M) {
|
|
if (h !== void 0 && h.noDeprecation === !0) return S;
|
|
if (h === void 0) return function() {
|
|
return O.deprecate(S, M).apply(this, arguments);
|
|
};
|
|
var j = !1;
|
|
return function() {
|
|
if (!j) {
|
|
if (h.throwDeprecation) throw new Error(M);
|
|
h.traceDeprecation ? d.trace(M) : d.error(M), j = !0;
|
|
}
|
|
return S.apply(this, arguments);
|
|
};
|
|
};
|
|
var a = {}, i = /^$/;
|
|
if (h.env.NODE_DEBUG) {
|
|
var n = h.env.NODE_DEBUG;
|
|
n = n.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + n + "$", "i");
|
|
}
|
|
function r(S, M) {
|
|
var j = { seen: [], stylize: t };
|
|
return arguments.length >= 3 && (j.depth = arguments[2]), arguments.length >= 4 && (j.colors = arguments[3]), l(M) ? j.showHidden = M : M && O._extend(j, M), _(j.showHidden) && (j.showHidden = !1), _(j.depth) && (j.depth = 2), _(j.colors) && (j.colors = !1), _(j.customInspect) && (j.customInspect = !0), j.colors && (j.stylize = e), c(j, S, j.depth);
|
|
}
|
|
function e(S, M) {
|
|
var j = r.styles[M];
|
|
return j ? "\x1B[" + r.colors[j][0] + "m" + S + "\x1B[" + r.colors[j][1] + "m" : S;
|
|
}
|
|
function t(S, M) {
|
|
return S;
|
|
}
|
|
function c(S, M, j) {
|
|
if (S.customInspect && M && I(M.inspect) && M.inspect !== O.inspect && (!M.constructor || M.constructor.prototype !== M)) {
|
|
var H = M.inspect(j, S);
|
|
return g(H) || (H = c(S, H, j)), H;
|
|
}
|
|
var Z = (function(k, G) {
|
|
if (_(G)) return k.stylize("undefined", "undefined");
|
|
if (g(G)) {
|
|
var V = "'" + JSON.stringify(G).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
return k.stylize(V, "string");
|
|
}
|
|
return y(G) ? k.stylize("" + G, "number") : l(G) ? k.stylize("" + G, "boolean") : v(G) ? k.stylize("null", "null") : void 0;
|
|
})(S, M);
|
|
if (Z) return Z;
|
|
var L = Object.keys(M), w = (function(k) {
|
|
var G = {};
|
|
return k.forEach(function(V, W) {
|
|
G[V] = !0;
|
|
}), G;
|
|
})(L);
|
|
if (S.showHidden && (L = Object.getOwnPropertyNames(M)), m(M) && (L.indexOf("message") >= 0 || L.indexOf("description") >= 0)) return s(M);
|
|
if (L.length === 0) {
|
|
if (I(M)) {
|
|
var C = M.name ? ": " + M.name : "";
|
|
return S.stylize("[Function" + C + "]", "special");
|
|
}
|
|
if (T(M)) return S.stylize(RegExp.prototype.toString.call(M), "regexp");
|
|
if (A(M)) return S.stylize(Date.prototype.toString.call(M), "date");
|
|
if (m(M)) return s(M);
|
|
}
|
|
var R, B = "", D = !1, U = ["{", "}"];
|
|
return p(M) && (D = !0, U = ["[", "]"]), I(M) && (B = " [Function" + (M.name ? ": " + M.name : "") + "]"), T(M) && (B = " " + RegExp.prototype.toString.call(M)), A(M) && (B = " " + Date.prototype.toUTCString.call(M)), m(M) && (B = " " + s(M)), L.length !== 0 || D && M.length != 0 ? j < 0 ? T(M) ? S.stylize(RegExp.prototype.toString.call(M), "regexp") : S.stylize("[Object]", "special") : (S.seen.push(M), R = D ? (function(k, G, V, W, z) {
|
|
for (var q = [], $ = 0, te = G.length; $ < te; ++$) K(G, String($)) ? q.push(u(k, G, V, W, String($), !0)) : q.push("");
|
|
return z.forEach(function(re) {
|
|
re.match(/^\d+$/) || q.push(u(k, G, V, W, re, !0));
|
|
}), q;
|
|
})(S, M, j, w, L) : L.map(function(k) {
|
|
return u(S, M, j, w, k, D);
|
|
}), S.seen.pop(), (function(k, G, V) {
|
|
return k.reduce(function(W, z) {
|
|
return z.indexOf(`
|
|
`), W + z.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
}, 0) > 60 ? V[0] + (G === "" ? "" : G + `
|
|
`) + " " + k.join(`,
|
|
`) + " " + V[1] : V[0] + G + " " + k.join(", ") + " " + V[1];
|
|
})(R, B, U)) : U[0] + B + U[1];
|
|
}
|
|
function s(S) {
|
|
return "[" + Error.prototype.toString.call(S) + "]";
|
|
}
|
|
function u(S, M, j, H, Z, L) {
|
|
var w, C, R;
|
|
if ((R = Object.getOwnPropertyDescriptor(M, Z) || { value: M[Z] }).get ? C = R.set ? S.stylize("[Getter/Setter]", "special") : S.stylize("[Getter]", "special") : R.set && (C = S.stylize("[Setter]", "special")), K(H, Z) || (w = "[" + Z + "]"), C || (S.seen.indexOf(R.value) < 0 ? (C = v(j) ? c(S, R.value, null) : c(S, R.value, j - 1)).indexOf(`
|
|
`) > -1 && (C = L ? C.split(`
|
|
`).map(function(B) {
|
|
return " " + B;
|
|
}).join(`
|
|
`).slice(2) : `
|
|
` + C.split(`
|
|
`).map(function(B) {
|
|
return " " + B;
|
|
}).join(`
|
|
`)) : C = S.stylize("[Circular]", "special")), _(w)) {
|
|
if (L && Z.match(/^\d+$/)) return C;
|
|
(w = JSON.stringify("" + Z)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (w = w.slice(1, -1), w = S.stylize(w, "name")) : (w = w.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), w = S.stylize(w, "string"));
|
|
}
|
|
return w + ": " + C;
|
|
}
|
|
function p(S) {
|
|
return Array.isArray(S);
|
|
}
|
|
function l(S) {
|
|
return typeof S == "boolean";
|
|
}
|
|
function v(S) {
|
|
return S === null;
|
|
}
|
|
function y(S) {
|
|
return typeof S == "number";
|
|
}
|
|
function g(S) {
|
|
return typeof S == "string";
|
|
}
|
|
function _(S) {
|
|
return S === void 0;
|
|
}
|
|
function T(S) {
|
|
return b(S) && P(S) === "[object RegExp]";
|
|
}
|
|
function b(S) {
|
|
return typeof S == "object" && S !== null;
|
|
}
|
|
function A(S) {
|
|
return b(S) && P(S) === "[object Date]";
|
|
}
|
|
function m(S) {
|
|
return b(S) && (P(S) === "[object Error]" || S instanceof Error);
|
|
}
|
|
function I(S) {
|
|
return typeof S == "function";
|
|
}
|
|
function P(S) {
|
|
return Object.prototype.toString.call(S);
|
|
}
|
|
function x(S) {
|
|
return S < 10 ? "0" + S.toString(10) : S.toString(10);
|
|
}
|
|
O.debuglog = function(S) {
|
|
if (S = S.toUpperCase(), !a[S]) if (i.test(S)) {
|
|
var M = h.pid;
|
|
a[S] = function() {
|
|
var j = O.format.apply(O, arguments);
|
|
d.error("%s %d: %s", S, M, j);
|
|
};
|
|
} else a[S] = function() {
|
|
};
|
|
return a[S];
|
|
}, O.inspect = r, r.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, r.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, O.types = E(9032), O.isArray = p, O.isBoolean = l, O.isNull = v, O.isNullOrUndefined = function(S) {
|
|
return S == null;
|
|
}, O.isNumber = y, O.isString = g, O.isSymbol = function(S) {
|
|
return typeof S == "symbol";
|
|
}, O.isUndefined = _, O.isRegExp = T, O.types.isRegExp = T, O.isObject = b, O.isDate = A, O.types.isDate = A, O.isError = m, O.types.isNativeError = m, O.isFunction = I, O.isPrimitive = function(S) {
|
|
return S === null || typeof S == "boolean" || typeof S == "number" || typeof S == "string" || typeof S == "symbol" || S === void 0;
|
|
}, O.isBuffer = E(1135);
|
|
var F = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
function K(S, M) {
|
|
return Object.prototype.hasOwnProperty.call(S, M);
|
|
}
|
|
O.log = function() {
|
|
var S, M;
|
|
d.log("%s - %s", (M = [x((S = /* @__PURE__ */ new Date()).getHours()), x(S.getMinutes()), x(S.getSeconds())].join(":"), [S.getDate(), F[S.getMonth()], M].join(" ")), O.format.apply(O, arguments));
|
|
}, O.inherits = E(6698), O._extend = function(S, M) {
|
|
if (!M || !b(M)) return S;
|
|
for (var j = Object.keys(M), H = j.length; H--; ) S[j[H]] = M[j[H]];
|
|
return S;
|
|
};
|
|
var Y = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
function Q(S, M) {
|
|
if (!S) {
|
|
var j = new Error("Promise was rejected with a falsy value");
|
|
j.reason = S, S = j;
|
|
}
|
|
return M(S);
|
|
}
|
|
O.promisify = function(S) {
|
|
if (typeof S != "function") throw new TypeError('The "original" argument must be of type Function');
|
|
if (Y && S[Y]) {
|
|
var M;
|
|
if (typeof (M = S[Y]) != "function") throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
return Object.defineProperty(M, Y, { value: M, enumerable: !1, writable: !1, configurable: !0 }), M;
|
|
}
|
|
function M() {
|
|
for (var j, H, Z = new Promise(function(C, R) {
|
|
j = C, H = R;
|
|
}), L = [], w = 0; w < arguments.length; w++) L.push(arguments[w]);
|
|
L.push(function(C, R) {
|
|
C ? H(C) : j(R);
|
|
});
|
|
try {
|
|
S.apply(this, L);
|
|
} catch (C) {
|
|
H(C);
|
|
}
|
|
return Z;
|
|
}
|
|
return Object.setPrototypeOf(M, Object.getPrototypeOf(S)), Y && Object.defineProperty(M, Y, { value: M, enumerable: !1, writable: !1, configurable: !0 }), Object.defineProperties(M, o(S));
|
|
}, O.promisify.custom = Y, O.callbackify = function(S) {
|
|
if (typeof S != "function") throw new TypeError('The "original" argument must be of type Function');
|
|
function M() {
|
|
for (var j = [], H = 0; H < arguments.length; H++) j.push(arguments[H]);
|
|
var Z = j.pop();
|
|
if (typeof Z != "function") throw new TypeError("The last argument must be of type Function");
|
|
var L = this, w = function() {
|
|
return Z.apply(L, arguments);
|
|
};
|
|
S.apply(this, j).then(function(C) {
|
|
h.nextTick(w.bind(null, null, C));
|
|
}, function(C) {
|
|
h.nextTick(Q.bind(null, C, w));
|
|
});
|
|
}
|
|
return Object.setPrototypeOf(M, Object.getPrototypeOf(S)), Object.defineProperties(M, o(S)), M;
|
|
};
|
|
}, 5767(N, O, E) {
|
|
var h = E(2682), d = E(9209), o = E(487), f = E(6556), a = E(5795), i = E(3628), n = f("Object.prototype.toString"), r = E(9092)(), e = typeof globalThis > "u" ? E.g : globalThis, t = d(), c = f("String.prototype.slice"), s = f("Array.prototype.indexOf", !0) || function(p, l) {
|
|
for (var v = 0; v < p.length; v += 1) if (p[v] === l) return v;
|
|
return -1;
|
|
}, u = { __proto__: null };
|
|
h(t, r && a && i ? function(p) {
|
|
var l = new e[p]();
|
|
if (Symbol.toStringTag in l && i) {
|
|
var v = i(l), y = a(v, Symbol.toStringTag);
|
|
if (!y && v) {
|
|
var g = i(v);
|
|
y = a(g, Symbol.toStringTag);
|
|
}
|
|
u["$" + p] = o(y.get);
|
|
}
|
|
} : function(p) {
|
|
var l = new e[p](), v = l.slice || l.set;
|
|
v && (u["$" + p] = o(v));
|
|
}), N.exports = function(p) {
|
|
if (!p || typeof p != "object") return !1;
|
|
if (!r) {
|
|
var l = c(n(p), 8, -1);
|
|
return s(t, l) > -1 ? l : l === "Object" && (function(v) {
|
|
var y = !1;
|
|
return h(u, function(g, _) {
|
|
if (!y) try {
|
|
g(v), y = c(_, 1);
|
|
} catch {
|
|
}
|
|
}), y;
|
|
})(p);
|
|
}
|
|
return a ? (function(v) {
|
|
var y = !1;
|
|
return h(u, function(g, _) {
|
|
if (!y) try {
|
|
"$" + g(v) === _ && (y = c(_, 1));
|
|
} catch {
|
|
}
|
|
}), y;
|
|
})(p) : null;
|
|
};
|
|
}, 477() {
|
|
}, 9209(N, O, E) {
|
|
var h = E(6578), d = typeof globalThis > "u" ? E.g : globalThis;
|
|
N.exports = function() {
|
|
for (var o = [], f = 0; f < h.length; f++) typeof d[h[f]] == "function" && (o[o.length] = h[f]);
|
|
return o;
|
|
};
|
|
} }, Ae = {};
|
|
function Ce(N) {
|
|
var O = Ae[N];
|
|
if (O !== void 0) return O.exports;
|
|
var E = Ae[N] = { exports: {} };
|
|
return Ie[N].call(E.exports, E, E.exports, Ce), E.exports;
|
|
}
|
|
return Ce.g = (function() {
|
|
if (typeof globalThis == "object") return globalThis;
|
|
try {
|
|
return this || new Function("return this")();
|
|
} catch {
|
|
if (typeof window == "object") return window;
|
|
}
|
|
})(), Ce(4245);
|
|
})());
|
|
})(Fe)), Fe.exports;
|
|
}
|
|
var Ge = ze();
|
|
const qe = /* @__PURE__ */ Ye(Ge), Qe = /* @__PURE__ */ We({
|
|
__proto__: null,
|
|
default: qe
|
|
}, [Ge]);
|
|
export {
|
|
Qe as i
|
|
};
|