var __defProp = Object.defineProperty; var __getOwnPropNames = Object.getOwnPropertyNames; var __esm = (fn6, res) => function __init() { return fn6 && (res = (0, fn6[__getOwnPropNames(fn6)[0]])(fn6 = 0)), res; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; // var init_define_import_meta_env = __esm({ ""() { } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/utils.mjs?lp=node_modules%252F%2540noble%252Fhashes function l7(t14) { return t14 instanceof Uint8Array || ArrayBuffer.isView(t14) && t14.constructor.name === "Uint8Array"; } function a8(t14, e15 = "") { if (!Number.isSafeInteger(t14) || t14 < 0) { let n24 = e15 && `"${e15}" `; throw new Error(`${n24}expected integer >= 0, got ${t14}`); } } function s5(t14, e15, n24 = "") { let o27 = l7(t14), r19 = t14?.length, i20 = e15 !== void 0; if (!o27 || i20 && r19 !== e15) { let c25 = n24 && `"${n24}" `, u36 = i20 ? ` of length ${e15}` : "", p37 = o27 ? `length=${r19}` : `type=${typeof t14}`; throw new Error(c25 + "expected Uint8Array" + u36 + ", got " + p37); } return t14; } function m7(t14) { if (typeof t14 != "function" || typeof t14.create != "function") throw new Error("Hash must wrapped by utils.createHasher"); a8(t14.outputLen), a8(t14.blockLen); } function E13(t14, e15 = true) { if (t14.destroyed) throw new Error("Hash instance has been destroyed"); if (e15 && t14.finished) throw new Error("Hash#digest() has already been called"); } function U5(t14, e15) { s5(t14, void 0, "digestInto() output"); let n24 = e15.outputLen; if (t14.length < n24) throw new Error('"digestInto() output" expected to be of length >=' + n24); } function H8(...t14) { for (let e15 = 0; e15 < t14.length; e15++) t14[e15].fill(0); } function T10(t14) { return new DataView(t14.buffer, t14.byteOffset, t14.byteLength); } function O6(t14, e15) { return t14 << 32 - e15 | t14 >>> e15; } function I9(t14) { if (s5(t14), g9) return t14.toHex(); let e15 = ""; for (let n24 = 0; n24 < t14.length; n24++) e15 += h5[t14[n24]]; return e15; } function x9(t14) { if (t14 >= f6._0 && t14 <= f6._9) return t14 - f6._0; if (t14 >= f6.A && t14 <= f6.F) return t14 - (f6.A - 10); if (t14 >= f6.a && t14 <= f6.f) return t14 - (f6.a - 10); } function S10(t14) { if (typeof t14 != "string") throw new Error("hex string expected, got " + typeof t14); if (g9) return Uint8Array.fromHex(t14); let e15 = t14.length, n24 = e15 / 2; if (e15 % 2) throw new Error("hex string expected, got unpadded hex of length " + e15); let o27 = new Uint8Array(n24); for (let r19 = 0, i20 = 0; r19 < n24; r19++, i20 += 2) { let c25 = x9(t14.charCodeAt(i20)), u36 = x9(t14.charCodeAt(i20 + 1)); if (c25 === void 0 || u36 === void 0) { let p37 = t14[i20] + t14[i20 + 1]; throw new Error('hex string expected, got non-hex character "' + p37 + '" at index ' + i20); } o27[r19] = c25 * 16 + u36; } return o27; } function D9(...t14) { let e15 = 0; for (let o27 = 0; o27 < t14.length; o27++) { let r19 = t14[o27]; s5(r19), e15 += r19.length; } let n24 = new Uint8Array(e15); for (let o27 = 0, r19 = 0; o27 < t14.length; o27++) { let i20 = t14[o27]; n24.set(i20, r19), r19 += i20.length; } return n24; } function F5(t14, e15 = {}) { let n24 = (r19, i20) => t14(i20).update(r19).digest(), o27 = t14(void 0); return n24.outputLen = o27.outputLen, n24.blockLen = o27.blockLen, n24.create = (r19) => t14(r19), Object.assign(n24, e15), Object.freeze(n24); } function N8(t14 = 32) { let e15 = typeof globalThis == "object" ? globalThis.crypto : null; if (typeof e15?.getRandomValues != "function") throw new Error("crypto.getRandomValues must be defined"); return e15.getRandomValues(new Uint8Array(t14)); } var d7, g9, h5, f6, z10; var init_utils = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/utils.mjs?lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); d7 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68; g9 = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function"; h5 = Array.from({ length: 256 }, (t14, e15) => e15.toString(16).padStart(2, "0")); f6 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 }; z10 = (t14) => ({ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t14]) }); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/utils?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fhashes = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/utils?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_utils(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/_md.mjs?lp=node_modules%252F%2540noble%252Fhashes function w6(c25, t14, s38) { return c25 & t14 ^ ~c25 & s38; } function y11(c25, t14, s38) { return c25 & t14 ^ c25 & s38 ^ t14 & s38; } var d8, A10, I10, m8, _10; var init_md = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/_md.mjs?lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); d8 = class { blockLen; outputLen; padOffset; isLE; buffer; view; finished = false; length = 0; pos = 0; destroyed = false; constructor(t14, s38, n24, i20) { this.blockLen = t14, this.outputLen = s38, this.padOffset = n24, this.isLE = i20, this.buffer = new Uint8Array(t14), this.view = T10(this.buffer); } update(t14) { E13(this), s5(t14); let { view: s38, buffer: n24, blockLen: i20 } = this, f46 = t14.length; for (let e15 = 0; e15 < f46; ) { let r19 = Math.min(i20 - this.pos, f46 - e15); if (r19 === i20) { let h46 = T10(t14); for (; i20 <= f46 - e15; e15 += i20) this.process(h46, e15); continue; } n24.set(t14.subarray(e15, e15 + r19), this.pos), this.pos += r19, e15 += r19, this.pos === i20 && (this.process(s38, 0), this.pos = 0); } return this.length += t14.length, this.roundClean(), this; } digestInto(t14) { E13(this), U5(t14, this), this.finished = true; let { buffer: s38, view: n24, blockLen: i20, isLE: f46 } = this, { pos: e15 } = this; s38[e15++] = 128, H8(this.buffer.subarray(e15)), this.padOffset > i20 - e15 && (this.process(n24, 0), e15 = 0); for (let o27 = e15; o27 < i20; o27++) s38[o27] = 0; n24.setBigUint64(i20 - 8, BigInt(this.length * 8), f46), this.process(n24, 0); let r19 = T10(t14), h46 = this.outputLen; if (h46 % 4) throw new Error("_sha2: outputLen must be aligned to 32bit"); let b45 = h46 / 4, a36 = this.get(); if (b45 > a36.length) throw new Error("_sha2: outputLen bigger than state"); for (let o27 = 0; o27 < b45; o27++) r19.setUint32(4 * o27, a36[o27], f46); } digest() { let { buffer: t14, outputLen: s38 } = this; this.digestInto(t14); let n24 = t14.slice(0, s38); return this.destroy(), n24; } _cloneInto(t14) { t14 ||= new this.constructor(), t14.set(...this.get()); let { blockLen: s38, buffer: n24, length: i20, finished: f46, destroyed: e15, pos: r19 } = this; return t14.destroyed = e15, t14.finished = f46, t14.length = i20, t14.pos = r19, i20 % s38 && t14.buffer.set(n24), t14; } clone() { return this._cloneInto(); } }; A10 = Uint32Array.from([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]); I10 = Uint32Array.from([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]); m8 = Uint32Array.from([3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428]); _10 = Uint32Array.from([1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209]); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/_md?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_md_target_esnext_lp_node_modules_252F_2540noble_252Fhashes = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/_md?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_md(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/_u64.mjs?lp=node_modules%252F%2540noble%252Fhashes function d9(t14, o27 = false) { return o27 ? { h: Number(t14 & l8), l: Number(t14 >> s6 & l8) } : { h: Number(t14 >> s6 & l8) | 0, l: Number(t14 & l8) | 0 }; } function a9(t14, o27 = false) { let n24 = t14.length, r19 = new Uint32Array(n24), c25 = new Uint32Array(n24); for (let e15 = 0; e15 < n24; e15++) { let { h: i20, l: u36 } = d9(t14[e15], o27); [r19[e15], c25[e15]] = [i20, u36]; } return [r19, c25]; } function p9(t14, o27, n24, r19) { let c25 = (o27 >>> 0) + (r19 >>> 0); return { h: t14 + n24 + (c25 / 2 ** 32 | 0) | 0, l: c25 | 0 }; } var l8, s6, f7, h6, H9, L7, g10, S11, U6, w7, x10, y12, K8, M5; var init_u64 = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/_u64.mjs?lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); l8 = BigInt(4294967295); s6 = BigInt(32); f7 = (t14, o27, n24) => t14 >>> n24; h6 = (t14, o27, n24) => t14 << 32 - n24 | o27 >>> n24; H9 = (t14, o27, n24) => t14 >>> n24 | o27 << 32 - n24; L7 = (t14, o27, n24) => t14 << 32 - n24 | o27 >>> n24; g10 = (t14, o27, n24) => t14 << 64 - n24 | o27 >>> n24 - 32; S11 = (t14, o27, n24) => t14 >>> n24 - 32 | o27 << 64 - n24; U6 = (t14, o27, n24) => (t14 >>> 0) + (o27 >>> 0) + (n24 >>> 0); w7 = (t14, o27, n24, r19) => o27 + n24 + r19 + (t14 / 2 ** 32 | 0) | 0; x10 = (t14, o27, n24, r19) => (t14 >>> 0) + (o27 >>> 0) + (n24 >>> 0) + (r19 >>> 0); y12 = (t14, o27, n24, r19, c25) => o27 + n24 + r19 + c25 + (t14 / 2 ** 32 | 0) | 0; K8 = (t14, o27, n24, r19, c25) => (t14 >>> 0) + (o27 >>> 0) + (n24 >>> 0) + (r19 >>> 0) + (c25 >>> 0); M5 = (t14, o27, n24, r19, c25, e15) => o27 + n24 + r19 + c25 + e15 + (t14 / 2 ** 32 | 0) | 0; } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/_u64?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_u64_target_esnext_lp_node_modules_252F_2540noble_252Fhashes = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/_u64?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_u64(); init_u64(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/sha2.mjs?lp=node_modules%252F%2540noble%252Fhashes var a0, I11, N9, P7, Q2, c0, s0, h0, W5, w8, y13, R8, X5, u8, H10, Y6, Z5, f0, r0, o0, l0, n0, i0; var init_sha2 = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/sha2.mjs?lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_md_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); init_u64_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); a0 = Uint32Array.from([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]); I11 = new Uint32Array(64); N9 = class extends d8 { constructor(o27) { super(64, o27, 8, false); } get() { let { A: o27, B: B45, C: t14, D: e15, E: d31, F: f46, G: a36, H: b45 } = this; return [o27, B45, t14, e15, d31, f46, a36, b45]; } set(o27, B45, t14, e15, d31, f46, a36, b45) { this.A = o27 | 0, this.B = B45 | 0, this.C = t14 | 0, this.D = e15 | 0, this.E = d31 | 0, this.F = f46 | 0, this.G = a36 | 0, this.H = b45 | 0; } process(o27, B45) { for (let x50 = 0; x50 < 16; x50++, B45 += 4) I11[x50] = o27.getUint32(B45, false); for (let x50 = 16; x50 < 64; x50++) { let h46 = I11[x50 - 15], r19 = I11[x50 - 2], C39 = O6(h46, 7) ^ O6(h46, 18) ^ h46 >>> 3, p37 = O6(r19, 17) ^ O6(r19, 19) ^ r19 >>> 10; I11[x50] = p37 + I11[x50 - 7] + C39 + I11[x50 - 16] | 0; } let { A: t14, B: e15, C: d31, D: f46, E: a36, F: b45, G: l28, H: A53 } = this; for (let x50 = 0; x50 < 64; x50++) { let h46 = O6(a36, 6) ^ O6(a36, 11) ^ O6(a36, 25), r19 = A53 + h46 + w6(a36, b45, l28) + a0[x50] + I11[x50] | 0, p37 = (O6(t14, 2) ^ O6(t14, 13) ^ O6(t14, 22)) + y11(t14, e15, d31) | 0; A53 = l28, l28 = b45, b45 = a36, a36 = f46 + r19 | 0, f46 = d31, d31 = e15, e15 = t14, t14 = r19 + p37 | 0; } t14 = t14 + this.A | 0, e15 = e15 + this.B | 0, d31 = d31 + this.C | 0, f46 = f46 + this.D | 0, a36 = a36 + this.E | 0, b45 = b45 + this.F | 0, l28 = l28 + this.G | 0, A53 = A53 + this.H | 0, this.set(t14, e15, d31, f46, a36, b45, l28, A53); } roundClean() { H8(I11); } destroy() { this.set(0, 0, 0, 0, 0, 0, 0, 0), H8(this.buffer); } }; P7 = class extends N9 { A = A10[0] | 0; B = A10[1] | 0; C = A10[2] | 0; D = A10[3] | 0; E = A10[4] | 0; F = A10[5] | 0; G = A10[6] | 0; H = A10[7] | 0; constructor() { super(32); } }; Q2 = class extends N9 { A = I10[0] | 0; B = I10[1] | 0; C = I10[2] | 0; D = I10[3] | 0; E = I10[4] | 0; F = I10[5] | 0; G = I10[6] | 0; H = I10[7] | 0; constructor() { super(28); } }; c0 = a9(["0x428a2f98d728ae22", "0x7137449123ef65cd", "0xb5c0fbcfec4d3b2f", "0xe9b5dba58189dbbc", "0x3956c25bf348b538", "0x59f111f1b605d019", "0x923f82a4af194f9b", "0xab1c5ed5da6d8118", "0xd807aa98a3030242", "0x12835b0145706fbe", "0x243185be4ee4b28c", "0x550c7dc3d5ffb4e2", "0x72be5d74f27b896f", "0x80deb1fe3b1696b1", "0x9bdc06a725c71235", "0xc19bf174cf692694", "0xe49b69c19ef14ad2", "0xefbe4786384f25e3", "0x0fc19dc68b8cd5b5", "0x240ca1cc77ac9c65", "0x2de92c6f592b0275", "0x4a7484aa6ea6e483", "0x5cb0a9dcbd41fbd4", "0x76f988da831153b5", "0x983e5152ee66dfab", "0xa831c66d2db43210", "0xb00327c898fb213f", "0xbf597fc7beef0ee4", "0xc6e00bf33da88fc2", "0xd5a79147930aa725", "0x06ca6351e003826f", "0x142929670a0e6e70", "0x27b70a8546d22ffc", "0x2e1b21385c26c926", "0x4d2c6dfc5ac42aed", "0x53380d139d95b3df", "0x650a73548baf63de", "0x766a0abb3c77b2a8", "0x81c2c92e47edaee6", "0x92722c851482353b", "0xa2bfe8a14cf10364", "0xa81a664bbc423001", "0xc24b8b70d0f89791", "0xc76c51a30654be30", "0xd192e819d6ef5218", "0xd69906245565a910", "0xf40e35855771202a", "0x106aa07032bbd1b8", "0x19a4c116b8d2d0c8", "0x1e376c085141ab53", "0x2748774cdf8eeb99", "0x34b0bcb5e19b48a8", "0x391c0cb3c5c95a63", "0x4ed8aa4ae3418acb", "0x5b9cca4f7763e373", "0x682e6ff3d6b2b8a3", "0x748f82ee5defb2fc", "0x78a5636f43172f60", "0x84c87814a1f0ab72", "0x8cc702081a6439ec", "0x90befffa23631e28", "0xa4506cebde82bde9", "0xbef9a3f7b2c67915", "0xc67178f2e372532b", "0xca273eceea26619c", "0xd186b8c721c0c207", "0xeada7dd6cde0eb1e", "0xf57d4f7fee6ed178", "0x06f067aa72176fba", "0x0a637dc5a2c898a6", "0x113f9804bef90dae", "0x1b710b35131c471b", "0x28db77f523047d84", "0x32caab7b40c72493", "0x3c9ebe0a15c9bebc", "0x431d67c49c100d4c", "0x4cc5d4becb3e42b6", "0x597f299cfc657e2a", "0x5fcb6fab3ad6faec", "0x6c44198c4a475817"].map((F40) => BigInt(F40))); s0 = c0[0]; h0 = c0[1]; W5 = new Uint32Array(80); w8 = new Uint32Array(80); y13 = class extends d8 { constructor(o27) { super(128, o27, 16, false); } get() { let { Ah: o27, Al: B45, Bh: t14, Bl: e15, Ch: d31, Cl: f46, Dh: a36, Dl: b45, Eh: l28, El: A53, Fh: x50, Fl: h46, Gh: r19, Gl: C39, Hh: p37, Hl: D54 } = this; return [o27, B45, t14, e15, d31, f46, a36, b45, l28, A53, x50, h46, r19, C39, p37, D54]; } set(o27, B45, t14, e15, d31, f46, a36, b45, l28, A53, x50, h46, r19, C39, p37, D54) { this.Ah = o27 | 0, this.Al = B45 | 0, this.Bh = t14 | 0, this.Bl = e15 | 0, this.Ch = d31 | 0, this.Cl = f46 | 0, this.Dh = a36 | 0, this.Dl = b45 | 0, this.Eh = l28 | 0, this.El = A53 | 0, this.Fh = x50 | 0, this.Fl = h46 | 0, this.Gh = r19 | 0, this.Gl = C39 | 0, this.Hh = p37 | 0, this.Hl = D54 | 0; } process(o27, B45) { for (let s38 = 0; s38 < 16; s38++, B45 += 4) W5[s38] = o27.getUint32(B45), w8[s38] = o27.getUint32(B45 += 4); for (let s38 = 16; s38 < 80; s38++) { let m37 = W5[s38 - 15] | 0, L49 = w8[s38 - 15] | 0, k51 = H9(m37, L49, 1) ^ H9(m37, L49, 8) ^ f7(m37, L49, 7), q53 = L7(m37, L49, 1) ^ L7(m37, L49, 8) ^ h6(m37, L49, 7), G45 = W5[s38 - 2] | 0, S60 = w8[s38 - 2] | 0, K45 = H9(G45, S60, 19) ^ g10(G45, S60, 61) ^ f7(G45, S60, 6), z47 = L7(G45, S60, 19) ^ S11(G45, S60, 61) ^ h6(G45, S60, 6), J35 = x10(q53, z47, w8[s38 - 7], w8[s38 - 16]), O53 = y12(J35, k51, K45, W5[s38 - 7], W5[s38 - 16]); W5[s38] = O53 | 0, w8[s38] = J35 | 0; } let { Ah: t14, Al: e15, Bh: d31, Bl: f46, Ch: a36, Cl: b45, Dh: l28, Dl: A53, Eh: x50, El: h46, Fh: r19, Fl: C39, Gh: p37, Gl: D54, Hh: V34, Hl: _48 } = this; for (let s38 = 0; s38 < 80; s38++) { let m37 = H9(x50, h46, 14) ^ H9(x50, h46, 18) ^ g10(x50, h46, 41), L49 = L7(x50, h46, 14) ^ L7(x50, h46, 18) ^ S11(x50, h46, 41), k51 = x50 & r19 ^ ~x50 & p37, q53 = h46 & C39 ^ ~h46 & D54, G45 = K8(_48, L49, q53, h0[s38], w8[s38]), S60 = M5(G45, V34, m37, k51, s0[s38], W5[s38]), K45 = G45 | 0, z47 = H9(t14, e15, 28) ^ g10(t14, e15, 34) ^ g10(t14, e15, 39), J35 = L7(t14, e15, 28) ^ S11(t14, e15, 34) ^ S11(t14, e15, 39), O53 = t14 & d31 ^ t14 & a36 ^ d31 & a36, x02 = e15 & f46 ^ e15 & b45 ^ f46 & b45; V34 = p37 | 0, _48 = D54 | 0, p37 = r19 | 0, D54 = C39 | 0, r19 = x50 | 0, C39 = h46 | 0, { h: x50, l: h46 } = p9(l28 | 0, A53 | 0, S60 | 0, K45 | 0), l28 = a36 | 0, A53 = b45 | 0, a36 = d31 | 0, b45 = f46 | 0, d31 = t14 | 0, f46 = e15 | 0; let $45 = U6(K45, J35, x02); t14 = w7($45, S60, z47, O53), e15 = $45 | 0; } ({ h: t14, l: e15 } = p9(this.Ah | 0, this.Al | 0, t14 | 0, e15 | 0)), { h: d31, l: f46 } = p9(this.Bh | 0, this.Bl | 0, d31 | 0, f46 | 0), { h: a36, l: b45 } = p9(this.Ch | 0, this.Cl | 0, a36 | 0, b45 | 0), { h: l28, l: A53 } = p9(this.Dh | 0, this.Dl | 0, l28 | 0, A53 | 0), { h: x50, l: h46 } = p9(this.Eh | 0, this.El | 0, x50 | 0, h46 | 0), { h: r19, l: C39 } = p9(this.Fh | 0, this.Fl | 0, r19 | 0, C39 | 0), { h: p37, l: D54 } = p9(this.Gh | 0, this.Gl | 0, p37 | 0, D54 | 0), { h: V34, l: _48 } = p9(this.Hh | 0, this.Hl | 0, V34 | 0, _48 | 0), this.set(t14, e15, d31, f46, a36, b45, l28, A53, x50, h46, r19, C39, p37, D54, V34, _48); } roundClean() { H8(W5, w8); } destroy() { H8(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } }; R8 = class extends y13 { Ah = _10[0] | 0; Al = _10[1] | 0; Bh = _10[2] | 0; Bl = _10[3] | 0; Ch = _10[4] | 0; Cl = _10[5] | 0; Dh = _10[6] | 0; Dl = _10[7] | 0; Eh = _10[8] | 0; El = _10[9] | 0; Fh = _10[10] | 0; Fl = _10[11] | 0; Gh = _10[12] | 0; Gl = _10[13] | 0; Hh = _10[14] | 0; Hl = _10[15] | 0; constructor() { super(64); } }; X5 = class extends y13 { Ah = m8[0] | 0; Al = m8[1] | 0; Bh = m8[2] | 0; Bl = m8[3] | 0; Ch = m8[4] | 0; Cl = m8[5] | 0; Dh = m8[6] | 0; Dl = m8[7] | 0; Eh = m8[8] | 0; El = m8[9] | 0; Fh = m8[10] | 0; Fl = m8[11] | 0; Gh = m8[12] | 0; Gl = m8[13] | 0; Hh = m8[14] | 0; Hl = m8[15] | 0; constructor() { super(48); } }; u8 = Uint32Array.from([2352822216, 424955298, 1944164710, 2312950998, 502970286, 855612546, 1738396948, 1479516111, 258812777, 2077511080, 2011393907, 79989058, 1067287976, 1780299464, 286451373, 2446758561]); H10 = Uint32Array.from([573645204, 4230739756, 2673172387, 3360449730, 596883563, 1867755857, 2520282905, 1497426621, 2519219938, 2827943907, 3193839141, 1401305490, 721525244, 746961066, 246885852, 2177182882]); Y6 = class extends y13 { Ah = u8[0] | 0; Al = u8[1] | 0; Bh = u8[2] | 0; Bl = u8[3] | 0; Ch = u8[4] | 0; Cl = u8[5] | 0; Dh = u8[6] | 0; Dl = u8[7] | 0; Eh = u8[8] | 0; El = u8[9] | 0; Fh = u8[10] | 0; Fl = u8[11] | 0; Gh = u8[12] | 0; Gl = u8[13] | 0; Hh = u8[14] | 0; Hl = u8[15] | 0; constructor() { super(28); } }; Z5 = class extends y13 { Ah = H10[0] | 0; Al = H10[1] | 0; Bh = H10[2] | 0; Bl = H10[3] | 0; Ch = H10[4] | 0; Cl = H10[5] | 0; Dh = H10[6] | 0; Dl = H10[7] | 0; Eh = H10[8] | 0; El = H10[9] | 0; Fh = H10[10] | 0; Fl = H10[11] | 0; Gh = H10[12] | 0; Gl = H10[13] | 0; Hh = H10[14] | 0; Hl = H10[15] | 0; constructor() { super(32); } }; f0 = F5(() => new P7(), z10(1)); r0 = F5(() => new Q2(), z10(4)); o0 = F5(() => new R8(), z10(3)); l0 = F5(() => new X5(), z10(2)); n0 = F5(() => new Z5(), z10(6)); i0 = F5(() => new Y6(), z10(5)); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/sha2.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_sha22 = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/sha2.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_sha2(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/utils.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_utils2 = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/utils.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_utils(); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/esnext/utils.mjs?lp=node_modules%252F%2540noble%252Fcurves function N10(t14, e15 = "") { if (typeof t14 != "boolean") { let r19 = e15 && `"${e15}" `; throw new Error(r19 + "expected boolean, got type=" + typeof t14); } return t14; } function d10(t14) { if (typeof t14 == "bigint") { if (!b8(t14)) throw new Error("positive bigint expected, got " + t14); } else a8(t14); return t14; } function C7(t14, e15 = "") { if (!Number.isSafeInteger(t14)) { let r19 = e15 && `"${e15}" `; throw new Error(r19 + "expected safe integer, got type=" + typeof t14); } } function v9(t14) { let e15 = d10(t14).toString(16); return e15.length & 1 ? "0" + e15 : e15; } function U7(t14) { if (typeof t14 != "string") throw new Error("hex string expected, got " + typeof t14); return t14 === "" ? h7 : BigInt("0x" + t14); } function j10(t14) { return U7(I9(t14)); } function D10(t14) { return U7(I9(S12(s5(t14)).reverse())); } function _11(t14, e15) { a8(e15), t14 = d10(t14); let r19 = S10(t14.toString(16).padStart(e15 * 2, "0")); if (r19.length !== e15) throw new Error("number too large"); return r19; } function M6(t14, e15) { return _11(t14, e15).reverse(); } function S12(t14) { return Uint8Array.from(t14); } function q9(t14) { return Uint8Array.from(t14, (e15, r19) => { let n24 = e15.charCodeAt(0); if (e15.length !== 1 || n24 > 127) throw new Error(`string contains non-ASCII character "${t14[r19]}" with code ${n24} at position ${r19}`); return n24; }); } function H11(t14, e15, r19) { return b8(t14) && b8(e15) && b8(r19) && e15 <= t14 && t14 < r19; } function z11(t14, e15, r19, n24) { if (!H11(e15, r19, n24)) throw new Error("expected valid " + t14 + ": " + r19 + " <= n < " + n24 + ", got " + e15); } function F6(t14) { let e15; for (e15 = 0; t14 > h7; t14 >>= y14, e15 += 1) ; return e15; } function W6(t14, e15, r19) { if (a8(t14, "hashLen"), a8(e15, "qByteLen"), typeof r19 != "function") throw new Error("hmacFn must be a function"); let n24 = (i20) => new Uint8Array(i20), c25 = Uint8Array.of(), s38 = Uint8Array.of(0), u36 = Uint8Array.of(1), p37 = 1e3, o27 = n24(t14), f46 = n24(t14), w44 = 0, m37 = () => { o27.fill(1), f46.fill(0), w44 = 0; }, a36 = (...i20) => r19(f46, D9(o27, ...i20)), B45 = (i20 = c25) => { f46 = a36(s38, i20), o27 = a36(), i20.length !== 0 && (f46 = a36(u36, i20), o27 = a36()); }, A53 = () => { if (w44++ >= p37) throw new Error("drbg: tried max amount of iterations"); let i20 = 0, x50 = []; for (; i20 < e15; ) { o27 = a36(); let g45 = o27.slice(); x50.push(g45), i20 += o27.length; } return D9(...x50); }; return (i20, x50) => { m37(), B45(i20); let g45; for (; !(g45 = x50(A53())); ) B45(); return m37(), g45; }; } function J7(t14, e15 = {}, r19 = {}) { if (!t14 || typeof t14 != "object") throw new Error("expected valid options object"); function n24(s38, u36, p37) { let o27 = t14[s38]; if (p37 && o27 === void 0) return; let f46 = typeof o27; if (f46 !== u36 || o27 === null) throw new Error(`param "${s38}" is invalid: expected ${u36}, got ${f46}`); } let c25 = (s38, u36) => Object.entries(s38).forEach(([p37, o27]) => n24(p37, o27, u36)); c25(e15, false), c25(r19, true); } function Q3(t14) { let e15 = /* @__PURE__ */ new WeakMap(); return (r19, ...n24) => { let c25 = e15.get(r19); if (c25 !== void 0) return c25; let s38 = t14(r19, ...n24); return e15.set(r19, s38), s38; }; } var h7, y14, b8, V3; var init_utils3 = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/esnext/utils.mjs?lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_utils2(); init_utils2(); h7 = BigInt(0); y14 = BigInt(1); b8 = (t14) => typeof t14 == "bigint" && h7 <= t14; V3 = (t14) => (y14 << BigInt(t14)) - y14; } }); // esm:https://esm.sh/*@noble/curves@2.0.1/utils?target=esnext&lp=node_modules%252F%2540noble%252Fcurves var init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fcurves = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/utils?target=esnext&lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_utils3(); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/modular.mjs?lp=node_modules%252F%2540noble%252Fcurves function h8(e15, t14) { let n24 = e15 % t14; return n24 >= f8 ? n24 : t14 + n24; } function tt3(e15, t14, n24) { let r19 = e15; for (; t14-- > f8; ) r19 *= r19, r19 %= n24; return r19; } function O7(e15, t14) { if (e15 === f8) throw new Error("invert: expected non-zero number"); if (t14 <= f8) throw new Error("invert: expected positive modulus, got " + t14); let n24 = h8(e15, t14), r19 = t14, s38 = f8, l28 = d11, u36 = d11, o27 = f8; for (; n24 !== f8; ) { let c25 = r19 / n24, E58 = r19 % n24, w44 = s38 - u36 * c25, g45 = l28 - o27 * c25; r19 = n24, n24 = E58, s38 = u36, l28 = o27, u36 = w44, o27 = g45; } if (r19 !== d11) throw new Error("invert: does not exist"); return h8(s38, t14); } function b9(e15, t14, n24) { if (!e15.eql(e15.sqr(t14), n24)) throw new Error("Cannot find square root"); } function A11(e15, t14) { let n24 = (e15.ORDER + d11) / Y7, r19 = e15.pow(t14, n24); return b9(e15, r19, t14), r19; } function J8(e15, t14) { let n24 = (e15.ORDER - M7) / V4, r19 = e15.mul(t14, a10), s38 = e15.pow(r19, n24), l28 = e15.mul(t14, s38), u36 = e15.mul(e15.mul(l28, a10), s38), o27 = e15.mul(l28, e15.sub(u36, e15.ONE)); return b9(e15, o27, t14), o27; } function K9(e15) { let t14 = _12(e15), n24 = C8(e15), r19 = n24(t14, t14.neg(t14.ONE)), s38 = n24(t14, r19), l28 = n24(t14, t14.neg(r19)), u36 = (e15 + U8) / Z6; return (o27, i20) => { let c25 = o27.pow(i20, u36), E58 = o27.mul(c25, r19), w44 = o27.mul(c25, s38), g45 = o27.mul(c25, l28), m37 = o27.eql(o27.sqr(E58), i20), q53 = o27.eql(o27.sqr(w44), i20); c25 = o27.cmov(c25, E58, m37), E58 = o27.cmov(g45, w44, q53); let v43 = o27.eql(o27.sqr(E58), i20), R49 = o27.cmov(c25, E58, v43); return b9(o27, R49, i20), R49; }; } function C8(e15) { if (e15 < T11) throw new Error("sqrt is not defined for small field"); let t14 = e15 - d11, n24 = 0; for (; t14 % a10 === f8; ) t14 /= a10, n24++; let r19 = a10, s38 = _12(e15); for (; B6(s38, r19) === 1; ) if (r19++ > 1e3) throw new Error("Cannot find square root: probably non-prime P"); if (n24 === 1) return A11; let l28 = s38.pow(r19, t14), u36 = (t14 + d11) / a10; return function(i20, c25) { if (i20.is0(c25)) return c25; if (B6(i20, c25) !== 1) throw new Error("Cannot find square root"); let E58 = n24, w44 = i20.mul(i20.ONE, l28), g45 = i20.pow(c25, t14), m37 = i20.pow(c25, u36); for (; !i20.eql(g45, i20.ONE); ) { if (i20.is0(g45)) return i20.ZERO; let q53 = 1, v43 = i20.sqr(g45); for (; !i20.eql(v43, i20.ONE); ) if (q53++, v43 = i20.sqr(v43), q53 === E58) throw new Error("Cannot find square root"); let R49 = d11 << BigInt(E58 - q53 - 1), L49 = i20.pow(w44, R49); E58 = q53, w44 = i20.sqr(L49), g45 = i20.mul(g45, w44), m37 = i20.mul(m37, L49); } return m37; }; } function W7(e15) { return e15 % Y7 === T11 ? A11 : e15 % V4 === M7 ? J8 : e15 % Z6 === G8 ? K9(e15) : C8(e15); } function nt3(e15) { let t14 = { ORDER: "bigint", BYTES: "number", BITS: "number" }, n24 = X6.reduce((r19, s38) => (r19[s38] = "function", r19), t14); return J7(e15, n24), e15; } function j11(e15, t14, n24) { if (n24 < f8) throw new Error("invalid exponent, negatives unsupported"); if (n24 === f8) return e15.ONE; if (n24 === d11) return t14; let r19 = e15.ONE, s38 = t14; for (; n24 > f8; ) n24 & d11 && (r19 = e15.mul(r19, s38)), s38 = e15.sqr(s38), n24 >>= d11; return r19; } function $7(e15, t14, n24 = false) { let r19 = new Array(t14.length).fill(n24 ? e15.ZERO : void 0), s38 = t14.reduce((u36, o27, i20) => e15.is0(o27) ? u36 : (r19[i20] = u36, e15.mul(u36, o27)), e15.ONE), l28 = e15.inv(s38); return t14.reduceRight((u36, o27, i20) => e15.is0(o27) ? u36 : (r19[i20] = e15.mul(u36, r19[i20]), e15.mul(u36, o27)), l28), r19; } function B6(e15, t14) { let n24 = (e15.ORDER - d11) / a10, r19 = e15.pow(t14, n24), s38 = e15.eql(r19, e15.ONE), l28 = e15.eql(r19, e15.ZERO), u36 = e15.eql(r19, e15.neg(e15.ONE)); if (!s38 && !l28 && !u36) throw new Error("invalid Legendre symbol result"); return s38 ? 1 : l28 ? 0 : -1; } function k14(e15, t14) { t14 !== void 0 && a8(t14); let n24 = t14 !== void 0 ? t14 : e15.toString(2).length, r19 = Math.ceil(n24 / 8); return { nBitLength: n24, nByteLength: r19 }; } function _12(e15, t14 = {}) { return new x11(e15, t14); } function z12(e15) { if (typeof e15 != "bigint") throw new Error("field order must be bigint"); let t14 = e15.toString(2).length; return Math.ceil(t14 / 8); } function p10(e15) { let t14 = z12(e15); return t14 + Math.ceil(t14 / 2); } function lt3(e15, t14, n24 = false) { s5(e15); let r19 = e15.length, s38 = z12(t14), l28 = p10(t14); if (r19 < 16 || r19 < l28 || r19 > 1024) throw new Error("expected " + l28 + "-1024 bytes of input, got " + r19); let u36 = n24 ? D10(e15) : j10(e15), o27 = h8(u36, t14 - d11) + d11; return n24 ? M6(o27, s38) : _11(o27, s38); } var f8, d11, a10, T11, Y7, M7, U8, V4, G8, Z6, X6, x11; var init_modular = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/modular.mjs?lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); f8 = BigInt(0); d11 = BigInt(1); a10 = BigInt(2); T11 = BigInt(3); Y7 = BigInt(4); M7 = BigInt(5); U8 = BigInt(7); V4 = BigInt(8); G8 = BigInt(9); Z6 = BigInt(16); X6 = ["create", "isValid", "is0", "neg", "inv", "sqrt", "sqr", "eql", "add", "sub", "mul", "pow", "div", "addN", "subN", "mulN", "sqrN"]; x11 = class { ORDER; BITS; BYTES; isLE; ZERO = f8; ONE = d11; _lengths; _sqrt; _mod; constructor(t14, n24 = {}) { if (t14 <= f8) throw new Error("invalid field: expected ORDER > 0, got " + t14); let r19; this.isLE = false, n24 != null && typeof n24 == "object" && (typeof n24.BITS == "number" && (r19 = n24.BITS), typeof n24.sqrt == "function" && (this.sqrt = n24.sqrt), typeof n24.isLE == "boolean" && (this.isLE = n24.isLE), n24.allowedLengths && (this._lengths = n24.allowedLengths?.slice()), typeof n24.modFromBytes == "boolean" && (this._mod = n24.modFromBytes)); let { nBitLength: s38, nByteLength: l28 } = k14(t14, r19); if (l28 > 2048) throw new Error("invalid field: expected ORDER of <= 2048 bytes"); this.ORDER = t14, this.BITS = s38, this.BYTES = l28, this._sqrt = void 0, Object.preventExtensions(this); } create(t14) { return h8(t14, this.ORDER); } isValid(t14) { if (typeof t14 != "bigint") throw new Error("invalid field element: expected bigint, got " + typeof t14); return f8 <= t14 && t14 < this.ORDER; } is0(t14) { return t14 === f8; } isValidNot0(t14) { return !this.is0(t14) && this.isValid(t14); } isOdd(t14) { return (t14 & d11) === d11; } neg(t14) { return h8(-t14, this.ORDER); } eql(t14, n24) { return t14 === n24; } sqr(t14) { return h8(t14 * t14, this.ORDER); } add(t14, n24) { return h8(t14 + n24, this.ORDER); } sub(t14, n24) { return h8(t14 - n24, this.ORDER); } mul(t14, n24) { return h8(t14 * n24, this.ORDER); } pow(t14, n24) { return j11(this, t14, n24); } div(t14, n24) { return h8(t14 * O7(n24, this.ORDER), this.ORDER); } sqrN(t14) { return t14 * t14; } addN(t14, n24) { return t14 + n24; } subN(t14, n24) { return t14 - n24; } mulN(t14, n24) { return t14 * n24; } inv(t14) { return O7(t14, this.ORDER); } sqrt(t14) { return this._sqrt || (this._sqrt = W7(this.ORDER)), this._sqrt(this, t14); } toBytes(t14) { return this.isLE ? M6(t14, this.BYTES) : _11(t14, this.BYTES); } fromBytes(t14, n24 = false) { s5(t14); let { _lengths: r19, BYTES: s38, isLE: l28, ORDER: u36, _mod: o27 } = this; if (r19) { if (!r19.includes(t14.length) || t14.length > s38) throw new Error("Field.fromBytes: expected " + r19 + " bytes, got " + t14.length); let c25 = new Uint8Array(s38); c25.set(t14, l28 ? 0 : c25.length - t14.length), t14 = c25; } if (t14.length !== s38) throw new Error("Field.fromBytes: expected " + s38 + " bytes, got " + t14.length); let i20 = l28 ? D10(t14) : j10(t14); if (o27 && (i20 = h8(i20, u36)), !n24 && !this.isValid(i20)) throw new Error("invalid field element: outside of range 0..ORDER"); return i20; } invertBatch(t14) { return $7(this, t14); } cmov(t14, n24, r19) { return r19 ? n24 : t14; } }; } }); // esm:https://esm.sh/*@noble/curves@2.0.1/abstract/modular?target=esnext&lp=node_modules%252F%2540noble%252Fcurves var init_modular_target_esnext_lp_node_modules_252F_2540noble_252Fcurves = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/abstract/modular?target=esnext&lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_modular(); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/curve.mjs?lp=node_modules%252F%2540noble%252Fcurves function B7(r19, t14) { let e15 = t14.negate(); return r19 ? e15 : t14; } function $8(r19, t14) { let e15 = $7(r19.Fp, t14.map((n24) => n24.Z)); return t14.map((n24, o27) => r19.fromAffine(n24.toAffine(e15[o27]))); } function y15(r19, t14) { if (!Number.isSafeInteger(r19) || r19 <= 0 || r19 > t14) throw new Error("invalid window size, expected [1.." + t14 + "], got W=" + r19); } function E14(r19, t14) { y15(r19, t14); let e15 = Math.ceil(t14 / r19) + 1, n24 = 2 ** (r19 - 1), o27 = 2 ** r19, s38 = V3(r19), i20 = BigInt(r19); return { windows: e15, windowSize: n24, mask: s38, maxNumber: o27, shiftBy: i20 }; } function Z7(r19, t14, e15) { let { windowSize: n24, mask: o27, maxNumber: s38, shiftBy: i20 } = e15, f46 = Number(r19 & o27), a36 = r19 >> i20; f46 > n24 && (f46 -= s38, a36 += p11); let c25 = t14 * n24, l28 = c25 + Math.abs(f46) - 1, d31 = f46 === 0, h46 = f46 < 0, u36 = t14 % 2 !== 0; return { nextN: a36, offset: l28, isZero: d31, isNeg: h46, isNegF: u36, offsetF: c25 }; } function N11(r19) { return R9.get(r19) || 1; } function v10(r19) { if (r19 !== g11) throw new Error("invalid wNAF"); } function D11(r19, t14, e15, n24) { let o27 = t14, s38 = r19.ZERO, i20 = r19.ZERO; for (; e15 > g11 || n24 > g11; ) e15 & p11 && (s38 = s38.add(o27)), n24 & p11 && (i20 = i20.add(o27)), o27 = o27.double(), e15 >>= p11, n24 >>= p11; return { p1: s38, p2: i20 }; } function O8(r19, t14, e15) { if (t14) { if (t14.ORDER !== r19) throw new Error("Field.ORDER must match order: Fp == p, Fn == n"); return nt3(t14), t14; } else return _12(r19, { isLE: e15 }); } function P8(r19, t14, e15 = {}, n24) { if (n24 === void 0 && (n24 = r19 === "edwards"), !t14 || typeof t14 != "object") throw new Error(`expected valid ${r19} CURVE object`); for (let a36 of ["p", "n", "h"]) { let c25 = t14[a36]; if (!(typeof c25 == "bigint" && c25 > g11)) throw new Error(`CURVE.${a36} must be positive bigint`); } let o27 = O8(t14.p, e15.Fp, n24), s38 = O8(t14.n, e15.Fn, n24), f46 = ["Gx", "Gy", "a", r19 === "weierstrass" ? "b" : "d"]; for (let a36 of f46) if (!o27.isValid(t14[a36])) throw new Error(`CURVE.${a36} must be valid field element of CURVE.Fp`); return t14 = Object.freeze(Object.assign({}, t14)), { CURVE: t14, Fp: o27, Fn: s38 }; } function W8(r19, t14) { return function(n24) { let o27 = r19(n24); return { secretKey: o27, publicKey: t14(o27) }; }; } var g11, p11, F7, R9, M8; var init_curve = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/curve.mjs?lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_modular_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); g11 = BigInt(0); p11 = BigInt(1); F7 = /* @__PURE__ */ new WeakMap(); R9 = /* @__PURE__ */ new WeakMap(); M8 = class { BASE; ZERO; Fn; bits; constructor(t14, e15) { this.BASE = t14.BASE, this.ZERO = t14.ZERO, this.Fn = t14.Fn, this.bits = e15; } _unsafeLadder(t14, e15, n24 = this.ZERO) { let o27 = t14; for (; e15 > g11; ) e15 & p11 && (n24 = n24.add(o27)), o27 = o27.double(), e15 >>= p11; return n24; } precomputeWindow(t14, e15) { let { windows: n24, windowSize: o27 } = E14(e15, this.bits), s38 = [], i20 = t14, f46 = i20; for (let a36 = 0; a36 < n24; a36++) { f46 = i20, s38.push(f46); for (let c25 = 1; c25 < o27; c25++) f46 = f46.add(i20), s38.push(f46); i20 = f46.double(); } return s38; } wNAF(t14, e15, n24) { if (!this.Fn.isValid(n24)) throw new Error("invalid scalar"); let o27 = this.ZERO, s38 = this.BASE, i20 = E14(t14, this.bits); for (let f46 = 0; f46 < i20.windows; f46++) { let { nextN: a36, offset: c25, isZero: l28, isNeg: d31, isNegF: h46, offsetF: u36 } = Z7(n24, f46, i20); n24 = a36, l28 ? s38 = s38.add(B7(h46, e15[u36])) : o27 = o27.add(B7(d31, e15[c25])); } return v10(n24), { p: o27, f: s38 }; } wNAFUnsafe(t14, e15, n24, o27 = this.ZERO) { let s38 = E14(t14, this.bits); for (let i20 = 0; i20 < s38.windows && n24 !== g11; i20++) { let { nextN: f46, offset: a36, isZero: c25, isNeg: l28 } = Z7(n24, i20, s38); if (n24 = f46, !c25) { let d31 = e15[a36]; o27 = o27.add(l28 ? d31.negate() : d31); } } return v10(n24), o27; } getPrecomputes(t14, e15, n24) { let o27 = F7.get(e15); return o27 || (o27 = this.precomputeWindow(e15, t14), t14 !== 1 && (typeof n24 == "function" && (o27 = n24(o27)), F7.set(e15, o27))), o27; } cached(t14, e15, n24) { let o27 = N11(t14); return this.wNAF(o27, this.getPrecomputes(o27, t14, n24), e15); } unsafe(t14, e15, n24, o27) { let s38 = N11(t14); return s38 === 1 ? this._unsafeLadder(t14, e15, o27) : this.wNAFUnsafe(s38, this.getPrecomputes(s38, t14, n24), e15, o27); } createCache(t14, e15) { y15(e15, this.bits), R9.set(t14, e15), F7.delete(t14); } hasCache(t14) { return N11(t14) !== 1; } }; } }); // esm:https://esm.sh/*@noble/curves@2.0.1/abstract/curve?target=esnext&lp=node_modules%252F%2540noble%252Fcurves var init_curve_target_esnext_lp_node_modules_252F_2540noble_252Fcurves = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/abstract/curve?target=esnext&lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_curve(); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/hash-to-curve.mjs?lp=node_modules%252F%2540noble%252Fcurves function d12(r19, t14) { if (C7(r19), C7(t14), r19 < 0 || r19 >= 1 << 8 * t14) throw new Error("invalid I2OSP input: " + r19); let n24 = Array.from({ length: t14 }).fill(0); for (let e15 = t14 - 1; e15 >= 0; e15--) n24[e15] = r19 & 255, r19 >>>= 8; return new Uint8Array(n24); } function M9(r19, t14) { let n24 = new Uint8Array(r19.length); for (let e15 = 0; e15 < r19.length; e15++) n24[e15] = r19[e15] ^ t14[e15]; return n24; } function O9(r19) { if (!l7(r19) && typeof r19 != "string") throw new Error("DST must be Uint8Array or ascii string"); return typeof r19 == "string" ? q9(r19) : r19; } function U9(r19, t14, n24, e15) { s5(r19), C7(n24), t14 = O9(t14), t14.length > 255 && (t14 = e15(D9(q9("H2C-OVERSIZE-DST-"), t14))); let { outputLen: i20, blockLen: o27 } = e15, s38 = Math.ceil(n24 / i20); if (n24 > 65535 || s38 > 255) throw new Error("expand_message_xmd: invalid lenInBytes"); let c25 = D9(t14, d12(t14.length, 1)), f46 = d12(0, o27), p37 = d12(n24, 2), a36 = new Array(s38), m37 = e15(D9(f46, r19, p37, d12(0, 1), c25)); a36[0] = e15(D9(m37, d12(1, 1), c25)); for (let u36 = 1; u36 <= s38; u36++) { let b45 = [M9(m37, a36[u36 - 1]), d12(u36 + 1, 1), c25]; a36[u36] = e15(D9(...b45)); } return D9(...a36).slice(0, n24); } function V5(r19, t14, n24, e15, i20) { if (s5(r19), C7(n24), t14 = O9(t14), t14.length > 255) { let o27 = Math.ceil(2 * e15 / 8); t14 = i20.create({ dkLen: o27 }).update(q9("H2C-OVERSIZE-DST-")).update(t14).digest(); } if (n24 > 65535 || t14.length > 255) throw new Error("expand_message_xof: invalid lenInBytes"); return i20.create({ dkLen: n24 }).update(r19).update(d12(n24, 2)).update(t14).update(d12(t14.length, 1)).digest(); } function g12(r19, t14, n24) { J7(n24, { p: "bigint", m: "number", k: "number", hash: "function" }); let { p: e15, k: i20, m: o27, hash: s38, expand: c25, DST: f46 } = n24; C7(s38.outputLen, "valid hash"), s5(r19), C7(t14); let p37 = e15.toString(2).length, a36 = Math.ceil((p37 + i20) / 8), m37 = t14 * o27 * a36, _48; if (c25 === "xmd") _48 = U9(r19, f46, m37, s38); else if (c25 === "xof") _48 = V5(r19, f46, m37, i20, s38); else if (c25 === "_internal_pass") _48 = r19; else throw new Error('expand must be "xmd" or "xof"'); let u36 = new Array(t14); for (let b45 = 0; b45 < t14; b45++) { let E58 = new Array(o27); for (let y53 = 0; y53 < o27; y53++) { let A53 = a36 * (y53 + b45 * o27), v43 = _48.subarray(A53, A53 + a36); E58[y53] = h8(Z8(v43), e15); } u36[b45] = E58; } return u36; } function z13(r19, t14) { let n24 = t14.map((e15) => Array.from(e15).reverse()); return (e15, i20) => { let [o27, s38, c25, f46] = n24.map((m37) => m37.reduce((_48, u36) => r19.add(r19.mul(_48, e15), u36))), [p37, a36] = $7(r19, [s38, f46], true); return e15 = r19.mul(o27, p37), i20 = r19.mul(i20, r19.mul(c25, a36)), { x: e15, y: i20 }; }; } function T12(r19, t14, n24) { if (typeof t14 != "function") throw new Error("mapToCurve() must be defined"); function e15(o27) { return r19.fromAffine(t14(o27)); } function i20(o27) { let s38 = o27.clearCofactor(); return s38.equals(r19.ZERO) ? r19.ZERO : (s38.assertValidity(), s38); } return { defaults: Object.freeze(n24), Point: r19, hashToCurve(o27, s38) { let c25 = Object.assign({}, n24, s38), f46 = g12(o27, 2, c25), p37 = e15(f46[0]), a36 = e15(f46[1]); return i20(p37.add(a36)); }, encodeToCurve(o27, s38) { let c25 = n24.encodeDST ? { DST: n24.encodeDST } : {}, f46 = Object.assign({}, n24, c25, s38), p37 = g12(o27, 1, f46), a36 = e15(p37[0]); return i20(a36); }, mapToCurve(o27) { if (n24.m === 1) { if (typeof o27 != "bigint") throw new Error("expected bigint (m=1)"); return i20(e15([o27])); } if (!Array.isArray(o27)) throw new Error("expected array of bigints"); for (let s38 of o27) if (typeof s38 != "bigint") throw new Error("expected array of bigints"); return i20(e15(o27)); }, hashToScalar(o27, s38) { let c25 = r19.Fn.ORDER, f46 = Object.assign({}, n24, { p: c25, m: 1, DST: F8 }, s38); return g12(o27, 1, f46)[0][0]; } }; } var Z8, F8; var init_hash_to_curve = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/hash-to-curve.mjs?lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_modular_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); Z8 = j10; F8 = q9("HashToScalar-"); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/abstract/hash-to-curve?target=esnext&lp=node_modules%252F%2540noble%252Fcurves var init_hash_to_curve_target_esnext_lp_node_modules_252F_2540noble_252Fcurves = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/abstract/hash-to-curve?target=esnext&lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_hash_to_curve(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/hmac.mjs?lp=node_modules%252F%2540noble%252Fhashes var o8, p12; var init_hmac = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/hmac.mjs?lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); o8 = class { oHash; iHash; blockLen; outputLen; finished = false; destroyed = false; constructor(t14, i20) { if (m7(t14), s5(i20, void 0, "key"), this.iHash = t14.create(), typeof this.iHash.update != "function") throw new Error("Expected instance of class which extends utils.Hash"); this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen; let h46 = this.blockLen, e15 = new Uint8Array(h46); e15.set(i20.length > h46 ? t14.create().update(i20).digest() : i20); for (let s38 = 0; s38 < e15.length; s38++) e15[s38] ^= 54; this.iHash.update(e15), this.oHash = t14.create(); for (let s38 = 0; s38 < e15.length; s38++) e15[s38] ^= 106; this.oHash.update(e15), H8(e15); } update(t14) { return E13(this), this.iHash.update(t14), this; } digestInto(t14) { E13(this), s5(t14, this.outputLen, "output"), this.finished = true, this.iHash.digestInto(t14), this.oHash.update(t14), this.oHash.digestInto(t14), this.destroy(); } digest() { let t14 = new Uint8Array(this.oHash.outputLen); return this.digestInto(t14), t14; } _cloneInto(t14) { t14 ||= Object.create(Object.getPrototypeOf(this), {}); let { oHash: i20, iHash: h46, finished: e15, destroyed: s38, blockLen: d31, outputLen: c25 } = this; return t14 = t14, t14.finished = e15, t14.destroyed = s38, t14.blockLen = d31, t14.outputLen = c25, t14.oHash = i20._cloneInto(t14.oHash), t14.iHash = h46._cloneInto(t14.iHash), t14; } clone() { return this._cloneInto(); } destroy() { this.destroyed = true, this.oHash.destroy(), this.iHash.destroy(); } }; p12 = (n24, t14, i20) => new o8(n24, t14).update(i20).digest(); p12.create = (n24, t14) => new o8(n24, t14); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/hmac.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_hmac2 = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/hmac.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_hmac(); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/weierstrass.mjs?lp=node_modules%252F%2540noble%252Fcurves function _t2(e15, i20, s38) { let [[t14, g45], [v43, u36]] = i20, S60 = mt2(u36 * e15, s38), h46 = mt2(-g45 * e15, s38), R49 = e15 - S60 * t14 - h46 * v43, q53 = -S60 * g45 - h46 * u36, C39 = R49 < M10, H43 = q53 < M10; C39 && (R49 = -R49), H43 && (q53 = -q53); let E58 = V3(Math.ceil(F6(s38) / 2)) + K10; if (R49 < M10 || R49 >= E58 || q53 < M10 || q53 >= E58) throw new Error("splitScalar (endomorphism): failed, k=" + e15); return { k1neg: C39, k1: R49, k2neg: H43, k2: q53 }; } function st3(e15) { if (!["compact", "recovered", "der"].includes(e15)) throw new Error('Signature format must be "compact", "recovered", or "der"'); return e15; } function rt3(e15, i20) { let s38 = {}; for (let t14 of Object.keys(i20)) s38[t14] = e15[t14] === void 0 ? i20[t14] : e15[t14]; return N10(s38.lowS, "lowS"), N10(s38.prehash, "prehash"), s38.format !== void 0 && st3(s38.format), s38; } function Dt(e15, i20 = {}) { let s38 = P8("weierstrass", e15, i20), { Fp: t14, Fn: g45 } = s38, v43 = s38.CURVE, { h: u36, n: S60 } = v43; J7(i20, {}, { allowInfinityPoint: "boolean", clearCofactor: "function", isTorsionFree: "function", fromBytes: "function", toBytes: "function", endo: "object" }); let { endo: h46 } = i20; if (h46 && (!t14.is0(v43.a) || typeof h46.beta != "bigint" || !Array.isArray(h46.basises))) throw new Error('invalid endo: expected "beta": bigint and "basises": array'); let R49 = Bt(t14, g45); function q53() { if (!t14.isOdd) throw new Error("compression is not supported: Field does not have .isOdd()"); } function C39(x50, o27, r19) { let { x: n24, y: c25 } = o27.toAffine(), a36 = t14.toBytes(n24); if (N10(r19, "isCompressed"), r19) { q53(); let f46 = !t14.isOdd(c25); return D9(bt3(f46), a36); } else return D9(Uint8Array.of(4), a36, t14.toBytes(c25)); } function H43(x50) { s5(x50, void 0, "Point"); let { publicKey: o27, publicKeyUncompressed: r19 } = R49, n24 = x50.length, c25 = x50[0], a36 = x50.subarray(1); if (n24 === o27 && (c25 === 2 || c25 === 3)) { let f46 = t14.fromBytes(a36); if (!t14.isValid(f46)) throw new Error("bad point: is not on curve, wrong x"); let d31 = N56(f46), l28; try { l28 = t14.sqrt(d31); } catch (_48) { let V34 = _48 instanceof Error ? ": " + _48.message : ""; throw new Error("bad point: is not on curve, sqrt error" + V34); } q53(); let m37 = t14.isOdd(l28); return (c25 & 1) === 1 !== m37 && (l28 = t14.neg(l28)), { x: f46, y: l28 }; } else if (n24 === r19 && c25 === 4) { let f46 = t14.BYTES, d31 = t14.fromBytes(a36.subarray(0, f46)), l28 = t14.fromBytes(a36.subarray(f46, f46 * 2)); if (!Z39(d31, l28)) throw new Error("bad point: is not on curve"); return { x: d31, y: l28 }; } else throw new Error(`bad point: got length ${n24}, expected compressed=${o27} or uncompressed=${r19}`); } let E58 = i20.toBytes || C39, y53 = i20.fromBytes || H43; function N56(x50) { let o27 = t14.sqr(x50), r19 = t14.mul(o27, x50); return t14.add(t14.add(r19, t14.mul(x50, v43.a)), v43.b); } function Z39(x50, o27) { let r19 = t14.sqr(o27), n24 = N56(x50); return t14.eql(r19, n24); } if (!Z39(v43.Gx, v43.Gy)) throw new Error("bad curve params: generator point"); let p37 = t14.mul(t14.pow(v43.a, P9), ct3), A53 = t14.mul(t14.sqr(v43.b), BigInt(27)); if (t14.is0(t14.add(p37, A53))) throw new Error("bad curve params: a or b"); function T53(x50, o27, r19 = false) { if (!t14.isValid(o27) || r19 && t14.is0(o27)) throw new Error(`bad point coordinate ${x50}`); return o27; } function O53(x50) { if (!(x50 instanceof B45)) throw new Error("Weierstrass Point expected"); } function I50(x50) { if (!h46 || !h46.basises) throw new Error("no endo"); return _t2(x50, h46.basises, g45.ORDER); } let D54 = Q3((x50, o27) => { let { X: r19, Y: n24, Z: c25 } = x50; if (t14.eql(c25, t14.ONE)) return { x: r19, y: n24 }; let a36 = x50.is0(); o27 == null && (o27 = a36 ? t14.ONE : t14.inv(c25)); let f46 = t14.mul(r19, o27), d31 = t14.mul(n24, o27), l28 = t14.mul(c25, o27); if (a36) return { x: t14.ZERO, y: t14.ZERO }; if (!t14.eql(l28, t14.ONE)) throw new Error("invZ was invalid"); return { x: f46, y: d31 }; }), z47 = Q3((x50) => { if (x50.is0()) { if (i20.allowInfinityPoint && !t14.is0(x50.Y)) return; throw new Error("bad point: ZERO"); } let { x: o27, y: r19 } = x50.toAffine(); if (!t14.isValid(o27) || !t14.isValid(r19)) throw new Error("bad point: x or y not field elements"); if (!Z39(o27, r19)) throw new Error("bad point: equation left != right"); if (!x50.isTorsionFree()) throw new Error("bad point: not in prime-order subgroup"); return true; }); function j55(x50, o27, r19, n24, c25) { return r19 = new B45(t14.mul(r19.X, x50), r19.Y, r19.Z), o27 = B7(n24, o27), r19 = B7(c25, r19), o27.add(r19); } class B45 { static BASE = new B45(v43.Gx, v43.Gy, t14.ONE); static ZERO = new B45(t14.ZERO, t14.ONE, t14.ZERO); static Fp = t14; static Fn = g45; X; Y; Z; constructor(o27, r19, n24) { this.X = T53("x", o27), this.Y = T53("y", r19, true), this.Z = T53("z", n24), Object.freeze(this); } static CURVE() { return v43; } static fromAffine(o27) { let { x: r19, y: n24 } = o27 || {}; if (!o27 || !t14.isValid(r19) || !t14.isValid(n24)) throw new Error("invalid affine point"); if (o27 instanceof B45) throw new Error("projective point not allowed"); return t14.is0(r19) && t14.is0(n24) ? B45.ZERO : new B45(r19, n24, t14.ONE); } static fromBytes(o27) { let r19 = B45.fromAffine(y53(s5(o27, void 0, "point"))); return r19.assertValidity(), r19; } static fromHex(o27) { return B45.fromBytes(S10(o27)); } get x() { return this.toAffine().x; } get y() { return this.toAffine().y; } precompute(o27 = 8, r19 = true) { return Q38.createCache(this, o27), r19 || this.multiply(P9), this; } assertValidity() { z47(this); } hasEvenY() { let { y: o27 } = this.toAffine(); if (!t14.isOdd) throw new Error("Field doesn't support isOdd"); return !t14.isOdd(o27); } equals(o27) { O53(o27); let { X: r19, Y: n24, Z: c25 } = this, { X: a36, Y: f46, Z: d31 } = o27, l28 = t14.eql(t14.mul(r19, d31), t14.mul(a36, c25)), m37 = t14.eql(t14.mul(n24, d31), t14.mul(f46, c25)); return l28 && m37; } negate() { return new B45(this.X, t14.neg(this.Y), this.Z); } double() { let { a: o27, b: r19 } = v43, n24 = t14.mul(r19, P9), { X: c25, Y: a36, Z: f46 } = this, d31 = t14.ZERO, l28 = t14.ZERO, m37 = t14.ZERO, w44 = t14.mul(c25, c25), _48 = t14.mul(a36, a36), V34 = t14.mul(f46, f46), b45 = t14.mul(c25, a36); return b45 = t14.add(b45, b45), m37 = t14.mul(c25, f46), m37 = t14.add(m37, m37), d31 = t14.mul(o27, m37), l28 = t14.mul(n24, V34), l28 = t14.add(d31, l28), d31 = t14.sub(_48, l28), l28 = t14.add(_48, l28), l28 = t14.mul(d31, l28), d31 = t14.mul(b45, d31), m37 = t14.mul(n24, m37), V34 = t14.mul(o27, V34), b45 = t14.sub(w44, V34), b45 = t14.mul(o27, b45), b45 = t14.add(b45, m37), m37 = t14.add(w44, w44), w44 = t14.add(m37, w44), w44 = t14.add(w44, V34), w44 = t14.mul(w44, b45), l28 = t14.add(l28, w44), V34 = t14.mul(a36, f46), V34 = t14.add(V34, V34), w44 = t14.mul(V34, b45), d31 = t14.sub(d31, w44), m37 = t14.mul(V34, _48), m37 = t14.add(m37, m37), m37 = t14.add(m37, m37), new B45(d31, l28, m37); } add(o27) { O53(o27); let { X: r19, Y: n24, Z: c25 } = this, { X: a36, Y: f46, Z: d31 } = o27, l28 = t14.ZERO, m37 = t14.ZERO, w44 = t14.ZERO, _48 = v43.a, V34 = t14.mul(v43.b, P9), b45 = t14.mul(r19, a36), U37 = t14.mul(n24, f46), k51 = t14.mul(c25, d31), $45 = t14.add(r19, n24), Y43 = t14.add(a36, f46); $45 = t14.mul($45, Y43), Y43 = t14.add(b45, U37), $45 = t14.sub($45, Y43), Y43 = t14.add(r19, c25); let X43 = t14.add(a36, d31); return Y43 = t14.mul(Y43, X43), X43 = t14.add(b45, k51), Y43 = t14.sub(Y43, X43), X43 = t14.add(n24, c25), l28 = t14.add(f46, d31), X43 = t14.mul(X43, l28), l28 = t14.add(U37, k51), X43 = t14.sub(X43, l28), w44 = t14.mul(_48, Y43), l28 = t14.mul(V34, k51), w44 = t14.add(l28, w44), l28 = t14.sub(U37, w44), w44 = t14.add(U37, w44), m37 = t14.mul(l28, w44), U37 = t14.add(b45, b45), U37 = t14.add(U37, b45), k51 = t14.mul(_48, k51), Y43 = t14.mul(V34, Y43), U37 = t14.add(U37, k51), k51 = t14.sub(b45, k51), k51 = t14.mul(_48, k51), Y43 = t14.add(Y43, k51), b45 = t14.mul(U37, Y43), m37 = t14.add(m37, b45), b45 = t14.mul(X43, Y43), l28 = t14.mul($45, l28), l28 = t14.sub(l28, b45), b45 = t14.mul($45, U37), w44 = t14.mul(X43, w44), w44 = t14.add(w44, b45), new B45(l28, m37, w44); } subtract(o27) { return this.add(o27.negate()); } is0() { return this.equals(B45.ZERO); } multiply(o27) { let { endo: r19 } = i20; if (!g45.isValidNot0(o27)) throw new Error("invalid scalar: out of range"); let n24, c25, a36 = (f46) => Q38.cached(this, f46, (d31) => $8(B45, d31)); if (r19) { let { k1neg: f46, k1: d31, k2neg: l28, k2: m37 } = I50(o27), { p: w44, f: _48 } = a36(d31), { p: V34, f: b45 } = a36(m37); c25 = _48.add(b45), n24 = j55(r19.beta, w44, V34, f46, l28); } else { let { p: f46, f: d31 } = a36(o27); n24 = f46, c25 = d31; } return $8(B45, [n24, c25])[0]; } multiplyUnsafe(o27) { let { endo: r19 } = i20, n24 = this; if (!g45.isValid(o27)) throw new Error("invalid scalar: out of range"); if (o27 === M10 || n24.is0()) return B45.ZERO; if (o27 === K10) return n24; if (Q38.hasCache(this)) return this.multiply(o27); if (r19) { let { k1neg: c25, k1: a36, k2neg: f46, k2: d31 } = I50(o27), { p1: l28, p2: m37 } = D11(B45, n24, a36, d31); return j55(r19.beta, l28, m37, c25, f46); } else return Q38.unsafe(n24, o27); } toAffine(o27) { return D54(this, o27); } isTorsionFree() { let { isTorsionFree: o27 } = i20; return u36 === K10 ? true : o27 ? o27(B45, this) : Q38.unsafe(this, S60).is0(); } clearCofactor() { let { clearCofactor: o27 } = i20; return u36 === K10 ? this : o27 ? o27(B45, this) : this.multiplyUnsafe(u36); } isSmallOrder() { return this.multiplyUnsafe(u36).is0(); } toBytes(o27 = true) { return N10(o27, "isCompressed"), this.assertValidity(), E58(B45, this, o27); } toHex(o27 = true) { return I9(this.toBytes(o27)); } toString() { return ``; } } let F40 = g45.BITS, Q38 = new M8(B45, i20.endo ? Math.ceil(F40 / 2) : F40); return B45.BASE.precompute(8), B45; } function bt3(e15) { return Uint8Array.of(e15 ? 2 : 3); } function Ht2(e15, i20) { let s38 = e15.ORDER, t14 = M10; for (let y53 = s38 - K10; y53 % W9 === M10; y53 /= W9) t14 += K10; let g45 = t14, v43 = W9 << g45 - K10 - K10, u36 = v43 * W9, S60 = (s38 - K10) / u36, h46 = (S60 - K10) / W9, R49 = u36 - K10, q53 = v43, C39 = e15.pow(i20, S60), H43 = e15.pow(i20, (S60 + K10) / W9), E58 = (y53, N56) => { let Z39 = C39, p37 = e15.pow(N56, R49), A53 = e15.sqr(p37); A53 = e15.mul(A53, N56); let T53 = e15.mul(y53, A53); T53 = e15.pow(T53, h46), T53 = e15.mul(T53, p37), p37 = e15.mul(T53, N56), A53 = e15.mul(T53, y53); let O53 = e15.mul(A53, p37); T53 = e15.pow(O53, q53); let I50 = e15.eql(T53, e15.ONE); p37 = e15.mul(A53, H43), T53 = e15.mul(O53, Z39), A53 = e15.cmov(p37, A53, I50), O53 = e15.cmov(T53, O53, I50); for (let D54 = g45; D54 > K10; D54--) { let z47 = D54 - W9; z47 = W9 << z47 - K10; let j55 = e15.pow(O53, z47), B45 = e15.eql(j55, e15.ONE); p37 = e15.mul(A53, Z39), Z39 = e15.mul(Z39, Z39), j55 = e15.mul(O53, Z39), A53 = e15.cmov(p37, A53, B45), O53 = e15.cmov(j55, O53, B45); } return { isValid: I50, value: A53 }; }; if (e15.ORDER % ct3 === P9) { let y53 = (e15.ORDER - P9) / ct3, N56 = e15.sqrt(e15.neg(i20)); E58 = (Z39, p37) => { let A53 = e15.sqr(p37), T53 = e15.mul(Z39, p37); A53 = e15.mul(A53, T53); let O53 = e15.pow(A53, y53); O53 = e15.mul(O53, T53); let I50 = e15.mul(O53, N56), D54 = e15.mul(e15.sqr(O53), p37), z47 = e15.eql(D54, Z39), j55 = e15.cmov(I50, O53, z47); return { isValid: z47, value: j55 }; }; } return E58; } function jt2(e15, i20) { nt3(e15); let { A: s38, B: t14, Z: g45 } = i20; if (!e15.isValid(s38) || !e15.isValid(t14) || !e15.isValid(g45)) throw new Error("mapToCurveSimpleSWU: invalid opts"); let v43 = Ht2(e15, g45); if (!e15.isOdd) throw new Error("Field does not have .isOdd()"); return (u36) => { let S60, h46, R49, q53, C39, H43, E58, y53; S60 = e15.sqr(u36), S60 = e15.mul(S60, g45), h46 = e15.sqr(S60), h46 = e15.add(h46, S60), R49 = e15.add(h46, e15.ONE), R49 = e15.mul(R49, t14), q53 = e15.cmov(g45, e15.neg(h46), !e15.eql(h46, e15.ZERO)), q53 = e15.mul(q53, s38), h46 = e15.sqr(R49), H43 = e15.sqr(q53), C39 = e15.mul(H43, s38), h46 = e15.add(h46, C39), h46 = e15.mul(h46, R49), H43 = e15.mul(H43, q53), C39 = e15.mul(H43, t14), h46 = e15.add(h46, C39), E58 = e15.mul(S60, R49); let { isValid: N56, value: Z39 } = v43(h46, H43); y53 = e15.mul(S60, u36), y53 = e15.mul(y53, Z39), E58 = e15.cmov(E58, R49, N56), y53 = e15.cmov(y53, Z39, N56); let p37 = e15.isOdd(u36) === e15.isOdd(y53); y53 = e15.cmov(e15.neg(y53), y53, p37); let A53 = $7(e15, [q53], true)[0]; return E58 = e15.mul(E58, A53), { x: E58, y: y53 }; }; } function Bt(e15, i20) { return { secretKey: i20.BYTES, publicKey: 1 + e15.BYTES, publicKeyUncompressed: 1 + 2 * e15.BYTES, publicKeyHasPrefix: true, signature: 2 * i20.BYTES }; } function kt2(e15, i20 = {}) { let { Fn: s38 } = e15, t14 = i20.randomBytes || N8, g45 = Object.assign(Bt(e15.Fp, s38), { seed: p10(s38.ORDER) }); function v43(E58) { try { let y53 = s38.fromBytes(E58); return s38.isValidNot0(y53); } catch { return false; } } function u36(E58, y53) { let { publicKey: N56, publicKeyUncompressed: Z39 } = g45; try { let p37 = E58.length; return y53 === true && p37 !== N56 || y53 === false && p37 !== Z39 ? false : !!e15.fromBytes(E58); } catch { return false; } } function S60(E58 = t14(g45.seed)) { return lt3(s5(E58, g45.seed, "seed"), s38.ORDER); } function h46(E58, y53 = true) { return e15.BASE.multiply(s38.fromBytes(E58)).toBytes(y53); } function R49(E58) { let { secretKey: y53, publicKey: N56, publicKeyUncompressed: Z39 } = g45; if (!l7(E58) || "_lengths" in s38 && s38._lengths || y53 === N56) return; let p37 = s5(E58, void 0, "key").length; return p37 === N56 || p37 === Z39; } function q53(E58, y53, N56 = true) { if (R49(E58) === true) throw new Error("first arg must be private key"); if (R49(y53) === false) throw new Error("second arg must be public key"); let Z39 = s38.fromBytes(E58); return e15.fromBytes(y53).multiply(Z39).toBytes(N56); } let C39 = { isValidSecretKey: v43, isValidPublicKey: u36, randomSecretKey: S60 }, H43 = W8(S60, h46); return Object.freeze({ getPublicKey: h46, getSharedSecret: q53, keygen: H43, Point: e15, utils: C39, lengths: g45 }); } function Mt2(e15, i20, s38 = {}) { m7(i20), J7(s38, {}, { hmac: "function", lowS: "boolean", randomBytes: "function", bits2int: "function", bits2int_modN: "function" }), s38 = Object.assign({}, s38); let t14 = s38.randomBytes || N8, g45 = s38.hmac || ((r19, n24) => p12(i20, r19, n24)), { Fp: v43, Fn: u36 } = e15, { ORDER: S60, BITS: h46 } = u36, { keygen: R49, getPublicKey: q53, getSharedSecret: C39, utils: H43, lengths: E58 } = kt2(e15, s38), y53 = { prehash: true, lowS: typeof s38.lowS == "boolean" ? s38.lowS : true, format: "compact", extraEntropy: false }, N56 = S60 * W9 < v43.ORDER; function Z39(r19) { let n24 = S60 >> K10; return r19 > n24; } function p37(r19, n24) { if (!u36.isValidNot0(n24)) throw new Error(`invalid signature ${r19}: out of range 1..Point.Fn.ORDER`); return n24; } function A53() { if (N56) throw new Error('"recovered" sig type is not supported for cofactor >2 curves'); } function T53(r19, n24) { st3(n24); let c25 = E58.signature, a36 = n24 === "compact" ? c25 : n24 === "recovered" ? c25 + 1 : void 0; return s5(r19, a36); } class O53 { r; s; recovery; constructor(n24, c25, a36) { if (this.r = p37("r", n24), this.s = p37("s", c25), a36 != null) { if (A53(), ![0, 1, 2, 3].includes(a36)) throw new Error("invalid recovery id"); this.recovery = a36; } Object.freeze(this); } static fromBytes(n24, c25 = y53.format) { T53(n24, c25); let a36; if (c25 === "der") { let { r: m37, s: w44 } = G9.toSig(s5(n24)); return new O53(m37, w44); } c25 === "recovered" && (a36 = n24[0], c25 = "compact", n24 = n24.subarray(1)); let f46 = E58.signature / 2, d31 = n24.subarray(0, f46), l28 = n24.subarray(f46, f46 * 2); return new O53(u36.fromBytes(d31), u36.fromBytes(l28), a36); } static fromHex(n24, c25) { return this.fromBytes(S10(n24), c25); } assertRecovery() { let { recovery: n24 } = this; if (n24 == null) throw new Error("invalid recovery id: must be present"); return n24; } addRecoveryBit(n24) { return new O53(this.r, this.s, n24); } recoverPublicKey(n24) { let { r: c25, s: a36 } = this, f46 = this.assertRecovery(), d31 = f46 === 2 || f46 === 3 ? c25 + S60 : c25; if (!v43.isValid(d31)) throw new Error("invalid recovery id: sig.r+curve.n != R.x"); let l28 = v43.toBytes(d31), m37 = e15.fromBytes(D9(bt3((f46 & 1) === 0), l28)), w44 = u36.inv(d31), _48 = D54(s5(n24, void 0, "msgHash")), V34 = u36.create(-_48 * w44), b45 = u36.create(a36 * w44), U37 = e15.BASE.multiplyUnsafe(V34).add(m37.multiplyUnsafe(b45)); if (U37.is0()) throw new Error("invalid recovery: point at infinify"); return U37.assertValidity(), U37; } hasHighS() { return Z39(this.s); } toBytes(n24 = y53.format) { if (st3(n24), n24 === "der") return S10(G9.hexFromSig(this)); let { r: c25, s: a36 } = this, f46 = u36.toBytes(c25), d31 = u36.toBytes(a36); return n24 === "recovered" ? (A53(), D9(Uint8Array.of(this.assertRecovery()), f46, d31)) : D9(f46, d31); } toHex(n24) { return I9(this.toBytes(n24)); } } let I50 = s38.bits2int || function(n24) { if (n24.length > 8192) throw new Error("input is too large"); let c25 = j10(n24), a36 = n24.length * 8 - h46; return a36 > 0 ? c25 >> BigInt(a36) : c25; }, D54 = s38.bits2int_modN || function(n24) { return u36.create(I50(n24)); }, z47 = V3(h46); function j55(r19) { return z11("num < 2^" + h46, r19, M10, z47), u36.toBytes(r19); } function B45(r19, n24) { return s5(r19, void 0, "message"), n24 ? s5(i20(r19), void 0, "prehashed message") : r19; } function F40(r19, n24, c25) { let { lowS: a36, prehash: f46, extraEntropy: d31 } = rt3(c25, y53); r19 = B45(r19, f46); let l28 = D54(r19), m37 = u36.fromBytes(n24); if (!u36.isValidNot0(m37)) throw new Error("invalid private key"); let w44 = [j55(m37), j55(l28)]; if (d31 != null && d31 !== false) { let U37 = d31 === true ? t14(E58.secretKey) : d31; w44.push(s5(U37, void 0, "extraEntropy")); } let _48 = D9(...w44), V34 = l28; function b45(U37) { let k51 = I50(U37); if (!u36.isValidNot0(k51)) return; let $45 = u36.inv(k51), Y43 = e15.BASE.multiply(k51).toAffine(), X43 = u36.create(Y43.x); if (X43 === M10) return; let tt12 = u36.create($45 * u36.create(V34 + X43 * m37)); if (tt12 === M10) return; let lt15 = (Y43.x === X43 ? 0 : 2) | Number(Y43.y & K10), ut15 = tt12; return a36 && Z39(tt12) && (ut15 = u36.neg(tt12), lt15 ^= 1), new O53(X43, ut15, N56 ? void 0 : lt15); } return { seed: _48, k2sig: b45 }; } function Q38(r19, n24, c25 = {}) { let { seed: a36, k2sig: f46 } = F40(r19, n24, c25); return W6(i20.outputLen, u36.BYTES, g45)(a36, f46).toBytes(c25.format); } function x50(r19, n24, c25, a36 = {}) { let { lowS: f46, prehash: d31, format: l28 } = rt3(a36, y53); if (c25 = s5(c25, void 0, "publicKey"), n24 = B45(n24, d31), !l7(r19)) { let m37 = r19 instanceof O53 ? ", use sig.toBytes()" : ""; throw new Error("verify expects Uint8Array signature" + m37); } T53(r19, l28); try { let m37 = O53.fromBytes(r19, l28), w44 = e15.fromBytes(c25); if (f46 && m37.hasHighS()) return false; let { r: _48, s: V34 } = m37, b45 = D54(n24), U37 = u36.inv(V34), k51 = u36.create(b45 * U37), $45 = u36.create(_48 * U37), Y43 = e15.BASE.multiplyUnsafe(k51).add(w44.multiplyUnsafe($45)); return Y43.is0() ? false : u36.create(Y43.x) === _48; } catch { return false; } } function o27(r19, n24, c25 = {}) { let { prehash: a36 } = rt3(c25, y53); return n24 = B45(n24, a36), O53.fromBytes(r19, "recovered").recoverPublicKey(n24).toBytes(); } return Object.freeze({ keygen: R49, getPublicKey: q53, getSharedSecret: C39, utils: H43, lengths: E58, Point: e15, sign: Q38, verify: x50, recoverPublicKey: o27, Signature: O53, hash: i20 }); } var mt2, it3, G9, M10, K10, W9, P9, ct3; var init_weierstrass = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/esnext/abstract/weierstrass.mjs?lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_hmac2(); init_utils2(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_curve_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_modular_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); mt2 = (e15, i20) => (e15 + (e15 >= 0 ? i20 : -i20) / W9) / i20; it3 = class extends Error { constructor(i20 = "") { super(i20); } }; G9 = { Err: it3, _tlv: { encode: (e15, i20) => { let { Err: s38 } = G9; if (e15 < 0 || e15 > 256) throw new s38("tlv.encode: wrong tag"); if (i20.length & 1) throw new s38("tlv.encode: unpadded data"); let t14 = i20.length / 2, g45 = v9(t14); if (g45.length / 2 & 128) throw new s38("tlv.encode: long form length too big"); let v43 = t14 > 127 ? v9(g45.length / 2 | 128) : ""; return v9(e15) + v43 + g45 + i20; }, decode(e15, i20) { let { Err: s38 } = G9, t14 = 0; if (e15 < 0 || e15 > 256) throw new s38("tlv.encode: wrong tag"); if (i20.length < 2 || i20[t14++] !== e15) throw new s38("tlv.decode: wrong tlv"); let g45 = i20[t14++], v43 = !!(g45 & 128), u36 = 0; if (!v43) u36 = g45; else { let h46 = g45 & 127; if (!h46) throw new s38("tlv.decode(long): indefinite length not supported"); if (h46 > 4) throw new s38("tlv.decode(long): byte length is too big"); let R49 = i20.subarray(t14, t14 + h46); if (R49.length !== h46) throw new s38("tlv.decode: length bytes not complete"); if (R49[0] === 0) throw new s38("tlv.decode(long): zero leftmost byte"); for (let q53 of R49) u36 = u36 << 8 | q53; if (t14 += h46, u36 < 128) throw new s38("tlv.decode(long): not minimal encoding"); } let S60 = i20.subarray(t14, t14 + u36); if (S60.length !== u36) throw new s38("tlv.decode: wrong value length"); return { v: S60, l: i20.subarray(t14 + u36) }; } }, _int: { encode(e15) { let { Err: i20 } = G9; if (e15 < M10) throw new i20("integer: negative integers are not allowed"); let s38 = v9(e15); if (Number.parseInt(s38[0], 16) & 8 && (s38 = "00" + s38), s38.length & 1) throw new i20("unexpected DER parsing assertion: unpadded hex"); return s38; }, decode(e15) { let { Err: i20 } = G9; if (e15[0] & 128) throw new i20("invalid signature integer: negative"); if (e15[0] === 0 && !(e15[1] & 128)) throw new i20("invalid signature integer: unnecessary leading zero"); return j10(e15); } }, toSig(e15) { let { Err: i20, _int: s38, _tlv: t14 } = G9, g45 = s5(e15, void 0, "signature"), { v: v43, l: u36 } = t14.decode(48, g45); if (u36.length) throw new i20("invalid signature: left bytes after parsing"); let { v: S60, l: h46 } = t14.decode(2, v43), { v: R49, l: q53 } = t14.decode(2, h46); if (q53.length) throw new i20("invalid signature: left bytes after parsing"); return { r: s38.decode(S60), s: s38.decode(R49) }; }, hexFromSig(e15) { let { _tlv: i20, _int: s38 } = G9, t14 = i20.encode(2, s38.encode(e15.r)), g45 = i20.encode(2, s38.encode(e15.s)), v43 = t14 + g45; return i20.encode(48, v43); } }; M10 = BigInt(0); K10 = BigInt(1); W9 = BigInt(2); P9 = BigInt(3); ct3 = BigInt(4); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/abstract/weierstrass?target=esnext&lp=node_modules%252F%2540noble%252Fcurves var init_weierstrass_target_esnext_lp_node_modules_252F_2540noble_252Fcurves = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/abstract/weierstrass?target=esnext&lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_weierstrass(); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/esnext/secp256k1.mjs?lp=node_modules%252F%2540noble%252Fcurves function ff(e15) { let f46 = S13.p, t14 = BigInt(3), n24 = BigInt(6), c25 = BigInt(11), a36 = BigInt(22), g45 = BigInt(23), u36 = BigInt(44), B45 = BigInt(88), r19 = e15 * e15 * e15 % f46, o27 = r19 * r19 * e15 % f46, p37 = tt3(o27, t14, f46) * o27 % f46, l28 = tt3(p37, t14, f46) * o27 % f46, d31 = tt3(l28, E15, f46) * r19 % f46, x50 = tt3(d31, c25, f46) * d31 % f46, y53 = tt3(x50, a36, f46) * x50 % f46, A53 = tt3(y53, u36, f46) * y53 % f46, G45 = tt3(A53, B45, f46) * A53 % f46, N56 = tt3(G45, u36, f46) * y53 % f46, V34 = tt3(N56, t14, f46) * o27 % f46, v43 = tt3(V34, g45, f46) * x50 % f46, M50 = tt3(v43, n24, f46) * r19 % f46, w44 = tt3(M50, E15, f46); if (!i5.eql(i5.sqr(w44), e15)) throw new Error("Cannot find square root"); return w44; } function _13(e15, ...f46) { let t14 = K11[e15]; if (t14 === void 0) { let n24 = f0(q9(e15)); t14 = D9(n24, n24), K11[e15] = t14; } return f0(D9(t14, ...f46)); } function P10(e15) { let { Fn: f46, BASE: t14 } = b10, n24 = f46.fromBytes(e15), c25 = t14.multiply(n24); return { scalar: k15(c25.y) ? n24 : f46.neg(n24), bytes: F9(c25) }; } function D12(e15) { let f46 = i5; if (!f46.isValidNot0(e15)) throw new Error("invalid x: Fail if x \u2265 p"); let t14 = f46.create(e15 * e15), n24 = f46.create(t14 * e15 + BigInt(7)), c25 = f46.sqrt(n24); k15(c25) || (c25 = f46.neg(c25)); let a36 = b10.fromAffine({ x: e15, y: c25 }); return a36.assertValidity(), a36; } function R10(...e15) { return b10.Fn.create(I12(_13("BIP0340/challenge", ...e15))); } function U10(e15) { return P10(e15).bytes; } function ef(e15, f46, t14 = N8(32)) { let { Fn: n24 } = b10, c25 = s5(e15, void 0, "message"), { bytes: a36, scalar: g45 } = P10(f46), u36 = s5(t14, 32, "auxRand"), B45 = n24.toBytes(g45 ^ I12(_13("BIP0340/aux", u36))), r19 = _13("BIP0340/nonce", B45, a36, c25), { bytes: o27, scalar: p37 } = P10(r19), l28 = R10(o27, a36, c25), d31 = new Uint8Array(64); if (d31.set(o27, 0), d31.set(n24.toBytes(n24.create(p37 + l28 * g45)), 32), !q10(d31, c25, a36)) throw new Error("sign: Invalid signature produced"); return d31; } function q10(e15, f46, t14) { let { Fp: n24, Fn: c25, BASE: a36 } = b10, g45 = s5(e15, 64, "signature"), u36 = s5(f46, void 0, "message"), B45 = s5(t14, 32, "publicKey"); try { let r19 = D12(I12(B45)), o27 = I12(g45.subarray(0, 32)); if (!n24.isValidNot0(o27)) return false; let p37 = I12(g45.subarray(32, 64)); if (!c25.isValidNot0(p37)) return false; let l28 = R10(c25.toBytes(o27), F9(r19), u36), d31 = a36.multiplyUnsafe(p37).add(r19.multiplyUnsafe(c25.neg(l28))), { x: x50, y: y53 } = d31.toAffine(); return !(d31.is0() || !k15(y53) || x50 !== o27); } catch { return false; } } var S13, Y8, $9, E15, i5, b10, gf, K11, F9, k15, I12, uf, tf, nf, pf; var init_secp256k1 = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/esnext/secp256k1.mjs?lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_sha22(); init_utils2(); init_curve_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_hash_to_curve_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_modular_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_weierstrass_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fcurves(); S13 = { p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), h: BigInt(1), a: BigInt(0), b: BigInt(7), Gx: BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), Gy: BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8") }; Y8 = { beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"), basises: [[BigInt("0x3086d221a7d46bcde86c90e49284eb15"), -BigInt("0xe4437ed6010e88286f547fa90abfe4c3")], [BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), BigInt("0x3086d221a7d46bcde86c90e49284eb15")]] }; $9 = BigInt(0); E15 = BigInt(2); i5 = _12(S13.p, { sqrt: ff }); b10 = Dt(S13, { Fp: i5, endo: Y8 }); gf = Mt2(b10, f0); K11 = {}; F9 = (e15) => e15.toBytes(true).slice(1); k15 = (e15) => e15 % E15 === $9; I12 = j10; uf = (() => { let t14 = (n24 = N8(48)) => lt3(n24, S13.n); return { keygen: W8(t14, U10), getPublicKey: U10, sign: ef, verify: q10, Point: b10, utils: { randomSecretKey: t14, taggedHash: _13, lift_x: D12, pointToBytes: F9 }, lengths: { secretKey: 32, publicKey: 32, publicKeyHasPrefix: false, signature: 64, seed: 48 } }; })(); tf = z13(i5, [["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7", "0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581", "0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262", "0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"], ["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b", "0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14", "0x0000000000000000000000000000000000000000000000000000000000000001"], ["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c", "0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3", "0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931", "0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"], ["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b", "0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573", "0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f", "0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e15) => e15.map((f46) => BigInt(f46)))); nf = jt2(i5, { A: BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"), B: BigInt("1771"), Z: i5.create(BigInt("-11")) }); pf = T12(b10, (e15) => { let { x: f46, y: t14 } = nf(i5.create(e15[0])); return tf(f46, t14); }, { DST: "secp256k1_XMD:SHA-256_SSWU_RO_", encodeDST: "secp256k1_XMD:SHA-256_SSWU_NU_", p: i5.ORDER, m: 1, k: 128, expand: "xmd", hash: f0 }); } }); // esm:https://esm.sh/*@noble/curves@2.0.1/secp256k1.js?target=esnext&lp=node_modules%252F%2540noble%252Fcurves var init_secp256k12 = __esm({ "esm:https://esm.sh/*@noble/curves@2.0.1/secp256k1.js?target=esnext&lp=node_modules%252F%2540noble%252Fcurves"() { init_define_import_meta_env(); init_secp256k1(); } }); // esm:https://esm.sh/*@scure/base@2.0.0/esnext/base.mjs?lp=node_modules%252Fnostr-tools%252Fnode_modules%252F%2540scure%252Fbase function A12(e15) { return e15 instanceof Uint8Array || ArrayBuffer.isView(e15) && e15.constructor.name === "Uint8Array"; } function H12(e15) { if (!A12(e15)) throw new Error("Uint8Array expected"); } function z14(e15, r19) { return Array.isArray(r19) ? r19.length === 0 ? true : e15 ? r19.every((n24) => typeof n24 == "string") : r19.every((n24) => Number.isSafeInteger(n24)) : false; } function D13(e15) { if (typeof e15 != "function") throw new Error("function expected"); return true; } function g13(e15, r19) { if (typeof r19 != "string") throw new Error(`${e15}: string expected`); return true; } function m9(e15) { if (!Number.isSafeInteger(e15)) throw new Error(`invalid integer: ${e15}`); } function C9(e15) { if (!Array.isArray(e15)) throw new Error("array expected"); } function k16(e15, r19) { if (!z14(true, r19)) throw new Error(`${e15}: array of strings expected`); } function M11(e15, r19) { if (!z14(false, r19)) throw new Error(`${e15}: array of numbers expected`); } function f9(...e15) { let r19 = (o27) => o27, n24 = (o27, s38) => (i20) => o27(s38(i20)), c25 = e15.map((o27) => o27.encode).reduceRight(n24, r19), t14 = e15.map((o27) => o27.decode).reduce(n24, r19); return { encode: c25, decode: t14 }; } function u9(e15) { let r19 = typeof e15 == "string" ? e15.split("") : e15, n24 = r19.length; k16("alphabet", r19); let c25 = new Map(r19.map((t14, o27) => [t14, o27])); return { encode: (t14) => (C9(t14), t14.map((o27) => { if (!Number.isSafeInteger(o27) || o27 < 0 || o27 >= n24) throw new Error(`alphabet.encode: digit index outside alphabet "${o27}". Allowed: ${e15}`); return r19[o27]; })), decode: (t14) => (C9(t14), t14.map((o27) => { g13("alphabet.decode", o27); let s38 = c25.get(o27); if (s38 === void 0) throw new Error(`Unknown letter: "${o27}". Allowed: ${e15}`); return s38; })) }; } function h9(e15 = "") { return g13("join", e15), { encode: (r19) => (k16("join.decode", r19), r19.join(e15)), decode: (r19) => (g13("join.decode", r19), r19.split(e15)) }; } function U11(e15, r19 = "=") { return m9(e15), g13("padding", r19), { encode(n24) { for (k16("padding.encode", n24); n24.length * e15 % 8; ) n24.push(r19); return n24; }, decode(n24) { k16("padding.decode", n24); let c25 = n24.length; if (c25 * e15 % 8) throw new Error("padding: invalid, string should have whole number of bytes"); for (; c25 > 0 && n24[c25 - 1] === r19; c25--) if ((c25 - 1) * e15 % 8 === 0) throw new Error("padding: invalid, string has too much padding"); return n24.slice(0, c25); } }; } function J9(e15) { return D13(e15), { encode: (r19) => r19, decode: (r19) => e15(r19) }; } function I13(e15, r19, n24) { if (r19 < 2) throw new Error(`convertRadix: invalid from=${r19}, base cannot be less than 2`); if (n24 < 2) throw new Error(`convertRadix: invalid to=${n24}, base cannot be less than 2`); if (C9(e15), !e15.length) return []; let c25 = 0, t14 = [], o27 = Array.from(e15, (i20) => { if (m9(i20), i20 < 0 || i20 >= r19) throw new Error(`invalid integer: ${i20}`); return i20; }), s38 = o27.length; for (; ; ) { let i20 = 0, y53 = true; for (let p37 = c25; p37 < s38; p37++) { let b45 = o27[p37], d31 = r19 * i20, a36 = d31 + b45; if (!Number.isSafeInteger(a36) || d31 / r19 !== i20 || a36 - b45 !== d31) throw new Error("convertRadix: carry overflow"); let x50 = a36 / n24; i20 = a36 % n24; let l28 = Math.floor(x50); if (o27[p37] = l28, !Number.isSafeInteger(l28) || l28 * n24 + i20 !== a36) throw new Error("convertRadix: carry overflow"); if (y53) l28 ? y53 = false : c25 = p37; else continue; } if (t14.push(i20), y53) break; } for (let i20 = 0; i20 < e15.length - 1 && e15[i20] === 0; i20++) t14.push(0); return t14.reverse(); } function S14(e15, r19, n24, c25) { if (C9(e15), r19 <= 0 || r19 > 32) throw new Error(`convertRadix2: wrong from=${r19}`); if (n24 <= 0 || n24 > 32) throw new Error(`convertRadix2: wrong to=${n24}`); if (R11(r19, n24) > 32) throw new Error(`convertRadix2: carry overflow from=${r19} to=${n24} carryBits=${R11(r19, n24)}`); let t14 = 0, o27 = 0, s38 = T13[r19], i20 = T13[n24] - 1, y53 = []; for (let p37 of e15) { if (m9(p37), p37 >= s38) throw new Error(`convertRadix2: invalid data word=${p37} from=${r19}`); if (t14 = t14 << r19 | p37, o27 + r19 > 32) throw new Error(`convertRadix2: carry overflow pos=${o27} from=${r19}`); for (o27 += r19; o27 >= n24; o27 -= n24) y53.push((t14 >> o27 - n24 & i20) >>> 0); let b45 = T13[o27]; if (b45 === void 0) throw new Error("invalid carry"); t14 &= b45 - 1; } if (t14 = t14 << n24 - o27 & i20, !c25 && o27 >= r19) throw new Error("Excess padding"); if (!c25 && t14 > 0) throw new Error(`Non-zero padding: ${t14}`); return c25 && o27 > 0 && y53.push(t14 >>> 0), y53; } function Z9(e15) { m9(e15); let r19 = 2 ** 8; return { encode: (n24) => { if (!A12(n24)) throw new Error("radix.encode input should be Uint8Array"); return I13(Array.from(n24), r19, e15); }, decode: (n24) => (M11("radix.decode", n24), Uint8Array.from(I13(n24, e15, r19))) }; } function w9(e15, r19 = false) { if (m9(e15), e15 <= 0 || e15 > 32) throw new Error("radix2: bits should be in (0..32]"); if (R11(8, e15) > 32 || R11(e15, 8) > 32) throw new Error("radix2: carry overflow"); return { encode: (n24) => { if (!A12(n24)) throw new Error("radix2.encode input should be Uint8Array"); return S14(Array.from(n24), 8, e15, !r19); }, decode: (n24) => (M11("radix2.decode", n24), Uint8Array.from(S14(n24, e15, 8, r19))) }; } function F10(e15) { return D13(e15), function(...r19) { try { return e15.apply(null, r19); } catch { } }; } function $10(e15) { let r19 = e15 >> 25, n24 = (e15 & 33554431) << 5; for (let c25 = 0; c25 < K12.length; c25++) (r19 >> c25 & 1) === 1 && (n24 ^= K12[c25]); return n24; } function V6(e15, r19, n24 = 1) { let c25 = e15.length, t14 = 1; for (let o27 = 0; o27 < c25; o27++) { let s38 = e15.charCodeAt(o27); if (s38 < 33 || s38 > 126) throw new Error(`Invalid prefix (${e15})`); t14 = $10(t14) ^ s38 >> 5; } t14 = $10(t14); for (let o27 = 0; o27 < c25; o27++) t14 = $10(t14) ^ e15.charCodeAt(o27) & 31; for (let o27 of r19) t14 = $10(t14) ^ o27; for (let o27 = 0; o27 < 6; o27++) t14 = $10(t14); return t14 ^= n24, O10.encode(S14([t14 % T13[30]], 30, 5, false)); } function q11(e15) { let r19 = e15 === "bech32" ? 1 : 734539939, n24 = w9(5), c25 = n24.decode, t14 = n24.encode, o27 = F10(c25); function s38(d31, a36, x50 = 90) { g13("bech32.encode prefix", d31), A12(a36) && (a36 = Array.from(a36)), M11("bech32.encode", a36); let l28 = d31.length; if (l28 === 0) throw new TypeError(`Invalid prefix length ${l28}`); let E58 = l28 + 7 + a36.length; if (x50 !== false && E58 > x50) throw new TypeError(`Length ${E58} exceeds limit ${x50}`); let v43 = d31.toLowerCase(), B45 = V6(v43, a36, r19); return `${v43}1${O10.encode(a36)}${B45}`; } function i20(d31, a36 = 90) { g13("bech32.decode input", d31); let x50 = d31.length; if (x50 < 8 || a36 !== false && x50 > a36) throw new TypeError(`invalid string length: ${x50} (${d31}). Expected (8..${a36})`); let l28 = d31.toLowerCase(); if (d31 !== l28 && d31 !== d31.toUpperCase()) throw new Error("String must be lowercase or uppercase"); let E58 = l28.lastIndexOf("1"); if (E58 === 0 || E58 === -1) throw new Error('Letter "1" must be present between prefix and data only'); let v43 = l28.slice(0, E58), B45 = l28.slice(E58 + 1); if (B45.length < 6) throw new Error("Data must be at least 6 characters long"); let W39 = O10.decode(B45).slice(0, -6), j55 = V6(v43, W39, r19); if (!B45.endsWith(j55)) throw new Error(`Invalid checksum in ${d31}: expected "${j55}"`); return { prefix: v43, words: W39 }; } let y53 = F10(i20); function p37(d31) { let { prefix: a36, words: x50 } = i20(d31, false); return { prefix: a36, words: x50, bytes: c25(x50) }; } function b45(d31, a36) { return s38(d31, t14(a36)); } return { encode: s38, decode: i20, encodeFromBytes: b45, decodeToBytes: p37, decodeUnsafe: y53, fromWords: c25, fromWordsUnsafe: o27, toWords: t14 }; } var Q4, R11, T13, re4, ne3, we4, pe4, xe3, ye5, Y9, _14, oe4, ge4, te4, be4, P11, L8, Ee4, Ae3, O10, K12, ve5, Be3, ae5, de5, fe4; var init_base = __esm({ "esm:https://esm.sh/*@scure/base@2.0.0/esnext/base.mjs?lp=node_modules%252Fnostr-tools%252Fnode_modules%252F%2540scure%252Fbase"() { init_define_import_meta_env(); Q4 = (e15, r19) => r19 === 0 ? e15 : Q4(r19, e15 % r19); R11 = (e15, r19) => e15 + (r19 - Q4(e15, r19)); T13 = (() => { let e15 = []; for (let r19 = 0; r19 < 40; r19++) e15.push(2 ** r19); return e15; })(); re4 = f9(w9(4), u9("0123456789ABCDEF"), h9("")); ne3 = f9(w9(5), u9("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), U11(5), h9("")); we4 = f9(w9(5), u9("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), h9("")); pe4 = f9(w9(5), u9("0123456789ABCDEFGHIJKLMNOPQRSTUV"), U11(5), h9("")); xe3 = f9(w9(5), u9("0123456789ABCDEFGHIJKLMNOPQRSTUV"), h9("")); ye5 = f9(w9(5), u9("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), h9(""), J9((e15) => e15.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1"))); Y9 = typeof Uint8Array.from([]).toBase64 == "function" && typeof Uint8Array.fromBase64 == "function"; _14 = (e15, r19) => { g13("base64", e15); let n24 = r19 ? /^[A-Za-z0-9=_-]+$/ : /^[A-Za-z0-9=+/]+$/, c25 = r19 ? "base64url" : "base64"; if (e15.length > 0 && !n24.test(e15)) throw new Error("invalid base64"); return Uint8Array.fromBase64(e15, { alphabet: c25, lastChunkHandling: "strict" }); }; oe4 = Y9 ? { encode(e15) { return H12(e15), e15.toBase64(); }, decode(e15) { return _14(e15, false); } } : f9(w9(6), u9("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), U11(6), h9("")); ge4 = f9(w9(6), u9("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), h9("")); te4 = Y9 ? { encode(e15) { return H12(e15), e15.toBase64({ alphabet: "base64url" }); }, decode(e15) { return _14(e15, true); } } : f9(w9(6), u9("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), U11(6), h9("")); be4 = f9(w9(6), u9("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), h9("")); P11 = (e15) => f9(Z9(58), u9(e15), h9("")); L8 = P11("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); Ee4 = P11("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"); Ae3 = P11("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"); O10 = f9(u9("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), h9("")); K12 = [996825010, 642813549, 513874426, 1027748829, 705979059]; ve5 = q11("bech32"); Be3 = q11("bech32m"); ae5 = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function"; de5 = { encode(e15) { return H12(e15), e15.toHex(); }, decode(e15) { return g13("hex", e15), Uint8Array.fromHex(e15); } }; fe4 = ae5 ? de5 : f9(w9(4), u9("0123456789abcdef"), h9(""), J9((e15) => { if (typeof e15 != "string" || e15.length % 2 !== 0) throw new TypeError(`hex.decode: expected string, got ${typeof e15} with length ${e15.length}`); return e15.toLowerCase(); })); } }); // esm:https://esm.sh/*@scure/base@2.0.0?target=esnext&lp=node_modules%252Fnostr-tools%252Fnode_modules%252F%2540scure%252Fbase var init_base_2_0 = __esm({ "esm:https://esm.sh/*@scure/base@2.0.0?target=esnext&lp=node_modules%252Fnostr-tools%252Fnode_modules%252F%2540scure%252Fbase"() { init_define_import_meta_env(); init_base(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/utils.mjs?lp=node_modules%252F%2540noble%252Fciphers function h10(e15) { return e15 instanceof Uint8Array || ArrayBuffer.isView(e15) && e15.constructor.name === "Uint8Array"; } function w10(e15) { if (typeof e15 != "boolean") throw new Error(`boolean expected, not ${e15}`); } function x12(e15) { if (!Number.isSafeInteger(e15) || e15 < 0) throw new Error("positive integer expected, got " + e15); } function s7(e15, t14, n24 = "") { let r19 = h10(e15), o27 = e15?.length, i20 = t14 !== void 0; if (!r19 || i20 && o27 !== t14) { let f46 = n24 && `"${n24}" `, c25 = i20 ? ` of length ${t14}` : "", u36 = r19 ? `length=${o27}` : `type=${typeof e15}`; throw new Error(f46 + "expected Uint8Array" + c25 + ", got " + u36); } return e15; } function N12(e15, t14 = true) { if (e15.destroyed) throw new Error("Hash instance has been destroyed"); if (t14 && e15.finished) throw new Error("Hash#digest() has already been called"); } function C10(e15, t14) { s7(e15, void 0, "output"); let n24 = t14.outputLen; if (e15.length < n24) throw new Error("digestInto() expects output buffer of length at least " + n24); } function S15(e15) { return new Uint8Array(e15.buffer, e15.byteOffset, e15.byteLength); } function V7(e15) { return new Uint32Array(e15.buffer, e15.byteOffset, Math.floor(e15.byteLength / 4)); } function _15(...e15) { for (let t14 = 0; t14 < e15.length; t14++) e15[t14].fill(0); } function b11(e15) { return new DataView(e15.buffer, e15.byteOffset, e15.byteLength); } function O11(e15, t14) { return e15.buffer === t14.buffer && e15.byteOffset < t14.byteOffset + t14.byteLength && t14.byteOffset < e15.byteOffset + e15.byteLength; } function D14(e15, t14) { if (O11(e15, t14) && e15.byteOffset < t14.byteOffset) throw new Error("complex overlap of input and output is not supported"); } function T14(...e15) { let t14 = 0; for (let r19 = 0; r19 < e15.length; r19++) { let o27 = e15[r19]; s7(o27), t14 += o27.length; } let n24 = new Uint8Array(t14); for (let r19 = 0, o27 = 0; r19 < e15.length; r19++) { let i20 = e15[r19]; n24.set(i20, o27), o27 += i20.length; } return n24; } function R12(e15, t14) { if (t14 == null || typeof t14 != "object") throw new Error("options must be defined"); return Object.assign(e15, t14); } function k17(e15, t14) { if (e15.length !== t14.length) return false; let n24 = 0; for (let r19 = 0; r19 < e15.length; r19++) n24 |= e15[r19] ^ t14[r19]; return n24 === 0; } function q12(e15, t14, n24 = true) { if (t14 === void 0) return new Uint8Array(e15); if (t14.length !== e15) throw new Error('"output" expected Uint8Array of length ' + e15 + ", got: " + t14.length); if (n24 && !L9(t14)) throw new Error("invalid output, must be aligned"); return t14; } function z15(e15, t14, n24) { w10(n24); let r19 = new Uint8Array(16), o27 = b11(r19); return o27.setBigUint64(0, BigInt(t14), n24), o27.setBigUint64(8, BigInt(e15), n24), r19; } function L9(e15) { return e15.byteOffset % 4 === 0; } function M12(e15) { return Uint8Array.from(e15); } function H13(e15 = 32) { let t14 = typeof globalThis == "object" ? globalThis.crypto : null; if (typeof t14?.getRandomValues != "function") throw new Error("crypto.getRandomValues must be defined"); return t14.getRandomValues(new Uint8Array(e15)); } var A13, a11, m10, F11; var init_utils4 = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/utils.mjs?lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); A13 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68; a11 = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function"; m10 = Array.from({ length: 256 }, (e15, t14) => t14.toString(16).padStart(2, "0")); F11 = (e15, t14) => { function n24(r19, ...o27) { if (s7(r19, void 0, "key"), !A13) throw new Error("Non little-endian hardware is not yet supported"); if (e15.nonceLength !== void 0) { let p37 = o27[0]; s7(p37, e15.varSizeNonce ? void 0 : e15.nonceLength, "nonce"); } let i20 = e15.tagLength; i20 && o27[1] !== void 0 && s7(o27[1], void 0, "AAD"); let f46 = t14(r19, ...o27), c25 = (p37, y53) => { if (y53 !== void 0) { if (p37 !== 2) throw new Error("cipher output not supported"); s7(y53, void 0, "output"); } }, u36 = false; return { encrypt(p37, y53) { if (u36) throw new Error("cannot encrypt() twice with same key + nonce"); return u36 = true, s7(p37), c25(f46.encrypt.length, y53), f46.encrypt(p37, y53); }, decrypt(p37, y53) { if (s7(p37), i20 && p37.length < i20) throw new Error('"ciphertext" expected length bigger than tagLength=' + i20); return c25(f46.decrypt.length, y53), f46.decrypt(p37, y53); } }; } return Object.assign(n24, e15), n24; }; } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/utils?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fciphers = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/utils?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_utils4(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/_polyval.mjs?lp=node_modules%252F%2540noble%252Fciphers function Y10(o27) { o27.reverse(); let t14 = o27[15] & 1, s38 = 0; for (let e15 = 0; e15 < o27.length; e15++) { let i20 = o27[e15]; o27[e15] = i20 >>> 1 | s38, s38 = (i20 & 1) << 7; } return o27[0] ^= -t14 & 225, o27; } function Z10(o27) { let t14 = (e15, i20) => o27(i20, e15.length).update(e15).digest(), s38 = o27(new Uint8Array(16), 0); return t14.outputLen = s38.outputLen, t14.blockLen = s38.blockLen, t14.create = (e15, i20) => o27(e15, i20), t14; } var f10, O12, l9, j12, C11, c7, q13, _16, K13, F12, G10; var init_polyval = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/_polyval.mjs?lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); f10 = 16; O12 = new Uint8Array(16); l9 = V7(O12); j12 = 225; C11 = (o27, t14, s38, e15) => { let i20 = e15 & 1; return { s3: s38 << 31 | e15 >>> 1, s2: t14 << 31 | s38 >>> 1, s1: o27 << 31 | t14 >>> 1, s0: o27 >>> 1 ^ j12 << 24 & -(i20 & 1) }; }; c7 = (o27) => (o27 >>> 0 & 255) << 24 | (o27 >>> 8 & 255) << 16 | (o27 >>> 16 & 255) << 8 | o27 >>> 24 & 255 | 0; q13 = (o27) => o27 > 64 * 1024 ? 8 : o27 > 1024 ? 4 : 2; _16 = class { blockLen = f10; outputLen = f10; s0 = 0; s1 = 0; s2 = 0; s3 = 0; finished = false; t; W; windowSize; constructor(t14, s38) { s7(t14, 16, "key"), t14 = M12(t14); let e15 = b11(t14), i20 = e15.getUint32(0, false), n24 = e15.getUint32(4, false), r19 = e15.getUint32(8, false), b45 = e15.getUint32(12, false), g45 = []; for (let u36 = 0; u36 < 128; u36++) g45.push({ s0: c7(i20), s1: c7(n24), s2: c7(r19), s3: c7(b45) }), { s0: i20, s1: n24, s2: r19, s3: b45 } = C11(i20, n24, r19, b45); let h46 = q13(s38 || 1024); if (![1, 2, 4, 8].includes(h46)) throw new Error("ghash: invalid window size, expected 2, 4 or 8"); this.W = h46; let y53 = 128 / h46, z47 = this.windowSize = 2 ** h46, x50 = []; for (let u36 = 0; u36 < y53; u36++) for (let p37 = 0; p37 < z47; p37++) { let B45 = 0, w44 = 0, L49 = 0, m37 = 0; for (let d31 = 0; d31 < h46; d31++) { if (!(p37 >>> h46 - d31 - 1 & 1)) continue; let { s0: E58, s1: M50, s2: P43, s3: R49 } = g45[h46 * u36 + d31]; B45 ^= E58, w44 ^= M50, L49 ^= P43, m37 ^= R49; } x50.push({ s0: B45, s1: w44, s2: L49, s3: m37 }); } this.t = x50; } _updateBlock(t14, s38, e15, i20) { t14 ^= this.s0, s38 ^= this.s1, e15 ^= this.s2, i20 ^= this.s3; let { W: n24, t: r19, windowSize: b45 } = this, g45 = 0, h46 = 0, W39 = 0, y53 = 0, z47 = (1 << n24) - 1, x50 = 0; for (let u36 of [t14, s38, e15, i20]) for (let p37 = 0; p37 < 4; p37++) { let B45 = u36 >>> 8 * p37 & 255; for (let w44 = 8 / n24 - 1; w44 >= 0; w44--) { let L49 = B45 >>> n24 * w44 & z47, { s0: m37, s1: d31, s2: v43, s3: E58 } = r19[x50 * b45 + L49]; g45 ^= m37, h46 ^= d31, W39 ^= v43, y53 ^= E58, x50 += 1; } } this.s0 = g45, this.s1 = h46, this.s2 = W39, this.s3 = y53; } update(t14) { N12(this), s7(t14), t14 = M12(t14); let s38 = V7(t14), e15 = Math.floor(t14.length / f10), i20 = t14.length % f10; for (let n24 = 0; n24 < e15; n24++) this._updateBlock(s38[n24 * 4 + 0], s38[n24 * 4 + 1], s38[n24 * 4 + 2], s38[n24 * 4 + 3]); return i20 && (O12.set(t14.subarray(e15 * f10)), this._updateBlock(l9[0], l9[1], l9[2], l9[3]), _15(l9)), this; } destroy() { let { t: t14 } = this; for (let s38 of t14) s38.s0 = 0, s38.s1 = 0, s38.s2 = 0, s38.s3 = 0; } digestInto(t14) { N12(this), C10(t14, this), this.finished = true; let { s0: s38, s1: e15, s2: i20, s3: n24 } = this, r19 = V7(t14); return r19[0] = s38, r19[1] = e15, r19[2] = i20, r19[3] = n24, t14; } digest() { let t14 = new Uint8Array(f10); return this.digestInto(t14), this.destroy(), t14; } }; K13 = class extends _16 { constructor(t14, s38) { s7(t14); let e15 = Y10(M12(t14)); super(e15, s38), _15(e15); } update(t14) { N12(this), s7(t14), t14 = M12(t14); let s38 = V7(t14), e15 = t14.length % f10, i20 = Math.floor(t14.length / f10); for (let n24 = 0; n24 < i20; n24++) this._updateBlock(c7(s38[n24 * 4 + 3]), c7(s38[n24 * 4 + 2]), c7(s38[n24 * 4 + 1]), c7(s38[n24 * 4 + 0])); return e15 && (O12.set(t14.subarray(i20 * f10)), this._updateBlock(c7(l9[3]), c7(l9[2]), c7(l9[1]), c7(l9[0])), _15(l9)), this; } digestInto(t14) { N12(this), C10(t14, this), this.finished = true; let { s0: s38, s1: e15, s2: i20, s3: n24 } = this, r19 = V7(t14); return r19[0] = s38, r19[1] = e15, r19[2] = i20, r19[3] = n24, t14.reverse(); } }; F12 = Z10((o27, t14) => new _16(o27, t14)); G10 = Z10((o27, t14) => new K13(o27, t14)); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/_polyval?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_polyval_target_esnext_lp_node_modules_252F_2540noble_252Fciphers = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/_polyval?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_polyval(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/aes.mjs?lp=node_modules%252F%2540noble%252Fciphers function nt4(n24) { if (![16, 24, 32].includes(n24.length)) throw new Error('"aes key" expected Uint8Array of length 16/24/32, got length=' + n24.length); } function ft3(n24) { return n24 << 1 ^ Pt3 & -(n24 >> 7); } function P12(n24, e15) { let t14 = 0; for (; e15 > 0; e15 >>= 1) t14 ^= n24 & -(e15 & 1), n24 = ft3(n24); return t14; } function pt3(n24, e15) { if (n24.length !== 256) throw new Error("Wrong sbox length"); let t14 = new Uint32Array(256).map((l28, a36) => e15(n24[a36])), o27 = t14.map(ot3), r19 = o27.map(ot3), i20 = r19.map(ot3), f46 = new Uint32Array(256 * 256), c25 = new Uint32Array(256 * 256), s38 = new Uint16Array(256 * 256); for (let l28 = 0; l28 < 256; l28++) for (let a36 = 0; a36 < 256; a36++) { let h46 = l28 * 256 + a36; f46[h46] = t14[l28] ^ o27[a36], c25[h46] = r19[l28] ^ i20[a36], s38[h46] = n24[l28] << 8 | n24[a36]; } return { sbox: n24, sbox2: s38, T0: t14, T1: o27, T2: r19, T3: i20, T01: f46, T23: c25 }; } function S16(n24) { s7(n24); let e15 = n24.length; nt4(n24); let { sbox2: t14 } = at3, o27 = []; L9(n24) || o27.push(n24 = M12(n24)); let r19 = V7(n24), i20 = r19.length, f46 = (s38) => _17(t14, s38, s38, s38, s38), c25 = new Uint32Array(e15 + 28); c25.set(r19); for (let s38 = i20; s38 < c25.length; s38++) { let l28 = c25[s38 - 1]; s38 % i20 === 0 ? l28 = f46(Nt2(l28)) ^ Ot2[s38 / i20 - 1] : i20 > 6 && s38 % i20 === 4 && (l28 = f46(l28)), c25[s38] = c25[s38 - i20] ^ l28; } return _15(...o27), c25; } function et3(n24) { let e15 = S16(n24), t14 = e15.slice(), o27 = e15.length, { sbox2: r19 } = at3, { T0: i20, T1: f46, T2: c25, T3: s38 } = dt3; for (let l28 = 0; l28 < o27; l28 += 4) for (let a36 = 0; a36 < 4; a36++) t14[l28 + a36] = e15[o27 - l28 - 4 + a36]; _15(e15); for (let l28 = 4; l28 < o27 - 4; l28++) { let a36 = t14[l28], h46 = _17(r19, a36, a36, a36, a36); t14[l28] = i20[h46 & 255] ^ f46[h46 >>> 8 & 255] ^ c25[h46 >>> 16 & 255] ^ s38[h46 >>> 24]; } return t14; } function k18(n24, e15, t14, o27, r19, i20) { return n24[t14 << 8 & 65280 | o27 >>> 8 & 255] ^ e15[r19 >>> 8 & 65280 | i20 >>> 24 & 255]; } function _17(n24, e15, t14, o27, r19) { return n24[e15 & 255 | t14 & 65280] | n24[o27 >>> 16 & 255 | r19 >>> 16 & 65280] << 16; } function K14(n24, e15, t14, o27, r19) { let { sbox2: i20, T01: f46, T23: c25 } = at3, s38 = 0; e15 ^= n24[s38++], t14 ^= n24[s38++], o27 ^= n24[s38++], r19 ^= n24[s38++]; let l28 = n24.length / 4 - 2; for (let g45 = 0; g45 < l28; g45++) { let p37 = n24[s38++] ^ k18(f46, c25, e15, t14, o27, r19), w44 = n24[s38++] ^ k18(f46, c25, t14, o27, r19, e15), b45 = n24[s38++] ^ k18(f46, c25, o27, r19, e15, t14), d31 = n24[s38++] ^ k18(f46, c25, r19, e15, t14, o27); e15 = p37, t14 = w44, o27 = b45, r19 = d31; } let a36 = n24[s38++] ^ _17(i20, e15, t14, o27, r19), h46 = n24[s38++] ^ _17(i20, t14, o27, r19, e15), u36 = n24[s38++] ^ _17(i20, o27, r19, e15, t14), y53 = n24[s38++] ^ _17(i20, r19, e15, t14, o27); return { s0: a36, s1: h46, s2: u36, s3: y53 }; } function D15(n24, e15, t14, o27, r19) { let { sbox2: i20, T01: f46, T23: c25 } = dt3, s38 = 0; e15 ^= n24[s38++], t14 ^= n24[s38++], o27 ^= n24[s38++], r19 ^= n24[s38++]; let l28 = n24.length / 4 - 2; for (let g45 = 0; g45 < l28; g45++) { let p37 = n24[s38++] ^ k18(f46, c25, e15, r19, o27, t14), w44 = n24[s38++] ^ k18(f46, c25, t14, e15, r19, o27), b45 = n24[s38++] ^ k18(f46, c25, o27, t14, e15, r19), d31 = n24[s38++] ^ k18(f46, c25, r19, o27, t14, e15); e15 = p37, t14 = w44, o27 = b45, r19 = d31; } let a36 = n24[s38++] ^ _17(i20, e15, r19, o27, t14), h46 = n24[s38++] ^ _17(i20, t14, e15, r19, o27), u36 = n24[s38++] ^ _17(i20, o27, t14, e15, r19), y53 = n24[s38++] ^ _17(i20, r19, o27, t14, e15); return { s0: a36, s1: h46, s2: u36, s3: y53 }; } function bt4(n24, e15, t14, o27) { s7(e15, L10, "nonce"), s7(t14); let r19 = t14.length; o27 = q12(r19, o27), D14(t14, o27); let i20 = e15, f46 = V7(i20), { s0: c25, s1: s38, s2: l28, s3: a36 } = K14(n24, f46[0], f46[1], f46[2], f46[3]), h46 = V7(t14), u36 = V7(o27); for (let g45 = 0; g45 + 4 <= h46.length; g45 += 4) u36[g45 + 0] = h46[g45 + 0] ^ c25, u36[g45 + 1] = h46[g45 + 1] ^ s38, u36[g45 + 2] = h46[g45 + 2] ^ l28, u36[g45 + 3] = h46[g45 + 3] ^ a36, J10(i20, false, 1), { s0: c25, s1: s38, s2: l28, s3: a36 } = K14(n24, f46[0], f46[1], f46[2], f46[3]); let y53 = L10 * Math.floor(h46.length / lt4); if (y53 < r19) { let g45 = new Uint32Array([c25, s38, l28, a36]), p37 = S15(g45); for (let w44 = y53, b45 = 0; w44 < r19; w44++, b45++) o27[w44] = t14[w44] ^ p37[b45]; _15(g45); } return o27; } function z16(n24, e15, t14, o27, r19) { s7(t14, L10, "nonce"), s7(o27), r19 = q12(o27.length, r19); let i20 = t14, f46 = V7(i20), c25 = b11(i20), s38 = V7(o27), l28 = V7(r19), a36 = e15 ? 0 : 12, h46 = o27.length, u36 = c25.getUint32(a36, e15), { s0: y53, s1: g45, s2: p37, s3: w44 } = K14(n24, f46[0], f46[1], f46[2], f46[3]); for (let d31 = 0; d31 + 4 <= s38.length; d31 += 4) l28[d31 + 0] = s38[d31 + 0] ^ y53, l28[d31 + 1] = s38[d31 + 1] ^ g45, l28[d31 + 2] = s38[d31 + 2] ^ p37, l28[d31 + 3] = s38[d31 + 3] ^ w44, u36 = u36 + 1 >>> 0, c25.setUint32(a36, u36, e15), { s0: y53, s1: g45, s2: p37, s3: w44 } = K14(n24, f46[0], f46[1], f46[2], f46[3]); let b45 = L10 * Math.floor(s38.length / lt4); if (b45 < h46) { let d31 = new Uint32Array([y53, g45, p37, w44]), C39 = S15(d31); for (let E58 = b45, A53 = 0; E58 < h46; E58++, A53++) r19[E58] = o27[E58] ^ C39[A53]; _15(d31); } return r19; } function Et3(n24) { if (s7(n24), n24.length % L10 !== 0) throw new Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size " + L10); } function mt3(n24, e15, t14) { s7(n24); let o27 = n24.length, r19 = o27 % L10; if (!e15 && r19 !== 0) throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding"); L9(n24) || (n24 = M12(n24)); let i20 = V7(n24); if (e15) { let c25 = L10 - r19; c25 || (c25 = L10), o27 = o27 + c25; } t14 = q12(o27, t14), D14(n24, t14); let f46 = V7(t14); return { b: i20, o: f46, out: t14 }; } function Lt2(n24, e15) { if (!e15) return n24; let t14 = n24.length; if (!t14) throw new Error("aes/pcks5: empty ciphertext not allowed"); let o27 = n24[t14 - 1]; if (o27 <= 0 || o27 > 16) throw new Error("aes/pcks5: wrong padding"); let r19 = n24.subarray(0, -o27); for (let i20 = 0; i20 < o27; i20++) if (n24[t14 - i20 - 1] !== o27) throw new Error("aes/pcks5: wrong padding"); return r19; } function xt3(n24) { let e15 = new Uint8Array(16), t14 = V7(e15); e15.set(n24); let o27 = L10 - n24.length; for (let r19 = L10 - o27; r19 < L10; r19++) e15[r19] = o27; return t14; } function vt3(n24, e15, t14, o27, r19) { let i20 = r19 ? r19.length : 0, f46 = n24.create(t14, o27.length + i20); r19 && f46.update(r19); let c25 = z15(8 * o27.length, 8 * i20, e15); f46.update(o27), f46.update(c25); let s38 = f46.digest(); return _15(c25), s38; } function At2(n24) { return n24 instanceof Uint32Array || ArrayBuffer.isView(n24) && n24.constructor.name === "Uint32Array"; } function Y11(n24, e15) { if (s7(e15, 16, "block"), !At2(n24)) throw new Error("_encryptBlock accepts result of expandKeyLE"); let t14 = V7(e15), { s0: o27, s1: r19, s2: i20, s3: f46 } = K14(n24, t14[0], t14[1], t14[2], t14[3]); return t14[0] = o27, t14[1] = r19, t14[2] = i20, t14[3] = f46, e15; } function Ut3(n24, e15) { if (s7(e15, 16, "block"), !At2(n24)) throw new Error("_decryptBlock accepts result of expandKeyLE"); let t14 = V7(e15), { s0: o27, s1: r19, s2: i20, s3: f46 } = D15(n24, t14[0], t14[1], t14[2], t14[3]); return t14[0] = o27, t14[1] = r19, t14[2] = i20, t14[3] = f46, e15; } function Z11(n24) { let e15 = 0; for (let t14 = L10 - 1; t14 >= 0; t14--) { let o27 = (n24[t14] & 128) >>> 7; n24[t14] = n24[t14] << 1 | e15, e15 = o27; } return e15 && (n24[L10 - 1] ^= 135), n24; } function M13(n24, e15) { if (n24.length !== e15.length) throw new Error("xorBlock: blocks must have same length"); for (let t14 = 0; t14 < n24.length; t14++) n24[t14] = n24[t14] ^ e15[t14]; return n24; } function Bt2(n24, e15) { if (e15.length > n24.length) throw new Error("xorend: len(B) must be less than or equal to len(A)"); let t14 = n24.length - e15.length; for (let o27 = 0; o27 < e15.length; o27++) n24[t14 + o27] = n24[t14 + o27] ^ e15[o27]; return n24; } function ct4(n24, e15) { nt4(n24); let t14 = e15.length; if (t14 > 127) throw new Error("s2v: number of input strings must be less than or equal to 127"); if (t14 === 0) return H14(n24, Mt3); let o27 = H14(n24, V8); for (let c25 = 0; c25 < t14 - 1; c25++) { Z11(o27); let s38 = H14(n24, e15[c25]); M13(o27, s38), _15(s38); } let r19 = e15[t14 - 1], i20; if (r19.byteLength >= L10) i20 = Bt2(Uint8Array.from(r19), o27); else { let c25 = new Uint8Array(L10); c25.set(r19), c25[r19.length] = 128, i20 = M13(Z11(o27), c25), _15(c25); } let f46 = H14(n24, i20); return _15(o27, i20), f46; } var L10, lt4, V8, Mt3, Pt3, J10, rt4, zt, Nt2, ot3, Q5, at3, dt3, Ot2, R13, jt3, Vt2, Ht3, Rt, N13, Yt2, X7, ut3, Zt, gt3, Dt2, st4, Ct2, Ft2, Jt2, $11, H14, Xt2; var init_aes = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/aes.mjs?lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_polyval_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); L10 = 16; lt4 = 4; V8 = new Uint8Array(L10); Mt3 = Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); Pt3 = 283; J10 = (n24, e15, t14 = 1) => { if (!Number.isSafeInteger(t14)) throw new Error("incBytes: wrong carry " + t14); s7(n24); for (let o27 = 0; o27 < n24.length; o27++) { let r19 = e15 ? o27 : n24.length - 1 - o27; t14 = t14 + (n24[r19] & 255) | 0, n24[r19] = t14 & 255, t14 >>>= 8; } }; rt4 = (() => { let n24 = new Uint8Array(256); for (let t14 = 0, o27 = 1; t14 < 256; t14++, o27 ^= ft3(o27)) n24[t14] = o27; let e15 = new Uint8Array(256); e15[0] = 99; for (let t14 = 0; t14 < 255; t14++) { let o27 = n24[255 - t14]; o27 |= o27 << 8, e15[n24[t14]] = (o27 ^ o27 >> 4 ^ o27 >> 5 ^ o27 >> 6 ^ o27 >> 7 ^ 99) & 255; } return _15(n24), e15; })(); zt = rt4.map((n24, e15) => rt4.indexOf(e15)); Nt2 = (n24) => n24 << 24 | n24 >>> 8; ot3 = (n24) => n24 << 8 | n24 >>> 24; Q5 = (n24) => n24 << 24 & 4278190080 | n24 << 8 & 16711680 | n24 >>> 8 & 65280 | n24 >>> 24 & 255; at3 = pt3(rt4, (n24) => P12(n24, 3) << 24 | n24 << 16 | n24 << 8 | P12(n24, 2)); dt3 = pt3(zt, (n24) => P12(n24, 11) << 24 | P12(n24, 13) << 16 | P12(n24, 9) << 8 | P12(n24, 14)); Ot2 = (() => { let n24 = new Uint8Array(16); for (let e15 = 0, t14 = 1; e15 < 16; e15++, t14 = ft3(t14)) n24[e15] = t14; return n24; })(); R13 = F11({ blockSize: 16, nonceLength: 16 }, function(e15, t14) { function o27(r19, i20) { if (s7(r19), i20 !== void 0 && (s7(i20), !L9(i20))) throw new Error("unaligned destination"); let f46 = S16(e15), c25 = M12(t14), s38 = [f46, c25]; L9(r19) || s38.push(r19 = M12(r19)); let l28 = bt4(f46, c25, r19, i20); return _15(...s38), l28; } return { encrypt: (r19, i20) => o27(r19, i20), decrypt: (r19, i20) => o27(r19, i20) }; }); jt3 = F11({ blockSize: 16 }, function(e15, t14 = {}) { let o27 = !t14.disablePadding; return { encrypt(r19, i20) { let { b: f46, o: c25, out: s38 } = mt3(r19, o27, i20), l28 = S16(e15), a36 = 0; for (; a36 + 4 <= f46.length; ) { let { s0: h46, s1: u36, s2: y53, s3: g45 } = K14(l28, f46[a36 + 0], f46[a36 + 1], f46[a36 + 2], f46[a36 + 3]); c25[a36++] = h46, c25[a36++] = u36, c25[a36++] = y53, c25[a36++] = g45; } if (o27) { let h46 = xt3(r19.subarray(a36 * 4)), { s0: u36, s1: y53, s2: g45, s3: p37 } = K14(l28, h46[0], h46[1], h46[2], h46[3]); c25[a36++] = u36, c25[a36++] = y53, c25[a36++] = g45, c25[a36++] = p37; } return _15(l28), s38; }, decrypt(r19, i20) { Et3(r19); let f46 = et3(e15); i20 = q12(r19.length, i20); let c25 = [f46]; L9(r19) || c25.push(r19 = M12(r19)), D14(r19, i20); let s38 = V7(r19), l28 = V7(i20); for (let a36 = 0; a36 + 4 <= s38.length; ) { let { s0: h46, s1: u36, s2: y53, s3: g45 } = D15(f46, s38[a36 + 0], s38[a36 + 1], s38[a36 + 2], s38[a36 + 3]); l28[a36++] = h46, l28[a36++] = u36, l28[a36++] = y53, l28[a36++] = g45; } return _15(...c25), Lt2(i20, o27); } }; }); Vt2 = F11({ blockSize: 16, nonceLength: 16 }, function(e15, t14, o27 = {}) { let r19 = !o27.disablePadding; return { encrypt(i20, f46) { let c25 = S16(e15), { b: s38, o: l28, out: a36 } = mt3(i20, r19, f46), h46 = t14, u36 = [c25]; L9(h46) || u36.push(h46 = M12(h46)); let y53 = V7(h46), g45 = y53[0], p37 = y53[1], w44 = y53[2], b45 = y53[3], d31 = 0; for (; d31 + 4 <= s38.length; ) g45 ^= s38[d31 + 0], p37 ^= s38[d31 + 1], w44 ^= s38[d31 + 2], b45 ^= s38[d31 + 3], { s0: g45, s1: p37, s2: w44, s3: b45 } = K14(c25, g45, p37, w44, b45), l28[d31++] = g45, l28[d31++] = p37, l28[d31++] = w44, l28[d31++] = b45; if (r19) { let C39 = xt3(i20.subarray(d31 * 4)); g45 ^= C39[0], p37 ^= C39[1], w44 ^= C39[2], b45 ^= C39[3], { s0: g45, s1: p37, s2: w44, s3: b45 } = K14(c25, g45, p37, w44, b45), l28[d31++] = g45, l28[d31++] = p37, l28[d31++] = w44, l28[d31++] = b45; } return _15(...u36), a36; }, decrypt(i20, f46) { Et3(i20); let c25 = et3(e15), s38 = t14, l28 = [c25]; L9(s38) || l28.push(s38 = M12(s38)); let a36 = V7(s38); f46 = q12(i20.length, f46), L9(i20) || l28.push(i20 = M12(i20)), D14(i20, f46); let h46 = V7(i20), u36 = V7(f46), y53 = a36[0], g45 = a36[1], p37 = a36[2], w44 = a36[3]; for (let b45 = 0; b45 + 4 <= h46.length; ) { let d31 = y53, C39 = g45, E58 = p37, A53 = w44; y53 = h46[b45 + 0], g45 = h46[b45 + 1], p37 = h46[b45 + 2], w44 = h46[b45 + 3]; let { s0: I50, s1: q53, s2: W39, s3: j55 } = D15(c25, y53, g45, p37, w44); u36[b45++] = I50 ^ d31, u36[b45++] = q53 ^ C39, u36[b45++] = W39 ^ E58, u36[b45++] = j55 ^ A53; } return _15(...l28), Lt2(f46, r19); } }; }); Ht3 = F11({ blockSize: 16, nonceLength: 16 }, function(e15, t14) { function o27(r19, i20, f46) { s7(r19); let c25 = r19.length; if (f46 = q12(c25, f46), O11(r19, f46)) throw new Error("overlapping src and dst not supported."); let s38 = S16(e15), l28 = t14, a36 = [s38]; L9(l28) || a36.push(l28 = M12(l28)), L9(r19) || a36.push(r19 = M12(r19)); let h46 = V7(r19), u36 = V7(f46), y53 = i20 ? u36 : h46, g45 = V7(l28), p37 = g45[0], w44 = g45[1], b45 = g45[2], d31 = g45[3]; for (let E58 = 0; E58 + 4 <= h46.length; ) { let { s0: A53, s1: I50, s2: q53, s3: W39 } = K14(s38, p37, w44, b45, d31); u36[E58 + 0] = h46[E58 + 0] ^ A53, u36[E58 + 1] = h46[E58 + 1] ^ I50, u36[E58 + 2] = h46[E58 + 2] ^ q53, u36[E58 + 3] = h46[E58 + 3] ^ W39, p37 = y53[E58++], w44 = y53[E58++], b45 = y53[E58++], d31 = y53[E58++]; } let C39 = L10 * Math.floor(h46.length / lt4); if (C39 < c25) { ({ s0: p37, s1: w44, s2: b45, s3: d31 } = K14(s38, p37, w44, b45, d31)); let E58 = S15(new Uint32Array([p37, w44, b45, d31])); for (let A53 = C39, I50 = 0; A53 < c25; A53++, I50++) f46[A53] = r19[A53] ^ E58[I50]; _15(E58); } return _15(...a36), f46; } return { encrypt: (r19, i20) => o27(r19, true, i20), decrypt: (r19, i20) => o27(r19, false, i20) }; }); Rt = F11({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: true }, function(e15, t14, o27) { if (t14.length < 8) throw new Error("aes/gcm: invalid nonce length"); let r19 = 16; function i20(c25, s38, l28) { let a36 = vt3(F12, false, c25, l28, o27); for (let h46 = 0; h46 < s38.length; h46++) a36[h46] ^= s38[h46]; return a36; } function f46() { let c25 = S16(e15), s38 = V8.slice(), l28 = V8.slice(); if (z16(c25, false, l28, l28, s38), t14.length === 12) l28.set(t14); else { let h46 = V8.slice(); b11(h46).setBigUint64(8, BigInt(t14.length * 8), false); let y53 = F12.create(s38).update(t14).update(h46); y53.digestInto(l28), y53.destroy(); } let a36 = z16(c25, false, l28, V8); return { xk: c25, authKey: s38, counter: l28, tagMask: a36 }; } return { encrypt(c25) { let { xk: s38, authKey: l28, counter: a36, tagMask: h46 } = f46(), u36 = new Uint8Array(c25.length + r19), y53 = [s38, l28, a36, h46]; L9(c25) || y53.push(c25 = M12(c25)), z16(s38, false, a36, c25, u36.subarray(0, c25.length)); let g45 = i20(l28, h46, u36.subarray(0, u36.length - r19)); return y53.push(g45), u36.set(g45, c25.length), _15(...y53), u36; }, decrypt(c25) { let { xk: s38, authKey: l28, counter: a36, tagMask: h46 } = f46(), u36 = [s38, l28, h46, a36]; L9(c25) || u36.push(c25 = M12(c25)); let y53 = c25.subarray(0, -r19), g45 = c25.subarray(-r19), p37 = i20(l28, h46, y53); if (u36.push(p37), !k17(p37, g45)) throw new Error("aes/gcm: invalid ghash tag"); let w44 = z16(s38, false, a36, y53); return _15(...u36), w44; } }; }); N13 = (n24, e15, t14) => (o27) => { if (!Number.isSafeInteger(o27) || e15 > o27 || o27 > t14) { let r19 = "[" + e15 + ".." + t14 + "]"; throw new Error("" + n24 + ": expected value in range " + r19 + ", got " + o27); } }; Yt2 = F11({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: true }, function(e15, t14, o27) { let i20 = N13("AAD", 0, 68719476736), f46 = N13("plaintext", 0, 2 ** 36), c25 = N13("nonce", 12, 12), s38 = N13("ciphertext", 16, 2 ** 36 + 16); s7(e15), nt4(e15), c25(t14.length), o27 !== void 0 && i20(o27.length); function l28() { let u36 = S16(e15), y53 = new Uint8Array(e15.length), g45 = new Uint8Array(16), p37 = [u36, y53], w44 = t14; L9(w44) || p37.push(w44 = M12(w44)); let b45 = V7(w44), d31 = 0, C39 = b45[0], E58 = b45[1], A53 = b45[2], I50 = 0; for (let W39 of [g45, y53].map(V7)) { let j55 = V7(W39); for (let F40 = 0; F40 < j55.length; F40 += 2) { let { s0: Kt8, s1: St11 } = K14(u36, d31, C39, E58, A53); j55[F40 + 0] = Kt8, j55[F40 + 1] = St11, d31 = ++I50; } } let q53 = { authKey: g45, encKey: S16(y53) }; return _15(...p37), q53; } function a36(u36, y53, g45) { let p37 = vt3(G10, true, y53, g45, o27); for (let A53 = 0; A53 < 12; A53++) p37[A53] ^= t14[A53]; p37[15] &= 127; let w44 = V7(p37), b45 = w44[0], d31 = w44[1], C39 = w44[2], E58 = w44[3]; return { s0: b45, s1: d31, s2: C39, s3: E58 } = K14(u36, b45, d31, C39, E58), w44[0] = b45, w44[1] = d31, w44[2] = C39, w44[3] = E58, p37; } function h46(u36, y53, g45) { let p37 = M12(y53); p37[15] |= 128; let w44 = z16(u36, true, p37, g45); return _15(p37), w44; } return { encrypt(u36) { f46(u36.length); let { encKey: y53, authKey: g45 } = l28(), p37 = a36(y53, g45, u36), w44 = [y53, g45, p37]; L9(u36) || w44.push(u36 = M12(u36)); let b45 = new Uint8Array(u36.length + 16); return b45.set(p37, u36.length), b45.set(h46(y53, p37, u36)), _15(...w44), b45; }, decrypt(u36) { s38(u36.length); let y53 = u36.subarray(-16), { encKey: g45, authKey: p37 } = l28(), w44 = [g45, p37]; L9(u36) || w44.push(u36 = M12(u36)); let b45 = h46(g45, y53, u36.subarray(0, -16)), d31 = a36(g45, p37, b45); if (w44.push(d31), !k17(y53, d31)) throw _15(...w44), new Error("invalid polyval tag"); return _15(...w44), b45; } }; }); X7 = { encrypt(n24, e15) { if (e15.length >= 2 ** 32) throw new Error("plaintext should be less than 4gb"); let t14 = S16(n24); if (e15.length === 16) Y11(t14, e15); else { let o27 = V7(e15), r19 = o27[0], i20 = o27[1]; for (let f46 = 0, c25 = 1; f46 < 6; f46++) for (let s38 = 2; s38 < o27.length; s38 += 2, c25++) { let { s0: l28, s1: a36, s2: h46, s3: u36 } = K14(t14, r19, i20, o27[s38], o27[s38 + 1]); r19 = l28, i20 = a36 ^ Q5(c25), o27[s38] = h46, o27[s38 + 1] = u36; } o27[0] = r19, o27[1] = i20; } t14.fill(0); }, decrypt(n24, e15) { if (e15.length - 8 >= 2 ** 32) throw new Error("ciphertext should be less than 4gb"); let t14 = et3(n24), o27 = e15.length / 8 - 1; if (o27 === 1) Ut3(t14, e15); else { let r19 = V7(e15), i20 = r19[0], f46 = r19[1]; for (let c25 = 0, s38 = o27 * 6; c25 < 6; c25++) for (let l28 = o27 * 2; l28 >= 1; l28 -= 2, s38--) { f46 ^= Q5(s38); let { s0: a36, s1: h46, s2: u36, s3: y53 } = D15(t14, i20, f46, r19[l28], r19[l28 + 1]); i20 = a36, f46 = h46, r19[l28] = u36, r19[l28 + 1] = y53; } r19[0] = i20, r19[1] = f46; } t14.fill(0); } }; ut3 = new Uint8Array(8).fill(166); Zt = F11({ blockSize: 8 }, (n24) => ({ encrypt(e15) { if (!e15.length || e15.length % 8 !== 0) throw new Error("invalid plaintext length"); if (e15.length === 8) throw new Error("8-byte keys not allowed in AESKW, use AESKWP instead"); let t14 = T14(ut3, e15); return X7.encrypt(n24, t14), t14; }, decrypt(e15) { if (e15.length % 8 !== 0 || e15.length < 24) throw new Error("invalid ciphertext length"); let t14 = M12(e15); if (X7.decrypt(n24, t14), !k17(t14.subarray(0, 8), ut3)) throw new Error("integrity check failed"); return t14.subarray(0, 8).fill(0), t14.subarray(8); } })); gt3 = 2790873510; Dt2 = F11({ blockSize: 8 }, (n24) => ({ encrypt(e15) { if (!e15.length) throw new Error("invalid plaintext length"); let t14 = Math.ceil(e15.length / 8) * 8, o27 = new Uint8Array(8 + t14); o27.set(e15, 8); let r19 = V7(o27); return r19[0] = gt3, r19[1] = Q5(e15.length), X7.encrypt(n24, o27), o27; }, decrypt(e15) { if (e15.length < 16) throw new Error("invalid ciphertext length"); let t14 = M12(e15), o27 = V7(t14); X7.decrypt(n24, t14); let r19 = Q5(o27[1]) >>> 0, i20 = Math.ceil(r19 / 8) * 8; if (o27[0] !== gt3 || t14.length - 8 !== i20) throw new Error("integrity check failed"); for (let f46 = r19; f46 < i20; f46++) if (t14[8 + f46] !== 0) throw new Error("integrity check failed"); return t14.subarray(0, 8).fill(0), t14.subarray(8, 8 + r19); } })); st4 = class { blockLen; key; nonce; state; reseedCnt; constructor(e15, t14, o27) { this.blockLen = R13.blockSize; let r19 = e15 / 8, i20 = 16; this.state = new Uint8Array(r19 + i20), this.key = this.state.subarray(0, r19), this.nonce = this.state.subarray(r19, r19 + i20), this.reseedCnt = 1, J10(this.nonce, false, 1), this.addEntropy(t14, o27); } update(e15) { if (R13(this.key, this.nonce).encrypt(new Uint8Array(this.state.length), this.state), e15) { s7(e15); for (let t14 = 0; t14 < e15.length; t14++) this.state[t14] ^= e15[t14]; } J10(this.nonce, false, 1); } addEntropy(e15, t14) { s7(e15, this.state.length, "seed"); let o27 = e15.slice(); if (t14) { if (s7(t14), t14.length > o27.length) throw new Error("info length is too big"); for (let r19 = 0; r19 < t14.length; r19++) o27[r19] ^= t14[r19]; } this.update(o27), o27.fill(0), this.reseedCnt = 1; } randomBytes(e15, t14) { if (x12(e15), this.reseedCnt++ >= 2 ** 48) throw new Error("entropy exhausted"); t14 && this.update(t14); let o27 = new Uint8Array(e15); return R13(this.key, this.nonce).encrypt(o27, o27), J10(this.nonce, false, Math.ceil(e15 / this.blockLen)), this.update(t14), o27; } clean() { this.state.fill(0), this.reseedCnt = 0; } }; Ct2 = (n24) => (e15, t14 = void 0) => new st4(n24, e15, t14); Ft2 = Ct2(128); Jt2 = Ct2(256); $11 = class { buffer; destroyed; k1; k2; xk; constructor(e15) { s7(e15), nt4(e15), this.xk = S16(e15), this.buffer = new Uint8Array(0), this.destroyed = false; let t14 = new Uint8Array(L10); Y11(this.xk, t14), this.k1 = Z11(t14), this.k2 = Z11(new Uint8Array(this.k1)); } update(e15) { let { destroyed: t14, buffer: o27 } = this; if (t14) throw new Error("CMAC instance was destroyed"); s7(e15); let r19 = new Uint8Array(o27.length + e15.length); return r19.set(o27), r19.set(e15, o27.length), this.buffer = r19, this; } digest() { if (this.destroyed) throw new Error("CMAC instance was destroyed"); let { buffer: e15 } = this, t14 = e15.length, o27 = Math.ceil(t14 / L10), r19; o27 === 0 ? (o27 = 1, r19 = false) : r19 = t14 % L10 === 0; let i20 = (o27 - 1) * L10, f46 = e15.subarray(i20), c25; if (r19) c25 = M13(new Uint8Array(f46), this.k1); else { let l28 = new Uint8Array(L10); l28.set(f46), l28[f46.length] = 128, c25 = M13(l28, this.k2); } let s38 = new Uint8Array(L10); for (let l28 = 0; l28 < o27 - 1; l28++) { let a36 = e15.subarray(l28 * L10, (l28 + 1) * L10); M13(s38, a36), Y11(this.xk, s38); } return M13(s38, c25), Y11(this.xk, s38), _15(c25), s38; } destroy() { let { buffer: e15, destroyed: t14, xk: o27, k1: r19, k2: i20 } = this; t14 || (this.destroyed = true, _15(e15, o27, r19, i20)); } }; H14 = (n24, e15) => new $11(n24).update(e15).digest(); H14.create = (n24) => new $11(n24); Xt2 = F11({ blockSize: 16, tagLength: 16 }, function(e15, ...t14) { let o27 = N13("plaintext", 0, 5444517870735016e24), r19 = N13("ciphertext", 16, 2 ** 132 + 16); if (t14.length > 126) throw new Error('"AAD" number of elements must be less than or equal to 126'); if (t14.forEach((c25) => s7(c25)), s7(e15), ![32, 48, 64].includes(e15.length)) throw new Error('"aes key" expected Uint8Array of length 32/48/64, got length=' + e15.length); let i20 = e15.subarray(0, e15.length / 2), f46 = e15.subarray(e15.length / 2); return { encrypt(c25) { o27(c25.length); let s38 = ct4(i20, [...t14, c25]), l28 = Uint8Array.from(s38); l28[8] &= 127, l28[12] &= 127; let a36 = R13(f46, l28).encrypt(c25); return T14(s38, a36); }, decrypt(c25) { r19(c25.length); let s38 = c25.subarray(0, L10), l28 = c25.subarray(L10), a36 = Uint8Array.from(s38); a36[8] &= 127, a36[12] &= 127; let h46 = R13(f46, a36).decrypt(l28), u36 = ct4(i20, [...t14, h46]); if (k17(u36, s38)) return h46; throw new Error("invalid siv tag"); } }; }); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/aes.js?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_aes2 = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/aes.js?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_aes(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/_arx.mjs?lp=node_modules%252F%2540noble%252Fciphers function F13(r19, t14) { return r19 << t14 | r19 >>> 32 - t14; } function A14(r19) { return r19.byteOffset % 4 === 0; } function q14(r19, t14, e15, s38, i20, h46, o27, a36) { let n24 = i20.length, d31 = new Uint8Array(m11), f46 = V7(d31), u36 = A14(i20) && A14(h46), g45 = u36 ? V7(i20) : M14, w44 = u36 ? V7(h46) : M14; for (let y53 = 0; y53 < n24; o27++) { if (r19(t14, e15, s38, f46, o27, a36), o27 >= O13) throw new Error("arx: counter overflow"); let b45 = Math.min(m11, n24 - y53); if (u36 && b45 === m11) { let l28 = y53 / 4; if (y53 % 4 !== 0) throw new Error("arx: invalid block position"); for (let c25 = 0, k51; c25 < T15; c25++) k51 = l28 + c25, w44[k51] = g45[k51] ^ f46[c25]; y53 += m11; continue; } for (let l28 = 0, c25; l28 < b45; l28++) c25 = y53 + l28, h46[c25] = i20[c25] ^ d31[l28]; y53 += b45; } } function Y12(r19, t14) { let { allowShortKeys: e15, extendNonceFn: s38, counterLength: i20, counterRight: h46, rounds: o27 } = R12({ allowShortKeys: false, counterLength: 8, counterRight: false, rounds: 20 }, t14); if (typeof r19 != "function") throw new Error("core must be a function"); return x12(i20), x12(o27), w10(h46), w10(e15), (a36, n24, d31, f46, u36 = 0) => { s7(a36, void 0, "key"), s7(n24, void 0, "nonce"), s7(d31, void 0, "data"); let g45 = d31.length; if (f46 === void 0 && (f46 = new Uint8Array(g45)), s7(f46, void 0, "output"), x12(u36), u36 < 0 || u36 >= O13) throw new Error("arx: counter overflow"); if (f46.length < g45) throw new Error(`arx: output (${f46.length}) is shorter than data (${g45})`); let w44 = [], y53 = a36.length, b45, l28; if (y53 === 32) w44.push(b45 = M12(a36)), l28 = S17; else if (y53 === 16 && e15) b45 = new Uint8Array(32), b45.set(a36), b45.set(a36, 16), l28 = P13, w44.push(b45); else throw s7(a36, 32, "arx key"), new Error("invalid key size"); A14(n24) || w44.push(n24 = M12(n24)); let c25 = V7(b45); if (s38) { if (n24.length !== 24) throw new Error("arx: extended nonce must be 24 bytes"); s38(l28, c25, V7(n24.subarray(0, 16)), c25), n24 = n24.subarray(16); } let k51 = 16 - i20; if (k51 !== n24.length) throw new Error(`arx: nonce must be ${k51} or 16 bytes`); if (k51 !== 12) { let U37 = new Uint8Array(12); U37.set(n24, h46 ? 0 : 12 - n24.length), n24 = U37, w44.push(n24); } let j55 = V7(n24); return q14(r19, l28, c25, j55, d31, f46, u36, o27), _15(...w44), f46; }; } var N14, R14, $12, P13, S17, m11, T15, O13, M14, E16, D16; var init_arx = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/_arx.mjs?lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); N14 = (r19) => Uint8Array.from(r19.split(""), (t14) => t14.charCodeAt(0)); R14 = N14("expand 16-byte k"); $12 = N14("expand 32-byte k"); P13 = V7(R14); S17 = V7($12); m11 = 64; T15 = 16; O13 = 2 ** 32 - 1; M14 = Uint32Array.of(); E16 = class r2 { blockLen; keyLen; nonceLen; state; buf; key; nonce; pos; ctr; cipher; constructor(t14, e15, s38, i20, h46) { this.cipher = t14, this.blockLen = e15, this.keyLen = s38, this.nonceLen = i20, this.state = new Uint8Array(this.keyLen + this.nonceLen), this.reseed(h46), this.ctr = 0, this.pos = this.blockLen, this.buf = new Uint8Array(this.blockLen), this.key = this.state.subarray(0, this.keyLen), this.nonce = this.state.subarray(this.keyLen); } reseed(t14) { if (s7(t14), !t14 || t14.length === 0) throw new Error("entropy required"); for (let e15 = 0; e15 < t14.length; e15++) this.state[e15 % this.state.length] ^= t14[e15]; this.ctr = 0, this.pos = this.blockLen; } addEntropy(t14) { this.state.set(this.randomBytes(this.state.length)), this.reseed(t14); } randomBytes(t14) { if (x12(t14), t14 === 0) return new Uint8Array(0); let e15 = new Uint8Array(t14), s38 = 0; if (this.pos < this.blockLen) { let o27 = Math.min(t14, this.blockLen - this.pos); if (e15.set(this.buf.subarray(this.pos, this.pos + o27), 0), this.pos += o27, s38 += o27, s38 === t14) return e15; } let i20 = Math.floor((t14 - s38) / this.blockLen); if (i20 > 0) { let o27 = i20 * this.blockLen, a36 = e15.subarray(s38, s38 + o27); this.cipher(this.key, this.nonce, a36, a36, this.ctr), this.ctr += i20, s38 += o27; } let h46 = t14 - s38; return h46 > 0 && (this.buf.fill(0), this.cipher(this.key, this.nonce, this.buf, this.buf, this.ctr++), e15.set(this.buf.subarray(0, h46), s38), this.pos = h46), e15; } clone() { return new r2(this.cipher, this.blockLen, this.keyLen, this.nonceLen, this.randomBytes(this.state.length)); } clean() { this.pos = 0, this.ctr = 0, this.buf.fill(0), this.state.fill(0); } }; D16 = (r19, t14, e15, s38) => (i20 = H13(32)) => new E16(r19, t14, e15, s38, i20); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/_arx?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_arx_target_esnext_lp_node_modules_252F_2540noble_252Fciphers = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/_arx?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_arx(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/_poly1305.mjs?lp=node_modules%252F%2540noble%252Fciphers function c8(v43, f46) { return v43[f46++] & 255 | (v43[f46++] & 255) << 8; } function k19(v43) { let f46 = (e15, o27) => v43(o27).update(e15).digest(), i20 = v43(new Uint8Array(32)); return f46.outputLen = i20.outputLen, f46.blockLen = i20.blockLen, f46.create = (e15) => v43(e15), f46; } var j13, rf; var init_poly1305 = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/_poly1305.mjs?lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); j13 = class { blockLen = 16; outputLen = 16; buffer = new Uint8Array(16); r = new Uint16Array(10); h = new Uint16Array(10); pad = new Uint16Array(8); pos = 0; finished = false; constructor(f46) { f46 = M12(s7(f46, 32, "key")); let i20 = c8(f46, 0), e15 = c8(f46, 2), o27 = c8(f46, 4), s38 = c8(f46, 6), r19 = c8(f46, 8), t14 = c8(f46, 10), h46 = c8(f46, 12), l28 = c8(f46, 14); this.r[0] = i20 & 8191, this.r[1] = (i20 >>> 13 | e15 << 3) & 8191, this.r[2] = (e15 >>> 10 | o27 << 6) & 7939, this.r[3] = (o27 >>> 7 | s38 << 9) & 8191, this.r[4] = (s38 >>> 4 | r19 << 12) & 255, this.r[5] = r19 >>> 1 & 8190, this.r[6] = (r19 >>> 14 | t14 << 2) & 8191, this.r[7] = (t14 >>> 11 | h46 << 5) & 8065, this.r[8] = (h46 >>> 8 | l28 << 8) & 8191, this.r[9] = l28 >>> 5 & 127; for (let x50 = 0; x50 < 8; x50++) this.pad[x50] = c8(f46, 16 + 2 * x50); } process(f46, i20, e15 = false) { let o27 = e15 ? 0 : 2048, { h: s38, r: r19 } = this, t14 = r19[0], h46 = r19[1], l28 = r19[2], x50 = r19[3], u36 = r19[4], p37 = r19[5], b45 = r19[6], a36 = r19[7], g45 = r19[8], d31 = r19[9], q53 = c8(f46, i20 + 0), F40 = c8(f46, i20 + 2), G45 = c8(f46, i20 + 4), J35 = c8(f46, i20 + 6), R49 = c8(f46, i20 + 8), Q38 = c8(f46, i20 + 10), S60 = c8(f46, i20 + 12), V34 = c8(f46, i20 + 14), y53 = s38[0] + (q53 & 8191), B45 = s38[1] + ((q53 >>> 13 | F40 << 3) & 8191), I50 = s38[2] + ((F40 >>> 10 | G45 << 6) & 8191), m37 = s38[3] + ((G45 >>> 7 | J35 << 9) & 8191), L49 = s38[4] + ((J35 >>> 4 | R49 << 12) & 8191), _48 = s38[5] + (R49 >>> 1 & 8191), w44 = s38[6] + ((R49 >>> 14 | Q38 << 2) & 8191), U37 = s38[7] + ((Q38 >>> 11 | S60 << 5) & 8191), A53 = s38[8] + ((S60 >>> 8 | V34 << 8) & 8191), T53 = s38[9] + (V34 >>> 5 | o27), n24 = 0, P43 = n24 + y53 * t14 + B45 * (5 * d31) + I50 * (5 * g45) + m37 * (5 * a36) + L49 * (5 * b45); n24 = P43 >>> 13, P43 &= 8191, P43 += _48 * (5 * p37) + w44 * (5 * u36) + U37 * (5 * x50) + A53 * (5 * l28) + T53 * (5 * h46), n24 += P43 >>> 13, P43 &= 8191; let W39 = n24 + y53 * h46 + B45 * t14 + I50 * (5 * d31) + m37 * (5 * g45) + L49 * (5 * a36); n24 = W39 >>> 13, W39 &= 8191, W39 += _48 * (5 * b45) + w44 * (5 * p37) + U37 * (5 * u36) + A53 * (5 * x50) + T53 * (5 * l28), n24 += W39 >>> 13, W39 &= 8191; let z47 = n24 + y53 * l28 + B45 * h46 + I50 * t14 + m37 * (5 * d31) + L49 * (5 * g45); n24 = z47 >>> 13, z47 &= 8191, z47 += _48 * (5 * a36) + w44 * (5 * b45) + U37 * (5 * p37) + A53 * (5 * u36) + T53 * (5 * x50), n24 += z47 >>> 13, z47 &= 8191; let E58 = n24 + y53 * x50 + B45 * l28 + I50 * h46 + m37 * t14 + L49 * (5 * d31); n24 = E58 >>> 13, E58 &= 8191, E58 += _48 * (5 * g45) + w44 * (5 * a36) + U37 * (5 * b45) + A53 * (5 * p37) + T53 * (5 * u36), n24 += E58 >>> 13, E58 &= 8191; let M50 = n24 + y53 * u36 + B45 * x50 + I50 * l28 + m37 * h46 + L49 * t14; n24 = M50 >>> 13, M50 &= 8191, M50 += _48 * (5 * d31) + w44 * (5 * g45) + U37 * (5 * a36) + A53 * (5 * b45) + T53 * (5 * p37), n24 += M50 >>> 13, M50 &= 8191; let N56 = n24 + y53 * p37 + B45 * u36 + I50 * x50 + m37 * l28 + L49 * h46; n24 = N56 >>> 13, N56 &= 8191, N56 += _48 * t14 + w44 * (5 * d31) + U37 * (5 * g45) + A53 * (5 * a36) + T53 * (5 * b45), n24 += N56 >>> 13, N56 &= 8191; let O53 = n24 + y53 * b45 + B45 * p37 + I50 * u36 + m37 * x50 + L49 * l28; n24 = O53 >>> 13, O53 &= 8191, O53 += _48 * h46 + w44 * t14 + U37 * (5 * d31) + A53 * (5 * g45) + T53 * (5 * a36), n24 += O53 >>> 13, O53 &= 8191; let C39 = n24 + y53 * a36 + B45 * b45 + I50 * p37 + m37 * u36 + L49 * x50; n24 = C39 >>> 13, C39 &= 8191, C39 += _48 * l28 + w44 * h46 + U37 * t14 + A53 * (5 * d31) + T53 * (5 * g45), n24 += C39 >>> 13, C39 &= 8191; let H43 = n24 + y53 * g45 + B45 * a36 + I50 * b45 + m37 * p37 + L49 * u36; n24 = H43 >>> 13, H43 &= 8191, H43 += _48 * x50 + w44 * l28 + U37 * h46 + A53 * t14 + T53 * (5 * d31), n24 += H43 >>> 13, H43 &= 8191; let K45 = n24 + y53 * d31 + B45 * g45 + I50 * a36 + m37 * b45 + L49 * p37; n24 = K45 >>> 13, K45 &= 8191, K45 += _48 * u36 + w44 * x50 + U37 * l28 + A53 * h46 + T53 * t14, n24 += K45 >>> 13, K45 &= 8191, n24 = (n24 << 2) + n24 | 0, n24 = n24 + P43 | 0, P43 = n24 & 8191, n24 = n24 >>> 13, W39 += n24, s38[0] = P43, s38[1] = W39, s38[2] = z47, s38[3] = E58, s38[4] = M50, s38[5] = N56, s38[6] = O53, s38[7] = C39, s38[8] = H43, s38[9] = K45; } finalize() { let { h: f46, pad: i20 } = this, e15 = new Uint16Array(10), o27 = f46[1] >>> 13; f46[1] &= 8191; for (let t14 = 2; t14 < 10; t14++) f46[t14] += o27, o27 = f46[t14] >>> 13, f46[t14] &= 8191; f46[0] += o27 * 5, o27 = f46[0] >>> 13, f46[0] &= 8191, f46[1] += o27, o27 = f46[1] >>> 13, f46[1] &= 8191, f46[2] += o27, e15[0] = f46[0] + 5, o27 = e15[0] >>> 13, e15[0] &= 8191; for (let t14 = 1; t14 < 10; t14++) e15[t14] = f46[t14] + o27, o27 = e15[t14] >>> 13, e15[t14] &= 8191; e15[9] -= 8192; let s38 = (o27 ^ 1) - 1; for (let t14 = 0; t14 < 10; t14++) e15[t14] &= s38; s38 = ~s38; for (let t14 = 0; t14 < 10; t14++) f46[t14] = f46[t14] & s38 | e15[t14]; f46[0] = (f46[0] | f46[1] << 13) & 65535, f46[1] = (f46[1] >>> 3 | f46[2] << 10) & 65535, f46[2] = (f46[2] >>> 6 | f46[3] << 7) & 65535, f46[3] = (f46[3] >>> 9 | f46[4] << 4) & 65535, f46[4] = (f46[4] >>> 12 | f46[5] << 1 | f46[6] << 14) & 65535, f46[5] = (f46[6] >>> 2 | f46[7] << 11) & 65535, f46[6] = (f46[7] >>> 5 | f46[8] << 8) & 65535, f46[7] = (f46[8] >>> 8 | f46[9] << 5) & 65535; let r19 = f46[0] + i20[0]; f46[0] = r19 & 65535; for (let t14 = 1; t14 < 8; t14++) r19 = (f46[t14] + i20[t14] | 0) + (r19 >>> 16) | 0, f46[t14] = r19 & 65535; _15(e15); } update(f46) { N12(this), s7(f46), f46 = M12(f46); let { buffer: i20, blockLen: e15 } = this, o27 = f46.length; for (let s38 = 0; s38 < o27; ) { let r19 = Math.min(e15 - this.pos, o27 - s38); if (r19 === e15) { for (; e15 <= o27 - s38; s38 += e15) this.process(f46, s38); continue; } i20.set(f46.subarray(s38, s38 + r19), this.pos), this.pos += r19, s38 += r19, this.pos === e15 && (this.process(i20, 0, false), this.pos = 0); } return this; } destroy() { _15(this.h, this.r, this.buffer, this.pad); } digestInto(f46) { N12(this), C10(f46, this), this.finished = true; let { buffer: i20, h: e15 } = this, { pos: o27 } = this; if (o27) { for (i20[o27++] = 1; o27 < 16; o27++) i20[o27] = 0; this.process(i20, 0, true); } this.finalize(); let s38 = 0; for (let r19 = 0; r19 < 8; r19++) f46[s38++] = e15[r19] >>> 0, f46[s38++] = e15[r19] >>> 8; return f46; } digest() { let { buffer: f46, outputLen: i20 } = this; this.digestInto(f46); let e15 = f46.slice(0, i20); return this.destroy(), e15; } }; rf = k19((v43) => new j13(v43)); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/_poly1305?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_poly1305_target_esnext_lp_node_modules_252F_2540noble_252Fciphers = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/_poly1305?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_poly1305(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/chacha.mjs?lp=node_modules%252F%2540noble%252Fciphers function u10(l28, a36, g45, t14, h46, r19 = 20) { let n24 = l28[0], c25 = l28[1], o27 = l28[2], s38 = l28[3], L49 = a36[0], x50 = a36[1], R49 = a36[2], w44 = a36[3], m37 = a36[4], C39 = a36[5], y53 = a36[6], f46 = a36[7], i20 = h46, d31 = g45[0], N56 = g45[1], Q38 = g45[2], U37 = n24, K45 = c25, S60 = o27, _48 = s38, b45 = L49, E58 = x50, O53 = R49, P43 = w44, v43 = m37, z47 = C39, T53 = y53, Z39 = f46, q53 = i20, B45 = d31, F40 = N56, G45 = Q38; for (let I50 = 0; I50 < r19; I50 += 2) U37 = U37 + b45 | 0, q53 = F13(q53 ^ U37, 16), v43 = v43 + q53 | 0, b45 = F13(b45 ^ v43, 12), U37 = U37 + b45 | 0, q53 = F13(q53 ^ U37, 8), v43 = v43 + q53 | 0, b45 = F13(b45 ^ v43, 7), K45 = K45 + E58 | 0, B45 = F13(B45 ^ K45, 16), z47 = z47 + B45 | 0, E58 = F13(E58 ^ z47, 12), K45 = K45 + E58 | 0, B45 = F13(B45 ^ K45, 8), z47 = z47 + B45 | 0, E58 = F13(E58 ^ z47, 7), S60 = S60 + O53 | 0, F40 = F13(F40 ^ S60, 16), T53 = T53 + F40 | 0, O53 = F13(O53 ^ T53, 12), S60 = S60 + O53 | 0, F40 = F13(F40 ^ S60, 8), T53 = T53 + F40 | 0, O53 = F13(O53 ^ T53, 7), _48 = _48 + P43 | 0, G45 = F13(G45 ^ _48, 16), Z39 = Z39 + G45 | 0, P43 = F13(P43 ^ Z39, 12), _48 = _48 + P43 | 0, G45 = F13(G45 ^ _48, 8), Z39 = Z39 + G45 | 0, P43 = F13(P43 ^ Z39, 7), U37 = U37 + E58 | 0, G45 = F13(G45 ^ U37, 16), T53 = T53 + G45 | 0, E58 = F13(E58 ^ T53, 12), U37 = U37 + E58 | 0, G45 = F13(G45 ^ U37, 8), T53 = T53 + G45 | 0, E58 = F13(E58 ^ T53, 7), K45 = K45 + O53 | 0, q53 = F13(q53 ^ K45, 16), Z39 = Z39 + q53 | 0, O53 = F13(O53 ^ Z39, 12), K45 = K45 + O53 | 0, q53 = F13(q53 ^ K45, 8), Z39 = Z39 + q53 | 0, O53 = F13(O53 ^ Z39, 7), S60 = S60 + P43 | 0, B45 = F13(B45 ^ S60, 16), v43 = v43 + B45 | 0, P43 = F13(P43 ^ v43, 12), S60 = S60 + P43 | 0, B45 = F13(B45 ^ S60, 8), v43 = v43 + B45 | 0, P43 = F13(P43 ^ v43, 7), _48 = _48 + b45 | 0, F40 = F13(F40 ^ _48, 16), z47 = z47 + F40 | 0, b45 = F13(b45 ^ z47, 12), _48 = _48 + b45 | 0, F40 = F13(F40 ^ _48, 8), z47 = z47 + F40 | 0, b45 = F13(b45 ^ z47, 7); let p37 = 0; t14[p37++] = n24 + U37 | 0, t14[p37++] = c25 + K45 | 0, t14[p37++] = o27 + S60 | 0, t14[p37++] = s38 + _48 | 0, t14[p37++] = L49 + b45 | 0, t14[p37++] = x50 + E58 | 0, t14[p37++] = R49 + O53 | 0, t14[p37++] = w44 + P43 | 0, t14[p37++] = m37 + v43 | 0, t14[p37++] = C39 + z47 | 0, t14[p37++] = y53 + T53 | 0, t14[p37++] = f46 + Z39 | 0, t14[p37++] = i20 + q53 | 0, t14[p37++] = d31 + B45 | 0, t14[p37++] = N56 + F40 | 0, t14[p37++] = Q38 + G45 | 0; } function e0(l28, a36, g45, t14) { let h46 = l28[0], r19 = l28[1], n24 = l28[2], c25 = l28[3], o27 = a36[0], s38 = a36[1], L49 = a36[2], x50 = a36[3], R49 = a36[4], w44 = a36[5], m37 = a36[6], C39 = a36[7], y53 = g45[0], f46 = g45[1], i20 = g45[2], d31 = g45[3]; for (let Q38 = 0; Q38 < 20; Q38 += 2) h46 = h46 + o27 | 0, y53 = F13(y53 ^ h46, 16), R49 = R49 + y53 | 0, o27 = F13(o27 ^ R49, 12), h46 = h46 + o27 | 0, y53 = F13(y53 ^ h46, 8), R49 = R49 + y53 | 0, o27 = F13(o27 ^ R49, 7), r19 = r19 + s38 | 0, f46 = F13(f46 ^ r19, 16), w44 = w44 + f46 | 0, s38 = F13(s38 ^ w44, 12), r19 = r19 + s38 | 0, f46 = F13(f46 ^ r19, 8), w44 = w44 + f46 | 0, s38 = F13(s38 ^ w44, 7), n24 = n24 + L49 | 0, i20 = F13(i20 ^ n24, 16), m37 = m37 + i20 | 0, L49 = F13(L49 ^ m37, 12), n24 = n24 + L49 | 0, i20 = F13(i20 ^ n24, 8), m37 = m37 + i20 | 0, L49 = F13(L49 ^ m37, 7), c25 = c25 + x50 | 0, d31 = F13(d31 ^ c25, 16), C39 = C39 + d31 | 0, x50 = F13(x50 ^ C39, 12), c25 = c25 + x50 | 0, d31 = F13(d31 ^ c25, 8), C39 = C39 + d31 | 0, x50 = F13(x50 ^ C39, 7), h46 = h46 + s38 | 0, d31 = F13(d31 ^ h46, 16), m37 = m37 + d31 | 0, s38 = F13(s38 ^ m37, 12), h46 = h46 + s38 | 0, d31 = F13(d31 ^ h46, 8), m37 = m37 + d31 | 0, s38 = F13(s38 ^ m37, 7), r19 = r19 + L49 | 0, y53 = F13(y53 ^ r19, 16), C39 = C39 + y53 | 0, L49 = F13(L49 ^ C39, 12), r19 = r19 + L49 | 0, y53 = F13(y53 ^ r19, 8), C39 = C39 + y53 | 0, L49 = F13(L49 ^ C39, 7), n24 = n24 + x50 | 0, f46 = F13(f46 ^ n24, 16), R49 = R49 + f46 | 0, x50 = F13(x50 ^ R49, 12), n24 = n24 + x50 | 0, f46 = F13(f46 ^ n24, 8), R49 = R49 + f46 | 0, x50 = F13(x50 ^ R49, 7), c25 = c25 + o27 | 0, i20 = F13(i20 ^ c25, 16), w44 = w44 + i20 | 0, o27 = F13(o27 ^ w44, 12), c25 = c25 + o27 | 0, i20 = F13(i20 ^ c25, 8), w44 = w44 + i20 | 0, o27 = F13(o27 ^ w44, 7); let N56 = 0; t14[N56++] = h46, t14[N56++] = r19, t14[N56++] = n24, t14[N56++] = c25, t14[N56++] = y53, t14[N56++] = f46, t14[N56++] = i20, t14[N56++] = d31; } function V9(l28, a36, g45, t14, h46) { h46 !== void 0 && s7(h46, void 0, "AAD"); let r19 = l28(a36, g45, h02), n24 = z15(t14.length, h46 ? h46.length : 0, true), c25 = rf.create(r19); h46 && M15(c25, h46), M15(c25, t14), c25.update(n24); let o27 = c25.digest(); return _15(r19, n24), o27; } var n02, t0, a02, r02, g0, c02, M15, h02, Y13, y0, f02, i02, d0; var init_chacha = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/esnext/chacha.mjs?lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_arx_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); init_poly1305_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fciphers(); n02 = Y12(u10, { counterRight: false, counterLength: 8, allowShortKeys: true }); t0 = Y12(u10, { counterRight: false, counterLength: 4, allowShortKeys: false }); a02 = Y12(u10, { counterRight: false, counterLength: 8, extendNonceFn: e0, allowShortKeys: false }); r02 = Y12(u10, { counterRight: false, counterLength: 4, rounds: 8 }); g0 = Y12(u10, { counterRight: false, counterLength: 4, rounds: 12 }); c02 = new Uint8Array(16); M15 = (l28, a36) => { l28.update(a36); let g45 = a36.length % 16; g45 && l28.update(c02.subarray(g45)); }; h02 = new Uint8Array(32); Y13 = (l28) => (a36, g45, t14) => ({ encrypt(r19, n24) { let c25 = r19.length; n24 = q12(c25 + 16, n24, false), n24.set(r19); let o27 = n24.subarray(0, -16); l28(a36, g45, o27, o27, 1); let s38 = V9(l28, a36, g45, o27, t14); return n24.set(s38, c25), _15(s38), n24; }, decrypt(r19, n24) { n24 = q12(r19.length - 16, n24, false); let c25 = r19.subarray(0, -16), o27 = r19.subarray(-16), s38 = V9(l28, a36, g45, c25, t14); if (!k17(o27, s38)) throw new Error("invalid tag"); return n24.set(r19.subarray(0, -16)), l28(a36, g45, n24, n24, 1), _15(s38), n24; } }); y0 = F11({ blockSize: 64, nonceLength: 12, tagLength: 16 }, Y13(t0)); f02 = F11({ blockSize: 64, nonceLength: 24, tagLength: 16 }, Y13(a02)); i02 = D16(n02, 64, 32, 8); d0 = D16(r02, 64, 32, 12); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/chacha.js?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_chacha2 = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/chacha.js?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_chacha(); } }); // esm:https://esm.sh/*@noble/ciphers@2.1.1/utils.js?target=esnext&lp=node_modules%252F%2540noble%252Fciphers var init_utils5 = __esm({ "esm:https://esm.sh/*@noble/ciphers@2.1.1/utils.js?target=esnext&lp=node_modules%252F%2540noble%252Fciphers"() { init_define_import_meta_env(); init_utils4(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/hmac?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_hmac_target_esnext_lp_node_modules_252F_2540noble_252Fhashes = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/hmac?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_hmac(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/hkdf.mjs?lp=node_modules%252F%2540noble%252Fhashes function w11(t14, r19, e15) { return m7(t14), e15 === void 0 && (e15 = new Uint8Array(t14.outputLen)), p12(t14, e15, r19); } function x13(t14, r19, e15, n24 = 32) { m7(t14), a8(n24, "length"); let o27 = t14.outputLen; if (n24 > 255 * o27) throw new Error("Length must be <= 255*HashLen"); let s38 = Math.ceil(n24 / o27); e15 === void 0 ? e15 = f11 : s5(e15, void 0, "info"); let a36 = new Uint8Array(s38 * o27), u36 = p12.create(t14, r19), d31 = u36._cloneInto(), i20 = new Uint8Array(u36.outputLen); for (let c25 = 0; c25 < s38; c25++) p13[0] = c25 + 1, d31.update(c25 === 0 ? f11 : i20).update(e15).update(p13).digestInto(i20), a36.set(i20, o27 * c25), u36._cloneInto(d31); return u36.destroy(), d31.destroy(), H8(i20, p13), a36.slice(0, n24); } var p13, f11; var init_hkdf = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/esnext/hkdf.mjs?lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_hmac_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); init_utils_target_esnext_lp_node_modules_252F_2540noble_252Fhashes(); p13 = Uint8Array.of(0); f11 = Uint8Array.of(); } }); // esm:https://esm.sh/*@noble/hashes@2.0.1/hkdf.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes var init_hkdf2 = __esm({ "esm:https://esm.sh/*@noble/hashes@2.0.1/hkdf.js?target=esnext&lp=node_modules%252F%2540noble%252Fhashes"() { init_define_import_meta_env(); init_hkdf(); } }); // esm:https://esm.sh/*nostr-tools@2.23.3/esnext/nostr-tools.mjs?lp=node_modules%252Fnostr-tools function ne4(e15) { if (!Ot3(e15) || typeof e15.kind != "number" || typeof e15.content != "string" || typeof e15.created_at != "number" || typeof e15.pubkey != "string" || !e15.pubkey.match(/^[a-f0-9]{64}$/) || !Array.isArray(e15.tags)) return false; for (let t14 = 0; t14 < e15.tags.length; t14++) { let n24 = e15.tags[t14]; if (!Array.isArray(n24)) return false; for (let r19 = 0; r19 < n24.length; r19++) if (typeof n24[r19] != "string") return false; } return true; } function bs(e15) { return e15.sort((t14, n24) => t14.created_at !== n24.created_at ? n24.created_at - t14.created_at : t14.id.localeCompare(n24.id)); } function P14(e15) { try { e15.indexOf("://") === -1 && (e15 = "wss://" + e15); let t14 = new URL(e15); return t14.protocol === "http:" ? t14.protocol = "ws:" : t14.protocol === "https:" && (t14.protocol = "wss:"), t14.pathname = t14.pathname.replace(/\/+/g, "/"), t14.pathname.endsWith("/") && (t14.pathname = t14.pathname.slice(0, -1)), (t14.port === "80" && t14.protocol === "ws:" || t14.port === "443" && t14.protocol === "wss:") && (t14.port = ""), t14.searchParams.sort(), t14.hash = "", t14.toString(); } catch { throw new Error(`Invalid URL: ${e15}`); } } function Bt3(e15, t14) { let [n24, r19] = re5(e15, (i20) => t14.id === i20.id ? 0 : t14.created_at === i20.created_at ? -1 : i20.created_at - t14.created_at); return r19 || e15.splice(n24, 0, t14), e15; } function Ht4(e15, t14) { let [n24, r19] = re5(e15, (i20) => t14.id === i20.id ? 0 : t14.created_at === i20.created_at ? -1 : t14.created_at - i20.created_at); return r19 || e15.splice(n24, 0, t14), e15; } function re5(e15, t14) { let n24 = 0, r19 = e15.length - 1; for (; n24 <= r19; ) { let i20 = Math.floor((n24 + r19) / 2), s38 = t14(e15[i20]); if (s38 === 0) return [i20, true]; s38 < 0 ? r19 = i20 - 1 : n24 = i20 + 1; } return [n24, false]; } function Ft3(e15, t14) { let n24 = new Array(e15.length + t14.length); n24.length = 0; let r19 = 0, i20 = 0, s38 = []; for (; r19 < e15.length && i20 < t14.length; ) { let a36; if (e15[r19]?.created_at > t14[i20]?.created_at ? (a36 = e15[r19], r19++) : (a36 = t14[i20], i20++), n24.length > 0 && n24[n24.length - 1].created_at === a36.created_at) { if (s38.includes(a36.id)) continue; } else s38.length = 0; n24.push(a36), s38.push(a36.id); } for (; r19 < e15.length; ) { let a36 = e15[r19]; if (r19++, n24.length > 0 && n24[n24.length - 1].created_at === a36.created_at) { if (s38.includes(a36.id)) continue; } else s38.length = 0; n24.push(a36), s38.push(a36.id); } for (; i20 < t14.length; ) { let a36 = t14[i20]; if (i20++, n24.length > 0 && n24[n24.length - 1].created_at === a36.created_at) { if (s38.includes(a36.id)) continue; } else s38.length = 0; n24.push(a36), s38.push(a36.id); } return n24; } function Wt2(e15) { if (!ne4(e15)) throw new Error("can't serialize event with wrong or missing properties"); return JSON.stringify([0, e15.pubkey, e15.created_at, e15.kind, e15.tags, e15.content]); } function F14(e15) { let t14 = f0(v11.encode(Wt2(e15))); return I9(t14); } function Pe5(e15) { return e15 < 1e4 && e15 !== 0 && e15 !== 3; } function G11(e15) { return e15 === 0 || e15 === 3 || 1e4 <= e15 && e15 < 2e4; } function Ae4(e15) { return 2e4 <= e15 && e15 < 3e4; } function J11(e15) { return 3e4 <= e15 && e15 < 4e4; } function qt2(e15) { return Pe5(e15) ? "regular" : G11(e15) ? "replaceable" : Ae4(e15) ? "ephemeral" : J11(e15) ? "parameterized" : "unknown"; } function zt2(e15, t14) { let n24 = t14 instanceof Array ? t14 : [t14]; return ne4(e15) && n24.includes(e15.kind) || false; } function yr(e15, t14) { if (e15.ids && e15.ids.indexOf(t14.id) === -1 || e15.kinds && e15.kinds.indexOf(t14.kind) === -1 || e15.authors && e15.authors.indexOf(t14.pubkey) === -1) return false; for (let n24 in e15) if (n24[0] === "#") { let r19 = n24.slice(1), i20 = e15[`#${r19}`]; if (i20 && !t14.tags.find(([s38, a36]) => s38 === n24.slice(1) && i20.indexOf(a36) !== -1)) return false; } return !(e15.since && t14.created_at < e15.since || e15.until && t14.created_at > e15.until); } function mr(e15, t14) { for (let n24 = 0; n24 < e15.length; n24++) if (yr(e15[n24], t14)) return true; return false; } function ks(...e15) { let t14 = {}; for (let n24 = 0; n24 < e15.length; n24++) { let r19 = e15[n24]; Object.entries(r19).forEach(([i20, s38]) => { if (i20 === "kinds" || i20 === "ids" || i20 === "authors" || i20[0] === "#") { t14[i20] = t14[i20] || []; for (let a36 = 0; a36 < s38.length; a36++) { let o27 = s38[a36]; t14[i20].includes(o27) || t14[i20].push(o27); } } }), r19.limit && (!t14.limit || r19.limit > t14.limit) && (t14.limit = r19.limit), r19.until && (!t14.until || r19.until > t14.until) && (t14.until = r19.until), r19.since && (!t14.since || r19.since < t14.since) && (t14.since = r19.since); } return t14; } function xs(e15) { if (e15.ids && !e15.ids.length || e15.kinds && !e15.kinds.length || e15.authors && !e15.authors.length) return 0; for (let [t14, n24] of Object.entries(e15)) if (t14[0] === "#" && Array.isArray(n24) && !n24.length) return 0; return Math.min(Math.max(0, e15.limit ?? 1 / 0), e15.ids?.length ?? 1 / 0, e15.authors?.length && e15.kinds?.every((t14) => G11(t14)) ? e15.authors.length * e15.kinds.length : 1 / 0, e15.authors?.length && e15.kinds?.every((t14) => J11(t14)) && e15["#d"]?.length ? e15.authors.length * e15.kinds.length * e15["#d"].length : 1 / 0); } function j14(e15, t14) { let n24 = t14.length + 3, r19 = e15.indexOf(`"${t14}":`) + n24, i20 = e15.slice(r19).indexOf('"') + r19 + 1; return e15.slice(i20, i20 + 64); } function De3(e15, t14) { let n24 = t14.length, r19 = e15.indexOf(`"${t14}":`) + n24 + 3, i20 = e15.slice(r19), s38 = Math.min(i20.indexOf(","), i20.indexOf("}")); return parseInt(i20.slice(0, s38), 10); } function Ve3(e15) { let t14 = e15.slice(0, 22).indexOf('"EVENT"'); if (t14 === -1) return null; let n24 = e15.slice(t14 + 7 + 1).indexOf('"'); if (n24 === -1) return null; let r19 = t14 + 7 + 1 + n24, i20 = e15.slice(r19 + 1, 80).indexOf('"'); if (i20 === -1) return null; let s38 = r19 + 1 + i20; return e15.slice(r19 + 1, s38); } function wr(e15, t14) { return t14 === j14(e15, "id"); } function br(e15, t14) { return t14 === j14(e15, "pubkey"); } function Er(e15, t14) { return t14 === De3(e15, "kind"); } function qe3(e15, t14) { return { kind: $e3, created_at: Math.floor(Date.now() / 1e3), tags: [["relay", e15], ["challenge", t14]], content: "" }; } function Ar(e15) { let t14 = new Uint8Array(4); return t14[0] = e15 >> 24 & 255, t14[1] = e15 >> 16 & 255, t14[2] = e15 >> 8 & 255, t14[3] = e15 & 255, t14; } function Ir(e15) { try { return e15.startsWith("nostr:") && (e15 = e15.substring(6)), N15(e15); } catch { return { type: "invalid", data: null }; } } function N15(e15) { let { prefix: t14, words: n24 } = ve5.decode(e15, ue4), r19 = new Uint8Array(ve5.fromWords(n24)); switch (t14) { case "nprofile": { let i20 = Q6(r19); if (!i20[0]?.[0]) throw new Error("missing TLV 0 for nprofile"); if (i20[0][0].length !== 32) throw new Error("TLV 0 should be 32 bytes"); return { type: "nprofile", data: { pubkey: I9(i20[0][0]), relays: i20[1] ? i20[1].map((s38) => x14.decode(s38)) : [] } }; } case "nevent": { let i20 = Q6(r19); if (!i20[0]?.[0]) throw new Error("missing TLV 0 for nevent"); if (i20[0][0].length !== 32) throw new Error("TLV 0 should be 32 bytes"); if (i20[2] && i20[2][0].length !== 32) throw new Error("TLV 2 should be 32 bytes"); if (i20[3] && i20[3][0].length !== 4) throw new Error("TLV 3 should be 4 bytes"); return { type: "nevent", data: { id: I9(i20[0][0]), relays: i20[1] ? i20[1].map((s38) => x14.decode(s38)) : [], author: i20[2]?.[0] ? I9(i20[2][0]) : void 0, kind: i20[3]?.[0] ? parseInt(I9(i20[3][0]), 16) : void 0 } }; } case "naddr": { let i20 = Q6(r19); if (!i20[0]?.[0]) throw new Error("missing TLV 0 for naddr"); if (!i20[2]?.[0]) throw new Error("missing TLV 2 for naddr"); if (i20[2][0].length !== 32) throw new Error("TLV 2 should be 32 bytes"); if (!i20[3]?.[0]) throw new Error("missing TLV 3 for naddr"); if (i20[3][0].length !== 4) throw new Error("TLV 3 should be 4 bytes"); return { type: "naddr", data: { identifier: x14.decode(i20[0][0]), pubkey: I9(i20[2][0]), kind: parseInt(I9(i20[3][0]), 16), relays: i20[1] ? i20[1].map((s38) => x14.decode(s38)) : [] } }; } case "nsec": return { type: t14, data: r19 }; case "npub": case "note": return { type: t14, data: I9(r19) }; default: throw new Error(`unknown prefix ${t14}`); } } function Q6(e15) { let t14 = {}, n24 = e15; for (; n24.length > 0; ) { let r19 = n24[0], i20 = n24[1], s38 = n24.slice(2, 2 + i20); if (n24 = n24.slice(2 + i20), s38.length < i20) throw new Error(`not enough data to read on TLV ${r19}`); t14[r19] = t14[r19] || [], t14[r19].push(s38); } return t14; } function Or2(e15) { return K15("nsec", e15); } function Mr2(e15) { return K15("npub", S10(e15)); } function Lr(e15) { return K15("note", S10(e15)); } function Z12(e15, t14) { let n24 = ve5.toWords(t14); return ve5.encode(e15, n24, ue4); } function K15(e15, t14) { return Z12(e15, t14); } function Nr(e15) { let t14 = he5({ 0: [S10(e15.pubkey)], 1: (e15.relays || []).map((n24) => v11.encode(n24)) }); return Z12("nprofile", t14); } function Ur(e15) { let t14; e15.kind !== void 0 && (t14 = Ar(e15.kind)); let n24 = he5({ 0: [S10(e15.id)], 1: (e15.relays || []).map((r19) => v11.encode(r19)), 2: e15.author ? [S10(e15.author)] : [], 3: t14 ? [new Uint8Array(t14)] : [] }); return Z12("nevent", n24); } function Br(e15) { let t14 = new ArrayBuffer(4); new DataView(t14).setUint32(0, e15.kind, false); let n24 = he5({ 0: [v11.encode(e15.identifier)], 1: (e15.relays || []).map((r19) => v11.encode(r19)), 2: [S10(e15.pubkey)], 3: [new Uint8Array(t14)] }); return Z12("naddr", n24); } function he5(e15) { let t14 = []; return Object.entries(e15).reverse().forEach(([n24, r19]) => { r19.forEach((i20) => { let s38 = new Uint8Array(i20.length + 2); s38.set([parseInt(n24)], 0), s38.set([i20.length], 1), s38.set(i20, 2), t14.push(s38); }); }), D9(...t14); } function Cs(e15) { let t14 = []; for (let n24 of e15.content.matchAll(Hr)) if (n24[2]) try { let { type: r19, data: i20 } = N15(n24[1]); switch (r19) { case "npub": { t14.push({ text: n24[0], profile: { pubkey: i20, relays: [] } }); break; } case "nprofile": { t14.push({ text: n24[0], profile: i20 }); break; } case "note": { t14.push({ text: n24[0], event: { id: i20, relays: [] } }); break; } case "nevent": { t14.push({ text: n24[0], event: i20 }); break; } case "naddr": { t14.push({ text: n24[0], address: i20 }); break; } } } catch { } else if (n24[3]) { let r19 = parseInt(n24[3], 10), i20 = e15.tags[r19]; if (!i20) continue; switch (i20[0]) { case "p": { t14.push({ text: n24[0], profile: { pubkey: i20[1], relays: i20[2] ? [i20[2]] : [] } }); break; } case "e": { t14.push({ text: n24[0], event: { id: i20[1], relays: i20[2] ? [i20[2]] : [] } }); break; } case "a": { try { let [s38, a36, o27] = i20[1].split(":"); t14.push({ text: n24[0], address: { identifier: o27, pubkey: a36, kind: parseInt(s38, 10), relays: i20[2] ? [i20[2]] : [] } }); } catch { } break; } } } return t14; } function Xe3(e15, t14, n24) { let r19 = e15 instanceof Uint8Array ? e15 : S10(e15), i20 = gf.getSharedSecret(r19, S10("02" + t14)), s38 = Qe3(i20), a36 = Uint8Array.from(N8(16)), o27 = v11.encode(n24), c25 = Vt2(s38, a36).encrypt(o27), l28 = oe4.encode(new Uint8Array(c25)), u36 = oe4.encode(new Uint8Array(a36.buffer)); return `${l28}?iv=${u36}`; } function Wr(e15, t14, n24) { let r19 = e15 instanceof Uint8Array ? e15 : S10(e15), [i20, s38] = n24.split("?iv="), a36 = gf.getSharedSecret(r19, S10("02" + t14)), o27 = Qe3(a36), c25 = oe4.decode(s38), l28 = oe4.decode(i20), u36 = Vt2(o27, c25).decrypt(l28); return x14.decode(u36); } function Qe3(e15) { return e15.slice(1, 33); } function qr(e15) { X8 = e15; } async function zr(e15, t14 = "") { try { let n24 = `https://${e15}/.well-known/nostr.json?name=${t14}`, r19 = await X8(n24, { redirect: "manual" }); if (r19.status !== 200) throw Error("Wrong response code"); return (await r19.json()).names; } catch { return {}; } } async function Ye3(e15) { let t14 = e15.match(de6); if (!t14) return null; let [, n24 = "_", r19] = t14; try { let i20 = `https://${r19}/.well-known/nostr.json?name=${n24}`, s38 = await X8(i20, { redirect: "manual" }); if (s38.status !== 200) throw Error("Wrong response code"); let a36 = await s38.json(), o27 = a36.names[n24]; return o27 ? { pubkey: o27, relays: a36.relays?.[o27] } : null; } catch { return null; } } async function Gr2(e15, t14) { let n24 = await Ye3(t14); return n24 ? n24.pubkey === e15 : false; } function jr(e15) { let t14 = { reply: void 0, root: void 0, mentions: [], profiles: [], quotes: [] }, n24, r19; for (let i20 = e15.tags.length - 1; i20 >= 0; i20--) { let s38 = e15.tags[i20]; if (s38[0] === "e" && s38[1]) { let [a36, o27, c25, l28, u36] = s38, g45 = { id: o27, relays: c25 ? [c25] : [], author: u36 }; if (l28 === "root") { t14.root = g45; continue; } if (l28 === "reply") { t14.reply = g45; continue; } if (l28 === "mention") { t14.mentions.push(g45); continue; } n24 ? r19 = g45 : n24 = g45, t14.mentions.push(g45); continue; } if (s38[0] === "q" && s38[1]) { let [a36, o27, c25] = s38; t14.quotes.push({ id: o27, relays: c25 ? [c25] : [] }); } if (s38[0] === "p" && s38[1]) { t14.profiles.push({ pubkey: s38[1], relays: s38[2] ? [s38[2]] : [] }); continue; } } return t14.root || (t14.root = r19 || n24 || t14.reply), t14.reply || (t14.reply = n24 || t14.root), [t14.reply, t14.root].forEach((i20) => { if (!i20) return; let s38 = t14.mentions.indexOf(i20); if (s38 !== -1 && t14.mentions.splice(s38, 1), i20.author) { let a36 = t14.profiles.find((o27) => o27.pubkey === i20.author); a36 && a36.relays && (i20.relays || (i20.relays = []), a36.relays.forEach((o27) => { i20.relays?.indexOf(o27) === -1 && i20.relays.push(o27); }), a36.relays = i20.relays); } }), t14.mentions.forEach((i20) => { if (i20.author) { let s38 = t14.profiles.find((a36) => a36.pubkey === i20.author); s38 && s38.relays && (i20.relays || (i20.relays = []), s38.relays.forEach((a36) => { i20.relays.indexOf(a36) === -1 && i20.relays.push(a36); }), s38.relays = i20.relays); } }), t14; } function Kr(e15) { et4 = e15; } async function Xr(e15) { return await (await fetch(e15.replace("ws://", "http://").replace("wss://", "https://"), { headers: { Accept: "application/nostr+json" } })).json(); } function ti(e15) { let t14 = 0; for (let n24 = 0; n24 < 64; n24 += 8) { let r19 = parseInt(e15.substring(n24, n24 + 8), 16); if (r19 === 0) t14 += 32; else { t14 += Math.clz32(r19); break; } } return t14; } function ni(e15) { let t14 = 0; for (let n24 = 0; n24 < e15.length; n24++) { let r19 = e15[n24]; if (r19 === 0) t14 += 8; else { t14 += Math.clz32(r19) - 24; break; } } return t14; } function ri(e15, t14) { let n24 = 0, r19 = e15, i20 = ["nonce", n24.toString(), t14.toString()]; for (r19.tags.push(i20); ; ) { let s38 = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); s38 !== r19.created_at && (n24 = 0, r19.created_at = s38), i20[1] = (++n24).toString(); let a36 = f0(v11.encode(JSON.stringify([0, r19.pubkey, r19.created_at, r19.kind, r19.tags, r19.content]))); if (ni(a36) >= t14) { r19.id = I9(a36); break; } } return r19; } function ge5(e15, t14) { let n24 = gf.getSharedSecret(e15, S10("02" + t14)).subarray(1, 33); return w11(f0, n24, v11.encode("nip44-v2")); } function st5(e15, t14) { let n24 = x13(f0, e15, t14, 76); return { chacha_key: n24.subarray(0, 32), chacha_nonce: n24.subarray(32, 44), hmac_key: n24.subarray(44, 76) }; } function ye6(e15) { if (!Number.isSafeInteger(e15) || e15 < 1) throw new Error("expected positive integer"); if (e15 <= 32) return 32; let t14 = 1 << Math.floor(Math.log2(e15 - 1)) + 1, n24 = t14 <= 256 ? 32 : t14 / 8; return n24 * (Math.floor((e15 - 1) / n24) + 1); } function pi(e15) { if (!Number.isSafeInteger(e15) || e15 < rt5 || e15 > it4) throw new Error("invalid plaintext size: must be between 1 and 65535 bytes"); let t14 = new Uint8Array(2); return new DataView(t14.buffer).setUint16(0, e15, false), t14; } function gi(e15) { let t14 = v11.encode(e15), n24 = t14.length, r19 = pi(n24), i20 = new Uint8Array(ye6(n24) - n24); return D9(r19, t14, i20); } function yi(e15) { let t14 = new DataView(e15.buffer).getUint16(0), n24 = e15.subarray(2, 2 + t14); if (t14 < rt5 || t14 > it4 || n24.length !== t14 || e15.length !== 2 + ye6(t14)) throw new Error("invalid padding"); return x14.decode(n24); } function at4(e15, t14, n24) { if (n24.length !== 32) throw new Error("AAD associated data must be 32 bytes"); let r19 = D9(n24, t14); return p12(f0, e15, r19); } function mi(e15) { if (typeof e15 != "string") throw new Error("payload must be a valid string"); let t14 = e15.length; if (t14 < 132 || t14 > 87472) throw new Error("invalid payload length: " + t14); if (e15[0] === "#") throw new Error("unknown encryption version"); let n24; try { n24 = oe4.decode(e15); } catch (s38) { throw new Error("invalid base64: " + s38.message); } let r19 = n24.length; if (r19 < 99 || r19 > 65603) throw new Error("invalid data length: " + r19); let i20 = n24[0]; if (i20 !== 2) throw new Error("unknown encryption version " + i20); return { nonce: n24.subarray(1, 33), ciphertext: n24.subarray(33, -32), mac: n24.subarray(-32) }; } function me5(e15, t14, n24 = N8(32)) { let { chacha_key: r19, chacha_nonce: i20, hmac_key: s38 } = st5(t14, n24), a36 = gi(e15), o27 = t0(r19, i20, a36), c25 = at4(s38, o27, n24); return oe4.encode(D9(new Uint8Array([2]), n24, o27, c25)); } function ve6(e15, t14) { let { nonce: n24, ciphertext: r19, mac: i20 } = mi(e15), { chacha_key: s38, chacha_nonce: a36, hmac_key: o27 } = st5(t14, n24), c25 = at4(o27, r19, n24); if (!k17(c25, i20)) throw new Error("invalid MAC"); let l28 = t0(s38, a36, r19); return yi(l28); } function ht3(e15, t14) { let n24 = { created_at: ot4(), content: "", tags: [], ...e15, pubkey: ie5(t14) }; return n24.id = F14(n24), n24; } function dt4(e15, t14, n24) { return b12({ kind: Oe4, content: ut4(e15, t14, n24), created_at: ct5(), tags: [] }, t14); } function ft4(e15, t14) { let n24 = Dt3(); return b12({ kind: Fe2, content: ut4(e15, n24, t14), created_at: ct5(), tags: [["p", t14]] }, n24); } function q15(e15, t14, n24) { let r19 = ht3(e15, t14), i20 = dt4(r19, t14, n24); return ft4(i20, n24); } function bi(e15, t14, n24) { if (!n24 || n24.length === 0) throw new Error("At least one recipient is required."); let r19 = ie5(t14), i20 = [q15(e15, t14, r19)]; return n24.forEach((s38) => { i20.push(q15(e15, t14, s38)); }), i20; } function we5(e15, t14) { let n24 = Te3(e15, t14); return Te3(n24, t14); } function pt4(e15, t14) { let n24 = []; return e15.forEach((r19) => { n24.push(we5(r19, t14)); }), n24.sort((r19, i20) => r19.created_at - i20.created_at), n24; } function Ei(e15, t14, n24, r19) { let i20 = { created_at: Math.ceil(Date.now() / 1e3), kind: Me4, tags: [], content: t14 }; return (Array.isArray(e15) ? e15 : [e15]).forEach(({ publicKey: a36, relayUrl: o27 }) => { i20.tags.push(o27 ? ["p", a36, o27] : ["p", a36]); }), r19 && i20.tags.push(["e", r19.eventId, r19.relayUrl || "", "reply"]), n24 && i20.tags.push(["subject", n24]), i20; } function gt4(e15, t14, n24, r19, i20) { let s38 = Ei(t14, n24, r19, i20); return q15(s38, e15, t14.publicKey); } function _i(e15, t14, n24, r19, i20) { if (!t14 || t14.length === 0) throw new Error("At least one recipient is required."); return [{ publicKey: ie5(e15) }, ...t14].map((a36) => gt4(e15, a36, n24, r19, i20)); } function Ti(e15, t14, n24, r19) { let i20, s38 = [...e15.tags ?? [], ["e", t14.id, n24], ["p", t14.pubkey]]; return t14.kind === Ie4 ? i20 = se4 : (i20 = oe5, s38.push(["k", String(t14.kind)])), b12({ kind: i20, tags: s38, content: e15.content === "" || t14.tags?.find((a36) => a36[0] === "-") ? "" : JSON.stringify(t14), created_at: e15.created_at }, r19); } function yt3(e15) { if (![se4, oe5].includes(e15.kind)) return; let t14, n24; for (let r19 = e15.tags.length - 1; r19 >= 0 && (t14 === void 0 || n24 === void 0); r19--) { let i20 = e15.tags[r19]; i20.length >= 2 && (i20[0] === "e" && t14 === void 0 ? t14 = i20 : i20[0] === "p" && n24 === void 0 && (n24 = i20)); } if (t14 !== void 0) return { id: t14[1], relays: [t14[2], n24?.[2]].filter((r19) => typeof r19 == "string"), author: n24?.[1] }; } function Ri(e15, { skipVerification: t14 } = {}) { let n24 = yt3(e15); if (n24 === void 0 || e15.content === "") return; let r19; try { r19 = JSON.parse(e15.content); } catch { return; } if (r19.id === n24.id && !(!t14 && !L11(r19))) return r19; } function Pi(e15) { return typeof e15 == "string" && new RegExp(`^${be5.source}$`).test(e15); } function Ai(e15) { let t14 = e15.match(new RegExp(`^${be5.source}$`)); if (!t14) throw new Error(`Invalid Nostr URI: ${e15}`); return { uri: t14[0], value: t14[1], decoded: N15(t14[1]) }; } function Oi(e15, t14, n24) { let r19 = t14.tags.filter((i20) => i20.length >= 2 && (i20[0] === "e" || i20[0] === "p")); return b12({ ...e15, kind: ae6, tags: [...e15.tags ?? [], ...r19, ["e", t14.id], ["p", t14.pubkey]], content: e15.content ?? "+" }, n24); } function Mi(e15) { if (e15.kind !== ae6) return; let t14, n24; for (let r19 = e15.tags.length - 1; r19 >= 0 && (t14 === void 0 || n24 === void 0); r19--) { let i20 = e15.tags[r19]; i20.length >= 2 && (i20[0] === "e" && t14 === void 0 ? t14 = i20 : i20[0] === "p" && n24 === void 0 && (n24 = i20)); } if (!(t14 === void 0 || n24 === void 0)) return { id: t14[1], relays: [t14[2], n24[2]].filter((r19) => r19 !== void 0), author: n24[1] }; } function* Ui(e15) { let t14 = []; if (typeof e15 != "string") { for (let s38 = 0; s38 < e15.tags.length; s38++) { let a36 = e15.tags[s38]; a36[0] === "emoji" && a36.length >= 3 && t14.push({ type: "emoji", shortcode: a36[1], url: a36[2] }); } e15 = e15.content; } let n24 = e15.length, r19 = 0, i20 = 0; e: for (; i20 < n24; ) { let s38 = e15.indexOf(":", i20), a36 = e15.indexOf("#", i20); if (s38 === -1 && a36 === -1) break e; if (s38 === -1 || a36 >= 0 && a36 < s38) { if (a36 === 0 || e15[a36 - 1].match(Y14)) { let o27 = e15.slice(a36 + 1, a36 + Ni).match(Y14), c25 = o27 ? a36 + 1 + o27.index : n24; yield { type: "text", text: e15.slice(r19, a36) }, yield { type: "hashtag", value: e15.slice(a36 + 1, c25) }, i20 = c25, r19 = i20; continue e; } i20 = a36 + 1; continue e; } if (e15.slice(s38 - 5, s38) === "nostr") { let o27 = e15.slice(s38 + 60).match(Y14), c25 = o27 ? s38 + 60 + o27.index : n24; try { let l28, { data: u36, type: g45 } = N15(e15.slice(s38 + 1, c25)); switch (g45) { case "npub": l28 = { pubkey: u36 }; break; case "note": l28 = { id: u36 }; break; case "nsec": i20 = c25 + 1; continue; default: l28 = u36; } r19 !== s38 - 5 && (yield { type: "text", text: e15.slice(r19, s38 - 5) }), yield { type: "reference", pointer: l28 }, i20 = c25, r19 = i20; continue e; } catch { i20 = s38 + 1; continue e; } } else if (e15.slice(s38 - 5, s38) === "https" || e15.slice(s38 - 4, s38) === "http") { let o27 = e15.slice(s38 + 4).match(Re3), c25 = o27 ? s38 + 4 + o27.index : n24, l28 = e15[s38 - 1] === "s" ? 5 : 4; try { let u36 = new URL(e15.slice(s38 - l28, c25)); if (u36.hostname.indexOf(".") === -1) throw new Error("invalid url"); if (r19 !== s38 - l28 && (yield { type: "text", text: e15.slice(r19, s38 - l28) }), /\.(png|jpe?g|gif|webp|heic|svg)$/i.test(u36.pathname)) { yield { type: "image", url: u36.toString() }, i20 = c25, r19 = i20; continue e; } if (/\.(mp4|avi|webm|mkv|mov)$/i.test(u36.pathname)) { yield { type: "video", url: u36.toString() }, i20 = c25, r19 = i20; continue e; } if (/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(u36.pathname)) { yield { type: "audio", url: u36.toString() }, i20 = c25, r19 = i20; continue e; } yield { type: "url", url: u36.toString() }, i20 = c25, r19 = i20; continue e; } catch { i20 = c25 + 1; continue e; } } else if (e15.slice(s38 - 3, s38) === "wss" || e15.slice(s38 - 2, s38) === "ws") { let o27 = e15.slice(s38 + 4).match(Re3), c25 = o27 ? s38 + 4 + o27.index : n24, l28 = e15[s38 - 1] === "s" ? 3 : 2; try { let u36 = new URL(e15.slice(s38 - l28, c25)); if (u36.hostname.indexOf(".") === -1) throw new Error("invalid ws url"); r19 !== s38 - l28 && (yield { type: "text", text: e15.slice(r19, s38 - l28) }), yield { type: "relay", url: u36.toString() }, i20 = c25, r19 = i20; continue e; } catch { i20 = c25 + 1; continue e; } } else { for (let o27 = 0; o27 < t14.length; o27++) { let c25 = t14[o27]; if (e15[s38 + c25.shortcode.length + 1] === ":" && e15.slice(s38 + 1, s38 + c25.shortcode.length + 1) === c25.shortcode) { r19 !== s38 && (yield { type: "text", text: e15.slice(r19, s38) }), yield c25, i20 = s38 + c25.shortcode.length + 2, r19 = i20; continue e; } } i20 = s38 + 1; continue e; } } r19 !== n24 && (yield { type: "text", text: e15.slice(r19) }); } function* qi(e15) { let t14 = e15.matchAll(Ee5()); for (let n24 of t14) try { let [r19, i20] = n24; yield { shortcode: r19, name: i20, start: n24.index, end: n24.index + r19.length }; } catch { } } function zi(e15, t14) { return e15.replaceAll(Ee5(), (n24, r19) => t14({ shortcode: n24, name: r19 })); } function Ji(e15) { _e5 = e15; } async function ji(e15, t14, n24) { try { return await (await _e5(`https://gist.github.com/${t14}/${n24}/raw`)).text() === `Verifying that I control the following Nostr public key: ${e15}`; } catch { return false; } } function Ki(e15) { let { host: t14, pathname: n24, searchParams: r19 } = new URL(e15), i20 = n24 || t14, s38 = r19.get("relay"), a36 = r19.get("secret"); if (!i20 || !s38 || !a36) throw new Error("invalid connection string"); return { pubkey: i20, relay: s38, secret: a36 }; } async function Xi(e15, t14, n24) { let i20 = Xe3(t14, e15, JSON.stringify({ method: "pay_invoice", params: { invoice: n24 } })), s38 = { kind: We3, created_at: Math.round(Date.now() / 1e3), content: i20, tags: [["p", e15]] }; return b12(s38, t14); } function Yi(e15) { return e15 = e15.trim().toLowerCase(), e15 = e15.normalize("NFKC"), Array.from(e15).map((t14) => /\p{Letter}/u.test(t14) || /\p{Number}/u.test(t14) ? t14 : "-").join(""); } function ts(e15) { ke4 = e15; } async function ns(e15) { try { let t14 = "", { lud06: n24, lud16: r19 } = JSON.parse(e15.content); if (r19) { let [a36, o27] = r19.split("@"); t14 = new URL(`/.well-known/lnurlp/${a36}`, `https://${o27}`).toString(); } else if (n24) { let { words: a36 } = ve5.decode(n24, 1e3), o27 = ve5.fromWords(a36); t14 = x14.decode(o27); } else return null; let s38 = await (await ke4(t14)).json(); if (s38.allowsNostr && s38.nostrPubkey) return s38.callback; } catch { } return null; } function rs(e15) { let t14 = { kind: 9734, created_at: Math.round(Date.now() / 1e3), content: e15.comment || "", tags: [["p", "pubkey" in e15 ? e15.pubkey : e15.event.pubkey], ["amount", e15.amount.toString()], ["relays", ...e15.relays]] }; if ("event" in e15) { if (t14.tags.push(["e", e15.event.id]), G11(e15.event.kind)) { let n24 = ["a", `${e15.event.kind}:${e15.event.pubkey}:`]; t14.tags.push(n24); } else if (J11(e15.event.kind)) { let n24 = e15.event.tags.find(([i20, s38]) => i20 === "d" && s38); if (!n24) throw new Error("d tag not found or is empty"); let r19 = ["a", `${e15.event.kind}:${e15.event.pubkey}:${n24[1]}`]; t14.tags.push(r19); } t14.tags.push(["k", e15.event.kind.toString()]); } return t14; } function is(e15) { let t14; try { t14 = JSON.parse(e15); } catch { return "Invalid zap request JSON."; } if (!ne4(t14)) return "Zap request is not a valid Nostr event."; if (!L11(t14)) return "Invalid signature on zap request."; let n24 = t14.tags.find(([s38, a36]) => s38 === "p" && a36); if (!n24) return "Zap request doesn't have a 'p' tag."; if (!n24[1].match(/^[a-f0-9]{64}$/)) return "Zap request 'p' tag is not valid hex."; let r19 = t14.tags.find(([s38, a36]) => s38 === "e" && a36); return r19 && !r19[1].match(/^[a-f0-9]{64}$/) ? "Zap request 'e' tag is not valid hex." : t14.tags.find(([s38, a36]) => s38 === "relays" && a36) ? null : "Zap request doesn't have a 'relays' tag."; } function ss({ zapRequest: e15, preimage: t14, bolt11: n24, paidAt: r19 }) { let i20 = JSON.parse(e15), s38 = i20.tags.filter(([o27]) => o27 === "e" || o27 === "p" || o27 === "a"), a36 = { kind: 9735, created_at: Math.round(r19.getTime() / 1e3), content: "", tags: [...s38, ["P", i20.pubkey], ["bolt11", n24], ["description", e15]] }; return t14 && a36.tags.push(["preimage", t14]), a36; } function as(e15) { if (e15.length < 50) return 0; e15 = e15.substring(0, 50); let t14 = e15.lastIndexOf("1"); if (t14 === -1) return 0; let n24 = e15.substring(0, t14); if (!n24.startsWith("lnbc")) return 0; let r19 = n24.substring(4); if (r19.length < 1) return 0; let i20 = r19[r19.length - 1], s38 = i20.charCodeAt(0) - 48, a36 = s38 >= 0 && s38 <= 9, o27 = r19.length - 1; if (a36 && o27++, o27 < 1) return 0; let c25 = parseInt(r19.substring(0, o27)); switch (i20) { case "m": return c25 * 1e5; case "u": return c25 * 100; case "n": return c25 / 10; case "p": return c25 / 1e4; default: return c25 * 1e8; } } function B9(e15) { let t14 = 0; for (; ; ) { if (e15.length === 0) throw Error("parse ends prematurely"); let n24 = e15.shift(); if (t14 = t14 << 7 | n24 & 127, (n24 & 128) === 0) break; } return t14; } function _18(e15) { if (e15 === 0) return new k20(new Uint8Array([0])); let t14 = []; for (; e15 !== 0; ) t14.push(e15 & 127), e15 >>>= 7; t14.reverse(); for (let n24 = 0; n24 < t14.length - 1; n24++) t14[n24] |= 128; return new k20(new Uint8Array(t14)); } function ls(e15) { return $14(e15, 1)[0]; } function $14(e15, t14) { if (e15.length < t14) throw Error("parse ends prematurely"); return e15.shiftN(t14); } function Et4(e15, t14) { for (let n24 = 0; n24 < e15.byteLength; n24++) { if (e15[n24] < t14[n24]) return -1; if (e15[n24] > t14[n24]) return 1; } return e15.byteLength > t14.byteLength ? 1 : e15.byteLength < t14.byteLength ? -1 : 0; } function te5(e15, t14) { return e15.timestamp === t14.timestamp ? Et4(e15.id, t14.id) : e15.timestamp - t14.timestamp; } async function ys(e15, t14, n24, r19 = false, i20) { let s38 = { kind: ce5, tags: [["u", e15], ["method", t14]], created_at: Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3), content: "" }; i20 && s38.tags.push(["payload", xe4(i20)]); let a36 = await n24(s38); return (r19 ? kt3 : "") + oe4.encode(v11.encode(JSON.stringify(a36))); } async function ms(e15, t14, n24) { let r19 = await xt4(e15).catch((s38) => { throw s38; }); return await At3(r19, t14, n24).catch((s38) => { throw s38; }); } async function xt4(e15) { if (!e15) throw new Error("Missing token"); e15 = e15.replace(kt3, ""); let t14 = x14.decode(oe4.decode(e15)); if (!t14 || t14.length === 0 || !t14.startsWith("{")) throw new Error("Invalid token"); return JSON.parse(t14); } function St2(e15) { return e15.created_at ? Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) - e15.created_at < 60 : false; } function Tt(e15) { return e15.kind === ce5; } function Rt2(e15, t14) { let n24 = e15.tags.find((r19) => r19[0] === "u"); return n24 ? n24.length > 0 && n24[1] === t14 : false; } function Ct3(e15, t14) { let n24 = e15.tags.find((r19) => r19[0] === "method"); return n24 ? n24.length > 0 && n24[1].toLowerCase() === t14.toLowerCase() : false; } function xe4(e15) { let t14 = f0(v11.encode(JSON.stringify(e15))); return I9(t14); } function Pt4(e15, t14) { let n24 = e15.tags.find((i20) => i20[0] === "payload"); if (!n24) return false; let r19 = xe4(t14); return n24.length > 0 && n24[1] === r19; } async function At3(e15, t14, n24, r19) { if (!L11(e15)) throw new Error("Invalid nostr event, signature invalid"); if (!Tt(e15)) throw new Error("Invalid nostr event, kind invalid"); if (!St2(e15)) throw new Error("Invalid nostr event, created_at timestamp invalid"); if (!Rt2(e15, t14)) throw new Error("Invalid nostr event, url tag invalid"); if (!Ct3(e15, n24)) throw new Error("Invalid nostr event, method tag invalid"); if (r19 && typeof r19 == "object" && Object.keys(r19).length > 0 && !Pt4(e15, r19)) throw new Error("Invalid nostr event, payload tag does not match request body hash"); return true; } var It2, f12, R15, Ot3, Lt3, x14, v11, $t2, z17, Dt3, ie5, b12, L11, Vt3, Gt, Ie4, Jt3, jt4, Zt2, Kt2, se4, ae6, Xt3, Qt2, Yt3, Oe4, Me4, en, oe5, tn, nn, rn, Le4, Ne3, Ue3, Be4, He3, sn, Fe2, an, on, cn, ln, un, hn, dn, fn, pn, gn, yn, mn, vn, wn, bn, En, _n, kn, xn, Sn, Tn, Rn, Cn, Pn, An, In, On, Mn, Ln, Nn, Un, Bn, Hn, Fn, $n, $e3, We3, Wn, Dn, ce5, Vn, qn, zn, Gn, Jn, jn, Zn, Kn, Xn, Qn, Yn, er2, tr2, nr2, rr2, ir2, sr, ar, or2, cr, lr, ur2, hr2, dr, fr, pr, gr, vr, _r, ze3, le4, kr2, Ge3, xr, Sr, Tr, Je3, Ss, Rr, Pr2, ue4, je4, Hr, Fr, Dr, de6, Vr, X8, Jr, Zr, et4, Qr, ii, si, ai, rt5, it4, vi, wi, ot4, ct5, lt5, ut4, Te3, ki, xi, Si, Ci, be5, Ii, Li, Y14, Re3, Ni, Bi, Hi, Fi, $i, Wi, Di, Vi, mt4, Ee5, Gi, _e5, Zi, Qi, es, ke4, os, ee3, A15, wt2, T16, k20, us, hs, bt5, ds, fs, kt3; var init_nostr_tools = __esm({ "esm:https://esm.sh/*nostr-tools@2.23.3/esnext/nostr-tools.mjs?lp=node_modules%252Fnostr-tools"() { init_define_import_meta_env(); init_secp256k12(); init_utils2(); init_sha22(); init_utils2(); init_utils2(); init_base_2_0(); init_utils2(); init_secp256k12(); init_aes2(); init_base_2_0(); init_utils2(); init_sha22(); init_chacha2(); init_utils5(); init_secp256k12(); init_hkdf2(); init_hmac2(); init_sha22(); init_utils2(); init_base_2_0(); init_base_2_0(); init_utils2(); init_sha22(); init_sha22(); init_utils2(); init_base_2_0(); It2 = Object.defineProperty; f12 = (e15, t14) => { for (var n24 in t14) It2(e15, n24, { get: t14[n24], enumerable: true }); }; R15 = Symbol("verified"); Ot3 = (e15) => e15 instanceof Object; Lt3 = {}; f12(Lt3, { binarySearch: () => re5, bytesToHex: () => I9, hexToBytes: () => S10, insertEventIntoAscendingList: () => Ht4, insertEventIntoDescendingList: () => Bt3, mergeReverseSortedLists: () => Ft3, normalizeURL: () => P14, utf8Decoder: () => x14, utf8Encoder: () => v11 }); x14 = new TextDecoder("utf-8"); v11 = new TextEncoder(); $t2 = class { generateSecretKey() { return uf.utils.randomSecretKey(); } getPublicKey(e15) { return I9(uf.getPublicKey(e15)); } finalizeEvent(e15, t14) { let n24 = e15; return n24.pubkey = I9(uf.getPublicKey(t14)), n24.id = F14(n24), n24.sig = I9(uf.sign(S10(F14(n24)), t14)), n24[R15] = true, n24; } verifyEvent(e15) { if (typeof e15[R15] == "boolean") return e15[R15]; try { let t14 = F14(e15); if (t14 !== e15.id) return e15[R15] = false, false; let n24 = uf.verify(S10(e15.sig), S10(t14), S10(e15.pubkey)); return e15[R15] = n24, n24; } catch { return e15[R15] = false, false; } } }; z17 = new $t2(); Dt3 = z17.generateSecretKey; ie5 = z17.getPublicKey; b12 = z17.finalizeEvent; L11 = z17.verifyEvent; Vt3 = {}; f12(Vt3, { Application: () => nr2, BadgeAward: () => Xt3, BadgeDefinition: () => Zn, BlockedRelaysList: () => In, BlossomServerList: () => Hn, BookmarkList: () => Cn, Bookmarksets: () => Gn, Calendar: () => lr, CalendarEventRSVP: () => ur2, ChannelCreation: () => Le4, ChannelHideMessage: () => Be4, ChannelMessage: () => Ue3, ChannelMetadata: () => Ne3, ChannelMuteUser: () => He3, ChatMessage: () => Qt2, ClassifiedListing: () => sr, ClientAuth: () => $e3, Comment: () => cn, CommunitiesList: () => Pn, CommunityDefinition: () => pr, CommunityPostApproval: () => yn, Contacts: () => jt4, CreateOrUpdateProduct: () => Qn, CreateOrUpdateStall: () => Xn, Curationsets: () => Jn, Date: () => or2, DirectMessageRelaysList: () => Un, DraftClassifiedListing: () => ar, DraftLong: () => er2, Emojisets: () => tr2, EncryptedDirectMessage: () => Zt2, EventDeletion: () => Kt2, FavoriteRelays: () => Mn, FileMessage: () => en, FileMetadata: () => on, FileServerPreference: () => Bn, Followsets: () => Vn, ForumThread: () => Yt3, GenericRepost: () => oe5, Genericlists: () => qn, GiftWrap: () => Fe2, GroupMetadata: () => gr, HTTPAuth: () => ce5, Handlerinformation: () => fr, Handlerrecommendation: () => dr, Highlights: () => kn, InterestsList: () => Ln, Interestsets: () => Kn, JobFeedback: () => wn, JobRequest: () => mn, JobResult: () => vn, Label: () => gn, LightningPubRPC: () => $n, LiveChatMessage: () => ln, LiveEvent: () => rr2, LongFormArticle: () => Yn, Metadata: () => Gt, Mutelist: () => Sn, NWCWalletInfo: () => Fn, NWCWalletRequest: () => We3, NWCWalletResponse: () => Wn, NormalVideo: () => nn, NostrConnect: () => Dn, OpenTimestamps: () => sn, Photo: () => tn, Pinlist: () => Tn, Poll: () => an, PollResponse: () => xn, PrivateDirectMessage: () => Me4, ProblemTracker: () => dn, ProfileBadges: () => jn, PublicChatsList: () => An, Reaction: () => ae6, RecommendRelay: () => Jt3, RelayList: () => Rn, RelayReview: () => hr2, Relaysets: () => zn, Report: () => fn, Reporting: () => pn, Repost: () => se4, Seal: () => Oe4, SearchRelaysList: () => On, ShortTextNote: () => Ie4, ShortVideo: () => rn, Time: () => cr, UserEmojiList: () => Nn, UserStatuses: () => ir2, Voice: () => un, VoiceComment: () => hn, Zap: () => _n, ZapGoal: () => bn, ZapRequest: () => En, classifyKind: () => qt2, isAddressableKind: () => J11, isEphemeralKind: () => Ae4, isKind: () => zt2, isRegularKind: () => Pe5, isReplaceableKind: () => G11 }); Gt = 0; Ie4 = 1; Jt3 = 2; jt4 = 3; Zt2 = 4; Kt2 = 5; se4 = 6; ae6 = 7; Xt3 = 8; Qt2 = 9; Yt3 = 11; Oe4 = 13; Me4 = 14; en = 15; oe5 = 16; tn = 20; nn = 21; rn = 22; Le4 = 40; Ne3 = 41; Ue3 = 42; Be4 = 43; He3 = 44; sn = 1040; Fe2 = 1059; an = 1068; on = 1063; cn = 1111; ln = 1311; un = 1222; hn = 1244; dn = 1971; fn = 1984; pn = 1984; gn = 1985; yn = 4550; mn = 5999; vn = 6999; wn = 7e3; bn = 9041; En = 9734; _n = 9735; kn = 9802; xn = 1018; Sn = 1e4; Tn = 10001; Rn = 10002; Cn = 10003; Pn = 10004; An = 10005; In = 10006; On = 10007; Mn = 10012; Ln = 10015; Nn = 10030; Un = 10050; Bn = 10096; Hn = 10063; Fn = 13194; $n = 21e3; $e3 = 22242; We3 = 23194; Wn = 23195; Dn = 24133; ce5 = 27235; Vn = 3e4; qn = 30001; zn = 30002; Gn = 30003; Jn = 30004; jn = 30008; Zn = 30009; Kn = 30015; Xn = 30017; Qn = 30018; Yn = 30023; er2 = 30024; tr2 = 30030; nr2 = 30078; rr2 = 30311; ir2 = 30315; sr = 30402; ar = 30403; or2 = 31922; cr = 31923; lr = 31924; ur2 = 31925; hr2 = 31987; dr = 31989; fr = 31990; pr = 34550; gr = 39e3; vr = {}; f12(vr, { getHex64: () => j14, getInt: () => De3, getSubscriptionId: () => Ve3, matchEventId: () => wr, matchEventKind: () => Er, matchEventPubkey: () => br }); _r = {}; f12(_r, { makeAuthEvent: () => qe3 }); ze3 = class extends Error { constructor(e15, t14) { super(`Tried to send message '${e15} on a closed connection to ${t14}.`), this.name = "SendingOnClosedConnection"; } }; le4 = class { url; _connected = false; onclose = null; onnotice = (e15) => console.debug(`NOTICE from ${this.url}: ${e15}`); onauth; baseEoseTimeout = 4400; publishTimeout = 4400; pingFrequency = 29e3; pingTimeout = 2e4; resubscribeBackoff = [1e4, 1e4, 1e4, 2e4, 2e4, 3e4, 6e4]; openSubs = /* @__PURE__ */ new Map(); enablePing; enableReconnect; idleSince = Date.now(); ongoingOperations = 0; reconnectTimeoutHandle; pingIntervalHandle; reconnectAttempts = 0; skipReconnection = false; connectionPromise; openCountRequests = /* @__PURE__ */ new Map(); openEventPublishes = /* @__PURE__ */ new Map(); ws; challenge; authPromise; serial = 0; verifyEvent; _WebSocket; constructor(e15, t14) { this.url = P14(e15), this.verifyEvent = t14.verifyEvent, this._WebSocket = t14.websocketImplementation || WebSocket, this.enablePing = t14.enablePing, this.enableReconnect = t14.enableReconnect || false; } static async connect(e15, t14) { let n24 = new le4(e15, t14); return await n24.connect(t14), n24; } closeAllSubscriptions(e15) { for (let [t14, n24] of this.openSubs) n24.close(e15); this.openSubs.clear(); for (let [t14, n24] of this.openEventPublishes) n24.reject(new Error(e15)); this.openEventPublishes.clear(); for (let [t14, n24] of this.openCountRequests) n24.reject(new Error(e15)); this.openCountRequests.clear(); } get connected() { return this._connected; } async reconnect() { let e15 = this.resubscribeBackoff[Math.min(this.reconnectAttempts, this.resubscribeBackoff.length - 1)]; this.reconnectAttempts++, this.reconnectTimeoutHandle = setTimeout(async () => { try { await this.connect(); } catch { } }, e15); } handleHardClose(e15) { this.pingIntervalHandle && (clearInterval(this.pingIntervalHandle), this.pingIntervalHandle = void 0), this._connected = false, this.connectionPromise = void 0, this.idleSince = void 0, this.enableReconnect && !this.skipReconnection ? this.reconnect() : (this.onclose?.(), this.closeAllSubscriptions(e15)); } async connect(e15) { let t14; return this.connectionPromise ? this.connectionPromise : (this.challenge = void 0, this.authPromise = void 0, this.skipReconnection = false, this.connectionPromise = new Promise((n24, r19) => { e15?.timeout && (t14 = setTimeout(() => { r19("connection timed out"), this.connectionPromise = void 0, this.skipReconnection = true, this.onclose?.(), this.handleHardClose("relay connection timed out"); }, e15.timeout)), e15?.abort && (e15.abort.onabort = r19); try { this.ws = new this._WebSocket(this.url); } catch (i20) { clearTimeout(t14), r19(i20); return; } this.ws.onopen = () => { this.reconnectTimeoutHandle && (clearTimeout(this.reconnectTimeoutHandle), this.reconnectTimeoutHandle = void 0), clearTimeout(t14), this._connected = true; let i20 = this.reconnectAttempts > 0; this.reconnectAttempts = 0; for (let s38 of this.openSubs.values()) { if (s38.eosed = false, i20) for (let a36 = 0; a36 < s38.filters.length; a36++) s38.lastEmitted && (s38.filters[a36].since = s38.lastEmitted + 1); s38.fire(); } this.enablePing && (this.pingIntervalHandle = setInterval(() => this.pingpong(), this.pingFrequency)), n24(); }, this.ws.onerror = () => { clearTimeout(t14), r19("connection failed"), this.connectionPromise = void 0, this.skipReconnection = true, this.onclose?.(), this.handleHardClose("relay connection failed"); }, this.ws.onclose = (i20) => { clearTimeout(t14), r19(i20.message || "websocket closed"), this.handleHardClose("relay connection closed"); }, this.ws.onmessage = this._onmessage.bind(this); }), this.connectionPromise); } waitForPingPong() { return new Promise((e15) => { this.ws.once("pong", () => e15(true)), this.ws.ping(); }); } waitForDummyReq() { return new Promise((e15, t14) => { if (!this.connectionPromise) return t14(new Error(`no connection to ${this.url}, can't ping`)); try { let n24 = this.subscribe([{ ids: ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"], limit: 0 }], { label: "", oneose: () => { e15(true), n24.close(); }, onclose() { e15(true); }, eoseTimeout: this.pingTimeout + 1e3 }); } catch (n24) { t14(n24); } }); } async pingpong() { this.ws?.readyState === 1 && (await Promise.any([this.ws && this.ws.ping && this.ws.once ? this.waitForPingPong() : this.waitForDummyReq(), new Promise((t14) => setTimeout(() => t14(false), this.pingTimeout))]) || this.ws?.readyState === this._WebSocket.OPEN && this.ws?.close()); } async send(e15) { if (!this.connectionPromise) throw new ze3(e15, this.url); this.connectionPromise.then(() => { this.ws?.send(e15); }); } async auth(e15) { let t14 = this.challenge; if (!t14) throw new Error("can't perform auth, no challenge was received"); return this.authPromise ? this.authPromise : (this.authPromise = new Promise(async (n24, r19) => { try { let i20 = await e15(qe3(this.url, t14)), s38 = setTimeout(() => { let a36 = this.openEventPublishes.get(i20.id); a36 && (a36.reject(new Error("auth timed out")), this.openEventPublishes.delete(i20.id)); }, this.publishTimeout); this.openEventPublishes.set(i20.id, { resolve: n24, reject: r19, timeout: s38 }), this.send('["AUTH",' + JSON.stringify(i20) + "]"); } catch (i20) { console.warn("subscribe auth function failed:", i20); } }), this.authPromise); } async publish(e15) { this.idleSince = void 0, this.ongoingOperations++; let t14 = new Promise((n24, r19) => { let i20 = setTimeout(() => { let s38 = this.openEventPublishes.get(e15.id); s38 && (s38.reject(new Error("publish timed out")), this.openEventPublishes.delete(e15.id)); }, this.publishTimeout); this.openEventPublishes.set(e15.id, { resolve: n24, reject: r19, timeout: i20 }); }); return this.send('["EVENT",' + JSON.stringify(e15) + "]"), this.ongoingOperations--, this.ongoingOperations === 0 && (this.idleSince = Date.now()), t14; } async count(e15, t14) { this.serial++; let n24 = t14?.id || "count:" + this.serial, r19 = new Promise((i20, s38) => { this.openCountRequests.set(n24, { resolve: i20, reject: s38 }); }); return this.send('["COUNT","' + n24 + '",' + JSON.stringify(e15).substring(1)), r19; } subscribe(e15, t14) { t14.label !== "" && (this.idleSince = void 0, this.ongoingOperations++); let n24 = this.prepareSubscription(e15, t14); return n24.fire(), t14.abort && (t14.abort.onabort = () => n24.close(String(t14.abort.reason || ""))), n24; } prepareSubscription(e15, t14) { this.serial++; let n24 = t14.id || (t14.label ? t14.label + ":" : "sub:") + this.serial, r19 = new kr2(this, n24, e15, t14); return this.openSubs.set(n24, r19), r19; } close() { this.skipReconnection = true, this.reconnectTimeoutHandle && (clearTimeout(this.reconnectTimeoutHandle), this.reconnectTimeoutHandle = void 0), this.pingIntervalHandle && (clearInterval(this.pingIntervalHandle), this.pingIntervalHandle = void 0), this.closeAllSubscriptions("relay connection closed by us"), this._connected = false, this.idleSince = void 0, this.onclose?.(), this.ws?.readyState === this._WebSocket.OPEN && this.ws?.close(); } _onmessage(e15) { let t14 = e15.data; if (!t14) return; let n24 = Ve3(t14); if (n24) { let r19 = this.openSubs.get(n24); if (!r19) return; let i20 = j14(t14, "id"), s38 = r19.alreadyHaveEvent?.(i20); if (r19.receivedEvent?.(this, i20), s38) return; } try { let r19 = JSON.parse(t14); switch (r19[0]) { case "EVENT": { let i20 = this.openSubs.get(r19[1]), s38 = r19[2]; this.verifyEvent(s38) && mr(i20.filters, s38) ? i20.onevent(s38) : i20.oninvalidevent?.(s38), (!i20.lastEmitted || i20.lastEmitted < s38.created_at) && (i20.lastEmitted = s38.created_at); return; } case "COUNT": { let i20 = r19[1], s38 = r19[2], a36 = this.openCountRequests.get(i20); a36 && (a36.resolve(s38.count), this.openCountRequests.delete(i20)); return; } case "EOSE": { let i20 = this.openSubs.get(r19[1]); if (!i20) return; i20.receivedEose(); return; } case "OK": { let i20 = r19[1], s38 = r19[2], a36 = r19[3], o27 = this.openEventPublishes.get(i20); o27 && (clearTimeout(o27.timeout), s38 ? o27.resolve(a36) : o27.reject(new Error(a36)), this.openEventPublishes.delete(i20)); return; } case "CLOSED": { let i20 = r19[1], s38 = this.openSubs.get(i20); if (!s38) return; s38.closed = true, s38.close(r19[2]); return; } case "NOTICE": { this.onnotice(r19[1]); return; } case "AUTH": { this.challenge = r19[1], this.onauth && this.auth(this.onauth); return; } default: { this.openSubs.get(r19[1])?.oncustom?.(r19); return; } } } catch (r19) { try { let [i20, s38, a36] = JSON.parse(t14); console.warn(`[nostr] relay ${this.url} error processing message:`, r19, a36); } catch { console.warn(`[nostr] relay ${this.url} error processing message:`, r19); } return; } } }; kr2 = class { relay; id; lastEmitted; closed = false; eosed = false; filters; alreadyHaveEvent; receivedEvent; onevent; oninvalidevent; oneose; onclose; oncustom; eoseTimeout; eoseTimeoutHandle; constructor(e15, t14, n24, r19) { if (n24.length === 0) throw new Error("subscription can't be created with zero filters"); this.relay = e15, this.filters = n24, this.id = t14, this.alreadyHaveEvent = r19.alreadyHaveEvent, this.receivedEvent = r19.receivedEvent, this.eoseTimeout = r19.eoseTimeout || e15.baseEoseTimeout, this.oneose = r19.oneose, this.onclose = r19.onclose, this.oninvalidevent = r19.oninvalidevent, this.onevent = r19.onevent || ((i20) => { console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`, i20); }); } fire() { this.relay.send('["REQ","' + this.id + '",' + JSON.stringify(this.filters).substring(1)), this.eoseTimeoutHandle = setTimeout(this.receivedEose.bind(this), this.eoseTimeout); } receivedEose() { this.eosed || (clearTimeout(this.eoseTimeoutHandle), this.eosed = true, this.oneose?.()); } close(e15 = "closed by caller") { if (!this.closed && this.relay.connected) { try { this.relay.send('["CLOSE",' + JSON.stringify(this.id) + "]"); } catch (t14) { if (!(t14 instanceof ze3)) throw t14; } this.closed = true; } this.relay.openSubs.delete(this.id), this.relay.ongoingOperations--, this.relay.ongoingOperations === 0 && (this.relay.idleSince = Date.now()), this.onclose?.(e15); } }; try { Ge3 = WebSocket; } catch { } xr = class extends le4 { constructor(e15, t14) { super(e15, { verifyEvent: L11, websocketImplementation: Ge3, ...t14 }); } static async connect(e15, t14) { let n24 = new xr(e15, t14); return await n24.connect(), n24; } }; Sr = (e15) => (e15[R15] = true, true); Tr = class { relays = /* @__PURE__ */ new Map(); seenOn = /* @__PURE__ */ new Map(); trackRelays = false; verifyEvent; enablePing; enableReconnect; automaticallyAuth; trustedRelayURLs = /* @__PURE__ */ new Set(); onRelayConnectionFailure; onRelayConnectionSuccess; allowConnectingToRelay; maxWaitForConnection; _WebSocket; constructor(e15) { this.verifyEvent = e15.verifyEvent, this._WebSocket = e15.websocketImplementation, this.enablePing = e15.enablePing, this.enableReconnect = e15.enableReconnect || false, this.automaticallyAuth = e15.automaticallyAuth, this.onRelayConnectionFailure = e15.onRelayConnectionFailure, this.onRelayConnectionSuccess = e15.onRelayConnectionSuccess, this.allowConnectingToRelay = e15.allowConnectingToRelay, this.maxWaitForConnection = e15.maxWaitForConnection || 3e3; } async ensureRelay(e15, t14) { e15 = P14(e15); let n24 = this.relays.get(e15); if (n24 || (n24 = new le4(e15, { verifyEvent: this.trustedRelayURLs.has(e15) ? Sr : this.verifyEvent, websocketImplementation: this._WebSocket, enablePing: this.enablePing, enableReconnect: this.enableReconnect }), n24.onclose = () => { this.relays.delete(e15); }, this.relays.set(e15, n24)), this.automaticallyAuth) { let r19 = this.automaticallyAuth(e15); r19 && (n24.onauth = r19); } try { await n24.connect({ timeout: t14?.connectionTimeout, abort: t14?.abort }); } catch (r19) { throw this.relays.delete(e15), r19; } return n24; } close(e15) { e15.map(P14).forEach((t14) => { this.relays.get(t14)?.close(), this.relays.delete(t14); }); } subscribe(e15, t14, n24) { let r19 = [], i20 = []; for (let s38 = 0; s38 < e15.length; s38++) { let a36 = P14(e15[s38]); r19.find((o27) => o27.url === a36) || i20.indexOf(a36) === -1 && (i20.push(a36), r19.push({ url: a36, filter: t14 })); } return this.subscribeMap(r19, n24); } subscribeMany(e15, t14, n24) { return this.subscribe(e15, t14, n24); } subscribeMap(e15, t14) { let n24 = /* @__PURE__ */ new Map(); for (let h46 of e15) { let { url: d31, filter: p37 } = h46; n24.has(d31) || n24.set(d31, []), n24.get(d31).push(p37); } let r19 = Array.from(n24.entries()).map(([h46, d31]) => ({ url: h46, filters: d31 })); this.trackRelays && (t14.receivedEvent = (h46, d31) => { let p37 = this.seenOn.get(d31); p37 || (p37 = /* @__PURE__ */ new Set(), this.seenOn.set(d31, p37)), p37.add(h46); }); let i20 = /* @__PURE__ */ new Set(), s38 = [], a36 = [], o27 = (h46) => { a36[h46] || (a36[h46] = true, a36.filter((d31) => d31).length === r19.length && (t14.oneose?.(), o27 = () => { })); }, c25 = [], l28 = (h46, d31) => { c25[h46] || (o27(h46), c25[h46] = d31, c25.filter((p37) => p37).length === r19.length && (t14.onclose?.(c25), l28 = () => { })); }, u36 = (h46) => { if (t14.alreadyHaveEvent?.(h46)) return true; let d31 = i20.has(h46); return i20.add(h46), d31; }, g45 = Promise.all(r19.map(async ({ url: h46, filters: d31 }, p37) => { if (this.allowConnectingToRelay?.(h46, ["read", d31]) === false) { l28(p37, "connection skipped by allowConnectingToRelay"); return; } let y53; try { y53 = await this.ensureRelay(h46, { connectionTimeout: this.maxWaitForConnection < (t14.maxWait || 0) ? Math.max(t14.maxWait * 0.8, t14.maxWait - 1e3) : this.maxWaitForConnection, abort: t14.abort }); } catch (m37) { this.onRelayConnectionFailure?.(h46), l28(p37, m37?.message || String(m37)); return; } this.onRelayConnectionSuccess?.(h46); let E58 = y53.subscribe(d31, { ...t14, oneose: () => o27(p37), onclose: (m37) => { m37.startsWith("auth-required: ") && t14.onauth ? y53.auth(t14.onauth).then(() => { y53.subscribe(d31, { ...t14, oneose: () => o27(p37), onclose: (w44) => { l28(p37, w44); }, alreadyHaveEvent: u36, eoseTimeout: t14.maxWait, abort: t14.abort }); }).catch((w44) => { l28(p37, `auth was required and attempted, but failed with: ${w44}`); }) : l28(p37, m37); }, alreadyHaveEvent: u36, eoseTimeout: t14.maxWait, abort: t14.abort }); s38.push(E58); })); return { async close(h46) { await g45, s38.forEach((d31) => { d31.close(h46); }); } }; } subscribeEose(e15, t14, n24) { let r19; return r19 = this.subscribe(e15, t14, { ...n24, oneose() { let i20 = "closed automatically on eose"; r19 ? r19.close(i20) : n24.onclose?.(e15.map((s38) => i20)); } }), r19; } subscribeManyEose(e15, t14, n24) { return this.subscribeEose(e15, t14, n24); } async querySync(e15, t14, n24) { return new Promise(async (r19) => { let i20 = []; this.subscribeEose(e15, t14, { ...n24, onevent(s38) { i20.push(s38); }, onclose(s38) { r19(i20); } }); }); } async get(e15, t14, n24) { t14.limit = 1; let r19 = await this.querySync(e15, t14, n24); return r19.sort((i20, s38) => s38.created_at - i20.created_at), r19[0] || null; } publish(e15, t14, n24) { return e15.map(P14).map(async (r19, i20, s38) => { if (s38.indexOf(r19) !== i20) return Promise.reject("duplicate url"); if (this.allowConnectingToRelay?.(r19, ["write", t14]) === false) return Promise.reject("connection skipped by allowConnectingToRelay"); let a36; try { a36 = await this.ensureRelay(r19, { connectionTimeout: this.maxWaitForConnection < (n24?.maxWait || 0) ? Math.max(n24.maxWait * 0.8, n24.maxWait - 1e3) : this.maxWaitForConnection, abort: n24?.abort }); } catch (o27) { return this.onRelayConnectionFailure?.(r19), "connection failure: " + String(o27); } return a36.publish(t14).catch(async (o27) => { if (o27 instanceof Error && o27.message.startsWith("auth-required: ") && n24?.onauth) return await a36.auth(n24.onauth), a36.publish(t14); throw o27; }).then((o27) => { if (this.trackRelays) { let c25 = this.seenOn.get(t14.id); c25 || (c25 = /* @__PURE__ */ new Set(), this.seenOn.set(t14.id, c25)), c25.add(a36); } return o27; }); }); } listConnectionStatus() { let e15 = /* @__PURE__ */ new Map(); return this.relays.forEach((t14, n24) => e15.set(n24, t14.connected)), e15; } destroy() { this.relays.forEach((e15) => e15.close()), this.relays = /* @__PURE__ */ new Map(); } pruneIdleRelays(e15 = 1e4) { let t14 = []; for (let [n24, r19] of this.relays) r19.idleSince && Date.now() - r19.idleSince >= e15 && (this.relays.delete(n24), t14.push(n24), r19.close()); return t14; } }; try { Je3 = WebSocket; } catch { } Ss = class extends Tr { constructor(e15) { super({ verifyEvent: L11, websocketImplementation: Je3, maxWaitForConnection: 3e3, ...e15 }); } }; Rr = {}; f12(Rr, { BECH32_REGEX: () => je4, Bech32MaxSize: () => ue4, NostrTypeGuard: () => Pr2, decode: () => N15, decodeNostrURI: () => Ir, encodeBytes: () => K15, naddrEncode: () => Br, neventEncode: () => Ur, noteEncode: () => Lr, nprofileEncode: () => Nr, npubEncode: () => Mr2, nsecEncode: () => Or2 }); Pr2 = { isNProfile: (e15) => /^nprofile1[a-z\d]+$/.test(e15 || ""), isNEvent: (e15) => /^nevent1[a-z\d]+$/.test(e15 || ""), isNAddr: (e15) => /^naddr1[a-z\d]+$/.test(e15 || ""), isNSec: (e15) => /^nsec1[a-z\d]{58}$/.test(e15 || ""), isNPub: (e15) => /^npub1[a-z\d]{58}$/.test(e15 || ""), isNote: (e15) => /^note1[a-z\d]+$/.test(e15 || ""), isNcryptsec: (e15) => /^ncryptsec1[a-z\d]+$/.test(e15 || "") }; ue4 = 5e3; je4 = /[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/; Hr = /\bnostr:((note|npub|naddr|nevent|nprofile)1\w+)\b|#\[(\d+)\]/g; Fr = {}; f12(Fr, { decrypt: () => Wr, encrypt: () => Xe3 }); Dr = {}; f12(Dr, { NIP05_REGEX: () => de6, isNip05: () => Vr, isValid: () => Gr2, queryProfile: () => Ye3, searchDomain: () => zr, useFetchImplementation: () => qr }); de6 = /^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/; Vr = (e15) => de6.test(e15 || ""); try { X8 = fetch; } catch { } Jr = {}; f12(Jr, { parse: () => jr }); Zr = {}; f12(Zr, { fetchRelayInformation: () => Xr, useFetchImplementation: () => Kr }); try { et4 = fetch; } catch { } Qr = {}; f12(Qr, { getPow: () => ti, minePow: () => ri }); ii = {}; f12(ii, { unwrapEvent: () => ki, unwrapManyEvents: () => xi, wrapEvent: () => gt4, wrapManyEvents: () => _i }); si = {}; f12(si, { createRumor: () => ht3, createSeal: () => dt4, createWrap: () => ft4, unwrapEvent: () => we5, unwrapManyEvents: () => pt4, wrapEvent: () => q15, wrapManyEvents: () => bi }); ai = {}; f12(ai, { decrypt: () => ve6, encrypt: () => me5, getConversationKey: () => ge5, v2: () => vi }); rt5 = 1; it4 = 65535; vi = { utils: { getConversationKey: ge5, calcPaddedLen: ye6 }, encrypt: me5, decrypt: ve6 }; wi = 2880 * 60; ot4 = () => Math.round(Date.now() / 1e3); ct5 = () => Math.round(ot4() - Math.random() * wi); lt5 = (e15, t14) => ge5(e15, t14); ut4 = (e15, t14, n24) => me5(JSON.stringify(e15), lt5(t14, n24)); Te3 = (e15, t14) => JSON.parse(ve6(e15.content, lt5(t14, e15.pubkey))); ki = we5; xi = pt4; Si = {}; f12(Si, { finishRepostEvent: () => Ti, getRepostedEvent: () => Ri, getRepostedEventPointer: () => yt3 }); Ci = {}; f12(Ci, { NOSTR_URI_REGEX: () => be5, parse: () => Ai, test: () => Pi }); be5 = new RegExp(`nostr:(${je4.source})`); Ii = {}; f12(Ii, { finishReactionEvent: () => Oi, getReactedEventPointer: () => Mi }); Li = {}; f12(Li, { parse: () => Ui }); Y14 = /\W/m; Re3 = /[^\w\/] |[^\w\/]$|$|,| /m; Ni = 42; Bi = {}; f12(Bi, { channelCreateEvent: () => Hi, channelHideMessageEvent: () => Wi, channelMessageEvent: () => $i, channelMetadataEvent: () => Fi, channelMuteUserEvent: () => Di }); Hi = (e15, t14) => { let n24; if (typeof e15.content == "object") n24 = JSON.stringify(e15.content); else if (typeof e15.content == "string") n24 = e15.content; else return; return b12({ kind: Le4, tags: [...e15.tags ?? []], content: n24, created_at: e15.created_at }, t14); }; Fi = (e15, t14) => { let n24; if (typeof e15.content == "object") n24 = JSON.stringify(e15.content); else if (typeof e15.content == "string") n24 = e15.content; else return; return b12({ kind: Ne3, tags: [["e", e15.channel_create_event_id], ...e15.tags ?? []], content: n24, created_at: e15.created_at }, t14); }; $i = (e15, t14) => { let n24 = [["e", e15.channel_create_event_id, e15.relay_url, "root"]]; return e15.reply_to_channel_message_event_id && n24.push(["e", e15.reply_to_channel_message_event_id, e15.relay_url, "reply"]), b12({ kind: Ue3, tags: [...n24, ...e15.tags ?? []], content: e15.content, created_at: e15.created_at }, t14); }; Wi = (e15, t14) => { let n24; if (typeof e15.content == "object") n24 = JSON.stringify(e15.content); else if (typeof e15.content == "string") n24 = e15.content; else return; return b12({ kind: Be4, tags: [["e", e15.channel_message_event_id], ...e15.tags ?? []], content: n24, created_at: e15.created_at }, t14); }; Di = (e15, t14) => { let n24; if (typeof e15.content == "object") n24 = JSON.stringify(e15.content); else if (typeof e15.content == "string") n24 = e15.content; else return; return b12({ kind: He3, tags: [["p", e15.pubkey_to_mute], ...e15.tags ?? []], content: n24, created_at: e15.created_at }, t14); }; Vi = {}; f12(Vi, { EMOJI_SHORTCODE_REGEX: () => mt4, matchAll: () => qi, regex: () => Ee5, replaceAll: () => zi }); mt4 = /:(\w+):/; Ee5 = () => new RegExp(`\\B${mt4.source}\\B`, "g"); Gi = {}; f12(Gi, { useFetchImplementation: () => Ji, validateGithub: () => ji }); try { _e5 = fetch; } catch { } Zi = {}; f12(Zi, { makeNwcRequestEvent: () => Xi, parseConnectionString: () => Ki }); Qi = {}; f12(Qi, { normalizeIdentifier: () => Yi }); es = {}; f12(es, { getSatoshisAmountFromBolt11: () => as, getZapEndpoint: () => ns, makeZapReceipt: () => ss, makeZapRequest: () => rs, useFetchImplementation: () => ts, validateZapRequest: () => is }); try { ke4 = fetch; } catch { } os = {}; f12(os, { Negentropy: () => bt5, NegentropyStorageVector: () => hs, NegentropySync: () => ds }); ee3 = 97; A15 = 32; wt2 = 16; T16 = { Skip: 0, Fingerprint: 1, IdList: 2 }; k20 = class { _raw; length; constructor(e15) { typeof e15 == "number" ? (this._raw = new Uint8Array(e15), this.length = 0) : e15 instanceof Uint8Array ? (this._raw = new Uint8Array(e15), this.length = e15.length) : (this._raw = new Uint8Array(512), this.length = 0); } unwrap() { return this._raw.subarray(0, this.length); } get capacity() { return this._raw.byteLength; } extend(e15) { if (e15 instanceof k20 && (e15 = e15.unwrap()), typeof e15.length != "number") throw Error("bad length"); let t14 = e15.length + this.length; if (this.capacity < t14) { let n24 = this._raw, r19 = Math.max(this.capacity * 2, t14); this._raw = new Uint8Array(r19), this._raw.set(n24); } this._raw.set(e15, this.length), this.length += e15.length; } shift() { let e15 = this._raw[0]; return this._raw = this._raw.subarray(1), this.length--, e15; } shiftN(e15 = 1) { let t14 = this._raw.subarray(0, e15); return this._raw = this._raw.subarray(e15), this.length -= e15, t14; } }; us = class { buf; constructor() { this.setToZero(); } setToZero() { this.buf = new Uint8Array(A15); } add(e15) { let t14 = 0, n24 = 0, r19 = new DataView(this.buf.buffer), i20 = new DataView(e15.buffer); for (let s38 = 0; s38 < 8; s38++) { let a36 = s38 * 4, o27 = r19.getUint32(a36, true), c25 = i20.getUint32(a36, true), l28 = o27; l28 += t14, l28 += c25, l28 > 4294967295 && (n24 = 1), r19.setUint32(a36, l28 & 4294967295, true), t14 = n24, n24 = 0; } } negate() { let e15 = new DataView(this.buf.buffer); for (let n24 = 0; n24 < 8; n24++) { let r19 = n24 * 4; e15.setUint32(r19, ~e15.getUint32(r19, true)); } let t14 = new Uint8Array(A15); t14[0] = 1, this.add(t14); } getFingerprint(e15) { let t14 = new k20(); return t14.extend(this.buf), t14.extend(_18(e15)), f0(t14.unwrap()).subarray(0, wt2); } }; hs = class { items; sealed; constructor() { this.items = [], this.sealed = false; } insert(e15, t14) { if (this.sealed) throw Error("already sealed"); let n24 = S10(t14); if (n24.byteLength !== A15) throw Error("bad id size for added item"); this.items.push({ timestamp: e15, id: n24 }); } seal() { if (this.sealed) throw Error("already sealed"); this.sealed = true, this.items.sort(te5); for (let e15 = 1; e15 < this.items.length; e15++) if (te5(this.items[e15 - 1], this.items[e15]) === 0) throw Error("duplicate item inserted"); } unseal() { this.sealed = false; } size() { return this._checkSealed(), this.items.length; } getItem(e15) { if (this._checkSealed(), e15 >= this.items.length) throw Error("out of range"); return this.items[e15]; } iterate(e15, t14, n24) { this._checkSealed(), this._checkBounds(e15, t14); for (let r19 = e15; r19 < t14 && n24(this.items[r19], r19); ++r19) ; } findLowerBound(e15, t14, n24) { return this._checkSealed(), this._checkBounds(e15, t14), this._binarySearch(this.items, e15, t14, (r19) => te5(r19, n24) < 0); } fingerprint(e15, t14) { let n24 = new us(); return n24.setToZero(), this.iterate(e15, t14, (r19) => (n24.add(r19.id), true)), n24.getFingerprint(t14 - e15); } _checkSealed() { if (!this.sealed) throw Error("not sealed"); } _checkBounds(e15, t14) { if (e15 > t14 || t14 > this.items.length) throw Error("bad range"); } _binarySearch(e15, t14, n24, r19) { let i20 = n24 - t14; for (; i20 > 0; ) { let s38 = t14, a36 = Math.floor(i20 / 2); s38 += a36, r19(e15[s38]) ? (t14 = ++s38, i20 -= a36 + 1) : i20 = a36; } return t14; } }; bt5 = class { storage; frameSizeLimit; lastTimestampIn; lastTimestampOut; constructor(e15, t14 = 6e4) { if (t14 < 4096) throw Error("frameSizeLimit too small"); this.storage = e15, this.frameSizeLimit = t14, this.lastTimestampIn = 0, this.lastTimestampOut = 0; } _bound(e15, t14) { return { timestamp: e15, id: t14 || new Uint8Array(0) }; } initiate() { let e15 = new k20(); return e15.extend(new Uint8Array([ee3])), this.splitRange(0, this.storage.size(), this._bound(Number.MAX_VALUE), e15), I9(e15.unwrap()); } reconcile(e15, t14, n24) { let r19 = new k20(S10(e15)); this.lastTimestampIn = this.lastTimestampOut = 0; let i20 = new k20(); i20.extend(new Uint8Array([ee3])); let s38 = ls(r19); if (s38 < 96 || s38 > 111) throw Error("invalid negentropy protocol version byte"); if (s38 !== ee3) throw Error("unsupported negentropy protocol version requested: " + (s38 - 96)); let a36 = this.storage.size(), o27 = this._bound(0), c25 = 0, l28 = false; for (; r19.length !== 0; ) { let u36 = new k20(), g45 = () => { l28 && (l28 = false, u36.extend(this.encodeBound(o27)), u36.extend(_18(T16.Skip))); }, h46 = this.decodeBound(r19), d31 = B9(r19), p37 = c25, y53 = this.storage.findLowerBound(c25, a36, h46); if (d31 === T16.Skip) l28 = true; else if (d31 === T16.Fingerprint) { let E58 = $14(r19, wt2), m37 = this.storage.fingerprint(p37, y53); Et4(E58, m37) !== 0 ? (g45(), this.splitRange(p37, y53, h46, u36)) : l28 = true; } else if (d31 === T16.IdList) { let E58 = B9(r19), m37 = {}; for (let w44 = 0; w44 < E58; w44++) { let O53 = $14(r19, A15); m37[I9(O53)] = O53; } if (l28 = true, this.storage.iterate(p37, y53, (w44) => { let O53 = w44.id, Se17 = I9(O53); return m37[Se17] ? delete m37[I9(O53)] : t14?.(Se17), true; }), n24) for (let w44 of Object.values(m37)) n24(I9(w44)); } else throw Error("unexpected mode"); if (this.exceededFrameSizeLimit(i20.length + u36.length)) { let E58 = this.storage.fingerprint(y53, a36); i20.extend(this.encodeBound(this._bound(Number.MAX_VALUE))), i20.extend(_18(T16.Fingerprint)), i20.extend(E58); break; } else i20.extend(u36); c25 = y53, o27 = h46; } return i20.length === 1 ? null : I9(i20.unwrap()); } splitRange(e15, t14, n24, r19) { let i20 = t14 - e15, s38 = 16; if (i20 < s38 * 2) r19.extend(this.encodeBound(n24)), r19.extend(_18(T16.IdList)), r19.extend(_18(i20)), this.storage.iterate(e15, t14, (a36) => (r19.extend(a36.id), true)); else { let a36 = Math.floor(i20 / s38), o27 = i20 % s38, c25 = e15; for (let l28 = 0; l28 < s38; l28++) { let u36 = a36 + (l28 < o27 ? 1 : 0), g45 = this.storage.fingerprint(c25, c25 + u36); c25 += u36; let h46; if (c25 === t14) h46 = n24; else { let d31, p37; this.storage.iterate(c25 - 1, c25 + 1, (y53, E58) => (E58 === c25 - 1 ? d31 = y53 : p37 = y53, true)), h46 = this.getMinimalBound(d31, p37); } r19.extend(this.encodeBound(h46)), r19.extend(_18(T16.Fingerprint)), r19.extend(g45); } } } exceededFrameSizeLimit(e15) { return e15 > this.frameSizeLimit - 200; } decodeTimestampIn(e15) { let t14 = B9(e15); return t14 = t14 === 0 ? Number.MAX_VALUE : t14 - 1, this.lastTimestampIn === Number.MAX_VALUE || t14 === Number.MAX_VALUE ? (this.lastTimestampIn = Number.MAX_VALUE, Number.MAX_VALUE) : (t14 += this.lastTimestampIn, this.lastTimestampIn = t14, t14); } decodeBound(e15) { let t14 = this.decodeTimestampIn(e15), n24 = B9(e15); if (n24 > A15) throw Error("bound key too long"); let r19 = $14(e15, n24); return { timestamp: t14, id: r19 }; } encodeTimestampOut(e15) { if (e15 === Number.MAX_VALUE) return this.lastTimestampOut = Number.MAX_VALUE, _18(0); let t14 = e15; return e15 -= this.lastTimestampOut, this.lastTimestampOut = t14, _18(e15 + 1); } encodeBound(e15) { let t14 = new k20(); return t14.extend(this.encodeTimestampOut(e15.timestamp)), t14.extend(_18(e15.id.length)), t14.extend(e15.id), t14; } getMinimalBound(e15, t14) { if (t14.timestamp !== e15.timestamp) return this._bound(t14.timestamp); { let n24 = 0, r19 = t14.id, i20 = e15.id; for (let s38 = 0; s38 < A15 && r19[s38] === i20[s38]; s38++) n24++; return this._bound(t14.timestamp, t14.id.subarray(0, n24 + 1)); } } }; ds = class { relay; storage; neg; filter; subscription; onhave; onneed; constructor(e15, t14, n24, r19 = {}) { this.relay = e15, this.storage = t14, this.neg = new bt5(t14), this.onhave = r19.onhave, this.onneed = r19.onneed, this.filter = n24, this.subscription = this.relay.prepareSubscription([{}], { label: r19.label || "negentropy" }), this.subscription.oncustom = (i20) => { switch (i20[0]) { case "NEG-MSG": { i20.length < 3 && console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${i20}`); try { let s38 = this.neg.reconcile(i20[2], this.onhave, this.onneed); s38 ? this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${s38}"]`) : (this.close(), r19.onclose?.()); } catch (s38) { console.error("negentropy reconcile error:", s38), r19?.onclose?.(`reconcile error: ${s38}`); } break; } case "NEG-CLOSE": { let s38 = i20[2]; console.warn("negentropy error:", s38), r19.onclose?.(s38); break; } case "NEG-ERR": r19.onclose?.(); } }; } async start() { let e15 = this.neg.initiate(); this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${e15}"]`); } close() { this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`), this.subscription.close(); } }; fs = {}; f12(fs, { getToken: () => ys, hashPayload: () => xe4, unpackEventFromToken: () => xt4, validateEvent: () => At3, validateEventKind: () => Tt, validateEventMethodTag: () => Ct3, validateEventPayloadTag: () => Pt4, validateEventTimestamp: () => St2, validateEventUrlTag: () => Rt2, validateToken: () => ms }); kt3 = "Nostr "; } }); // esm:https://esm.sh/*nostr-tools@2.23.3?target=esnext&lp=node_modules%252Fnostr-tools var nostr_tools_2_23_exports = {}; __export(nostr_tools_2_23_exports, { Relay: () => xr, SimplePool: () => Ss, finalizeEvent: () => b12, fj: () => vr, generateSecretKey: () => Dt3, getEventHash: () => F14, getFilterLimit: () => xs, getPublicKey: () => ie5, kinds: () => Vt3, matchFilter: () => yr, matchFilters: () => mr, mergeFilters: () => ks, nip04: () => Fr, nip05: () => Dr, nip10: () => Jr, nip11: () => Zr, nip13: () => Qr, nip17: () => ii, nip18: () => Si, nip19: () => Rr, nip21: () => Ci, nip25: () => Ii, nip27: () => Li, nip28: () => Bi, nip30: () => Vi, nip39: () => Gi, nip42: () => _r, nip44: () => ai, nip47: () => Zi, nip54: () => Qi, nip57: () => es, nip59: () => si, nip77: () => os, nip98: () => fs, parseReferences: () => Cs, serializeEvent: () => Wt2, sortEvents: () => bs, utils: () => Lt3, validateEvent: () => ne4, verifiedSymbol: () => R15, verifyEvent: () => L11 }); var init_nostr_tools_2_23 = __esm({ "esm:https://esm.sh/*nostr-tools@2.23.3?target=esnext&lp=node_modules%252Fnostr-tools"() { init_define_import_meta_env(); init_nostr_tools(); } }); // esm:https://esm.sh/*leaflet@1.9.4/esnext/leaflet.mjs?lp=node_modules%252Fleaflet var qo4, mn5, jo4, Ko4, Yo4, Jo4, Xo4, $o4, Qo4, vn5, ce28, es5, is4, ns5, os4, ss4, rs5, as5, hs4, us4, ls4, cs4, fs5, ds4, _s3, ms4, ps4, vs4, gs4, ys5, ws3, xs4, Ps4, Ls3, Ts3, bs4, Ms4, Cs4, Ss4, zs4, ks5, Es4, Os3, Zs3, Is4, Bs4, As3, Ns4, Rs3, Ds4, Hs4, Fs4, Ws5, Us3, Gs4, Vs5, qs3, js4, Ks4, Ys4, Js4, Xs4, $s5, Qs4, tr7, er8, ir9, nr9, or8, sr6, rr8, ar6, hr8, ur6, lr6, cr7, fr7, dr7, _r6, mr6, pr7, vr6, gr4, yr6, wr4, xr6, Pr5, Lr4, Tr3, br5, Mr5; var init_leaflet = __esm({ "esm:https://esm.sh/*leaflet@1.9.4/esnext/leaflet.mjs?lp=node_modules%252Fleaflet"() { init_define_import_meta_env(); qo4 = Object.create; mn5 = Object.defineProperty; jo4 = Object.getOwnPropertyDescriptor; Ko4 = Object.getOwnPropertyNames; Yo4 = Object.getPrototypeOf; Jo4 = Object.prototype.hasOwnProperty; Xo4 = (l28, A53) => () => (A53 || l28((A53 = { exports: {} }).exports, A53), A53.exports); $o4 = (l28, A53, x50, ft13) => { if (A53 && typeof A53 == "object" || typeof A53 == "function") for (let b45 of Ko4(A53)) !Jo4.call(l28, b45) && b45 !== x50 && mn5(l28, b45, { get: () => A53[b45], enumerable: !(ft13 = jo4(A53, b45)) || ft13.enumerable }); return l28; }; Qo4 = (l28, A53, x50) => (x50 = l28 != null ? qo4(Yo4(l28)) : {}, $o4(A53 || !l28 || !l28.__esModule ? mn5(x50, "default", { value: l28, enumerable: true }) : x50, l28)); vn5 = Xo4((le24, pn5) => { (function(l28, A53) { typeof le24 == "object" && typeof pn5 < "u" ? A53(le24) : typeof define == "function" && define.amd ? define(["exports"], A53) : (l28 = typeof globalThis < "u" ? globalThis : l28 || self, A53(l28.leaflet = {})); })(le24, function(l28) { "use strict"; var A53 = "1.9.4"; function x50(t14) { var e15, i20, n24, o27; for (i20 = 1, n24 = arguments.length; i20 < n24; i20++) { o27 = arguments[i20]; for (e15 in o27) t14[e15] = o27[e15]; } return t14; } var ft13 = Object.create || /* @__PURE__ */ function() { function t14() { } return function(e15) { return t14.prototype = e15, new t14(); }; }(); function b45(t14, e15) { var i20 = Array.prototype.slice; if (t14.bind) return t14.bind.apply(t14, i20.call(arguments, 1)); var n24 = i20.call(arguments, 2); return function() { return t14.apply(e15, n24.length ? n24.concat(i20.call(arguments)) : arguments); }; } var Je12 = 0; function P43(t14) { return "_leaflet_id" in t14 || (t14._leaflet_id = ++Je12), t14._leaflet_id; } function Xe14(t14, e15, i20) { var n24, o27, s38, r19; return r19 = function() { n24 = false, o27 && (s38.apply(i20, o27), o27 = false); }, s38 = function() { n24 ? o27 = arguments : (t14.apply(i20, arguments), setTimeout(r19, e15), n24 = true); }, s38; } function St11(t14, e15, i20) { var n24 = e15[1], o27 = e15[0], s38 = n24 - o27; return t14 === n24 && i20 ? t14 : ((t14 - o27) % s38 + s38) % s38 + o27; } function E58() { return false; } function $45(t14, e15) { if (e15 === false) return t14; var i20 = Math.pow(10, e15 === void 0 ? 6 : e15); return Math.round(t14 * i20) / i20; } function fe20(t14) { return t14.trim ? t14.trim() : t14.replace(/^\s+|\s+$/g, ""); } function dt15(t14) { return fe20(t14).split(/\s+/); } function S60(t14, e15) { Object.prototype.hasOwnProperty.call(t14, "options") || (t14.options = t14.options ? ft13(t14.options) : {}); for (var i20 in e15) t14.options[i20] = e15[i20]; return t14.options; } function $e13(t14, e15, i20) { var n24 = []; for (var o27 in t14) n24.push(encodeURIComponent(i20 ? o27.toUpperCase() : o27) + "=" + encodeURIComponent(t14[o27])); return (!e15 || e15.indexOf("?") === -1 ? "?" : "&") + n24.join("&"); } var gn4 = /\{ *([\w_ -]+) *\}/g; function Qe13(t14, e15) { return t14.replace(gn4, function(i20, n24) { var o27 = e15[n24]; if (o27 === void 0) throw new Error("No value provided for variable " + i20); return typeof o27 == "function" && (o27 = o27(e15)), o27; }); } var Y43 = Array.isArray || function(t14) { return Object.prototype.toString.call(t14) === "[object Array]"; }; function de24(t14, e15) { for (var i20 = 0; i20 < t14.length; i20++) if (t14[i20] === e15) return i20; return -1; } var Gt7 = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="; function _e22(t14) { return window["webkit" + t14] || window["moz" + t14] || window["ms" + t14]; } var ti4 = 0; function ei3(t14) { var e15 = +/* @__PURE__ */ new Date(), i20 = Math.max(0, 16 - (e15 - ti4)); return ti4 = e15 + i20, window.setTimeout(t14, i20); } var me25 = window.requestAnimationFrame || _e22("RequestAnimationFrame") || ei3, ii4 = window.cancelAnimationFrame || _e22("CancelAnimationFrame") || _e22("CancelRequestAnimationFrame") || function(t14) { window.clearTimeout(t14); }; function H43(t14, e15, i20) { if (i20 && me25 === ei3) t14.call(e15); else return me25.call(window, b45(t14, e15)); } function V34(t14) { t14 && ii4.call(window, t14); } var yn5 = { __proto__: null, extend: x50, create: ft13, bind: b45, get lastId() { return Je12; }, stamp: P43, throttle: Xe14, wrapNum: St11, falseFn: E58, formatNum: $45, trim: fe20, splitWords: dt15, setOptions: S60, getParamString: $e13, template: Qe13, isArray: Y43, indexOf: de24, emptyImageUrl: Gt7, requestFn: me25, cancelFn: ii4, requestAnimFrame: H43, cancelAnimFrame: V34 }; function nt15() { } nt15.extend = function(t14) { var e15 = function() { S60(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks(); }, i20 = e15.__super__ = this.prototype, n24 = ft13(i20); n24.constructor = e15, e15.prototype = n24; for (var o27 in this) Object.prototype.hasOwnProperty.call(this, o27) && o27 !== "prototype" && o27 !== "__super__" && (e15[o27] = this[o27]); return t14.statics && x50(e15, t14.statics), t14.includes && (wn5(t14.includes), x50.apply(null, [n24].concat(t14.includes))), x50(n24, t14), delete n24.statics, delete n24.includes, n24.options && (n24.options = i20.options ? ft13(i20.options) : {}, x50(n24.options, t14.options)), n24._initHooks = [], n24.callInitHooks = function() { if (!this._initHooksCalled) { i20.callInitHooks && i20.callInitHooks.call(this), this._initHooksCalled = true; for (var s38 = 0, r19 = n24._initHooks.length; s38 < r19; s38++) n24._initHooks[s38].call(this); } }, e15; }, nt15.include = function(t14) { var e15 = this.prototype.options; return x50(this.prototype, t14), t14.options && (this.prototype.options = e15, this.mergeOptions(t14.options)), this; }, nt15.mergeOptions = function(t14) { return x50(this.prototype.options, t14), this; }, nt15.addInitHook = function(t14) { var e15 = Array.prototype.slice.call(arguments, 1), i20 = typeof t14 == "function" ? t14 : function() { this[t14].apply(this, e15); }; return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i20), this; }; function wn5(t14) { if (!(typeof L > "u" || !L || !L.Mixin)) { t14 = Y43(t14) ? t14 : [t14]; for (var e15 = 0; e15 < t14.length; e15++) t14[e15] === L.Mixin.Events && console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.", new Error().stack); } } var G45 = { on: function(t14, e15, i20) { if (typeof t14 == "object") for (var n24 in t14) this._on(n24, t14[n24], e15); else { t14 = dt15(t14); for (var o27 = 0, s38 = t14.length; o27 < s38; o27++) this._on(t14[o27], e15, i20); } return this; }, off: function(t14, e15, i20) { if (!arguments.length) delete this._events; else if (typeof t14 == "object") for (var n24 in t14) this._off(n24, t14[n24], e15); else { t14 = dt15(t14); for (var o27 = arguments.length === 1, s38 = 0, r19 = t14.length; s38 < r19; s38++) o27 ? this._off(t14[s38]) : this._off(t14[s38], e15, i20); } return this; }, _on: function(t14, e15, i20, n24) { if (typeof e15 != "function") { console.warn("wrong listener type: " + typeof e15); return; } if (this._listens(t14, e15, i20) === false) { i20 === this && (i20 = void 0); var o27 = { fn: e15, ctx: i20 }; n24 && (o27.once = true), this._events = this._events || {}, this._events[t14] = this._events[t14] || [], this._events[t14].push(o27); } }, _off: function(t14, e15, i20) { var n24, o27, s38; if (this._events && (n24 = this._events[t14], !!n24)) { if (arguments.length === 1) { if (this._firingCount) for (o27 = 0, s38 = n24.length; o27 < s38; o27++) n24[o27].fn = E58; delete this._events[t14]; return; } if (typeof e15 != "function") { console.warn("wrong listener type: " + typeof e15); return; } var r19 = this._listens(t14, e15, i20); if (r19 !== false) { var a36 = n24[r19]; this._firingCount && (a36.fn = E58, this._events[t14] = n24 = n24.slice()), n24.splice(r19, 1); } } }, fire: function(t14, e15, i20) { if (!this.listens(t14, i20)) return this; var n24 = x50({}, e15, { type: t14, target: this, sourceTarget: e15 && e15.sourceTarget || this }); if (this._events) { var o27 = this._events[t14]; if (o27) { this._firingCount = this._firingCount + 1 || 1; for (var s38 = 0, r19 = o27.length; s38 < r19; s38++) { var a36 = o27[s38], h46 = a36.fn; a36.once && this.off(t14, h46, a36.ctx), h46.call(a36.ctx || this, n24); } this._firingCount--; } } return i20 && this._propagateEvent(n24), this; }, listens: function(t14, e15, i20, n24) { typeof t14 != "string" && console.warn('"string" type argument expected'); var o27 = e15; typeof e15 != "function" && (n24 = !!e15, o27 = void 0, i20 = void 0); var s38 = this._events && this._events[t14]; if (s38 && s38.length && this._listens(t14, o27, i20) !== false) return true; if (n24) { for (var r19 in this._eventParents) if (this._eventParents[r19].listens(t14, e15, i20, n24)) return true; } return false; }, _listens: function(t14, e15, i20) { if (!this._events) return false; var n24 = this._events[t14] || []; if (!e15) return !!n24.length; i20 === this && (i20 = void 0); for (var o27 = 0, s38 = n24.length; o27 < s38; o27++) if (n24[o27].fn === e15 && n24[o27].ctx === i20) return o27; return false; }, once: function(t14, e15, i20) { if (typeof t14 == "object") for (var n24 in t14) this._on(n24, t14[n24], e15, true); else { t14 = dt15(t14); for (var o27 = 0, s38 = t14.length; o27 < s38; o27++) this._on(t14[o27], e15, i20, true); } return this; }, addEventParent: function(t14) { return this._eventParents = this._eventParents || {}, this._eventParents[P43(t14)] = t14, this; }, removeEventParent: function(t14) { return this._eventParents && delete this._eventParents[P43(t14)], this; }, _propagateEvent: function(t14) { for (var e15 in this._eventParents) this._eventParents[e15].fire(t14.type, x50({ layer: t14.target, propagatedFrom: t14.target }, t14), true); } }; G45.addEventListener = G45.on, G45.removeEventListener = G45.clearAllEventListeners = G45.off, G45.addOneTimeEventListener = G45.once, G45.fireEvent = G45.fire, G45.hasEventListeners = G45.listens; var zt9 = nt15.extend(G45); function m37(t14, e15, i20) { this.x = i20 ? Math.round(t14) : t14, this.y = i20 ? Math.round(e15) : e15; } var ni4 = Math.trunc || function(t14) { return t14 > 0 ? Math.floor(t14) : Math.ceil(t14); }; m37.prototype = { clone: function() { return new m37(this.x, this.y); }, add: function(t14) { return this.clone()._add(_48(t14)); }, _add: function(t14) { return this.x += t14.x, this.y += t14.y, this; }, subtract: function(t14) { return this.clone()._subtract(_48(t14)); }, _subtract: function(t14) { return this.x -= t14.x, this.y -= t14.y, this; }, divideBy: function(t14) { return this.clone()._divideBy(t14); }, _divideBy: function(t14) { return this.x /= t14, this.y /= t14, this; }, multiplyBy: function(t14) { return this.clone()._multiplyBy(t14); }, _multiplyBy: function(t14) { return this.x *= t14, this.y *= t14, this; }, scaleBy: function(t14) { return new m37(this.x * t14.x, this.y * t14.y); }, unscaleBy: function(t14) { return new m37(this.x / t14.x, this.y / t14.y); }, round: function() { return this.clone()._round(); }, _round: function() { return this.x = Math.round(this.x), this.y = Math.round(this.y), this; }, floor: function() { return this.clone()._floor(); }, _floor: function() { return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this; }, ceil: function() { return this.clone()._ceil(); }, _ceil: function() { return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this; }, trunc: function() { return this.clone()._trunc(); }, _trunc: function() { return this.x = ni4(this.x), this.y = ni4(this.y), this; }, distanceTo: function(t14) { t14 = _48(t14); var e15 = t14.x - this.x, i20 = t14.y - this.y; return Math.sqrt(e15 * e15 + i20 * i20); }, equals: function(t14) { return t14 = _48(t14), t14.x === this.x && t14.y === this.y; }, contains: function(t14) { return t14 = _48(t14), Math.abs(t14.x) <= Math.abs(this.x) && Math.abs(t14.y) <= Math.abs(this.y); }, toString: function() { return "Point(" + $45(this.x) + ", " + $45(this.y) + ")"; } }; function _48(t14, e15, i20) { return t14 instanceof m37 ? t14 : Y43(t14) ? new m37(t14[0], t14[1]) : t14 == null ? t14 : typeof t14 == "object" && "x" in t14 && "y" in t14 ? new m37(t14.x, t14.y) : new m37(t14, e15, i20); } function z47(t14, e15) { if (t14) for (var i20 = e15 ? [t14, e15] : t14, n24 = 0, o27 = i20.length; n24 < o27; n24++) this.extend(i20[n24]); } z47.prototype = { extend: function(t14) { var e15, i20; if (!t14) return this; if (t14 instanceof m37 || typeof t14[0] == "number" || "x" in t14) e15 = i20 = _48(t14); else if (t14 = F40(t14), e15 = t14.min, i20 = t14.max, !e15 || !i20) return this; return !this.min && !this.max ? (this.min = e15.clone(), this.max = i20.clone()) : (this.min.x = Math.min(e15.x, this.min.x), this.max.x = Math.max(i20.x, this.max.x), this.min.y = Math.min(e15.y, this.min.y), this.max.y = Math.max(i20.y, this.max.y)), this; }, getCenter: function(t14) { return _48((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, t14); }, getBottomLeft: function() { return _48(this.min.x, this.max.y); }, getTopRight: function() { return _48(this.max.x, this.min.y); }, getTopLeft: function() { return this.min; }, getBottomRight: function() { return this.max; }, getSize: function() { return this.max.subtract(this.min); }, contains: function(t14) { var e15, i20; return typeof t14[0] == "number" || t14 instanceof m37 ? t14 = _48(t14) : t14 = F40(t14), t14 instanceof z47 ? (e15 = t14.min, i20 = t14.max) : e15 = i20 = t14, e15.x >= this.min.x && i20.x <= this.max.x && e15.y >= this.min.y && i20.y <= this.max.y; }, intersects: function(t14) { t14 = F40(t14); var e15 = this.min, i20 = this.max, n24 = t14.min, o27 = t14.max, s38 = o27.x >= e15.x && n24.x <= i20.x, r19 = o27.y >= e15.y && n24.y <= i20.y; return s38 && r19; }, overlaps: function(t14) { t14 = F40(t14); var e15 = this.min, i20 = this.max, n24 = t14.min, o27 = t14.max, s38 = o27.x > e15.x && n24.x < i20.x, r19 = o27.y > e15.y && n24.y < i20.y; return s38 && r19; }, isValid: function() { return !!(this.min && this.max); }, pad: function(t14) { var e15 = this.min, i20 = this.max, n24 = Math.abs(e15.x - i20.x) * t14, o27 = Math.abs(e15.y - i20.y) * t14; return F40(_48(e15.x - n24, e15.y - o27), _48(i20.x + n24, i20.y + o27)); }, equals: function(t14) { return t14 ? (t14 = F40(t14), this.min.equals(t14.getTopLeft()) && this.max.equals(t14.getBottomRight())) : false; } }; function F40(t14, e15) { return !t14 || t14 instanceof z47 ? t14 : new z47(t14, e15); } function W39(t14, e15) { if (t14) for (var i20 = e15 ? [t14, e15] : t14, n24 = 0, o27 = i20.length; n24 < o27; n24++) this.extend(i20[n24]); } W39.prototype = { extend: function(t14) { var e15 = this._southWest, i20 = this._northEast, n24, o27; if (t14 instanceof M50) n24 = t14, o27 = t14; else if (t14 instanceof W39) { if (n24 = t14._southWest, o27 = t14._northEast, !n24 || !o27) return this; } else return t14 ? this.extend(y53(t14) || Z39(t14)) : this; return !e15 && !i20 ? (this._southWest = new M50(n24.lat, n24.lng), this._northEast = new M50(o27.lat, o27.lng)) : (e15.lat = Math.min(n24.lat, e15.lat), e15.lng = Math.min(n24.lng, e15.lng), i20.lat = Math.max(o27.lat, i20.lat), i20.lng = Math.max(o27.lng, i20.lng)), this; }, pad: function(t14) { var e15 = this._southWest, i20 = this._northEast, n24 = Math.abs(e15.lat - i20.lat) * t14, o27 = Math.abs(e15.lng - i20.lng) * t14; return new W39(new M50(e15.lat - n24, e15.lng - o27), new M50(i20.lat + n24, i20.lng + o27)); }, getCenter: function() { return new M50((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2); }, getSouthWest: function() { return this._southWest; }, getNorthEast: function() { return this._northEast; }, getNorthWest: function() { return new M50(this.getNorth(), this.getWest()); }, getSouthEast: function() { return new M50(this.getSouth(), this.getEast()); }, getWest: function() { return this._southWest.lng; }, getSouth: function() { return this._southWest.lat; }, getEast: function() { return this._northEast.lng; }, getNorth: function() { return this._northEast.lat; }, contains: function(t14) { typeof t14[0] == "number" || t14 instanceof M50 || "lat" in t14 ? t14 = y53(t14) : t14 = Z39(t14); var e15 = this._southWest, i20 = this._northEast, n24, o27; return t14 instanceof W39 ? (n24 = t14.getSouthWest(), o27 = t14.getNorthEast()) : n24 = o27 = t14, n24.lat >= e15.lat && o27.lat <= i20.lat && n24.lng >= e15.lng && o27.lng <= i20.lng; }, intersects: function(t14) { t14 = Z39(t14); var e15 = this._southWest, i20 = this._northEast, n24 = t14.getSouthWest(), o27 = t14.getNorthEast(), s38 = o27.lat >= e15.lat && n24.lat <= i20.lat, r19 = o27.lng >= e15.lng && n24.lng <= i20.lng; return s38 && r19; }, overlaps: function(t14) { t14 = Z39(t14); var e15 = this._southWest, i20 = this._northEast, n24 = t14.getSouthWest(), o27 = t14.getNorthEast(), s38 = o27.lat > e15.lat && n24.lat < i20.lat, r19 = o27.lng > e15.lng && n24.lng < i20.lng; return s38 && r19; }, toBBoxString: function() { return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(","); }, equals: function(t14, e15) { return t14 ? (t14 = Z39(t14), this._southWest.equals(t14.getSouthWest(), e15) && this._northEast.equals(t14.getNorthEast(), e15)) : false; }, isValid: function() { return !!(this._southWest && this._northEast); } }; function Z39(t14, e15) { return t14 instanceof W39 ? t14 : new W39(t14, e15); } function M50(t14, e15, i20) { if (isNaN(t14) || isNaN(e15)) throw new Error("Invalid LatLng object: (" + t14 + ", " + e15 + ")"); this.lat = +t14, this.lng = +e15, i20 !== void 0 && (this.alt = +i20); } M50.prototype = { equals: function(t14, e15) { if (!t14) return false; t14 = y53(t14); var i20 = Math.max(Math.abs(this.lat - t14.lat), Math.abs(this.lng - t14.lng)); return i20 <= (e15 === void 0 ? 1e-9 : e15); }, toString: function(t14) { return "LatLng(" + $45(this.lat, t14) + ", " + $45(this.lng, t14) + ")"; }, distanceTo: function(t14) { return ut15.distance(this, y53(t14)); }, wrap: function() { return ut15.wrapLatLng(this); }, toBounds: function(t14) { var e15 = 180 * t14 / 40075017, i20 = e15 / Math.cos(Math.PI / 180 * this.lat); return Z39([this.lat - e15, this.lng - i20], [this.lat + e15, this.lng + i20]); }, clone: function() { return new M50(this.lat, this.lng, this.alt); } }; function y53(t14, e15, i20) { return t14 instanceof M50 ? t14 : Y43(t14) && typeof t14[0] != "object" ? t14.length === 3 ? new M50(t14[0], t14[1], t14[2]) : t14.length === 2 ? new M50(t14[0], t14[1]) : null : t14 == null ? t14 : typeof t14 == "object" && "lat" in t14 ? new M50(t14.lat, "lng" in t14 ? t14.lng : t14.lon, t14.alt) : e15 === void 0 ? null : new M50(t14, e15, i20); } var ot13 = { latLngToPoint: function(t14, e15) { var i20 = this.projection.project(t14), n24 = this.scale(e15); return this.transformation._transform(i20, n24); }, pointToLatLng: function(t14, e15) { var i20 = this.scale(e15), n24 = this.transformation.untransform(t14, i20); return this.projection.unproject(n24); }, project: function(t14) { return this.projection.project(t14); }, unproject: function(t14) { return this.projection.unproject(t14); }, scale: function(t14) { return 256 * Math.pow(2, t14); }, zoom: function(t14) { return Math.log(t14 / 256) / Math.LN2; }, getProjectedBounds: function(t14) { if (this.infinite) return null; var e15 = this.projection.bounds, i20 = this.scale(t14), n24 = this.transformation.transform(e15.min, i20), o27 = this.transformation.transform(e15.max, i20); return new z47(n24, o27); }, infinite: false, wrapLatLng: function(t14) { var e15 = this.wrapLng ? St11(t14.lng, this.wrapLng, true) : t14.lng, i20 = this.wrapLat ? St11(t14.lat, this.wrapLat, true) : t14.lat, n24 = t14.alt; return new M50(i20, e15, n24); }, wrapLatLngBounds: function(t14) { var e15 = t14.getCenter(), i20 = this.wrapLatLng(e15), n24 = e15.lat - i20.lat, o27 = e15.lng - i20.lng; if (n24 === 0 && o27 === 0) return t14; var s38 = t14.getSouthWest(), r19 = t14.getNorthEast(), a36 = new M50(s38.lat - n24, s38.lng - o27), h46 = new M50(r19.lat - n24, r19.lng - o27); return new W39(a36, h46); } }, ut15 = x50({}, ot13, { wrapLng: [-180, 180], R: 6371e3, distance: function(t14, e15) { var i20 = Math.PI / 180, n24 = t14.lat * i20, o27 = e15.lat * i20, s38 = Math.sin((e15.lat - t14.lat) * i20 / 2), r19 = Math.sin((e15.lng - t14.lng) * i20 / 2), a36 = s38 * s38 + Math.cos(n24) * Math.cos(o27) * r19 * r19, h46 = 2 * Math.atan2(Math.sqrt(a36), Math.sqrt(1 - a36)); return this.R * h46; } }), oi3 = 6378137, pe27 = { R: oi3, MAX_LATITUDE: 85.0511287798, project: function(t14) { var e15 = Math.PI / 180, i20 = this.MAX_LATITUDE, n24 = Math.max(Math.min(i20, t14.lat), -i20), o27 = Math.sin(n24 * e15); return new m37(this.R * t14.lng * e15, this.R * Math.log((1 + o27) / (1 - o27)) / 2); }, unproject: function(t14) { var e15 = 180 / Math.PI; return new M50((2 * Math.atan(Math.exp(t14.y / this.R)) - Math.PI / 2) * e15, t14.x * e15 / this.R); }, bounds: function() { var t14 = oi3 * Math.PI; return new z47([-t14, -t14], [t14, t14]); }() }; function ve27(t14, e15, i20, n24) { if (Y43(t14)) { this._a = t14[0], this._b = t14[1], this._c = t14[2], this._d = t14[3]; return; } this._a = t14, this._b = e15, this._c = i20, this._d = n24; } ve27.prototype = { transform: function(t14, e15) { return this._transform(t14.clone(), e15); }, _transform: function(t14, e15) { return e15 = e15 || 1, t14.x = e15 * (this._a * t14.x + this._b), t14.y = e15 * (this._c * t14.y + this._d), t14; }, untransform: function(t14, e15) { return e15 = e15 || 1, new m37((t14.x / e15 - this._b) / this._a, (t14.y / e15 - this._d) / this._c); } }; function kt14(t14, e15, i20, n24) { return new ve27(t14, e15, i20, n24); } var ge28 = x50({}, ut15, { code: "EPSG:3857", projection: pe27, transformation: function() { var t14 = 0.5 / (Math.PI * pe27.R); return kt14(t14, 0.5, -t14, 0.5); }() }), xn5 = x50({}, ge28, { code: "EPSG:900913" }); function si4(t14) { return document.createElementNS("http://www.w3.org/2000/svg", t14); } function ri4(t14, e15) { var i20 = "", n24, o27, s38, r19, a36, h46; for (n24 = 0, s38 = t14.length; n24 < s38; n24++) { for (a36 = t14[n24], o27 = 0, r19 = a36.length; o27 < r19; o27++) h46 = a36[o27], i20 += (o27 ? "L" : "M") + h46.x + " " + h46.y; i20 += e15 ? f46.svg ? "z" : "x" : ""; } return i20 || "M0 0"; } var ye25 = document.documentElement.style, Vt11 = "ActiveXObject" in window, Pn5 = Vt11 && !document.addEventListener, ai4 = "msLaunchUri" in navigator && !("documentMode" in document), we25 = Q38("webkit"), hi3 = Q38("android"), ui3 = Q38("android 2") || Q38("android 3"), Ln5 = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), Tn5 = hi3 && Q38("Google") && Ln5 < 537 && !("AudioNode" in window), xe22 = !!window.opera, li3 = !ai4 && Q38("chrome"), ci3 = Q38("gecko") && !we25 && !xe22 && !Vt11, bn5 = !li3 && Q38("safari"), fi3 = Q38("phantom"), di3 = "OTransition" in ye25, Mn5 = navigator.platform.indexOf("Win") === 0, _i5 = Vt11 && "transition" in ye25, Pe21 = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !ui3, mi5 = "MozPerspective" in ye25, Cn5 = !window.L_DISABLE_3D && (_i5 || Pe21 || mi5) && !di3 && !fi3, Et15 = typeof orientation < "u" || Q38("mobile"), Sn5 = Et15 && we25, zn5 = Et15 && Pe21, pi5 = !window.PointerEvent && window.MSPointerEvent, vi3 = !!(window.PointerEvent || pi5), gi3 = "ontouchstart" in window || !!window.TouchEvent, kn4 = !window.L_NO_TOUCH && (gi3 || vi3), En5 = Et15 && xe22, On5 = Et15 && ci3, Zn4 = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, In4 = function() { var t14 = false; try { var e15 = Object.defineProperty({}, "passive", { get: function() { t14 = true; } }); window.addEventListener("testPassiveEventSupport", E58, e15), window.removeEventListener("testPassiveEventSupport", E58, e15); } catch { } return t14; }(), Bn4 = function() { return !!document.createElement("canvas").getContext; }(), Le20 = !!(document.createElementNS && si4("svg").createSVGRect), An5 = !!Le20 && function() { var t14 = document.createElement("div"); return t14.innerHTML = "", (t14.firstChild && t14.firstChild.namespaceURI) === "http://www.w3.org/2000/svg"; }(), Nn5 = !Le20 && function() { try { var t14 = document.createElement("div"); t14.innerHTML = ''; var e15 = t14.firstChild; return e15.style.behavior = "url(#default#VML)", e15 && typeof e15.adj == "object"; } catch { return false; } }(), Rn5 = navigator.platform.indexOf("Mac") === 0, Dn5 = navigator.platform.indexOf("Linux") === 0; function Q38(t14) { return navigator.userAgent.toLowerCase().indexOf(t14) >= 0; } var f46 = { ie: Vt11, ielt9: Pn5, edge: ai4, webkit: we25, android: hi3, android23: ui3, androidStock: Tn5, opera: xe22, chrome: li3, gecko: ci3, safari: bn5, phantom: fi3, opera12: di3, win: Mn5, ie3d: _i5, webkit3d: Pe21, gecko3d: mi5, any3d: Cn5, mobile: Et15, mobileWebkit: Sn5, mobileWebkit3d: zn5, msPointer: pi5, pointer: vi3, touch: kn4, touchNative: gi3, mobileOpera: En5, mobileGecko: On5, retina: Zn4, passiveEvents: In4, canvas: Bn4, svg: Le20, vml: Nn5, inlineSvg: An5, mac: Rn5, linux: Dn5 }, yi3 = f46.msPointer ? "MSPointerDown" : "pointerdown", wi3 = f46.msPointer ? "MSPointerMove" : "pointermove", xi4 = f46.msPointer ? "MSPointerUp" : "pointerup", Pi4 = f46.msPointer ? "MSPointerCancel" : "pointercancel", Te18 = { touchstart: yi3, touchmove: wi3, touchend: xi4, touchcancel: Pi4 }, Li4 = { touchstart: Vn4, touchmove: qt11, touchend: qt11, touchcancel: qt11 }, yt14 = {}, Ti4 = false; function Hn4(t14, e15, i20) { return e15 === "touchstart" && Gn4(), Li4[e15] ? (i20 = Li4[e15].bind(this, i20), t14.addEventListener(Te18[e15], i20, false), i20) : (console.warn("wrong event specified:", e15), E58); } function Fn5(t14, e15, i20) { if (!Te18[e15]) { console.warn("wrong event specified:", e15); return; } t14.removeEventListener(Te18[e15], i20, false); } function Wn4(t14) { yt14[t14.pointerId] = t14; } function Un4(t14) { yt14[t14.pointerId] && (yt14[t14.pointerId] = t14); } function bi4(t14) { delete yt14[t14.pointerId]; } function Gn4() { Ti4 || (document.addEventListener(yi3, Wn4, true), document.addEventListener(wi3, Un4, true), document.addEventListener(xi4, bi4, true), document.addEventListener(Pi4, bi4, true), Ti4 = true); } function qt11(t14, e15) { if (e15.pointerType !== (e15.MSPOINTER_TYPE_MOUSE || "mouse")) { e15.touches = []; for (var i20 in yt14) e15.touches.push(yt14[i20]); e15.changedTouches = [e15], t14(e15); } } function Vn4(t14, e15) { e15.MSPOINTER_TYPE_TOUCH && e15.pointerType === e15.MSPOINTER_TYPE_TOUCH && R49(e15), qt11(t14, e15); } function qn4(t14) { var e15 = {}, i20, n24; for (n24 in t14) i20 = t14[n24], e15[n24] = i20 && i20.bind ? i20.bind(t14) : i20; return t14 = e15, e15.type = "dblclick", e15.detail = 2, e15.isTrusted = false, e15._simulated = true, e15; } var jn4 = 200; function Kn4(t14, e15) { t14.addEventListener("dblclick", e15); var i20 = 0, n24; function o27(s38) { if (s38.detail !== 1) { n24 = s38.detail; return; } if (!(s38.pointerType === "mouse" || s38.sourceCapabilities && !s38.sourceCapabilities.firesTouchEvents)) { var r19 = ki4(s38); if (!(r19.some(function(h46) { return h46 instanceof HTMLLabelElement && h46.attributes.for; }) && !r19.some(function(h46) { return h46 instanceof HTMLInputElement || h46 instanceof HTMLSelectElement; }))) { var a36 = Date.now(); a36 - i20 <= jn4 ? (n24++, n24 === 2 && e15(qn4(s38))) : n24 = 1, i20 = a36; } } } return t14.addEventListener("click", o27), { dblclick: e15, simDblclick: o27 }; } function Yn4(t14, e15) { t14.removeEventListener("dblclick", e15.dblclick), t14.removeEventListener("click", e15.simDblclick); } var be26 = Yt9(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), Ot12 = Yt9(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), Mi3 = Ot12 === "webkitTransition" || Ot12 === "OTransition" ? Ot12 + "End" : "transitionend"; function Ci4(t14) { return typeof t14 == "string" ? document.getElementById(t14) : t14; } function Zt8(t14, e15) { var i20 = t14.style[e15] || t14.currentStyle && t14.currentStyle[e15]; if ((!i20 || i20 === "auto") && document.defaultView) { var n24 = document.defaultView.getComputedStyle(t14, null); i20 = n24 ? n24[e15] : null; } return i20 === "auto" ? null : i20; } function T53(t14, e15, i20) { var n24 = document.createElement(t14); return n24.className = e15 || "", i20 && i20.appendChild(n24), n24; } function k51(t14) { var e15 = t14.parentNode; e15 && e15.removeChild(t14); } function jt11(t14) { for (; t14.firstChild; ) t14.removeChild(t14.firstChild); } function wt11(t14) { var e15 = t14.parentNode; e15 && e15.lastChild !== t14 && e15.appendChild(t14); } function xt14(t14) { var e15 = t14.parentNode; e15 && e15.firstChild !== t14 && e15.insertBefore(t14, e15.firstChild); } function Me26(t14, e15) { if (t14.classList !== void 0) return t14.classList.contains(e15); var i20 = Kt8(t14); return i20.length > 0 && new RegExp("(^|\\s)" + e15 + "(\\s|$)").test(i20); } function v43(t14, e15) { if (t14.classList !== void 0) for (var i20 = dt15(e15), n24 = 0, o27 = i20.length; n24 < o27; n24++) t14.classList.add(i20[n24]); else if (!Me26(t14, e15)) { var s38 = Kt8(t14); Ce20(t14, (s38 ? s38 + " " : "") + e15); } } function O53(t14, e15) { t14.classList !== void 0 ? t14.classList.remove(e15) : Ce20(t14, fe20((" " + Kt8(t14) + " ").replace(" " + e15 + " ", " "))); } function Ce20(t14, e15) { t14.className.baseVal === void 0 ? t14.className = e15 : t14.className.baseVal = e15; } function Kt8(t14) { return t14.correspondingElement && (t14 = t14.correspondingElement), t14.className.baseVal === void 0 ? t14.className : t14.className.baseVal; } function q53(t14, e15) { "opacity" in t14.style ? t14.style.opacity = e15 : "filter" in t14.style && Jn4(t14, e15); } function Jn4(t14, e15) { var i20 = false, n24 = "DXImageTransform.Microsoft.Alpha"; try { i20 = t14.filters.item(n24); } catch { if (e15 === 1) return; } e15 = Math.round(e15 * 100), i20 ? (i20.Enabled = e15 !== 100, i20.Opacity = e15) : t14.style.filter += " progid:" + n24 + "(opacity=" + e15 + ")"; } function Yt9(t14) { for (var e15 = document.documentElement.style, i20 = 0; i20 < t14.length; i20++) if (t14[i20] in e15) return t14[i20]; return false; } function _t14(t14, e15, i20) { var n24 = e15 || new m37(0, 0); t14.style[be26] = (f46.ie3d ? "translate(" + n24.x + "px," + n24.y + "px)" : "translate3d(" + n24.x + "px," + n24.y + "px,0)") + (i20 ? " scale(" + i20 + ")" : ""); } function I50(t14, e15) { t14._leaflet_pos = e15, f46.any3d ? _t14(t14, e15) : (t14.style.left = e15.x + "px", t14.style.top = e15.y + "px"); } function mt11(t14) { return t14._leaflet_pos || new m37(0, 0); } var It11, Bt10, Se17; if ("onselectstart" in document) It11 = function() { p37(window, "selectstart", R49); }, Bt10 = function() { C39(window, "selectstart", R49); }; else { var At10 = Yt9(["userSelect", "WebkitUserSelect", "OUserSelect", "MozUserSelect", "msUserSelect"]); It11 = function() { if (At10) { var t14 = document.documentElement.style; Se17 = t14[At10], t14[At10] = "none"; } }, Bt10 = function() { At10 && (document.documentElement.style[At10] = Se17, Se17 = void 0); }; } function ze16() { p37(window, "dragstart", R49); } function ke19() { C39(window, "dragstart", R49); } var Jt10, Ee23; function Oe21(t14) { for (; t14.tabIndex === -1; ) t14 = t14.parentNode; t14.style && (Xt9(), Jt10 = t14, Ee23 = t14.style.outlineStyle, t14.style.outlineStyle = "none", p37(window, "keydown", Xt9)); } function Xt9() { Jt10 && (Jt10.style.outlineStyle = Ee23, Jt10 = void 0, Ee23 = void 0, C39(window, "keydown", Xt9)); } function Si4(t14) { do t14 = t14.parentNode; while ((!t14.offsetWidth || !t14.offsetHeight) && t14 !== document.body); return t14; } function Ze13(t14) { var e15 = t14.getBoundingClientRect(); return { x: e15.width / t14.offsetWidth || 1, y: e15.height / t14.offsetHeight || 1, boundingClientRect: e15 }; } var Xn4 = { __proto__: null, TRANSFORM: be26, TRANSITION: Ot12, TRANSITION_END: Mi3, get: Ci4, getStyle: Zt8, create: T53, remove: k51, empty: jt11, toFront: wt11, toBack: xt14, hasClass: Me26, addClass: v43, removeClass: O53, setClass: Ce20, getClass: Kt8, setOpacity: q53, testProp: Yt9, setTransform: _t14, setPosition: I50, getPosition: mt11, get disableTextSelection() { return It11; }, get enableTextSelection() { return Bt10; }, disableImageDrag: ze16, enableImageDrag: ke19, preventOutline: Oe21, restoreOutline: Xt9, getSizedParentNode: Si4, getScale: Ze13 }; function p37(t14, e15, i20, n24) { if (e15 && typeof e15 == "object") for (var o27 in e15) Be18(t14, o27, e15[o27], i20); else { e15 = dt15(e15); for (var s38 = 0, r19 = e15.length; s38 < r19; s38++) Be18(t14, e15[s38], i20, n24); } return this; } var tt12 = "_leaflet_events"; function C39(t14, e15, i20, n24) { if (arguments.length === 1) zi4(t14), delete t14[tt12]; else if (e15 && typeof e15 == "object") for (var o27 in e15) Ae22(t14, o27, e15[o27], i20); else if (e15 = dt15(e15), arguments.length === 2) zi4(t14, function(a36) { return de24(e15, a36) !== -1; }); else for (var s38 = 0, r19 = e15.length; s38 < r19; s38++) Ae22(t14, e15[s38], i20, n24); return this; } function zi4(t14, e15) { for (var i20 in t14[tt12]) { var n24 = i20.split(/\d/)[0]; (!e15 || e15(n24)) && Ae22(t14, n24, null, null, i20); } } var Ie23 = { mouseenter: "mouseover", mouseleave: "mouseout", wheel: !("onwheel" in window) && "mousewheel" }; function Be18(t14, e15, i20, n24) { var o27 = e15 + P43(i20) + (n24 ? "_" + P43(n24) : ""); if (t14[tt12] && t14[tt12][o27]) return this; var s38 = function(a36) { return i20.call(n24 || t14, a36 || window.event); }, r19 = s38; !f46.touchNative && f46.pointer && e15.indexOf("touch") === 0 ? s38 = Hn4(t14, e15, s38) : f46.touch && e15 === "dblclick" ? s38 = Kn4(t14, s38) : "addEventListener" in t14 ? e15 === "touchstart" || e15 === "touchmove" || e15 === "wheel" || e15 === "mousewheel" ? t14.addEventListener(Ie23[e15] || e15, s38, f46.passiveEvents ? { passive: false } : false) : e15 === "mouseenter" || e15 === "mouseleave" ? (s38 = function(a36) { a36 = a36 || window.event, Re19(t14, a36) && r19(a36); }, t14.addEventListener(Ie23[e15], s38, false)) : t14.addEventListener(e15, r19, false) : t14.attachEvent("on" + e15, s38), t14[tt12] = t14[tt12] || {}, t14[tt12][o27] = s38; } function Ae22(t14, e15, i20, n24, o27) { o27 = o27 || e15 + P43(i20) + (n24 ? "_" + P43(n24) : ""); var s38 = t14[tt12] && t14[tt12][o27]; if (!s38) return this; !f46.touchNative && f46.pointer && e15.indexOf("touch") === 0 ? Fn5(t14, e15, s38) : f46.touch && e15 === "dblclick" ? Yn4(t14, s38) : "removeEventListener" in t14 ? t14.removeEventListener(Ie23[e15] || e15, s38, false) : t14.detachEvent("on" + e15, s38), t14[tt12][o27] = null; } function pt13(t14) { return t14.stopPropagation ? t14.stopPropagation() : t14.originalEvent ? t14.originalEvent._stopped = true : t14.cancelBubble = true, this; } function Ne20(t14) { return Be18(t14, "wheel", pt13), this; } function Nt11(t14) { return p37(t14, "mousedown touchstart dblclick contextmenu", pt13), t14._leaflet_disable_click = true, this; } function R49(t14) { return t14.preventDefault ? t14.preventDefault() : t14.returnValue = false, this; } function vt12(t14) { return R49(t14), pt13(t14), this; } function ki4(t14) { if (t14.composedPath) return t14.composedPath(); for (var e15 = [], i20 = t14.target; i20; ) e15.push(i20), i20 = i20.parentNode; return e15; } function Ei4(t14, e15) { if (!e15) return new m37(t14.clientX, t14.clientY); var i20 = Ze13(e15), n24 = i20.boundingClientRect; return new m37((t14.clientX - n24.left) / i20.x - e15.clientLeft, (t14.clientY - n24.top) / i20.y - e15.clientTop); } var $n4 = f46.linux && f46.chrome ? window.devicePixelRatio : f46.mac ? window.devicePixelRatio * 3 : window.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1; function Oi4(t14) { return f46.edge ? t14.wheelDeltaY / 2 : t14.deltaY && t14.deltaMode === 0 ? -t14.deltaY / $n4 : t14.deltaY && t14.deltaMode === 1 ? -t14.deltaY * 20 : t14.deltaY && t14.deltaMode === 2 ? -t14.deltaY * 60 : t14.deltaX || t14.deltaZ ? 0 : t14.wheelDelta ? (t14.wheelDeltaY || t14.wheelDelta) / 2 : t14.detail && Math.abs(t14.detail) < 32765 ? -t14.detail * 20 : t14.detail ? t14.detail / -32765 * 60 : 0; } function Re19(t14, e15) { var i20 = e15.relatedTarget; if (!i20) return true; try { for (; i20 && i20 !== t14; ) i20 = i20.parentNode; } catch { return false; } return i20 !== t14; } var Qn4 = { __proto__: null, on: p37, off: C39, stopPropagation: pt13, disableScrollPropagation: Ne20, disableClickPropagation: Nt11, preventDefault: R49, stop: vt12, getPropagationPath: ki4, getMousePosition: Ei4, getWheelDelta: Oi4, isExternalTarget: Re19, addListener: p37, removeListener: C39 }, Zi3 = zt9.extend({ run: function(t14, e15, i20, n24) { this.stop(), this._el = t14, this._inProgress = true, this._duration = i20 || 0.25, this._easeOutPower = 1 / Math.max(n24 || 0.5, 0.2), this._startPos = mt11(t14), this._offset = e15.subtract(this._startPos), this._startTime = +/* @__PURE__ */ new Date(), this.fire("start"), this._animate(); }, stop: function() { this._inProgress && (this._step(true), this._complete()); }, _animate: function() { this._animId = H43(this._animate, this), this._step(); }, _step: function(t14) { var e15 = +/* @__PURE__ */ new Date() - this._startTime, i20 = this._duration * 1e3; e15 < i20 ? this._runFrame(this._easeOut(e15 / i20), t14) : (this._runFrame(1), this._complete()); }, _runFrame: function(t14, e15) { var i20 = this._startPos.add(this._offset.multiplyBy(t14)); e15 && i20._round(), I50(this._el, i20), this.fire("step"); }, _complete: function() { V34(this._animId), this._inProgress = false, this.fire("end"); }, _easeOut: function(t14) { return 1 - Math.pow(1 - t14, this._easeOutPower); } }), w44 = zt9.extend({ options: { crs: ge28, center: void 0, zoom: void 0, minZoom: void 0, maxZoom: void 0, layers: [], maxBounds: void 0, renderer: void 0, zoomAnimation: true, zoomAnimationThreshold: 4, fadeAnimation: true, markerZoomAnimation: true, transform3DLimit: 8388608, zoomSnap: 1, zoomDelta: 1, trackResize: true }, initialize: function(t14, e15) { e15 = S60(this, e15), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = true, this._initContainer(t14), this._initLayout(), this._onResize = b45(this._onResize, this), this._initEvents(), e15.maxBounds && this.setMaxBounds(e15.maxBounds), e15.zoom !== void 0 && (this._zoom = this._limitZoom(e15.zoom)), e15.center && e15.zoom !== void 0 && this.setView(y53(e15.center), e15.zoom, { reset: true }), this.callInitHooks(), this._zoomAnimated = Ot12 && f46.any3d && !f46.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), p37(this._proxy, Mi3, this._catchTransitionEnd, this)), this._addLayers(this.options.layers); }, setView: function(t14, e15, i20) { if (e15 = e15 === void 0 ? this._zoom : this._limitZoom(e15), t14 = this._limitCenter(y53(t14), e15, this.options.maxBounds), i20 = i20 || {}, this._stop(), this._loaded && !i20.reset && i20 !== true) { i20.animate !== void 0 && (i20.zoom = x50({ animate: i20.animate }, i20.zoom), i20.pan = x50({ animate: i20.animate, duration: i20.duration }, i20.pan)); var n24 = this._zoom !== e15 ? this._tryAnimatedZoom && this._tryAnimatedZoom(t14, e15, i20.zoom) : this._tryAnimatedPan(t14, i20.pan); if (n24) return clearTimeout(this._sizeTimer), this; } return this._resetView(t14, e15, i20.pan && i20.pan.noMoveStart), this; }, setZoom: function(t14, e15) { return this._loaded ? this.setView(this.getCenter(), t14, { zoom: e15 }) : (this._zoom = t14, this); }, zoomIn: function(t14, e15) { return t14 = t14 || (f46.any3d ? this.options.zoomDelta : 1), this.setZoom(this._zoom + t14, e15); }, zoomOut: function(t14, e15) { return t14 = t14 || (f46.any3d ? this.options.zoomDelta : 1), this.setZoom(this._zoom - t14, e15); }, setZoomAround: function(t14, e15, i20) { var n24 = this.getZoomScale(e15), o27 = this.getSize().divideBy(2), s38 = t14 instanceof m37 ? t14 : this.latLngToContainerPoint(t14), r19 = s38.subtract(o27).multiplyBy(1 - 1 / n24), a36 = this.containerPointToLatLng(o27.add(r19)); return this.setView(a36, e15, { zoom: i20 }); }, _getBoundsCenterZoom: function(t14, e15) { e15 = e15 || {}, t14 = t14.getBounds ? t14.getBounds() : Z39(t14); var i20 = _48(e15.paddingTopLeft || e15.padding || [0, 0]), n24 = _48(e15.paddingBottomRight || e15.padding || [0, 0]), o27 = this.getBoundsZoom(t14, false, i20.add(n24)); if (o27 = typeof e15.maxZoom == "number" ? Math.min(e15.maxZoom, o27) : o27, o27 === 1 / 0) return { center: t14.getCenter(), zoom: o27 }; var s38 = n24.subtract(i20).divideBy(2), r19 = this.project(t14.getSouthWest(), o27), a36 = this.project(t14.getNorthEast(), o27), h46 = this.unproject(r19.add(a36).divideBy(2).add(s38), o27); return { center: h46, zoom: o27 }; }, fitBounds: function(t14, e15) { if (t14 = Z39(t14), !t14.isValid()) throw new Error("Bounds are not valid."); var i20 = this._getBoundsCenterZoom(t14, e15); return this.setView(i20.center, i20.zoom, e15); }, fitWorld: function(t14) { return this.fitBounds([[-90, -180], [90, 180]], t14); }, panTo: function(t14, e15) { return this.setView(t14, this._zoom, { pan: e15 }); }, panBy: function(t14, e15) { if (t14 = _48(t14).round(), e15 = e15 || {}, !t14.x && !t14.y) return this.fire("moveend"); if (e15.animate !== true && !this.getSize().contains(t14)) return this._resetView(this.unproject(this.project(this.getCenter()).add(t14)), this.getZoom()), this; if (this._panAnim || (this._panAnim = new Zi3(), this._panAnim.on({ step: this._onPanTransitionStep, end: this._onPanTransitionEnd }, this)), e15.noMoveStart || this.fire("movestart"), e15.animate !== false) { v43(this._mapPane, "leaflet-pan-anim"); var i20 = this._getMapPanePos().subtract(t14).round(); this._panAnim.run(this._mapPane, i20, e15.duration || 0.25, e15.easeLinearity); } else this._rawPanBy(t14), this.fire("move").fire("moveend"); return this; }, flyTo: function(t14, e15, i20) { if (i20 = i20 || {}, i20.animate === false || !f46.any3d) return this.setView(t14, e15, i20); this._stop(); var n24 = this.project(this.getCenter()), o27 = this.project(t14), s38 = this.getSize(), r19 = this._zoom; t14 = y53(t14), e15 = e15 === void 0 ? r19 : e15; var a36 = Math.max(s38.x, s38.y), h46 = a36 * this.getZoomScale(r19, e15), u36 = o27.distanceTo(n24) || 1, c25 = 1.42, d31 = c25 * c25; function g45(B45) { var ue21 = B45 ? -1 : 1, Wo5 = B45 ? h46 : a36, Uo5 = h46 * h46 - a36 * a36 + ue21 * d31 * d31 * u36 * u36, Go4 = 2 * Wo5 * d31 * u36, Ye13 = Uo5 / Go4, _n4 = Math.sqrt(Ye13 * Ye13 + 1) - Ye13, Vo4 = _n4 < 1e-9 ? -18 : Math.log(_n4); return Vo4; } function D54(B45) { return (Math.exp(B45) - Math.exp(-B45)) / 2; } function N56(B45) { return (Math.exp(B45) + Math.exp(-B45)) / 2; } function K45(B45) { return D54(B45) / N56(B45); } var U37 = g45(0); function Ct13(B45) { return a36 * (N56(U37) / N56(U37 + c25 * B45)); } function Ro5(B45) { return a36 * (N56(U37) * K45(U37 + c25 * B45) - D54(U37)) / d31; } function Do5(B45) { return 1 - Math.pow(1 - B45, 1.5); } var Ho5 = Date.now(), fn6 = (g45(1) - U37) / c25, Fo5 = i20.duration ? 1e3 * i20.duration : 1e3 * fn6 * 0.8; function dn5() { var B45 = (Date.now() - Ho5) / Fo5, ue21 = Do5(B45) * fn6; B45 <= 1 ? (this._flyToFrame = H43(dn5, this), this._move(this.unproject(n24.add(o27.subtract(n24).multiplyBy(Ro5(ue21) / u36)), r19), this.getScaleZoom(a36 / Ct13(ue21), r19), { flyTo: true })) : this._move(t14, e15)._moveEnd(true); } return this._moveStart(true, i20.noMoveStart), dn5.call(this), this; }, flyToBounds: function(t14, e15) { var i20 = this._getBoundsCenterZoom(t14, e15); return this.flyTo(i20.center, i20.zoom, e15); }, setMaxBounds: function(t14) { return t14 = Z39(t14), this.listens("moveend", this._panInsideMaxBounds) && this.off("moveend", this._panInsideMaxBounds), t14.isValid() ? (this.options.maxBounds = t14, this._loaded && this._panInsideMaxBounds(), this.on("moveend", this._panInsideMaxBounds)) : (this.options.maxBounds = null, this); }, setMinZoom: function(t14) { var e15 = this.options.minZoom; return this.options.minZoom = t14, this._loaded && e15 !== t14 && (this.fire("zoomlevelschange"), this.getZoom() < this.options.minZoom) ? this.setZoom(t14) : this; }, setMaxZoom: function(t14) { var e15 = this.options.maxZoom; return this.options.maxZoom = t14, this._loaded && e15 !== t14 && (this.fire("zoomlevelschange"), this.getZoom() > this.options.maxZoom) ? this.setZoom(t14) : this; }, panInsideBounds: function(t14, e15) { this._enforcingBounds = true; var i20 = this.getCenter(), n24 = this._limitCenter(i20, this._zoom, Z39(t14)); return i20.equals(n24) || this.panTo(n24, e15), this._enforcingBounds = false, this; }, panInside: function(t14, e15) { e15 = e15 || {}; var i20 = _48(e15.paddingTopLeft || e15.padding || [0, 0]), n24 = _48(e15.paddingBottomRight || e15.padding || [0, 0]), o27 = this.project(this.getCenter()), s38 = this.project(t14), r19 = this.getPixelBounds(), a36 = F40([r19.min.add(i20), r19.max.subtract(n24)]), h46 = a36.getSize(); if (!a36.contains(s38)) { this._enforcingBounds = true; var u36 = s38.subtract(a36.getCenter()), c25 = a36.extend(s38).getSize().subtract(h46); o27.x += u36.x < 0 ? -c25.x : c25.x, o27.y += u36.y < 0 ? -c25.y : c25.y, this.panTo(this.unproject(o27), e15), this._enforcingBounds = false; } return this; }, invalidateSize: function(t14) { if (!this._loaded) return this; t14 = x50({ animate: false, pan: true }, t14 === true ? { animate: true } : t14); var e15 = this.getSize(); this._sizeChanged = true, this._lastCenter = null; var i20 = this.getSize(), n24 = e15.divideBy(2).round(), o27 = i20.divideBy(2).round(), s38 = n24.subtract(o27); return !s38.x && !s38.y ? this : (t14.animate && t14.pan ? this.panBy(s38) : (t14.pan && this._rawPanBy(s38), this.fire("move"), t14.debounceMoveend ? (clearTimeout(this._sizeTimer), this._sizeTimer = setTimeout(b45(this.fire, this, "moveend"), 200)) : this.fire("moveend")), this.fire("resize", { oldSize: e15, newSize: i20 })); }, stop: function() { return this.setZoom(this._limitZoom(this._zoom)), this.options.zoomSnap || this.fire("viewreset"), this._stop(); }, locate: function(t14) { if (t14 = this._locateOptions = x50({ timeout: 1e4, watch: false }, t14), !("geolocation" in navigator)) return this._handleGeolocationError({ code: 0, message: "Geolocation not supported." }), this; var e15 = b45(this._handleGeolocationResponse, this), i20 = b45(this._handleGeolocationError, this); return t14.watch ? this._locationWatchId = navigator.geolocation.watchPosition(e15, i20, t14) : navigator.geolocation.getCurrentPosition(e15, i20, t14), this; }, stopLocate: function() { return navigator.geolocation && navigator.geolocation.clearWatch && navigator.geolocation.clearWatch(this._locationWatchId), this._locateOptions && (this._locateOptions.setView = false), this; }, _handleGeolocationError: function(t14) { if (this._container._leaflet_id) { var e15 = t14.code, i20 = t14.message || (e15 === 1 ? "permission denied" : e15 === 2 ? "position unavailable" : "timeout"); this._locateOptions.setView && !this._loaded && this.fitWorld(), this.fire("locationerror", { code: e15, message: "Geolocation error: " + i20 + "." }); } }, _handleGeolocationResponse: function(t14) { if (this._container._leaflet_id) { var e15 = t14.coords.latitude, i20 = t14.coords.longitude, n24 = new M50(e15, i20), o27 = n24.toBounds(t14.coords.accuracy * 2), s38 = this._locateOptions; if (s38.setView) { var r19 = this.getBoundsZoom(o27); this.setView(n24, s38.maxZoom ? Math.min(r19, s38.maxZoom) : r19); } var a36 = { latlng: n24, bounds: o27, timestamp: t14.timestamp }; for (var h46 in t14.coords) typeof t14.coords[h46] == "number" && (a36[h46] = t14.coords[h46]); this.fire("locationfound", a36); } }, addHandler: function(t14, e15) { if (!e15) return this; var i20 = this[t14] = new e15(this); return this._handlers.push(i20), this.options[t14] && i20.enable(), this; }, remove: function() { if (this._initEvents(true), this.options.maxBounds && this.off("moveend", this._panInsideMaxBounds), this._containerId !== this._container._leaflet_id) throw new Error("Map container is being reused by another instance"); try { delete this._container._leaflet_id, delete this._containerId; } catch { this._container._leaflet_id = void 0, this._containerId = void 0; } this._locationWatchId !== void 0 && this.stopLocate(), this._stop(), k51(this._mapPane), this._clearControlPos && this._clearControlPos(), this._resizeRequest && (V34(this._resizeRequest), this._resizeRequest = null), this._clearHandlers(), this._loaded && this.fire("unload"); var t14; for (t14 in this._layers) this._layers[t14].remove(); for (t14 in this._panes) k51(this._panes[t14]); return this._layers = [], this._panes = [], delete this._mapPane, delete this._renderer, this; }, createPane: function(t14, e15) { var i20 = "leaflet-pane" + (t14 ? " leaflet-" + t14.replace("Pane", "") + "-pane" : ""), n24 = T53("div", i20, e15 || this._mapPane); return t14 && (this._panes[t14] = n24), n24; }, getCenter: function() { return this._checkIfLoaded(), this._lastCenter && !this._moved() ? this._lastCenter.clone() : this.layerPointToLatLng(this._getCenterLayerPoint()); }, getZoom: function() { return this._zoom; }, getBounds: function() { var t14 = this.getPixelBounds(), e15 = this.unproject(t14.getBottomLeft()), i20 = this.unproject(t14.getTopRight()); return new W39(e15, i20); }, getMinZoom: function() { return this.options.minZoom === void 0 ? this._layersMinZoom || 0 : this.options.minZoom; }, getMaxZoom: function() { return this.options.maxZoom === void 0 ? this._layersMaxZoom === void 0 ? 1 / 0 : this._layersMaxZoom : this.options.maxZoom; }, getBoundsZoom: function(t14, e15, i20) { t14 = Z39(t14), i20 = _48(i20 || [0, 0]); var n24 = this.getZoom() || 0, o27 = this.getMinZoom(), s38 = this.getMaxZoom(), r19 = t14.getNorthWest(), a36 = t14.getSouthEast(), h46 = this.getSize().subtract(i20), u36 = F40(this.project(a36, n24), this.project(r19, n24)).getSize(), c25 = f46.any3d ? this.options.zoomSnap : 1, d31 = h46.x / u36.x, g45 = h46.y / u36.y, D54 = e15 ? Math.max(d31, g45) : Math.min(d31, g45); return n24 = this.getScaleZoom(D54, n24), c25 && (n24 = Math.round(n24 / (c25 / 100)) * (c25 / 100), n24 = e15 ? Math.ceil(n24 / c25) * c25 : Math.floor(n24 / c25) * c25), Math.max(o27, Math.min(s38, n24)); }, getSize: function() { return (!this._size || this._sizeChanged) && (this._size = new m37(this._container.clientWidth || 0, this._container.clientHeight || 0), this._sizeChanged = false), this._size.clone(); }, getPixelBounds: function(t14, e15) { var i20 = this._getTopLeftPoint(t14, e15); return new z47(i20, i20.add(this.getSize())); }, getPixelOrigin: function() { return this._checkIfLoaded(), this._pixelOrigin; }, getPixelWorldBounds: function(t14) { return this.options.crs.getProjectedBounds(t14 === void 0 ? this.getZoom() : t14); }, getPane: function(t14) { return typeof t14 == "string" ? this._panes[t14] : t14; }, getPanes: function() { return this._panes; }, getContainer: function() { return this._container; }, getZoomScale: function(t14, e15) { var i20 = this.options.crs; return e15 = e15 === void 0 ? this._zoom : e15, i20.scale(t14) / i20.scale(e15); }, getScaleZoom: function(t14, e15) { var i20 = this.options.crs; e15 = e15 === void 0 ? this._zoom : e15; var n24 = i20.zoom(t14 * i20.scale(e15)); return isNaN(n24) ? 1 / 0 : n24; }, project: function(t14, e15) { return e15 = e15 === void 0 ? this._zoom : e15, this.options.crs.latLngToPoint(y53(t14), e15); }, unproject: function(t14, e15) { return e15 = e15 === void 0 ? this._zoom : e15, this.options.crs.pointToLatLng(_48(t14), e15); }, layerPointToLatLng: function(t14) { var e15 = _48(t14).add(this.getPixelOrigin()); return this.unproject(e15); }, latLngToLayerPoint: function(t14) { var e15 = this.project(y53(t14))._round(); return e15._subtract(this.getPixelOrigin()); }, wrapLatLng: function(t14) { return this.options.crs.wrapLatLng(y53(t14)); }, wrapLatLngBounds: function(t14) { return this.options.crs.wrapLatLngBounds(Z39(t14)); }, distance: function(t14, e15) { return this.options.crs.distance(y53(t14), y53(e15)); }, containerPointToLayerPoint: function(t14) { return _48(t14).subtract(this._getMapPanePos()); }, layerPointToContainerPoint: function(t14) { return _48(t14).add(this._getMapPanePos()); }, containerPointToLatLng: function(t14) { var e15 = this.containerPointToLayerPoint(_48(t14)); return this.layerPointToLatLng(e15); }, latLngToContainerPoint: function(t14) { return this.layerPointToContainerPoint(this.latLngToLayerPoint(y53(t14))); }, mouseEventToContainerPoint: function(t14) { return Ei4(t14, this._container); }, mouseEventToLayerPoint: function(t14) { return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t14)); }, mouseEventToLatLng: function(t14) { return this.layerPointToLatLng(this.mouseEventToLayerPoint(t14)); }, _initContainer: function(t14) { var e15 = this._container = Ci4(t14); if (e15) { if (e15._leaflet_id) throw new Error("Map container is already initialized."); } else throw new Error("Map container not found."); p37(e15, "scroll", this._onScroll, this), this._containerId = P43(e15); }, _initLayout: function() { var t14 = this._container; this._fadeAnimated = this.options.fadeAnimation && f46.any3d, v43(t14, "leaflet-container" + (f46.touch ? " leaflet-touch" : "") + (f46.retina ? " leaflet-retina" : "") + (f46.ielt9 ? " leaflet-oldie" : "") + (f46.safari ? " leaflet-safari" : "") + (this._fadeAnimated ? " leaflet-fade-anim" : "")); var e15 = Zt8(t14, "position"); e15 !== "absolute" && e15 !== "relative" && e15 !== "fixed" && e15 !== "sticky" && (t14.style.position = "relative"), this._initPanes(), this._initControlPos && this._initControlPos(); }, _initPanes: function() { var t14 = this._panes = {}; this._paneRenderers = {}, this._mapPane = this.createPane("mapPane", this._container), I50(this._mapPane, new m37(0, 0)), this.createPane("tilePane"), this.createPane("overlayPane"), this.createPane("shadowPane"), this.createPane("markerPane"), this.createPane("tooltipPane"), this.createPane("popupPane"), this.options.markerZoomAnimation || (v43(t14.markerPane, "leaflet-zoom-hide"), v43(t14.shadowPane, "leaflet-zoom-hide")); }, _resetView: function(t14, e15, i20) { I50(this._mapPane, new m37(0, 0)); var n24 = !this._loaded; this._loaded = true, e15 = this._limitZoom(e15), this.fire("viewprereset"); var o27 = this._zoom !== e15; this._moveStart(o27, i20)._move(t14, e15)._moveEnd(o27), this.fire("viewreset"), n24 && this.fire("load"); }, _moveStart: function(t14, e15) { return t14 && this.fire("zoomstart"), e15 || this.fire("movestart"), this; }, _move: function(t14, e15, i20, n24) { e15 === void 0 && (e15 = this._zoom); var o27 = this._zoom !== e15; return this._zoom = e15, this._lastCenter = t14, this._pixelOrigin = this._getNewPixelOrigin(t14), n24 ? i20 && i20.pinch && this.fire("zoom", i20) : ((o27 || i20 && i20.pinch) && this.fire("zoom", i20), this.fire("move", i20)), this; }, _moveEnd: function(t14) { return t14 && this.fire("zoomend"), this.fire("moveend"); }, _stop: function() { return V34(this._flyToFrame), this._panAnim && this._panAnim.stop(), this; }, _rawPanBy: function(t14) { I50(this._mapPane, this._getMapPanePos().subtract(t14)); }, _getZoomSpan: function() { return this.getMaxZoom() - this.getMinZoom(); }, _panInsideMaxBounds: function() { this._enforcingBounds || this.panInsideBounds(this.options.maxBounds); }, _checkIfLoaded: function() { if (!this._loaded) throw new Error("Set map center and zoom first."); }, _initEvents: function(t14) { this._targets = {}, this._targets[P43(this._container)] = this; var e15 = t14 ? C39 : p37; e15(this._container, "click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup", this._handleDOMEvent, this), this.options.trackResize && e15(window, "resize", this._onResize, this), f46.any3d && this.options.transform3DLimit && (t14 ? this.off : this.on).call(this, "moveend", this._onMoveEnd); }, _onResize: function() { V34(this._resizeRequest), this._resizeRequest = H43(function() { this.invalidateSize({ debounceMoveend: true }); }, this); }, _onScroll: function() { this._container.scrollTop = 0, this._container.scrollLeft = 0; }, _onMoveEnd: function() { var t14 = this._getMapPanePos(); Math.max(Math.abs(t14.x), Math.abs(t14.y)) >= this.options.transform3DLimit && this._resetView(this.getCenter(), this.getZoom()); }, _findEventTargets: function(t14, e15) { for (var i20 = [], n24, o27 = e15 === "mouseout" || e15 === "mouseover", s38 = t14.target || t14.srcElement, r19 = false; s38; ) { if (n24 = this._targets[P43(s38)], n24 && (e15 === "click" || e15 === "preclick") && this._draggableMoved(n24)) { r19 = true; break; } if (n24 && n24.listens(e15, true) && (o27 && !Re19(s38, t14) || (i20.push(n24), o27)) || s38 === this._container) break; s38 = s38.parentNode; } return !i20.length && !r19 && !o27 && this.listens(e15, true) && (i20 = [this]), i20; }, _isClickDisabled: function(t14) { for (; t14 && t14 !== this._container; ) { if (t14._leaflet_disable_click) return true; t14 = t14.parentNode; } }, _handleDOMEvent: function(t14) { var e15 = t14.target || t14.srcElement; if (!(!this._loaded || e15._leaflet_disable_events || t14.type === "click" && this._isClickDisabled(e15))) { var i20 = t14.type; i20 === "mousedown" && Oe21(e15), this._fireDOMEvent(t14, i20); } }, _mouseEvents: ["click", "dblclick", "mouseover", "mouseout", "contextmenu"], _fireDOMEvent: function(t14, e15, i20) { if (t14.type === "click") { var n24 = x50({}, t14); n24.type = "preclick", this._fireDOMEvent(n24, n24.type, i20); } var o27 = this._findEventTargets(t14, e15); if (i20) { for (var s38 = [], r19 = 0; r19 < i20.length; r19++) i20[r19].listens(e15, true) && s38.push(i20[r19]); o27 = s38.concat(o27); } if (o27.length) { e15 === "contextmenu" && R49(t14); var a36 = o27[0], h46 = { originalEvent: t14 }; if (t14.type !== "keypress" && t14.type !== "keydown" && t14.type !== "keyup") { var u36 = a36.getLatLng && (!a36._radius || a36._radius <= 10); h46.containerPoint = u36 ? this.latLngToContainerPoint(a36.getLatLng()) : this.mouseEventToContainerPoint(t14), h46.layerPoint = this.containerPointToLayerPoint(h46.containerPoint), h46.latlng = u36 ? a36.getLatLng() : this.layerPointToLatLng(h46.layerPoint); } for (r19 = 0; r19 < o27.length; r19++) if (o27[r19].fire(e15, h46, true), h46.originalEvent._stopped || o27[r19].options.bubblingMouseEvents === false && de24(this._mouseEvents, e15) !== -1) return; } }, _draggableMoved: function(t14) { return t14 = t14.dragging && t14.dragging.enabled() ? t14 : this, t14.dragging && t14.dragging.moved() || this.boxZoom && this.boxZoom.moved(); }, _clearHandlers: function() { for (var t14 = 0, e15 = this._handlers.length; t14 < e15; t14++) this._handlers[t14].disable(); }, whenReady: function(t14, e15) { return this._loaded ? t14.call(e15 || this, { target: this }) : this.on("load", t14, e15), this; }, _getMapPanePos: function() { return mt11(this._mapPane) || new m37(0, 0); }, _moved: function() { var t14 = this._getMapPanePos(); return t14 && !t14.equals([0, 0]); }, _getTopLeftPoint: function(t14, e15) { var i20 = t14 && e15 !== void 0 ? this._getNewPixelOrigin(t14, e15) : this.getPixelOrigin(); return i20.subtract(this._getMapPanePos()); }, _getNewPixelOrigin: function(t14, e15) { var i20 = this.getSize()._divideBy(2); return this.project(t14, e15)._subtract(i20)._add(this._getMapPanePos())._round(); }, _latLngToNewLayerPoint: function(t14, e15, i20) { var n24 = this._getNewPixelOrigin(i20, e15); return this.project(t14, e15)._subtract(n24); }, _latLngBoundsToNewLayerBounds: function(t14, e15, i20) { var n24 = this._getNewPixelOrigin(i20, e15); return F40([this.project(t14.getSouthWest(), e15)._subtract(n24), this.project(t14.getNorthWest(), e15)._subtract(n24), this.project(t14.getSouthEast(), e15)._subtract(n24), this.project(t14.getNorthEast(), e15)._subtract(n24)]); }, _getCenterLayerPoint: function() { return this.containerPointToLayerPoint(this.getSize()._divideBy(2)); }, _getCenterOffset: function(t14) { return this.latLngToLayerPoint(t14).subtract(this._getCenterLayerPoint()); }, _limitCenter: function(t14, e15, i20) { if (!i20) return t14; var n24 = this.project(t14, e15), o27 = this.getSize().divideBy(2), s38 = new z47(n24.subtract(o27), n24.add(o27)), r19 = this._getBoundsOffset(s38, i20, e15); return Math.abs(r19.x) <= 1 && Math.abs(r19.y) <= 1 ? t14 : this.unproject(n24.add(r19), e15); }, _limitOffset: function(t14, e15) { if (!e15) return t14; var i20 = this.getPixelBounds(), n24 = new z47(i20.min.add(t14), i20.max.add(t14)); return t14.add(this._getBoundsOffset(n24, e15)); }, _getBoundsOffset: function(t14, e15, i20) { var n24 = F40(this.project(e15.getNorthEast(), i20), this.project(e15.getSouthWest(), i20)), o27 = n24.min.subtract(t14.min), s38 = n24.max.subtract(t14.max), r19 = this._rebound(o27.x, -s38.x), a36 = this._rebound(o27.y, -s38.y); return new m37(r19, a36); }, _rebound: function(t14, e15) { return t14 + e15 > 0 ? Math.round(t14 - e15) / 2 : Math.max(0, Math.ceil(t14)) - Math.max(0, Math.floor(e15)); }, _limitZoom: function(t14) { var e15 = this.getMinZoom(), i20 = this.getMaxZoom(), n24 = f46.any3d ? this.options.zoomSnap : 1; return n24 && (t14 = Math.round(t14 / n24) * n24), Math.max(e15, Math.min(i20, t14)); }, _onPanTransitionStep: function() { this.fire("move"); }, _onPanTransitionEnd: function() { O53(this._mapPane, "leaflet-pan-anim"), this.fire("moveend"); }, _tryAnimatedPan: function(t14, e15) { var i20 = this._getCenterOffset(t14)._trunc(); return (e15 && e15.animate) !== true && !this.getSize().contains(i20) ? false : (this.panBy(i20, e15), true); }, _createAnimProxy: function() { var t14 = this._proxy = T53("div", "leaflet-proxy leaflet-zoom-animated"); this._panes.mapPane.appendChild(t14), this.on("zoomanim", function(e15) { var i20 = be26, n24 = this._proxy.style[i20]; _t14(this._proxy, this.project(e15.center, e15.zoom), this.getZoomScale(e15.zoom, 1)), n24 === this._proxy.style[i20] && this._animatingZoom && this._onZoomTransitionEnd(); }, this), this.on("load moveend", this._animMoveEnd, this), this._on("unload", this._destroyAnimProxy, this); }, _destroyAnimProxy: function() { k51(this._proxy), this.off("load moveend", this._animMoveEnd, this), delete this._proxy; }, _animMoveEnd: function() { var t14 = this.getCenter(), e15 = this.getZoom(); _t14(this._proxy, this.project(t14, e15), this.getZoomScale(e15, 1)); }, _catchTransitionEnd: function(t14) { this._animatingZoom && t14.propertyName.indexOf("transform") >= 0 && this._onZoomTransitionEnd(); }, _nothingToAnimate: function() { return !this._container.getElementsByClassName("leaflet-zoom-animated").length; }, _tryAnimatedZoom: function(t14, e15, i20) { if (this._animatingZoom) return true; if (i20 = i20 || {}, !this._zoomAnimated || i20.animate === false || this._nothingToAnimate() || Math.abs(e15 - this._zoom) > this.options.zoomAnimationThreshold) return false; var n24 = this.getZoomScale(e15), o27 = this._getCenterOffset(t14)._divideBy(1 - 1 / n24); return i20.animate !== true && !this.getSize().contains(o27) ? false : (H43(function() { this._moveStart(true, i20.noMoveStart || false)._animateZoom(t14, e15, true); }, this), true); }, _animateZoom: function(t14, e15, i20, n24) { this._mapPane && (i20 && (this._animatingZoom = true, this._animateToCenter = t14, this._animateToZoom = e15, v43(this._mapPane, "leaflet-zoom-anim")), this.fire("zoomanim", { center: t14, zoom: e15, noUpdate: n24 }), this._tempFireZoomEvent || (this._tempFireZoomEvent = this._zoom !== this._animateToZoom), this._move(this._animateToCenter, this._animateToZoom, void 0, true), setTimeout(b45(this._onZoomTransitionEnd, this), 250)); }, _onZoomTransitionEnd: function() { this._animatingZoom && (this._mapPane && O53(this._mapPane, "leaflet-zoom-anim"), this._animatingZoom = false, this._move(this._animateToCenter, this._animateToZoom, void 0, true), this._tempFireZoomEvent && this.fire("zoom"), delete this._tempFireZoomEvent, this.fire("move"), this._moveEnd(true)); } }); function to5(t14, e15) { return new w44(t14, e15); } var J35 = nt15.extend({ options: { position: "topright" }, initialize: function(t14) { S60(this, t14); }, getPosition: function() { return this.options.position; }, setPosition: function(t14) { var e15 = this._map; return e15 && e15.removeControl(this), this.options.position = t14, e15 && e15.addControl(this), this; }, getContainer: function() { return this._container; }, addTo: function(t14) { this.remove(), this._map = t14; var e15 = this._container = this.onAdd(t14), i20 = this.getPosition(), n24 = t14._controlCorners[i20]; return v43(e15, "leaflet-control"), i20.indexOf("bottom") !== -1 ? n24.insertBefore(e15, n24.firstChild) : n24.appendChild(e15), this._map.on("unload", this.remove, this), this; }, remove: function() { return this._map ? (k51(this._container), this.onRemove && this.onRemove(this._map), this._map.off("unload", this.remove, this), this._map = null, this) : this; }, _refocusOnMap: function(t14) { this._map && t14 && t14.screenX > 0 && t14.screenY > 0 && this._map.getContainer().focus(); } }), Rt9 = function(t14) { return new J35(t14); }; w44.include({ addControl: function(t14) { return t14.addTo(this), this; }, removeControl: function(t14) { return t14.remove(), this; }, _initControlPos: function() { var t14 = this._controlCorners = {}, e15 = "leaflet-", i20 = this._controlContainer = T53("div", e15 + "control-container", this._container); function n24(o27, s38) { var r19 = e15 + o27 + " " + e15 + s38; t14[o27 + s38] = T53("div", r19, i20); } n24("top", "left"), n24("top", "right"), n24("bottom", "left"), n24("bottom", "right"); }, _clearControlPos: function() { for (var t14 in this._controlCorners) k51(this._controlCorners[t14]); k51(this._controlContainer), delete this._controlCorners, delete this._controlContainer; } }); var Ii4 = J35.extend({ options: { collapsed: true, position: "topright", autoZIndex: true, hideSingleBase: false, sortLayers: false, sortFunction: function(t14, e15, i20, n24) { return i20 < n24 ? -1 : n24 < i20 ? 1 : 0; } }, initialize: function(t14, e15, i20) { S60(this, i20), this._layerControlInputs = [], this._layers = [], this._lastZIndex = 0, this._handlingClick = false, this._preventClick = false; for (var n24 in t14) this._addLayer(t14[n24], n24); for (n24 in e15) this._addLayer(e15[n24], n24, true); }, onAdd: function(t14) { this._initLayout(), this._update(), this._map = t14, t14.on("zoomend", this._checkDisabledLayers, this); for (var e15 = 0; e15 < this._layers.length; e15++) this._layers[e15].layer.on("add remove", this._onLayerChange, this); return this._container; }, addTo: function(t14) { return J35.prototype.addTo.call(this, t14), this._expandIfNotCollapsed(); }, onRemove: function() { this._map.off("zoomend", this._checkDisabledLayers, this); for (var t14 = 0; t14 < this._layers.length; t14++) this._layers[t14].layer.off("add remove", this._onLayerChange, this); }, addBaseLayer: function(t14, e15) { return this._addLayer(t14, e15), this._map ? this._update() : this; }, addOverlay: function(t14, e15) { return this._addLayer(t14, e15, true), this._map ? this._update() : this; }, removeLayer: function(t14) { t14.off("add remove", this._onLayerChange, this); var e15 = this._getLayer(P43(t14)); return e15 && this._layers.splice(this._layers.indexOf(e15), 1), this._map ? this._update() : this; }, expand: function() { v43(this._container, "leaflet-control-layers-expanded"), this._section.style.height = null; var t14 = this._map.getSize().y - (this._container.offsetTop + 50); return t14 < this._section.clientHeight ? (v43(this._section, "leaflet-control-layers-scrollbar"), this._section.style.height = t14 + "px") : O53(this._section, "leaflet-control-layers-scrollbar"), this._checkDisabledLayers(), this; }, collapse: function() { return O53(this._container, "leaflet-control-layers-expanded"), this; }, _initLayout: function() { var t14 = "leaflet-control-layers", e15 = this._container = T53("div", t14), i20 = this.options.collapsed; e15.setAttribute("aria-haspopup", true), Nt11(e15), Ne20(e15); var n24 = this._section = T53("section", t14 + "-list"); i20 && (this._map.on("click", this.collapse, this), p37(e15, { mouseenter: this._expandSafely, mouseleave: this.collapse }, this)); var o27 = this._layersLink = T53("a", t14 + "-toggle", e15); o27.href = "#", o27.title = "Layers", o27.setAttribute("role", "button"), p37(o27, { keydown: function(s38) { s38.keyCode === 13 && this._expandSafely(); }, click: function(s38) { R49(s38), this._expandSafely(); } }, this), i20 || this.expand(), this._baseLayersList = T53("div", t14 + "-base", n24), this._separator = T53("div", t14 + "-separator", n24), this._overlaysList = T53("div", t14 + "-overlays", n24), e15.appendChild(n24); }, _getLayer: function(t14) { for (var e15 = 0; e15 < this._layers.length; e15++) if (this._layers[e15] && P43(this._layers[e15].layer) === t14) return this._layers[e15]; }, _addLayer: function(t14, e15, i20) { this._map && t14.on("add remove", this._onLayerChange, this), this._layers.push({ layer: t14, name: e15, overlay: i20 }), this.options.sortLayers && this._layers.sort(b45(function(n24, o27) { return this.options.sortFunction(n24.layer, o27.layer, n24.name, o27.name); }, this)), this.options.autoZIndex && t14.setZIndex && (this._lastZIndex++, t14.setZIndex(this._lastZIndex)), this._expandIfNotCollapsed(); }, _update: function() { if (!this._container) return this; jt11(this._baseLayersList), jt11(this._overlaysList), this._layerControlInputs = []; var t14, e15, i20, n24, o27 = 0; for (i20 = 0; i20 < this._layers.length; i20++) n24 = this._layers[i20], this._addItem(n24), e15 = e15 || n24.overlay, t14 = t14 || !n24.overlay, o27 += n24.overlay ? 0 : 1; return this.options.hideSingleBase && (t14 = t14 && o27 > 1, this._baseLayersList.style.display = t14 ? "" : "none"), this._separator.style.display = e15 && t14 ? "" : "none", this; }, _onLayerChange: function(t14) { this._handlingClick || this._update(); var e15 = this._getLayer(P43(t14.target)), i20 = e15.overlay ? t14.type === "add" ? "overlayadd" : "overlayremove" : t14.type === "add" ? "baselayerchange" : null; i20 && this._map.fire(i20, e15); }, _createRadioElement: function(t14, e15) { var i20 = '", n24 = document.createElement("div"); return n24.innerHTML = i20, n24.firstChild; }, _addItem: function(t14) { var e15 = document.createElement("label"), i20 = this._map.hasLayer(t14.layer), n24; t14.overlay ? (n24 = document.createElement("input"), n24.type = "checkbox", n24.className = "leaflet-control-layers-selector", n24.defaultChecked = i20) : n24 = this._createRadioElement("leaflet-base-layers_" + P43(this), i20), this._layerControlInputs.push(n24), n24.layerId = P43(t14.layer), p37(n24, "click", this._onInputClick, this); var o27 = document.createElement("span"); o27.innerHTML = " " + t14.name; var s38 = document.createElement("span"); e15.appendChild(s38), s38.appendChild(n24), s38.appendChild(o27); var r19 = t14.overlay ? this._overlaysList : this._baseLayersList; return r19.appendChild(e15), this._checkDisabledLayers(), e15; }, _onInputClick: function() { if (!this._preventClick) { var t14 = this._layerControlInputs, e15, i20, n24 = [], o27 = []; this._handlingClick = true; for (var s38 = t14.length - 1; s38 >= 0; s38--) e15 = t14[s38], i20 = this._getLayer(e15.layerId).layer, e15.checked ? n24.push(i20) : e15.checked || o27.push(i20); for (s38 = 0; s38 < o27.length; s38++) this._map.hasLayer(o27[s38]) && this._map.removeLayer(o27[s38]); for (s38 = 0; s38 < n24.length; s38++) this._map.hasLayer(n24[s38]) || this._map.addLayer(n24[s38]); this._handlingClick = false, this._refocusOnMap(); } }, _checkDisabledLayers: function() { for (var t14 = this._layerControlInputs, e15, i20, n24 = this._map.getZoom(), o27 = t14.length - 1; o27 >= 0; o27--) e15 = t14[o27], i20 = this._getLayer(e15.layerId).layer, e15.disabled = i20.options.minZoom !== void 0 && n24 < i20.options.minZoom || i20.options.maxZoom !== void 0 && n24 > i20.options.maxZoom; }, _expandIfNotCollapsed: function() { return this._map && !this.options.collapsed && this.expand(), this; }, _expandSafely: function() { var t14 = this._section; this._preventClick = true, p37(t14, "click", R49), this.expand(); var e15 = this; setTimeout(function() { C39(t14, "click", R49), e15._preventClick = false; }); } }), eo5 = function(t14, e15, i20) { return new Ii4(t14, e15, i20); }, De19 = J35.extend({ options: { position: "topleft", zoomInText: '', zoomInTitle: "Zoom in", zoomOutText: '', zoomOutTitle: "Zoom out" }, onAdd: function(t14) { var e15 = "leaflet-control-zoom", i20 = T53("div", e15 + " leaflet-bar"), n24 = this.options; return this._zoomInButton = this._createButton(n24.zoomInText, n24.zoomInTitle, e15 + "-in", i20, this._zoomIn), this._zoomOutButton = this._createButton(n24.zoomOutText, n24.zoomOutTitle, e15 + "-out", i20, this._zoomOut), this._updateDisabled(), t14.on("zoomend zoomlevelschange", this._updateDisabled, this), i20; }, onRemove: function(t14) { t14.off("zoomend zoomlevelschange", this._updateDisabled, this); }, disable: function() { return this._disabled = true, this._updateDisabled(), this; }, enable: function() { return this._disabled = false, this._updateDisabled(), this; }, _zoomIn: function(t14) { !this._disabled && this._map._zoom < this._map.getMaxZoom() && this._map.zoomIn(this._map.options.zoomDelta * (t14.shiftKey ? 3 : 1)); }, _zoomOut: function(t14) { !this._disabled && this._map._zoom > this._map.getMinZoom() && this._map.zoomOut(this._map.options.zoomDelta * (t14.shiftKey ? 3 : 1)); }, _createButton: function(t14, e15, i20, n24, o27) { var s38 = T53("a", i20, n24); return s38.innerHTML = t14, s38.href = "#", s38.title = e15, s38.setAttribute("role", "button"), s38.setAttribute("aria-label", e15), Nt11(s38), p37(s38, "click", vt12), p37(s38, "click", o27, this), p37(s38, "click", this._refocusOnMap, this), s38; }, _updateDisabled: function() { var t14 = this._map, e15 = "leaflet-disabled"; O53(this._zoomInButton, e15), O53(this._zoomOutButton, e15), this._zoomInButton.setAttribute("aria-disabled", "false"), this._zoomOutButton.setAttribute("aria-disabled", "false"), (this._disabled || t14._zoom === t14.getMinZoom()) && (v43(this._zoomOutButton, e15), this._zoomOutButton.setAttribute("aria-disabled", "true")), (this._disabled || t14._zoom === t14.getMaxZoom()) && (v43(this._zoomInButton, e15), this._zoomInButton.setAttribute("aria-disabled", "true")); } }); w44.mergeOptions({ zoomControl: true }), w44.addInitHook(function() { this.options.zoomControl && (this.zoomControl = new De19(), this.addControl(this.zoomControl)); }); var io6 = function(t14) { return new De19(t14); }, Bi4 = J35.extend({ options: { position: "bottomleft", maxWidth: 100, metric: true, imperial: true }, onAdd: function(t14) { var e15 = "leaflet-control-scale", i20 = T53("div", e15), n24 = this.options; return this._addScales(n24, e15 + "-line", i20), t14.on(n24.updateWhenIdle ? "moveend" : "move", this._update, this), t14.whenReady(this._update, this), i20; }, onRemove: function(t14) { t14.off(this.options.updateWhenIdle ? "moveend" : "move", this._update, this); }, _addScales: function(t14, e15, i20) { t14.metric && (this._mScale = T53("div", e15, i20)), t14.imperial && (this._iScale = T53("div", e15, i20)); }, _update: function() { var t14 = this._map, e15 = t14.getSize().y / 2, i20 = t14.distance(t14.containerPointToLatLng([0, e15]), t14.containerPointToLatLng([this.options.maxWidth, e15])); this._updateScales(i20); }, _updateScales: function(t14) { this.options.metric && t14 && this._updateMetric(t14), this.options.imperial && t14 && this._updateImperial(t14); }, _updateMetric: function(t14) { var e15 = this._getRoundNum(t14), i20 = e15 < 1e3 ? e15 + " m" : e15 / 1e3 + " km"; this._updateScale(this._mScale, i20, e15 / t14); }, _updateImperial: function(t14) { var e15 = t14 * 3.2808399, i20, n24, o27; e15 > 5280 ? (i20 = e15 / 5280, n24 = this._getRoundNum(i20), this._updateScale(this._iScale, n24 + " mi", n24 / i20)) : (o27 = this._getRoundNum(e15), this._updateScale(this._iScale, o27 + " ft", o27 / e15)); }, _updateScale: function(t14, e15, i20) { t14.style.width = Math.round(this.options.maxWidth * i20) + "px", t14.innerHTML = e15; }, _getRoundNum: function(t14) { var e15 = Math.pow(10, (Math.floor(t14) + "").length - 1), i20 = t14 / e15; return i20 = i20 >= 10 ? 10 : i20 >= 5 ? 5 : i20 >= 3 ? 3 : i20 >= 2 ? 2 : 1, e15 * i20; } }), no6 = function(t14) { return new Bi4(t14); }, oo6 = '', He16 = J35.extend({ options: { position: "bottomright", prefix: '' + (f46.inlineSvg ? oo6 + " " : "") + "Leaflet" }, initialize: function(t14) { S60(this, t14), this._attributions = {}; }, onAdd: function(t14) { t14.attributionControl = this, this._container = T53("div", "leaflet-control-attribution"), Nt11(this._container); for (var e15 in t14._layers) t14._layers[e15].getAttribution && this.addAttribution(t14._layers[e15].getAttribution()); return this._update(), t14.on("layeradd", this._addAttribution, this), this._container; }, onRemove: function(t14) { t14.off("layeradd", this._addAttribution, this); }, _addAttribution: function(t14) { t14.layer.getAttribution && (this.addAttribution(t14.layer.getAttribution()), t14.layer.once("remove", function() { this.removeAttribution(t14.layer.getAttribution()); }, this)); }, setPrefix: function(t14) { return this.options.prefix = t14, this._update(), this; }, addAttribution: function(t14) { return t14 ? (this._attributions[t14] || (this._attributions[t14] = 0), this._attributions[t14]++, this._update(), this) : this; }, removeAttribution: function(t14) { return t14 ? (this._attributions[t14] && (this._attributions[t14]--, this._update()), this) : this; }, _update: function() { if (this._map) { var t14 = []; for (var e15 in this._attributions) this._attributions[e15] && t14.push(e15); var i20 = []; this.options.prefix && i20.push(this.options.prefix), t14.length && i20.push(t14.join(", ")), this._container.innerHTML = i20.join(' '); } } }); w44.mergeOptions({ attributionControl: true }), w44.addInitHook(function() { this.options.attributionControl && new He16().addTo(this); }); var so6 = function(t14) { return new He16(t14); }; J35.Layers = Ii4, J35.Zoom = De19, J35.Scale = Bi4, J35.Attribution = He16, Rt9.layers = eo5, Rt9.zoom = io6, Rt9.scale = no6, Rt9.attribution = so6; var et13 = nt15.extend({ initialize: function(t14) { this._map = t14; }, enable: function() { return this._enabled ? this : (this._enabled = true, this.addHooks(), this); }, disable: function() { return this._enabled ? (this._enabled = false, this.removeHooks(), this) : this; }, enabled: function() { return !!this._enabled; } }); et13.addTo = function(t14, e15) { return t14.addHandler(e15, this), this; }; var ro4 = { Events: G45 }, Ai3 = f46.touch ? "touchstart mousedown" : "mousedown", lt15 = zt9.extend({ options: { clickTolerance: 3 }, initialize: function(t14, e15, i20, n24) { S60(this, n24), this._element = t14, this._dragStartTarget = e15 || t14, this._preventOutline = i20; }, enable: function() { this._enabled || (p37(this._dragStartTarget, Ai3, this._onDown, this), this._enabled = true); }, disable: function() { this._enabled && (lt15._dragging === this && this.finishDrag(true), C39(this._dragStartTarget, Ai3, this._onDown, this), this._enabled = false, this._moved = false); }, _onDown: function(t14) { if (this._enabled && (this._moved = false, !Me26(this._element, "leaflet-zoom-anim"))) { if (t14.touches && t14.touches.length !== 1) { lt15._dragging === this && this.finishDrag(); return; } if (!(lt15._dragging || t14.shiftKey || t14.which !== 1 && t14.button !== 1 && !t14.touches) && (lt15._dragging = this, this._preventOutline && Oe21(this._element), ze16(), It11(), !this._moving)) { this.fire("down"); var e15 = t14.touches ? t14.touches[0] : t14, i20 = Si4(this._element); this._startPoint = new m37(e15.clientX, e15.clientY), this._startPos = mt11(this._element), this._parentScale = Ze13(i20); var n24 = t14.type === "mousedown"; p37(document, n24 ? "mousemove" : "touchmove", this._onMove, this), p37(document, n24 ? "mouseup" : "touchend touchcancel", this._onUp, this); } } }, _onMove: function(t14) { if (this._enabled) { if (t14.touches && t14.touches.length > 1) { this._moved = true; return; } var e15 = t14.touches && t14.touches.length === 1 ? t14.touches[0] : t14, i20 = new m37(e15.clientX, e15.clientY)._subtract(this._startPoint); !i20.x && !i20.y || Math.abs(i20.x) + Math.abs(i20.y) < this.options.clickTolerance || (i20.x /= this._parentScale.x, i20.y /= this._parentScale.y, R49(t14), this._moved || (this.fire("dragstart"), this._moved = true, v43(document.body, "leaflet-dragging"), this._lastTarget = t14.target || t14.srcElement, window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance && (this._lastTarget = this._lastTarget.correspondingUseElement), v43(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(i20), this._moving = true, this._lastEvent = t14, this._updatePosition()); } }, _updatePosition: function() { var t14 = { originalEvent: this._lastEvent }; this.fire("predrag", t14), I50(this._element, this._newPos), this.fire("drag", t14); }, _onUp: function() { this._enabled && this.finishDrag(); }, finishDrag: function(t14) { O53(document.body, "leaflet-dragging"), this._lastTarget && (O53(this._lastTarget, "leaflet-drag-target"), this._lastTarget = null), C39(document, "mousemove touchmove", this._onMove, this), C39(document, "mouseup touchend touchcancel", this._onUp, this), ke19(), Bt10(); var e15 = this._moved && this._moving; this._moving = false, lt15._dragging = false, e15 && this.fire("dragend", { noInertia: t14, distance: this._newPos.distanceTo(this._startPos) }); } }); function Ni4(t14, e15, i20) { var n24, o27 = [1, 4, 2, 8], s38, r19, a36, h46, u36, c25, d31, g45; for (s38 = 0, c25 = t14.length; s38 < c25; s38++) t14[s38]._code = gt13(t14[s38], e15); for (a36 = 0; a36 < 4; a36++) { for (d31 = o27[a36], n24 = [], s38 = 0, c25 = t14.length, r19 = c25 - 1; s38 < c25; r19 = s38++) h46 = t14[s38], u36 = t14[r19], h46._code & d31 ? u36._code & d31 || (g45 = $t9(u36, h46, d31, e15, i20), g45._code = gt13(g45, e15), n24.push(g45)) : (u36._code & d31 && (g45 = $t9(u36, h46, d31, e15, i20), g45._code = gt13(g45, e15), n24.push(g45)), n24.push(h46)); t14 = n24; } return t14; } function Ri3(t14, e15) { var i20, n24, o27, s38, r19, a36, h46, u36, c25; if (!t14 || t14.length === 0) throw new Error("latlngs not passed"); j55(t14) || (console.warn("latlngs are not flat! Only the first ring will be used"), t14 = t14[0]); var d31 = y53([0, 0]), g45 = Z39(t14), D54 = g45.getNorthWest().distanceTo(g45.getSouthWest()) * g45.getNorthEast().distanceTo(g45.getNorthWest()); D54 < 1700 && (d31 = Fe19(t14)); var N56 = t14.length, K45 = []; for (i20 = 0; i20 < N56; i20++) { var U37 = y53(t14[i20]); K45.push(e15.project(y53([U37.lat - d31.lat, U37.lng - d31.lng]))); } for (a36 = h46 = u36 = 0, i20 = 0, n24 = N56 - 1; i20 < N56; n24 = i20++) o27 = K45[i20], s38 = K45[n24], r19 = o27.y * s38.x - s38.y * o27.x, h46 += (o27.x + s38.x) * r19, u36 += (o27.y + s38.y) * r19, a36 += r19 * 3; a36 === 0 ? c25 = K45[0] : c25 = [h46 / a36, u36 / a36]; var Ct13 = e15.unproject(_48(c25)); return y53([Ct13.lat + d31.lat, Ct13.lng + d31.lng]); } function Fe19(t14) { for (var e15 = 0, i20 = 0, n24 = 0, o27 = 0; o27 < t14.length; o27++) { var s38 = y53(t14[o27]); e15 += s38.lat, i20 += s38.lng, n24++; } return y53([e15 / n24, i20 / n24]); } var ao5 = { __proto__: null, clipPolygon: Ni4, polygonCenter: Ri3, centroid: Fe19 }; function Di4(t14, e15) { if (!e15 || !t14.length) return t14.slice(); var i20 = e15 * e15; return t14 = lo7(t14, i20), t14 = uo6(t14, i20), t14; } function Hi3(t14, e15, i20) { return Math.sqrt(Dt9(t14, e15, i20, true)); } function ho5(t14, e15, i20) { return Dt9(t14, e15, i20); } function uo6(t14, e15) { var i20 = t14.length, n24 = typeof Uint8Array < "u" ? Uint8Array : Array, o27 = new n24(i20); o27[0] = o27[i20 - 1] = 1, We15(t14, o27, e15, 0, i20 - 1); var s38, r19 = []; for (s38 = 0; s38 < i20; s38++) o27[s38] && r19.push(t14[s38]); return r19; } function We15(t14, e15, i20, n24, o27) { var s38 = 0, r19, a36, h46; for (a36 = n24 + 1; a36 <= o27 - 1; a36++) h46 = Dt9(t14[a36], t14[n24], t14[o27], true), h46 > s38 && (r19 = a36, s38 = h46); s38 > i20 && (e15[r19] = 1, We15(t14, e15, i20, n24, r19), We15(t14, e15, i20, r19, o27)); } function lo7(t14, e15) { for (var i20 = [t14[0]], n24 = 1, o27 = 0, s38 = t14.length; n24 < s38; n24++) co5(t14[n24], t14[o27]) > e15 && (i20.push(t14[n24]), o27 = n24); return o27 < s38 - 1 && i20.push(t14[s38 - 1]), i20; } var Fi4; function Wi3(t14, e15, i20, n24, o27) { var s38 = n24 ? Fi4 : gt13(t14, i20), r19 = gt13(e15, i20), a36, h46, u36; for (Fi4 = r19; ; ) { if (!(s38 | r19)) return [t14, e15]; if (s38 & r19) return false; a36 = s38 || r19, h46 = $t9(t14, e15, a36, i20, o27), u36 = gt13(h46, i20), a36 === s38 ? (t14 = h46, s38 = u36) : (e15 = h46, r19 = u36); } } function $t9(t14, e15, i20, n24, o27) { var s38 = e15.x - t14.x, r19 = e15.y - t14.y, a36 = n24.min, h46 = n24.max, u36, c25; return i20 & 8 ? (u36 = t14.x + s38 * (h46.y - t14.y) / r19, c25 = h46.y) : i20 & 4 ? (u36 = t14.x + s38 * (a36.y - t14.y) / r19, c25 = a36.y) : i20 & 2 ? (u36 = h46.x, c25 = t14.y + r19 * (h46.x - t14.x) / s38) : i20 & 1 && (u36 = a36.x, c25 = t14.y + r19 * (a36.x - t14.x) / s38), new m37(u36, c25, o27); } function gt13(t14, e15) { var i20 = 0; return t14.x < e15.min.x ? i20 |= 1 : t14.x > e15.max.x && (i20 |= 2), t14.y < e15.min.y ? i20 |= 4 : t14.y > e15.max.y && (i20 |= 8), i20; } function co5(t14, e15) { var i20 = e15.x - t14.x, n24 = e15.y - t14.y; return i20 * i20 + n24 * n24; } function Dt9(t14, e15, i20, n24) { var o27 = e15.x, s38 = e15.y, r19 = i20.x - o27, a36 = i20.y - s38, h46 = r19 * r19 + a36 * a36, u36; return h46 > 0 && (u36 = ((t14.x - o27) * r19 + (t14.y - s38) * a36) / h46, u36 > 1 ? (o27 = i20.x, s38 = i20.y) : u36 > 0 && (o27 += r19 * u36, s38 += a36 * u36)), r19 = t14.x - o27, a36 = t14.y - s38, n24 ? r19 * r19 + a36 * a36 : new m37(o27, s38); } function j55(t14) { return !Y43(t14[0]) || typeof t14[0][0] != "object" && typeof t14[0][0] < "u"; } function Ui4(t14) { return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), j55(t14); } function Gi3(t14, e15) { var i20, n24, o27, s38, r19, a36, h46, u36; if (!t14 || t14.length === 0) throw new Error("latlngs not passed"); j55(t14) || (console.warn("latlngs are not flat! Only the first ring will be used"), t14 = t14[0]); var c25 = y53([0, 0]), d31 = Z39(t14), g45 = d31.getNorthWest().distanceTo(d31.getSouthWest()) * d31.getNorthEast().distanceTo(d31.getNorthWest()); g45 < 1700 && (c25 = Fe19(t14)); var D54 = t14.length, N56 = []; for (i20 = 0; i20 < D54; i20++) { var K45 = y53(t14[i20]); N56.push(e15.project(y53([K45.lat - c25.lat, K45.lng - c25.lng]))); } for (i20 = 0, n24 = 0; i20 < D54 - 1; i20++) n24 += N56[i20].distanceTo(N56[i20 + 1]) / 2; if (n24 === 0) u36 = N56[0]; else for (i20 = 0, s38 = 0; i20 < D54 - 1; i20++) if (r19 = N56[i20], a36 = N56[i20 + 1], o27 = r19.distanceTo(a36), s38 += o27, s38 > n24) { h46 = (s38 - n24) / o27, u36 = [a36.x - h46 * (a36.x - r19.x), a36.y - h46 * (a36.y - r19.y)]; break; } var U37 = e15.unproject(_48(u36)); return y53([U37.lat + c25.lat, U37.lng + c25.lng]); } var fo5 = { __proto__: null, simplify: Di4, pointToSegmentDistance: Hi3, closestPointOnSegment: ho5, clipSegment: Wi3, _getEdgeIntersection: $t9, _getBitCode: gt13, _sqClosestPointOnSegment: Dt9, isFlat: j55, _flat: Ui4, polylineCenter: Gi3 }, Ue17 = { project: function(t14) { return new m37(t14.lng, t14.lat); }, unproject: function(t14) { return new M50(t14.y, t14.x); }, bounds: new z47([-180, -90], [180, 90]) }, Ge14 = { R: 6378137, R_MINOR: 6356752314245179e-9, bounds: new z47([-2003750834279e-5, -1549657073972e-5], [2003750834279e-5, 1876465623138e-5]), project: function(t14) { var e15 = Math.PI / 180, i20 = this.R, n24 = t14.lat * e15, o27 = this.R_MINOR / i20, s38 = Math.sqrt(1 - o27 * o27), r19 = s38 * Math.sin(n24), a36 = Math.tan(Math.PI / 4 - n24 / 2) / Math.pow((1 - r19) / (1 + r19), s38 / 2); return n24 = -i20 * Math.log(Math.max(a36, 1e-10)), new m37(t14.lng * e15 * i20, n24); }, unproject: function(t14) { for (var e15 = 180 / Math.PI, i20 = this.R, n24 = this.R_MINOR / i20, o27 = Math.sqrt(1 - n24 * n24), s38 = Math.exp(-t14.y / i20), r19 = Math.PI / 2 - 2 * Math.atan(s38), a36 = 0, h46 = 0.1, u36; a36 < 15 && Math.abs(h46) > 1e-7; a36++) u36 = o27 * Math.sin(r19), u36 = Math.pow((1 - u36) / (1 + u36), o27 / 2), h46 = Math.PI / 2 - 2 * Math.atan(s38 * u36) - r19, r19 += h46; return new M50(r19 * e15, t14.x * e15 / i20); } }, _o3 = { __proto__: null, LonLat: Ue17, Mercator: Ge14, SphericalMercator: pe27 }, mo6 = x50({}, ut15, { code: "EPSG:3395", projection: Ge14, transformation: function() { var t14 = 0.5 / (Math.PI * Ge14.R); return kt14(t14, 0.5, -t14, 0.5); }() }), Vi4 = x50({}, ut15, { code: "EPSG:4326", projection: Ue17, transformation: kt14(1 / 180, 1, -1 / 180, 0.5) }), po5 = x50({}, ot13, { projection: Ue17, transformation: kt14(1, 0, -1, 0), scale: function(t14) { return Math.pow(2, t14); }, zoom: function(t14) { return Math.log(t14) / Math.LN2; }, distance: function(t14, e15) { var i20 = e15.lng - t14.lng, n24 = e15.lat - t14.lat; return Math.sqrt(i20 * i20 + n24 * n24); }, infinite: true }); ot13.Earth = ut15, ot13.EPSG3395 = mo6, ot13.EPSG3857 = ge28, ot13.EPSG900913 = xn5, ot13.EPSG4326 = Vi4, ot13.Simple = po5; var X43 = zt9.extend({ options: { pane: "overlayPane", attribution: null, bubblingMouseEvents: true }, addTo: function(t14) { return t14.addLayer(this), this; }, remove: function() { return this.removeFrom(this._map || this._mapToAdd); }, removeFrom: function(t14) { return t14 && t14.removeLayer(this), this; }, getPane: function(t14) { return this._map.getPane(t14 ? this.options[t14] || t14 : this.options.pane); }, addInteractiveTarget: function(t14) { return this._map._targets[P43(t14)] = this, this; }, removeInteractiveTarget: function(t14) { return delete this._map._targets[P43(t14)], this; }, getAttribution: function() { return this.options.attribution; }, _layerAdd: function(t14) { var e15 = t14.target; if (e15.hasLayer(this)) { if (this._map = e15, this._zoomAnimated = e15._zoomAnimated, this.getEvents) { var i20 = this.getEvents(); e15.on(i20, this), this.once("remove", function() { e15.off(i20, this); }, this); } this.onAdd(e15), this.fire("add"), e15.fire("layeradd", { layer: this }); } } }); w44.include({ addLayer: function(t14) { if (!t14._layerAdd) throw new Error("The provided object is not a Layer."); var e15 = P43(t14); return this._layers[e15] ? this : (this._layers[e15] = t14, t14._mapToAdd = this, t14.beforeAdd && t14.beforeAdd(this), this.whenReady(t14._layerAdd, t14), this); }, removeLayer: function(t14) { var e15 = P43(t14); return this._layers[e15] ? (this._loaded && t14.onRemove(this), delete this._layers[e15], this._loaded && (this.fire("layerremove", { layer: t14 }), t14.fire("remove")), t14._map = t14._mapToAdd = null, this) : this; }, hasLayer: function(t14) { return P43(t14) in this._layers; }, eachLayer: function(t14, e15) { for (var i20 in this._layers) t14.call(e15, this._layers[i20]); return this; }, _addLayers: function(t14) { t14 = t14 ? Y43(t14) ? t14 : [t14] : []; for (var e15 = 0, i20 = t14.length; e15 < i20; e15++) this.addLayer(t14[e15]); }, _addZoomLimit: function(t14) { (!isNaN(t14.options.maxZoom) || !isNaN(t14.options.minZoom)) && (this._zoomBoundLayers[P43(t14)] = t14, this._updateZoomLevels()); }, _removeZoomLimit: function(t14) { var e15 = P43(t14); this._zoomBoundLayers[e15] && (delete this._zoomBoundLayers[e15], this._updateZoomLevels()); }, _updateZoomLevels: function() { var t14 = 1 / 0, e15 = -1 / 0, i20 = this._getZoomSpan(); for (var n24 in this._zoomBoundLayers) { var o27 = this._zoomBoundLayers[n24].options; t14 = o27.minZoom === void 0 ? t14 : Math.min(t14, o27.minZoom), e15 = o27.maxZoom === void 0 ? e15 : Math.max(e15, o27.maxZoom); } this._layersMaxZoom = e15 === -1 / 0 ? void 0 : e15, this._layersMinZoom = t14 === 1 / 0 ? void 0 : t14, i20 !== this._getZoomSpan() && this.fire("zoomlevelschange"), this.options.maxZoom === void 0 && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom && this.setZoom(this._layersMaxZoom), this.options.minZoom === void 0 && this._layersMinZoom && this.getZoom() < this._layersMinZoom && this.setZoom(this._layersMinZoom); } }); var Pt14 = X43.extend({ initialize: function(t14, e15) { S60(this, e15), this._layers = {}; var i20, n24; if (t14) for (i20 = 0, n24 = t14.length; i20 < n24; i20++) this.addLayer(t14[i20]); }, addLayer: function(t14) { var e15 = this.getLayerId(t14); return this._layers[e15] = t14, this._map && this._map.addLayer(t14), this; }, removeLayer: function(t14) { var e15 = t14 in this._layers ? t14 : this.getLayerId(t14); return this._map && this._layers[e15] && this._map.removeLayer(this._layers[e15]), delete this._layers[e15], this; }, hasLayer: function(t14) { var e15 = typeof t14 == "number" ? t14 : this.getLayerId(t14); return e15 in this._layers; }, clearLayers: function() { return this.eachLayer(this.removeLayer, this); }, invoke: function(t14) { var e15 = Array.prototype.slice.call(arguments, 1), i20, n24; for (i20 in this._layers) n24 = this._layers[i20], n24[t14] && n24[t14].apply(n24, e15); return this; }, onAdd: function(t14) { this.eachLayer(t14.addLayer, t14); }, onRemove: function(t14) { this.eachLayer(t14.removeLayer, t14); }, eachLayer: function(t14, e15) { for (var i20 in this._layers) t14.call(e15, this._layers[i20]); return this; }, getLayer: function(t14) { return this._layers[t14]; }, getLayers: function() { var t14 = []; return this.eachLayer(t14.push, t14), t14; }, setZIndex: function(t14) { return this.invoke("setZIndex", t14); }, getLayerId: function(t14) { return P43(t14); } }), vo5 = function(t14, e15) { return new Pt14(t14, e15); }, st16 = Pt14.extend({ addLayer: function(t14) { return this.hasLayer(t14) ? this : (t14.addEventParent(this), Pt14.prototype.addLayer.call(this, t14), this.fire("layeradd", { layer: t14 })); }, removeLayer: function(t14) { return this.hasLayer(t14) ? (t14 in this._layers && (t14 = this._layers[t14]), t14.removeEventParent(this), Pt14.prototype.removeLayer.call(this, t14), this.fire("layerremove", { layer: t14 })) : this; }, setStyle: function(t14) { return this.invoke("setStyle", t14); }, bringToFront: function() { return this.invoke("bringToFront"); }, bringToBack: function() { return this.invoke("bringToBack"); }, getBounds: function() { var t14 = new W39(); for (var e15 in this._layers) { var i20 = this._layers[e15]; t14.extend(i20.getBounds ? i20.getBounds() : i20.getLatLng()); } return t14; } }), go5 = function(t14, e15) { return new st16(t14, e15); }, Lt12 = nt15.extend({ options: { popupAnchor: [0, 0], tooltipAnchor: [0, 0], crossOrigin: false }, initialize: function(t14) { S60(this, t14); }, createIcon: function(t14) { return this._createIcon("icon", t14); }, createShadow: function(t14) { return this._createIcon("shadow", t14); }, _createIcon: function(t14, e15) { var i20 = this._getIconUrl(t14); if (!i20) { if (t14 === "icon") throw new Error("iconUrl not set in Icon options (see the docs)."); return null; } var n24 = this._createImg(i20, e15 && e15.tagName === "IMG" ? e15 : null); return this._setIconStyles(n24, t14), (this.options.crossOrigin || this.options.crossOrigin === "") && (n24.crossOrigin = this.options.crossOrigin === true ? "" : this.options.crossOrigin), n24; }, _setIconStyles: function(t14, e15) { var i20 = this.options, n24 = i20[e15 + "Size"]; typeof n24 == "number" && (n24 = [n24, n24]); var o27 = _48(n24), s38 = _48(e15 === "shadow" && i20.shadowAnchor || i20.iconAnchor || o27 && o27.divideBy(2, true)); t14.className = "leaflet-marker-" + e15 + " " + (i20.className || ""), s38 && (t14.style.marginLeft = -s38.x + "px", t14.style.marginTop = -s38.y + "px"), o27 && (t14.style.width = o27.x + "px", t14.style.height = o27.y + "px"); }, _createImg: function(t14, e15) { return e15 = e15 || document.createElement("img"), e15.src = t14, e15; }, _getIconUrl: function(t14) { return f46.retina && this.options[t14 + "RetinaUrl"] || this.options[t14 + "Url"]; } }); function yo5(t14) { return new Lt12(t14); } var Ht9 = Lt12.extend({ options: { iconUrl: "marker-icon.png", iconRetinaUrl: "marker-icon-2x.png", shadowUrl: "marker-shadow.png", iconSize: [25, 41], iconAnchor: [12, 41], popupAnchor: [1, -34], tooltipAnchor: [16, -28], shadowSize: [41, 41] }, _getIconUrl: function(t14) { return typeof Ht9.imagePath != "string" && (Ht9.imagePath = this._detectIconPath()), (this.options.imagePath || Ht9.imagePath) + Lt12.prototype._getIconUrl.call(this, t14); }, _stripUrl: function(t14) { var e15 = function(i20, n24, o27) { var s38 = n24.exec(i20); return s38 && s38[o27]; }; return t14 = e15(t14, /^url\((['"])?(.+)\1\)$/, 2), t14 && e15(t14, /^(.*)marker-icon\.png$/, 1); }, _detectIconPath: function() { var t14 = T53("div", "leaflet-default-icon-path", document.body), e15 = Zt8(t14, "background-image") || Zt8(t14, "backgroundImage"); if (document.body.removeChild(t14), e15 = this._stripUrl(e15), e15) return e15; var i20 = document.querySelector('link[href$="leaflet.css"]'); return i20 ? i20.href.substring(0, i20.href.length - 11 - 1) : ""; } }), qi3 = et13.extend({ initialize: function(t14) { this._marker = t14; }, addHooks: function() { var t14 = this._marker._icon; this._draggable || (this._draggable = new lt15(t14, t14, true)), this._draggable.on({ dragstart: this._onDragStart, predrag: this._onPreDrag, drag: this._onDrag, dragend: this._onDragEnd }, this).enable(), v43(t14, "leaflet-marker-draggable"); }, removeHooks: function() { this._draggable.off({ dragstart: this._onDragStart, predrag: this._onPreDrag, drag: this._onDrag, dragend: this._onDragEnd }, this).disable(), this._marker._icon && O53(this._marker._icon, "leaflet-marker-draggable"); }, moved: function() { return this._draggable && this._draggable._moved; }, _adjustPan: function(t14) { var e15 = this._marker, i20 = e15._map, n24 = this._marker.options.autoPanSpeed, o27 = this._marker.options.autoPanPadding, s38 = mt11(e15._icon), r19 = i20.getPixelBounds(), a36 = i20.getPixelOrigin(), h46 = F40(r19.min._subtract(a36).add(o27), r19.max._subtract(a36).subtract(o27)); if (!h46.contains(s38)) { var u36 = _48((Math.max(h46.max.x, s38.x) - h46.max.x) / (r19.max.x - h46.max.x) - (Math.min(h46.min.x, s38.x) - h46.min.x) / (r19.min.x - h46.min.x), (Math.max(h46.max.y, s38.y) - h46.max.y) / (r19.max.y - h46.max.y) - (Math.min(h46.min.y, s38.y) - h46.min.y) / (r19.min.y - h46.min.y)).multiplyBy(n24); i20.panBy(u36, { animate: false }), this._draggable._newPos._add(u36), this._draggable._startPos._add(u36), I50(e15._icon, this._draggable._newPos), this._onDrag(t14), this._panRequest = H43(this._adjustPan.bind(this, t14)); } }, _onDragStart: function() { this._oldLatLng = this._marker.getLatLng(), this._marker.closePopup && this._marker.closePopup(), this._marker.fire("movestart").fire("dragstart"); }, _onPreDrag: function(t14) { this._marker.options.autoPan && (V34(this._panRequest), this._panRequest = H43(this._adjustPan.bind(this, t14))); }, _onDrag: function(t14) { var e15 = this._marker, i20 = e15._shadow, n24 = mt11(e15._icon), o27 = e15._map.layerPointToLatLng(n24); i20 && I50(i20, n24), e15._latlng = o27, t14.latlng = o27, t14.oldLatLng = this._oldLatLng, e15.fire("move", t14).fire("drag", t14); }, _onDragEnd: function(t14) { V34(this._panRequest), delete this._oldLatLng, this._marker.fire("moveend").fire("dragend", t14); } }), Qt6 = X43.extend({ options: { icon: new Ht9(), interactive: true, keyboard: true, title: "", alt: "Marker", zIndexOffset: 0, opacity: 1, riseOnHover: false, riseOffset: 250, pane: "markerPane", shadowPane: "shadowPane", bubblingMouseEvents: false, autoPanOnFocus: true, draggable: false, autoPan: false, autoPanPadding: [50, 50], autoPanSpeed: 10 }, initialize: function(t14, e15) { S60(this, e15), this._latlng = y53(t14); }, onAdd: function(t14) { this._zoomAnimated = this._zoomAnimated && t14.options.markerZoomAnimation, this._zoomAnimated && t14.on("zoomanim", this._animateZoom, this), this._initIcon(), this.update(); }, onRemove: function(t14) { this.dragging && this.dragging.enabled() && (this.options.draggable = true, this.dragging.removeHooks()), delete this.dragging, this._zoomAnimated && t14.off("zoomanim", this._animateZoom, this), this._removeIcon(), this._removeShadow(); }, getEvents: function() { return { zoom: this.update, viewreset: this.update }; }, getLatLng: function() { return this._latlng; }, setLatLng: function(t14) { var e15 = this._latlng; return this._latlng = y53(t14), this.update(), this.fire("move", { oldLatLng: e15, latlng: this._latlng }); }, setZIndexOffset: function(t14) { return this.options.zIndexOffset = t14, this.update(); }, getIcon: function() { return this.options.icon; }, setIcon: function(t14) { return this.options.icon = t14, this._map && (this._initIcon(), this.update()), this._popup && this.bindPopup(this._popup, this._popup.options), this; }, getElement: function() { return this._icon; }, update: function() { if (this._icon && this._map) { var t14 = this._map.latLngToLayerPoint(this._latlng).round(); this._setPos(t14); } return this; }, _initIcon: function() { var t14 = this.options, e15 = "leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"), i20 = t14.icon.createIcon(this._icon), n24 = false; i20 !== this._icon && (this._icon && this._removeIcon(), n24 = true, t14.title && (i20.title = t14.title), i20.tagName === "IMG" && (i20.alt = t14.alt || "")), v43(i20, e15), t14.keyboard && (i20.tabIndex = "0", i20.setAttribute("role", "button")), this._icon = i20, t14.riseOnHover && this.on({ mouseover: this._bringToFront, mouseout: this._resetZIndex }), this.options.autoPanOnFocus && p37(i20, "focus", this._panOnFocus, this); var o27 = t14.icon.createShadow(this._shadow), s38 = false; o27 !== this._shadow && (this._removeShadow(), s38 = true), o27 && (v43(o27, e15), o27.alt = ""), this._shadow = o27, t14.opacity < 1 && this._updateOpacity(), n24 && this.getPane().appendChild(this._icon), this._initInteraction(), o27 && s38 && this.getPane(t14.shadowPane).appendChild(this._shadow); }, _removeIcon: function() { this.options.riseOnHover && this.off({ mouseover: this._bringToFront, mouseout: this._resetZIndex }), this.options.autoPanOnFocus && C39(this._icon, "focus", this._panOnFocus, this), k51(this._icon), this.removeInteractiveTarget(this._icon), this._icon = null; }, _removeShadow: function() { this._shadow && k51(this._shadow), this._shadow = null; }, _setPos: function(t14) { this._icon && I50(this._icon, t14), this._shadow && I50(this._shadow, t14), this._zIndex = t14.y + this.options.zIndexOffset, this._resetZIndex(); }, _updateZIndex: function(t14) { this._icon && (this._icon.style.zIndex = this._zIndex + t14); }, _animateZoom: function(t14) { var e15 = this._map._latLngToNewLayerPoint(this._latlng, t14.zoom, t14.center).round(); this._setPos(e15); }, _initInteraction: function() { if (this.options.interactive && (v43(this._icon, "leaflet-interactive"), this.addInteractiveTarget(this._icon), qi3)) { var t14 = this.options.draggable; this.dragging && (t14 = this.dragging.enabled(), this.dragging.disable()), this.dragging = new qi3(this), t14 && this.dragging.enable(); } }, setOpacity: function(t14) { return this.options.opacity = t14, this._map && this._updateOpacity(), this; }, _updateOpacity: function() { var t14 = this.options.opacity; this._icon && q53(this._icon, t14), this._shadow && q53(this._shadow, t14); }, _bringToFront: function() { this._updateZIndex(this.options.riseOffset); }, _resetZIndex: function() { this._updateZIndex(0); }, _panOnFocus: function() { var t14 = this._map; if (t14) { var e15 = this.options.icon.options, i20 = e15.iconSize ? _48(e15.iconSize) : _48(0, 0), n24 = e15.iconAnchor ? _48(e15.iconAnchor) : _48(0, 0); t14.panInside(this._latlng, { paddingTopLeft: n24, paddingBottomRight: i20.subtract(n24) }); } }, _getPopupAnchor: function() { return this.options.icon.options.popupAnchor; }, _getTooltipAnchor: function() { return this.options.icon.options.tooltipAnchor; } }); function wo5(t14, e15) { return new Qt6(t14, e15); } var ct16 = X43.extend({ options: { stroke: true, color: "#3388ff", weight: 3, opacity: 1, lineCap: "round", lineJoin: "round", dashArray: null, dashOffset: null, fill: false, fillColor: null, fillOpacity: 0.2, fillRule: "evenodd", interactive: true, bubblingMouseEvents: true }, beforeAdd: function(t14) { this._renderer = t14.getRenderer(this); }, onAdd: function() { this._renderer._initPath(this), this._reset(), this._renderer._addPath(this); }, onRemove: function() { this._renderer._removePath(this); }, redraw: function() { return this._map && this._renderer._updatePath(this), this; }, setStyle: function(t14) { return S60(this, t14), this._renderer && (this._renderer._updateStyle(this), this.options.stroke && t14 && Object.prototype.hasOwnProperty.call(t14, "weight") && this._updateBounds()), this; }, bringToFront: function() { return this._renderer && this._renderer._bringToFront(this), this; }, bringToBack: function() { return this._renderer && this._renderer._bringToBack(this), this; }, getElement: function() { return this._path; }, _reset: function() { this._project(), this._update(); }, _clickTolerance: function() { return (this.options.stroke ? this.options.weight / 2 : 0) + (this._renderer.options.tolerance || 0); } }), te32 = ct16.extend({ options: { fill: true, radius: 10 }, initialize: function(t14, e15) { S60(this, e15), this._latlng = y53(t14), this._radius = this.options.radius; }, setLatLng: function(t14) { var e15 = this._latlng; return this._latlng = y53(t14), this.redraw(), this.fire("move", { oldLatLng: e15, latlng: this._latlng }); }, getLatLng: function() { return this._latlng; }, setRadius: function(t14) { return this.options.radius = this._radius = t14, this.redraw(); }, getRadius: function() { return this._radius; }, setStyle: function(t14) { var e15 = t14 && t14.radius || this._radius; return ct16.prototype.setStyle.call(this, t14), this.setRadius(e15), this; }, _project: function() { this._point = this._map.latLngToLayerPoint(this._latlng), this._updateBounds(); }, _updateBounds: function() { var t14 = this._radius, e15 = this._radiusY || t14, i20 = this._clickTolerance(), n24 = [t14 + i20, e15 + i20]; this._pxBounds = new z47(this._point.subtract(n24), this._point.add(n24)); }, _update: function() { this._map && this._updatePath(); }, _updatePath: function() { this._renderer._updateCircle(this); }, _empty: function() { return this._radius && !this._renderer._bounds.intersects(this._pxBounds); }, _containsPoint: function(t14) { return t14.distanceTo(this._point) <= this._radius + this._clickTolerance(); } }); function xo5(t14, e15) { return new te32(t14, e15); } var Ve14 = te32.extend({ initialize: function(t14, e15, i20) { if (typeof e15 == "number" && (e15 = x50({}, i20, { radius: e15 })), S60(this, e15), this._latlng = y53(t14), isNaN(this.options.radius)) throw new Error("Circle radius cannot be NaN"); this._mRadius = this.options.radius; }, setRadius: function(t14) { return this._mRadius = t14, this.redraw(); }, getRadius: function() { return this._mRadius; }, getBounds: function() { var t14 = [this._radius, this._radiusY || this._radius]; return new W39(this._map.layerPointToLatLng(this._point.subtract(t14)), this._map.layerPointToLatLng(this._point.add(t14))); }, setStyle: ct16.prototype.setStyle, _project: function() { var t14 = this._latlng.lng, e15 = this._latlng.lat, i20 = this._map, n24 = i20.options.crs; if (n24.distance === ut15.distance) { var o27 = Math.PI / 180, s38 = this._mRadius / ut15.R / o27, r19 = i20.project([e15 + s38, t14]), a36 = i20.project([e15 - s38, t14]), h46 = r19.add(a36).divideBy(2), u36 = i20.unproject(h46).lat, c25 = Math.acos((Math.cos(s38 * o27) - Math.sin(e15 * o27) * Math.sin(u36 * o27)) / (Math.cos(e15 * o27) * Math.cos(u36 * o27))) / o27; (isNaN(c25) || c25 === 0) && (c25 = s38 / Math.cos(Math.PI / 180 * e15)), this._point = h46.subtract(i20.getPixelOrigin()), this._radius = isNaN(c25) ? 0 : h46.x - i20.project([u36, t14 - c25]).x, this._radiusY = h46.y - r19.y; } else { var d31 = n24.unproject(n24.project(this._latlng).subtract([this._mRadius, 0])); this._point = i20.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i20.latLngToLayerPoint(d31).x; } this._updateBounds(); } }); function Po4(t14, e15, i20) { return new Ve14(t14, e15, i20); } var rt14 = ct16.extend({ options: { smoothFactor: 1, noClip: false }, initialize: function(t14, e15) { S60(this, e15), this._setLatLngs(t14); }, getLatLngs: function() { return this._latlngs; }, setLatLngs: function(t14) { return this._setLatLngs(t14), this.redraw(); }, isEmpty: function() { return !this._latlngs.length; }, closestLayerPoint: function(t14) { for (var e15 = 1 / 0, i20 = null, n24 = Dt9, o27, s38, r19 = 0, a36 = this._parts.length; r19 < a36; r19++) for (var h46 = this._parts[r19], u36 = 1, c25 = h46.length; u36 < c25; u36++) { o27 = h46[u36 - 1], s38 = h46[u36]; var d31 = n24(t14, o27, s38, true); d31 < e15 && (e15 = d31, i20 = n24(t14, o27, s38)); } return i20 && (i20.distance = Math.sqrt(e15)), i20; }, getCenter: function() { if (!this._map) throw new Error("Must add layer to map before using getCenter()"); return Gi3(this._defaultShape(), this._map.options.crs); }, getBounds: function() { return this._bounds; }, addLatLng: function(t14, e15) { return e15 = e15 || this._defaultShape(), t14 = y53(t14), e15.push(t14), this._bounds.extend(t14), this.redraw(); }, _setLatLngs: function(t14) { this._bounds = new W39(), this._latlngs = this._convertLatLngs(t14); }, _defaultShape: function() { return j55(this._latlngs) ? this._latlngs : this._latlngs[0]; }, _convertLatLngs: function(t14) { for (var e15 = [], i20 = j55(t14), n24 = 0, o27 = t14.length; n24 < o27; n24++) i20 ? (e15[n24] = y53(t14[n24]), this._bounds.extend(e15[n24])) : e15[n24] = this._convertLatLngs(t14[n24]); return e15; }, _project: function() { var t14 = new z47(); this._rings = [], this._projectLatlngs(this._latlngs, this._rings, t14), this._bounds.isValid() && t14.isValid() && (this._rawPxBounds = t14, this._updateBounds()); }, _updateBounds: function() { var t14 = this._clickTolerance(), e15 = new m37(t14, t14); this._rawPxBounds && (this._pxBounds = new z47([this._rawPxBounds.min.subtract(e15), this._rawPxBounds.max.add(e15)])); }, _projectLatlngs: function(t14, e15, i20) { var n24 = t14[0] instanceof M50, o27 = t14.length, s38, r19; if (n24) { for (r19 = [], s38 = 0; s38 < o27; s38++) r19[s38] = this._map.latLngToLayerPoint(t14[s38]), i20.extend(r19[s38]); e15.push(r19); } else for (s38 = 0; s38 < o27; s38++) this._projectLatlngs(t14[s38], e15, i20); }, _clipPoints: function() { var t14 = this._renderer._bounds; if (this._parts = [], !(!this._pxBounds || !this._pxBounds.intersects(t14))) { if (this.options.noClip) { this._parts = this._rings; return; } var e15 = this._parts, i20, n24, o27, s38, r19, a36, h46; for (i20 = 0, o27 = 0, s38 = this._rings.length; i20 < s38; i20++) for (h46 = this._rings[i20], n24 = 0, r19 = h46.length; n24 < r19 - 1; n24++) a36 = Wi3(h46[n24], h46[n24 + 1], t14, n24, true), a36 && (e15[o27] = e15[o27] || [], e15[o27].push(a36[0]), (a36[1] !== h46[n24 + 1] || n24 === r19 - 2) && (e15[o27].push(a36[1]), o27++)); } }, _simplifyPoints: function() { for (var t14 = this._parts, e15 = this.options.smoothFactor, i20 = 0, n24 = t14.length; i20 < n24; i20++) t14[i20] = Di4(t14[i20], e15); }, _update: function() { this._map && (this._clipPoints(), this._simplifyPoints(), this._updatePath()); }, _updatePath: function() { this._renderer._updatePoly(this); }, _containsPoint: function(t14, e15) { var i20, n24, o27, s38, r19, a36, h46 = this._clickTolerance(); if (!this._pxBounds || !this._pxBounds.contains(t14)) return false; for (i20 = 0, s38 = this._parts.length; i20 < s38; i20++) for (a36 = this._parts[i20], n24 = 0, r19 = a36.length, o27 = r19 - 1; n24 < r19; o27 = n24++) if (!(!e15 && n24 === 0) && Hi3(t14, a36[o27], a36[n24]) <= h46) return true; return false; } }); function Lo4(t14, e15) { return new rt14(t14, e15); } rt14._flat = Ui4; var Tt10 = rt14.extend({ options: { fill: true }, isEmpty: function() { return !this._latlngs.length || !this._latlngs[0].length; }, getCenter: function() { if (!this._map) throw new Error("Must add layer to map before using getCenter()"); return Ri3(this._defaultShape(), this._map.options.crs); }, _convertLatLngs: function(t14) { var e15 = rt14.prototype._convertLatLngs.call(this, t14), i20 = e15.length; return i20 >= 2 && e15[0] instanceof M50 && e15[0].equals(e15[i20 - 1]) && e15.pop(), e15; }, _setLatLngs: function(t14) { rt14.prototype._setLatLngs.call(this, t14), j55(this._latlngs) && (this._latlngs = [this._latlngs]); }, _defaultShape: function() { return j55(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0]; }, _clipPoints: function() { var t14 = this._renderer._bounds, e15 = this.options.weight, i20 = new m37(e15, e15); if (t14 = new z47(t14.min.subtract(i20), t14.max.add(i20)), this._parts = [], !(!this._pxBounds || !this._pxBounds.intersects(t14))) { if (this.options.noClip) { this._parts = this._rings; return; } for (var n24 = 0, o27 = this._rings.length, s38; n24 < o27; n24++) s38 = Ni4(this._rings[n24], t14, true), s38.length && this._parts.push(s38); } }, _updatePath: function() { this._renderer._updatePoly(this, true); }, _containsPoint: function(t14) { var e15 = false, i20, n24, o27, s38, r19, a36, h46, u36; if (!this._pxBounds || !this._pxBounds.contains(t14)) return false; for (s38 = 0, h46 = this._parts.length; s38 < h46; s38++) for (i20 = this._parts[s38], r19 = 0, u36 = i20.length, a36 = u36 - 1; r19 < u36; a36 = r19++) n24 = i20[r19], o27 = i20[a36], n24.y > t14.y != o27.y > t14.y && t14.x < (o27.x - n24.x) * (t14.y - n24.y) / (o27.y - n24.y) + n24.x && (e15 = !e15); return e15 || rt14.prototype._containsPoint.call(this, t14, true); } }); function To4(t14, e15) { return new Tt10(t14, e15); } var at12 = st16.extend({ initialize: function(t14, e15) { S60(this, e15), this._layers = {}, t14 && this.addData(t14); }, addData: function(t14) { var e15 = Y43(t14) ? t14 : t14.features, i20, n24, o27; if (e15) { for (i20 = 0, n24 = e15.length; i20 < n24; i20++) o27 = e15[i20], (o27.geometries || o27.geometry || o27.features || o27.coordinates) && this.addData(o27); return this; } var s38 = this.options; if (s38.filter && !s38.filter(t14)) return this; var r19 = ee31(t14, s38); return r19 ? (r19.feature = oe29(t14), r19.defaultOptions = r19.options, this.resetStyle(r19), s38.onEachFeature && s38.onEachFeature(t14, r19), this.addLayer(r19)) : this; }, resetStyle: function(t14) { return t14 === void 0 ? this.eachLayer(this.resetStyle, this) : (t14.options = x50({}, t14.defaultOptions), this._setLayerStyle(t14, this.options.style), this); }, setStyle: function(t14) { return this.eachLayer(function(e15) { this._setLayerStyle(e15, t14); }, this); }, _setLayerStyle: function(t14, e15) { t14.setStyle && (typeof e15 == "function" && (e15 = e15(t14.feature)), t14.setStyle(e15)); } }); function ee31(t14, e15) { var i20 = t14.type === "Feature" ? t14.geometry : t14, n24 = i20 ? i20.coordinates : null, o27 = [], s38 = e15 && e15.pointToLayer, r19 = e15 && e15.coordsToLatLng || qe14, a36, h46, u36, c25; if (!n24 && !i20) return null; switch (i20.type) { case "Point": return a36 = r19(n24), ji4(s38, t14, a36, e15); case "MultiPoint": for (u36 = 0, c25 = n24.length; u36 < c25; u36++) a36 = r19(n24[u36]), o27.push(ji4(s38, t14, a36, e15)); return new st16(o27); case "LineString": case "MultiLineString": return h46 = ie25(n24, i20.type === "LineString" ? 0 : 1, r19), new rt14(h46, e15); case "Polygon": case "MultiPolygon": return h46 = ie25(n24, i20.type === "Polygon" ? 1 : 2, r19), new Tt10(h46, e15); case "GeometryCollection": for (u36 = 0, c25 = i20.geometries.length; u36 < c25; u36++) { var d31 = ee31({ geometry: i20.geometries[u36], type: "Feature", properties: t14.properties }, e15); d31 && o27.push(d31); } return new st16(o27); case "FeatureCollection": for (u36 = 0, c25 = i20.features.length; u36 < c25; u36++) { var g45 = ee31(i20.features[u36], e15); g45 && o27.push(g45); } return new st16(o27); default: throw new Error("Invalid GeoJSON object."); } } function ji4(t14, e15, i20, n24) { return t14 ? t14(e15, i20) : new Qt6(i20, n24 && n24.markersInheritOptions && n24); } function qe14(t14) { return new M50(t14[1], t14[0], t14[2]); } function ie25(t14, e15, i20) { for (var n24 = [], o27 = 0, s38 = t14.length, r19; o27 < s38; o27++) r19 = e15 ? ie25(t14[o27], e15 - 1, i20) : (i20 || qe14)(t14[o27]), n24.push(r19); return n24; } function je17(t14, e15) { return t14 = y53(t14), t14.alt !== void 0 ? [$45(t14.lng, e15), $45(t14.lat, e15), $45(t14.alt, e15)] : [$45(t14.lng, e15), $45(t14.lat, e15)]; } function ne30(t14, e15, i20, n24) { for (var o27 = [], s38 = 0, r19 = t14.length; s38 < r19; s38++) o27.push(e15 ? ne30(t14[s38], j55(t14[s38]) ? 0 : e15 - 1, i20, n24) : je17(t14[s38], n24)); return !e15 && i20 && o27.length > 0 && o27.push(o27[0].slice()), o27; } function bt16(t14, e15) { return t14.feature ? x50({}, t14.feature, { geometry: e15 }) : oe29(e15); } function oe29(t14) { return t14.type === "Feature" || t14.type === "FeatureCollection" ? t14 : { type: "Feature", properties: {}, geometry: t14 }; } var Ke18 = { toGeoJSON: function(t14) { return bt16(this, { type: "Point", coordinates: je17(this.getLatLng(), t14) }); } }; Qt6.include(Ke18), Ve14.include(Ke18), te32.include(Ke18), rt14.include({ toGeoJSON: function(t14) { var e15 = !j55(this._latlngs), i20 = ne30(this._latlngs, e15 ? 1 : 0, false, t14); return bt16(this, { type: (e15 ? "Multi" : "") + "LineString", coordinates: i20 }); } }), Tt10.include({ toGeoJSON: function(t14) { var e15 = !j55(this._latlngs), i20 = e15 && !j55(this._latlngs[0]), n24 = ne30(this._latlngs, i20 ? 2 : e15 ? 1 : 0, true, t14); return e15 || (n24 = [n24]), bt16(this, { type: (i20 ? "Multi" : "") + "Polygon", coordinates: n24 }); } }), Pt14.include({ toMultiPoint: function(t14) { var e15 = []; return this.eachLayer(function(i20) { e15.push(i20.toGeoJSON(t14).geometry.coordinates); }), bt16(this, { type: "MultiPoint", coordinates: e15 }); }, toGeoJSON: function(t14) { var e15 = this.feature && this.feature.geometry && this.feature.geometry.type; if (e15 === "MultiPoint") return this.toMultiPoint(t14); var i20 = e15 === "GeometryCollection", n24 = []; return this.eachLayer(function(o27) { if (o27.toGeoJSON) { var s38 = o27.toGeoJSON(t14); if (i20) n24.push(s38.geometry); else { var r19 = oe29(s38); r19.type === "FeatureCollection" ? n24.push.apply(n24, r19.features) : n24.push(r19); } } }), i20 ? bt16(this, { geometries: n24, type: "GeometryCollection" }) : { type: "FeatureCollection", features: n24 }; } }); function Ki3(t14, e15) { return new at12(t14, e15); } var bo5 = Ki3, se27 = X43.extend({ options: { opacity: 1, alt: "", interactive: false, crossOrigin: false, errorOverlayUrl: "", zIndex: 1, className: "" }, initialize: function(t14, e15, i20) { this._url = t14, this._bounds = Z39(e15), S60(this, i20); }, onAdd: function() { this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (v43(this._image, "leaflet-interactive"), this.addInteractiveTarget(this._image)), this.getPane().appendChild(this._image), this._reset(); }, onRemove: function() { k51(this._image), this.options.interactive && this.removeInteractiveTarget(this._image); }, setOpacity: function(t14) { return this.options.opacity = t14, this._image && this._updateOpacity(), this; }, setStyle: function(t14) { return t14.opacity && this.setOpacity(t14.opacity), this; }, bringToFront: function() { return this._map && wt11(this._image), this; }, bringToBack: function() { return this._map && xt14(this._image), this; }, setUrl: function(t14) { return this._url = t14, this._image && (this._image.src = t14), this; }, setBounds: function(t14) { return this._bounds = Z39(t14), this._map && this._reset(), this; }, getEvents: function() { var t14 = { zoom: this._reset, viewreset: this._reset }; return this._zoomAnimated && (t14.zoomanim = this._animateZoom), t14; }, setZIndex: function(t14) { return this.options.zIndex = t14, this._updateZIndex(), this; }, getBounds: function() { return this._bounds; }, getElement: function() { return this._image; }, _initImage: function() { var t14 = this._url.tagName === "IMG", e15 = this._image = t14 ? this._url : T53("img"); if (v43(e15, "leaflet-image-layer"), this._zoomAnimated && v43(e15, "leaflet-zoom-animated"), this.options.className && v43(e15, this.options.className), e15.onselectstart = E58, e15.onmousemove = E58, e15.onload = b45(this.fire, this, "load"), e15.onerror = b45(this._overlayOnError, this, "error"), (this.options.crossOrigin || this.options.crossOrigin === "") && (e15.crossOrigin = this.options.crossOrigin === true ? "" : this.options.crossOrigin), this.options.zIndex && this._updateZIndex(), t14) { this._url = e15.src; return; } e15.src = this._url, e15.alt = this.options.alt; }, _animateZoom: function(t14) { var e15 = this._map.getZoomScale(t14.zoom), i20 = this._map._latLngBoundsToNewLayerBounds(this._bounds, t14.zoom, t14.center).min; _t14(this._image, i20, e15); }, _reset: function() { var t14 = this._image, e15 = new z47(this._map.latLngToLayerPoint(this._bounds.getNorthWest()), this._map.latLngToLayerPoint(this._bounds.getSouthEast())), i20 = e15.getSize(); I50(t14, e15.min), t14.style.width = i20.x + "px", t14.style.height = i20.y + "px"; }, _updateOpacity: function() { q53(this._image, this.options.opacity); }, _updateZIndex: function() { this._image && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._image.style.zIndex = this.options.zIndex); }, _overlayOnError: function() { this.fire("error"); var t14 = this.options.errorOverlayUrl; t14 && this._url !== t14 && (this._url = t14, this._image.src = t14); }, getCenter: function() { return this._bounds.getCenter(); } }), Mo5 = function(t14, e15, i20) { return new se27(t14, e15, i20); }, Yi4 = se27.extend({ options: { autoplay: true, loop: true, keepAspectRatio: true, muted: false, playsInline: true }, _initImage: function() { var t14 = this._url.tagName === "VIDEO", e15 = this._image = t14 ? this._url : T53("video"); if (v43(e15, "leaflet-image-layer"), this._zoomAnimated && v43(e15, "leaflet-zoom-animated"), this.options.className && v43(e15, this.options.className), e15.onselectstart = E58, e15.onmousemove = E58, e15.onloadeddata = b45(this.fire, this, "load"), t14) { for (var i20 = e15.getElementsByTagName("source"), n24 = [], o27 = 0; o27 < i20.length; o27++) n24.push(i20[o27].src); this._url = i20.length > 0 ? n24 : [e15.src]; return; } Y43(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(e15.style, "objectFit") && (e15.style.objectFit = "fill"), e15.autoplay = !!this.options.autoplay, e15.loop = !!this.options.loop, e15.muted = !!this.options.muted, e15.playsInline = !!this.options.playsInline; for (var s38 = 0; s38 < this._url.length; s38++) { var r19 = T53("source"); r19.src = this._url[s38], e15.appendChild(r19); } } }); function Co4(t14, e15, i20) { return new Yi4(t14, e15, i20); } var Ji3 = se27.extend({ _initImage: function() { var t14 = this._image = this._url; v43(t14, "leaflet-image-layer"), this._zoomAnimated && v43(t14, "leaflet-zoom-animated"), this.options.className && v43(t14, this.options.className), t14.onselectstart = E58, t14.onmousemove = E58; } }); function So4(t14, e15, i20) { return new Ji3(t14, e15, i20); } var it14 = X43.extend({ options: { interactive: false, offset: [0, 0], className: "", pane: void 0, content: "" }, initialize: function(t14, e15) { t14 && (t14 instanceof M50 || Y43(t14)) ? (this._latlng = y53(t14), S60(this, e15)) : (S60(this, t14), this._source = e15), this.options.content && (this._content = this.options.content); }, openOn: function(t14) { return t14 = arguments.length ? t14 : this._source._map, t14.hasLayer(this) || t14.addLayer(this), this; }, close: function() { return this._map && this._map.removeLayer(this), this; }, toggle: function(t14) { return this._map ? this.close() : (arguments.length ? this._source = t14 : t14 = this._source, this._prepareOpen(), this.openOn(t14._map)), this; }, onAdd: function(t14) { this._zoomAnimated = t14._zoomAnimated, this._container || this._initLayout(), t14._fadeAnimated && q53(this._container, 0), clearTimeout(this._removeTimeout), this.getPane().appendChild(this._container), this.update(), t14._fadeAnimated && q53(this._container, 1), this.bringToFront(), this.options.interactive && (v43(this._container, "leaflet-interactive"), this.addInteractiveTarget(this._container)); }, onRemove: function(t14) { t14._fadeAnimated ? (q53(this._container, 0), this._removeTimeout = setTimeout(b45(k51, void 0, this._container), 200)) : k51(this._container), this.options.interactive && (O53(this._container, "leaflet-interactive"), this.removeInteractiveTarget(this._container)); }, getLatLng: function() { return this._latlng; }, setLatLng: function(t14) { return this._latlng = y53(t14), this._map && (this._updatePosition(), this._adjustPan()), this; }, getContent: function() { return this._content; }, setContent: function(t14) { return this._content = t14, this.update(), this; }, getElement: function() { return this._container; }, update: function() { this._map && (this._container.style.visibility = "hidden", this._updateContent(), this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan()); }, getEvents: function() { var t14 = { zoom: this._updatePosition, viewreset: this._updatePosition }; return this._zoomAnimated && (t14.zoomanim = this._animateZoom), t14; }, isOpen: function() { return !!this._map && this._map.hasLayer(this); }, bringToFront: function() { return this._map && wt11(this._container), this; }, bringToBack: function() { return this._map && xt14(this._container), this; }, _prepareOpen: function(t14) { var e15 = this._source; if (!e15._map) return false; if (e15 instanceof st16) { e15 = null; var i20 = this._source._layers; for (var n24 in i20) if (i20[n24]._map) { e15 = i20[n24]; break; } if (!e15) return false; this._source = e15; } if (!t14) if (e15.getCenter) t14 = e15.getCenter(); else if (e15.getLatLng) t14 = e15.getLatLng(); else if (e15.getBounds) t14 = e15.getBounds().getCenter(); else throw new Error("Unable to get source layer LatLng."); return this.setLatLng(t14), this._map && this.update(), true; }, _updateContent: function() { if (this._content) { var t14 = this._contentNode, e15 = typeof this._content == "function" ? this._content(this._source || this) : this._content; if (typeof e15 == "string") t14.innerHTML = e15; else { for (; t14.hasChildNodes(); ) t14.removeChild(t14.firstChild); t14.appendChild(e15); } this.fire("contentupdate"); } }, _updatePosition: function() { if (this._map) { var t14 = this._map.latLngToLayerPoint(this._latlng), e15 = _48(this.options.offset), i20 = this._getAnchor(); this._zoomAnimated ? I50(this._container, t14.add(i20)) : e15 = e15.add(t14).add(i20); var n24 = this._containerBottom = -e15.y, o27 = this._containerLeft = -Math.round(this._containerWidth / 2) + e15.x; this._container.style.bottom = n24 + "px", this._container.style.left = o27 + "px"; } }, _getAnchor: function() { return [0, 0]; } }); w44.include({ _initOverlay: function(t14, e15, i20, n24) { var o27 = e15; return o27 instanceof t14 || (o27 = new t14(n24).setContent(e15)), i20 && o27.setLatLng(i20), o27; } }), X43.include({ _initOverlay: function(t14, e15, i20, n24) { var o27 = i20; return o27 instanceof t14 ? (S60(o27, n24), o27._source = this) : (o27 = e15 && !n24 ? e15 : new t14(n24, this), o27.setContent(i20)), o27; } }); var re29 = it14.extend({ options: { pane: "popupPane", offset: [0, 7], maxWidth: 300, minWidth: 50, maxHeight: null, autoPan: true, autoPanPaddingTopLeft: null, autoPanPaddingBottomRight: null, autoPanPadding: [5, 5], keepInView: false, closeButton: true, autoClose: true, closeOnEscapeKey: true, className: "" }, openOn: function(t14) { return t14 = arguments.length ? t14 : this._source._map, !t14.hasLayer(this) && t14._popup && t14._popup.options.autoClose && t14.removeLayer(t14._popup), t14._popup = this, it14.prototype.openOn.call(this, t14); }, onAdd: function(t14) { it14.prototype.onAdd.call(this, t14), t14.fire("popupopen", { popup: this }), this._source && (this._source.fire("popupopen", { popup: this }, true), this._source instanceof ct16 || this._source.on("preclick", pt13)); }, onRemove: function(t14) { it14.prototype.onRemove.call(this, t14), t14.fire("popupclose", { popup: this }), this._source && (this._source.fire("popupclose", { popup: this }, true), this._source instanceof ct16 || this._source.off("preclick", pt13)); }, getEvents: function() { var t14 = it14.prototype.getEvents.call(this); return (this.options.closeOnClick !== void 0 ? this.options.closeOnClick : this._map.options.closePopupOnClick) && (t14.preclick = this.close), this.options.keepInView && (t14.moveend = this._adjustPan), t14; }, _initLayout: function() { var t14 = "leaflet-popup", e15 = this._container = T53("div", t14 + " " + (this.options.className || "") + " leaflet-zoom-animated"), i20 = this._wrapper = T53("div", t14 + "-content-wrapper", e15); if (this._contentNode = T53("div", t14 + "-content", i20), Nt11(e15), Ne20(this._contentNode), p37(e15, "contextmenu", pt13), this._tipContainer = T53("div", t14 + "-tip-container", e15), this._tip = T53("div", t14 + "-tip", this._tipContainer), this.options.closeButton) { var n24 = this._closeButton = T53("a", t14 + "-close-button", e15); n24.setAttribute("role", "button"), n24.setAttribute("aria-label", "Close popup"), n24.href = "#close", n24.innerHTML = '', p37(n24, "click", function(o27) { R49(o27), this.close(); }, this); } }, _updateLayout: function() { var t14 = this._contentNode, e15 = t14.style; e15.width = "", e15.whiteSpace = "nowrap"; var i20 = t14.offsetWidth; i20 = Math.min(i20, this.options.maxWidth), i20 = Math.max(i20, this.options.minWidth), e15.width = i20 + 1 + "px", e15.whiteSpace = "", e15.height = ""; var n24 = t14.offsetHeight, o27 = this.options.maxHeight, s38 = "leaflet-popup-scrolled"; o27 && n24 > o27 ? (e15.height = o27 + "px", v43(t14, s38)) : O53(t14, s38), this._containerWidth = this._container.offsetWidth; }, _animateZoom: function(t14) { var e15 = this._map._latLngToNewLayerPoint(this._latlng, t14.zoom, t14.center), i20 = this._getAnchor(); I50(this._container, e15.add(i20)); }, _adjustPan: function() { if (this.options.autoPan) { if (this._map._panAnim && this._map._panAnim.stop(), this._autopanning) { this._autopanning = false; return; } var t14 = this._map, e15 = parseInt(Zt8(this._container, "marginBottom"), 10) || 0, i20 = this._container.offsetHeight + e15, n24 = this._containerWidth, o27 = new m37(this._containerLeft, -i20 - this._containerBottom); o27._add(mt11(this._container)); var s38 = t14.layerPointToContainerPoint(o27), r19 = _48(this.options.autoPanPadding), a36 = _48(this.options.autoPanPaddingTopLeft || r19), h46 = _48(this.options.autoPanPaddingBottomRight || r19), u36 = t14.getSize(), c25 = 0, d31 = 0; s38.x + n24 + h46.x > u36.x && (c25 = s38.x + n24 - u36.x + h46.x), s38.x - c25 - a36.x < 0 && (c25 = s38.x - a36.x), s38.y + i20 + h46.y > u36.y && (d31 = s38.y + i20 - u36.y + h46.y), s38.y - d31 - a36.y < 0 && (d31 = s38.y - a36.y), (c25 || d31) && (this.options.keepInView && (this._autopanning = true), t14.fire("autopanstart").panBy([c25, d31])); } }, _getAnchor: function() { return _48(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]); } }), zo6 = function(t14, e15) { return new re29(t14, e15); }; w44.mergeOptions({ closePopupOnClick: true }), w44.include({ openPopup: function(t14, e15, i20) { return this._initOverlay(re29, t14, e15, i20).openOn(this), this; }, closePopup: function(t14) { return t14 = arguments.length ? t14 : this._popup, t14 && t14.close(), this; } }), X43.include({ bindPopup: function(t14, e15) { return this._popup = this._initOverlay(re29, this._popup, t14, e15), this._popupHandlersAdded || (this.on({ click: this._openPopup, keypress: this._onKeyPress, remove: this.closePopup, move: this._movePopup }), this._popupHandlersAdded = true), this; }, unbindPopup: function() { return this._popup && (this.off({ click: this._openPopup, keypress: this._onKeyPress, remove: this.closePopup, move: this._movePopup }), this._popupHandlersAdded = false, this._popup = null), this; }, openPopup: function(t14) { return this._popup && (this instanceof st16 || (this._popup._source = this), this._popup._prepareOpen(t14 || this._latlng) && this._popup.openOn(this._map)), this; }, closePopup: function() { return this._popup && this._popup.close(), this; }, togglePopup: function() { return this._popup && this._popup.toggle(this), this; }, isPopupOpen: function() { return this._popup ? this._popup.isOpen() : false; }, setPopupContent: function(t14) { return this._popup && this._popup.setContent(t14), this; }, getPopup: function() { return this._popup; }, _openPopup: function(t14) { if (!(!this._popup || !this._map)) { vt12(t14); var e15 = t14.layer || t14.target; if (this._popup._source === e15 && !(e15 instanceof ct16)) { this._map.hasLayer(this._popup) ? this.closePopup() : this.openPopup(t14.latlng); return; } this._popup._source = e15, this.openPopup(t14.latlng); } }, _movePopup: function(t14) { this._popup.setLatLng(t14.latlng); }, _onKeyPress: function(t14) { t14.originalEvent.keyCode === 13 && this._openPopup(t14); } }); var ae31 = it14.extend({ options: { pane: "tooltipPane", offset: [0, 0], direction: "auto", permanent: false, sticky: false, opacity: 0.9 }, onAdd: function(t14) { it14.prototype.onAdd.call(this, t14), this.setOpacity(this.options.opacity), t14.fire("tooltipopen", { tooltip: this }), this._source && (this.addEventParent(this._source), this._source.fire("tooltipopen", { tooltip: this }, true)); }, onRemove: function(t14) { it14.prototype.onRemove.call(this, t14), t14.fire("tooltipclose", { tooltip: this }), this._source && (this.removeEventParent(this._source), this._source.fire("tooltipclose", { tooltip: this }, true)); }, getEvents: function() { var t14 = it14.prototype.getEvents.call(this); return this.options.permanent || (t14.preclick = this.close), t14; }, _initLayout: function() { var t14 = "leaflet-tooltip", e15 = t14 + " " + (this.options.className || "") + " leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"); this._contentNode = this._container = T53("div", e15), this._container.setAttribute("role", "tooltip"), this._container.setAttribute("id", "leaflet-tooltip-" + P43(this)); }, _updateLayout: function() { }, _adjustPan: function() { }, _setPosition: function(t14) { var e15, i20, n24 = this._map, o27 = this._container, s38 = n24.latLngToContainerPoint(n24.getCenter()), r19 = n24.layerPointToContainerPoint(t14), a36 = this.options.direction, h46 = o27.offsetWidth, u36 = o27.offsetHeight, c25 = _48(this.options.offset), d31 = this._getAnchor(); a36 === "top" ? (e15 = h46 / 2, i20 = u36) : a36 === "bottom" ? (e15 = h46 / 2, i20 = 0) : a36 === "center" ? (e15 = h46 / 2, i20 = u36 / 2) : a36 === "right" ? (e15 = 0, i20 = u36 / 2) : a36 === "left" ? (e15 = h46, i20 = u36 / 2) : r19.x < s38.x ? (a36 = "right", e15 = 0, i20 = u36 / 2) : (a36 = "left", e15 = h46 + (c25.x + d31.x) * 2, i20 = u36 / 2), t14 = t14.subtract(_48(e15, i20, true)).add(c25).add(d31), O53(o27, "leaflet-tooltip-right"), O53(o27, "leaflet-tooltip-left"), O53(o27, "leaflet-tooltip-top"), O53(o27, "leaflet-tooltip-bottom"), v43(o27, "leaflet-tooltip-" + a36), I50(o27, t14); }, _updatePosition: function() { var t14 = this._map.latLngToLayerPoint(this._latlng); this._setPosition(t14); }, setOpacity: function(t14) { this.options.opacity = t14, this._container && q53(this._container, t14); }, _animateZoom: function(t14) { var e15 = this._map._latLngToNewLayerPoint(this._latlng, t14.zoom, t14.center); this._setPosition(e15); }, _getAnchor: function() { return _48(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]); } }), ko5 = function(t14, e15) { return new ae31(t14, e15); }; w44.include({ openTooltip: function(t14, e15, i20) { return this._initOverlay(ae31, t14, e15, i20).openOn(this), this; }, closeTooltip: function(t14) { return t14.close(), this; } }), X43.include({ bindTooltip: function(t14, e15) { return this._tooltip && this.isTooltipOpen() && this.unbindTooltip(), this._tooltip = this._initOverlay(ae31, this._tooltip, t14, e15), this._initTooltipInteractions(), this._tooltip.options.permanent && this._map && this._map.hasLayer(this) && this.openTooltip(), this; }, unbindTooltip: function() { return this._tooltip && (this._initTooltipInteractions(true), this.closeTooltip(), this._tooltip = null), this; }, _initTooltipInteractions: function(t14) { if (!(!t14 && this._tooltipHandlersAdded)) { var e15 = t14 ? "off" : "on", i20 = { remove: this.closeTooltip, move: this._moveTooltip }; this._tooltip.options.permanent ? i20.add = this._openTooltip : (i20.mouseover = this._openTooltip, i20.mouseout = this.closeTooltip, i20.click = this._openTooltip, this._map ? this._addFocusListeners() : i20.add = this._addFocusListeners), this._tooltip.options.sticky && (i20.mousemove = this._moveTooltip), this[e15](i20), this._tooltipHandlersAdded = !t14; } }, openTooltip: function(t14) { return this._tooltip && (this instanceof st16 || (this._tooltip._source = this), this._tooltip._prepareOpen(t14) && (this._tooltip.openOn(this._map), this.getElement ? this._setAriaDescribedByOnLayer(this) : this.eachLayer && this.eachLayer(this._setAriaDescribedByOnLayer, this))), this; }, closeTooltip: function() { if (this._tooltip) return this._tooltip.close(); }, toggleTooltip: function() { return this._tooltip && this._tooltip.toggle(this), this; }, isTooltipOpen: function() { return this._tooltip.isOpen(); }, setTooltipContent: function(t14) { return this._tooltip && this._tooltip.setContent(t14), this; }, getTooltip: function() { return this._tooltip; }, _addFocusListeners: function() { this.getElement ? this._addFocusListenersOnLayer(this) : this.eachLayer && this.eachLayer(this._addFocusListenersOnLayer, this); }, _addFocusListenersOnLayer: function(t14) { var e15 = typeof t14.getElement == "function" && t14.getElement(); e15 && (p37(e15, "focus", function() { this._tooltip._source = t14, this.openTooltip(); }, this), p37(e15, "blur", this.closeTooltip, this)); }, _setAriaDescribedByOnLayer: function(t14) { var e15 = typeof t14.getElement == "function" && t14.getElement(); e15 && e15.setAttribute("aria-describedby", this._tooltip._container.id); }, _openTooltip: function(t14) { if (!(!this._tooltip || !this._map)) { if (this._map.dragging && this._map.dragging.moving() && !this._openOnceFlag) { this._openOnceFlag = true; var e15 = this; this._map.once("moveend", function() { e15._openOnceFlag = false, e15._openTooltip(t14); }); return; } this._tooltip._source = t14.layer || t14.target, this.openTooltip(this._tooltip.options.sticky ? t14.latlng : void 0); } }, _moveTooltip: function(t14) { var e15 = t14.latlng, i20, n24; this._tooltip.options.sticky && t14.originalEvent && (i20 = this._map.mouseEventToContainerPoint(t14.originalEvent), n24 = this._map.containerPointToLayerPoint(i20), e15 = this._map.layerPointToLatLng(n24)), this._tooltip.setLatLng(e15); } }); var Xi3 = Lt12.extend({ options: { iconSize: [12, 12], html: false, bgPos: null, className: "leaflet-div-icon" }, createIcon: function(t14) { var e15 = t14 && t14.tagName === "DIV" ? t14 : document.createElement("div"), i20 = this.options; if (i20.html instanceof Element ? (jt11(e15), e15.appendChild(i20.html)) : e15.innerHTML = i20.html !== false ? i20.html : "", i20.bgPos) { var n24 = _48(i20.bgPos); e15.style.backgroundPosition = -n24.x + "px " + -n24.y + "px"; } return this._setIconStyles(e15, "icon"), e15; }, createShadow: function() { return null; } }); function Eo4(t14) { return new Xi3(t14); } Lt12.Default = Ht9; var Ft8 = X43.extend({ options: { tileSize: 256, opacity: 1, updateWhenIdle: f46.mobile, updateWhenZooming: true, updateInterval: 200, zIndex: 1, bounds: null, minZoom: 0, maxZoom: void 0, maxNativeZoom: void 0, minNativeZoom: void 0, noWrap: false, pane: "tilePane", className: "", keepBuffer: 2 }, initialize: function(t14) { S60(this, t14); }, onAdd: function() { this._initContainer(), this._levels = {}, this._tiles = {}, this._resetView(); }, beforeAdd: function(t14) { t14._addZoomLimit(this); }, onRemove: function(t14) { this._removeAllTiles(), k51(this._container), t14._removeZoomLimit(this), this._container = null, this._tileZoom = void 0; }, bringToFront: function() { return this._map && (wt11(this._container), this._setAutoZIndex(Math.max)), this; }, bringToBack: function() { return this._map && (xt14(this._container), this._setAutoZIndex(Math.min)), this; }, getContainer: function() { return this._container; }, setOpacity: function(t14) { return this.options.opacity = t14, this._updateOpacity(), this; }, setZIndex: function(t14) { return this.options.zIndex = t14, this._updateZIndex(), this; }, isLoading: function() { return this._loading; }, redraw: function() { if (this._map) { this._removeAllTiles(); var t14 = this._clampZoom(this._map.getZoom()); t14 !== this._tileZoom && (this._tileZoom = t14, this._updateLevels()), this._update(); } return this; }, getEvents: function() { var t14 = { viewprereset: this._invalidateAll, viewreset: this._resetView, zoom: this._resetView, moveend: this._onMoveEnd }; return this.options.updateWhenIdle || (this._onMove || (this._onMove = Xe14(this._onMoveEnd, this.options.updateInterval, this)), t14.move = this._onMove), this._zoomAnimated && (t14.zoomanim = this._animateZoom), t14; }, createTile: function() { return document.createElement("div"); }, getTileSize: function() { var t14 = this.options.tileSize; return t14 instanceof m37 ? t14 : new m37(t14, t14); }, _updateZIndex: function() { this._container && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._container.style.zIndex = this.options.zIndex); }, _setAutoZIndex: function(t14) { for (var e15 = this.getPane().children, i20 = -t14(-1 / 0, 1 / 0), n24 = 0, o27 = e15.length, s38; n24 < o27; n24++) s38 = e15[n24].style.zIndex, e15[n24] !== this._container && s38 && (i20 = t14(i20, +s38)); isFinite(i20) && (this.options.zIndex = i20 + t14(-1, 1), this._updateZIndex()); }, _updateOpacity: function() { if (this._map && !f46.ielt9) { q53(this._container, this.options.opacity); var t14 = +/* @__PURE__ */ new Date(), e15 = false, i20 = false; for (var n24 in this._tiles) { var o27 = this._tiles[n24]; if (!(!o27.current || !o27.loaded)) { var s38 = Math.min(1, (t14 - o27.loaded) / 200); q53(o27.el, s38), s38 < 1 ? e15 = true : (o27.active ? i20 = true : this._onOpaqueTile(o27), o27.active = true); } } i20 && !this._noPrune && this._pruneTiles(), e15 && (V34(this._fadeFrame), this._fadeFrame = H43(this._updateOpacity, this)); } }, _onOpaqueTile: E58, _initContainer: function() { this._container || (this._container = T53("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container)); }, _updateLevels: function() { var t14 = this._tileZoom, e15 = this.options.maxZoom; if (t14 !== void 0) { for (var i20 in this._levels) i20 = Number(i20), this._levels[i20].el.children.length || i20 === t14 ? (this._levels[i20].el.style.zIndex = e15 - Math.abs(t14 - i20), this._onUpdateLevel(i20)) : (k51(this._levels[i20].el), this._removeTilesAtZoom(i20), this._onRemoveLevel(i20), delete this._levels[i20]); var n24 = this._levels[t14], o27 = this._map; return n24 || (n24 = this._levels[t14] = {}, n24.el = T53("div", "leaflet-tile-container leaflet-zoom-animated", this._container), n24.el.style.zIndex = e15, n24.origin = o27.project(o27.unproject(o27.getPixelOrigin()), t14).round(), n24.zoom = t14, this._setZoomTransform(n24, o27.getCenter(), o27.getZoom()), E58(n24.el.offsetWidth), this._onCreateLevel(n24)), this._level = n24, n24; } }, _onUpdateLevel: E58, _onRemoveLevel: E58, _onCreateLevel: E58, _pruneTiles: function() { if (this._map) { var t14, e15, i20 = this._map.getZoom(); if (i20 > this.options.maxZoom || i20 < this.options.minZoom) { this._removeAllTiles(); return; } for (t14 in this._tiles) e15 = this._tiles[t14], e15.retain = e15.current; for (t14 in this._tiles) if (e15 = this._tiles[t14], e15.current && !e15.active) { var n24 = e15.coords; this._retainParent(n24.x, n24.y, n24.z, n24.z - 5) || this._retainChildren(n24.x, n24.y, n24.z, n24.z + 2); } for (t14 in this._tiles) this._tiles[t14].retain || this._removeTile(t14); } }, _removeTilesAtZoom: function(t14) { for (var e15 in this._tiles) this._tiles[e15].coords.z === t14 && this._removeTile(e15); }, _removeAllTiles: function() { for (var t14 in this._tiles) this._removeTile(t14); }, _invalidateAll: function() { for (var t14 in this._levels) k51(this._levels[t14].el), this._onRemoveLevel(Number(t14)), delete this._levels[t14]; this._removeAllTiles(), this._tileZoom = void 0; }, _retainParent: function(t14, e15, i20, n24) { var o27 = Math.floor(t14 / 2), s38 = Math.floor(e15 / 2), r19 = i20 - 1, a36 = new m37(+o27, +s38); a36.z = +r19; var h46 = this._tileCoordsToKey(a36), u36 = this._tiles[h46]; return u36 && u36.active ? (u36.retain = true, true) : (u36 && u36.loaded && (u36.retain = true), r19 > n24 ? this._retainParent(o27, s38, r19, n24) : false); }, _retainChildren: function(t14, e15, i20, n24) { for (var o27 = 2 * t14; o27 < 2 * t14 + 2; o27++) for (var s38 = 2 * e15; s38 < 2 * e15 + 2; s38++) { var r19 = new m37(o27, s38); r19.z = i20 + 1; var a36 = this._tileCoordsToKey(r19), h46 = this._tiles[a36]; if (h46 && h46.active) { h46.retain = true; continue; } else h46 && h46.loaded && (h46.retain = true); i20 + 1 < n24 && this._retainChildren(o27, s38, i20 + 1, n24); } }, _resetView: function(t14) { var e15 = t14 && (t14.pinch || t14.flyTo); this._setView(this._map.getCenter(), this._map.getZoom(), e15, e15); }, _animateZoom: function(t14) { this._setView(t14.center, t14.zoom, true, t14.noUpdate); }, _clampZoom: function(t14) { var e15 = this.options; return e15.minNativeZoom !== void 0 && t14 < e15.minNativeZoom ? e15.minNativeZoom : e15.maxNativeZoom !== void 0 && e15.maxNativeZoom < t14 ? e15.maxNativeZoom : t14; }, _setView: function(t14, e15, i20, n24) { var o27 = Math.round(e15); this.options.maxZoom !== void 0 && o27 > this.options.maxZoom || this.options.minZoom !== void 0 && o27 < this.options.minZoom ? o27 = void 0 : o27 = this._clampZoom(o27); var s38 = this.options.updateWhenZooming && o27 !== this._tileZoom; (!n24 || s38) && (this._tileZoom = o27, this._abortLoading && this._abortLoading(), this._updateLevels(), this._resetGrid(), o27 !== void 0 && this._update(t14), i20 || this._pruneTiles(), this._noPrune = !!i20), this._setZoomTransforms(t14, e15); }, _setZoomTransforms: function(t14, e15) { for (var i20 in this._levels) this._setZoomTransform(this._levels[i20], t14, e15); }, _setZoomTransform: function(t14, e15, i20) { var n24 = this._map.getZoomScale(i20, t14.zoom), o27 = t14.origin.multiplyBy(n24).subtract(this._map._getNewPixelOrigin(e15, i20)).round(); f46.any3d ? _t14(t14.el, o27, n24) : I50(t14.el, o27); }, _resetGrid: function() { var t14 = this._map, e15 = t14.options.crs, i20 = this._tileSize = this.getTileSize(), n24 = this._tileZoom, o27 = this._map.getPixelWorldBounds(this._tileZoom); o27 && (this._globalTileRange = this._pxBoundsToTileRange(o27)), this._wrapX = e15.wrapLng && !this.options.noWrap && [Math.floor(t14.project([0, e15.wrapLng[0]], n24).x / i20.x), Math.ceil(t14.project([0, e15.wrapLng[1]], n24).x / i20.y)], this._wrapY = e15.wrapLat && !this.options.noWrap && [Math.floor(t14.project([e15.wrapLat[0], 0], n24).y / i20.x), Math.ceil(t14.project([e15.wrapLat[1], 0], n24).y / i20.y)]; }, _onMoveEnd: function() { !this._map || this._map._animatingZoom || this._update(); }, _getTiledPixelBounds: function(t14) { var e15 = this._map, i20 = e15._animatingZoom ? Math.max(e15._animateToZoom, e15.getZoom()) : e15.getZoom(), n24 = e15.getZoomScale(i20, this._tileZoom), o27 = e15.project(t14, this._tileZoom).floor(), s38 = e15.getSize().divideBy(n24 * 2); return new z47(o27.subtract(s38), o27.add(s38)); }, _update: function(t14) { var e15 = this._map; if (e15) { var i20 = this._clampZoom(e15.getZoom()); if (t14 === void 0 && (t14 = e15.getCenter()), this._tileZoom !== void 0) { var n24 = this._getTiledPixelBounds(t14), o27 = this._pxBoundsToTileRange(n24), s38 = o27.getCenter(), r19 = [], a36 = this.options.keepBuffer, h46 = new z47(o27.getBottomLeft().subtract([a36, -a36]), o27.getTopRight().add([a36, -a36])); if (!(isFinite(o27.min.x) && isFinite(o27.min.y) && isFinite(o27.max.x) && isFinite(o27.max.y))) throw new Error("Attempted to load an infinite number of tiles"); for (var u36 in this._tiles) { var c25 = this._tiles[u36].coords; (c25.z !== this._tileZoom || !h46.contains(new m37(c25.x, c25.y))) && (this._tiles[u36].current = false); } if (Math.abs(i20 - this._tileZoom) > 1) { this._setView(t14, i20); return; } for (var d31 = o27.min.y; d31 <= o27.max.y; d31++) for (var g45 = o27.min.x; g45 <= o27.max.x; g45++) { var D54 = new m37(g45, d31); if (D54.z = this._tileZoom, !!this._isValidTile(D54)) { var N56 = this._tiles[this._tileCoordsToKey(D54)]; N56 ? N56.current = true : r19.push(D54); } } if (r19.sort(function(U37, Ct13) { return U37.distanceTo(s38) - Ct13.distanceTo(s38); }), r19.length !== 0) { this._loading || (this._loading = true, this.fire("loading")); var K45 = document.createDocumentFragment(); for (g45 = 0; g45 < r19.length; g45++) this._addTile(r19[g45], K45); this._level.el.appendChild(K45); } } } }, _isValidTile: function(t14) { var e15 = this._map.options.crs; if (!e15.infinite) { var i20 = this._globalTileRange; if (!e15.wrapLng && (t14.x < i20.min.x || t14.x > i20.max.x) || !e15.wrapLat && (t14.y < i20.min.y || t14.y > i20.max.y)) return false; } if (!this.options.bounds) return true; var n24 = this._tileCoordsToBounds(t14); return Z39(this.options.bounds).overlaps(n24); }, _keyToBounds: function(t14) { return this._tileCoordsToBounds(this._keyToTileCoords(t14)); }, _tileCoordsToNwSe: function(t14) { var e15 = this._map, i20 = this.getTileSize(), n24 = t14.scaleBy(i20), o27 = n24.add(i20), s38 = e15.unproject(n24, t14.z), r19 = e15.unproject(o27, t14.z); return [s38, r19]; }, _tileCoordsToBounds: function(t14) { var e15 = this._tileCoordsToNwSe(t14), i20 = new W39(e15[0], e15[1]); return this.options.noWrap || (i20 = this._map.wrapLatLngBounds(i20)), i20; }, _tileCoordsToKey: function(t14) { return t14.x + ":" + t14.y + ":" + t14.z; }, _keyToTileCoords: function(t14) { var e15 = t14.split(":"), i20 = new m37(+e15[0], +e15[1]); return i20.z = +e15[2], i20; }, _removeTile: function(t14) { var e15 = this._tiles[t14]; e15 && (k51(e15.el), delete this._tiles[t14], this.fire("tileunload", { tile: e15.el, coords: this._keyToTileCoords(t14) })); }, _initTile: function(t14) { v43(t14, "leaflet-tile"); var e15 = this.getTileSize(); t14.style.width = e15.x + "px", t14.style.height = e15.y + "px", t14.onselectstart = E58, t14.onmousemove = E58, f46.ielt9 && this.options.opacity < 1 && q53(t14, this.options.opacity); }, _addTile: function(t14, e15) { var i20 = this._getTilePos(t14), n24 = this._tileCoordsToKey(t14), o27 = this.createTile(this._wrapCoords(t14), b45(this._tileReady, this, t14)); this._initTile(o27), this.createTile.length < 2 && H43(b45(this._tileReady, this, t14, null, o27)), I50(o27, i20), this._tiles[n24] = { el: o27, coords: t14, current: true }, e15.appendChild(o27), this.fire("tileloadstart", { tile: o27, coords: t14 }); }, _tileReady: function(t14, e15, i20) { e15 && this.fire("tileerror", { error: e15, tile: i20, coords: t14 }); var n24 = this._tileCoordsToKey(t14); i20 = this._tiles[n24], i20 && (i20.loaded = +/* @__PURE__ */ new Date(), this._map._fadeAnimated ? (q53(i20.el, 0), V34(this._fadeFrame), this._fadeFrame = H43(this._updateOpacity, this)) : (i20.active = true, this._pruneTiles()), e15 || (v43(i20.el, "leaflet-tile-loaded"), this.fire("tileload", { tile: i20.el, coords: t14 })), this._noTilesToLoad() && (this._loading = false, this.fire("load"), f46.ielt9 || !this._map._fadeAnimated ? H43(this._pruneTiles, this) : setTimeout(b45(this._pruneTiles, this), 250))); }, _getTilePos: function(t14) { return t14.scaleBy(this.getTileSize()).subtract(this._level.origin); }, _wrapCoords: function(t14) { var e15 = new m37(this._wrapX ? St11(t14.x, this._wrapX) : t14.x, this._wrapY ? St11(t14.y, this._wrapY) : t14.y); return e15.z = t14.z, e15; }, _pxBoundsToTileRange: function(t14) { var e15 = this.getTileSize(); return new z47(t14.min.unscaleBy(e15).floor(), t14.max.unscaleBy(e15).ceil().subtract([1, 1])); }, _noTilesToLoad: function() { for (var t14 in this._tiles) if (!this._tiles[t14].loaded) return false; return true; } }); function Oo4(t14) { return new Ft8(t14); } var Mt14 = Ft8.extend({ options: { minZoom: 0, maxZoom: 18, subdomains: "abc", errorTileUrl: "", zoomOffset: 0, tms: false, zoomReverse: false, detectRetina: false, crossOrigin: false, referrerPolicy: false }, initialize: function(t14, e15) { this._url = t14, e15 = S60(this, e15), e15.detectRetina && f46.retina && e15.maxZoom > 0 ? (e15.tileSize = Math.floor(e15.tileSize / 2), e15.zoomReverse ? (e15.zoomOffset--, e15.minZoom = Math.min(e15.maxZoom, e15.minZoom + 1)) : (e15.zoomOffset++, e15.maxZoom = Math.max(e15.minZoom, e15.maxZoom - 1)), e15.minZoom = Math.max(0, e15.minZoom)) : e15.zoomReverse ? e15.minZoom = Math.min(e15.maxZoom, e15.minZoom) : e15.maxZoom = Math.max(e15.minZoom, e15.maxZoom), typeof e15.subdomains == "string" && (e15.subdomains = e15.subdomains.split("")), this.on("tileunload", this._onTileRemove); }, setUrl: function(t14, e15) { return this._url === t14 && e15 === void 0 && (e15 = true), this._url = t14, e15 || this.redraw(), this; }, createTile: function(t14, e15) { var i20 = document.createElement("img"); return p37(i20, "load", b45(this._tileOnLoad, this, e15, i20)), p37(i20, "error", b45(this._tileOnError, this, e15, i20)), (this.options.crossOrigin || this.options.crossOrigin === "") && (i20.crossOrigin = this.options.crossOrigin === true ? "" : this.options.crossOrigin), typeof this.options.referrerPolicy == "string" && (i20.referrerPolicy = this.options.referrerPolicy), i20.alt = "", i20.src = this.getTileUrl(t14), i20; }, getTileUrl: function(t14) { var e15 = { r: f46.retina ? "@2x" : "", s: this._getSubdomain(t14), x: t14.x, y: t14.y, z: this._getZoomForUrl() }; if (this._map && !this._map.options.crs.infinite) { var i20 = this._globalTileRange.max.y - t14.y; this.options.tms && (e15.y = i20), e15["-y"] = i20; } return Qe13(this._url, x50(e15, this.options)); }, _tileOnLoad: function(t14, e15) { f46.ielt9 ? setTimeout(b45(t14, this, null, e15), 0) : t14(null, e15); }, _tileOnError: function(t14, e15, i20) { var n24 = this.options.errorTileUrl; n24 && e15.getAttribute("src") !== n24 && (e15.src = n24), t14(i20, e15); }, _onTileRemove: function(t14) { t14.tile.onload = null; }, _getZoomForUrl: function() { var t14 = this._tileZoom, e15 = this.options.maxZoom, i20 = this.options.zoomReverse, n24 = this.options.zoomOffset; return i20 && (t14 = e15 - t14), t14 + n24; }, _getSubdomain: function(t14) { var e15 = Math.abs(t14.x + t14.y) % this.options.subdomains.length; return this.options.subdomains[e15]; }, _abortLoading: function() { var t14, e15; for (t14 in this._tiles) if (this._tiles[t14].coords.z !== this._tileZoom && (e15 = this._tiles[t14].el, e15.onload = E58, e15.onerror = E58, !e15.complete)) { e15.src = Gt7; var i20 = this._tiles[t14].coords; k51(e15), delete this._tiles[t14], this.fire("tileabort", { tile: e15, coords: i20 }); } }, _removeTile: function(t14) { var e15 = this._tiles[t14]; if (e15) return e15.el.setAttribute("src", Gt7), Ft8.prototype._removeTile.call(this, t14); }, _tileReady: function(t14, e15, i20) { if (!(!this._map || i20 && i20.getAttribute("src") === Gt7)) return Ft8.prototype._tileReady.call(this, t14, e15, i20); } }); function $i3(t14, e15) { return new Mt14(t14, e15); } var Qi3 = Mt14.extend({ defaultWmsParams: { service: "WMS", request: "GetMap", layers: "", styles: "", format: "image/jpeg", transparent: false, version: "1.1.1" }, options: { crs: null, uppercase: false }, initialize: function(t14, e15) { this._url = t14; var i20 = x50({}, this.defaultWmsParams); for (var n24 in e15) n24 in this.options || (i20[n24] = e15[n24]); e15 = S60(this, e15); var o27 = e15.detectRetina && f46.retina ? 2 : 1, s38 = this.getTileSize(); i20.width = s38.x * o27, i20.height = s38.y * o27, this.wmsParams = i20; }, onAdd: function(t14) { this._crs = this.options.crs || t14.options.crs, this._wmsVersion = parseFloat(this.wmsParams.version); var e15 = this._wmsVersion >= 1.3 ? "crs" : "srs"; this.wmsParams[e15] = this._crs.code, Mt14.prototype.onAdd.call(this, t14); }, getTileUrl: function(t14) { var e15 = this._tileCoordsToNwSe(t14), i20 = this._crs, n24 = F40(i20.project(e15[0]), i20.project(e15[1])), o27 = n24.min, s38 = n24.max, r19 = (this._wmsVersion >= 1.3 && this._crs === Vi4 ? [o27.y, o27.x, s38.y, s38.x] : [o27.x, o27.y, s38.x, s38.y]).join(","), a36 = Mt14.prototype.getTileUrl.call(this, t14); return a36 + $e13(this.wmsParams, a36, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + r19; }, setParams: function(t14, e15) { return x50(this.wmsParams, t14), e15 || this.redraw(), this; } }); function Zo4(t14, e15) { return new Qi3(t14, e15); } Mt14.WMS = Qi3, $i3.wms = Zo4; var ht11 = X43.extend({ options: { padding: 0.1 }, initialize: function(t14) { S60(this, t14), P43(this), this._layers = this._layers || {}; }, onAdd: function() { this._container || (this._initContainer(), v43(this._container, "leaflet-zoom-animated")), this.getPane().appendChild(this._container), this._update(), this.on("update", this._updatePaths, this); }, onRemove: function() { this.off("update", this._updatePaths, this), this._destroyContainer(); }, getEvents: function() { var t14 = { viewreset: this._reset, zoom: this._onZoom, moveend: this._update, zoomend: this._onZoomEnd }; return this._zoomAnimated && (t14.zoomanim = this._onAnimZoom), t14; }, _onAnimZoom: function(t14) { this._updateTransform(t14.center, t14.zoom); }, _onZoom: function() { this._updateTransform(this._map.getCenter(), this._map.getZoom()); }, _updateTransform: function(t14, e15) { var i20 = this._map.getZoomScale(e15, this._zoom), n24 = this._map.getSize().multiplyBy(0.5 + this.options.padding), o27 = this._map.project(this._center, e15), s38 = n24.multiplyBy(-i20).add(o27).subtract(this._map._getNewPixelOrigin(t14, e15)); f46.any3d ? _t14(this._container, s38, i20) : I50(this._container, s38); }, _reset: function() { this._update(), this._updateTransform(this._center, this._zoom); for (var t14 in this._layers) this._layers[t14]._reset(); }, _onZoomEnd: function() { for (var t14 in this._layers) this._layers[t14]._project(); }, _updatePaths: function() { for (var t14 in this._layers) this._layers[t14]._update(); }, _update: function() { var t14 = this.options.padding, e15 = this._map.getSize(), i20 = this._map.containerPointToLayerPoint(e15.multiplyBy(-t14)).round(); this._bounds = new z47(i20, i20.add(e15.multiplyBy(1 + t14 * 2)).round()), this._center = this._map.getCenter(), this._zoom = this._map.getZoom(); } }), tn5 = ht11.extend({ options: { tolerance: 0 }, getEvents: function() { var t14 = ht11.prototype.getEvents.call(this); return t14.viewprereset = this._onViewPreReset, t14; }, _onViewPreReset: function() { this._postponeUpdatePaths = true; }, onAdd: function() { ht11.prototype.onAdd.call(this), this._draw(); }, _initContainer: function() { var t14 = this._container = document.createElement("canvas"); p37(t14, "mousemove", this._onMouseMove, this), p37(t14, "click dblclick mousedown mouseup contextmenu", this._onClick, this), p37(t14, "mouseout", this._handleMouseOut, this), t14._leaflet_disable_events = true, this._ctx = t14.getContext("2d"); }, _destroyContainer: function() { V34(this._redrawRequest), delete this._ctx, k51(this._container), C39(this._container), delete this._container; }, _updatePaths: function() { if (!this._postponeUpdatePaths) { var t14; this._redrawBounds = null; for (var e15 in this._layers) t14 = this._layers[e15], t14._update(); this._redraw(); } }, _update: function() { if (!(this._map._animatingZoom && this._bounds)) { ht11.prototype._update.call(this); var t14 = this._bounds, e15 = this._container, i20 = t14.getSize(), n24 = f46.retina ? 2 : 1; I50(e15, t14.min), e15.width = n24 * i20.x, e15.height = n24 * i20.y, e15.style.width = i20.x + "px", e15.style.height = i20.y + "px", f46.retina && this._ctx.scale(2, 2), this._ctx.translate(-t14.min.x, -t14.min.y), this.fire("update"); } }, _reset: function() { ht11.prototype._reset.call(this), this._postponeUpdatePaths && (this._postponeUpdatePaths = false, this._updatePaths()); }, _initPath: function(t14) { this._updateDashArray(t14), this._layers[P43(t14)] = t14; var e15 = t14._order = { layer: t14, prev: this._drawLast, next: null }; this._drawLast && (this._drawLast.next = e15), this._drawLast = e15, this._drawFirst = this._drawFirst || this._drawLast; }, _addPath: function(t14) { this._requestRedraw(t14); }, _removePath: function(t14) { var e15 = t14._order, i20 = e15.next, n24 = e15.prev; i20 ? i20.prev = n24 : this._drawLast = n24, n24 ? n24.next = i20 : this._drawFirst = i20, delete t14._order, delete this._layers[P43(t14)], this._requestRedraw(t14); }, _updatePath: function(t14) { this._extendRedrawBounds(t14), t14._project(), t14._update(), this._requestRedraw(t14); }, _updateStyle: function(t14) { this._updateDashArray(t14), this._requestRedraw(t14); }, _updateDashArray: function(t14) { if (typeof t14.options.dashArray == "string") { var e15 = t14.options.dashArray.split(/[, ]+/), i20 = [], n24, o27; for (o27 = 0; o27 < e15.length; o27++) { if (n24 = Number(e15[o27]), isNaN(n24)) return; i20.push(n24); } t14.options._dashArray = i20; } else t14.options._dashArray = t14.options.dashArray; }, _requestRedraw: function(t14) { this._map && (this._extendRedrawBounds(t14), this._redrawRequest = this._redrawRequest || H43(this._redraw, this)); }, _extendRedrawBounds: function(t14) { if (t14._pxBounds) { var e15 = (t14.options.weight || 0) + 1; this._redrawBounds = this._redrawBounds || new z47(), this._redrawBounds.extend(t14._pxBounds.min.subtract([e15, e15])), this._redrawBounds.extend(t14._pxBounds.max.add([e15, e15])); } }, _redraw: function() { this._redrawRequest = null, this._redrawBounds && (this._redrawBounds.min._floor(), this._redrawBounds.max._ceil()), this._clear(), this._draw(), this._redrawBounds = null; }, _clear: function() { var t14 = this._redrawBounds; if (t14) { var e15 = t14.getSize(); this._ctx.clearRect(t14.min.x, t14.min.y, e15.x, e15.y); } else this._ctx.save(), this._ctx.setTransform(1, 0, 0, 1, 0, 0), this._ctx.clearRect(0, 0, this._container.width, this._container.height), this._ctx.restore(); }, _draw: function() { var t14, e15 = this._redrawBounds; if (this._ctx.save(), e15) { var i20 = e15.getSize(); this._ctx.beginPath(), this._ctx.rect(e15.min.x, e15.min.y, i20.x, i20.y), this._ctx.clip(); } this._drawing = true; for (var n24 = this._drawFirst; n24; n24 = n24.next) t14 = n24.layer, (!e15 || t14._pxBounds && t14._pxBounds.intersects(e15)) && t14._updatePath(); this._drawing = false, this._ctx.restore(); }, _updatePoly: function(t14, e15) { if (this._drawing) { var i20, n24, o27, s38, r19 = t14._parts, a36 = r19.length, h46 = this._ctx; if (a36) { for (h46.beginPath(), i20 = 0; i20 < a36; i20++) { for (n24 = 0, o27 = r19[i20].length; n24 < o27; n24++) s38 = r19[i20][n24], h46[n24 ? "lineTo" : "moveTo"](s38.x, s38.y); e15 && h46.closePath(); } this._fillStroke(h46, t14); } } }, _updateCircle: function(t14) { if (!(!this._drawing || t14._empty())) { var e15 = t14._point, i20 = this._ctx, n24 = Math.max(Math.round(t14._radius), 1), o27 = (Math.max(Math.round(t14._radiusY), 1) || n24) / n24; o27 !== 1 && (i20.save(), i20.scale(1, o27)), i20.beginPath(), i20.arc(e15.x, e15.y / o27, n24, 0, Math.PI * 2, false), o27 !== 1 && i20.restore(), this._fillStroke(i20, t14); } }, _fillStroke: function(t14, e15) { var i20 = e15.options; i20.fill && (t14.globalAlpha = i20.fillOpacity, t14.fillStyle = i20.fillColor || i20.color, t14.fill(i20.fillRule || "evenodd")), i20.stroke && i20.weight !== 0 && (t14.setLineDash && t14.setLineDash(e15.options && e15.options._dashArray || []), t14.globalAlpha = i20.opacity, t14.lineWidth = i20.weight, t14.strokeStyle = i20.color, t14.lineCap = i20.lineCap, t14.lineJoin = i20.lineJoin, t14.stroke()); }, _onClick: function(t14) { for (var e15 = this._map.mouseEventToLayerPoint(t14), i20, n24, o27 = this._drawFirst; o27; o27 = o27.next) i20 = o27.layer, i20.options.interactive && i20._containsPoint(e15) && (!(t14.type === "click" || t14.type === "preclick") || !this._map._draggableMoved(i20)) && (n24 = i20); this._fireEvent(n24 ? [n24] : false, t14); }, _onMouseMove: function(t14) { if (!(!this._map || this._map.dragging.moving() || this._map._animatingZoom)) { var e15 = this._map.mouseEventToLayerPoint(t14); this._handleMouseHover(t14, e15); } }, _handleMouseOut: function(t14) { var e15 = this._hoveredLayer; e15 && (O53(this._container, "leaflet-interactive"), this._fireEvent([e15], t14, "mouseout"), this._hoveredLayer = null, this._mouseHoverThrottled = false); }, _handleMouseHover: function(t14, e15) { if (!this._mouseHoverThrottled) { for (var i20, n24, o27 = this._drawFirst; o27; o27 = o27.next) i20 = o27.layer, i20.options.interactive && i20._containsPoint(e15) && (n24 = i20); n24 !== this._hoveredLayer && (this._handleMouseOut(t14), n24 && (v43(this._container, "leaflet-interactive"), this._fireEvent([n24], t14, "mouseover"), this._hoveredLayer = n24)), this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, t14), this._mouseHoverThrottled = true, setTimeout(b45(function() { this._mouseHoverThrottled = false; }, this), 32); } }, _fireEvent: function(t14, e15, i20) { this._map._fireDOMEvent(e15, i20 || e15.type, t14); }, _bringToFront: function(t14) { var e15 = t14._order; if (e15) { var i20 = e15.next, n24 = e15.prev; if (i20) i20.prev = n24; else return; n24 ? n24.next = i20 : i20 && (this._drawFirst = i20), e15.prev = this._drawLast, this._drawLast.next = e15, e15.next = null, this._drawLast = e15, this._requestRedraw(t14); } }, _bringToBack: function(t14) { var e15 = t14._order; if (e15) { var i20 = e15.next, n24 = e15.prev; if (n24) n24.next = i20; else return; i20 ? i20.prev = n24 : n24 && (this._drawLast = n24), e15.prev = null, e15.next = this._drawFirst, this._drawFirst.prev = e15, this._drawFirst = e15, this._requestRedraw(t14); } } }); function en5(t14) { return f46.canvas ? new tn5(t14) : null; } var Wt7 = function() { try { return document.namespaces.add("lvml", "urn:schemas-microsoft-com:vml"), function(t14) { return document.createElement("'); }; } catch { } return function(t14) { return document.createElement("<" + t14 + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">'); }; }(), Io5 = { _initContainer: function() { this._container = T53("div", "leaflet-vml-container"); }, _update: function() { this._map._animatingZoom || (ht11.prototype._update.call(this), this.fire("update")); }, _initPath: function(t14) { var e15 = t14._container = Wt7("shape"); v43(e15, "leaflet-vml-shape " + (this.options.className || "")), e15.coordsize = "1 1", t14._path = Wt7("path"), e15.appendChild(t14._path), this._updateStyle(t14), this._layers[P43(t14)] = t14; }, _addPath: function(t14) { var e15 = t14._container; this._container.appendChild(e15), t14.options.interactive && t14.addInteractiveTarget(e15); }, _removePath: function(t14) { var e15 = t14._container; k51(e15), t14.removeInteractiveTarget(e15), delete this._layers[P43(t14)]; }, _updateStyle: function(t14) { var e15 = t14._stroke, i20 = t14._fill, n24 = t14.options, o27 = t14._container; o27.stroked = !!n24.stroke, o27.filled = !!n24.fill, n24.stroke ? (e15 || (e15 = t14._stroke = Wt7("stroke")), o27.appendChild(e15), e15.weight = n24.weight + "px", e15.color = n24.color, e15.opacity = n24.opacity, n24.dashArray ? e15.dashStyle = Y43(n24.dashArray) ? n24.dashArray.join(" ") : n24.dashArray.replace(/( *, *)/g, " ") : e15.dashStyle = "", e15.endcap = n24.lineCap.replace("butt", "flat"), e15.joinstyle = n24.lineJoin) : e15 && (o27.removeChild(e15), t14._stroke = null), n24.fill ? (i20 || (i20 = t14._fill = Wt7("fill")), o27.appendChild(i20), i20.color = n24.fillColor || n24.color, i20.opacity = n24.fillOpacity) : i20 && (o27.removeChild(i20), t14._fill = null); }, _updateCircle: function(t14) { var e15 = t14._point.round(), i20 = Math.round(t14._radius), n24 = Math.round(t14._radiusY || i20); this._setPath(t14, t14._empty() ? "M0 0" : "AL " + e15.x + "," + e15.y + " " + i20 + "," + n24 + " 0," + 65535 * 360); }, _setPath: function(t14, e15) { t14._path.v = e15; }, _bringToFront: function(t14) { wt11(t14._container); }, _bringToBack: function(t14) { xt14(t14._container); } }, he26 = f46.vml ? Wt7 : si4, Ut12 = ht11.extend({ _initContainer: function() { this._container = he26("svg"), this._container.setAttribute("pointer-events", "none"), this._rootGroup = he26("g"), this._container.appendChild(this._rootGroup); }, _destroyContainer: function() { k51(this._container), C39(this._container), delete this._container, delete this._rootGroup, delete this._svgSize; }, _update: function() { if (!(this._map._animatingZoom && this._bounds)) { ht11.prototype._update.call(this); var t14 = this._bounds, e15 = t14.getSize(), i20 = this._container; (!this._svgSize || !this._svgSize.equals(e15)) && (this._svgSize = e15, i20.setAttribute("width", e15.x), i20.setAttribute("height", e15.y)), I50(i20, t14.min), i20.setAttribute("viewBox", [t14.min.x, t14.min.y, e15.x, e15.y].join(" ")), this.fire("update"); } }, _initPath: function(t14) { var e15 = t14._path = he26("path"); t14.options.className && v43(e15, t14.options.className), t14.options.interactive && v43(e15, "leaflet-interactive"), this._updateStyle(t14), this._layers[P43(t14)] = t14; }, _addPath: function(t14) { this._rootGroup || this._initContainer(), this._rootGroup.appendChild(t14._path), t14.addInteractiveTarget(t14._path); }, _removePath: function(t14) { k51(t14._path), t14.removeInteractiveTarget(t14._path), delete this._layers[P43(t14)]; }, _updatePath: function(t14) { t14._project(), t14._update(); }, _updateStyle: function(t14) { var e15 = t14._path, i20 = t14.options; e15 && (i20.stroke ? (e15.setAttribute("stroke", i20.color), e15.setAttribute("stroke-opacity", i20.opacity), e15.setAttribute("stroke-width", i20.weight), e15.setAttribute("stroke-linecap", i20.lineCap), e15.setAttribute("stroke-linejoin", i20.lineJoin), i20.dashArray ? e15.setAttribute("stroke-dasharray", i20.dashArray) : e15.removeAttribute("stroke-dasharray"), i20.dashOffset ? e15.setAttribute("stroke-dashoffset", i20.dashOffset) : e15.removeAttribute("stroke-dashoffset")) : e15.setAttribute("stroke", "none"), i20.fill ? (e15.setAttribute("fill", i20.fillColor || i20.color), e15.setAttribute("fill-opacity", i20.fillOpacity), e15.setAttribute("fill-rule", i20.fillRule || "evenodd")) : e15.setAttribute("fill", "none")); }, _updatePoly: function(t14, e15) { this._setPath(t14, ri4(t14._parts, e15)); }, _updateCircle: function(t14) { var e15 = t14._point, i20 = Math.max(Math.round(t14._radius), 1), n24 = Math.max(Math.round(t14._radiusY), 1) || i20, o27 = "a" + i20 + "," + n24 + " 0 1,0 ", s38 = t14._empty() ? "M0 0" : "M" + (e15.x - i20) + "," + e15.y + o27 + i20 * 2 + ",0 " + o27 + -i20 * 2 + ",0 "; this._setPath(t14, s38); }, _setPath: function(t14, e15) { t14._path.setAttribute("d", e15); }, _bringToFront: function(t14) { wt11(t14._path); }, _bringToBack: function(t14) { xt14(t14._path); } }); f46.vml && Ut12.include(Io5); function nn4(t14) { return f46.svg || f46.vml ? new Ut12(t14) : null; } w44.include({ getRenderer: function(t14) { var e15 = t14.options.renderer || this._getPaneRenderer(t14.options.pane) || this.options.renderer || this._renderer; return e15 || (e15 = this._renderer = this._createRenderer()), this.hasLayer(e15) || this.addLayer(e15), e15; }, _getPaneRenderer: function(t14) { if (t14 === "overlayPane" || t14 === void 0) return false; var e15 = this._paneRenderers[t14]; return e15 === void 0 && (e15 = this._createRenderer({ pane: t14 }), this._paneRenderers[t14] = e15), e15; }, _createRenderer: function(t14) { return this.options.preferCanvas && en5(t14) || nn4(t14); } }); var on5 = Tt10.extend({ initialize: function(t14, e15) { Tt10.prototype.initialize.call(this, this._boundsToLatLngs(t14), e15); }, setBounds: function(t14) { return this.setLatLngs(this._boundsToLatLngs(t14)); }, _boundsToLatLngs: function(t14) { return t14 = Z39(t14), [t14.getSouthWest(), t14.getNorthWest(), t14.getNorthEast(), t14.getSouthEast()]; } }); function Bo5(t14, e15) { return new on5(t14, e15); } Ut12.create = he26, Ut12.pointsToPath = ri4, at12.geometryToLayer = ee31, at12.coordsToLatLng = qe14, at12.coordsToLatLngs = ie25, at12.latLngToCoords = je17, at12.latLngsToCoords = ne30, at12.getFeature = bt16, at12.asFeature = oe29, w44.mergeOptions({ boxZoom: true }); var sn5 = et13.extend({ initialize: function(t14) { this._map = t14, this._container = t14._container, this._pane = t14._panes.overlayPane, this._resetStateTimeout = 0, t14.on("unload", this._destroy, this); }, addHooks: function() { p37(this._container, "mousedown", this._onMouseDown, this); }, removeHooks: function() { C39(this._container, "mousedown", this._onMouseDown, this); }, moved: function() { return this._moved; }, _destroy: function() { k51(this._pane), delete this._pane; }, _resetState: function() { this._resetStateTimeout = 0, this._moved = false; }, _clearDeferredResetState: function() { this._resetStateTimeout !== 0 && (clearTimeout(this._resetStateTimeout), this._resetStateTimeout = 0); }, _onMouseDown: function(t14) { if (!t14.shiftKey || t14.which !== 1 && t14.button !== 1) return false; this._clearDeferredResetState(), this._resetState(), It11(), ze16(), this._startPoint = this._map.mouseEventToContainerPoint(t14), p37(document, { contextmenu: vt12, mousemove: this._onMouseMove, mouseup: this._onMouseUp, keydown: this._onKeyDown }, this); }, _onMouseMove: function(t14) { this._moved || (this._moved = true, this._box = T53("div", "leaflet-zoom-box", this._container), v43(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(t14); var e15 = new z47(this._point, this._startPoint), i20 = e15.getSize(); I50(this._box, e15.min), this._box.style.width = i20.x + "px", this._box.style.height = i20.y + "px"; }, _finish: function() { this._moved && (k51(this._box), O53(this._container, "leaflet-crosshair")), Bt10(), ke19(), C39(document, { contextmenu: vt12, mousemove: this._onMouseMove, mouseup: this._onMouseUp, keydown: this._onKeyDown }, this); }, _onMouseUp: function(t14) { if (!(t14.which !== 1 && t14.button !== 1) && (this._finish(), !!this._moved)) { this._clearDeferredResetState(), this._resetStateTimeout = setTimeout(b45(this._resetState, this), 0); var e15 = new W39(this._map.containerPointToLatLng(this._startPoint), this._map.containerPointToLatLng(this._point)); this._map.fitBounds(e15).fire("boxzoomend", { boxZoomBounds: e15 }); } }, _onKeyDown: function(t14) { t14.keyCode === 27 && (this._finish(), this._clearDeferredResetState(), this._resetState()); } }); w44.addInitHook("addHandler", "boxZoom", sn5), w44.mergeOptions({ doubleClickZoom: true }); var rn4 = et13.extend({ addHooks: function() { this._map.on("dblclick", this._onDoubleClick, this); }, removeHooks: function() { this._map.off("dblclick", this._onDoubleClick, this); }, _onDoubleClick: function(t14) { var e15 = this._map, i20 = e15.getZoom(), n24 = e15.options.zoomDelta, o27 = t14.originalEvent.shiftKey ? i20 - n24 : i20 + n24; e15.options.doubleClickZoom === "center" ? e15.setZoom(o27) : e15.setZoomAround(t14.containerPoint, o27); } }); w44.addInitHook("addHandler", "doubleClickZoom", rn4), w44.mergeOptions({ dragging: true, inertia: true, inertiaDeceleration: 3400, inertiaMaxSpeed: 1 / 0, easeLinearity: 0.2, worldCopyJump: false, maxBoundsViscosity: 0 }); var an5 = et13.extend({ addHooks: function() { if (!this._draggable) { var t14 = this._map; this._draggable = new lt15(t14._mapPane, t14._container), this._draggable.on({ dragstart: this._onDragStart, drag: this._onDrag, dragend: this._onDragEnd }, this), this._draggable.on("predrag", this._onPreDragLimit, this), t14.options.worldCopyJump && (this._draggable.on("predrag", this._onPreDragWrap, this), t14.on("zoomend", this._onZoomEnd, this), t14.whenReady(this._onZoomEnd, this)); } v43(this._map._container, "leaflet-grab leaflet-touch-drag"), this._draggable.enable(), this._positions = [], this._times = []; }, removeHooks: function() { O53(this._map._container, "leaflet-grab"), O53(this._map._container, "leaflet-touch-drag"), this._draggable.disable(); }, moved: function() { return this._draggable && this._draggable._moved; }, moving: function() { return this._draggable && this._draggable._moving; }, _onDragStart: function() { var t14 = this._map; if (t14._stop(), this._map.options.maxBounds && this._map.options.maxBoundsViscosity) { var e15 = Z39(this._map.options.maxBounds); this._offsetLimit = F40(this._map.latLngToContainerPoint(e15.getNorthWest()).multiplyBy(-1), this._map.latLngToContainerPoint(e15.getSouthEast()).multiplyBy(-1).add(this._map.getSize())), this._viscosity = Math.min(1, Math.max(0, this._map.options.maxBoundsViscosity)); } else this._offsetLimit = null; t14.fire("movestart").fire("dragstart"), t14.options.inertia && (this._positions = [], this._times = []); }, _onDrag: function(t14) { if (this._map.options.inertia) { var e15 = this._lastTime = +/* @__PURE__ */ new Date(), i20 = this._lastPos = this._draggable._absPos || this._draggable._newPos; this._positions.push(i20), this._times.push(e15), this._prunePositions(e15); } this._map.fire("move", t14).fire("drag", t14); }, _prunePositions: function(t14) { for (; this._positions.length > 1 && t14 - this._times[0] > 50; ) this._positions.shift(), this._times.shift(); }, _onZoomEnd: function() { var t14 = this._map.getSize().divideBy(2), e15 = this._map.latLngToLayerPoint([0, 0]); this._initialWorldOffset = e15.subtract(t14).x, this._worldWidth = this._map.getPixelWorldBounds().getSize().x; }, _viscousLimit: function(t14, e15) { return t14 - (t14 - e15) * this._viscosity; }, _onPreDragLimit: function() { if (!(!this._viscosity || !this._offsetLimit)) { var t14 = this._draggable._newPos.subtract(this._draggable._startPos), e15 = this._offsetLimit; t14.x < e15.min.x && (t14.x = this._viscousLimit(t14.x, e15.min.x)), t14.y < e15.min.y && (t14.y = this._viscousLimit(t14.y, e15.min.y)), t14.x > e15.max.x && (t14.x = this._viscousLimit(t14.x, e15.max.x)), t14.y > e15.max.y && (t14.y = this._viscousLimit(t14.y, e15.max.y)), this._draggable._newPos = this._draggable._startPos.add(t14); } }, _onPreDragWrap: function() { var t14 = this._worldWidth, e15 = Math.round(t14 / 2), i20 = this._initialWorldOffset, n24 = this._draggable._newPos.x, o27 = (n24 - e15 + i20) % t14 + e15 - i20, s38 = (n24 + e15 + i20) % t14 - e15 - i20, r19 = Math.abs(o27 + i20) < Math.abs(s38 + i20) ? o27 : s38; this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = r19; }, _onDragEnd: function(t14) { var e15 = this._map, i20 = e15.options, n24 = !i20.inertia || t14.noInertia || this._times.length < 2; if (e15.fire("dragend", t14), n24) e15.fire("moveend"); else { this._prunePositions(+/* @__PURE__ */ new Date()); var o27 = this._lastPos.subtract(this._positions[0]), s38 = (this._lastTime - this._times[0]) / 1e3, r19 = i20.easeLinearity, a36 = o27.multiplyBy(r19 / s38), h46 = a36.distanceTo([0, 0]), u36 = Math.min(i20.inertiaMaxSpeed, h46), c25 = a36.multiplyBy(u36 / h46), d31 = u36 / (i20.inertiaDeceleration * r19), g45 = c25.multiplyBy(-d31 / 2).round(); !g45.x && !g45.y ? e15.fire("moveend") : (g45 = e15._limitOffset(g45, e15.options.maxBounds), H43(function() { e15.panBy(g45, { duration: d31, easeLinearity: r19, noMoveStart: true, animate: true }); })); } } }); w44.addInitHook("addHandler", "dragging", an5), w44.mergeOptions({ keyboard: true, keyboardPanDelta: 80 }); var hn4 = et13.extend({ keyCodes: { left: [37], right: [39], down: [40], up: [38], zoomIn: [187, 107, 61, 171], zoomOut: [189, 109, 54, 173] }, initialize: function(t14) { this._map = t14, this._setPanDelta(t14.options.keyboardPanDelta), this._setZoomDelta(t14.options.zoomDelta); }, addHooks: function() { var t14 = this._map._container; t14.tabIndex <= 0 && (t14.tabIndex = "0"), p37(t14, { focus: this._onFocus, blur: this._onBlur, mousedown: this._onMouseDown }, this), this._map.on({ focus: this._addHooks, blur: this._removeHooks }, this); }, removeHooks: function() { this._removeHooks(), C39(this._map._container, { focus: this._onFocus, blur: this._onBlur, mousedown: this._onMouseDown }, this), this._map.off({ focus: this._addHooks, blur: this._removeHooks }, this); }, _onMouseDown: function() { if (!this._focused) { var t14 = document.body, e15 = document.documentElement, i20 = t14.scrollTop || e15.scrollTop, n24 = t14.scrollLeft || e15.scrollLeft; this._map._container.focus(), window.scrollTo(n24, i20); } }, _onFocus: function() { this._focused = true, this._map.fire("focus"); }, _onBlur: function() { this._focused = false, this._map.fire("blur"); }, _setPanDelta: function(t14) { var e15 = this._panKeys = {}, i20 = this.keyCodes, n24, o27; for (n24 = 0, o27 = i20.left.length; n24 < o27; n24++) e15[i20.left[n24]] = [-1 * t14, 0]; for (n24 = 0, o27 = i20.right.length; n24 < o27; n24++) e15[i20.right[n24]] = [t14, 0]; for (n24 = 0, o27 = i20.down.length; n24 < o27; n24++) e15[i20.down[n24]] = [0, t14]; for (n24 = 0, o27 = i20.up.length; n24 < o27; n24++) e15[i20.up[n24]] = [0, -1 * t14]; }, _setZoomDelta: function(t14) { var e15 = this._zoomKeys = {}, i20 = this.keyCodes, n24, o27; for (n24 = 0, o27 = i20.zoomIn.length; n24 < o27; n24++) e15[i20.zoomIn[n24]] = t14; for (n24 = 0, o27 = i20.zoomOut.length; n24 < o27; n24++) e15[i20.zoomOut[n24]] = -t14; }, _addHooks: function() { p37(document, "keydown", this._onKeyDown, this); }, _removeHooks: function() { C39(document, "keydown", this._onKeyDown, this); }, _onKeyDown: function(t14) { if (!(t14.altKey || t14.ctrlKey || t14.metaKey)) { var e15 = t14.keyCode, i20 = this._map, n24; if (e15 in this._panKeys) { if (!i20._panAnim || !i20._panAnim._inProgress) if (n24 = this._panKeys[e15], t14.shiftKey && (n24 = _48(n24).multiplyBy(3)), i20.options.maxBounds && (n24 = i20._limitOffset(_48(n24), i20.options.maxBounds)), i20.options.worldCopyJump) { var o27 = i20.wrapLatLng(i20.unproject(i20.project(i20.getCenter()).add(n24))); i20.panTo(o27); } else i20.panBy(n24); } else if (e15 in this._zoomKeys) i20.setZoom(i20.getZoom() + (t14.shiftKey ? 3 : 1) * this._zoomKeys[e15]); else if (e15 === 27 && i20._popup && i20._popup.options.closeOnEscapeKey) i20.closePopup(); else return; vt12(t14); } } }); w44.addInitHook("addHandler", "keyboard", hn4), w44.mergeOptions({ scrollWheelZoom: true, wheelDebounceTime: 40, wheelPxPerZoomLevel: 60 }); var un5 = et13.extend({ addHooks: function() { p37(this._map._container, "wheel", this._onWheelScroll, this), this._delta = 0; }, removeHooks: function() { C39(this._map._container, "wheel", this._onWheelScroll, this); }, _onWheelScroll: function(t14) { var e15 = Oi4(t14), i20 = this._map.options.wheelDebounceTime; this._delta += e15, this._lastMousePos = this._map.mouseEventToContainerPoint(t14), this._startTime || (this._startTime = +/* @__PURE__ */ new Date()); var n24 = Math.max(i20 - (+/* @__PURE__ */ new Date() - this._startTime), 0); clearTimeout(this._timer), this._timer = setTimeout(b45(this._performZoom, this), n24), vt12(t14); }, _performZoom: function() { var t14 = this._map, e15 = t14.getZoom(), i20 = this._map.options.zoomSnap || 0; t14._stop(); var n24 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), o27 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(n24)))) / Math.LN2, s38 = i20 ? Math.ceil(o27 / i20) * i20 : o27, r19 = t14._limitZoom(e15 + (this._delta > 0 ? s38 : -s38)) - e15; this._delta = 0, this._startTime = null, r19 && (t14.options.scrollWheelZoom === "center" ? t14.setZoom(e15 + r19) : t14.setZoomAround(this._lastMousePos, e15 + r19)); } }); w44.addInitHook("addHandler", "scrollWheelZoom", un5); var Ao5 = 600; w44.mergeOptions({ tapHold: f46.touchNative && f46.safari && f46.mobile, tapTolerance: 15 }); var ln5 = et13.extend({ addHooks: function() { p37(this._map._container, "touchstart", this._onDown, this); }, removeHooks: function() { C39(this._map._container, "touchstart", this._onDown, this); }, _onDown: function(t14) { if (clearTimeout(this._holdTimeout), t14.touches.length === 1) { var e15 = t14.touches[0]; this._startPos = this._newPos = new m37(e15.clientX, e15.clientY), this._holdTimeout = setTimeout(b45(function() { this._cancel(), this._isTapValid() && (p37(document, "touchend", R49), p37(document, "touchend touchcancel", this._cancelClickPrevent), this._simulateEvent("contextmenu", e15)); }, this), Ao5), p37(document, "touchend touchcancel contextmenu", this._cancel, this), p37(document, "touchmove", this._onMove, this); } }, _cancelClickPrevent: function t14() { C39(document, "touchend", R49), C39(document, "touchend touchcancel", t14); }, _cancel: function() { clearTimeout(this._holdTimeout), C39(document, "touchend touchcancel contextmenu", this._cancel, this), C39(document, "touchmove", this._onMove, this); }, _onMove: function(t14) { var e15 = t14.touches[0]; this._newPos = new m37(e15.clientX, e15.clientY); }, _isTapValid: function() { return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance; }, _simulateEvent: function(t14, e15) { var i20 = new MouseEvent(t14, { bubbles: true, cancelable: true, view: window, screenX: e15.screenX, screenY: e15.screenY, clientX: e15.clientX, clientY: e15.clientY }); i20._simulated = true, e15.target.dispatchEvent(i20); } }); w44.addInitHook("addHandler", "tapHold", ln5), w44.mergeOptions({ touchZoom: f46.touch, bounceAtZoomLimits: true }); var cn7 = et13.extend({ addHooks: function() { v43(this._map._container, "leaflet-touch-zoom"), p37(this._map._container, "touchstart", this._onTouchStart, this); }, removeHooks: function() { O53(this._map._container, "leaflet-touch-zoom"), C39(this._map._container, "touchstart", this._onTouchStart, this); }, _onTouchStart: function(t14) { var e15 = this._map; if (!(!t14.touches || t14.touches.length !== 2 || e15._animatingZoom || this._zooming)) { var i20 = e15.mouseEventToContainerPoint(t14.touches[0]), n24 = e15.mouseEventToContainerPoint(t14.touches[1]); this._centerPoint = e15.getSize()._divideBy(2), this._startLatLng = e15.containerPointToLatLng(this._centerPoint), e15.options.touchZoom !== "center" && (this._pinchStartLatLng = e15.containerPointToLatLng(i20.add(n24)._divideBy(2))), this._startDist = i20.distanceTo(n24), this._startZoom = e15.getZoom(), this._moved = false, this._zooming = true, e15._stop(), p37(document, "touchmove", this._onTouchMove, this), p37(document, "touchend touchcancel", this._onTouchEnd, this), R49(t14); } }, _onTouchMove: function(t14) { if (!(!t14.touches || t14.touches.length !== 2 || !this._zooming)) { var e15 = this._map, i20 = e15.mouseEventToContainerPoint(t14.touches[0]), n24 = e15.mouseEventToContainerPoint(t14.touches[1]), o27 = i20.distanceTo(n24) / this._startDist; if (this._zoom = e15.getScaleZoom(o27, this._startZoom), !e15.options.bounceAtZoomLimits && (this._zoom < e15.getMinZoom() && o27 < 1 || this._zoom > e15.getMaxZoom() && o27 > 1) && (this._zoom = e15._limitZoom(this._zoom)), e15.options.touchZoom === "center") { if (this._center = this._startLatLng, o27 === 1) return; } else { var s38 = i20._add(n24)._divideBy(2)._subtract(this._centerPoint); if (o27 === 1 && s38.x === 0 && s38.y === 0) return; this._center = e15.unproject(e15.project(this._pinchStartLatLng, this._zoom).subtract(s38), this._zoom); } this._moved || (e15._moveStart(true, false), this._moved = true), V34(this._animRequest); var r19 = b45(e15._move, e15, this._center, this._zoom, { pinch: true, round: false }, void 0); this._animRequest = H43(r19, this, true), R49(t14); } }, _onTouchEnd: function() { if (!this._moved || !this._zooming) { this._zooming = false; return; } this._zooming = false, V34(this._animRequest), C39(document, "touchmove", this._onTouchMove, this), C39(document, "touchend touchcancel", this._onTouchEnd, this), this._map.options.zoomAnimation ? this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap) : this._map._resetView(this._center, this._map._limitZoom(this._zoom)); } }); w44.addInitHook("addHandler", "touchZoom", cn7), w44.BoxZoom = sn5, w44.DoubleClickZoom = rn4, w44.Drag = an5, w44.Keyboard = hn4, w44.ScrollWheelZoom = un5, w44.TapHold = ln5, w44.TouchZoom = cn7, l28.Bounds = z47, l28.Browser = f46, l28.CRS = ot13, l28.Canvas = tn5, l28.Circle = Ve14, l28.CircleMarker = te32, l28.Class = nt15, l28.Control = J35, l28.DivIcon = Xi3, l28.DivOverlay = it14, l28.DomEvent = Qn4, l28.DomUtil = Xn4, l28.Draggable = lt15, l28.Evented = zt9, l28.FeatureGroup = st16, l28.GeoJSON = at12, l28.GridLayer = Ft8, l28.Handler = et13, l28.Icon = Lt12, l28.ImageOverlay = se27, l28.LatLng = M50, l28.LatLngBounds = W39, l28.Layer = X43, l28.LayerGroup = Pt14, l28.LineUtil = fo5, l28.Map = w44, l28.Marker = Qt6, l28.Mixin = ro4, l28.Path = ct16, l28.Point = m37, l28.PolyUtil = ao5, l28.Polygon = Tt10, l28.Polyline = rt14, l28.Popup = re29, l28.PosAnimation = Zi3, l28.Projection = _o3, l28.Rectangle = on5, l28.Renderer = ht11, l28.SVG = Ut12, l28.SVGOverlay = Ji3, l28.TileLayer = Mt14, l28.Tooltip = ae31, l28.Transformation = ve27, l28.Util = yn5, l28.VideoOverlay = Yi4, l28.bind = b45, l28.bounds = F40, l28.canvas = en5, l28.circle = Po4, l28.circleMarker = xo5, l28.control = Rt9, l28.divIcon = Eo4, l28.extend = x50, l28.featureGroup = go5, l28.geoJSON = Ki3, l28.geoJson = bo5, l28.gridLayer = Oo4, l28.icon = yo5, l28.imageOverlay = Mo5, l28.latLng = y53, l28.latLngBounds = Z39, l28.layerGroup = vo5, l28.map = to5, l28.marker = wo5, l28.point = _48, l28.polygon = To4, l28.polyline = Lo4, l28.popup = zo6, l28.rectangle = Bo5, l28.setOptions = S60, l28.stamp = P43, l28.svg = nn4, l28.svgOverlay = So4, l28.tileLayer = $i3, l28.tooltip = ko5, l28.transformation = kt14, l28.version = A53, l28.videoOverlay = Co4; var No4 = window.L; l28.noConflict = function() { return window.L = No4, this; }, window.L = l28; }); }); ce28 = Qo4(vn5()); ({ Bounds: es5, Browser: is4, CRS: ns5, Canvas: os4, Circle: ss4, CircleMarker: rs5, Class: as5, Control: hs4, DivIcon: us4, DivOverlay: ls4, DomEvent: cs4, DomUtil: fs5, Draggable: ds4, Evented: _s3, FeatureGroup: ms4, GeoJSON: ps4, GridLayer: vs4, Handler: gs4, Icon: ys5, ImageOverlay: ws3, LatLng: xs4, LatLngBounds: Ps4, Layer: Ls3, LayerGroup: Ts3, LineUtil: bs4, Map: Ms4, Marker: Cs4, Mixin: Ss4, Path: zs4, Point: ks5, PolyUtil: Es4, Polygon: Os3, Polyline: Zs3, Popup: Is4, PosAnimation: Bs4, Projection: As3, Rectangle: Ns4, Renderer: Rs3, SVG: Ds4, SVGOverlay: Hs4, TileLayer: Fs4, Tooltip: Ws5, Transformation: Us3, Util: Gs4, VideoOverlay: Vs5, bind: qs3, bounds: js4, canvas: Ks4, circle: Ys4, circleMarker: Js4, control: Xs4, divIcon: $s5, extend: Qs4, featureGroup: tr7, geoJSON: er8, geoJson: ir9, gridLayer: nr9, icon: or8, imageOverlay: sr6, latLng: rr8, latLngBounds: ar6, layerGroup: hr8, map: ur6, marker: lr6, point: cr7, polygon: fr7, polyline: dr7, popup: _r6, rectangle: mr6, setOptions: pr7, stamp: vr6, svg: gr4, svgOverlay: yr6, tileLayer: wr4, tooltip: xr6, transformation: Pr5, version: Lr4, videoOverlay: Tr3, noConflict: br5 } = ce28); Mr5 = ce28.default ?? ce28; } }); // esm:https://esm.sh/*leaflet@1.9.4?target=esnext&lp=node_modules%252Fleaflet var leaflet_1_9_exports = {}; __export(leaflet_1_9_exports, { Bounds: () => es5, Browser: () => is4, CRS: () => ns5, Canvas: () => os4, Circle: () => ss4, CircleMarker: () => rs5, Class: () => as5, Control: () => hs4, DivIcon: () => us4, DivOverlay: () => ls4, DomEvent: () => cs4, DomUtil: () => fs5, Draggable: () => ds4, Evented: () => _s3, FeatureGroup: () => ms4, GeoJSON: () => ps4, GridLayer: () => vs4, Handler: () => gs4, Icon: () => ys5, ImageOverlay: () => ws3, LatLng: () => xs4, LatLngBounds: () => Ps4, Layer: () => Ls3, LayerGroup: () => Ts3, LineUtil: () => bs4, Map: () => Ms4, Marker: () => Cs4, Mixin: () => Ss4, Path: () => zs4, Point: () => ks5, PolyUtil: () => Es4, Polygon: () => Os3, Polyline: () => Zs3, Popup: () => Is4, PosAnimation: () => Bs4, Projection: () => As3, Rectangle: () => Ns4, Renderer: () => Rs3, SVG: () => Ds4, SVGOverlay: () => Hs4, TileLayer: () => Fs4, Tooltip: () => Ws5, Transformation: () => Us3, Util: () => Gs4, VideoOverlay: () => Vs5, bind: () => qs3, bounds: () => js4, canvas: () => Ks4, circle: () => Ys4, circleMarker: () => Js4, control: () => Xs4, default: () => Mr5, divIcon: () => $s5, extend: () => Qs4, featureGroup: () => tr7, geoJSON: () => er8, geoJson: () => ir9, gridLayer: () => nr9, icon: () => or8, imageOverlay: () => sr6, latLng: () => rr8, latLngBounds: () => ar6, layerGroup: () => hr8, map: () => ur6, marker: () => lr6, noConflict: () => br5, point: () => cr7, polygon: () => fr7, polyline: () => dr7, popup: () => _r6, rectangle: () => mr6, setOptions: () => pr7, stamp: () => vr6, svg: () => gr4, svgOverlay: () => yr6, tileLayer: () => wr4, tooltip: () => xr6, transformation: () => Pr5, version: () => Lr4, videoOverlay: () => Tr3 }); var init_leaflet_1_9 = __esm({ "esm:https://esm.sh/*leaflet@1.9.4?target=esnext&lp=node_modules%252Fleaflet"() { init_define_import_meta_env(); init_leaflet(); init_leaflet(); } }); // fs:/projects/nostr-locate/src/main.tsx init_define_import_meta_env(); // esm:https://esm.sh/*react-dom@19.2.5/client?target=esnext&lp=node_modules%252Freact-dom init_define_import_meta_env(); // esm:https://esm.sh/*react-dom@19.2.5/esnext/client.mjs?lp=node_modules%252Freact-dom init_define_import_meta_env(); // esm:https://esm.sh/*scheduler@0.27.0?target=esnext&lp=node_modules%252Fscheduler var scheduler_0_27_exports = {}; __export(scheduler_0_27_exports, { default: () => we, unstable_IdlePriority: () => re, unstable_ImmediatePriority: () => ue, unstable_LowPriority: () => se, unstable_NormalPriority: () => oe, unstable_Profiling: () => ie, unstable_UserBlockingPriority: () => ce, unstable_cancelCallback: () => fe, unstable_forceFrameRate: () => be, unstable_getCurrentPriorityLevel: () => _e, unstable_next: () => de, unstable_now: () => ae, unstable_requestPaint: () => ve, unstable_runWithPriority: () => ye, unstable_scheduleCallback: () => ke, unstable_shouldYield: () => me, unstable_wrapCallback: () => Pe }); init_define_import_meta_env(); // esm:https://esm.sh/*scheduler@0.27.0/esnext/scheduler.mjs?lp=node_modules%252Fscheduler init_define_import_meta_env(); var __setImmediate$ = (cb2, ...args) => ({ $t: setTimeout(cb2, 0, ...args), [Symbol.dispose]() { clearTimeout(this.t); } }); var J = Object.create; var F = Object.defineProperty; var K = Object.getOwnPropertyDescriptor; var X = Object.getOwnPropertyNames; var Z = Object.getPrototypeOf; var $ = Object.prototype.hasOwnProperty; var Y = (e15, n24) => () => (n24 || e15((n24 = { exports: {} }).exports, n24), n24.exports); var x = (e15, n24, l28, t14) => { if (n24 && typeof n24 == "object" || typeof n24 == "function") for (let a36 of X(n24)) !$.call(e15, a36) && a36 !== l28 && F(e15, a36, { get: () => n24[a36], enumerable: !(t14 = K(n24, a36)) || t14.enumerable }); return e15; }; var h = (e15, n24, l28) => (l28 = e15 != null ? J(Z(e15)) : {}, x(n24 || !e15 || !e15.__esModule ? F(l28, "default", { value: e15, enumerable: true }) : l28, e15)); var z = Y((r19) => { "use strict"; function H43(e15, n24) { var l28 = e15.length; e15.push(n24); e: for (; 0 < l28; ) { var t14 = l28 - 1 >>> 1, a36 = e15[t14]; if (0 < w44(a36, n24)) e15[t14] = n24, e15[l28] = a36, l28 = t14; else break e; } } function o27(e15) { return e15.length === 0 ? null : e15[0]; } function T53(e15) { if (e15.length === 0) return null; var n24 = e15[0], l28 = e15.pop(); if (l28 !== n24) { e15[0] = l28; e: for (var t14 = 0, a36 = e15.length, k51 = a36 >>> 1; t14 < k51; ) { var m37 = 2 * (t14 + 1) - 1, j55 = e15[m37], f46 = m37 + 1, P43 = e15[f46]; if (0 > w44(j55, l28)) f46 < a36 && 0 > w44(P43, j55) ? (e15[t14] = P43, e15[f46] = l28, t14 = f46) : (e15[t14] = j55, e15[m37] = l28, t14 = m37); else if (f46 < a36 && 0 > w44(P43, l28)) e15[t14] = P43, e15[f46] = l28, t14 = f46; else break e; } } return n24; } function w44(e15, n24) { var l28 = e15.sortIndex - n24.sortIndex; return l28 !== 0 ? l28 : e15.id - n24.id; } r19.unstable_now = void 0; typeof performance == "object" && typeof performance.now == "function" ? (B45 = performance, r19.unstable_now = function() { return B45.now(); }) : (q53 = Date, D54 = q53.now(), r19.unstable_now = function() { return q53.now() - D54; }); var B45, q53, D54, i20 = [], c25 = [], ee31 = 1, s38 = null, u36 = 3, N56 = false, d31 = false, v43 = false, R49 = false, L49 = typeof setTimeout == "function" ? setTimeout : null, M50 = typeof clearTimeout == "function" ? clearTimeout : null, E58 = typeof __setImmediate$ < "u" ? __setImmediate$ : null; function C39(e15) { for (var n24 = o27(c25); n24 !== null; ) { if (n24.callback === null) T53(c25); else if (n24.startTime <= e15) T53(c25), n24.sortIndex = n24.expirationTime, H43(i20, n24); else break; n24 = o27(c25); } } function S60(e15) { if (v43 = false, C39(e15), !d31) if (o27(i20) !== null) d31 = true, _48 || (_48 = true, b45()); else { var n24 = o27(c25); n24 !== null && U37(S60, n24.startTime - e15); } } var _48 = false, y53 = -1, O53 = 5, V34 = -1; function W39() { return R49 ? true : !(r19.unstable_now() - V34 < O53); } function I50() { if (R49 = false, _48) { var e15 = r19.unstable_now(); V34 = e15; var n24 = true; try { e: { d31 = false, v43 && (v43 = false, M50(y53), y53 = -1), N56 = true; var l28 = u36; try { n: { for (C39(e15), s38 = o27(i20); s38 !== null && !(s38.expirationTime > e15 && W39()); ) { var t14 = s38.callback; if (typeof t14 == "function") { s38.callback = null, u36 = s38.priorityLevel; var a36 = t14(s38.expirationTime <= e15); if (e15 = r19.unstable_now(), typeof a36 == "function") { s38.callback = a36, C39(e15), n24 = true; break n; } s38 === o27(i20) && T53(i20), C39(e15); } else T53(i20); s38 = o27(i20); } if (s38 !== null) n24 = true; else { var k51 = o27(c25); k51 !== null && U37(S60, k51.startTime - e15), n24 = false; } } break e; } finally { s38 = null, u36 = l28, N56 = false; } n24 = void 0; } } finally { n24 ? b45() : _48 = false; } } } var b45; typeof E58 == "function" ? b45 = function() { E58(I50); } : typeof MessageChannel < "u" ? (p37 = new MessageChannel(), Q38 = p37.port2, p37.port1.onmessage = I50, b45 = function() { Q38.postMessage(null); }) : b45 = function() { L49(I50, 0); }; var p37, Q38; function U37(e15, n24) { y53 = L49(function() { e15(r19.unstable_now()); }, n24); } r19.unstable_IdlePriority = 5; r19.unstable_ImmediatePriority = 1; r19.unstable_LowPriority = 4; r19.unstable_NormalPriority = 3; r19.unstable_Profiling = null; r19.unstable_UserBlockingPriority = 2; r19.unstable_cancelCallback = function(e15) { e15.callback = null; }; r19.unstable_forceFrameRate = function(e15) { 0 > e15 || 125 < e15 ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : O53 = 0 < e15 ? Math.floor(1e3 / e15) : 5; }; r19.unstable_getCurrentPriorityLevel = function() { return u36; }; r19.unstable_next = function(e15) { switch (u36) { case 1: case 2: case 3: var n24 = 3; break; default: n24 = u36; } var l28 = u36; u36 = n24; try { return e15(); } finally { u36 = l28; } }; r19.unstable_requestPaint = function() { R49 = true; }; r19.unstable_runWithPriority = function(e15, n24) { switch (e15) { case 1: case 2: case 3: case 4: case 5: break; default: e15 = 3; } var l28 = u36; u36 = e15; try { return n24(); } finally { u36 = l28; } }; r19.unstable_scheduleCallback = function(e15, n24, l28) { var t14 = r19.unstable_now(); switch (typeof l28 == "object" && l28 !== null ? (l28 = l28.delay, l28 = typeof l28 == "number" && 0 < l28 ? t14 + l28 : t14) : l28 = t14, e15) { case 1: var a36 = -1; break; case 2: a36 = 250; break; case 5: a36 = 1073741823; break; case 4: a36 = 1e4; break; default: a36 = 5e3; } return a36 = l28 + a36, e15 = { id: ee31++, callback: n24, priorityLevel: e15, startTime: l28, expirationTime: a36, sortIndex: -1 }, l28 > t14 ? (e15.sortIndex = l28, H43(c25, e15), o27(i20) === null && e15 === o27(c25) && (v43 ? (M50(y53), y53 = -1) : v43 = true, U37(S60, l28 - t14))) : (e15.sortIndex = a36, H43(i20, e15), d31 || N56 || (d31 = true, _48 || (_48 = true, b45()))), e15; }; r19.unstable_shouldYield = W39; r19.unstable_wrapCallback = function(e15) { var n24 = u36; return function() { var l28 = u36; u36 = n24; try { return e15.apply(this, arguments); } finally { u36 = l28; } }; }; }); var G = Y((te32, A53) => { "use strict"; A53.exports = z(); }); var g = h(G()); var { unstable_now: ae, unstable_IdlePriority: re, unstable_ImmediatePriority: ue, unstable_LowPriority: se, unstable_NormalPriority: oe, unstable_Profiling: ie, unstable_UserBlockingPriority: ce, unstable_cancelCallback: fe, unstable_forceFrameRate: be, unstable_getCurrentPriorityLevel: _e, unstable_next: de, unstable_requestPaint: ve, unstable_runWithPriority: ye, unstable_scheduleCallback: ke, unstable_shouldYield: me, unstable_wrapCallback: Pe } = g; var we = g.default ?? g; // esm:https://esm.sh/*react@19.2.5?target=esnext&lp=node_modules%252Freact var react_19_2_exports = {}; __export(react_19_2_exports, { Activity: () => pe, Children: () => le, Component: () => ae2, Fragment: () => _e2, Profiler: () => Ee, PureComponent: () => ye2, StrictMode: () => ve2, Suspense: () => Re, __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: () => me2, __COMPILER_RUNTIME: () => Te, cache: () => Ce, cacheSignal: () => Se, cloneElement: () => de2, createContext: () => Ae, createElement: () => he, createRef: () => Oe, default: () => Je, forwardRef: () => ge, isValidElement: () => we2, lazy: () => Pe2, memo: () => Ne, startTransition: () => je, unstable_useCacheRefresh: () => He, use: () => Ie, useActionState: () => Me, useCallback: () => $e, useContext: () => Ye, useDebugValue: () => Le, useDeferredValue: () => xe, useEffect: () => Ue, useEffectEvent: () => De, useId: () => ke2, useImperativeHandle: () => be2, useInsertionEffect: () => qe, useLayoutEffect: () => ze, useMemo: () => Ge, useOptimistic: () => Ke, useReducer: () => We, useRef: () => Be, useState: () => Qe, useSyncExternalStore: () => Ve, useTransition: () => Xe, version: () => Ze }); init_define_import_meta_env(); // esm:https://esm.sh/*react@19.2.5/esnext/react.mjs?lp=node_modules%252Freact init_define_import_meta_env(); var U = Object.create; var d = Object.defineProperty; var D = Object.getOwnPropertyDescriptor; var k = Object.getOwnPropertyNames; var b = Object.getPrototypeOf; var q = Object.prototype.hasOwnProperty; var A = (e15, t14) => () => (t14 || e15((t14 = { exports: {} }).exports, t14), t14.exports); var z2 = (e15, t14, n24, r19) => { if (t14 && typeof t14 == "object" || typeof t14 == "function") for (let o27 of k(t14)) !q.call(e15, o27) && o27 !== n24 && d(e15, o27, { get: () => t14[o27], enumerable: !(r19 = D(t14, o27)) || r19.enumerable }); return e15; }; var G2 = (e15, t14, n24) => (n24 = e15 != null ? U(b(e15)) : {}, z2(t14 || !e15 || !e15.__esModule ? d(n24, "default", { value: e15, enumerable: true }) : n24, e15)); var $2 = A((u36) => { "use strict"; var R49 = Symbol.for("react.transitional.element"), K45 = Symbol.for("react.portal"), W39 = Symbol.for("react.fragment"), B45 = Symbol.for("react.strict_mode"), Q38 = Symbol.for("react.profiler"), V34 = Symbol.for("react.consumer"), X43 = Symbol.for("react.context"), Z39 = Symbol.for("react.forward_ref"), J35 = Symbol.for("react.suspense"), F40 = Symbol.for("react.memo"), P43 = Symbol.for("react.lazy"), ee31 = Symbol.for("react.activity"), h46 = Symbol.iterator; function te32(e15) { return e15 === null || typeof e15 != "object" ? null : (e15 = h46 && e15[h46] || e15["@@iterator"], typeof e15 == "function" ? e15 : null); } var N56 = { isMounted: function() { return false; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }, j55 = Object.assign, H43 = {}; function a36(e15, t14, n24) { this.props = e15, this.context = t14, this.refs = H43, this.updater = n24 || N56; } a36.prototype.isReactComponent = {}; a36.prototype.setState = function(e15, t14) { if (typeof e15 != "object" && typeof e15 != "function" && e15 != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables."); this.updater.enqueueSetState(this, e15, t14, "setState"); }; a36.prototype.forceUpdate = function(e15) { this.updater.enqueueForceUpdate(this, e15, "forceUpdate"); }; function I50() { } I50.prototype = a36.prototype; function m37(e15, t14, n24) { this.props = e15, this.context = t14, this.refs = H43, this.updater = n24 || N56; } var T53 = m37.prototype = new I50(); T53.constructor = m37; j55(T53, a36.prototype); T53.isPureReactComponent = true; var O53 = Array.isArray; function v43() { } var i20 = { H: null, A: null, T: null, S: null }, M50 = Object.prototype.hasOwnProperty; function C39(e15, t14, n24) { var r19 = n24.ref; return { $$typeof: R49, type: e15, key: t14, ref: r19 !== void 0 ? r19 : null, props: n24 }; } function ne30(e15, t14) { return C39(e15.type, t14, e15.props); } function S60(e15) { return typeof e15 == "object" && e15 !== null && e15.$$typeof === R49; } function re29(e15) { var t14 = { "=": "=0", ":": "=2" }; return "$" + e15.replace(/[=:]/g, function(n24) { return t14[n24]; }); } var g45 = /\/+/g; function y53(e15, t14) { return typeof e15 == "object" && e15 !== null && e15.key != null ? re29("" + e15.key) : t14.toString(36); } function ue21(e15) { switch (e15.status) { case "fulfilled": return e15.value; case "rejected": throw e15.reason; default: switch (typeof e15.status == "string" ? e15.then(v43, v43) : (e15.status = "pending", e15.then(function(t14) { e15.status === "pending" && (e15.status = "fulfilled", e15.value = t14); }, function(t14) { e15.status === "pending" && (e15.status = "rejected", e15.reason = t14); })), e15.status) { case "fulfilled": return e15.value; case "rejected": throw e15.reason; } } throw e15; } function l28(e15, t14, n24, r19, o27) { var s38 = typeof e15; (s38 === "undefined" || s38 === "boolean") && (e15 = null); var f46 = false; if (e15 === null) f46 = true; else switch (s38) { case "bigint": case "string": case "number": f46 = true; break; case "object": switch (e15.$$typeof) { case R49: case K45: f46 = true; break; case P43: return f46 = e15._init, l28(f46(e15._payload), t14, n24, r19, o27); } } if (f46) return o27 = o27(e15), f46 = r19 === "" ? "." + y53(e15, 0) : r19, O53(o27) ? (n24 = "", f46 != null && (n24 = f46.replace(g45, "$&/") + "/"), l28(o27, t14, n24, "", function(x50) { return x50; })) : o27 != null && (S60(o27) && (o27 = ne30(o27, n24 + (o27.key == null || e15 && e15.key === o27.key ? "" : ("" + o27.key).replace(g45, "$&/") + "/") + f46)), t14.push(o27)), 1; f46 = 0; var p37 = r19 === "" ? "." : r19 + ":"; if (O53(e15)) for (var c25 = 0; c25 < e15.length; c25++) r19 = e15[c25], s38 = p37 + y53(r19, c25), f46 += l28(r19, t14, n24, s38, o27); else if (c25 = te32(e15), typeof c25 == "function") for (e15 = c25.call(e15), c25 = 0; !(r19 = e15.next()).done; ) r19 = r19.value, s38 = p37 + y53(r19, c25++), f46 += l28(r19, t14, n24, s38, o27); else if (s38 === "object") { if (typeof e15.then == "function") return l28(ue21(e15), t14, n24, r19, o27); throw t14 = String(e15), Error("Objects are not valid as a React child (found: " + (t14 === "[object Object]" ? "object with keys {" + Object.keys(e15).join(", ") + "}" : t14) + "). If you meant to render a collection of children, use an array instead."); } return f46; } function _48(e15, t14, n24) { if (e15 == null) return e15; var r19 = [], o27 = 0; return l28(e15, r19, "", "", function(s38) { return t14.call(n24, s38, o27++); }), r19; } function oe29(e15) { if (e15._status === -1) { var t14 = e15._result; t14 = t14(), t14.then(function(n24) { (e15._status === 0 || e15._status === -1) && (e15._status = 1, e15._result = n24); }, function(n24) { (e15._status === 0 || e15._status === -1) && (e15._status = 2, e15._result = n24); }), e15._status === -1 && (e15._status = 0, e15._result = t14); } if (e15._status === 1) return e15._result.default; throw e15._result; } var w44 = typeof reportError == "function" ? reportError : function(e15) { if (typeof window == "object" && typeof window.ErrorEvent == "function") { var t14 = new window.ErrorEvent("error", { bubbles: true, cancelable: true, message: typeof e15 == "object" && e15 !== null && typeof e15.message == "string" ? String(e15.message) : String(e15), error: e15 }); if (!window.dispatchEvent(t14)) return; } else if (typeof process == "object" && typeof process.emit == "function") { process.emit("uncaughtException", e15); return; } console.error(e15); }, se27 = { map: _48, forEach: function(e15, t14, n24) { _48(e15, function() { t14.apply(this, arguments); }, n24); }, count: function(e15) { var t14 = 0; return _48(e15, function() { t14++; }), t14; }, toArray: function(e15) { return _48(e15, function(t14) { return t14; }) || []; }, only: function(e15) { if (!S60(e15)) throw Error("React.Children.only expected to receive a single React element child."); return e15; } }; u36.Activity = ee31; u36.Children = se27; u36.Component = a36; u36.Fragment = W39; u36.Profiler = Q38; u36.PureComponent = m37; u36.StrictMode = B45; u36.Suspense = J35; u36.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = i20; u36.__COMPILER_RUNTIME = { __proto__: null, c: function(e15) { return i20.H.useMemoCache(e15); } }; u36.cache = function(e15) { return function() { return e15.apply(null, arguments); }; }; u36.cacheSignal = function() { return null; }; u36.cloneElement = function(e15, t14, n24) { if (e15 == null) throw Error("The argument must be a React element, but you passed " + e15 + "."); var r19 = j55({}, e15.props), o27 = e15.key; if (t14 != null) for (s38 in t14.key !== void 0 && (o27 = "" + t14.key), t14) !M50.call(t14, s38) || s38 === "key" || s38 === "__self" || s38 === "__source" || s38 === "ref" && t14.ref === void 0 || (r19[s38] = t14[s38]); var s38 = arguments.length - 2; if (s38 === 1) r19.children = n24; else if (1 < s38) { for (var f46 = Array(s38), p37 = 0; p37 < s38; p37++) f46[p37] = arguments[p37 + 2]; r19.children = f46; } return C39(e15.type, o27, r19); }; u36.createContext = function(e15) { return e15 = { $$typeof: X43, _currentValue: e15, _currentValue2: e15, _threadCount: 0, Provider: null, Consumer: null }, e15.Provider = e15, e15.Consumer = { $$typeof: V34, _context: e15 }, e15; }; u36.createElement = function(e15, t14, n24) { var r19, o27 = {}, s38 = null; if (t14 != null) for (r19 in t14.key !== void 0 && (s38 = "" + t14.key), t14) M50.call(t14, r19) && r19 !== "key" && r19 !== "__self" && r19 !== "__source" && (o27[r19] = t14[r19]); var f46 = arguments.length - 2; if (f46 === 1) o27.children = n24; else if (1 < f46) { for (var p37 = Array(f46), c25 = 0; c25 < f46; c25++) p37[c25] = arguments[c25 + 2]; o27.children = p37; } if (e15 && e15.defaultProps) for (r19 in f46 = e15.defaultProps, f46) o27[r19] === void 0 && (o27[r19] = f46[r19]); return C39(e15, s38, o27); }; u36.createRef = function() { return { current: null }; }; u36.forwardRef = function(e15) { return { $$typeof: Z39, render: e15 }; }; u36.isValidElement = S60; u36.lazy = function(e15) { return { $$typeof: P43, _payload: { _status: -1, _result: e15 }, _init: oe29 }; }; u36.memo = function(e15, t14) { return { $$typeof: F40, type: e15, compare: t14 === void 0 ? null : t14 }; }; u36.startTransition = function(e15) { var t14 = i20.T, n24 = {}; i20.T = n24; try { var r19 = e15(), o27 = i20.S; o27 !== null && o27(n24, r19), typeof r19 == "object" && r19 !== null && typeof r19.then == "function" && r19.then(v43, w44); } catch (s38) { w44(s38); } finally { t14 !== null && n24.types !== null && (t14.types = n24.types), i20.T = t14; } }; u36.unstable_useCacheRefresh = function() { return i20.H.useCacheRefresh(); }; u36.use = function(e15) { return i20.H.use(e15); }; u36.useActionState = function(e15, t14, n24) { return i20.H.useActionState(e15, t14, n24); }; u36.useCallback = function(e15, t14) { return i20.H.useCallback(e15, t14); }; u36.useContext = function(e15) { return i20.H.useContext(e15); }; u36.useDebugValue = function() { }; u36.useDeferredValue = function(e15, t14) { return i20.H.useDeferredValue(e15, t14); }; u36.useEffect = function(e15, t14) { return i20.H.useEffect(e15, t14); }; u36.useEffectEvent = function(e15) { return i20.H.useEffectEvent(e15); }; u36.useId = function() { return i20.H.useId(); }; u36.useImperativeHandle = function(e15, t14, n24) { return i20.H.useImperativeHandle(e15, t14, n24); }; u36.useInsertionEffect = function(e15, t14) { return i20.H.useInsertionEffect(e15, t14); }; u36.useLayoutEffect = function(e15, t14) { return i20.H.useLayoutEffect(e15, t14); }; u36.useMemo = function(e15, t14) { return i20.H.useMemo(e15, t14); }; u36.useOptimistic = function(e15, t14) { return i20.H.useOptimistic(e15, t14); }; u36.useReducer = function(e15, t14, n24) { return i20.H.useReducer(e15, t14, n24); }; u36.useRef = function(e15) { return i20.H.useRef(e15); }; u36.useState = function(e15) { return i20.H.useState(e15); }; u36.useSyncExternalStore = function(e15, t14, n24) { return i20.H.useSyncExternalStore(e15, t14, n24); }; u36.useTransition = function() { return i20.H.useTransition(); }; u36.version = "19.2.5"; }); var L2 = A((ce30, Y43) => { "use strict"; Y43.exports = $2(); }); var E = G2(L2()); var { Activity: pe, Children: le, Component: ae2, Fragment: _e2, Profiler: Ee, PureComponent: ye2, StrictMode: ve2, Suspense: Re, __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: me2, __COMPILER_RUNTIME: Te, cache: Ce, cacheSignal: Se, cloneElement: de2, createContext: Ae, createElement: he, createRef: Oe, forwardRef: ge, isValidElement: we2, lazy: Pe2, memo: Ne, startTransition: je, unstable_useCacheRefresh: He, use: Ie, useActionState: Me, useCallback: $e, useContext: Ye, useDebugValue: Le, useDeferredValue: xe, useEffect: Ue, useEffectEvent: De, useId: ke2, useImperativeHandle: be2, useInsertionEffect: qe, useLayoutEffect: ze, useMemo: Ge, useOptimistic: Ke, useReducer: We, useRef: Be, useState: Qe, useSyncExternalStore: Ve, useTransition: Xe, version: Ze } = E; var Je = E.default ?? E; // esm:https://esm.sh/*react-dom@19.2.5?target=esnext&lp=node_modules%252Freact-dom var react_dom_19_2_exports = {}; __export(react_dom_19_2_exports, { __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: () => H, createPortal: () => I, default: () => K2, flushSync: () => b2, preconnect: () => F2, prefetchDNS: () => j, preinit: () => k2, preinitModule: () => G3, preload: () => q2, preloadModule: () => w, requestFormReset: () => V, unstable_batchedUpdates: () => x2, useFormState: () => Y2, useFormStatus: () => z3, version: () => B }); init_define_import_meta_env(); // esm:https://esm.sh/*react-dom@19.2.5/esnext/react-dom.mjs?lp=node_modules%252Freact-dom init_define_import_meta_env(); var require2 = (n24) => { const e15 = (m37) => typeof m37.default < "u" ? m37.default : m37, c25 = (m37) => Object.assign({ __esModule: true }, m37); switch (n24) { case "react": return e15(react_19_2_exports); default: console.error('module "' + n24 + '" not found'); return null; } }; var S = Object.create; var l = Object.defineProperty; var E2 = Object.getOwnPropertyDescriptor; var T = Object.getOwnPropertyNames; var R = Object.getPrototypeOf; var N = Object.prototype.hasOwnProperty; var p = ((r19) => typeof require2 < "u" ? require2 : typeof Proxy < "u" ? new Proxy(r19, { get: (e15, t14) => (typeof require2 < "u" ? require2 : e15)[t14] }) : r19)(function(r19) { if (typeof require2 < "u") return require2.apply(this, arguments); throw Error('Dynamic require of "' + r19 + '" is not supported'); }); var y = (r19, e15) => () => (e15 || r19((e15 = { exports: {} }).exports, e15), e15.exports); var A2 = (r19, e15, t14, c25) => { if (e15 && typeof e15 == "object" || typeof e15 == "function") for (let a36 of T(e15)) !N.call(r19, a36) && a36 !== t14 && l(r19, a36, { get: () => e15[a36], enumerable: !(c25 = E2(e15, a36)) || c25.enumerable }); return r19; }; var D2 = (r19, e15, t14) => (t14 = r19 != null ? S(R(r19)) : {}, A2(e15 || !r19 || !r19.__esModule ? l(t14, "default", { value: r19, enumerable: true }) : t14, r19)); var _ = y((i20) => { "use strict"; var h46 = p("react"); function o27(r19) { var e15 = "https://react.dev/errors/" + r19; if (1 < arguments.length) { e15 += "?args[]=" + encodeURIComponent(arguments[1]); for (var t14 = 2; t14 < arguments.length; t14++) e15 += "&args[]=" + encodeURIComponent(arguments[t14]); } return "Minified React error #" + r19 + "; visit " + e15 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } function f46() { } var n24 = { d: { f: f46, r: function() { throw Error(o27(522)); }, D: f46, C: f46, L: f46, m: f46, X: f46, S: f46, M: f46 }, p: 0, findDOMNode: null }, P43 = Symbol.for("react.portal"); function C39(r19, e15, t14) { var c25 = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null; return { $$typeof: P43, key: c25 == null ? null : "" + c25, children: r19, containerInfo: e15, implementation: t14 }; } var u36 = h46.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; function s38(r19, e15) { if (r19 === "font") return ""; if (typeof e15 == "string") return e15 === "use-credentials" ? e15 : ""; } i20.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n24; i20.createPortal = function(r19, e15) { var t14 = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null; if (!e15 || e15.nodeType !== 1 && e15.nodeType !== 9 && e15.nodeType !== 11) throw Error(o27(299)); return C39(r19, e15, null, t14); }; i20.flushSync = function(r19) { var e15 = u36.T, t14 = n24.p; try { if (u36.T = null, n24.p = 2, r19) return r19(); } finally { u36.T = e15, n24.p = t14, n24.d.f(); } }; i20.preconnect = function(r19, e15) { typeof r19 == "string" && (e15 ? (e15 = e15.crossOrigin, e15 = typeof e15 == "string" ? e15 === "use-credentials" ? e15 : "" : void 0) : e15 = null, n24.d.C(r19, e15)); }; i20.prefetchDNS = function(r19) { typeof r19 == "string" && n24.d.D(r19); }; i20.preinit = function(r19, e15) { if (typeof r19 == "string" && e15 && typeof e15.as == "string") { var t14 = e15.as, c25 = s38(t14, e15.crossOrigin), a36 = typeof e15.integrity == "string" ? e15.integrity : void 0, g45 = typeof e15.fetchPriority == "string" ? e15.fetchPriority : void 0; t14 === "style" ? n24.d.S(r19, typeof e15.precedence == "string" ? e15.precedence : void 0, { crossOrigin: c25, integrity: a36, fetchPriority: g45 }) : t14 === "script" && n24.d.X(r19, { crossOrigin: c25, integrity: a36, fetchPriority: g45, nonce: typeof e15.nonce == "string" ? e15.nonce : void 0 }); } }; i20.preinitModule = function(r19, e15) { if (typeof r19 == "string") if (typeof e15 == "object" && e15 !== null) { if (e15.as == null || e15.as === "script") { var t14 = s38(e15.as, e15.crossOrigin); n24.d.M(r19, { crossOrigin: t14, integrity: typeof e15.integrity == "string" ? e15.integrity : void 0, nonce: typeof e15.nonce == "string" ? e15.nonce : void 0 }); } } else e15 == null && n24.d.M(r19); }; i20.preload = function(r19, e15) { if (typeof r19 == "string" && typeof e15 == "object" && e15 !== null && typeof e15.as == "string") { var t14 = e15.as, c25 = s38(t14, e15.crossOrigin); n24.d.L(r19, t14, { crossOrigin: c25, integrity: typeof e15.integrity == "string" ? e15.integrity : void 0, nonce: typeof e15.nonce == "string" ? e15.nonce : void 0, type: typeof e15.type == "string" ? e15.type : void 0, fetchPriority: typeof e15.fetchPriority == "string" ? e15.fetchPriority : void 0, referrerPolicy: typeof e15.referrerPolicy == "string" ? e15.referrerPolicy : void 0, imageSrcSet: typeof e15.imageSrcSet == "string" ? e15.imageSrcSet : void 0, imageSizes: typeof e15.imageSizes == "string" ? e15.imageSizes : void 0, media: typeof e15.media == "string" ? e15.media : void 0 }); } }; i20.preloadModule = function(r19, e15) { if (typeof r19 == "string") if (e15) { var t14 = s38(e15.as, e15.crossOrigin); n24.d.m(r19, { as: typeof e15.as == "string" && e15.as !== "script" ? e15.as : void 0, crossOrigin: t14, integrity: typeof e15.integrity == "string" ? e15.integrity : void 0 }); } else n24.d.m(r19); }; i20.requestFormReset = function(r19) { n24.d.r(r19); }; i20.unstable_batchedUpdates = function(r19, e15) { return r19(e15); }; i20.useFormState = function(r19, e15, t14) { return u36.H.useFormState(r19, e15, t14); }; i20.useFormStatus = function() { return u36.H.useHostTransitionStatus(); }; i20.version = "19.2.5"; }); var v = y((M50, O53) => { "use strict"; function m37() { if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) try { __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m37); } catch (r19) { console.error(r19); } } m37(), O53.exports = _(); }); var d2 = D2(v()); var { __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE: H, createPortal: I, flushSync: b2, preconnect: F2, prefetchDNS: j, preinit: k2, preinitModule: G3, preload: q2, preloadModule: w, requestFormReset: V, unstable_batchedUpdates: x2, useFormState: Y2, useFormStatus: z3, version: B } = d2; var K2 = d2.default ?? d2; // esm:https://esm.sh/*react-dom@19.2.5/esnext/client.mjs?lp=node_modules%252Freact-dom var require3 = (n24) => { const e15 = (m37) => typeof m37.default < "u" ? m37.default : m37, c25 = (m37) => Object.assign({ __esModule: true }, m37); switch (n24) { case "scheduler": return e15(scheduler_0_27_exports); case "react": return e15(react_19_2_exports); case "react-dom": return e15(react_dom_19_2_exports); default: console.error('module "' + n24 + '" not found'); return null; } }; var ey = Object.create; var Ke2 = Object.defineProperty; var iy = Object.getOwnPropertyDescriptor; var vy = Object.getOwnPropertyNames; var yy = Object.getPrototypeOf; var hy = Object.prototype.hasOwnProperty; var Af = ((l28) => typeof require3 < "u" ? require3 : typeof Proxy < "u" ? new Proxy(l28, { get: (a36, t14) => (typeof require3 < "u" ? require3 : a36)[t14] }) : l28)(function(l28) { if (typeof require3 < "u") return require3.apply(this, arguments); throw Error('Dynamic require of "' + l28 + '" is not supported'); }); var Le2 = (l28, a36) => () => (a36 || l28((a36 = { exports: {} }).exports, a36), a36.exports); var my = (l28, a36, t14, u36) => { if (a36 && typeof a36 == "object" || typeof a36 == "function") for (let n24 of vy(a36)) !hy.call(l28, n24) && n24 !== t14 && Ke2(l28, n24, { get: () => a36[n24], enumerable: !(u36 = iy(a36, n24)) || u36.enumerable }); return l28; }; var dy = (l28, a36, t14) => (t14 = l28 != null ? ey(yy(l28)) : {}, my(a36 || !l28 || !l28.__esModule ? Ke2(t14, "default", { value: l28, enumerable: true }) : t14, l28)); var ty = Le2((zf2) => { "use strict"; var al2 = Af("scheduler"), z02 = Af("react"), Sy2 = Af("react-dom"); function A53(l28) { var a36 = "https://react.dev/errors/" + l28; if (1 < arguments.length) { a36 += "?args[]=" + encodeURIComponent(arguments[1]); for (var t15 = 2; t15 < arguments.length; t15++) a36 += "&args[]=" + encodeURIComponent(arguments[t15]); } return "Minified React error #" + l28 + "; visit " + a36 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } function b02(l28) { return !(!l28 || l28.nodeType !== 1 && l28.nodeType !== 9 && l28.nodeType !== 11); } function ou3(l28) { var a36 = l28, t15 = l28; if (l28.alternate) for (; a36.return; ) a36 = a36.return; else { l28 = a36; do a36 = l28, (a36.flags & 4098) !== 0 && (t15 = a36.return), l28 = a36.return; while (l28); } return a36.tag === 3 ? t15 : null; } function A02(l28) { if (l28.tag === 13) { var a36 = l28.memoizedState; if (a36 === null && (l28 = l28.alternate, l28 !== null && (a36 = l28.memoizedState)), a36 !== null) return a36.dehydrated; } return null; } function T02(l28) { if (l28.tag === 31) { var a36 = l28.memoizedState; if (a36 === null && (l28 = l28.alternate, l28 !== null && (a36 = l28.memoizedState)), a36 !== null) return a36.dehydrated; } return null; } function Je12(l28) { if (ou3(l28) !== l28) throw Error(A53(188)); } function gy2(l28) { var a36 = l28.alternate; if (!a36) { if (a36 = ou3(l28), a36 === null) throw Error(A53(188)); return a36 !== l28 ? null : l28; } for (var t15 = l28, u36 = a36; ; ) { var n24 = t15.return; if (n24 === null) break; var f46 = n24.alternate; if (f46 === null) { if (u36 = n24.return, u36 !== null) { t15 = u36; continue; } break; } if (n24.child === f46.child) { for (f46 = n24.child; f46; ) { if (f46 === t15) return Je12(n24), l28; if (f46 === u36) return Je12(n24), a36; f46 = f46.sibling; } throw Error(A53(188)); } if (t15.return !== u36.return) t15 = n24, u36 = f46; else { for (var c25 = false, e16 = n24.child; e16; ) { if (e16 === t15) { c25 = true, t15 = n24, u36 = f46; break; } if (e16 === u36) { c25 = true, u36 = n24, t15 = f46; break; } e16 = e16.sibling; } if (!c25) { for (e16 = f46.child; e16; ) { if (e16 === t15) { c25 = true, t15 = f46, u36 = n24; break; } if (e16 === u36) { c25 = true, u36 = f46, t15 = n24; break; } e16 = e16.sibling; } if (!c25) throw Error(A53(189)); } } if (t15.alternate !== u36) throw Error(A53(190)); } if (t15.tag !== 3) throw Error(A53(188)); return t15.stateNode.current === t15 ? l28 : a36; } function E02(l28) { var a36 = l28.tag; if (a36 === 5 || a36 === 26 || a36 === 27 || a36 === 6) return l28; for (l28 = l28.child; l28 !== null; ) { if (a36 = E02(l28), a36 !== null) return a36; l28 = l28.sibling; } return null; } var L49 = Object.assign, zy2 = Symbol.for("react.element"), Lu3 = Symbol.for("react.transitional.element"), lu3 = Symbol.for("react.portal"), yt14 = Symbol.for("react.fragment"), M02 = Symbol.for("react.strict_mode"), Pf2 = Symbol.for("react.profiler"), O02 = Symbol.for("react.consumer"), la3 = Symbol.for("react.context"), wc2 = Symbol.for("react.forward_ref"), rf3 = Symbol.for("react.suspense"), lc2 = Symbol.for("react.suspense_list"), Fc2 = Symbol.for("react.memo"), da3 = Symbol.for("react.lazy"), ac2 = Symbol.for("react.activity"), by2 = Symbol.for("react.memo_cache_sentinel"), We15 = Symbol.iterator; function wt11(l28) { return l28 === null || typeof l28 != "object" ? null : (l28 = We15 && l28[We15] || l28["@@iterator"], typeof l28 == "function" ? l28 : null); } var Ay2 = Symbol.for("react.client.reference"); function tc2(l28) { if (l28 == null) return null; if (typeof l28 == "function") return l28.$$typeof === Ay2 ? null : l28.displayName || l28.name || null; if (typeof l28 == "string") return l28; switch (l28) { case yt14: return "Fragment"; case Pf2: return "Profiler"; case M02: return "StrictMode"; case rf3: return "Suspense"; case lc2: return "SuspenseList"; case ac2: return "Activity"; } if (typeof l28 == "object") switch (l28.$$typeof) { case lu3: return "Portal"; case la3: return l28.displayName || "Context"; case O02: return (l28._context.displayName || "Context") + ".Consumer"; case wc2: var a36 = l28.render; return l28 = l28.displayName, l28 || (l28 = a36.displayName || a36.name || "", l28 = l28 !== "" ? "ForwardRef(" + l28 + ")" : "ForwardRef"), l28; case Fc2: return a36 = l28.displayName || null, a36 !== null ? a36 : tc2(l28.type) || "Memo"; case da3: a36 = l28._payload, l28 = l28._init; try { return tc2(l28(a36)); } catch { } } return null; } var au3 = Array.isArray, D54 = z02.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G45 = Sy2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, La2 = { pending: false, data: null, method: null, action: null }, uc2 = [], ht11 = -1; function Jl3(l28) { return { current: l28 }; } function nl2(l28) { 0 > ht11 || (l28.current = uc2[ht11], uc2[ht11] = null, ht11--); } function x50(l28, a36) { ht11++, uc2[ht11] = l28.current, l28.current = a36; } var Ll2 = Jl3(null), Au3 = Jl3(null), Ua2 = Jl3(null), Un4 = Jl3(null); function Hn4(l28, a36) { switch (x50(Ua2, a36), x50(Au3, l28), x50(Ll2, null), a36.nodeType) { case 9: case 11: l28 = (l28 = a36.documentElement) && (l28 = l28.namespaceURI) ? ri4(l28) : 0; break; default: if (l28 = a36.tagName, a36 = a36.namespaceURI) a36 = ri4(a36), l28 = pv2(a36, l28); else switch (l28) { case "svg": l28 = 1; break; case "math": l28 = 2; break; default: l28 = 0; } } nl2(Ll2), x50(Ll2, l28); } function _t14() { nl2(Ll2), nl2(Au3), nl2(Ua2); } function nc2(l28) { l28.memoizedState !== null && x50(Un4, l28); var a36 = Ll2.current, t15 = pv2(a36, l28.type); a36 !== t15 && (x50(Au3, l28), x50(Ll2, t15)); } function Nn5(l28) { Au3.current === l28 && (nl2(Ll2), nl2(Au3)), Un4.current === l28 && (nl2(Un4), _u3._currentValue = La2); } var Tf2, we25; function Va2(l28) { if (Tf2 === void 0) try { throw Error(); } catch (t15) { var a36 = t15.stack.trim().match(/\n( *(at )?)/); Tf2 = a36 && a36[1] || "", we25 = -1 < t15.stack.indexOf(` at`) ? " ()" : -1 < t15.stack.indexOf("@") ? "@unknown:0:0" : ""; } return ` ` + Tf2 + l28 + we25; } var Ef2 = false; function Mf2(l28, a36) { if (!l28 || Ef2) return ""; Ef2 = true; var t15 = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { var u36 = { DetermineComponentFrameRoot: function() { try { if (a36) { var b45 = function() { throw Error(); }; if (Object.defineProperty(b45.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(b45, []); } catch (S60) { var d31 = S60; } Reflect.construct(l28, [], b45); } else { try { b45.call(); } catch (S60) { d31 = S60; } l28.call(b45.prototype); } } else { try { throw Error(); } catch (S60) { d31 = S60; } (b45 = l28()) && typeof b45.catch == "function" && b45.catch(function() { }); } } catch (S60) { if (S60 && d31 && typeof S60.stack == "string") return [S60.stack, d31.stack]; } return [null, null]; } }; u36.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; var n24 = Object.getOwnPropertyDescriptor(u36.DetermineComponentFrameRoot, "name"); n24 && n24.configurable && Object.defineProperty(u36.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" }); var f46 = u36.DetermineComponentFrameRoot(), c25 = f46[0], e16 = f46[1]; if (c25 && e16) { var i20 = c25.split(` `), m37 = e16.split(` `); for (n24 = u36 = 0; u36 < i20.length && !i20[u36].includes("DetermineComponentFrameRoot"); ) u36++; for (; n24 < m37.length && !m37[n24].includes("DetermineComponentFrameRoot"); ) n24++; if (u36 === i20.length || n24 === m37.length) for (u36 = i20.length - 1, n24 = m37.length - 1; 1 <= u36 && 0 <= n24 && i20[u36] !== m37[n24]; ) n24--; for (; 1 <= u36 && 0 <= n24; u36--, n24--) if (i20[u36] !== m37[n24]) { if (u36 !== 1 || n24 !== 1) do if (u36--, n24--, 0 > n24 || i20[u36] !== m37[n24]) { var g45 = ` ` + i20[u36].replace(" at new ", " at "); return l28.displayName && g45.includes("") && (g45 = g45.replace("", l28.displayName)), g45; } while (1 <= u36 && 0 <= n24); break; } } } finally { Ef2 = false, Error.prepareStackTrace = t15; } return (t15 = l28 ? l28.displayName || l28.name : "") ? Va2(t15) : ""; } function Ty2(l28, a36) { switch (l28.tag) { case 26: case 27: case 5: return Va2(l28.type); case 16: return Va2("Lazy"); case 13: return l28.child !== a36 && a36 !== null ? Va2("Suspense Fallback") : Va2("Suspense"); case 19: return Va2("SuspenseList"); case 0: case 15: return Mf2(l28.type, false); case 11: return Mf2(l28.type.render, false); case 1: return Mf2(l28.type, true); case 31: return Va2("Activity"); default: return ""; } } function Fe19(l28) { try { var a36 = "", t15 = null; do a36 += Ty2(l28, t15), t15 = l28, l28 = l28.return; while (l28); return a36; } catch (u36) { return ` Error generating stack: ` + u36.message + ` ` + u36.stack; } } var fc2 = Object.prototype.hasOwnProperty, $c2 = al2.unstable_scheduleCallback, Of2 = al2.unstable_cancelCallback, Ey2 = al2.unstable_shouldYield, My2 = al2.unstable_requestPaint, Ol2 = al2.unstable_now, Oy2 = al2.unstable_getCurrentPriorityLevel, D02 = al2.unstable_ImmediatePriority, U02 = al2.unstable_UserBlockingPriority, Bn4 = al2.unstable_NormalPriority, Dy2 = al2.unstable_LowPriority, H02 = al2.unstable_IdlePriority, Uy2 = al2.log, Hy2 = al2.unstable_setDisableYieldValue, Xu2 = null, Dl2 = null; function Ta2(l28) { if (typeof Uy2 == "function" && Hy2(l28), Dl2 && typeof Dl2.setStrictMode == "function") try { Dl2.setStrictMode(Xu2, l28); } catch { } } var Ul3 = Math.clz32 ? Math.clz32 : qy2, Ny2 = Math.log, By2 = Math.LN2; function qy2(l28) { return l28 >>>= 0, l28 === 0 ? 32 : 31 - (Ny2(l28) / By2 | 0) | 0; } var Ju3 = 256, Wu3 = 262144, wu3 = 4194304; function xa3(l28) { var a36 = l28 & 42; if (a36 !== 0) return a36; switch (l28 & -l28) { case 1: return 1; case 2: return 2; case 4: return 4; case 8: return 8; case 16: return 16; case 32: return 32; case 64: return 64; case 128: return 128; case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: return l28 & 261888; case 262144: case 524288: case 1048576: case 2097152: return l28 & 3932160; case 4194304: case 8388608: case 16777216: case 33554432: return l28 & 62914560; case 67108864: return 67108864; case 134217728: return 134217728; case 268435456: return 268435456; case 536870912: return 536870912; case 1073741824: return 0; default: return l28; } } function rn4(l28, a36, t15) { var u36 = l28.pendingLanes; if (u36 === 0) return 0; var n24 = 0, f46 = l28.suspendedLanes, c25 = l28.pingedLanes; l28 = l28.warmLanes; var e16 = u36 & 134217727; return e16 !== 0 ? (u36 = e16 & ~f46, u36 !== 0 ? n24 = xa3(u36) : (c25 &= e16, c25 !== 0 ? n24 = xa3(c25) : t15 || (t15 = e16 & ~l28, t15 !== 0 && (n24 = xa3(t15))))) : (e16 = u36 & ~f46, e16 !== 0 ? n24 = xa3(e16) : c25 !== 0 ? n24 = xa3(c25) : t15 || (t15 = u36 & ~l28, t15 !== 0 && (n24 = xa3(t15)))), n24 === 0 ? 0 : a36 !== 0 && a36 !== n24 && (a36 & f46) === 0 && (f46 = n24 & -n24, t15 = a36 & -a36, f46 >= t15 || f46 === 32 && (t15 & 4194048) !== 0) ? a36 : n24; } function Gu3(l28, a36) { return (l28.pendingLanes & ~(l28.suspendedLanes & ~l28.pingedLanes) & a36) === 0; } function _y2(l28, a36) { switch (l28) { case 1: case 2: case 4: case 8: case 64: return a36 + 250; case 16: case 32: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return a36 + 5e3; case 4194304: case 8388608: case 16777216: case 33554432: return -1; case 67108864: case 134217728: case 268435456: case 536870912: case 1073741824: return -1; default: return -1; } } function N02() { var l28 = wu3; return wu3 <<= 1, (wu3 & 62914560) === 0 && (wu3 = 4194304), l28; } function Df2(l28) { for (var a36 = [], t15 = 0; 31 > t15; t15++) a36.push(l28); return a36; } function Qu2(l28, a36) { l28.pendingLanes |= a36, a36 !== 268435456 && (l28.suspendedLanes = 0, l28.pingedLanes = 0, l28.warmLanes = 0); } function Yy2(l28, a36, t15, u36, n24, f46) { var c25 = l28.pendingLanes; l28.pendingLanes = t15, l28.suspendedLanes = 0, l28.pingedLanes = 0, l28.warmLanes = 0, l28.expiredLanes &= t15, l28.entangledLanes &= t15, l28.errorRecoveryDisabledLanes &= t15, l28.shellSuspendCounter = 0; var e16 = l28.entanglements, i20 = l28.expirationTimes, m37 = l28.hiddenUpdates; for (t15 = c25 & ~t15; 0 < t15; ) { var g45 = 31 - Ul3(t15), b45 = 1 << g45; e16[g45] = 0, i20[g45] = -1; var d31 = m37[g45]; if (d31 !== null) for (m37[g45] = null, g45 = 0; g45 < d31.length; g45++) { var S60 = d31[g45]; S60 !== null && (S60.lane &= -536870913); } t15 &= ~b45; } u36 !== 0 && B02(l28, u36, 0), f46 !== 0 && n24 === 0 && l28.tag !== 0 && (l28.suspendedLanes |= f46 & ~(c25 & ~a36)); } function B02(l28, a36, t15) { l28.pendingLanes |= a36, l28.suspendedLanes &= ~a36; var u36 = 31 - Ul3(a36); l28.entangledLanes |= a36, l28.entanglements[u36] = l28.entanglements[u36] | 1073741824 | t15 & 261930; } function q02(l28, a36) { var t15 = l28.entangledLanes |= a36; for (l28 = l28.entanglements; t15; ) { var u36 = 31 - Ul3(t15), n24 = 1 << u36; n24 & a36 | l28[u36] & a36 && (l28[u36] |= a36), t15 &= ~n24; } } function _02(l28, a36) { var t15 = a36 & -a36; return t15 = (t15 & 42) !== 0 ? 1 : kc2(t15), (t15 & (l28.suspendedLanes | a36)) !== 0 ? 0 : t15; } function kc2(l28) { switch (l28) { case 2: l28 = 1; break; case 8: l28 = 4; break; case 32: l28 = 16; break; case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: case 4194304: case 8388608: case 16777216: case 33554432: l28 = 128; break; case 268435456: l28 = 134217728; break; default: l28 = 0; } return l28; } function Ic2(l28) { return l28 &= -l28, 2 < l28 ? 8 < l28 ? (l28 & 134217727) !== 0 ? 32 : 268435456 : 8 : 2; } function Y02() { var l28 = G45.p; return l28 !== 0 ? l28 : (l28 = window.event, l28 === void 0 ? 32 : rv2(l28.type)); } function $e13(l28, a36) { var t15 = G45.p; try { return G45.p = l28, a36(); } finally { G45.p = t15; } } var Ca2 = Math.random().toString(36).slice(2), cl3 = "__reactFiber$" + Ca2, zl3 = "__reactProps$" + Ca2, Vt11 = "__reactContainer$" + Ca2, cc2 = "__reactEvents$" + Ca2, sy2 = "__reactListeners$" + Ca2, oy2 = "__reactHandles$" + Ca2, ke19 = "__reactResources$" + Ca2, Zu2 = "__reactMarker$" + Ca2; function Pc2(l28) { delete l28[cl3], delete l28[zl3], delete l28[cc2], delete l28[sy2], delete l28[oy2]; } function mt11(l28) { var a36 = l28[cl3]; if (a36) return a36; for (var t15 = l28.parentNode; t15; ) { if (a36 = t15[Vt11] || t15[cl3]) { if (t15 = a36.alternate, a36.child !== null || t15 !== null && t15.child !== null) for (l28 = n04(l28); l28 !== null; ) { if (t15 = l28[cl3]) return t15; l28 = n04(l28); } return a36; } l28 = t15, t15 = l28.parentNode; } return null; } function xt14(l28) { if (l28 = l28[cl3] || l28[Vt11]) { var a36 = l28.tag; if (a36 === 5 || a36 === 6 || a36 === 13 || a36 === 31 || a36 === 26 || a36 === 27 || a36 === 3) return l28; } return null; } function tu3(l28) { var a36 = l28.tag; if (a36 === 5 || a36 === 26 || a36 === 27 || a36 === 6) return l28.stateNode; throw Error(A53(33)); } function Ot12(l28) { var a36 = l28[ke19]; return a36 || (a36 = l28[ke19] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }), a36; } function ul3(l28) { l28[Zu2] = true; } var s03 = /* @__PURE__ */ new Set(), o03 = {}; function lt15(l28, a36) { Yt9(l28, a36), Yt9(l28 + "Capture", a36); } function Yt9(l28, a36) { for (o03[l28] = a36, l28 = 0; l28 < a36.length; l28++) s03.add(a36[l28]); } var Xy2 = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), Ie23 = {}, Pe21 = {}; function Gy2(l28) { return fc2.call(Pe21, l28) ? true : fc2.call(Ie23, l28) ? false : Xy2.test(l28) ? Pe21[l28] = true : (Ie23[l28] = true, false); } function vn6(l28, a36, t15) { if (Gy2(a36)) if (t15 === null) l28.removeAttribute(a36); else { switch (typeof t15) { case "undefined": case "function": case "symbol": l28.removeAttribute(a36); return; case "boolean": var u36 = a36.toLowerCase().slice(0, 5); if (u36 !== "data-" && u36 !== "aria-") { l28.removeAttribute(a36); return; } } l28.setAttribute(a36, "" + t15); } } function Fu3(l28, a36, t15) { if (t15 === null) l28.removeAttribute(a36); else { switch (typeof t15) { case "undefined": case "function": case "symbol": case "boolean": l28.removeAttribute(a36); return; } l28.setAttribute(a36, "" + t15); } } function wl3(l28, a36, t15, u36) { if (u36 === null) l28.removeAttribute(t15); else { switch (typeof u36) { case "undefined": case "function": case "symbol": case "boolean": l28.removeAttribute(t15); return; } l28.setAttributeNS(a36, t15, "" + u36); } } function _l3(l28) { switch (typeof l28) { case "bigint": case "boolean": case "number": case "string": case "undefined": return l28; case "object": return l28; default: return ""; } } function X02(l28) { var a36 = l28.type; return (l28 = l28.nodeName) && l28.toLowerCase() === "input" && (a36 === "checkbox" || a36 === "radio"); } function Qy2(l28, a36, t15) { var u36 = Object.getOwnPropertyDescriptor(l28.constructor.prototype, a36); if (!l28.hasOwnProperty(a36) && typeof u36 < "u" && typeof u36.get == "function" && typeof u36.set == "function") { var n24 = u36.get, f46 = u36.set; return Object.defineProperty(l28, a36, { configurable: true, get: function() { return n24.call(this); }, set: function(c25) { t15 = "" + c25, f46.call(this, c25); } }), Object.defineProperty(l28, a36, { enumerable: u36.enumerable }), { getValue: function() { return t15; }, setValue: function(c25) { t15 = "" + c25; }, stopTracking: function() { l28._valueTracker = null, delete l28[a36]; } }; } } function ec2(l28) { if (!l28._valueTracker) { var a36 = X02(l28) ? "checked" : "value"; l28._valueTracker = Qy2(l28, a36, "" + l28[a36]); } } function G02(l28) { if (!l28) return false; var a36 = l28._valueTracker; if (!a36) return true; var t15 = a36.getValue(), u36 = ""; return l28 && (u36 = X02(l28) ? l28.checked ? "true" : "false" : l28.value), l28 = u36, l28 !== t15 ? (a36.setValue(l28), true) : false; } function qn4(l28) { if (l28 = l28 || (typeof document < "u" ? document : void 0), typeof l28 > "u") return null; try { return l28.activeElement || l28.body; } catch { return l28.body; } } var Zy2 = /[\n"\\]/g; function ol2(l28) { return l28.replace(Zy2, function(a36) { return "\\" + a36.charCodeAt(0).toString(16) + " "; }); } function ic2(l28, a36, t15, u36, n24, f46, c25, e16) { l28.name = "", c25 != null && typeof c25 != "function" && typeof c25 != "symbol" && typeof c25 != "boolean" ? l28.type = c25 : l28.removeAttribute("type"), a36 != null ? c25 === "number" ? (a36 === 0 && l28.value === "" || l28.value != a36) && (l28.value = "" + _l3(a36)) : l28.value !== "" + _l3(a36) && (l28.value = "" + _l3(a36)) : c25 !== "submit" && c25 !== "reset" || l28.removeAttribute("value"), a36 != null ? vc2(l28, c25, _l3(a36)) : t15 != null ? vc2(l28, c25, _l3(t15)) : u36 != null && l28.removeAttribute("value"), n24 == null && f46 != null && (l28.defaultChecked = !!f46), n24 != null && (l28.checked = n24 && typeof n24 != "function" && typeof n24 != "symbol"), e16 != null && typeof e16 != "function" && typeof e16 != "symbol" && typeof e16 != "boolean" ? l28.name = "" + _l3(e16) : l28.removeAttribute("name"); } function Q02(l28, a36, t15, u36, n24, f46, c25, e16) { if (f46 != null && typeof f46 != "function" && typeof f46 != "symbol" && typeof f46 != "boolean" && (l28.type = f46), a36 != null || t15 != null) { if (!(f46 !== "submit" && f46 !== "reset" || a36 != null)) { ec2(l28); return; } t15 = t15 != null ? "" + _l3(t15) : "", a36 = a36 != null ? "" + _l3(a36) : t15, e16 || a36 === l28.value || (l28.value = a36), l28.defaultValue = a36; } u36 = u36 ?? n24, u36 = typeof u36 != "function" && typeof u36 != "symbol" && !!u36, l28.checked = e16 ? l28.checked : !!u36, l28.defaultChecked = !!u36, c25 != null && typeof c25 != "function" && typeof c25 != "symbol" && typeof c25 != "boolean" && (l28.name = c25), ec2(l28); } function vc2(l28, a36, t15) { a36 === "number" && qn4(l28.ownerDocument) === l28 || l28.defaultValue === "" + t15 || (l28.defaultValue = "" + t15); } function Dt9(l28, a36, t15, u36) { if (l28 = l28.options, a36) { a36 = {}; for (var n24 = 0; n24 < t15.length; n24++) a36["$" + t15[n24]] = true; for (t15 = 0; t15 < l28.length; t15++) n24 = a36.hasOwnProperty("$" + l28[t15].value), l28[t15].selected !== n24 && (l28[t15].selected = n24), n24 && u36 && (l28[t15].defaultSelected = true); } else { for (t15 = "" + _l3(t15), a36 = null, n24 = 0; n24 < l28.length; n24++) { if (l28[n24].value === t15) { l28[n24].selected = true, u36 && (l28[n24].defaultSelected = true); return; } a36 !== null || l28[n24].disabled || (a36 = l28[n24]); } a36 !== null && (a36.selected = true); } } function Z02(l28, a36, t15) { if (a36 != null && (a36 = "" + _l3(a36), a36 !== l28.value && (l28.value = a36), t15 == null)) { l28.defaultValue !== a36 && (l28.defaultValue = a36); return; } l28.defaultValue = t15 != null ? "" + _l3(t15) : ""; } function C02(l28, a36, t15, u36) { if (a36 == null) { if (u36 != null) { if (t15 != null) throw Error(A53(92)); if (au3(u36)) { if (1 < u36.length) throw Error(A53(93)); u36 = u36[0]; } t15 = u36; } t15 == null && (t15 = ""), a36 = t15; } t15 = _l3(a36), l28.defaultValue = t15, u36 = l28.textContent, u36 === t15 && u36 !== "" && u36 !== null && (l28.value = u36), ec2(l28); } function st16(l28, a36) { if (a36) { var t15 = l28.firstChild; if (t15 && t15 === l28.lastChild && t15.nodeType === 3) { t15.nodeValue = a36; return; } } l28.textContent = a36; } var Cy2 = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")); function re29(l28, a36, t15) { var u36 = a36.indexOf("--") === 0; t15 == null || typeof t15 == "boolean" || t15 === "" ? u36 ? l28.setProperty(a36, "") : a36 === "float" ? l28.cssFloat = "" : l28[a36] = "" : u36 ? l28.setProperty(a36, t15) : typeof t15 != "number" || t15 === 0 || Cy2.has(a36) ? a36 === "float" ? l28.cssFloat = t15 : l28[a36] = ("" + t15).trim() : l28[a36] = t15 + "px"; } function R02(l28, a36, t15) { if (a36 != null && typeof a36 != "object") throw Error(A53(62)); if (l28 = l28.style, t15 != null) { for (var u36 in t15) !t15.hasOwnProperty(u36) || a36 != null && a36.hasOwnProperty(u36) || (u36.indexOf("--") === 0 ? l28.setProperty(u36, "") : u36 === "float" ? l28.cssFloat = "" : l28[u36] = ""); for (var n24 in a36) u36 = a36[n24], a36.hasOwnProperty(n24) && t15[n24] !== u36 && re29(l28, n24, u36); } else for (var f46 in a36) a36.hasOwnProperty(f46) && re29(l28, f46, a36[f46]); } function rc2(l28) { if (l28.indexOf("-") === -1) return false; switch (l28) { case "annotation-xml": case "color-profile": case "font-face": case "font-face-src": case "font-face-uri": case "font-face-format": case "font-face-name": case "missing-glyph": return false; default: return true; } } var Ry2 = /* @__PURE__ */ new Map([["acceptCharset", "accept-charset"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"], ["crossOrigin", "crossorigin"], ["accentHeight", "accent-height"], ["alignmentBaseline", "alignment-baseline"], ["arabicForm", "arabic-form"], ["baselineShift", "baseline-shift"], ["capHeight", "cap-height"], ["clipPath", "clip-path"], ["clipRule", "clip-rule"], ["colorInterpolation", "color-interpolation"], ["colorInterpolationFilters", "color-interpolation-filters"], ["colorProfile", "color-profile"], ["colorRendering", "color-rendering"], ["dominantBaseline", "dominant-baseline"], ["enableBackground", "enable-background"], ["fillOpacity", "fill-opacity"], ["fillRule", "fill-rule"], ["floodColor", "flood-color"], ["floodOpacity", "flood-opacity"], ["fontFamily", "font-family"], ["fontSize", "font-size"], ["fontSizeAdjust", "font-size-adjust"], ["fontStretch", "font-stretch"], ["fontStyle", "font-style"], ["fontVariant", "font-variant"], ["fontWeight", "font-weight"], ["glyphName", "glyph-name"], ["glyphOrientationHorizontal", "glyph-orientation-horizontal"], ["glyphOrientationVertical", "glyph-orientation-vertical"], ["horizAdvX", "horiz-adv-x"], ["horizOriginX", "horiz-origin-x"], ["imageRendering", "image-rendering"], ["letterSpacing", "letter-spacing"], ["lightingColor", "lighting-color"], ["markerEnd", "marker-end"], ["markerMid", "marker-mid"], ["markerStart", "marker-start"], ["overlinePosition", "overline-position"], ["overlineThickness", "overline-thickness"], ["paintOrder", "paint-order"], ["panose-1", "panose-1"], ["pointerEvents", "pointer-events"], ["renderingIntent", "rendering-intent"], ["shapeRendering", "shape-rendering"], ["stopColor", "stop-color"], ["stopOpacity", "stop-opacity"], ["strikethroughPosition", "strikethrough-position"], ["strikethroughThickness", "strikethrough-thickness"], ["strokeDasharray", "stroke-dasharray"], ["strokeDashoffset", "stroke-dashoffset"], ["strokeLinecap", "stroke-linecap"], ["strokeLinejoin", "stroke-linejoin"], ["strokeMiterlimit", "stroke-miterlimit"], ["strokeOpacity", "stroke-opacity"], ["strokeWidth", "stroke-width"], ["textAnchor", "text-anchor"], ["textDecoration", "text-decoration"], ["textRendering", "text-rendering"], ["transformOrigin", "transform-origin"], ["underlinePosition", "underline-position"], ["underlineThickness", "underline-thickness"], ["unicodeBidi", "unicode-bidi"], ["unicodeRange", "unicode-range"], ["unitsPerEm", "units-per-em"], ["vAlphabetic", "v-alphabetic"], ["vHanging", "v-hanging"], ["vIdeographic", "v-ideographic"], ["vMathematical", "v-mathematical"], ["vectorEffect", "vector-effect"], ["vertAdvY", "vert-adv-y"], ["vertOriginX", "vert-origin-x"], ["vertOriginY", "vert-origin-y"], ["wordSpacing", "word-spacing"], ["writingMode", "writing-mode"], ["xmlnsXlink", "xmlns:xlink"], ["xHeight", "x-height"]]), jy2 = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i; function yn5(l28) { return jy2.test("" + l28) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : l28; } function aa3() { } var yc2 = null; function le24(l28) { return l28 = l28.target || l28.srcElement || window, l28.correspondingUseElement && (l28 = l28.correspondingUseElement), l28.nodeType === 3 ? l28.parentNode : l28; } var dt15 = null, Ut12 = null; function li3(l28) { var a36 = xt14(l28); if (a36 && (l28 = a36.stateNode)) { var t15 = l28[zl3] || null; l: switch (l28 = a36.stateNode, a36.type) { case "input": if (ic2(l28, t15.value, t15.defaultValue, t15.defaultValue, t15.checked, t15.defaultChecked, t15.type, t15.name), a36 = t15.name, t15.type === "radio" && a36 != null) { for (t15 = l28; t15.parentNode; ) t15 = t15.parentNode; for (t15 = t15.querySelectorAll('input[name="' + ol2("" + a36) + '"][type="radio"]'), a36 = 0; a36 < t15.length; a36++) { var u36 = t15[a36]; if (u36 !== l28 && u36.form === l28.form) { var n24 = u36[zl3] || null; if (!n24) throw Error(A53(90)); ic2(u36, n24.value, n24.defaultValue, n24.defaultValue, n24.checked, n24.defaultChecked, n24.type, n24.name); } } for (a36 = 0; a36 < t15.length; a36++) u36 = t15[a36], u36.form === l28.form && G02(u36); } break l; case "textarea": Z02(l28, t15.value, t15.defaultValue); break l; case "select": a36 = t15.value, a36 != null && Dt9(l28, !!t15.multiple, a36, false); } } } var Uf2 = false; function j02(l28, a36, t15) { if (Uf2) return l28(a36, t15); Uf2 = true; try { var u36 = l28(a36); return u36; } finally { if (Uf2 = false, (dt15 !== null || Ut12 !== null) && (mf2(), dt15 && (a36 = dt15, l28 = Ut12, Ut12 = dt15 = null, li3(a36), l28))) for (a36 = 0; a36 < l28.length; a36++) li3(l28[a36]); } } function Tu3(l28, a36) { var t15 = l28.stateNode; if (t15 === null) return null; var u36 = t15[zl3] || null; if (u36 === null) return null; t15 = u36[a36]; l: switch (a36) { case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": (u36 = !u36.disabled) || (l28 = l28.type, u36 = !(l28 === "button" || l28 === "input" || l28 === "select" || l28 === "textarea")), l28 = !u36; break l; default: l28 = false; } if (l28) return null; if (t15 && typeof t15 != "function") throw Error(A53(231, a36, typeof t15)); return t15; } var ca3 = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), hc2 = false; if (ca3) try { ft13 = {}, Object.defineProperty(ft13, "passive", { get: function() { hc2 = true; } }), window.addEventListener("test", ft13, ft13), window.removeEventListener("test", ft13, ft13); } catch { hc2 = false; } var ft13, Ea2 = null, ae31 = null, hn4 = null; function V02() { if (hn4) return hn4; var l28, a36 = ae31, t15 = a36.length, u36, n24 = "value" in Ea2 ? Ea2.value : Ea2.textContent, f46 = n24.length; for (l28 = 0; l28 < t15 && a36[l28] === n24[l28]; l28++) ; var c25 = t15 - l28; for (u36 = 1; u36 <= c25 && a36[t15 - u36] === n24[f46 - u36]; u36++) ; return hn4 = n24.slice(l28, 1 < u36 ? 1 - u36 : void 0); } function mn6(l28) { var a36 = l28.keyCode; return "charCode" in l28 ? (l28 = l28.charCode, l28 === 0 && a36 === 13 && (l28 = 13)) : l28 = a36, l28 === 10 && (l28 = 13), 32 <= l28 || l28 === 13 ? l28 : 0; } function $u3() { return true; } function ai4() { return false; } function bl3(l28) { function a36(t15, u36, n24, f46, c25) { this._reactName = t15, this._targetInst = n24, this.type = u36, this.nativeEvent = f46, this.target = c25, this.currentTarget = null; for (var e16 in l28) l28.hasOwnProperty(e16) && (t15 = l28[e16], this[e16] = t15 ? t15(f46) : f46[e16]); return this.isDefaultPrevented = (f46.defaultPrevented != null ? f46.defaultPrevented : f46.returnValue === false) ? $u3 : ai4, this.isPropagationStopped = ai4, this; } return L49(a36.prototype, { preventDefault: function() { this.defaultPrevented = true; var t15 = this.nativeEvent; t15 && (t15.preventDefault ? t15.preventDefault() : typeof t15.returnValue != "unknown" && (t15.returnValue = false), this.isDefaultPrevented = $u3); }, stopPropagation: function() { var t15 = this.nativeEvent; t15 && (t15.stopPropagation ? t15.stopPropagation() : typeof t15.cancelBubble != "unknown" && (t15.cancelBubble = true), this.isPropagationStopped = $u3); }, persist: function() { }, isPersistent: $u3 }), a36; } var at12 = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(l28) { return l28.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }, lf2 = bl3(at12), Cu3 = L49({}, at12, { view: 0, detail: 0 }), Vy2 = bl3(Cu3), Hf2, Nf2, Ft8, af2 = L49({}, Cu3, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: te32, button: 0, buttons: 0, relatedTarget: function(l28) { return l28.relatedTarget === void 0 ? l28.fromElement === l28.srcElement ? l28.toElement : l28.fromElement : l28.relatedTarget; }, movementX: function(l28) { return "movementX" in l28 ? l28.movementX : (l28 !== Ft8 && (Ft8 && l28.type === "mousemove" ? (Hf2 = l28.screenX - Ft8.screenX, Nf2 = l28.screenY - Ft8.screenY) : Nf2 = Hf2 = 0, Ft8 = l28), Hf2); }, movementY: function(l28) { return "movementY" in l28 ? l28.movementY : Nf2; } }), ti4 = bl3(af2), xy2 = L49({}, af2, { dataTransfer: 0 }), py2 = bl3(xy2), Ky2 = L49({}, Cu3, { relatedTarget: 0 }), Bf2 = bl3(Ky2), Ly2 = L49({}, at12, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Jy2 = bl3(Ly2), Wy2 = L49({}, at12, { clipboardData: function(l28) { return "clipboardData" in l28 ? l28.clipboardData : window.clipboardData; } }), wy2 = bl3(Wy2), Fy2 = L49({}, at12, { data: 0 }), ui3 = bl3(Fy2), $y2 = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }, ky2 = { 8: "Backspace", 9: "Tab", 12: "Clear", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 45: "Insert", 46: "Delete", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NumLock", 145: "ScrollLock", 224: "Meta" }, Iy2 = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; function Py2(l28) { var a36 = this.nativeEvent; return a36.getModifierState ? a36.getModifierState(l28) : (l28 = Iy2[l28]) ? !!a36[l28] : false; } function te32() { return Py2; } var ry2 = L49({}, Cu3, { key: function(l28) { if (l28.key) { var a36 = $y2[l28.key] || l28.key; if (a36 !== "Unidentified") return a36; } return l28.type === "keypress" ? (l28 = mn6(l28), l28 === 13 ? "Enter" : String.fromCharCode(l28)) : l28.type === "keydown" || l28.type === "keyup" ? ky2[l28.keyCode] || "Unidentified" : ""; }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: te32, charCode: function(l28) { return l28.type === "keypress" ? mn6(l28) : 0; }, keyCode: function(l28) { return l28.type === "keydown" || l28.type === "keyup" ? l28.keyCode : 0; }, which: function(l28) { return l28.type === "keypress" ? mn6(l28) : l28.type === "keydown" || l28.type === "keyup" ? l28.keyCode : 0; } }), lh2 = bl3(ry2), ah2 = L49({}, af2, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), ni4 = bl3(ah2), th2 = L49({}, Cu3, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: te32 }), uh2 = bl3(th2), nh2 = L49({}, at12, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), fh2 = bl3(nh2), ch2 = L49({}, af2, { deltaX: function(l28) { return "deltaX" in l28 ? l28.deltaX : "wheelDeltaX" in l28 ? -l28.wheelDeltaX : 0; }, deltaY: function(l28) { return "deltaY" in l28 ? l28.deltaY : "wheelDeltaY" in l28 ? -l28.wheelDeltaY : "wheelDelta" in l28 ? -l28.wheelDelta : 0; }, deltaZ: 0, deltaMode: 0 }), eh2 = bl3(ch2), ih2 = L49({}, at12, { newState: 0, oldState: 0 }), vh2 = bl3(ih2), yh2 = [9, 13, 27, 32], ue21 = ca3 && "CompositionEvent" in window, fu3 = null; ca3 && "documentMode" in document && (fu3 = document.documentMode); var hh2 = ca3 && "TextEvent" in window && !fu3, x02 = ca3 && (!ue21 || fu3 && 8 < fu3 && 11 >= fu3), fi3 = " ", ci3 = false; function p02(l28, a36) { switch (l28) { case "keyup": return yh2.indexOf(a36.keyCode) !== -1; case "keydown": return a36.keyCode !== 229; case "keypress": case "mousedown": case "focusout": return true; default: return false; } } function K02(l28) { return l28 = l28.detail, typeof l28 == "object" && "data" in l28 ? l28.data : null; } var St11 = false; function mh2(l28, a36) { switch (l28) { case "compositionend": return K02(a36); case "keypress": return a36.which !== 32 ? null : (ci3 = true, fi3); case "textInput": return l28 = a36.data, l28 === fi3 && ci3 ? null : l28; default: return null; } } function dh2(l28, a36) { if (St11) return l28 === "compositionend" || !ue21 && p02(l28, a36) ? (l28 = V02(), hn4 = ae31 = Ea2 = null, St11 = false, l28) : null; switch (l28) { case "paste": return null; case "keypress": if (!(a36.ctrlKey || a36.altKey || a36.metaKey) || a36.ctrlKey && a36.altKey) { if (a36.char && 1 < a36.char.length) return a36.char; if (a36.which) return String.fromCharCode(a36.which); } return null; case "compositionend": return x02 && a36.locale !== "ko" ? null : a36.data; default: return null; } } var Sh2 = { color: true, date: true, datetime: true, "datetime-local": true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true }; function ei3(l28) { var a36 = l28 && l28.nodeName && l28.nodeName.toLowerCase(); return a36 === "input" ? !!Sh2[l28.type] : a36 === "textarea"; } function L02(l28, a36, t15, u36) { dt15 ? Ut12 ? Ut12.push(u36) : Ut12 = [u36] : dt15 = u36, a36 = Wn4(a36, "onChange"), 0 < a36.length && (t15 = new lf2("onChange", "change", null, t15, u36), l28.push({ event: t15, listeners: a36 })); } var cu3 = null, Eu3 = null; function gh2(l28) { jv2(l28, 0); } function tf3(l28) { var a36 = tu3(l28); if (G02(a36)) return l28; } function ii4(l28, a36) { if (l28 === "change") return a36; } var J02 = false; ca3 && (ca3 ? (Iu3 = "oninput" in document, Iu3 || (qf2 = document.createElement("div"), qf2.setAttribute("oninput", "return;"), Iu3 = typeof qf2.oninput == "function"), ku3 = Iu3) : ku3 = false, J02 = ku3 && (!document.documentMode || 9 < document.documentMode)); var ku3, Iu3, qf2; function vi3() { cu3 && (cu3.detachEvent("onpropertychange", W02), Eu3 = cu3 = null); } function W02(l28) { if (l28.propertyName === "value" && tf3(Eu3)) { var a36 = []; L02(a36, Eu3, l28, le24(l28)), j02(gh2, a36); } } function zh2(l28, a36, t15) { l28 === "focusin" ? (vi3(), cu3 = a36, Eu3 = t15, cu3.attachEvent("onpropertychange", W02)) : l28 === "focusout" && vi3(); } function bh2(l28) { if (l28 === "selectionchange" || l28 === "keyup" || l28 === "keydown") return tf3(Eu3); } function Ah2(l28, a36) { if (l28 === "click") return tf3(a36); } function Th2(l28, a36) { if (l28 === "input" || l28 === "change") return tf3(a36); } function Eh2(l28, a36) { return l28 === a36 && (l28 !== 0 || 1 / l28 === 1 / a36) || l28 !== l28 && a36 !== a36; } var Nl2 = typeof Object.is == "function" ? Object.is : Eh2; function Mu3(l28, a36) { if (Nl2(l28, a36)) return true; if (typeof l28 != "object" || l28 === null || typeof a36 != "object" || a36 === null) return false; var t15 = Object.keys(l28), u36 = Object.keys(a36); if (t15.length !== u36.length) return false; for (u36 = 0; u36 < t15.length; u36++) { var n24 = t15[u36]; if (!fc2.call(a36, n24) || !Nl2(l28[n24], a36[n24])) return false; } return true; } function yi3(l28) { for (; l28 && l28.firstChild; ) l28 = l28.firstChild; return l28; } function hi3(l28, a36) { var t15 = yi3(l28); l28 = 0; for (var u36; t15; ) { if (t15.nodeType === 3) { if (u36 = l28 + t15.textContent.length, l28 <= a36 && u36 >= a36) return { node: t15, offset: a36 - l28 }; l28 = u36; } l: { for (; t15; ) { if (t15.nextSibling) { t15 = t15.nextSibling; break l; } t15 = t15.parentNode; } t15 = void 0; } t15 = yi3(t15); } } function w02(l28, a36) { return l28 && a36 ? l28 === a36 ? true : l28 && l28.nodeType === 3 ? false : a36 && a36.nodeType === 3 ? w02(l28, a36.parentNode) : "contains" in l28 ? l28.contains(a36) : l28.compareDocumentPosition ? !!(l28.compareDocumentPosition(a36) & 16) : false : false; } function F02(l28) { l28 = l28 != null && l28.ownerDocument != null && l28.ownerDocument.defaultView != null ? l28.ownerDocument.defaultView : window; for (var a36 = qn4(l28.document); a36 instanceof l28.HTMLIFrameElement; ) { try { var t15 = typeof a36.contentWindow.location.href == "string"; } catch { t15 = false; } if (t15) l28 = a36.contentWindow; else break; a36 = qn4(l28.document); } return a36; } function ne30(l28) { var a36 = l28 && l28.nodeName && l28.nodeName.toLowerCase(); return a36 && (a36 === "input" && (l28.type === "text" || l28.type === "search" || l28.type === "tel" || l28.type === "url" || l28.type === "password") || a36 === "textarea" || l28.contentEditable === "true"); } var Mh2 = ca3 && "documentMode" in document && 11 >= document.documentMode, gt13 = null, mc2 = null, eu3 = null, dc2 = false; function mi5(l28, a36, t15) { var u36 = t15.window === t15 ? t15.document : t15.nodeType === 9 ? t15 : t15.ownerDocument; dc2 || gt13 == null || gt13 !== qn4(u36) || (u36 = gt13, "selectionStart" in u36 && ne30(u36) ? u36 = { start: u36.selectionStart, end: u36.selectionEnd } : (u36 = (u36.ownerDocument && u36.ownerDocument.defaultView || window).getSelection(), u36 = { anchorNode: u36.anchorNode, anchorOffset: u36.anchorOffset, focusNode: u36.focusNode, focusOffset: u36.focusOffset }), eu3 && Mu3(eu3, u36) || (eu3 = u36, u36 = Wn4(mc2, "onSelect"), 0 < u36.length && (a36 = new lf2("onSelect", "select", null, a36, t15), l28.push({ event: a36, listeners: u36 }), a36.target = gt13))); } function ja3(l28, a36) { var t15 = {}; return t15[l28.toLowerCase()] = a36.toLowerCase(), t15["Webkit" + l28] = "webkit" + a36, t15["Moz" + l28] = "moz" + a36, t15; } var zt9 = { animationend: ja3("Animation", "AnimationEnd"), animationiteration: ja3("Animation", "AnimationIteration"), animationstart: ja3("Animation", "AnimationStart"), transitionrun: ja3("Transition", "TransitionRun"), transitionstart: ja3("Transition", "TransitionStart"), transitioncancel: ja3("Transition", "TransitionCancel"), transitionend: ja3("Transition", "TransitionEnd") }, _f2 = {}, $02 = {}; ca3 && ($02 = document.createElement("div").style, "AnimationEvent" in window || (delete zt9.animationend.animation, delete zt9.animationiteration.animation, delete zt9.animationstart.animation), "TransitionEvent" in window || delete zt9.transitionend.transition); function tt12(l28) { if (_f2[l28]) return _f2[l28]; if (!zt9[l28]) return l28; var a36 = zt9[l28], t15; for (t15 in a36) if (a36.hasOwnProperty(t15) && t15 in $02) return _f2[l28] = a36[t15]; return l28; } var k02 = tt12("animationend"), I02 = tt12("animationiteration"), P02 = tt12("animationstart"), Oh2 = tt12("transitionrun"), Dh2 = tt12("transitionstart"), Uh2 = tt12("transitioncancel"), r04 = tt12("transitionend"), l110 = /* @__PURE__ */ new Map(), Sc2 = "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); Sc2.push("scrollEnd"); function Vl2(l28, a36) { l110.set(l28, a36), lt15(a36, [l28]); } var _n4 = typeof reportError == "function" ? reportError : function(l28) { if (typeof window == "object" && typeof window.ErrorEvent == "function") { var a36 = new window.ErrorEvent("error", { bubbles: true, cancelable: true, message: typeof l28 == "object" && l28 !== null && typeof l28.message == "string" ? String(l28.message) : String(l28), error: l28 }); if (!window.dispatchEvent(a36)) return; } else if (typeof process == "object" && typeof process.emit == "function") { process.emit("uncaughtException", l28); return; } console.error(l28); }, ql3 = [], bt16 = 0, fe20 = 0; function uf3() { for (var l28 = bt16, a36 = fe20 = bt16 = 0; a36 < l28; ) { var t15 = ql3[a36]; ql3[a36++] = null; var u36 = ql3[a36]; ql3[a36++] = null; var n24 = ql3[a36]; ql3[a36++] = null; var f46 = ql3[a36]; if (ql3[a36++] = null, u36 !== null && n24 !== null) { var c25 = u36.pending; c25 === null ? n24.next = n24 : (n24.next = c25.next, c25.next = n24), u36.pending = n24; } f46 !== 0 && a110(t15, n24, f46); } } function nf3(l28, a36, t15, u36) { ql3[bt16++] = l28, ql3[bt16++] = a36, ql3[bt16++] = t15, ql3[bt16++] = u36, fe20 |= u36, l28.lanes |= u36, l28 = l28.alternate, l28 !== null && (l28.lanes |= u36); } function ce30(l28, a36, t15, u36) { return nf3(l28, a36, t15, u36), Yn4(l28); } function ut15(l28, a36) { return nf3(l28, null, null, a36), Yn4(l28); } function a110(l28, a36, t15) { l28.lanes |= t15; var u36 = l28.alternate; u36 !== null && (u36.lanes |= t15); for (var n24 = false, f46 = l28.return; f46 !== null; ) f46.childLanes |= t15, u36 = f46.alternate, u36 !== null && (u36.childLanes |= t15), f46.tag === 22 && (l28 = f46.stateNode, l28 === null || l28._visibility & 1 || (n24 = true)), l28 = f46, f46 = f46.return; return l28.tag === 3 ? (f46 = l28.stateNode, n24 && a36 !== null && (n24 = 31 - Ul3(t15), l28 = f46.hiddenUpdates, u36 = l28[n24], u36 === null ? l28[n24] = [a36] : u36.push(a36), a36.lane = t15 | 536870912), f46) : null; } function Yn4(l28) { if (50 < zu3) throw zu3 = 0, Qc2 = null, Error(A53(185)); for (var a36 = l28.return; a36 !== null; ) l28 = a36, a36 = l28.return; return l28.tag === 3 ? l28.stateNode : null; } var At10 = {}; function Hh2(l28, a36, t15, u36) { this.tag = l28, this.key = t15, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.refCleanup = this.ref = null, this.pendingProps = a36, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = u36, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null; } function El3(l28, a36, t15, u36) { return new Hh2(l28, a36, t15, u36); } function ee31(l28) { return l28 = l28.prototype, !(!l28 || !l28.isReactComponent); } function ua3(l28, a36) { var t15 = l28.alternate; return t15 === null ? (t15 = El3(l28.tag, a36, l28.key, l28.mode), t15.elementType = l28.elementType, t15.type = l28.type, t15.stateNode = l28.stateNode, t15.alternate = l28, l28.alternate = t15) : (t15.pendingProps = a36, t15.type = l28.type, t15.flags = 0, t15.subtreeFlags = 0, t15.deletions = null), t15.flags = l28.flags & 65011712, t15.childLanes = l28.childLanes, t15.lanes = l28.lanes, t15.child = l28.child, t15.memoizedProps = l28.memoizedProps, t15.memoizedState = l28.memoizedState, t15.updateQueue = l28.updateQueue, a36 = l28.dependencies, t15.dependencies = a36 === null ? null : { lanes: a36.lanes, firstContext: a36.firstContext }, t15.sibling = l28.sibling, t15.index = l28.index, t15.ref = l28.ref, t15.refCleanup = l28.refCleanup, t15; } function t14(l28, a36) { l28.flags &= 65011714; var t15 = l28.alternate; return t15 === null ? (l28.childLanes = 0, l28.lanes = a36, l28.child = null, l28.subtreeFlags = 0, l28.memoizedProps = null, l28.memoizedState = null, l28.updateQueue = null, l28.dependencies = null, l28.stateNode = null) : (l28.childLanes = t15.childLanes, l28.lanes = t15.lanes, l28.child = t15.child, l28.subtreeFlags = 0, l28.deletions = null, l28.memoizedProps = t15.memoizedProps, l28.memoizedState = t15.memoizedState, l28.updateQueue = t15.updateQueue, l28.type = t15.type, a36 = t15.dependencies, l28.dependencies = a36 === null ? null : { lanes: a36.lanes, firstContext: a36.firstContext }), l28; } function dn5(l28, a36, t15, u36, n24, f46) { var c25 = 0; if (u36 = l28, typeof l28 == "function") ee31(l28) && (c25 = 1); else if (typeof l28 == "string") c25 = qm2(l28, t15, Ll2.current) ? 26 : l28 === "html" || l28 === "head" || l28 === "body" ? 27 : 5; else l: switch (l28) { case ac2: return l28 = El3(31, t15, a36, n24), l28.elementType = ac2, l28.lanes = f46, l28; case yt14: return Ja2(t15.children, n24, f46, a36); case M02: c25 = 8, n24 |= 24; break; case Pf2: return l28 = El3(12, t15, a36, n24 | 2), l28.elementType = Pf2, l28.lanes = f46, l28; case rf3: return l28 = El3(13, t15, a36, n24), l28.elementType = rf3, l28.lanes = f46, l28; case lc2: return l28 = El3(19, t15, a36, n24), l28.elementType = lc2, l28.lanes = f46, l28; default: if (typeof l28 == "object" && l28 !== null) switch (l28.$$typeof) { case la3: c25 = 10; break l; case O02: c25 = 9; break l; case wc2: c25 = 11; break l; case Fc2: c25 = 14; break l; case da3: c25 = 16, u36 = null; break l; } c25 = 29, t15 = Error(A53(130, l28 === null ? "null" : typeof l28, "")), u36 = null; } return a36 = El3(c25, t15, a36, n24), a36.elementType = l28, a36.type = u36, a36.lanes = f46, a36; } function Ja2(l28, a36, t15, u36) { return l28 = El3(7, l28, u36, a36), l28.lanes = t15, l28; } function Yf2(l28, a36, t15) { return l28 = El3(6, l28, null, a36), l28.lanes = t15, l28; } function u110(l28) { var a36 = El3(18, null, null, 0); return a36.stateNode = l28, a36; } function sf2(l28, a36, t15) { return a36 = El3(4, l28.children !== null ? l28.children : [], l28.key, a36), a36.lanes = t15, a36.stateNode = { containerInfo: l28.containerInfo, pendingChildren: null, implementation: l28.implementation }, a36; } var di3 = /* @__PURE__ */ new WeakMap(); function Xl2(l28, a36) { if (typeof l28 == "object" && l28 !== null) { var t15 = di3.get(l28); return t15 !== void 0 ? t15 : (a36 = { value: l28, source: a36, stack: Fe19(a36) }, di3.set(l28, a36), a36); } return { value: l28, source: a36, stack: Fe19(a36) }; } var Tt10 = [], Et15 = 0, sn5 = null, Ou3 = 0, Yl2 = [], sl3 = 0, Xa2 = null, xl3 = 1, pl3 = ""; function Pl3(l28, a36) { Tt10[Et15++] = Ou3, Tt10[Et15++] = sn5, sn5 = l28, Ou3 = a36; } function n110(l28, a36, t15) { Yl2[sl3++] = xl3, Yl2[sl3++] = pl3, Yl2[sl3++] = Xa2, Xa2 = l28; var u36 = xl3; l28 = pl3; var n24 = 32 - Ul3(u36) - 1; u36 &= ~(1 << n24), t15 += 1; var f46 = 32 - Ul3(a36) + n24; if (30 < f46) { var c25 = n24 - n24 % 5; f46 = (u36 & (1 << c25) - 1).toString(32), u36 >>= c25, n24 -= c25, xl3 = 1 << 32 - Ul3(a36) + n24 | t15 << n24 | u36, pl3 = f46 + l28; } else xl3 = 1 << f46 | t15 << n24 | u36, pl3 = l28; } function ie25(l28) { l28.return !== null && (Pl3(l28, 1), n110(l28, 1, 0)); } function ve27(l28) { for (; l28 === sn5; ) sn5 = Tt10[--Et15], Tt10[Et15] = null, Ou3 = Tt10[--Et15], Tt10[Et15] = null; for (; l28 === Xa2; ) Xa2 = Yl2[--sl3], Yl2[sl3] = null, pl3 = Yl2[--sl3], Yl2[sl3] = null, xl3 = Yl2[--sl3], Yl2[sl3] = null; } function f110(l28, a36) { Yl2[sl3++] = xl3, Yl2[sl3++] = pl3, Yl2[sl3++] = Xa2, xl3 = a36.id, pl3 = a36.overflow, Xa2 = l28; } var el2 = null, K45 = null, Y43 = false, Ha3 = null, Gl2 = false, gc2 = Error(A53(519)); function Ga2(l28) { var a36 = Error(A53(418, 1 < arguments.length && arguments[1] !== void 0 && arguments[1] ? "text" : "HTML", "")); throw Du3(Xl2(a36, l28)), gc2; } function Si4(l28) { var a36 = l28.stateNode, t15 = l28.type, u36 = l28.memoizedProps; switch (a36[cl3] = l28, a36[zl3] = u36, t15) { case "dialog": N56("cancel", a36), N56("close", a36); break; case "iframe": case "object": case "embed": N56("load", a36); break; case "video": case "audio": for (t15 = 0; t15 < Bu3.length; t15++) N56(Bu3[t15], a36); break; case "source": N56("error", a36); break; case "img": case "image": case "link": N56("error", a36), N56("load", a36); break; case "details": N56("toggle", a36); break; case "input": N56("invalid", a36), Q02(a36, u36.value, u36.defaultValue, u36.checked, u36.defaultChecked, u36.type, u36.name, true); break; case "select": N56("invalid", a36); break; case "textarea": N56("invalid", a36), C02(a36, u36.value, u36.defaultValue, u36.children); } t15 = u36.children, typeof t15 != "string" && typeof t15 != "number" && typeof t15 != "bigint" || a36.textContent === "" + t15 || u36.suppressHydrationWarning === true || xv2(a36.textContent, t15) ? (u36.popover != null && (N56("beforetoggle", a36), N56("toggle", a36)), u36.onScroll != null && N56("scroll", a36), u36.onScrollEnd != null && N56("scrollend", a36), u36.onClick != null && (a36.onclick = aa3), a36 = true) : a36 = false, a36 || Ga2(l28, true); } function gi3(l28) { for (el2 = l28.return; el2; ) switch (el2.tag) { case 5: case 31: case 13: Gl2 = false; return; case 27: case 3: Gl2 = true; return; default: el2 = el2.return; } } function ct16(l28) { if (l28 !== el2) return false; if (!Y43) return gi3(l28), Y43 = true, false; var a36 = l28.tag, t15; if ((t15 = a36 !== 3 && a36 !== 27) && ((t15 = a36 === 5) && (t15 = l28.type, t15 = !(t15 !== "form" && t15 !== "button") || Vc2(l28.type, l28.memoizedProps)), t15 = !t15), t15 && K45 && Ga2(l28), gi3(l28), a36 === 13) { if (l28 = l28.memoizedState, l28 = l28 !== null ? l28.dehydrated : null, !l28) throw Error(A53(317)); K45 = u02(l28); } else if (a36 === 31) { if (l28 = l28.memoizedState, l28 = l28 !== null ? l28.dehydrated : null, !l28) throw Error(A53(317)); K45 = u02(l28); } else a36 === 27 ? (a36 = K45, Ra3(l28.type) ? (l28 = Lc2, Lc2 = null, K45 = l28) : K45 = a36) : K45 = el2 ? Zl3(l28.stateNode.nextSibling) : null; return true; } function $a2() { K45 = el2 = null, Y43 = false; } function of2() { var l28 = Ha3; return l28 !== null && (Sl2 === null ? Sl2 = l28 : Sl2.push.apply(Sl2, l28), Ha3 = null), l28; } function Du3(l28) { Ha3 === null ? Ha3 = [l28] : Ha3.push(l28); } var zc2 = Jl3(null), nt15 = null, ta2 = null; function ga3(l28, a36, t15) { x50(zc2, a36._currentValue), a36._currentValue = t15; } function na3(l28) { l28._currentValue = zc2.current, nl2(zc2); } function bc2(l28, a36, t15) { for (; l28 !== null; ) { var u36 = l28.alternate; if ((l28.childLanes & a36) !== a36 ? (l28.childLanes |= a36, u36 !== null && (u36.childLanes |= a36)) : u36 !== null && (u36.childLanes & a36) !== a36 && (u36.childLanes |= a36), l28 === t15) break; l28 = l28.return; } } function Ac2(l28, a36, t15, u36) { var n24 = l28.child; for (n24 !== null && (n24.return = l28); n24 !== null; ) { var f46 = n24.dependencies; if (f46 !== null) { var c25 = n24.child; f46 = f46.firstContext; l: for (; f46 !== null; ) { var e16 = f46; f46 = n24; for (var i20 = 0; i20 < a36.length; i20++) if (e16.context === a36[i20]) { f46.lanes |= t15, e16 = f46.alternate, e16 !== null && (e16.lanes |= t15), bc2(f46.return, t15, l28), u36 || (c25 = null); break l; } f46 = e16.next; } } else if (n24.tag === 18) { if (c25 = n24.return, c25 === null) throw Error(A53(341)); c25.lanes |= t15, f46 = c25.alternate, f46 !== null && (f46.lanes |= t15), bc2(c25, t15, l28), c25 = null; } else c25 = n24.child; if (c25 !== null) c25.return = n24; else for (c25 = n24; c25 !== null; ) { if (c25 === l28) { c25 = null; break; } if (n24 = c25.sibling, n24 !== null) { n24.return = c25.return, c25 = n24; break; } c25 = c25.return; } n24 = c25; } } function pt13(l28, a36, t15, u36) { l28 = null; for (var n24 = a36, f46 = false; n24 !== null; ) { if (!f46) { if ((n24.flags & 524288) !== 0) f46 = true; else if ((n24.flags & 262144) !== 0) break; } if (n24.tag === 10) { var c25 = n24.alternate; if (c25 === null) throw Error(A53(387)); if (c25 = c25.memoizedProps, c25 !== null) { var e16 = n24.type; Nl2(n24.pendingProps.value, c25.value) || (l28 !== null ? l28.push(e16) : l28 = [e16]); } } else if (n24 === Un4.current) { if (c25 = n24.alternate, c25 === null) throw Error(A53(387)); c25.memoizedState.memoizedState !== n24.memoizedState.memoizedState && (l28 !== null ? l28.push(_u3) : l28 = [_u3]); } n24 = n24.return; } l28 !== null && Ac2(a36, l28, t15, u36), a36.flags |= 262144; } function on5(l28) { for (l28 = l28.firstContext; l28 !== null; ) { if (!Nl2(l28.context._currentValue, l28.memoizedValue)) return true; l28 = l28.next; } return false; } function ka2(l28) { nt15 = l28, ta2 = null, l28 = l28.dependencies, l28 !== null && (l28.firstContext = null); } function il2(l28) { return c110(nt15, l28); } function Pu3(l28, a36) { return nt15 === null && ka2(l28), c110(l28, a36); } function c110(l28, a36) { var t15 = a36._currentValue; if (a36 = { context: a36, memoizedValue: t15, next: null }, ta2 === null) { if (l28 === null) throw Error(A53(308)); ta2 = a36, l28.dependencies = { lanes: 0, firstContext: a36 }, l28.flags |= 524288; } else ta2 = ta2.next = a36; return t15; } var Nh2 = typeof AbortController < "u" ? AbortController : function() { var l28 = [], a36 = this.signal = { aborted: false, addEventListener: function(t15, u36) { l28.push(u36); } }; this.abort = function() { a36.aborted = true, l28.forEach(function(t15) { return t15(); }); }; }, Bh2 = al2.unstable_scheduleCallback, qh2 = al2.unstable_NormalPriority, P43 = { $$typeof: la3, Consumer: null, Provider: null, _currentValue: null, _currentValue2: null, _threadCount: 0 }; function ye25() { return { controller: new Nh2(), data: /* @__PURE__ */ new Map(), refCount: 0 }; } function Ru3(l28) { l28.refCount--, l28.refCount === 0 && Bh2(qh2, function() { l28.controller.abort(); }); } var iu3 = null, Tc2 = 0, ot13 = 0, Ht9 = null; function _h2(l28, a36) { if (iu3 === null) { var t15 = iu3 = []; Tc2 = 0, ot13 = Qe13(), Ht9 = { status: "pending", value: void 0, then: function(u36) { t15.push(u36); } }; } return Tc2++, a36.then(zi4, zi4), a36; } function zi4() { if (--Tc2 === 0 && iu3 !== null) { Ht9 !== null && (Ht9.status = "fulfilled"); var l28 = iu3; iu3 = null, ot13 = 0, Ht9 = null; for (var a36 = 0; a36 < l28.length; a36++) (0, l28[a36])(); } } function Yh2(l28, a36) { var t15 = [], u36 = { status: "pending", value: null, reason: null, then: function(n24) { t15.push(n24); } }; return l28.then(function() { u36.status = "fulfilled", u36.value = a36; for (var n24 = 0; n24 < t15.length; n24++) (0, t15[n24])(a36); }, function(n24) { for (u36.status = "rejected", u36.reason = n24, n24 = 0; n24 < t15.length; n24++) (0, t15[n24])(void 0); }), u36; } var bi4 = D54.S; D54.S = function(l28, a36) { Ev2 = Ol2(), typeof a36 == "object" && a36 !== null && typeof a36.then == "function" && _h2(l28, a36), bi4 !== null && bi4(l28, a36); }; var Wa2 = Jl3(null); function he26() { var l28 = Wa2.current; return l28 !== null ? l28 : V34.pooledCache; } function Sn5(l28, a36) { a36 === null ? x50(Wa2, Wa2.current) : x50(Wa2, a36.pool); } function e15() { var l28 = he26(); return l28 === null ? null : { parent: P43._currentValue, pool: l28 }; } var Kt8 = Error(A53(460)), me25 = Error(A53(474)), ff3 = Error(A53(542)), Xn4 = { then: function() { } }; function Ai3(l28) { return l28 = l28.status, l28 === "fulfilled" || l28 === "rejected"; } function i110(l28, a36, t15) { switch (t15 = l28[t15], t15 === void 0 ? l28.push(a36) : t15 !== a36 && (a36.then(aa3, aa3), a36 = t15), a36.status) { case "fulfilled": return a36.value; case "rejected": throw l28 = a36.reason, Ei4(l28), l28; default: if (typeof a36.status == "string") a36.then(aa3, aa3); else { if (l28 = V34, l28 !== null && 100 < l28.shellSuspendCounter) throw Error(A53(482)); l28 = a36, l28.status = "pending", l28.then(function(u36) { if (a36.status === "pending") { var n24 = a36; n24.status = "fulfilled", n24.value = u36; } }, function(u36) { if (a36.status === "pending") { var n24 = a36; n24.status = "rejected", n24.reason = u36; } }); } switch (a36.status) { case "fulfilled": return a36.value; case "rejected": throw l28 = a36.reason, Ei4(l28), l28; } throw wa3 = a36, Kt8; } } function pa2(l28) { try { var a36 = l28._init; return a36(l28._payload); } catch (t15) { throw t15 !== null && typeof t15 == "object" && typeof t15.then == "function" ? (wa3 = t15, Kt8) : t15; } } var wa3 = null; function Ti4() { if (wa3 === null) throw Error(A53(459)); var l28 = wa3; return wa3 = null, l28; } function Ei4(l28) { if (l28 === Kt8 || l28 === ff3) throw Error(A53(483)); } var Nt11 = null, Uu3 = 0; function ru3(l28) { var a36 = Uu3; return Uu3 += 1, Nt11 === null && (Nt11 = []), i110(Nt11, l28, a36); } function $t9(l28, a36) { a36 = a36.props.ref, l28.ref = a36 !== void 0 ? a36 : null; } function ln5(l28, a36) { throw a36.$$typeof === zy2 ? Error(A53(525)) : (l28 = Object.prototype.toString.call(a36), Error(A53(31, l28 === "[object Object]" ? "object with keys {" + Object.keys(a36).join(", ") + "}" : l28))); } function v110(l28) { function a36(y53, v43) { if (l28) { var h46 = y53.deletions; h46 === null ? (y53.deletions = [v43], y53.flags |= 16) : h46.push(v43); } } function t15(y53, v43) { if (!l28) return null; for (; v43 !== null; ) a36(y53, v43), v43 = v43.sibling; return null; } function u36(y53) { for (var v43 = /* @__PURE__ */ new Map(); y53 !== null; ) y53.key !== null ? v43.set(y53.key, y53) : v43.set(y53.index, y53), y53 = y53.sibling; return v43; } function n24(y53, v43) { return y53 = ua3(y53, v43), y53.index = 0, y53.sibling = null, y53; } function f46(y53, v43, h46) { return y53.index = h46, l28 ? (h46 = y53.alternate, h46 !== null ? (h46 = h46.index, h46 < v43 ? (y53.flags |= 67108866, v43) : h46) : (y53.flags |= 67108866, v43)) : (y53.flags |= 1048576, v43); } function c25(y53) { return l28 && y53.alternate === null && (y53.flags |= 67108866), y53; } function e16(y53, v43, h46, z47) { return v43 === null || v43.tag !== 6 ? (v43 = Yf2(h46, y53.mode, z47), v43.return = y53, v43) : (v43 = n24(v43, h46), v43.return = y53, v43); } function i20(y53, v43, h46, z47) { var M50 = h46.type; return M50 === yt14 ? g45(y53, v43, h46.props.children, z47, h46.key) : v43 !== null && (v43.elementType === M50 || typeof M50 == "object" && M50 !== null && M50.$$typeof === da3 && pa2(M50) === v43.type) ? (v43 = n24(v43, h46.props), $t9(v43, h46), v43.return = y53, v43) : (v43 = dn5(h46.type, h46.key, h46.props, null, y53.mode, z47), $t9(v43, h46), v43.return = y53, v43); } function m37(y53, v43, h46, z47) { return v43 === null || v43.tag !== 4 || v43.stateNode.containerInfo !== h46.containerInfo || v43.stateNode.implementation !== h46.implementation ? (v43 = sf2(h46, y53.mode, z47), v43.return = y53, v43) : (v43 = n24(v43, h46.children || []), v43.return = y53, v43); } function g45(y53, v43, h46, z47, M50) { return v43 === null || v43.tag !== 7 ? (v43 = Ja2(h46, y53.mode, z47, M50), v43.return = y53, v43) : (v43 = n24(v43, h46), v43.return = y53, v43); } function b45(y53, v43, h46) { if (typeof v43 == "string" && v43 !== "" || typeof v43 == "number" || typeof v43 == "bigint") return v43 = Yf2("" + v43, y53.mode, h46), v43.return = y53, v43; if (typeof v43 == "object" && v43 !== null) { switch (v43.$$typeof) { case Lu3: return h46 = dn5(v43.type, v43.key, v43.props, null, y53.mode, h46), $t9(h46, v43), h46.return = y53, h46; case lu3: return v43 = sf2(v43, y53.mode, h46), v43.return = y53, v43; case da3: return v43 = pa2(v43), b45(y53, v43, h46); } if (au3(v43) || wt11(v43)) return v43 = Ja2(v43, y53.mode, h46, null), v43.return = y53, v43; if (typeof v43.then == "function") return b45(y53, ru3(v43), h46); if (v43.$$typeof === la3) return b45(y53, Pu3(y53, v43), h46); ln5(y53, v43); } return null; } function d31(y53, v43, h46, z47) { var M50 = v43 !== null ? v43.key : null; if (typeof h46 == "string" && h46 !== "" || typeof h46 == "number" || typeof h46 == "bigint") return M50 !== null ? null : e16(y53, v43, "" + h46, z47); if (typeof h46 == "object" && h46 !== null) { switch (h46.$$typeof) { case Lu3: return h46.key === M50 ? i20(y53, v43, h46, z47) : null; case lu3: return h46.key === M50 ? m37(y53, v43, h46, z47) : null; case da3: return h46 = pa2(h46), d31(y53, v43, h46, z47); } if (au3(h46) || wt11(h46)) return M50 !== null ? null : g45(y53, v43, h46, z47, null); if (typeof h46.then == "function") return d31(y53, v43, ru3(h46), z47); if (h46.$$typeof === la3) return d31(y53, v43, Pu3(y53, h46), z47); ln5(y53, h46); } return null; } function S60(y53, v43, h46, z47, M50) { if (typeof z47 == "string" && z47 !== "" || typeof z47 == "number" || typeof z47 == "bigint") return y53 = y53.get(h46) || null, e16(v43, y53, "" + z47, M50); if (typeof z47 == "object" && z47 !== null) { switch (z47.$$typeof) { case Lu3: return y53 = y53.get(z47.key === null ? h46 : z47.key) || null, i20(v43, y53, z47, M50); case lu3: return y53 = y53.get(z47.key === null ? h46 : z47.key) || null, m37(v43, y53, z47, M50); case da3: return z47 = pa2(z47), S60(y53, v43, h46, z47, M50); } if (au3(z47) || wt11(z47)) return y53 = y53.get(h46) || null, g45(v43, y53, z47, M50, null); if (typeof z47.then == "function") return S60(y53, v43, h46, ru3(z47), M50); if (z47.$$typeof === la3) return S60(y53, v43, h46, Pu3(v43, z47), M50); ln5(v43, z47); } return null; } function T53(y53, v43, h46, z47) { for (var M50 = null, s38 = null, E58 = v43, H43 = v43 = 0, q53 = null; E58 !== null && H43 < h46.length; H43++) { E58.index > H43 ? (q53 = E58, E58 = null) : q53 = E58.sibling; var o27 = d31(y53, E58, h46[H43], z47); if (o27 === null) { E58 === null && (E58 = q53); break; } l28 && E58 && o27.alternate === null && a36(y53, E58), v43 = f46(o27, v43, H43), s38 === null ? M50 = o27 : s38.sibling = o27, s38 = o27, E58 = q53; } if (H43 === h46.length) return t15(y53, E58), Y43 && Pl3(y53, H43), M50; if (E58 === null) { for (; H43 < h46.length; H43++) E58 = b45(y53, h46[H43], z47), E58 !== null && (v43 = f46(E58, v43, H43), s38 === null ? M50 = E58 : s38.sibling = E58, s38 = E58); return Y43 && Pl3(y53, H43), M50; } for (E58 = u36(E58); H43 < h46.length; H43++) q53 = S60(E58, y53, H43, h46[H43], z47), q53 !== null && (l28 && q53.alternate !== null && E58.delete(q53.key === null ? H43 : q53.key), v43 = f46(q53, v43, H43), s38 === null ? M50 = q53 : s38.sibling = q53, s38 = q53); return l28 && E58.forEach(function(ma2) { return a36(y53, ma2); }), Y43 && Pl3(y53, H43), M50; } function O53(y53, v43, h46, z47) { if (h46 == null) throw Error(A53(151)); for (var M50 = null, s38 = null, E58 = v43, H43 = v43 = 0, q53 = null, o27 = h46.next(); E58 !== null && !o27.done; H43++, o27 = h46.next()) { E58.index > H43 ? (q53 = E58, E58 = null) : q53 = E58.sibling; var ma2 = d31(y53, E58, o27.value, z47); if (ma2 === null) { E58 === null && (E58 = q53); break; } l28 && E58 && ma2.alternate === null && a36(y53, E58), v43 = f46(ma2, v43, H43), s38 === null ? M50 = ma2 : s38.sibling = ma2, s38 = ma2, E58 = q53; } if (o27.done) return t15(y53, E58), Y43 && Pl3(y53, H43), M50; if (E58 === null) { for (; !o27.done; H43++, o27 = h46.next()) o27 = b45(y53, o27.value, z47), o27 !== null && (v43 = f46(o27, v43, H43), s38 === null ? M50 = o27 : s38.sibling = o27, s38 = o27); return Y43 && Pl3(y53, H43), M50; } for (E58 = u36(E58); !o27.done; H43++, o27 = h46.next()) o27 = S60(E58, y53, H43, o27.value, z47), o27 !== null && (l28 && o27.alternate !== null && E58.delete(o27.key === null ? H43 : o27.key), v43 = f46(o27, v43, H43), s38 === null ? M50 = o27 : s38.sibling = o27, s38 = o27); return l28 && E58.forEach(function(cy2) { return a36(y53, cy2); }), Y43 && Pl3(y53, H43), M50; } function C39(y53, v43, h46, z47) { if (typeof h46 == "object" && h46 !== null && h46.type === yt14 && h46.key === null && (h46 = h46.props.children), typeof h46 == "object" && h46 !== null) { switch (h46.$$typeof) { case Lu3: l: { for (var M50 = h46.key; v43 !== null; ) { if (v43.key === M50) { if (M50 = h46.type, M50 === yt14) { if (v43.tag === 7) { t15(y53, v43.sibling), z47 = n24(v43, h46.props.children), z47.return = y53, y53 = z47; break l; } } else if (v43.elementType === M50 || typeof M50 == "object" && M50 !== null && M50.$$typeof === da3 && pa2(M50) === v43.type) { t15(y53, v43.sibling), z47 = n24(v43, h46.props), $t9(z47, h46), z47.return = y53, y53 = z47; break l; } t15(y53, v43); break; } else a36(y53, v43); v43 = v43.sibling; } h46.type === yt14 ? (z47 = Ja2(h46.props.children, y53.mode, z47, h46.key), z47.return = y53, y53 = z47) : (z47 = dn5(h46.type, h46.key, h46.props, null, y53.mode, z47), $t9(z47, h46), z47.return = y53, y53 = z47); } return c25(y53); case lu3: l: { for (M50 = h46.key; v43 !== null; ) { if (v43.key === M50) if (v43.tag === 4 && v43.stateNode.containerInfo === h46.containerInfo && v43.stateNode.implementation === h46.implementation) { t15(y53, v43.sibling), z47 = n24(v43, h46.children || []), z47.return = y53, y53 = z47; break l; } else { t15(y53, v43); break; } else a36(y53, v43); v43 = v43.sibling; } z47 = sf2(h46, y53.mode, z47), z47.return = y53, y53 = z47; } return c25(y53); case da3: return h46 = pa2(h46), C39(y53, v43, h46, z47); } if (au3(h46)) return T53(y53, v43, h46, z47); if (wt11(h46)) { if (M50 = wt11(h46), typeof M50 != "function") throw Error(A53(150)); return h46 = M50.call(h46), O53(y53, v43, h46, z47); } if (typeof h46.then == "function") return C39(y53, v43, ru3(h46), z47); if (h46.$$typeof === la3) return C39(y53, v43, Pu3(y53, h46), z47); ln5(y53, h46); } return typeof h46 == "string" && h46 !== "" || typeof h46 == "number" || typeof h46 == "bigint" ? (h46 = "" + h46, v43 !== null && v43.tag === 6 ? (t15(y53, v43.sibling), z47 = n24(v43, h46), z47.return = y53, y53 = z47) : (t15(y53, v43), z47 = Yf2(h46, y53.mode, z47), z47.return = y53, y53 = z47), c25(y53)) : t15(y53, v43); } return function(y53, v43, h46, z47) { try { Uu3 = 0; var M50 = C39(y53, v43, h46, z47); return Nt11 = null, M50; } catch (E58) { if (E58 === Kt8 || E58 === ff3) throw E58; var s38 = El3(29, E58, null, y53.mode); return s38.lanes = z47, s38.return = y53, s38; } }; } var Ia2 = v110(true), y110 = v110(false), Sa2 = false; function de24(l28) { l28.updateQueue = { baseState: l28.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, lanes: 0, hiddenCallbacks: null }, callbacks: null }; } function Ec2(l28, a36) { l28 = l28.updateQueue, a36.updateQueue === l28 && (a36.updateQueue = { baseState: l28.baseState, firstBaseUpdate: l28.firstBaseUpdate, lastBaseUpdate: l28.lastBaseUpdate, shared: l28.shared, callbacks: null }); } function Na2(l28) { return { lane: l28, tag: 0, payload: null, callback: null, next: null }; } function Ba3(l28, a36, t15) { var u36 = l28.updateQueue; if (u36 === null) return null; if (u36 = u36.shared, (X43 & 2) !== 0) { var n24 = u36.pending; return n24 === null ? a36.next = a36 : (a36.next = n24.next, n24.next = a36), u36.pending = a36, a36 = Yn4(l28), a110(l28, null, t15), a36; } return nf3(l28, u36, a36, t15), Yn4(l28); } function vu3(l28, a36, t15) { if (a36 = a36.updateQueue, a36 !== null && (a36 = a36.shared, (t15 & 4194048) !== 0)) { var u36 = a36.lanes; u36 &= l28.pendingLanes, t15 |= u36, a36.lanes = t15, q02(l28, t15); } } function Xf2(l28, a36) { var t15 = l28.updateQueue, u36 = l28.alternate; if (u36 !== null && (u36 = u36.updateQueue, t15 === u36)) { var n24 = null, f46 = null; if (t15 = t15.firstBaseUpdate, t15 !== null) { do { var c25 = { lane: t15.lane, tag: t15.tag, payload: t15.payload, callback: null, next: null }; f46 === null ? n24 = f46 = c25 : f46 = f46.next = c25, t15 = t15.next; } while (t15 !== null); f46 === null ? n24 = f46 = a36 : f46 = f46.next = a36; } else n24 = f46 = a36; t15 = { baseState: u36.baseState, firstBaseUpdate: n24, lastBaseUpdate: f46, shared: u36.shared, callbacks: u36.callbacks }, l28.updateQueue = t15; return; } l28 = t15.lastBaseUpdate, l28 === null ? t15.firstBaseUpdate = a36 : l28.next = a36, t15.lastBaseUpdate = a36; } var Mc2 = false; function yu3() { if (Mc2) { var l28 = Ht9; if (l28 !== null) throw l28; } } function hu3(l28, a36, t15, u36) { Mc2 = false; var n24 = l28.updateQueue; Sa2 = false; var f46 = n24.firstBaseUpdate, c25 = n24.lastBaseUpdate, e16 = n24.shared.pending; if (e16 !== null) { n24.shared.pending = null; var i20 = e16, m37 = i20.next; i20.next = null, c25 === null ? f46 = m37 : c25.next = m37, c25 = i20; var g45 = l28.alternate; g45 !== null && (g45 = g45.updateQueue, e16 = g45.lastBaseUpdate, e16 !== c25 && (e16 === null ? g45.firstBaseUpdate = m37 : e16.next = m37, g45.lastBaseUpdate = i20)); } if (f46 !== null) { var b45 = n24.baseState; c25 = 0, g45 = m37 = i20 = null, e16 = f46; do { var d31 = e16.lane & -536870913, S60 = d31 !== e16.lane; if (S60 ? (_48 & d31) === d31 : (u36 & d31) === d31) { d31 !== 0 && d31 === ot13 && (Mc2 = true), g45 !== null && (g45 = g45.next = { lane: 0, tag: e16.tag, payload: e16.payload, callback: null, next: null }); l: { var T53 = l28, O53 = e16; d31 = a36; var C39 = t15; switch (O53.tag) { case 1: if (T53 = O53.payload, typeof T53 == "function") { b45 = T53.call(C39, b45, d31); break l; } b45 = T53; break l; case 3: T53.flags = T53.flags & -65537 | 128; case 0: if (T53 = O53.payload, d31 = typeof T53 == "function" ? T53.call(C39, b45, d31) : T53, d31 == null) break l; b45 = L49({}, b45, d31); break l; case 2: Sa2 = true; } } d31 = e16.callback, d31 !== null && (l28.flags |= 64, S60 && (l28.flags |= 8192), S60 = n24.callbacks, S60 === null ? n24.callbacks = [d31] : S60.push(d31)); } else S60 = { lane: d31, tag: e16.tag, payload: e16.payload, callback: e16.callback, next: null }, g45 === null ? (m37 = g45 = S60, i20 = b45) : g45 = g45.next = S60, c25 |= d31; if (e16 = e16.next, e16 === null) { if (e16 = n24.shared.pending, e16 === null) break; S60 = e16, e16 = S60.next, S60.next = null, n24.lastBaseUpdate = S60, n24.shared.pending = null; } } while (true); g45 === null && (i20 = b45), n24.baseState = i20, n24.firstBaseUpdate = m37, n24.lastBaseUpdate = g45, f46 === null && (n24.shared.lanes = 0), Za2 |= c25, l28.lanes = c25, l28.memoizedState = b45; } } function h110(l28, a36) { if (typeof l28 != "function") throw Error(A53(191, l28)); l28.call(a36); } function m110(l28, a36) { var t15 = l28.callbacks; if (t15 !== null) for (l28.callbacks = null, l28 = 0; l28 < t15.length; l28++) h110(t15[l28], a36); } var Xt9 = Jl3(null), Gn4 = Jl3(0); function Mi3(l28, a36) { l28 = ya2, x50(Gn4, l28), x50(Xt9, a36), ya2 = l28 | a36.baseLanes; } function Oc2() { x50(Gn4, ya2), x50(Xt9, Xt9.current); } function Se17() { ya2 = Gn4.current, nl2(Xt9), nl2(Gn4); } var Bl2 = Jl3(null), Ql2 = null; function za3(l28) { var a36 = l28.alternate; x50(F40, F40.current & 1), x50(Bl2, l28), Ql2 === null && (a36 === null || Xt9.current !== null || a36.memoizedState !== null) && (Ql2 = l28); } function Dc2(l28) { x50(F40, F40.current), x50(Bl2, l28), Ql2 === null && (Ql2 = l28); } function d110(l28) { l28.tag === 22 ? (x50(F40, F40.current), x50(Bl2, l28), Ql2 === null && (Ql2 = l28)) : ba3(l28); } function ba3() { x50(F40, F40.current), x50(Bl2, Bl2.current); } function Tl3(l28) { nl2(Bl2), Ql2 === l28 && (Ql2 = null), nl2(F40); } var F40 = Jl3(0); function Qn4(l28) { for (var a36 = l28; a36 !== null; ) { if (a36.tag === 13) { var t15 = a36.memoizedState; if (t15 !== null && (t15 = t15.dehydrated, t15 === null || pc2(t15) || Kc2(t15))) return a36; } else if (a36.tag === 19 && (a36.memoizedProps.revealOrder === "forwards" || a36.memoizedProps.revealOrder === "backwards" || a36.memoizedProps.revealOrder === "unstable_legacy-backwards" || a36.memoizedProps.revealOrder === "together")) { if ((a36.flags & 128) !== 0) return a36; } else if (a36.child !== null) { a36.child.return = a36, a36 = a36.child; continue; } if (a36 === l28) break; for (; a36.sibling === null; ) { if (a36.return === null || a36.return === l28) return null; a36 = a36.return; } a36.sibling.return = a36.return, a36 = a36.sibling; } return null; } var ea2 = 0, U37 = null, j55 = null, k51 = null, Zn4 = false, Bt10 = false, Pa2 = false, Cn5 = 0, Hu3 = 0, qt11 = null, sh2 = 0; function W39() { throw Error(A53(321)); } function ge28(l28, a36) { if (a36 === null) return false; for (var t15 = 0; t15 < a36.length && t15 < l28.length; t15++) if (!Nl2(l28[t15], a36[t15])) return false; return true; } function ze16(l28, a36, t15, u36, n24, f46) { return ea2 = f46, U37 = a36, a36.memoizedState = null, a36.updateQueue = null, a36.lanes = 0, D54.H = l28 === null || l28.memoizedState === null ? L110 : Be18, Pa2 = false, f46 = t15(u36, n24), Pa2 = false, Bt10 && (f46 = g110(a36, t15, u36, n24)), S110(l28), f46; } function S110(l28) { D54.H = Nu3; var a36 = j55 !== null && j55.next !== null; if (ea2 = 0, k51 = j55 = U37 = null, Zn4 = false, Hu3 = 0, qt11 = null, a36) throw Error(A53(300)); l28 === null || r19 || (l28 = l28.dependencies, l28 !== null && on5(l28) && (r19 = true)); } function g110(l28, a36, t15, u36) { U37 = l28; var n24 = 0; do { if (Bt10 && (qt11 = null), Hu3 = 0, Bt10 = false, 25 <= n24) throw Error(A53(301)); if (n24 += 1, k51 = j55 = null, l28.updateQueue != null) { var f46 = l28.updateQueue; f46.lastEffect = null, f46.events = null, f46.stores = null, f46.memoCache != null && (f46.memoCache.index = 0); } D54.H = J110, f46 = a36(t15, u36); } while (Bt10); return f46; } function oh2() { var l28 = D54.H, a36 = l28.useState()[0]; return a36 = typeof a36.then == "function" ? ju3(a36) : a36, l28 = l28.useState()[0], (j55 !== null ? j55.memoizedState : null) !== l28 && (U37.flags |= 1024), a36; } function be26() { var l28 = Cn5 !== 0; return Cn5 = 0, l28; } function Ae22(l28, a36, t15) { a36.updateQueue = l28.updateQueue, a36.flags &= -2053, l28.lanes &= ~t15; } function Te18(l28) { if (Zn4) { for (l28 = l28.memoizedState; l28 !== null; ) { var a36 = l28.queue; a36 !== null && (a36.pending = null), l28 = l28.next; } Zn4 = false; } ea2 = 0, k51 = j55 = U37 = null, Bt10 = false, Hu3 = Cn5 = 0, qt11 = null; } function yl3() { var l28 = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; return k51 === null ? U37.memoizedState = k51 = l28 : k51 = k51.next = l28, k51; } function $45() { if (j55 === null) { var l28 = U37.alternate; l28 = l28 !== null ? l28.memoizedState : null; } else l28 = j55.next; var a36 = k51 === null ? U37.memoizedState : k51.next; if (a36 !== null) k51 = a36, j55 = l28; else { if (l28 === null) throw U37.alternate === null ? Error(A53(467)) : Error(A53(310)); j55 = l28, l28 = { memoizedState: j55.memoizedState, baseState: j55.baseState, baseQueue: j55.baseQueue, queue: j55.queue, next: null }, k51 === null ? U37.memoizedState = k51 = l28 : k51 = k51.next = l28; } return k51; } function cf2() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } function ju3(l28) { var a36 = Hu3; return Hu3 += 1, qt11 === null && (qt11 = []), l28 = i110(qt11, l28, a36), a36 = U37, (k51 === null ? a36.memoizedState : k51.next) === null && (a36 = a36.alternate, D54.H = a36 === null || a36.memoizedState === null ? L110 : Be18), l28; } function ef3(l28) { if (l28 !== null && typeof l28 == "object") { if (typeof l28.then == "function") return ju3(l28); if (l28.$$typeof === la3) return il2(l28); } throw Error(A53(438, String(l28))); } function Ee23(l28) { var a36 = null, t15 = U37.updateQueue; if (t15 !== null && (a36 = t15.memoCache), a36 == null) { var u36 = U37.alternate; u36 !== null && (u36 = u36.updateQueue, u36 !== null && (u36 = u36.memoCache, u36 != null && (a36 = { data: u36.data.map(function(n24) { return n24.slice(); }), index: 0 }))); } if (a36 == null && (a36 = { data: [], index: 0 }), t15 === null && (t15 = cf2(), U37.updateQueue = t15), t15.memoCache = a36, t15 = a36.data[a36.index], t15 === void 0) for (t15 = a36.data[a36.index] = Array(l28), u36 = 0; u36 < l28; u36++) t15[u36] = by2; return a36.index++, t15; } function ia3(l28, a36) { return typeof a36 == "function" ? a36(l28) : a36; } function gn4(l28) { var a36 = $45(); return Me26(a36, j55, l28); } function Me26(l28, a36, t15) { var u36 = l28.queue; if (u36 === null) throw Error(A53(311)); u36.lastRenderedReducer = t15; var n24 = l28.baseQueue, f46 = u36.pending; if (f46 !== null) { if (n24 !== null) { var c25 = n24.next; n24.next = f46.next, f46.next = c25; } a36.baseQueue = n24 = f46, u36.pending = null; } if (f46 = l28.baseState, n24 === null) l28.memoizedState = f46; else { a36 = n24.next; var e16 = c25 = null, i20 = null, m37 = a36, g45 = false; do { var b45 = m37.lane & -536870913; if (b45 !== m37.lane ? (_48 & b45) === b45 : (ea2 & b45) === b45) { var d31 = m37.revertLane; if (d31 === 0) i20 !== null && (i20 = i20.next = { lane: 0, revertLane: 0, gesture: null, action: m37.action, hasEagerState: m37.hasEagerState, eagerState: m37.eagerState, next: null }), b45 === ot13 && (g45 = true); else if ((ea2 & d31) === d31) { m37 = m37.next, d31 === ot13 && (g45 = true); continue; } else b45 = { lane: 0, revertLane: m37.revertLane, gesture: null, action: m37.action, hasEagerState: m37.hasEagerState, eagerState: m37.eagerState, next: null }, i20 === null ? (e16 = i20 = b45, c25 = f46) : i20 = i20.next = b45, U37.lanes |= d31, Za2 |= d31; b45 = m37.action, Pa2 && t15(f46, b45), f46 = m37.hasEagerState ? m37.eagerState : t15(f46, b45); } else d31 = { lane: b45, revertLane: m37.revertLane, gesture: m37.gesture, action: m37.action, hasEagerState: m37.hasEagerState, eagerState: m37.eagerState, next: null }, i20 === null ? (e16 = i20 = d31, c25 = f46) : i20 = i20.next = d31, U37.lanes |= b45, Za2 |= b45; m37 = m37.next; } while (m37 !== null && m37 !== a36); if (i20 === null ? c25 = f46 : i20.next = e16, !Nl2(f46, l28.memoizedState) && (r19 = true, g45 && (t15 = Ht9, t15 !== null))) throw t15; l28.memoizedState = f46, l28.baseState = c25, l28.baseQueue = i20, u36.lastRenderedState = f46; } return n24 === null && (u36.lanes = 0), [l28.memoizedState, u36.dispatch]; } function Gf2(l28) { var a36 = $45(), t15 = a36.queue; if (t15 === null) throw Error(A53(311)); t15.lastRenderedReducer = l28; var u36 = t15.dispatch, n24 = t15.pending, f46 = a36.memoizedState; if (n24 !== null) { t15.pending = null; var c25 = n24 = n24.next; do f46 = l28(f46, c25.action), c25 = c25.next; while (c25 !== n24); Nl2(f46, a36.memoizedState) || (r19 = true), a36.memoizedState = f46, a36.baseQueue === null && (a36.baseState = f46), t15.lastRenderedState = f46; } return [f46, u36]; } function z110(l28, a36, t15) { var u36 = U37, n24 = $45(), f46 = Y43; if (f46) { if (t15 === void 0) throw Error(A53(407)); t15 = t15(); } else t15 = a36(); var c25 = !Nl2((j55 || n24).memoizedState, t15); if (c25 && (n24.memoizedState = t15, r19 = true), n24 = n24.queue, Oe21(T110.bind(null, u36, n24, l28), [l28]), n24.getSnapshot !== a36 || c25 || k51 !== null && k51.memoizedState.tag & 1) { if (u36.flags |= 2048, Gt7(9, { destroy: void 0 }, A110.bind(null, u36, n24, t15, a36), null), V34 === null) throw Error(A53(349)); f46 || (ea2 & 127) !== 0 || b110(u36, a36, t15); } return t15; } function b110(l28, a36, t15) { l28.flags |= 16384, l28 = { getSnapshot: a36, value: t15 }, a36 = U37.updateQueue, a36 === null ? (a36 = cf2(), U37.updateQueue = a36, a36.stores = [l28]) : (t15 = a36.stores, t15 === null ? a36.stores = [l28] : t15.push(l28)); } function A110(l28, a36, t15, u36) { a36.value = t15, a36.getSnapshot = u36, E110(a36) && M110(l28); } function T110(l28, a36, t15) { return t15(function() { E110(a36) && M110(l28); }); } function E110(l28) { var a36 = l28.getSnapshot; l28 = l28.value; try { var t15 = a36(); return !Nl2(l28, t15); } catch { return true; } } function M110(l28) { var a36 = ut15(l28, 2); a36 !== null && gl3(a36, l28, 2); } function Uc2(l28) { var a36 = yl3(); if (typeof l28 == "function") { var t15 = l28; if (l28 = t15(), Pa2) { Ta2(true); try { t15(); } finally { Ta2(false); } } } return a36.memoizedState = a36.baseState = l28, a36.queue = { pending: null, lanes: 0, dispatch: null, lastRenderedReducer: ia3, lastRenderedState: l28 }, a36; } function O110(l28, a36, t15, u36) { return l28.baseState = t15, Me26(l28, j55, typeof u36 == "function" ? u36 : ia3); } function Xh2(l28, a36, t15, u36, n24) { if (yf2(l28)) throw Error(A53(485)); if (l28 = a36.action, l28 !== null) { var f46 = { payload: n24, action: l28, next: null, isTransition: true, status: "pending", value: null, reason: null, listeners: [], then: function(c25) { f46.listeners.push(c25); } }; D54.T !== null ? t15(true) : f46.isTransition = false, u36(f46), t15 = a36.pending, t15 === null ? (f46.next = a36.pending = f46, D110(a36, f46)) : (f46.next = t15.next, a36.pending = t15.next = f46); } } function D110(l28, a36) { var t15 = a36.action, u36 = a36.payload, n24 = l28.state; if (a36.isTransition) { var f46 = D54.T, c25 = {}; D54.T = c25; try { var e16 = t15(n24, u36), i20 = D54.S; i20 !== null && i20(c25, e16), Oi4(l28, a36, e16); } catch (m37) { Hc2(l28, a36, m37); } finally { f46 !== null && c25.types !== null && (f46.types = c25.types), D54.T = f46; } } else try { f46 = t15(n24, u36), Oi4(l28, a36, f46); } catch (m37) { Hc2(l28, a36, m37); } } function Oi4(l28, a36, t15) { t15 !== null && typeof t15 == "object" && typeof t15.then == "function" ? t15.then(function(u36) { Di4(l28, a36, u36); }, function(u36) { return Hc2(l28, a36, u36); }) : Di4(l28, a36, t15); } function Di4(l28, a36, t15) { a36.status = "fulfilled", a36.value = t15, U110(a36), l28.state = t15, a36 = l28.pending, a36 !== null && (t15 = a36.next, t15 === a36 ? l28.pending = null : (t15 = t15.next, a36.next = t15, D110(l28, t15))); } function Hc2(l28, a36, t15) { var u36 = l28.pending; if (l28.pending = null, u36 !== null) { u36 = u36.next; do a36.status = "rejected", a36.reason = t15, U110(a36), a36 = a36.next; while (a36 !== u36); } l28.action = null; } function U110(l28) { l28 = l28.listeners; for (var a36 = 0; a36 < l28.length; a36++) (0, l28[a36])(); } function H110(l28, a36) { return a36; } function Ui4(l28, a36) { if (Y43) { var t15 = V34.formState; if (t15 !== null) { l: { var u36 = U37; if (Y43) { if (K45) { a: { for (var n24 = K45, f46 = Gl2; n24.nodeType !== 8; ) { if (!f46) { n24 = null; break a; } if (n24 = Zl3(n24.nextSibling), n24 === null) { n24 = null; break a; } } f46 = n24.data, n24 = f46 === "F!" || f46 === "F" ? n24 : null; } if (n24) { K45 = Zl3(n24.nextSibling), u36 = n24.data === "F!"; break l; } } Ga2(u36); } u36 = false; } u36 && (a36 = t15[0]); } } return t15 = yl3(), t15.memoizedState = t15.baseState = a36, u36 = { pending: null, lanes: 0, dispatch: null, lastRenderedReducer: H110, lastRenderedState: a36 }, t15.queue = u36, t15 = x110.bind(null, U37, u36), u36.dispatch = t15, u36 = Uc2(false), f46 = Ne20.bind(null, U37, false, u36.queue), u36 = yl3(), n24 = { state: a36, dispatch: null, action: l28, pending: null }, u36.queue = n24, t15 = Xh2.bind(null, U37, n24, f46, t15), n24.dispatch = t15, u36.memoizedState = l28, [a36, t15, false]; } function Hi3(l28) { var a36 = $45(); return N110(a36, j55, l28); } function N110(l28, a36, t15) { if (a36 = Me26(l28, a36, H110)[0], l28 = gn4(ia3)[0], typeof a36 == "object" && a36 !== null && typeof a36.then == "function") try { var u36 = ju3(a36); } catch (c25) { throw c25 === Kt8 ? ff3 : c25; } else u36 = a36; a36 = $45(); var n24 = a36.queue, f46 = n24.dispatch; return t15 !== a36.memoizedState && (U37.flags |= 2048, Gt7(9, { destroy: void 0 }, Gh2.bind(null, n24, t15), null)), [u36, f46, l28]; } function Gh2(l28, a36) { l28.action = a36; } function Ni4(l28) { var a36 = $45(), t15 = j55; if (t15 !== null) return N110(a36, t15, l28); $45(), a36 = a36.memoizedState, t15 = $45(); var u36 = t15.queue.dispatch; return t15.memoizedState = l28, [a36, u36, false]; } function Gt7(l28, a36, t15, u36) { return l28 = { tag: l28, create: t15, deps: u36, inst: a36, next: null }, a36 = U37.updateQueue, a36 === null && (a36 = cf2(), U37.updateQueue = a36), t15 = a36.lastEffect, t15 === null ? a36.lastEffect = l28.next = l28 : (u36 = t15.next, t15.next = l28, l28.next = u36, a36.lastEffect = l28), l28; } function B110() { return $45().memoizedState; } function zn5(l28, a36, t15, u36) { var n24 = yl3(); U37.flags |= l28, n24.memoizedState = Gt7(1 | a36, { destroy: void 0 }, t15, u36 === void 0 ? null : u36); } function vf2(l28, a36, t15, u36) { var n24 = $45(); u36 = u36 === void 0 ? null : u36; var f46 = n24.memoizedState.inst; j55 !== null && u36 !== null && ge28(u36, j55.memoizedState.deps) ? n24.memoizedState = Gt7(a36, f46, t15, u36) : (U37.flags |= l28, n24.memoizedState = Gt7(1 | a36, f46, t15, u36)); } function Bi4(l28, a36) { zn5(8390656, 8, l28, a36); } function Oe21(l28, a36) { vf2(2048, 8, l28, a36); } function Qh2(l28) { U37.flags |= 4; var a36 = U37.updateQueue; if (a36 === null) a36 = cf2(), U37.updateQueue = a36, a36.events = [l28]; else { var t15 = a36.events; t15 === null ? a36.events = [l28] : t15.push(l28); } } function q110(l28) { var a36 = $45().memoizedState; return Qh2({ ref: a36, nextImpl: l28 }), function() { if ((X43 & 2) !== 0) throw Error(A53(440)); return a36.impl.apply(void 0, arguments); }; } function _110(l28, a36) { return vf2(4, 2, l28, a36); } function Y110(l28, a36) { return vf2(4, 4, l28, a36); } function s110(l28, a36) { if (typeof a36 == "function") { l28 = l28(); var t15 = a36(l28); return function() { typeof t15 == "function" ? t15() : a36(null); }; } if (a36 != null) return l28 = l28(), a36.current = l28, function() { a36.current = null; }; } function o110(l28, a36, t15) { t15 = t15 != null ? t15.concat([l28]) : null, vf2(4, 4, s110.bind(null, a36, l28), t15); } function De19() { } function X110(l28, a36) { var t15 = $45(); a36 = a36 === void 0 ? null : a36; var u36 = t15.memoizedState; return a36 !== null && ge28(a36, u36[1]) ? u36[0] : (t15.memoizedState = [l28, a36], l28); } function G110(l28, a36) { var t15 = $45(); a36 = a36 === void 0 ? null : a36; var u36 = t15.memoizedState; if (a36 !== null && ge28(a36, u36[1])) return u36[0]; if (u36 = l28(), Pa2) { Ta2(true); try { l28(); } finally { Ta2(false); } } return t15.memoizedState = [u36, a36], u36; } function Ue17(l28, a36, t15) { return t15 === void 0 || (ea2 & 1073741824) !== 0 && (_48 & 261930) === 0 ? l28.memoizedState = a36 : (l28.memoizedState = t15, l28 = Ov2(), U37.lanes |= l28, Za2 |= l28, t15); } function Q110(l28, a36, t15, u36) { return Nl2(t15, a36) ? t15 : Xt9.current !== null ? (l28 = Ue17(l28, t15, u36), Nl2(l28, a36) || (r19 = true), l28) : (ea2 & 42) === 0 || (ea2 & 1073741824) !== 0 && (_48 & 261930) === 0 ? (r19 = true, l28.memoizedState = t15) : (l28 = Ov2(), U37.lanes |= l28, Za2 |= l28, a36); } function Z110(l28, a36, t15, u36, n24) { var f46 = G45.p; G45.p = f46 !== 0 && 8 > f46 ? f46 : 8; var c25 = D54.T, e16 = {}; D54.T = e16, Ne20(l28, false, a36, t15); try { var i20 = n24(), m37 = D54.S; if (m37 !== null && m37(e16, i20), i20 !== null && typeof i20 == "object" && typeof i20.then == "function") { var g45 = Yh2(i20, u36); mu3(l28, a36, g45, Hl3(l28)); } else mu3(l28, a36, u36, Hl3(l28)); } catch (b45) { mu3(l28, a36, { then: function() { }, status: "rejected", reason: b45 }, Hl3()); } finally { G45.p = f46, c25 !== null && e16.types !== null && (c25.types = e16.types), D54.T = c25; } } function Zh2() { } function Nc2(l28, a36, t15, u36) { if (l28.tag !== 5) throw Error(A53(476)); var n24 = C110(l28).queue; Z110(l28, n24, a36, La2, t15 === null ? Zh2 : function() { return R110(l28), t15(u36); }); } function C110(l28) { var a36 = l28.memoizedState; if (a36 !== null) return a36; a36 = { memoizedState: La2, baseState: La2, baseQueue: null, queue: { pending: null, lanes: 0, dispatch: null, lastRenderedReducer: ia3, lastRenderedState: La2 }, next: null }; var t15 = {}; return a36.next = { memoizedState: t15, baseState: t15, baseQueue: null, queue: { pending: null, lanes: 0, dispatch: null, lastRenderedReducer: ia3, lastRenderedState: t15 }, next: null }, l28.memoizedState = a36, l28 = l28.alternate, l28 !== null && (l28.memoizedState = a36), a36; } function R110(l28) { var a36 = C110(l28); a36.next === null && (a36 = l28.alternate.memoizedState), mu3(l28, a36.next.queue, {}, Hl3()); } function He16() { return il2(_u3); } function j110() { return $45().memoizedState; } function V110() { return $45().memoizedState; } function Ch2(l28) { for (var a36 = l28.return; a36 !== null; ) { switch (a36.tag) { case 24: case 3: var t15 = Hl3(); l28 = Na2(t15); var u36 = Ba3(a36, l28, t15); u36 !== null && (gl3(u36, a36, t15), vu3(u36, a36, t15)), a36 = { cache: ye25() }, l28.payload = a36; return; } a36 = a36.return; } } function Rh2(l28, a36, t15) { var u36 = Hl3(); t15 = { lane: u36, revertLane: 0, gesture: null, action: t15, hasEagerState: false, eagerState: null, next: null }, yf2(l28) ? p110(a36, t15) : (t15 = ce30(l28, a36, t15, u36), t15 !== null && (gl3(t15, l28, u36), K110(t15, a36, u36))); } function x110(l28, a36, t15) { var u36 = Hl3(); mu3(l28, a36, t15, u36); } function mu3(l28, a36, t15, u36) { var n24 = { lane: u36, revertLane: 0, gesture: null, action: t15, hasEagerState: false, eagerState: null, next: null }; if (yf2(l28)) p110(a36, n24); else { var f46 = l28.alternate; if (l28.lanes === 0 && (f46 === null || f46.lanes === 0) && (f46 = a36.lastRenderedReducer, f46 !== null)) try { var c25 = a36.lastRenderedState, e16 = f46(c25, t15); if (n24.hasEagerState = true, n24.eagerState = e16, Nl2(e16, c25)) return nf3(l28, a36, n24, 0), V34 === null && uf3(), false; } catch { } if (t15 = ce30(l28, a36, n24, u36), t15 !== null) return gl3(t15, l28, u36), K110(t15, a36, u36), true; } return false; } function Ne20(l28, a36, t15, u36) { if (u36 = { lane: 2, revertLane: Qe13(), gesture: null, action: u36, hasEagerState: false, eagerState: null, next: null }, yf2(l28)) { if (a36) throw Error(A53(479)); } else a36 = ce30(l28, t15, u36, 2), a36 !== null && gl3(a36, l28, 2); } function yf2(l28) { var a36 = l28.alternate; return l28 === U37 || a36 !== null && a36 === U37; } function p110(l28, a36) { Bt10 = Zn4 = true; var t15 = l28.pending; t15 === null ? a36.next = a36 : (a36.next = t15.next, t15.next = a36), l28.pending = a36; } function K110(l28, a36, t15) { if ((t15 & 4194048) !== 0) { var u36 = a36.lanes; u36 &= l28.pendingLanes, t15 |= u36, a36.lanes = t15, q02(l28, t15); } } var Nu3 = { readContext: il2, use: ef3, useCallback: W39, useContext: W39, useEffect: W39, useImperativeHandle: W39, useLayoutEffect: W39, useInsertionEffect: W39, useMemo: W39, useReducer: W39, useRef: W39, useState: W39, useDebugValue: W39, useDeferredValue: W39, useTransition: W39, useSyncExternalStore: W39, useId: W39, useHostTransitionStatus: W39, useFormState: W39, useActionState: W39, useOptimistic: W39, useMemoCache: W39, useCacheRefresh: W39 }; Nu3.useEffectEvent = W39; var L110 = { readContext: il2, use: ef3, useCallback: function(l28, a36) { return yl3().memoizedState = [l28, a36 === void 0 ? null : a36], l28; }, useContext: il2, useEffect: Bi4, useImperativeHandle: function(l28, a36, t15) { t15 = t15 != null ? t15.concat([l28]) : null, zn5(4194308, 4, s110.bind(null, a36, l28), t15); }, useLayoutEffect: function(l28, a36) { return zn5(4194308, 4, l28, a36); }, useInsertionEffect: function(l28, a36) { zn5(4, 2, l28, a36); }, useMemo: function(l28, a36) { var t15 = yl3(); a36 = a36 === void 0 ? null : a36; var u36 = l28(); if (Pa2) { Ta2(true); try { l28(); } finally { Ta2(false); } } return t15.memoizedState = [u36, a36], u36; }, useReducer: function(l28, a36, t15) { var u36 = yl3(); if (t15 !== void 0) { var n24 = t15(a36); if (Pa2) { Ta2(true); try { t15(a36); } finally { Ta2(false); } } } else n24 = a36; return u36.memoizedState = u36.baseState = n24, l28 = { pending: null, lanes: 0, dispatch: null, lastRenderedReducer: l28, lastRenderedState: n24 }, u36.queue = l28, l28 = l28.dispatch = Rh2.bind(null, U37, l28), [u36.memoizedState, l28]; }, useRef: function(l28) { var a36 = yl3(); return l28 = { current: l28 }, a36.memoizedState = l28; }, useState: function(l28) { l28 = Uc2(l28); var a36 = l28.queue, t15 = x110.bind(null, U37, a36); return a36.dispatch = t15, [l28.memoizedState, t15]; }, useDebugValue: De19, useDeferredValue: function(l28, a36) { var t15 = yl3(); return Ue17(t15, l28, a36); }, useTransition: function() { var l28 = Uc2(false); return l28 = Z110.bind(null, U37, l28.queue, true, false), yl3().memoizedState = l28, [false, l28]; }, useSyncExternalStore: function(l28, a36, t15) { var u36 = U37, n24 = yl3(); if (Y43) { if (t15 === void 0) throw Error(A53(407)); t15 = t15(); } else { if (t15 = a36(), V34 === null) throw Error(A53(349)); (_48 & 127) !== 0 || b110(u36, a36, t15); } n24.memoizedState = t15; var f46 = { value: t15, getSnapshot: a36 }; return n24.queue = f46, Bi4(T110.bind(null, u36, f46, l28), [l28]), u36.flags |= 2048, Gt7(9, { destroy: void 0 }, A110.bind(null, u36, f46, t15, a36), null), t15; }, useId: function() { var l28 = yl3(), a36 = V34.identifierPrefix; if (Y43) { var t15 = pl3, u36 = xl3; t15 = (u36 & ~(1 << 32 - Ul3(u36) - 1)).toString(32) + t15, a36 = "_" + a36 + "R_" + t15, t15 = Cn5++, 0 < t15 && (a36 += "H" + t15.toString(32)), a36 += "_"; } else t15 = sh2++, a36 = "_" + a36 + "r_" + t15.toString(32) + "_"; return l28.memoizedState = a36; }, useHostTransitionStatus: He16, useFormState: Ui4, useActionState: Ui4, useOptimistic: function(l28) { var a36 = yl3(); a36.memoizedState = a36.baseState = l28; var t15 = { pending: null, lanes: 0, dispatch: null, lastRenderedReducer: null, lastRenderedState: null }; return a36.queue = t15, a36 = Ne20.bind(null, U37, true, t15), t15.dispatch = a36, [l28, a36]; }, useMemoCache: Ee23, useCacheRefresh: function() { return yl3().memoizedState = Ch2.bind(null, U37); }, useEffectEvent: function(l28) { var a36 = yl3(), t15 = { impl: l28 }; return a36.memoizedState = t15, function() { if ((X43 & 2) !== 0) throw Error(A53(440)); return t15.impl.apply(void 0, arguments); }; } }, Be18 = { readContext: il2, use: ef3, useCallback: X110, useContext: il2, useEffect: Oe21, useImperativeHandle: o110, useInsertionEffect: _110, useLayoutEffect: Y110, useMemo: G110, useReducer: gn4, useRef: B110, useState: function() { return gn4(ia3); }, useDebugValue: De19, useDeferredValue: function(l28, a36) { var t15 = $45(); return Q110(t15, j55.memoizedState, l28, a36); }, useTransition: function() { var l28 = gn4(ia3)[0], a36 = $45().memoizedState; return [typeof l28 == "boolean" ? l28 : ju3(l28), a36]; }, useSyncExternalStore: z110, useId: j110, useHostTransitionStatus: He16, useFormState: Hi3, useActionState: Hi3, useOptimistic: function(l28, a36) { var t15 = $45(); return O110(t15, j55, l28, a36); }, useMemoCache: Ee23, useCacheRefresh: V110 }; Be18.useEffectEvent = q110; var J110 = { readContext: il2, use: ef3, useCallback: X110, useContext: il2, useEffect: Oe21, useImperativeHandle: o110, useInsertionEffect: _110, useLayoutEffect: Y110, useMemo: G110, useReducer: Gf2, useRef: B110, useState: function() { return Gf2(ia3); }, useDebugValue: De19, useDeferredValue: function(l28, a36) { var t15 = $45(); return j55 === null ? Ue17(t15, l28, a36) : Q110(t15, j55.memoizedState, l28, a36); }, useTransition: function() { var l28 = Gf2(ia3)[0], a36 = $45().memoizedState; return [typeof l28 == "boolean" ? l28 : ju3(l28), a36]; }, useSyncExternalStore: z110, useId: j110, useHostTransitionStatus: He16, useFormState: Ni4, useActionState: Ni4, useOptimistic: function(l28, a36) { var t15 = $45(); return j55 !== null ? O110(t15, j55, l28, a36) : (t15.baseState = l28, [l28, t15.queue.dispatch]); }, useMemoCache: Ee23, useCacheRefresh: V110 }; J110.useEffectEvent = q110; function Qf2(l28, a36, t15, u36) { a36 = l28.memoizedState, t15 = t15(u36, a36), t15 = t15 == null ? a36 : L49({}, a36, t15), l28.memoizedState = t15, l28.lanes === 0 && (l28.updateQueue.baseState = t15); } var Bc2 = { enqueueSetState: function(l28, a36, t15) { l28 = l28._reactInternals; var u36 = Hl3(), n24 = Na2(u36); n24.payload = a36, t15 != null && (n24.callback = t15), a36 = Ba3(l28, n24, u36), a36 !== null && (gl3(a36, l28, u36), vu3(a36, l28, u36)); }, enqueueReplaceState: function(l28, a36, t15) { l28 = l28._reactInternals; var u36 = Hl3(), n24 = Na2(u36); n24.tag = 1, n24.payload = a36, t15 != null && (n24.callback = t15), a36 = Ba3(l28, n24, u36), a36 !== null && (gl3(a36, l28, u36), vu3(a36, l28, u36)); }, enqueueForceUpdate: function(l28, a36) { l28 = l28._reactInternals; var t15 = Hl3(), u36 = Na2(t15); u36.tag = 2, a36 != null && (u36.callback = a36), a36 = Ba3(l28, u36, t15), a36 !== null && (gl3(a36, l28, t15), vu3(a36, l28, t15)); } }; function qi3(l28, a36, t15, u36, n24, f46, c25) { return l28 = l28.stateNode, typeof l28.shouldComponentUpdate == "function" ? l28.shouldComponentUpdate(u36, f46, c25) : a36.prototype && a36.prototype.isPureReactComponent ? !Mu3(t15, u36) || !Mu3(n24, f46) : true; } function _i5(l28, a36, t15, u36) { l28 = a36.state, typeof a36.componentWillReceiveProps == "function" && a36.componentWillReceiveProps(t15, u36), typeof a36.UNSAFE_componentWillReceiveProps == "function" && a36.UNSAFE_componentWillReceiveProps(t15, u36), a36.state !== l28 && Bc2.enqueueReplaceState(a36, a36.state, null); } function ra3(l28, a36) { var t15 = a36; if ("ref" in a36) { t15 = {}; for (var u36 in a36) u36 !== "ref" && (t15[u36] = a36[u36]); } if (l28 = l28.defaultProps) { t15 === a36 && (t15 = L49({}, t15)); for (var n24 in l28) t15[n24] === void 0 && (t15[n24] = l28[n24]); } return t15; } function W110(l28) { _n4(l28); } function w110(l28) { console.error(l28); } function F110(l28) { _n4(l28); } function Rn5(l28, a36) { try { var t15 = l28.onUncaughtError; t15(a36.value, { componentStack: a36.stack }); } catch (u36) { setTimeout(function() { throw u36; }); } } function Yi4(l28, a36, t15) { try { var u36 = l28.onCaughtError; u36(t15.value, { componentStack: t15.stack, errorBoundary: a36.tag === 1 ? a36.stateNode : null }); } catch (n24) { setTimeout(function() { throw n24; }); } } function qc2(l28, a36, t15) { return t15 = Na2(t15), t15.tag = 3, t15.payload = { element: null }, t15.callback = function() { Rn5(l28, a36); }, t15; } function $110(l28) { return l28 = Na2(l28), l28.tag = 3, l28; } function k110(l28, a36, t15, u36) { var n24 = t15.type.getDerivedStateFromError; if (typeof n24 == "function") { var f46 = u36.value; l28.payload = function() { return n24(f46); }, l28.callback = function() { Yi4(a36, t15, u36); }; } var c25 = t15.stateNode; c25 !== null && typeof c25.componentDidCatch == "function" && (l28.callback = function() { Yi4(a36, t15, u36), typeof n24 != "function" && (qa2 === null ? qa2 = /* @__PURE__ */ new Set([this]) : qa2.add(this)); var e16 = u36.stack; this.componentDidCatch(u36.value, { componentStack: e16 !== null ? e16 : "" }); }); } function jh2(l28, a36, t15, u36, n24) { if (t15.flags |= 32768, u36 !== null && typeof u36 == "object" && typeof u36.then == "function") { if (a36 = t15.alternate, a36 !== null && pt13(a36, t15, n24, true), t15 = Bl2.current, t15 !== null) { switch (t15.tag) { case 31: case 13: return Ql2 === null ? Kn4() : t15.alternate === null && w44 === 0 && (w44 = 3), t15.flags &= -257, t15.flags |= 65536, t15.lanes = n24, u36 === Xn4 ? t15.flags |= 16384 : (a36 = t15.updateQueue, a36 === null ? t15.updateQueue = /* @__PURE__ */ new Set([u36]) : a36.add(u36), Wf2(l28, u36, n24)), false; case 22: return t15.flags |= 65536, u36 === Xn4 ? t15.flags |= 16384 : (a36 = t15.updateQueue, a36 === null ? (a36 = { transitions: null, markerInstances: null, retryQueue: /* @__PURE__ */ new Set([u36]) }, t15.updateQueue = a36) : (t15 = a36.retryQueue, t15 === null ? a36.retryQueue = /* @__PURE__ */ new Set([u36]) : t15.add(u36)), Wf2(l28, u36, n24)), false; } throw Error(A53(435, t15.tag)); } return Wf2(l28, u36, n24), Kn4(), false; } if (Y43) return a36 = Bl2.current, a36 !== null ? ((a36.flags & 65536) === 0 && (a36.flags |= 256), a36.flags |= 65536, a36.lanes = n24, u36 !== gc2 && (l28 = Error(A53(422), { cause: u36 }), Du3(Xl2(l28, t15)))) : (u36 !== gc2 && (a36 = Error(A53(423), { cause: u36 }), Du3(Xl2(a36, t15))), l28 = l28.current.alternate, l28.flags |= 65536, n24 &= -n24, l28.lanes |= n24, u36 = Xl2(u36, t15), n24 = qc2(l28.stateNode, u36, n24), Xf2(l28, n24), w44 !== 4 && (w44 = 2)), false; var f46 = Error(A53(520), { cause: u36 }); if (f46 = Xl2(f46, t15), gu3 === null ? gu3 = [f46] : gu3.push(f46), w44 !== 4 && (w44 = 2), a36 === null) return true; u36 = Xl2(u36, t15), t15 = a36; do { switch (t15.tag) { case 3: return t15.flags |= 65536, l28 = n24 & -n24, t15.lanes |= l28, l28 = qc2(t15.stateNode, u36, l28), Xf2(t15, l28), false; case 1: if (a36 = t15.type, f46 = t15.stateNode, (t15.flags & 128) === 0 && (typeof a36.getDerivedStateFromError == "function" || f46 !== null && typeof f46.componentDidCatch == "function" && (qa2 === null || !qa2.has(f46)))) return t15.flags |= 65536, n24 &= -n24, t15.lanes |= n24, n24 = $110(n24), k110(n24, l28, t15, u36), Xf2(t15, n24), false; } t15 = t15.return; } while (t15 !== null); return false; } var qe14 = Error(A53(461)), r19 = false; function fl3(l28, a36, t15, u36) { a36.child = l28 === null ? y110(a36, null, t15, u36) : Ia2(a36, l28.child, t15, u36); } function si4(l28, a36, t15, u36, n24) { t15 = t15.render; var f46 = a36.ref; if ("ref" in u36) { var c25 = {}; for (var e16 in u36) e16 !== "ref" && (c25[e16] = u36[e16]); } else c25 = u36; return ka2(a36), u36 = ze16(l28, a36, t15, c25, f46, n24), e16 = be26(), l28 !== null && !r19 ? (Ae22(l28, a36, n24), va2(l28, a36, n24)) : (Y43 && e16 && ie25(a36), a36.flags |= 1, fl3(l28, a36, u36, n24), a36.child); } function oi3(l28, a36, t15, u36, n24) { if (l28 === null) { var f46 = t15.type; return typeof f46 == "function" && !ee31(f46) && f46.defaultProps === void 0 && t15.compare === null ? (a36.tag = 15, a36.type = f46, I110(l28, a36, f46, u36, n24)) : (l28 = dn5(t15.type, null, u36, a36, a36.mode, n24), l28.ref = a36.ref, l28.return = a36, a36.child = l28); } if (f46 = l28.child, !_e22(l28, n24)) { var c25 = f46.memoizedProps; if (t15 = t15.compare, t15 = t15 !== null ? t15 : Mu3, t15(c25, u36) && l28.ref === a36.ref) return va2(l28, a36, n24); } return a36.flags |= 1, l28 = ua3(f46, u36), l28.ref = a36.ref, l28.return = a36, a36.child = l28; } function I110(l28, a36, t15, u36, n24) { if (l28 !== null) { var f46 = l28.memoizedProps; if (Mu3(f46, u36) && l28.ref === a36.ref) if (r19 = false, a36.pendingProps = u36 = f46, _e22(l28, n24)) (l28.flags & 131072) !== 0 && (r19 = true); else return a36.lanes = l28.lanes, va2(l28, a36, n24); } return _c2(l28, a36, t15, u36, n24); } function P110(l28, a36, t15, u36) { var n24 = u36.children, f46 = l28 !== null ? l28.memoizedState : null; if (l28 === null && a36.stateNode === null && (a36.stateNode = { _visibility: 1, _pendingMarkers: null, _retryCache: null, _transitions: null }), u36.mode === "hidden") { if ((a36.flags & 128) !== 0) { if (f46 = f46 !== null ? f46.baseLanes | t15 : t15, l28 !== null) { for (u36 = a36.child = l28.child, n24 = 0; u36 !== null; ) n24 = n24 | u36.lanes | u36.childLanes, u36 = u36.sibling; u36 = n24 & ~f46; } else u36 = 0, a36.child = null; return Xi3(l28, a36, f46, t15, u36); } if ((t15 & 536870912) !== 0) a36.memoizedState = { baseLanes: 0, cachePool: null }, l28 !== null && Sn5(a36, f46 !== null ? f46.cachePool : null), f46 !== null ? Mi3(a36, f46) : Oc2(), d110(a36); else return u36 = a36.lanes = 536870912, Xi3(l28, a36, f46 !== null ? f46.baseLanes | t15 : t15, t15, u36); } else f46 !== null ? (Sn5(a36, f46.cachePool), Mi3(a36, f46), ba3(a36), a36.memoizedState = null) : (l28 !== null && Sn5(a36, null), Oc2(), ba3(a36)); return fl3(l28, a36, n24, t15), a36.child; } function uu3(l28, a36) { return l28 !== null && l28.tag === 22 || a36.stateNode !== null || (a36.stateNode = { _visibility: 1, _pendingMarkers: null, _retryCache: null, _transitions: null }), a36.sibling; } function Xi3(l28, a36, t15, u36, n24) { var f46 = he26(); return f46 = f46 === null ? null : { parent: P43._currentValue, pool: f46 }, a36.memoizedState = { baseLanes: t15, cachePool: f46 }, l28 !== null && Sn5(a36, null), Oc2(), d110(a36), l28 !== null && pt13(l28, a36, u36, true), a36.childLanes = n24, null; } function bn5(l28, a36) { return a36 = jn4({ mode: a36.mode, children: a36.children }, l28.mode), a36.ref = l28.ref, l28.child = a36, a36.return = l28, a36; } function Gi3(l28, a36, t15) { return Ia2(a36, l28.child, null, t15), l28 = bn5(a36, a36.pendingProps), l28.flags |= 2, Tl3(a36), a36.memoizedState = null, l28; } function Vh2(l28, a36, t15) { var u36 = a36.pendingProps, n24 = (a36.flags & 128) !== 0; if (a36.flags &= -129, l28 === null) { if (Y43) { if (u36.mode === "hidden") return l28 = bn5(a36, u36), a36.lanes = 536870912, uu3(null, l28); if (Dc2(a36), (l28 = K45) ? (l28 = Lv2(l28, Gl2), l28 = l28 !== null && l28.data === "&" ? l28 : null, l28 !== null && (a36.memoizedState = { dehydrated: l28, treeContext: Xa2 !== null ? { id: xl3, overflow: pl3 } : null, retryLane: 536870912, hydrationErrors: null }, t15 = u110(l28), t15.return = a36, a36.child = t15, el2 = a36, K45 = null)) : l28 = null, l28 === null) throw Ga2(a36); return a36.lanes = 536870912, null; } return bn5(a36, u36); } var f46 = l28.memoizedState; if (f46 !== null) { var c25 = f46.dehydrated; if (Dc2(a36), n24) if (a36.flags & 256) a36.flags &= -257, a36 = Gi3(l28, a36, t15); else if (a36.memoizedState !== null) a36.child = l28.child, a36.flags |= 128, a36 = null; else throw Error(A53(558)); else if (r19 || pt13(l28, a36, t15, false), n24 = (t15 & l28.childLanes) !== 0, r19 || n24) { if (u36 = V34, u36 !== null && (c25 = _02(u36, t15), c25 !== 0 && c25 !== f46.retryLane)) throw f46.retryLane = c25, ut15(l28, c25), gl3(u36, l28, c25), qe14; Kn4(), a36 = Gi3(l28, a36, t15); } else l28 = f46.treeContext, K45 = Zl3(c25.nextSibling), el2 = a36, Y43 = true, Ha3 = null, Gl2 = false, l28 !== null && f110(a36, l28), a36 = bn5(a36, u36), a36.flags |= 4096; return a36; } return l28 = ua3(l28.child, { mode: u36.mode, children: u36.children }), l28.ref = a36.ref, a36.child = l28, l28.return = a36, l28; } function An5(l28, a36) { var t15 = a36.ref; if (t15 === null) l28 !== null && l28.ref !== null && (a36.flags |= 4194816); else { if (typeof t15 != "function" && typeof t15 != "object") throw Error(A53(284)); (l28 === null || l28.ref !== t15) && (a36.flags |= 4194816); } } function _c2(l28, a36, t15, u36, n24) { return ka2(a36), t15 = ze16(l28, a36, t15, u36, void 0, n24), u36 = be26(), l28 !== null && !r19 ? (Ae22(l28, a36, n24), va2(l28, a36, n24)) : (Y43 && u36 && ie25(a36), a36.flags |= 1, fl3(l28, a36, t15, n24), a36.child); } function Qi3(l28, a36, t15, u36, n24, f46) { return ka2(a36), a36.updateQueue = null, t15 = g110(a36, u36, t15, n24), S110(l28), u36 = be26(), l28 !== null && !r19 ? (Ae22(l28, a36, f46), va2(l28, a36, f46)) : (Y43 && u36 && ie25(a36), a36.flags |= 1, fl3(l28, a36, t15, f46), a36.child); } function Zi3(l28, a36, t15, u36, n24) { if (ka2(a36), a36.stateNode === null) { var f46 = At10, c25 = t15.contextType; typeof c25 == "object" && c25 !== null && (f46 = il2(c25)), f46 = new t15(u36, f46), a36.memoizedState = f46.state !== null && f46.state !== void 0 ? f46.state : null, f46.updater = Bc2, a36.stateNode = f46, f46._reactInternals = a36, f46 = a36.stateNode, f46.props = u36, f46.state = a36.memoizedState, f46.refs = {}, de24(a36), c25 = t15.contextType, f46.context = typeof c25 == "object" && c25 !== null ? il2(c25) : At10, f46.state = a36.memoizedState, c25 = t15.getDerivedStateFromProps, typeof c25 == "function" && (Qf2(a36, t15, c25, u36), f46.state = a36.memoizedState), typeof t15.getDerivedStateFromProps == "function" || typeof f46.getSnapshotBeforeUpdate == "function" || typeof f46.UNSAFE_componentWillMount != "function" && typeof f46.componentWillMount != "function" || (c25 = f46.state, typeof f46.componentWillMount == "function" && f46.componentWillMount(), typeof f46.UNSAFE_componentWillMount == "function" && f46.UNSAFE_componentWillMount(), c25 !== f46.state && Bc2.enqueueReplaceState(f46, f46.state, null), hu3(a36, u36, f46, n24), yu3(), f46.state = a36.memoizedState), typeof f46.componentDidMount == "function" && (a36.flags |= 4194308), u36 = true; } else if (l28 === null) { f46 = a36.stateNode; var e16 = a36.memoizedProps, i20 = ra3(t15, e16); f46.props = i20; var m37 = f46.context, g45 = t15.contextType; c25 = At10, typeof g45 == "object" && g45 !== null && (c25 = il2(g45)); var b45 = t15.getDerivedStateFromProps; g45 = typeof b45 == "function" || typeof f46.getSnapshotBeforeUpdate == "function", e16 = a36.pendingProps !== e16, g45 || typeof f46.UNSAFE_componentWillReceiveProps != "function" && typeof f46.componentWillReceiveProps != "function" || (e16 || m37 !== c25) && _i5(a36, f46, u36, c25), Sa2 = false; var d31 = a36.memoizedState; f46.state = d31, hu3(a36, u36, f46, n24), yu3(), m37 = a36.memoizedState, e16 || d31 !== m37 || Sa2 ? (typeof b45 == "function" && (Qf2(a36, t15, b45, u36), m37 = a36.memoizedState), (i20 = Sa2 || qi3(a36, t15, i20, u36, d31, m37, c25)) ? (g45 || typeof f46.UNSAFE_componentWillMount != "function" && typeof f46.componentWillMount != "function" || (typeof f46.componentWillMount == "function" && f46.componentWillMount(), typeof f46.UNSAFE_componentWillMount == "function" && f46.UNSAFE_componentWillMount()), typeof f46.componentDidMount == "function" && (a36.flags |= 4194308)) : (typeof f46.componentDidMount == "function" && (a36.flags |= 4194308), a36.memoizedProps = u36, a36.memoizedState = m37), f46.props = u36, f46.state = m37, f46.context = c25, u36 = i20) : (typeof f46.componentDidMount == "function" && (a36.flags |= 4194308), u36 = false); } else { f46 = a36.stateNode, Ec2(l28, a36), c25 = a36.memoizedProps, g45 = ra3(t15, c25), f46.props = g45, b45 = a36.pendingProps, d31 = f46.context, m37 = t15.contextType, i20 = At10, typeof m37 == "object" && m37 !== null && (i20 = il2(m37)), e16 = t15.getDerivedStateFromProps, (m37 = typeof e16 == "function" || typeof f46.getSnapshotBeforeUpdate == "function") || typeof f46.UNSAFE_componentWillReceiveProps != "function" && typeof f46.componentWillReceiveProps != "function" || (c25 !== b45 || d31 !== i20) && _i5(a36, f46, u36, i20), Sa2 = false, d31 = a36.memoizedState, f46.state = d31, hu3(a36, u36, f46, n24), yu3(); var S60 = a36.memoizedState; c25 !== b45 || d31 !== S60 || Sa2 || l28 !== null && l28.dependencies !== null && on5(l28.dependencies) ? (typeof e16 == "function" && (Qf2(a36, t15, e16, u36), S60 = a36.memoizedState), (g45 = Sa2 || qi3(a36, t15, g45, u36, d31, S60, i20) || l28 !== null && l28.dependencies !== null && on5(l28.dependencies)) ? (m37 || typeof f46.UNSAFE_componentWillUpdate != "function" && typeof f46.componentWillUpdate != "function" || (typeof f46.componentWillUpdate == "function" && f46.componentWillUpdate(u36, S60, i20), typeof f46.UNSAFE_componentWillUpdate == "function" && f46.UNSAFE_componentWillUpdate(u36, S60, i20)), typeof f46.componentDidUpdate == "function" && (a36.flags |= 4), typeof f46.getSnapshotBeforeUpdate == "function" && (a36.flags |= 1024)) : (typeof f46.componentDidUpdate != "function" || c25 === l28.memoizedProps && d31 === l28.memoizedState || (a36.flags |= 4), typeof f46.getSnapshotBeforeUpdate != "function" || c25 === l28.memoizedProps && d31 === l28.memoizedState || (a36.flags |= 1024), a36.memoizedProps = u36, a36.memoizedState = S60), f46.props = u36, f46.state = S60, f46.context = i20, u36 = g45) : (typeof f46.componentDidUpdate != "function" || c25 === l28.memoizedProps && d31 === l28.memoizedState || (a36.flags |= 4), typeof f46.getSnapshotBeforeUpdate != "function" || c25 === l28.memoizedProps && d31 === l28.memoizedState || (a36.flags |= 1024), u36 = false); } return f46 = u36, An5(l28, a36), u36 = (a36.flags & 128) !== 0, f46 || u36 ? (f46 = a36.stateNode, t15 = u36 && typeof t15.getDerivedStateFromError != "function" ? null : f46.render(), a36.flags |= 1, l28 !== null && u36 ? (a36.child = Ia2(a36, l28.child, null, n24), a36.child = Ia2(a36, null, t15, n24)) : fl3(l28, a36, t15, n24), a36.memoizedState = f46.state, l28 = a36.child) : l28 = va2(l28, a36, n24), l28; } function Ci4(l28, a36, t15, u36) { return $a2(), a36.flags |= 256, fl3(l28, a36, t15, u36), a36.child; } var Zf2 = { dehydrated: null, treeContext: null, retryLane: 0, hydrationErrors: null }; function Cf2(l28) { return { baseLanes: l28, cachePool: e15() }; } function Rf2(l28, a36, t15) { return l28 = l28 !== null ? l28.childLanes & ~t15 : 0, a36 && (l28 |= Ml3), l28; } function r110(l28, a36, t15) { var u36 = a36.pendingProps, n24 = false, f46 = (a36.flags & 128) !== 0, c25; if ((c25 = f46) || (c25 = l28 !== null && l28.memoizedState === null ? false : (F40.current & 2) !== 0), c25 && (n24 = true, a36.flags &= -129), c25 = (a36.flags & 32) !== 0, a36.flags &= -33, l28 === null) { if (Y43) { if (n24 ? za3(a36) : ba3(a36), (l28 = K45) ? (l28 = Lv2(l28, Gl2), l28 = l28 !== null && l28.data !== "&" ? l28 : null, l28 !== null && (a36.memoizedState = { dehydrated: l28, treeContext: Xa2 !== null ? { id: xl3, overflow: pl3 } : null, retryLane: 536870912, hydrationErrors: null }, t15 = u110(l28), t15.return = a36, a36.child = t15, el2 = a36, K45 = null)) : l28 = null, l28 === null) throw Ga2(a36); return Kc2(l28) ? a36.lanes = 32 : a36.lanes = 536870912, null; } var e16 = u36.children; return u36 = u36.fallback, n24 ? (ba3(a36), n24 = a36.mode, e16 = jn4({ mode: "hidden", children: e16 }, n24), u36 = Ja2(u36, n24, t15, null), e16.return = a36, u36.return = a36, e16.sibling = u36, a36.child = e16, u36 = a36.child, u36.memoizedState = Cf2(t15), u36.childLanes = Rf2(l28, c25, t15), a36.memoizedState = Zf2, uu3(null, u36)) : (za3(a36), Yc2(a36, e16)); } var i20 = l28.memoizedState; if (i20 !== null && (e16 = i20.dehydrated, e16 !== null)) { if (f46) a36.flags & 256 ? (za3(a36), a36.flags &= -257, a36 = jf2(l28, a36, t15)) : a36.memoizedState !== null ? (ba3(a36), a36.child = l28.child, a36.flags |= 128, a36 = null) : (ba3(a36), e16 = u36.fallback, n24 = a36.mode, u36 = jn4({ mode: "visible", children: u36.children }, n24), e16 = Ja2(e16, n24, t15, null), e16.flags |= 2, u36.return = a36, e16.return = a36, u36.sibling = e16, a36.child = u36, Ia2(a36, l28.child, null, t15), u36 = a36.child, u36.memoizedState = Cf2(t15), u36.childLanes = Rf2(l28, c25, t15), a36.memoizedState = Zf2, a36 = uu3(null, u36)); else if (za3(a36), Kc2(e16)) { if (c25 = e16.nextSibling && e16.nextSibling.dataset, c25) var m37 = c25.dgst; c25 = m37, u36 = Error(A53(419)), u36.stack = "", u36.digest = c25, Du3({ value: u36, source: null, stack: null }), a36 = jf2(l28, a36, t15); } else if (r19 || pt13(l28, a36, t15, false), c25 = (t15 & l28.childLanes) !== 0, r19 || c25) { if (c25 = V34, c25 !== null && (u36 = _02(c25, t15), u36 !== 0 && u36 !== i20.retryLane)) throw i20.retryLane = u36, ut15(l28, u36), gl3(c25, l28, u36), qe14; pc2(e16) || Kn4(), a36 = jf2(l28, a36, t15); } else pc2(e16) ? (a36.flags |= 192, a36.child = l28.child, a36 = null) : (l28 = i20.treeContext, K45 = Zl3(e16.nextSibling), el2 = a36, Y43 = true, Ha3 = null, Gl2 = false, l28 !== null && f110(a36, l28), a36 = Yc2(a36, u36.children), a36.flags |= 4096); return a36; } return n24 ? (ba3(a36), e16 = u36.fallback, n24 = a36.mode, i20 = l28.child, m37 = i20.sibling, u36 = ua3(i20, { mode: "hidden", children: u36.children }), u36.subtreeFlags = i20.subtreeFlags & 65011712, m37 !== null ? e16 = ua3(m37, e16) : (e16 = Ja2(e16, n24, t15, null), e16.flags |= 2), e16.return = a36, u36.return = a36, u36.sibling = e16, a36.child = u36, uu3(null, u36), u36 = a36.child, e16 = l28.child.memoizedState, e16 === null ? e16 = Cf2(t15) : (n24 = e16.cachePool, n24 !== null ? (i20 = P43._currentValue, n24 = n24.parent !== i20 ? { parent: i20, pool: i20 } : n24) : n24 = e15(), e16 = { baseLanes: e16.baseLanes | t15, cachePool: n24 }), u36.memoizedState = e16, u36.childLanes = Rf2(l28, c25, t15), a36.memoizedState = Zf2, uu3(l28.child, u36)) : (za3(a36), t15 = l28.child, l28 = t15.sibling, t15 = ua3(t15, { mode: "visible", children: u36.children }), t15.return = a36, t15.sibling = null, l28 !== null && (c25 = a36.deletions, c25 === null ? (a36.deletions = [l28], a36.flags |= 16) : c25.push(l28)), a36.child = t15, a36.memoizedState = null, t15); } function Yc2(l28, a36) { return a36 = jn4({ mode: "visible", children: a36 }, l28.mode), a36.return = l28, l28.child = a36; } function jn4(l28, a36) { return l28 = El3(22, l28, null, a36), l28.lanes = 0, l28; } function jf2(l28, a36, t15) { return Ia2(a36, l28.child, null, t15), l28 = Yc2(a36, a36.pendingProps.children), l28.flags |= 2, a36.memoizedState = null, l28; } function Ri3(l28, a36, t15) { l28.lanes |= a36; var u36 = l28.alternate; u36 !== null && (u36.lanes |= a36), bc2(l28.return, a36, t15); } function Vf2(l28, a36, t15, u36, n24, f46) { var c25 = l28.memoizedState; c25 === null ? l28.memoizedState = { isBackwards: a36, rendering: null, renderingStartTime: 0, last: u36, tail: t15, tailMode: n24, treeForkCount: f46 } : (c25.isBackwards = a36, c25.rendering = null, c25.renderingStartTime = 0, c25.last = u36, c25.tail = t15, c25.tailMode = n24, c25.treeForkCount = f46); } function lv2(l28, a36, t15) { var u36 = a36.pendingProps, n24 = u36.revealOrder, f46 = u36.tail; u36 = u36.children; var c25 = F40.current, e16 = (c25 & 2) !== 0; if (e16 ? (c25 = c25 & 1 | 2, a36.flags |= 128) : c25 &= 1, x50(F40, c25), fl3(l28, a36, u36, t15), u36 = Y43 ? Ou3 : 0, !e16 && l28 !== null && (l28.flags & 128) !== 0) l: for (l28 = a36.child; l28 !== null; ) { if (l28.tag === 13) l28.memoizedState !== null && Ri3(l28, t15, a36); else if (l28.tag === 19) Ri3(l28, t15, a36); else if (l28.child !== null) { l28.child.return = l28, l28 = l28.child; continue; } if (l28 === a36) break l; for (; l28.sibling === null; ) { if (l28.return === null || l28.return === a36) break l; l28 = l28.return; } l28.sibling.return = l28.return, l28 = l28.sibling; } switch (n24) { case "forwards": for (t15 = a36.child, n24 = null; t15 !== null; ) l28 = t15.alternate, l28 !== null && Qn4(l28) === null && (n24 = t15), t15 = t15.sibling; t15 = n24, t15 === null ? (n24 = a36.child, a36.child = null) : (n24 = t15.sibling, t15.sibling = null), Vf2(a36, false, n24, t15, f46, u36); break; case "backwards": case "unstable_legacy-backwards": for (t15 = null, n24 = a36.child, a36.child = null; n24 !== null; ) { if (l28 = n24.alternate, l28 !== null && Qn4(l28) === null) { a36.child = n24; break; } l28 = n24.sibling, n24.sibling = t15, t15 = n24, n24 = l28; } Vf2(a36, true, t15, null, f46, u36); break; case "together": Vf2(a36, false, null, null, void 0, u36); break; default: a36.memoizedState = null; } return a36.child; } function va2(l28, a36, t15) { if (l28 !== null && (a36.dependencies = l28.dependencies), Za2 |= a36.lanes, (t15 & a36.childLanes) === 0) if (l28 !== null) { if (pt13(l28, a36, t15, false), (t15 & a36.childLanes) === 0) return null; } else return null; if (l28 !== null && a36.child !== l28.child) throw Error(A53(153)); if (a36.child !== null) { for (l28 = a36.child, t15 = ua3(l28, l28.pendingProps), a36.child = t15, t15.return = a36; l28.sibling !== null; ) l28 = l28.sibling, t15 = t15.sibling = ua3(l28, l28.pendingProps), t15.return = a36; t15.sibling = null; } return a36.child; } function _e22(l28, a36) { return (l28.lanes & a36) !== 0 ? true : (l28 = l28.dependencies, !!(l28 !== null && on5(l28))); } function xh2(l28, a36, t15) { switch (a36.tag) { case 3: Hn4(a36, a36.stateNode.containerInfo), ga3(a36, P43, l28.memoizedState.cache), $a2(); break; case 27: case 5: nc2(a36); break; case 4: Hn4(a36, a36.stateNode.containerInfo); break; case 10: ga3(a36, a36.type, a36.memoizedProps.value); break; case 31: if (a36.memoizedState !== null) return a36.flags |= 128, Dc2(a36), null; break; case 13: var u36 = a36.memoizedState; if (u36 !== null) return u36.dehydrated !== null ? (za3(a36), a36.flags |= 128, null) : (t15 & a36.child.childLanes) !== 0 ? r110(l28, a36, t15) : (za3(a36), l28 = va2(l28, a36, t15), l28 !== null ? l28.sibling : null); za3(a36); break; case 19: var n24 = (l28.flags & 128) !== 0; if (u36 = (t15 & a36.childLanes) !== 0, u36 || (pt13(l28, a36, t15, false), u36 = (t15 & a36.childLanes) !== 0), n24) { if (u36) return lv2(l28, a36, t15); a36.flags |= 128; } if (n24 = a36.memoizedState, n24 !== null && (n24.rendering = null, n24.tail = null, n24.lastEffect = null), x50(F40, F40.current), u36) break; return null; case 22: return a36.lanes = 0, P110(l28, a36, t15, a36.pendingProps); case 24: ga3(a36, P43, l28.memoizedState.cache); } return va2(l28, a36, t15); } function av2(l28, a36, t15) { if (l28 !== null) if (l28.memoizedProps !== a36.pendingProps) r19 = true; else { if (!_e22(l28, t15) && (a36.flags & 128) === 0) return r19 = false, xh2(l28, a36, t15); r19 = (l28.flags & 131072) !== 0; } else r19 = false, Y43 && (a36.flags & 1048576) !== 0 && n110(a36, Ou3, a36.index); switch (a36.lanes = 0, a36.tag) { case 16: l: { var u36 = a36.pendingProps; if (l28 = pa2(a36.elementType), a36.type = l28, typeof l28 == "function") ee31(l28) ? (u36 = ra3(l28, u36), a36.tag = 1, a36 = Zi3(null, a36, l28, u36, t15)) : (a36.tag = 0, a36 = _c2(null, a36, l28, u36, t15)); else { if (l28 != null) { var n24 = l28.$$typeof; if (n24 === wc2) { a36.tag = 11, a36 = si4(null, a36, l28, u36, t15); break l; } else if (n24 === Fc2) { a36.tag = 14, a36 = oi3(null, a36, l28, u36, t15); break l; } } throw a36 = tc2(l28) || l28, Error(A53(306, a36, "")); } } return a36; case 0: return _c2(l28, a36, a36.type, a36.pendingProps, t15); case 1: return u36 = a36.type, n24 = ra3(u36, a36.pendingProps), Zi3(l28, a36, u36, n24, t15); case 3: l: { if (Hn4(a36, a36.stateNode.containerInfo), l28 === null) throw Error(A53(387)); u36 = a36.pendingProps; var f46 = a36.memoizedState; n24 = f46.element, Ec2(l28, a36), hu3(a36, u36, null, t15); var c25 = a36.memoizedState; if (u36 = c25.cache, ga3(a36, P43, u36), u36 !== f46.cache && Ac2(a36, [P43], t15, true), yu3(), u36 = c25.element, f46.isDehydrated) if (f46 = { element: u36, isDehydrated: false, cache: c25.cache }, a36.updateQueue.baseState = f46, a36.memoizedState = f46, a36.flags & 256) { a36 = Ci4(l28, a36, u36, t15); break l; } else if (u36 !== n24) { n24 = Xl2(Error(A53(424)), a36), Du3(n24), a36 = Ci4(l28, a36, u36, t15); break l; } else for (l28 = a36.stateNode.containerInfo, l28.nodeType === 9 ? l28 = l28.body : l28 = l28.nodeName === "HTML" ? l28.ownerDocument.body : l28, K45 = Zl3(l28.firstChild), el2 = a36, Y43 = true, Ha3 = null, Gl2 = true, t15 = y110(a36, null, u36, t15), a36.child = t15; t15; ) t15.flags = t15.flags & -3 | 4096, t15 = t15.sibling; else { if ($a2(), u36 === n24) { a36 = va2(l28, a36, t15); break l; } fl3(l28, a36, u36, t15); } a36 = a36.child; } return a36; case 26: return An5(l28, a36), l28 === null ? (t15 = c04(a36.type, null, a36.pendingProps, null)) ? a36.memoizedState = t15 : Y43 || (t15 = a36.type, l28 = a36.pendingProps, u36 = wn5(Ua2.current).createElement(t15), u36[cl3] = a36, u36[zl3] = l28, vl3(u36, t15, l28), ul3(u36), a36.stateNode = u36) : a36.memoizedState = c04(a36.type, l28.memoizedProps, a36.pendingProps, l28.memoizedState), null; case 27: return nc2(a36), l28 === null && Y43 && (u36 = a36.stateNode = Jv2(a36.type, a36.pendingProps, Ua2.current), el2 = a36, Gl2 = true, n24 = K45, Ra3(a36.type) ? (Lc2 = n24, K45 = Zl3(u36.firstChild)) : K45 = n24), fl3(l28, a36, a36.pendingProps.children, t15), An5(l28, a36), l28 === null && (a36.flags |= 4194304), a36.child; case 5: return l28 === null && Y43 && ((n24 = u36 = K45) && (u36 = gm2(u36, a36.type, a36.pendingProps, Gl2), u36 !== null ? (a36.stateNode = u36, el2 = a36, K45 = Zl3(u36.firstChild), Gl2 = false, n24 = true) : n24 = false), n24 || Ga2(a36)), nc2(a36), n24 = a36.type, f46 = a36.pendingProps, c25 = l28 !== null ? l28.memoizedProps : null, u36 = f46.children, Vc2(n24, f46) ? u36 = null : c25 !== null && Vc2(n24, c25) && (a36.flags |= 32), a36.memoizedState !== null && (n24 = ze16(l28, a36, oh2, null, null, t15), _u3._currentValue = n24), An5(l28, a36), fl3(l28, a36, u36, t15), a36.child; case 6: return l28 === null && Y43 && ((l28 = t15 = K45) && (t15 = zm2(t15, a36.pendingProps, Gl2), t15 !== null ? (a36.stateNode = t15, el2 = a36, K45 = null, l28 = true) : l28 = false), l28 || Ga2(a36)), null; case 13: return r110(l28, a36, t15); case 4: return Hn4(a36, a36.stateNode.containerInfo), u36 = a36.pendingProps, l28 === null ? a36.child = Ia2(a36, null, u36, t15) : fl3(l28, a36, u36, t15), a36.child; case 11: return si4(l28, a36, a36.type, a36.pendingProps, t15); case 7: return fl3(l28, a36, a36.pendingProps, t15), a36.child; case 8: return fl3(l28, a36, a36.pendingProps.children, t15), a36.child; case 12: return fl3(l28, a36, a36.pendingProps.children, t15), a36.child; case 10: return u36 = a36.pendingProps, ga3(a36, a36.type, u36.value), fl3(l28, a36, u36.children, t15), a36.child; case 9: return n24 = a36.type._context, u36 = a36.pendingProps.children, ka2(a36), n24 = il2(n24), u36 = u36(n24), a36.flags |= 1, fl3(l28, a36, u36, t15), a36.child; case 14: return oi3(l28, a36, a36.type, a36.pendingProps, t15); case 15: return I110(l28, a36, a36.type, a36.pendingProps, t15); case 19: return lv2(l28, a36, t15); case 31: return Vh2(l28, a36, t15); case 22: return P110(l28, a36, t15, a36.pendingProps); case 24: return ka2(a36), u36 = il2(P43), l28 === null ? (n24 = he26(), n24 === null && (n24 = V34, f46 = ye25(), n24.pooledCache = f46, f46.refCount++, f46 !== null && (n24.pooledCacheLanes |= t15), n24 = f46), a36.memoizedState = { parent: u36, cache: n24 }, de24(a36), ga3(a36, P43, n24)) : ((l28.lanes & t15) !== 0 && (Ec2(l28, a36), hu3(a36, null, null, t15), yu3()), n24 = l28.memoizedState, f46 = a36.memoizedState, n24.parent !== u36 ? (n24 = { parent: u36, cache: u36 }, a36.memoizedState = n24, a36.lanes === 0 && (a36.memoizedState = a36.updateQueue.baseState = n24), ga3(a36, P43, u36)) : (u36 = f46.cache, ga3(a36, P43, u36), u36 !== n24.cache && Ac2(a36, [P43], t15, true))), fl3(l28, a36, a36.pendingProps.children, t15), a36.child; case 29: throw a36.pendingProps; } throw Error(A53(156, a36.tag)); } function Fl2(l28) { l28.flags |= 4; } function xf2(l28, a36, t15, u36, n24) { if ((a36 = (l28.mode & 32) !== 0) && (a36 = false), a36) { if (l28.flags |= 16777216, (n24 & 335544128) === n24) if (l28.stateNode.complete) l28.flags |= 8192; else if (Hv2()) l28.flags |= 8192; else throw wa3 = Xn4, me25; } else l28.flags &= -16777217; } function ji4(l28, a36) { if (a36.type !== "stylesheet" || (a36.state.loading & 4) !== 0) l28.flags &= -16777217; else if (l28.flags |= 16777216, !Fv2(a36)) if (Hv2()) l28.flags |= 8192; else throw wa3 = Xn4, me25; } function an5(l28, a36) { a36 !== null && (l28.flags |= 4), l28.flags & 16384 && (a36 = l28.tag !== 22 ? N02() : 536870912, l28.lanes |= a36, Qt6 |= a36); } function kt14(l28, a36) { if (!Y43) switch (l28.tailMode) { case "hidden": a36 = l28.tail; for (var t15 = null; a36 !== null; ) a36.alternate !== null && (t15 = a36), a36 = a36.sibling; t15 === null ? l28.tail = null : t15.sibling = null; break; case "collapsed": t15 = l28.tail; for (var u36 = null; t15 !== null; ) t15.alternate !== null && (u36 = t15), t15 = t15.sibling; u36 === null ? a36 || l28.tail === null ? l28.tail = null : l28.tail.sibling = null : u36.sibling = null; } } function p37(l28) { var a36 = l28.alternate !== null && l28.alternate.child === l28.child, t15 = 0, u36 = 0; if (a36) for (var n24 = l28.child; n24 !== null; ) t15 |= n24.lanes | n24.childLanes, u36 |= n24.subtreeFlags & 65011712, u36 |= n24.flags & 65011712, n24.return = l28, n24 = n24.sibling; else for (n24 = l28.child; n24 !== null; ) t15 |= n24.lanes | n24.childLanes, u36 |= n24.subtreeFlags, u36 |= n24.flags, n24.return = l28, n24 = n24.sibling; return l28.subtreeFlags |= u36, l28.childLanes = t15, a36; } function ph2(l28, a36, t15) { var u36 = a36.pendingProps; switch (ve27(a36), a36.tag) { case 16: case 15: case 0: case 11: case 7: case 8: case 12: case 9: case 14: return p37(a36), null; case 1: return p37(a36), null; case 3: return t15 = a36.stateNode, u36 = null, l28 !== null && (u36 = l28.memoizedState.cache), a36.memoizedState.cache !== u36 && (a36.flags |= 2048), na3(P43), _t14(), t15.pendingContext && (t15.context = t15.pendingContext, t15.pendingContext = null), (l28 === null || l28.child === null) && (ct16(a36) ? Fl2(a36) : l28 === null || l28.memoizedState.isDehydrated && (a36.flags & 256) === 0 || (a36.flags |= 1024, of2())), p37(a36), null; case 26: var n24 = a36.type, f46 = a36.memoizedState; return l28 === null ? (Fl2(a36), f46 !== null ? (p37(a36), ji4(a36, f46)) : (p37(a36), xf2(a36, n24, null, u36, t15))) : f46 ? f46 !== l28.memoizedState ? (Fl2(a36), p37(a36), ji4(a36, f46)) : (p37(a36), a36.flags &= -16777217) : (l28 = l28.memoizedProps, l28 !== u36 && Fl2(a36), p37(a36), xf2(a36, n24, l28, u36, t15)), null; case 27: if (Nn5(a36), t15 = Ua2.current, n24 = a36.type, l28 !== null && a36.stateNode != null) l28.memoizedProps !== u36 && Fl2(a36); else { if (!u36) { if (a36.stateNode === null) throw Error(A53(166)); return p37(a36), null; } l28 = Ll2.current, ct16(a36) ? Si4(a36, l28) : (l28 = Jv2(n24, u36, t15), a36.stateNode = l28, Fl2(a36)); } return p37(a36), null; case 5: if (Nn5(a36), n24 = a36.type, l28 !== null && a36.stateNode != null) l28.memoizedProps !== u36 && Fl2(a36); else { if (!u36) { if (a36.stateNode === null) throw Error(A53(166)); return p37(a36), null; } if (f46 = Ll2.current, ct16(a36)) Si4(a36, f46); else { var c25 = wn5(Ua2.current); switch (f46) { case 1: f46 = c25.createElementNS("http://www.w3.org/2000/svg", n24); break; case 2: f46 = c25.createElementNS("http://www.w3.org/1998/Math/MathML", n24); break; default: switch (n24) { case "svg": f46 = c25.createElementNS("http://www.w3.org/2000/svg", n24); break; case "math": f46 = c25.createElementNS("http://www.w3.org/1998/Math/MathML", n24); break; case "script": f46 = c25.createElement("div"), f46.innerHTML = "