diff --git a/Makefile b/Makefile index b579d8e..2ddffaa 100644 --- a/Makefile +++ b/Makefile @@ -96,8 +96,8 @@ build-tails: @echo "🔨 Building for TailsOS (relative paths + embedded CSP)..." VITE_BASE_PATH="./" bun run vite build @echo "" - @echo "🔒 Injecting production CSP into index.html..." - @perl -i.bak -pe 's|()|$$1\n|' dist/index.html + @echo "🔒 Injecting production CSP into index.html (replacing baseline CSP)..." + @perl -i.bak -0777 -pe 's|]*/>||' dist/index.html @rm -f dist/index.html.bak @echo "✅ CSP embedded in dist/index.html" @echo "" diff --git a/README.md b/README.md index 1129073..77cc854 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,13 @@ make serve-local |----------------|-------------------|---------------|------| | **Testing** (<$100) | Any computer, local mode | `make build-offline` | 5 min | | **Real Use** ($100–$10K) | Clean computer, network disabled | `make build-offline` | 15 min | -| **Serious** ($10K–$100K) | **TailsOS airgapped** | `make full-build-tails` | 30 min | +| **Serious** ($10K–$100K) | **TailsOS or Ubuntu Live (airgapped)** | `make full-build-tails` | 30 min | | **Vault** (>$100K) | TailsOS + hardware wallet + multisig | `make full-build-tails` | 1+ hour | **The more funds at stake, the more security precautions you take.** +**Note:** TailsOS and Ubuntu Live USB provide equivalent security for offline seed operations. See Path 1 (TailsOS) and Path 3 (Ubuntu Live) below for detailed workflows. + --- ## 🔧 Makefile Commands Reference @@ -172,6 +174,8 @@ make install make full-build-tails ``` +**Note:** All builds include a baseline CSP in index.html, but the `make full-build-tails` pipeline injects a stricter, WASM-compatible CSP tailored for TailsOS. + **What `make full-build-tails` does:** 1. **Cleans** all previous build artifacts @@ -270,6 +274,282 @@ make serve-local --- +## 🐧 Path 3: Ubuntu Live USB (Alternative to TailsOS) + +**Ubuntu Live USB provides equivalent security to TailsOS** for offline seed operations. It's RAM-only, amnesic (data erased on shutdown), and may be more familiar if you're already comfortable with Ubuntu. + +### When to Use Ubuntu Live USB + +- ✅ You're already familiar with Ubuntu/Linux workflows +- ✅ You only need offline operations (no Tor required) +- ✅ You want faster boot time (~1 min vs Tails ~2 min) +- ✅ You might need to install additional tools during the session + +### Security Properties + +| Feature | Ubuntu Live USB | TailsOS | +|---------|-----------------|---------| +| RAM-only execution | ✅ Yes | ✅ Yes | +| Amnesic (data erased on poweroff) | ✅ Yes | ✅ Yes | +| Network isolation | ⚠️ Manual disable | ✅ Automatic (Tor-only) | +| Pre-installed crypto tools | ❌ Need Python | ✅ GPG, KeePassXC built-in | +| Boot time | ~1 min | ~2 min | +| Best for | Offline seed ops | Offline + Tor workflows | + +**For your use case (offline seed blending): Both are equivalent.** + +--- + +### Step 1: Prepare Ubuntu Live USB + +**On your regular computer:** + +```bash +# Download Ubuntu Desktop LTS ISO +wget https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso + +# Verify SHA256 checksum +sha256sum ubuntu-24.04-desktop-amd64.iso +# Compare against official checksum from ubuntu.com/download + +# Create bootable USB (Linux/Mac) +sudo dd if=ubuntu-24.04-desktop-amd64.iso of=/dev/sdX bs=4M status=progress +# ⚠️ Replace /dev/sdX with your USB device (check with 'lsblk') + +# Windows: Use Rufus or balenaEtcher instead +``` + +**Prepare SeedPGP on a separate USB drive:** + +```bash +# Clone and build on your trusted computer +git clone https://github.com/kccleoc/seedpgp-web.git +cd seedpgp-web +make install +make full-build-tails # Creates dist-tails/ with embedded CSP + +# Generate checksum file +cd dist-tails +sha256sum index.html > CHECKSUM.txt +cd .. + +# Copy to second USB drive (label it "SEEDPGP-OFFLINE") +cp -r dist-tails/ /media/your-usb/seedpgp-offline/ +``` + +**You now have:** +1. **USB #1:** Ubuntu Live bootable installer +2. **USB #2:** Pre-verified SeedPGP build with checksums + +--- + +### Step 2: Boot Ubuntu Live (Network Disabled) + +**Physical security checklist:** + +``` +□ Unplug Ethernet cable from computer +□ Remove SIM card (if using a laptop with cellular) +□ Put phone in airplane mode (away from desk) +□ Close curtains (prevent shoulder surfing) +``` + +**Boot process:** + +1. Insert Ubuntu Live USB (#1) +2. Reboot computer and press **F12/F2/ESC** during startup +3. Select USB drive from boot menu +4. Choose **"Try Ubuntu"** (NOT "Install Ubuntu") +5. **IMMEDIATELY after desktop loads:** Click network icon → **Disable Wi-Fi** +6. Verify network status in terminal: + +```bash +ip link show +# All interfaces should show 'state DOWN' except 'lo' (loopback) + +# Confirm no external routes +ip route +# Should ONLY show: 127.0.0.0/8 dev lo +``` + +--- + +### Step 3: Verify Clean State + +```bash +# Open Terminal (Ctrl+Alt+T) + +# Check no mounted writable drives +mount | grep -v "ro," +# Should only show read-only mounts (iso9660, squashfs) + +# Check no swap space +swapon --show +# Should return nothing + +# Verify RAM usage +free -h +# Should show ~2-4GB used (OS running entirely in RAM) +``` + +--- + +### Step 4: Load and Verify SeedPGP + +```bash +# Insert USB #2 (SEEDPGP-OFFLINE) +# It will auto-mount to /media/ubuntu/SEEDPGP-OFFLINE or similar + +# Navigate to the build folder +cd /media/ubuntu/*/seedpgp-offline/ +# Or use: cd /media/ubuntu/SEEDPGP-OFFLINE/seedpgp-offline/ + +# Verify integrity before running +sha256sum -c CHECKSUM.txt +# Should output: index.html: OK + +# If verification fails → STOP! Do not proceed. +# Re-build on your trusted computer and copy again. +``` + +--- + +### Step 5: Serve Locally with Python + +**Important:** You cannot open `file://` URLs directly in modern browsers due to CORS restrictions. You must serve over HTTP on localhost. + +```bash +# Start Python HTTP server (Python 3 is pre-installed) +python3 -m http.server 8000 & +# The '&' runs it in background + +# You'll see: +# Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... +``` + +**Security verification: Localhost is safe** + +Even though the server listens on `0.0.0.0:8000` (all interfaces), there are **no active network interfaces** to reach it from outside: + +```bash +# Verify localhost-only access +sudo ss -tlnp | grep 8000 +# Shows: LISTEN 0.0.0.0:8000 (looks exposed, but...) + +# Check which interfaces exist +ip addr show +# Should ONLY show 'lo' (loopback 127.0.0.1) with status UP +# No eth0, wlan0, or other interfaces should be UP + +# Try accessing from "outside" (this should fail) +curl http://192.168.1.100:8000 # Use any typical LAN IP +# Should instantly fail: "Network unreachable" +``` + +**The key:** Even though Python binds to `0.0.0.0`, there are no physical network paths to reach it. Localhost is a kernel-internal loopback interface. + +--- + +### Step 6: Open in Firefox + +```bash +# Launch Firefox with localhost URL +firefox http://localhost:8000 & +``` + +**Verify the app loaded correctly:** + +1. SeedPGP interface appears +2. Check browser console (F12) for CSP enforcement: + - Should see no CSP violation errors + - Network tab should show only localhost requests +3. Verify "Network BLOCKED" indicator in app header + +--- + +### Step 7: Use SeedPGP + +Now proceed with your seed operations (see "Using SeedPGP: The Workflow" section below): + +- Generate entropy (dice rolls recommended) +- Blend multiple hardware wallet seeds (if applicable) +- Encrypt to PGP key or password +- Export QR backup +- **Write final seed to paper immediately** + +**⚠️ CRITICAL:** Never save anything to disk. All data stays in RAM. + +--- + +### Step 8: Shutdown and Verify Data Erasure + +```bash +# Stop the Python server (not strictly necessary, but good practice) +killall python3 + +# Power off Ubuntu Live +sudo poweroff + +# Physical verification: +□ Remove both USB drives +□ All RAM contents are erased (power loss = data loss) +□ No trace left on computer's hard drive +``` + +**What just happened:** + +- ✅ All seed operations occurred in RAM only +- ✅ Python HTTP server never had external network access +- ✅ SeedPGP never wrote to persistent storage +- ✅ Shutdown wiped all RAM contents +- ✅ Computer's hard drive was never touched (read-only boot) + +--- + +### Optional: Advanced Hardening + +If you want to match TailsOS-level security: + +**1. Disable swap (already disabled by default, but verify):** +```bash +sudo swapoff -a +``` + +**2. Clear clipboard before shutdown:** +```bash +# If you copied anything sensitive +echo "" | xclip -selection clipboard +``` + +**3. Wipe RAM on shutdown (paranoid mode):** +```bash +# For protection against cold-boot attacks (freezing RAM with liquid nitrogen) +sudo apt install secure-delete +sudo sdmem -v # Takes ~2 min, overwrites RAM with random data +``` + +**Note:** For your threat model (protecting seeds from remote attackers, not physical access to frozen RAM), step 3 is unnecessary. + +--- + +### Ubuntu Live vs TailsOS: Summary + +**Use Ubuntu Live USB if:** +- You're already comfortable with Ubuntu +- You only need offline seed operations +- You want faster boot time +- You value familiarity over maximum security + +**Use TailsOS if:** +- You want zero-config maximum security +- You might need Tor for other operations +- You're handling $100K+ and want the most audited option +- You want automatic MAC randomization and anti-forensics + +**For your use case (three-hardware-wallet blend on Ubuntu Live): ✅ Perfectly safe.** + +--- + ## 🔐 Using SeedPGP: The Workflow ### Step 1: Generate Entropy (New Seed) diff --git a/dist-tails/README.txt b/dist-tails/README.txt index 287d49f..b71d483 100644 --- a/dist-tails/README.txt +++ b/dist-tails/README.txt @@ -1,6 +1,6 @@ # SeedPGP Web - TailsOS Offline Build -Built: Wed Feb 18 03:15:54 HKT 2026 +Built: Thu 19 Feb 2026 22:31:58 HKT Usage Instructions: 1. Copy this entire folder to a USB drive @@ -18,6 +18,6 @@ Security Features: SHA-256 Checksums: 5cbbcb8adc7acc3b78a3fd31c76d573302705ff5fd714d03f5a2602591197cb5 ./assets/secp256k1-Cao5Swmf.wasm -78cb021ce6777d4ca58fa225d60de2401a14624187297d4bc9f5394b0de6c05c ./assets/index-DTLOeMVw.js aab3ea208db02b2cb40902850c203f23159f515288b26ca5a131e1188b4362af ./assets/index-DW74Yc8k.css -f8f37cb2c6c247c87b17cf50458150d81cd7fd15d354ab5b38f2a56e9f00cf32 ./index.html +c5d6ba57285386d3c4a4e082b831ca24e6e925d7e25a4c38533a10e06c37b238 ./assets/index-Bwz_2nW3.js +c7cd63f8c0a39b0aca861668029aa569597e3b4f9bcd2e40aa274598522e0e8e ./index.html diff --git a/dist-tails/assets/index-DTLOeMVw.js b/dist-tails/assets/index-Bwz_2nW3.js similarity index 94% rename from dist-tails/assets/index-DTLOeMVw.js rename to dist-tails/assets/index-Bwz_2nW3.js index c279c77..8e651cd 100644 --- a/dist-tails/assets/index-DTLOeMVw.js +++ b/dist-tails/assets/index-Bwz_2nW3.js @@ -52,8 +52,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy if (fp) return $e; fp = 1; var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), h = Symbol.iterator; - function p(K) { - return K === null || typeof K != "object" ? null : (K = h && K[h] || K["@@iterator"], typeof K == "function" ? K : null); + function p(M) { + return M === null || typeof M != "object" ? null : (M = h && M[h] || M["@@iterator"], typeof M == "function" ? M : null); } var m = { isMounted: function() { @@ -66,20 +66,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy enqueueSetState: function() { } }, y = Object.assign, B = {}; - function v(K, V, ee) { - this.props = K, this.context = V, this.refs = B, this.updater = ee || m; + function v(M, G, ee) { + this.props = M, this.context = G, this.refs = B, this.updater = ee || m; } - v.prototype.isReactComponent = {}, v.prototype.setState = function(K, V) { - if (typeof K != "object" && typeof K != "function" && K != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); - this.updater.enqueueSetState(this, K, V, "setState"); - }, v.prototype.forceUpdate = function(K) { - this.updater.enqueueForceUpdate(this, K, "forceUpdate"); + v.prototype.isReactComponent = {}, v.prototype.setState = function(M, G) { + if (typeof M != "object" && typeof M != "function" && M != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + this.updater.enqueueSetState(this, M, G, "setState"); + }, v.prototype.forceUpdate = function(M) { + this.updater.enqueueForceUpdate(this, M, "forceUpdate"); }; function D() { } D.prototype = v.prototype; - function P(K, V, ee) { - this.props = K, this.context = V, this.refs = B, this.updater = ee || m; + function P(M, G, ee) { + this.props = M, this.context = G, this.refs = B, this.updater = ee || m; } var k = P.prototype = new D(); k.constructor = P, y(k, v.prototype), k.isPureReactComponent = true; @@ -91,98 +91,98 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy __self: true, __source: true }; - function U(K, V, ee) { - var te, oe = {}, ie = null, ce = null; - if (V != null) for (te in V.ref !== void 0 && (ce = V.ref), V.key !== void 0 && (ie = "" + V.key), V) _.call(V, te) && !N.hasOwnProperty(te) && (oe[te] = V[te]); + function U(M, G, ee) { + var te, oe = {}, ie = null, xe = null; + if (G != null) for (te in G.ref !== void 0 && (xe = G.ref), G.key !== void 0 && (ie = "" + G.key), G) _.call(G, te) && !N.hasOwnProperty(te) && (oe[te] = G[te]); var de = arguments.length - 2; if (de === 1) oe.children = ee; else if (1 < de) { for (var he = Array(de), be = 0; be < de; be++) he[be] = arguments[be + 2]; oe.children = he; } - if (K && K.defaultProps) for (te in de = K.defaultProps, de) oe[te] === void 0 && (oe[te] = de[te]); + if (M && M.defaultProps) for (te in de = M.defaultProps, de) oe[te] === void 0 && (oe[te] = de[te]); return { $$typeof: e, - type: K, + type: M, key: ie, - ref: ce, + ref: xe, props: oe, _owner: T.current }; } - function C(K, V) { + function C(M, G) { return { $$typeof: e, - type: K.type, - key: V, - ref: K.ref, - props: K.props, - _owner: K._owner + type: M.type, + key: G, + ref: M.ref, + props: M.props, + _owner: M._owner }; } - function j(K) { - return typeof K == "object" && K !== null && K.$$typeof === e; + function z(M) { + return typeof M == "object" && M !== null && M.$$typeof === e; } - function I(K) { - var V = { + function I(M) { + var G = { "=": "=0", ":": "=2" }; - return "$" + K.replace(/[=:]/g, function(ee) { - return V[ee]; + return "$" + M.replace(/[=:]/g, function(ee) { + return G[ee]; }); } var R = /\/+/g; - function L(K, V) { - return typeof K == "object" && K !== null && K.key != null ? I("" + K.key) : V.toString(36); + function L(M, G) { + return typeof M == "object" && M !== null && M.key != null ? I("" + M.key) : G.toString(36); } - function O(K, V, ee, te, oe) { - var ie = typeof K; - (ie === "undefined" || ie === "boolean") && (K = null); - var ce = false; - if (K === null) ce = true; + function O(M, G, ee, te, oe) { + var ie = typeof M; + (ie === "undefined" || ie === "boolean") && (M = null); + var xe = false; + if (M === null) xe = true; else switch (ie) { case "string": case "number": - ce = true; + xe = true; break; case "object": - switch (K.$$typeof) { + switch (M.$$typeof) { case e: case t: - ce = true; + xe = true; } } - if (ce) return ce = K, oe = oe(ce), K = te === "" ? "." + L(ce, 0) : te, w(oe) ? (ee = "", K != null && (ee = K.replace(R, "$&/") + "/"), O(oe, V, ee, "", function(be) { + if (xe) return xe = M, oe = oe(xe), M = te === "" ? "." + L(xe, 0) : te, w(oe) ? (ee = "", M != null && (ee = M.replace(R, "$&/") + "/"), O(oe, G, ee, "", function(be) { return be; - })) : oe != null && (j(oe) && (oe = C(oe, ee + (!oe.key || ce && ce.key === oe.key ? "" : ("" + oe.key).replace(R, "$&/") + "/") + K)), V.push(oe)), 1; - if (ce = 0, te = te === "" ? "." : te + ":", w(K)) for (var de = 0; de < K.length; de++) { - ie = K[de]; + })) : oe != null && (z(oe) && (oe = C(oe, ee + (!oe.key || xe && xe.key === oe.key ? "" : ("" + oe.key).replace(R, "$&/") + "/") + M)), G.push(oe)), 1; + if (xe = 0, te = te === "" ? "." : te + ":", w(M)) for (var de = 0; de < M.length; de++) { + ie = M[de]; var he = te + L(ie, de); - ce += O(ie, V, ee, he, oe); + xe += O(ie, G, ee, he, oe); } - else if (he = p(K), typeof he == "function") for (K = he.call(K), de = 0; !(ie = K.next()).done; ) ie = ie.value, he = te + L(ie, de++), ce += O(ie, V, ee, he, oe); - else if (ie === "object") throw V = String(K), Error("Objects are not valid as a React child (found: " + (V === "[object Object]" ? "object with keys {" + Object.keys(K).join(", ") + "}" : V) + "). If you meant to render a collection of children, use an array instead."); - return ce; + else if (he = p(M), typeof he == "function") for (M = he.call(M), de = 0; !(ie = M.next()).done; ) ie = ie.value, he = te + L(ie, de++), xe += O(ie, G, ee, he, oe); + else if (ie === "object") throw G = String(M), Error("Objects are not valid as a React child (found: " + (G === "[object Object]" ? "object with keys {" + Object.keys(M).join(", ") + "}" : G) + "). If you meant to render a collection of children, use an array instead."); + return xe; } - function W(K, V, ee) { - if (K == null) return K; + function W(M, G, ee) { + if (M == null) return M; var te = [], oe = 0; - return O(K, te, "", "", function(ie) { - return V.call(ee, ie, oe++); + return O(M, te, "", "", function(ie) { + return G.call(ee, ie, oe++); }), te; } - function $(K) { - if (K._status === -1) { - var V = K._result; - V = V(), V.then(function(ee) { - (K._status === 0 || K._status === -1) && (K._status = 1, K._result = ee); + function $(M) { + if (M._status === -1) { + var G = M._result; + G = G(), G.then(function(ee) { + (M._status === 0 || M._status === -1) && (M._status = 1, M._result = ee); }, function(ee) { - (K._status === 0 || K._status === -1) && (K._status = 2, K._result = ee); - }), K._status === -1 && (K._status = 0, K._result = V); + (M._status === 0 || M._status === -1) && (M._status = 2, M._result = ee); + }), M._status === -1 && (M._status = 0, M._result = G); } - if (K._status === 1) return K._result.default; - throw K._result; + if (M._status === 1) return M._result.default; + throw M._result; } var X = { current: null @@ -193,37 +193,37 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy ReactCurrentBatchConfig: Y, ReactCurrentOwner: T }; - function G() { + function V() { throw Error("act(...) is not supported in production builds of React."); } return $e.Children = { map: W, - forEach: function(K, V, ee) { - W(K, function() { - V.apply(this, arguments); + forEach: function(M, G, ee) { + W(M, function() { + G.apply(this, arguments); }, ee); }, - count: function(K) { - var V = 0; - return W(K, function() { - V++; - }), V; + count: function(M) { + var G = 0; + return W(M, function() { + G++; + }), G; }, - toArray: function(K) { - return W(K, function(V) { - return V; + toArray: function(M) { + return W(M, function(G) { + return G; }) || []; }, - only: function(K) { - if (!j(K)) throw Error("React.Children.only expected to receive a single React element child."); - return K; + only: function(M) { + if (!z(M)) throw Error("React.Children.only expected to receive a single React element child."); + return M; } - }, $e.Component = v, $e.Fragment = r, $e.Profiler = a, $e.PureComponent = P, $e.StrictMode = n, $e.Suspense = u, $e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Q, $e.act = G, $e.cloneElement = function(K, V, ee) { - if (K == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + K + "."); - var te = y({}, K.props), oe = K.key, ie = K.ref, ce = K._owner; - if (V != null) { - if (V.ref !== void 0 && (ie = V.ref, ce = T.current), V.key !== void 0 && (oe = "" + V.key), K.type && K.type.defaultProps) var de = K.type.defaultProps; - for (he in V) _.call(V, he) && !N.hasOwnProperty(he) && (te[he] = V[he] === void 0 && de !== void 0 ? de[he] : V[he]); + }, $e.Component = v, $e.Fragment = r, $e.Profiler = a, $e.PureComponent = P, $e.StrictMode = n, $e.Suspense = u, $e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Q, $e.act = V, $e.cloneElement = function(M, G, ee) { + if (M == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + M + "."); + var te = y({}, M.props), oe = M.key, ie = M.ref, xe = M._owner; + if (G != null) { + if (G.ref !== void 0 && (ie = G.ref, xe = T.current), G.key !== void 0 && (oe = "" + G.key), M.type && M.type.defaultProps) var de = M.type.defaultProps; + for (he in G) _.call(G, he) && !N.hasOwnProperty(he) && (te[he] = G[he] === void 0 && de !== void 0 ? de[he] : G[he]); } var he = arguments.length - 2; if (he === 1) te.children = ee; @@ -234,88 +234,88 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } return { $$typeof: e, - type: K.type, + type: M.type, key: oe, ref: ie, props: te, - _owner: ce + _owner: xe }; - }, $e.createContext = function(K) { - return K = { + }, $e.createContext = function(M) { + return M = { $$typeof: l, - _currentValue: K, - _currentValue2: K, + _currentValue: M, + _currentValue2: M, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null - }, K.Provider = { + }, M.Provider = { $$typeof: i, - _context: K - }, K.Consumer = K; - }, $e.createElement = U, $e.createFactory = function(K) { - var V = U.bind(null, K); - return V.type = K, V; + _context: M + }, M.Consumer = M; + }, $e.createElement = U, $e.createFactory = function(M) { + var G = U.bind(null, M); + return G.type = M, G; }, $e.createRef = function() { return { current: null }; - }, $e.forwardRef = function(K) { + }, $e.forwardRef = function(M) { return { $$typeof: c, - render: K + render: M }; - }, $e.isValidElement = j, $e.lazy = function(K) { + }, $e.isValidElement = z, $e.lazy = function(M) { return { $$typeof: f, _payload: { _status: -1, - _result: K + _result: M }, _init: $ }; - }, $e.memo = function(K, V) { + }, $e.memo = function(M, G) { return { $$typeof: x, - type: K, - compare: V === void 0 ? null : V + type: M, + compare: G === void 0 ? null : G }; - }, $e.startTransition = function(K) { - var V = Y.transition; + }, $e.startTransition = function(M) { + var G = Y.transition; Y.transition = {}; try { - K(); + M(); } finally { - Y.transition = V; + Y.transition = G; } - }, $e.unstable_act = G, $e.useCallback = function(K, V) { - return X.current.useCallback(K, V); - }, $e.useContext = function(K) { - return X.current.useContext(K); + }, $e.unstable_act = V, $e.useCallback = function(M, G) { + return X.current.useCallback(M, G); + }, $e.useContext = function(M) { + return X.current.useContext(M); }, $e.useDebugValue = function() { - }, $e.useDeferredValue = function(K) { - return X.current.useDeferredValue(K); - }, $e.useEffect = function(K, V) { - return X.current.useEffect(K, V); + }, $e.useDeferredValue = function(M) { + return X.current.useDeferredValue(M); + }, $e.useEffect = function(M, G) { + return X.current.useEffect(M, G); }, $e.useId = function() { return X.current.useId(); - }, $e.useImperativeHandle = function(K, V, ee) { - return X.current.useImperativeHandle(K, V, ee); - }, $e.useInsertionEffect = function(K, V) { - return X.current.useInsertionEffect(K, V); - }, $e.useLayoutEffect = function(K, V) { - return X.current.useLayoutEffect(K, V); - }, $e.useMemo = function(K, V) { - return X.current.useMemo(K, V); - }, $e.useReducer = function(K, V, ee) { - return X.current.useReducer(K, V, ee); - }, $e.useRef = function(K) { - return X.current.useRef(K); - }, $e.useState = function(K) { - return X.current.useState(K); - }, $e.useSyncExternalStore = function(K, V, ee) { - return X.current.useSyncExternalStore(K, V, ee); + }, $e.useImperativeHandle = function(M, G, ee) { + return X.current.useImperativeHandle(M, G, ee); + }, $e.useInsertionEffect = function(M, G) { + return X.current.useInsertionEffect(M, G); + }, $e.useLayoutEffect = function(M, G) { + return X.current.useLayoutEffect(M, G); + }, $e.useMemo = function(M, G) { + return X.current.useMemo(M, G); + }, $e.useReducer = function(M, G, ee) { + return X.current.useReducer(M, G, ee); + }, $e.useRef = function(M) { + return X.current.useRef(M); + }, $e.useState = function(M) { + return X.current.useState(M); + }, $e.useSyncExternalStore = function(M, G, ee) { + return X.current.useSyncExternalStore(M, G, ee); }, $e.useTransition = function() { return X.current.useTransition(); }, $e.version = "18.3.1", $e; @@ -451,39 +451,39 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy const S = new Uint8Array(q); return Object.setPrototypeOf(S, c.prototype), S; } - function c(q, S, z) { + function c(q, S, j) { if (typeof q == "number") { if (typeof S == "string") throw new TypeError('The "string" argument must be of type string. Received type number'); return h(q); } - return u(q, S, z); + return u(q, S, j); } c.poolSize = 8192; - function u(q, S, z) { + function u(q, S, j) { if (typeof q == "string") return p(q, S); if (ArrayBuffer.isView(q)) return y(q); if (q == null) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof q); - if (wt(q, ArrayBuffer) || q && wt(q.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (wt(q, SharedArrayBuffer) || q && wt(q.buffer, SharedArrayBuffer))) return B(q, S, z); + if (wt(q, ArrayBuffer) || q && wt(q.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (wt(q, SharedArrayBuffer) || q && wt(q.buffer, SharedArrayBuffer))) return B(q, S, j); if (typeof q == "number") throw new TypeError('The "value" argument must not be of type number. Received type number'); const Z = q.valueOf && q.valueOf(); - if (Z != null && Z !== q) return c.from(Z, S, z); + if (Z != null && Z !== q) return c.from(Z, S, j); const ne = v(q); if (ne) return ne; - if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof q[Symbol.toPrimitive] == "function") return c.from(q[Symbol.toPrimitive]("string"), S, z); + if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof q[Symbol.toPrimitive] == "function") return c.from(q[Symbol.toPrimitive]("string"), S, j); throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof q); } - c.from = function(q, S, z) { - return u(q, S, z); + c.from = function(q, S, j) { + return u(q, S, j); }, Object.setPrototypeOf(c.prototype, Uint8Array.prototype), Object.setPrototypeOf(c, Uint8Array); function x(q) { if (typeof q != "number") throw new TypeError('"size" argument must be of type number'); if (q < 0) throw new RangeError('The value "' + q + '" is invalid for option "size"'); } - function f(q, S, z) { - return x(q), q <= 0 ? l(q) : S !== void 0 ? typeof z == "string" ? l(q).fill(S, z) : l(q).fill(S) : l(q); + function f(q, S, j) { + return x(q), q <= 0 ? l(q) : S !== void 0 ? typeof j == "string" ? l(q).fill(S, j) : l(q).fill(S) : l(q); } - c.alloc = function(q, S, z) { - return f(q, S, z); + c.alloc = function(q, S, j) { + return f(q, S, j); }; function h(q) { return x(q), l(q < 0 ? 0 : D(q) | 0); @@ -495,15 +495,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy }; function p(q, S) { if ((typeof S != "string" || S === "") && (S = "utf8"), !c.isEncoding(S)) throw new TypeError("Unknown encoding: " + S); - const z = k(q, S) | 0; - let Z = l(z); + const j = k(q, S) | 0; + let Z = l(j); const ne = Z.write(q, S); - return ne !== z && (Z = Z.slice(0, ne)), Z; + return ne !== j && (Z = Z.slice(0, ne)), Z; } function m(q) { - const S = q.length < 0 ? 0 : D(q.length) | 0, z = l(S); - for (let Z = 0; Z < S; Z += 1) z[Z] = q[Z] & 255; - return z; + const S = q.length < 0 ? 0 : D(q.length) | 0, j = l(S); + for (let Z = 0; Z < S; Z += 1) j[Z] = q[Z] & 255; + return j; } function y(q) { if (wt(q, Uint8Array)) { @@ -512,16 +512,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } return m(q); } - function B(q, S, z) { + function B(q, S, j) { if (S < 0 || q.byteLength < S) throw new RangeError('"offset" is outside of buffer bounds'); - if (q.byteLength < S + (z || 0)) throw new RangeError('"length" is outside of buffer bounds'); + if (q.byteLength < S + (j || 0)) throw new RangeError('"length" is outside of buffer bounds'); let Z; - return S === void 0 && z === void 0 ? Z = new Uint8Array(q) : z === void 0 ? Z = new Uint8Array(q, S) : Z = new Uint8Array(q, S, z), Object.setPrototypeOf(Z, c.prototype), Z; + return S === void 0 && j === void 0 ? Z = new Uint8Array(q) : j === void 0 ? Z = new Uint8Array(q, S) : Z = new Uint8Array(q, S, j), Object.setPrototypeOf(Z, c.prototype), Z; } function v(q) { if (c.isBuffer(q)) { - const S = D(q.length) | 0, z = l(S); - return z.length === 0 || q.copy(z, 0, 0, S), z; + const S = D(q.length) | 0, j = l(S); + return j.length === 0 || q.copy(j, 0, 0, S), j; } if (q.length !== void 0) return typeof q.length != "number" || _n(q.length) ? l(0) : m(q); if (q.type === "Buffer" && Array.isArray(q.data)) return m(q.data); @@ -535,12 +535,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } c.isBuffer = function(S) { return S != null && S._isBuffer === true && S !== c.prototype; - }, c.compare = function(S, z) { - if (wt(S, Uint8Array) && (S = c.from(S, S.offset, S.byteLength)), wt(z, Uint8Array) && (z = c.from(z, z.offset, z.byteLength)), !c.isBuffer(S) || !c.isBuffer(z)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (S === z) return 0; - let Z = S.length, ne = z.length; - for (let ue = 0, pe = Math.min(Z, ne); ue < pe; ++ue) if (S[ue] !== z[ue]) { - Z = S[ue], ne = z[ue]; + }, c.compare = function(S, j) { + if (wt(S, Uint8Array) && (S = c.from(S, S.offset, S.byteLength)), wt(j, Uint8Array) && (j = c.from(j, j.offset, j.byteLength)), !c.isBuffer(S) || !c.isBuffer(j)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); + if (S === j) return 0; + let Z = S.length, ne = j.length; + for (let ce = 0, pe = Math.min(Z, ne); ce < pe; ++ce) if (S[ce] !== j[ce]) { + Z = S[ce], ne = j[ce]; break; } return Z < ne ? -1 : ne < Z ? 1 : 0; @@ -561,19 +561,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy default: return false; } - }, c.concat = function(S, z) { + }, c.concat = function(S, j) { if (!Array.isArray(S)) throw new TypeError('"list" argument must be an Array of Buffers'); if (S.length === 0) return c.alloc(0); let Z; - if (z === void 0) for (z = 0, Z = 0; Z < S.length; ++Z) z += S[Z].length; - const ne = c.allocUnsafe(z); - let ue = 0; + if (j === void 0) for (j = 0, Z = 0; Z < S.length; ++Z) j += S[Z].length; + const ne = c.allocUnsafe(j); + let ce = 0; for (Z = 0; Z < S.length; ++Z) { let pe = S[Z]; - if (wt(pe, Uint8Array)) ue + pe.length > ne.length ? (c.isBuffer(pe) || (pe = c.from(pe)), pe.copy(ne, ue)) : Uint8Array.prototype.set.call(ne, pe, ue); - else if (c.isBuffer(pe)) pe.copy(ne, ue); + if (wt(pe, Uint8Array)) ce + pe.length > ne.length ? (c.isBuffer(pe) || (pe = c.from(pe)), pe.copy(ne, ce)) : Uint8Array.prototype.set.call(ne, pe, ce); + else if (c.isBuffer(pe)) pe.copy(ne, ce); else throw new TypeError('"list" argument must be an Array of Buffers'); - ue += pe.length; + ce += pe.length; } return ne; }; @@ -581,14 +581,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy if (c.isBuffer(q)) return q.length; if (ArrayBuffer.isView(q) || wt(q, ArrayBuffer)) return q.byteLength; if (typeof q != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof q); - const z = q.length, Z = arguments.length > 2 && arguments[2] === true; - if (!Z && z === 0) return 0; + const j = q.length, Z = arguments.length > 2 && arguments[2] === true; + if (!Z && j === 0) return 0; let ne = false; for (; ; ) switch (S) { case "ascii": case "latin1": case "binary": - return z; + return j; case "utf8": case "utf-8": return ze(q).length; @@ -596,9 +596,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy case "ucs-2": case "utf16le": case "utf-16le": - return z * 2; + return j * 2; case "hex": - return z >>> 1; + return j >>> 1; case "base64": return ft(q).length; default: @@ -607,51 +607,51 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } } c.byteLength = k; - function w(q, S, z) { + function w(q, S, j) { let Z = false; - if ((S === void 0 || S < 0) && (S = 0), S > this.length || ((z === void 0 || z > this.length) && (z = this.length), z <= 0) || (z >>>= 0, S >>>= 0, z <= S)) return ""; + if ((S === void 0 || S < 0) && (S = 0), S > this.length || ((j === void 0 || j > this.length) && (j = this.length), j <= 0) || (j >>>= 0, S >>>= 0, j <= S)) return ""; for (q || (q = "utf8"); ; ) switch (q) { case "hex": - return Q(this, S, z); + return Q(this, S, j); case "utf8": case "utf-8": - return O(this, S, z); + return O(this, S, j); case "ascii": - return X(this, S, z); + return X(this, S, j); case "latin1": case "binary": - return Y(this, S, z); + return Y(this, S, j); case "base64": - return L(this, S, z); + return L(this, S, j); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return G(this, S, z); + return V(this, S, j); default: if (Z) throw new TypeError("Unknown encoding: " + q); q = (q + "").toLowerCase(), Z = true; } } c.prototype._isBuffer = true; - function _(q, S, z) { + function _(q, S, j) { const Z = q[S]; - q[S] = q[z], q[z] = Z; + q[S] = q[j], q[j] = Z; } c.prototype.swap16 = function() { const S = this.length; if (S % 2 !== 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); - for (let z = 0; z < S; z += 2) _(this, z, z + 1); + for (let j = 0; j < S; j += 2) _(this, j, j + 1); return this; }, c.prototype.swap32 = function() { const S = this.length; if (S % 4 !== 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); - for (let z = 0; z < S; z += 4) _(this, z, z + 3), _(this, z + 1, z + 2); + for (let j = 0; j < S; j += 4) _(this, j, j + 3), _(this, j + 1, j + 2); return this; }, c.prototype.swap64 = function() { const S = this.length; if (S % 8 !== 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); - for (let z = 0; z < S; z += 8) _(this, z, z + 7), _(this, z + 1, z + 6), _(this, z + 2, z + 5), _(this, z + 3, z + 4); + for (let j = 0; j < S; j += 8) _(this, j, j + 7), _(this, j + 1, j + 6), _(this, j + 2, j + 5), _(this, j + 3, j + 4); return this; }, c.prototype.toString = function() { const S = this.length; @@ -661,52 +661,52 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy return this === S ? true : c.compare(this, S) === 0; }, c.prototype.inspect = function() { let S = ""; - const z = e.INSPECT_MAX_BYTES; - return S = this.toString("hex", 0, z).replace(/(.{2})/g, "$1 ").trim(), this.length > z && (S += " ... "), ""; - }, n && (c.prototype[n] = c.prototype.inspect), c.prototype.compare = function(S, z, Z, ne, ue) { + const j = e.INSPECT_MAX_BYTES; + return S = this.toString("hex", 0, j).replace(/(.{2})/g, "$1 ").trim(), this.length > j && (S += " ... "), ""; + }, n && (c.prototype[n] = c.prototype.inspect), c.prototype.compare = function(S, j, Z, ne, ce) { if (wt(S, Uint8Array) && (S = c.from(S, S.offset, S.byteLength)), !c.isBuffer(S)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof S); - if (z === void 0 && (z = 0), Z === void 0 && (Z = S ? S.length : 0), ne === void 0 && (ne = 0), ue === void 0 && (ue = this.length), z < 0 || Z > S.length || ne < 0 || ue > this.length) throw new RangeError("out of range index"); - if (ne >= ue && z >= Z) return 0; - if (ne >= ue) return -1; - if (z >= Z) return 1; - if (z >>>= 0, Z >>>= 0, ne >>>= 0, ue >>>= 0, this === S) return 0; - let pe = ue - ne, qe = Z - z; - const yt = Math.min(pe, qe), Ze = this.slice(ne, ue), We = S.slice(z, Z); + if (j === void 0 && (j = 0), Z === void 0 && (Z = S ? S.length : 0), ne === void 0 && (ne = 0), ce === void 0 && (ce = this.length), j < 0 || Z > S.length || ne < 0 || ce > this.length) throw new RangeError("out of range index"); + if (ne >= ce && j >= Z) return 0; + if (ne >= ce) return -1; + if (j >= Z) return 1; + if (j >>>= 0, Z >>>= 0, ne >>>= 0, ce >>>= 0, this === S) return 0; + let pe = ce - ne, qe = Z - j; + const yt = Math.min(pe, qe), Ze = this.slice(ne, ce), We = S.slice(j, Z); for (let Je = 0; Je < yt; ++Je) if (Ze[Je] !== We[Je]) { pe = Ze[Je], qe = We[Je]; break; } return pe < qe ? -1 : qe < pe ? 1 : 0; }; - function T(q, S, z, Z, ne) { + function T(q, S, j, Z, ne) { if (q.length === 0) return -1; - if (typeof z == "string" ? (Z = z, z = 0) : z > 2147483647 ? z = 2147483647 : z < -2147483648 && (z = -2147483648), z = +z, _n(z) && (z = ne ? 0 : q.length - 1), z < 0 && (z = q.length + z), z >= q.length) { + if (typeof j == "string" ? (Z = j, j = 0) : j > 2147483647 ? j = 2147483647 : j < -2147483648 && (j = -2147483648), j = +j, _n(j) && (j = ne ? 0 : q.length - 1), j < 0 && (j = q.length + j), j >= q.length) { if (ne) return -1; - z = q.length - 1; - } else if (z < 0) if (ne) z = 0; + j = q.length - 1; + } else if (j < 0) if (ne) j = 0; else return -1; - if (typeof S == "string" && (S = c.from(S, Z)), c.isBuffer(S)) return S.length === 0 ? -1 : N(q, S, z, Z, ne); - if (typeof S == "number") return S = S & 255, typeof Uint8Array.prototype.indexOf == "function" ? ne ? Uint8Array.prototype.indexOf.call(q, S, z) : Uint8Array.prototype.lastIndexOf.call(q, S, z) : N(q, [ + if (typeof S == "string" && (S = c.from(S, Z)), c.isBuffer(S)) return S.length === 0 ? -1 : N(q, S, j, Z, ne); + if (typeof S == "number") return S = S & 255, typeof Uint8Array.prototype.indexOf == "function" ? ne ? Uint8Array.prototype.indexOf.call(q, S, j) : Uint8Array.prototype.lastIndexOf.call(q, S, j) : N(q, [ S - ], z, Z, ne); + ], j, Z, ne); throw new TypeError("val must be string, number or Buffer"); } - function N(q, S, z, Z, ne) { - let ue = 1, pe = q.length, qe = S.length; + function N(q, S, j, Z, ne) { + let ce = 1, pe = q.length, qe = S.length; if (Z !== void 0 && (Z = String(Z).toLowerCase(), Z === "ucs2" || Z === "ucs-2" || Z === "utf16le" || Z === "utf-16le")) { if (q.length < 2 || S.length < 2) return -1; - ue = 2, pe /= 2, qe /= 2, z /= 2; + ce = 2, pe /= 2, qe /= 2, j /= 2; } function yt(We, Je) { - return ue === 1 ? We[Je] : We.readUInt16BE(Je * ue); + return ce === 1 ? We[Je] : We.readUInt16BE(Je * ce); } let Ze; if (ne) { let We = -1; - for (Ze = z; Ze < pe; Ze++) if (yt(q, Ze) === yt(S, We === -1 ? 0 : Ze - We)) { - if (We === -1 && (We = Ze), Ze - We + 1 === qe) return We * ue; + for (Ze = j; Ze < pe; Ze++) if (yt(q, Ze) === yt(S, We === -1 ? 0 : Ze - We)) { + if (We === -1 && (We = Ze), Ze - We + 1 === qe) return We * ce; } else We !== -1 && (Ze -= Ze - We), We = -1; - } else for (z + qe > pe && (z = pe - qe), Ze = z; Ze >= 0; Ze--) { + } else for (j + qe > pe && (j = pe - qe), Ze = j; Ze >= 0; Ze--) { let We = true; for (let Je = 0; Je < qe; Je++) if (yt(q, Ze + Je) !== yt(S, Je)) { We = false; @@ -716,65 +716,65 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } return -1; } - c.prototype.includes = function(S, z, Z) { - return this.indexOf(S, z, Z) !== -1; - }, c.prototype.indexOf = function(S, z, Z) { - return T(this, S, z, Z, true); - }, c.prototype.lastIndexOf = function(S, z, Z) { - return T(this, S, z, Z, false); + c.prototype.includes = function(S, j, Z) { + return this.indexOf(S, j, Z) !== -1; + }, c.prototype.indexOf = function(S, j, Z) { + return T(this, S, j, Z, true); + }, c.prototype.lastIndexOf = function(S, j, Z) { + return T(this, S, j, Z, false); }; - function U(q, S, z, Z) { - z = Number(z) || 0; - const ne = q.length - z; + function U(q, S, j, Z) { + j = Number(j) || 0; + const ne = q.length - j; Z ? (Z = Number(Z), Z > ne && (Z = ne)) : Z = ne; - const ue = S.length; - Z > ue / 2 && (Z = ue / 2); + const ce = S.length; + Z > ce / 2 && (Z = ce / 2); let pe; for (pe = 0; pe < Z; ++pe) { const qe = parseInt(S.substr(pe * 2, 2), 16); if (_n(qe)) return pe; - q[z + pe] = qe; + q[j + pe] = qe; } return pe; } - function C(q, S, z, Z) { - return rt(ze(S, q.length - z), q, z, Z); + function C(q, S, j, Z) { + return rt(ze(S, q.length - j), q, j, Z); } - function j(q, S, z, Z) { - return rt(Qe(S), q, z, Z); + function z(q, S, j, Z) { + return rt(Qe(S), q, j, Z); } - function I(q, S, z, Z) { - return rt(ft(S), q, z, Z); + function I(q, S, j, Z) { + return rt(ft(S), q, j, Z); } - function R(q, S, z, Z) { - return rt(Me(S, q.length - z), q, z, Z); + function R(q, S, j, Z) { + return rt(Le(S, q.length - j), q, j, Z); } - c.prototype.write = function(S, z, Z, ne) { - if (z === void 0) ne = "utf8", Z = this.length, z = 0; - else if (Z === void 0 && typeof z == "string") ne = z, Z = this.length, z = 0; - else if (isFinite(z)) z = z >>> 0, isFinite(Z) ? (Z = Z >>> 0, ne === void 0 && (ne = "utf8")) : (ne = Z, Z = void 0); + c.prototype.write = function(S, j, Z, ne) { + if (j === void 0) ne = "utf8", Z = this.length, j = 0; + else if (Z === void 0 && typeof j == "string") ne = j, Z = this.length, j = 0; + else if (isFinite(j)) j = j >>> 0, isFinite(Z) ? (Z = Z >>> 0, ne === void 0 && (ne = "utf8")) : (ne = Z, Z = void 0); else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); - const ue = this.length - z; - if ((Z === void 0 || Z > ue) && (Z = ue), S.length > 0 && (Z < 0 || z < 0) || z > this.length) throw new RangeError("Attempt to write outside buffer bounds"); + const ce = this.length - j; + if ((Z === void 0 || Z > ce) && (Z = ce), S.length > 0 && (Z < 0 || j < 0) || j > this.length) throw new RangeError("Attempt to write outside buffer bounds"); ne || (ne = "utf8"); let pe = false; for (; ; ) switch (ne) { case "hex": - return U(this, S, z, Z); + return U(this, S, j, Z); case "utf8": case "utf-8": - return C(this, S, z, Z); + return C(this, S, j, Z); case "ascii": case "latin1": case "binary": - return j(this, S, z, Z); + return z(this, S, j, Z); case "base64": - return I(this, S, z, Z); + return I(this, S, j, Z); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return R(this, S, z, Z); + return R(this, S, j, Z); default: if (pe) throw new TypeError("Unknown encoding: " + ne); ne = ("" + ne).toLowerCase(), pe = true; @@ -785,30 +785,30 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy data: Array.prototype.slice.call(this._arr || this, 0) }; }; - function L(q, S, z) { - return S === 0 && z === q.length ? t.fromByteArray(q) : t.fromByteArray(q.slice(S, z)); + function L(q, S, j) { + return S === 0 && j === q.length ? t.fromByteArray(q) : t.fromByteArray(q.slice(S, j)); } - function O(q, S, z) { - z = Math.min(q.length, z); + function O(q, S, j) { + j = Math.min(q.length, j); const Z = []; let ne = S; - for (; ne < z; ) { - const ue = q[ne]; - let pe = null, qe = ue > 239 ? 4 : ue > 223 ? 3 : ue > 191 ? 2 : 1; - if (ne + qe <= z) { + for (; ne < j; ) { + const ce = q[ne]; + let pe = null, qe = ce > 239 ? 4 : ce > 223 ? 3 : ce > 191 ? 2 : 1; + if (ne + qe <= j) { let yt, Ze, We, Je; switch (qe) { case 1: - ue < 128 && (pe = ue); + ce < 128 && (pe = ce); break; case 2: - yt = q[ne + 1], (yt & 192) === 128 && (Je = (ue & 31) << 6 | yt & 63, Je > 127 && (pe = Je)); + yt = q[ne + 1], (yt & 192) === 128 && (Je = (ce & 31) << 6 | yt & 63, Je > 127 && (pe = Je)); break; case 3: - yt = q[ne + 1], Ze = q[ne + 2], (yt & 192) === 128 && (Ze & 192) === 128 && (Je = (ue & 15) << 12 | (yt & 63) << 6 | Ze & 63, Je > 2047 && (Je < 55296 || Je > 57343) && (pe = Je)); + yt = q[ne + 1], Ze = q[ne + 2], (yt & 192) === 128 && (Ze & 192) === 128 && (Je = (ce & 15) << 12 | (yt & 63) << 6 | Ze & 63, Je > 2047 && (Je < 55296 || Je > 57343) && (pe = Je)); break; case 4: - yt = q[ne + 1], Ze = q[ne + 2], We = q[ne + 3], (yt & 192) === 128 && (Ze & 192) === 128 && (We & 192) === 128 && (Je = (ue & 15) << 18 | (yt & 63) << 12 | (Ze & 63) << 6 | We & 63, Je > 65535 && Je < 1114112 && (pe = Je)); + yt = q[ne + 1], Ze = q[ne + 2], We = q[ne + 3], (yt & 192) === 128 && (Ze & 192) === 128 && (We & 192) === 128 && (Je = (ce & 15) << 18 | (yt & 63) << 12 | (Ze & 63) << 6 | We & 63, Je > 65535 && Je < 1114112 && (pe = Je)); } } pe === null ? (pe = 65533, qe = 1) : pe > 65535 && (pe -= 65536, Z.push(pe >>> 10 & 1023 | 55296), pe = 56320 | pe & 1023), Z.push(pe), ne += qe; @@ -819,255 +819,255 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy function $(q) { const S = q.length; if (S <= W) return String.fromCharCode.apply(String, q); - let z = "", Z = 0; - for (; Z < S; ) z += String.fromCharCode.apply(String, q.slice(Z, Z += W)); - return z; + let j = "", Z = 0; + for (; Z < S; ) j += String.fromCharCode.apply(String, q.slice(Z, Z += W)); + return j; } - function X(q, S, z) { + function X(q, S, j) { let Z = ""; - z = Math.min(q.length, z); - for (let ne = S; ne < z; ++ne) Z += String.fromCharCode(q[ne] & 127); + j = Math.min(q.length, j); + for (let ne = S; ne < j; ++ne) Z += String.fromCharCode(q[ne] & 127); return Z; } - function Y(q, S, z) { + function Y(q, S, j) { let Z = ""; - z = Math.min(q.length, z); - for (let ne = S; ne < z; ++ne) Z += String.fromCharCode(q[ne]); + j = Math.min(q.length, j); + for (let ne = S; ne < j; ++ne) Z += String.fromCharCode(q[ne]); return Z; } - function Q(q, S, z) { + function Q(q, S, j) { const Z = q.length; - (!S || S < 0) && (S = 0), (!z || z < 0 || z > Z) && (z = Z); + (!S || S < 0) && (S = 0), (!j || j < 0 || j > Z) && (j = Z); let ne = ""; - for (let ue = S; ue < z; ++ue) ne += Wr[q[ue]]; + for (let ce = S; ce < j; ++ce) ne += Wr[q[ce]]; return ne; } - function G(q, S, z) { - const Z = q.slice(S, z); + function V(q, S, j) { + const Z = q.slice(S, j); let ne = ""; - for (let ue = 0; ue < Z.length - 1; ue += 2) ne += String.fromCharCode(Z[ue] + Z[ue + 1] * 256); + for (let ce = 0; ce < Z.length - 1; ce += 2) ne += String.fromCharCode(Z[ce] + Z[ce + 1] * 256); return ne; } - c.prototype.slice = function(S, z) { + c.prototype.slice = function(S, j) { const Z = this.length; - S = ~~S, z = z === void 0 ? Z : ~~z, S < 0 ? (S += Z, S < 0 && (S = 0)) : S > Z && (S = Z), z < 0 ? (z += Z, z < 0 && (z = 0)) : z > Z && (z = Z), z < S && (z = S); - const ne = this.subarray(S, z); + S = ~~S, j = j === void 0 ? Z : ~~j, S < 0 ? (S += Z, S < 0 && (S = 0)) : S > Z && (S = Z), j < 0 ? (j += Z, j < 0 && (j = 0)) : j > Z && (j = Z), j < S && (j = S); + const ne = this.subarray(S, j); return Object.setPrototypeOf(ne, c.prototype), ne; }; - function K(q, S, z) { + function M(q, S, j) { if (q % 1 !== 0 || q < 0) throw new RangeError("offset is not uint"); - if (q + S > z) throw new RangeError("Trying to access beyond buffer length"); + if (q + S > j) throw new RangeError("Trying to access beyond buffer length"); } - c.prototype.readUintLE = c.prototype.readUIntLE = function(S, z, Z) { - S = S >>> 0, z = z >>> 0, Z || K(S, z, this.length); - let ne = this[S], ue = 1, pe = 0; - for (; ++pe < z && (ue *= 256); ) ne += this[S + pe] * ue; + c.prototype.readUintLE = c.prototype.readUIntLE = function(S, j, Z) { + S = S >>> 0, j = j >>> 0, Z || M(S, j, this.length); + let ne = this[S], ce = 1, pe = 0; + for (; ++pe < j && (ce *= 256); ) ne += this[S + pe] * ce; return ne; - }, c.prototype.readUintBE = c.prototype.readUIntBE = function(S, z, Z) { - S = S >>> 0, z = z >>> 0, Z || K(S, z, this.length); - let ne = this[S + --z], ue = 1; - for (; z > 0 && (ue *= 256); ) ne += this[S + --z] * ue; + }, c.prototype.readUintBE = c.prototype.readUIntBE = function(S, j, Z) { + S = S >>> 0, j = j >>> 0, Z || M(S, j, this.length); + let ne = this[S + --j], ce = 1; + for (; j > 0 && (ce *= 256); ) ne += this[S + --j] * ce; return ne; - }, c.prototype.readUint8 = c.prototype.readUInt8 = function(S, z) { - return S = S >>> 0, z || K(S, 1, this.length), this[S]; - }, c.prototype.readUint16LE = c.prototype.readUInt16LE = function(S, z) { - return S = S >>> 0, z || K(S, 2, this.length), this[S] | this[S + 1] << 8; - }, c.prototype.readUint16BE = c.prototype.readUInt16BE = function(S, z) { - return S = S >>> 0, z || K(S, 2, this.length), this[S] << 8 | this[S + 1]; - }, c.prototype.readUint32LE = c.prototype.readUInt32LE = function(S, z) { - return S = S >>> 0, z || K(S, 4, this.length), (this[S] | this[S + 1] << 8 | this[S + 2] << 16) + this[S + 3] * 16777216; - }, c.prototype.readUint32BE = c.prototype.readUInt32BE = function(S, z) { - return S = S >>> 0, z || K(S, 4, this.length), this[S] * 16777216 + (this[S + 1] << 16 | this[S + 2] << 8 | this[S + 3]); + }, c.prototype.readUint8 = c.prototype.readUInt8 = function(S, j) { + return S = S >>> 0, j || M(S, 1, this.length), this[S]; + }, c.prototype.readUint16LE = c.prototype.readUInt16LE = function(S, j) { + return S = S >>> 0, j || M(S, 2, this.length), this[S] | this[S + 1] << 8; + }, c.prototype.readUint16BE = c.prototype.readUInt16BE = function(S, j) { + return S = S >>> 0, j || M(S, 2, this.length), this[S] << 8 | this[S + 1]; + }, c.prototype.readUint32LE = c.prototype.readUInt32LE = function(S, j) { + return S = S >>> 0, j || M(S, 4, this.length), (this[S] | this[S + 1] << 8 | this[S + 2] << 16) + this[S + 3] * 16777216; + }, c.prototype.readUint32BE = c.prototype.readUInt32BE = function(S, j) { + return S = S >>> 0, j || M(S, 4, this.length), this[S] * 16777216 + (this[S + 1] << 16 | this[S + 2] << 8 | this[S + 3]); }, c.prototype.readBigUInt64LE = Ir(function(S) { S = S >>> 0, Ie(S, "offset"); - const z = this[S], Z = this[S + 7]; - (z === void 0 || Z === void 0) && Ue(S, this.length - 8); - const ne = z + this[++S] * 2 ** 8 + this[++S] * 2 ** 16 + this[++S] * 2 ** 24, ue = this[++S] + this[++S] * 2 ** 8 + this[++S] * 2 ** 16 + Z * 2 ** 24; - return BigInt(ne) + (BigInt(ue) << BigInt(32)); + const j = this[S], Z = this[S + 7]; + (j === void 0 || Z === void 0) && Ue(S, this.length - 8); + const ne = j + this[++S] * 2 ** 8 + this[++S] * 2 ** 16 + this[++S] * 2 ** 24, ce = this[++S] + this[++S] * 2 ** 8 + this[++S] * 2 ** 16 + Z * 2 ** 24; + return BigInt(ne) + (BigInt(ce) << BigInt(32)); }), c.prototype.readBigUInt64BE = Ir(function(S) { S = S >>> 0, Ie(S, "offset"); - const z = this[S], Z = this[S + 7]; - (z === void 0 || Z === void 0) && Ue(S, this.length - 8); - const ne = z * 2 ** 24 + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + this[++S], ue = this[++S] * 2 ** 24 + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + Z; - return (BigInt(ne) << BigInt(32)) + BigInt(ue); - }), c.prototype.readIntLE = function(S, z, Z) { - S = S >>> 0, z = z >>> 0, Z || K(S, z, this.length); - let ne = this[S], ue = 1, pe = 0; - for (; ++pe < z && (ue *= 256); ) ne += this[S + pe] * ue; - return ue *= 128, ne >= ue && (ne -= Math.pow(2, 8 * z)), ne; - }, c.prototype.readIntBE = function(S, z, Z) { - S = S >>> 0, z = z >>> 0, Z || K(S, z, this.length); - let ne = z, ue = 1, pe = this[S + --ne]; - for (; ne > 0 && (ue *= 256); ) pe += this[S + --ne] * ue; - return ue *= 128, pe >= ue && (pe -= Math.pow(2, 8 * z)), pe; - }, c.prototype.readInt8 = function(S, z) { - return S = S >>> 0, z || K(S, 1, this.length), this[S] & 128 ? (255 - this[S] + 1) * -1 : this[S]; - }, c.prototype.readInt16LE = function(S, z) { - S = S >>> 0, z || K(S, 2, this.length); + const j = this[S], Z = this[S + 7]; + (j === void 0 || Z === void 0) && Ue(S, this.length - 8); + const ne = j * 2 ** 24 + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + this[++S], ce = this[++S] * 2 ** 24 + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + Z; + return (BigInt(ne) << BigInt(32)) + BigInt(ce); + }), c.prototype.readIntLE = function(S, j, Z) { + S = S >>> 0, j = j >>> 0, Z || M(S, j, this.length); + let ne = this[S], ce = 1, pe = 0; + for (; ++pe < j && (ce *= 256); ) ne += this[S + pe] * ce; + return ce *= 128, ne >= ce && (ne -= Math.pow(2, 8 * j)), ne; + }, c.prototype.readIntBE = function(S, j, Z) { + S = S >>> 0, j = j >>> 0, Z || M(S, j, this.length); + let ne = j, ce = 1, pe = this[S + --ne]; + for (; ne > 0 && (ce *= 256); ) pe += this[S + --ne] * ce; + return ce *= 128, pe >= ce && (pe -= Math.pow(2, 8 * j)), pe; + }, c.prototype.readInt8 = function(S, j) { + return S = S >>> 0, j || M(S, 1, this.length), this[S] & 128 ? (255 - this[S] + 1) * -1 : this[S]; + }, c.prototype.readInt16LE = function(S, j) { + S = S >>> 0, j || M(S, 2, this.length); const Z = this[S] | this[S + 1] << 8; return Z & 32768 ? Z | 4294901760 : Z; - }, c.prototype.readInt16BE = function(S, z) { - S = S >>> 0, z || K(S, 2, this.length); + }, c.prototype.readInt16BE = function(S, j) { + S = S >>> 0, j || M(S, 2, this.length); const Z = this[S + 1] | this[S] << 8; return Z & 32768 ? Z | 4294901760 : Z; - }, c.prototype.readInt32LE = function(S, z) { - return S = S >>> 0, z || K(S, 4, this.length), this[S] | this[S + 1] << 8 | this[S + 2] << 16 | this[S + 3] << 24; - }, c.prototype.readInt32BE = function(S, z) { - return S = S >>> 0, z || K(S, 4, this.length), this[S] << 24 | this[S + 1] << 16 | this[S + 2] << 8 | this[S + 3]; + }, c.prototype.readInt32LE = function(S, j) { + return S = S >>> 0, j || M(S, 4, this.length), this[S] | this[S + 1] << 8 | this[S + 2] << 16 | this[S + 3] << 24; + }, c.prototype.readInt32BE = function(S, j) { + return S = S >>> 0, j || M(S, 4, this.length), this[S] << 24 | this[S + 1] << 16 | this[S + 2] << 8 | this[S + 3]; }, c.prototype.readBigInt64LE = Ir(function(S) { S = S >>> 0, Ie(S, "offset"); - const z = this[S], Z = this[S + 7]; - (z === void 0 || Z === void 0) && Ue(S, this.length - 8); + const j = this[S], Z = this[S + 7]; + (j === void 0 || Z === void 0) && Ue(S, this.length - 8); const ne = this[S + 4] + this[S + 5] * 2 ** 8 + this[S + 6] * 2 ** 16 + (Z << 24); - return (BigInt(ne) << BigInt(32)) + BigInt(z + this[++S] * 2 ** 8 + this[++S] * 2 ** 16 + this[++S] * 2 ** 24); + return (BigInt(ne) << BigInt(32)) + BigInt(j + this[++S] * 2 ** 8 + this[++S] * 2 ** 16 + this[++S] * 2 ** 24); }), c.prototype.readBigInt64BE = Ir(function(S) { S = S >>> 0, Ie(S, "offset"); - const z = this[S], Z = this[S + 7]; - (z === void 0 || Z === void 0) && Ue(S, this.length - 8); - const ne = (z << 24) + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + this[++S]; + const j = this[S], Z = this[S + 7]; + (j === void 0 || Z === void 0) && Ue(S, this.length - 8); + const ne = (j << 24) + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + this[++S]; return (BigInt(ne) << BigInt(32)) + BigInt(this[++S] * 2 ** 24 + this[++S] * 2 ** 16 + this[++S] * 2 ** 8 + Z); - }), c.prototype.readFloatLE = function(S, z) { - return S = S >>> 0, z || K(S, 4, this.length), r.read(this, S, true, 23, 4); - }, c.prototype.readFloatBE = function(S, z) { - return S = S >>> 0, z || K(S, 4, this.length), r.read(this, S, false, 23, 4); - }, c.prototype.readDoubleLE = function(S, z) { - return S = S >>> 0, z || K(S, 8, this.length), r.read(this, S, true, 52, 8); - }, c.prototype.readDoubleBE = function(S, z) { - return S = S >>> 0, z || K(S, 8, this.length), r.read(this, S, false, 52, 8); + }), c.prototype.readFloatLE = function(S, j) { + return S = S >>> 0, j || M(S, 4, this.length), r.read(this, S, true, 23, 4); + }, c.prototype.readFloatBE = function(S, j) { + return S = S >>> 0, j || M(S, 4, this.length), r.read(this, S, false, 23, 4); + }, c.prototype.readDoubleLE = function(S, j) { + return S = S >>> 0, j || M(S, 8, this.length), r.read(this, S, true, 52, 8); + }, c.prototype.readDoubleBE = function(S, j) { + return S = S >>> 0, j || M(S, 8, this.length), r.read(this, S, false, 52, 8); }; - function V(q, S, z, Z, ne, ue) { + function G(q, S, j, Z, ne, ce) { if (!c.isBuffer(q)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (S > ne || S < ue) throw new RangeError('"value" argument is out of bounds'); - if (z + Z > q.length) throw new RangeError("Index out of range"); + if (S > ne || S < ce) throw new RangeError('"value" argument is out of bounds'); + if (j + Z > q.length) throw new RangeError("Index out of range"); } - c.prototype.writeUintLE = c.prototype.writeUIntLE = function(S, z, Z, ne) { - if (S = +S, z = z >>> 0, Z = Z >>> 0, !ne) { + c.prototype.writeUintLE = c.prototype.writeUIntLE = function(S, j, Z, ne) { + if (S = +S, j = j >>> 0, Z = Z >>> 0, !ne) { const qe = Math.pow(2, 8 * Z) - 1; - V(this, S, z, Z, qe, 0); + G(this, S, j, Z, qe, 0); } - let ue = 1, pe = 0; - for (this[z] = S & 255; ++pe < Z && (ue *= 256); ) this[z + pe] = S / ue & 255; - return z + Z; - }, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(S, z, Z, ne) { - if (S = +S, z = z >>> 0, Z = Z >>> 0, !ne) { + let ce = 1, pe = 0; + for (this[j] = S & 255; ++pe < Z && (ce *= 256); ) this[j + pe] = S / ce & 255; + return j + Z; + }, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(S, j, Z, ne) { + if (S = +S, j = j >>> 0, Z = Z >>> 0, !ne) { const qe = Math.pow(2, 8 * Z) - 1; - V(this, S, z, Z, qe, 0); + G(this, S, j, Z, qe, 0); } - let ue = Z - 1, pe = 1; - for (this[z + ue] = S & 255; --ue >= 0 && (pe *= 256); ) this[z + ue] = S / pe & 255; - return z + Z; - }, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 1, 255, 0), this[z] = S & 255, z + 1; - }, c.prototype.writeUint16LE = c.prototype.writeUInt16LE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 2, 65535, 0), this[z] = S & 255, this[z + 1] = S >>> 8, z + 2; - }, c.prototype.writeUint16BE = c.prototype.writeUInt16BE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 2, 65535, 0), this[z] = S >>> 8, this[z + 1] = S & 255, z + 2; - }, c.prototype.writeUint32LE = c.prototype.writeUInt32LE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 4, 4294967295, 0), this[z + 3] = S >>> 24, this[z + 2] = S >>> 16, this[z + 1] = S >>> 8, this[z] = S & 255, z + 4; - }, c.prototype.writeUint32BE = c.prototype.writeUInt32BE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 4, 4294967295, 0), this[z] = S >>> 24, this[z + 1] = S >>> 16, this[z + 2] = S >>> 8, this[z + 3] = S & 255, z + 4; + let ce = Z - 1, pe = 1; + for (this[j + ce] = S & 255; --ce >= 0 && (pe *= 256); ) this[j + ce] = S / pe & 255; + return j + Z; + }, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 1, 255, 0), this[j] = S & 255, j + 1; + }, c.prototype.writeUint16LE = c.prototype.writeUInt16LE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 2, 65535, 0), this[j] = S & 255, this[j + 1] = S >>> 8, j + 2; + }, c.prototype.writeUint16BE = c.prototype.writeUInt16BE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 2, 65535, 0), this[j] = S >>> 8, this[j + 1] = S & 255, j + 2; + }, c.prototype.writeUint32LE = c.prototype.writeUInt32LE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 4, 4294967295, 0), this[j + 3] = S >>> 24, this[j + 2] = S >>> 16, this[j + 1] = S >>> 8, this[j] = S & 255, j + 4; + }, c.prototype.writeUint32BE = c.prototype.writeUInt32BE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 4, 4294967295, 0), this[j] = S >>> 24, this[j + 1] = S >>> 16, this[j + 2] = S >>> 8, this[j + 3] = S & 255, j + 4; }; - function ee(q, S, z, Z, ne) { - Ce(S, Z, ne, q, z, 7); - let ue = Number(S & BigInt(4294967295)); - q[z++] = ue, ue = ue >> 8, q[z++] = ue, ue = ue >> 8, q[z++] = ue, ue = ue >> 8, q[z++] = ue; + function ee(q, S, j, Z, ne) { + Ce(S, Z, ne, q, j, 7); + let ce = Number(S & BigInt(4294967295)); + q[j++] = ce, ce = ce >> 8, q[j++] = ce, ce = ce >> 8, q[j++] = ce, ce = ce >> 8, q[j++] = ce; let pe = Number(S >> BigInt(32) & BigInt(4294967295)); - return q[z++] = pe, pe = pe >> 8, q[z++] = pe, pe = pe >> 8, q[z++] = pe, pe = pe >> 8, q[z++] = pe, z; + return q[j++] = pe, pe = pe >> 8, q[j++] = pe, pe = pe >> 8, q[j++] = pe, pe = pe >> 8, q[j++] = pe, j; } - function te(q, S, z, Z, ne) { - Ce(S, Z, ne, q, z, 7); - let ue = Number(S & BigInt(4294967295)); - q[z + 7] = ue, ue = ue >> 8, q[z + 6] = ue, ue = ue >> 8, q[z + 5] = ue, ue = ue >> 8, q[z + 4] = ue; + function te(q, S, j, Z, ne) { + Ce(S, Z, ne, q, j, 7); + let ce = Number(S & BigInt(4294967295)); + q[j + 7] = ce, ce = ce >> 8, q[j + 6] = ce, ce = ce >> 8, q[j + 5] = ce, ce = ce >> 8, q[j + 4] = ce; let pe = Number(S >> BigInt(32) & BigInt(4294967295)); - return q[z + 3] = pe, pe = pe >> 8, q[z + 2] = pe, pe = pe >> 8, q[z + 1] = pe, pe = pe >> 8, q[z] = pe, z + 8; + return q[j + 3] = pe, pe = pe >> 8, q[j + 2] = pe, pe = pe >> 8, q[j + 1] = pe, pe = pe >> 8, q[j] = pe, j + 8; } - c.prototype.writeBigUInt64LE = Ir(function(S, z = 0) { - return ee(this, S, z, BigInt(0), BigInt("0xffffffffffffffff")); - }), c.prototype.writeBigUInt64BE = Ir(function(S, z = 0) { - return te(this, S, z, BigInt(0), BigInt("0xffffffffffffffff")); - }), c.prototype.writeIntLE = function(S, z, Z, ne) { - if (S = +S, z = z >>> 0, !ne) { + c.prototype.writeBigUInt64LE = Ir(function(S, j = 0) { + return ee(this, S, j, BigInt(0), BigInt("0xffffffffffffffff")); + }), c.prototype.writeBigUInt64BE = Ir(function(S, j = 0) { + return te(this, S, j, BigInt(0), BigInt("0xffffffffffffffff")); + }), c.prototype.writeIntLE = function(S, j, Z, ne) { + if (S = +S, j = j >>> 0, !ne) { const yt = Math.pow(2, 8 * Z - 1); - V(this, S, z, Z, yt - 1, -yt); + G(this, S, j, Z, yt - 1, -yt); } - let ue = 0, pe = 1, qe = 0; - for (this[z] = S & 255; ++ue < Z && (pe *= 256); ) S < 0 && qe === 0 && this[z + ue - 1] !== 0 && (qe = 1), this[z + ue] = (S / pe >> 0) - qe & 255; - return z + Z; - }, c.prototype.writeIntBE = function(S, z, Z, ne) { - if (S = +S, z = z >>> 0, !ne) { + let ce = 0, pe = 1, qe = 0; + for (this[j] = S & 255; ++ce < Z && (pe *= 256); ) S < 0 && qe === 0 && this[j + ce - 1] !== 0 && (qe = 1), this[j + ce] = (S / pe >> 0) - qe & 255; + return j + Z; + }, c.prototype.writeIntBE = function(S, j, Z, ne) { + if (S = +S, j = j >>> 0, !ne) { const yt = Math.pow(2, 8 * Z - 1); - V(this, S, z, Z, yt - 1, -yt); + G(this, S, j, Z, yt - 1, -yt); } - let ue = Z - 1, pe = 1, qe = 0; - for (this[z + ue] = S & 255; --ue >= 0 && (pe *= 256); ) S < 0 && qe === 0 && this[z + ue + 1] !== 0 && (qe = 1), this[z + ue] = (S / pe >> 0) - qe & 255; - return z + Z; - }, c.prototype.writeInt8 = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 1, 127, -128), S < 0 && (S = 255 + S + 1), this[z] = S & 255, z + 1; - }, c.prototype.writeInt16LE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 2, 32767, -32768), this[z] = S & 255, this[z + 1] = S >>> 8, z + 2; - }, c.prototype.writeInt16BE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 2, 32767, -32768), this[z] = S >>> 8, this[z + 1] = S & 255, z + 2; - }, c.prototype.writeInt32LE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 4, 2147483647, -2147483648), this[z] = S & 255, this[z + 1] = S >>> 8, this[z + 2] = S >>> 16, this[z + 3] = S >>> 24, z + 4; - }, c.prototype.writeInt32BE = function(S, z, Z) { - return S = +S, z = z >>> 0, Z || V(this, S, z, 4, 2147483647, -2147483648), S < 0 && (S = 4294967295 + S + 1), this[z] = S >>> 24, this[z + 1] = S >>> 16, this[z + 2] = S >>> 8, this[z + 3] = S & 255, z + 4; - }, c.prototype.writeBigInt64LE = Ir(function(S, z = 0) { - return ee(this, S, z, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); - }), c.prototype.writeBigInt64BE = Ir(function(S, z = 0) { - return te(this, S, z, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + let ce = Z - 1, pe = 1, qe = 0; + for (this[j + ce] = S & 255; --ce >= 0 && (pe *= 256); ) S < 0 && qe === 0 && this[j + ce + 1] !== 0 && (qe = 1), this[j + ce] = (S / pe >> 0) - qe & 255; + return j + Z; + }, c.prototype.writeInt8 = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 1, 127, -128), S < 0 && (S = 255 + S + 1), this[j] = S & 255, j + 1; + }, c.prototype.writeInt16LE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 2, 32767, -32768), this[j] = S & 255, this[j + 1] = S >>> 8, j + 2; + }, c.prototype.writeInt16BE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 2, 32767, -32768), this[j] = S >>> 8, this[j + 1] = S & 255, j + 2; + }, c.prototype.writeInt32LE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 4, 2147483647, -2147483648), this[j] = S & 255, this[j + 1] = S >>> 8, this[j + 2] = S >>> 16, this[j + 3] = S >>> 24, j + 4; + }, c.prototype.writeInt32BE = function(S, j, Z) { + return S = +S, j = j >>> 0, Z || G(this, S, j, 4, 2147483647, -2147483648), S < 0 && (S = 4294967295 + S + 1), this[j] = S >>> 24, this[j + 1] = S >>> 16, this[j + 2] = S >>> 8, this[j + 3] = S & 255, j + 4; + }, c.prototype.writeBigInt64LE = Ir(function(S, j = 0) { + return ee(this, S, j, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + }), c.prototype.writeBigInt64BE = Ir(function(S, j = 0) { + return te(this, S, j, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); }); - function oe(q, S, z, Z, ne, ue) { - if (z + Z > q.length) throw new RangeError("Index out of range"); - if (z < 0) throw new RangeError("Index out of range"); + function oe(q, S, j, Z, ne, ce) { + if (j + Z > q.length) throw new RangeError("Index out of range"); + if (j < 0) throw new RangeError("Index out of range"); } - function ie(q, S, z, Z, ne) { - return S = +S, z = z >>> 0, ne || oe(q, S, z, 4), r.write(q, S, z, Z, 23, 4), z + 4; + function ie(q, S, j, Z, ne) { + return S = +S, j = j >>> 0, ne || oe(q, S, j, 4), r.write(q, S, j, Z, 23, 4), j + 4; } - c.prototype.writeFloatLE = function(S, z, Z) { - return ie(this, S, z, true, Z); - }, c.prototype.writeFloatBE = function(S, z, Z) { - return ie(this, S, z, false, Z); + c.prototype.writeFloatLE = function(S, j, Z) { + return ie(this, S, j, true, Z); + }, c.prototype.writeFloatBE = function(S, j, Z) { + return ie(this, S, j, false, Z); }; - function ce(q, S, z, Z, ne) { - return S = +S, z = z >>> 0, ne || oe(q, S, z, 8), r.write(q, S, z, Z, 52, 8), z + 8; + function xe(q, S, j, Z, ne) { + return S = +S, j = j >>> 0, ne || oe(q, S, j, 8), r.write(q, S, j, Z, 52, 8), j + 8; } - c.prototype.writeDoubleLE = function(S, z, Z) { - return ce(this, S, z, true, Z); - }, c.prototype.writeDoubleBE = function(S, z, Z) { - return ce(this, S, z, false, Z); - }, c.prototype.copy = function(S, z, Z, ne) { + c.prototype.writeDoubleLE = function(S, j, Z) { + return xe(this, S, j, true, Z); + }, c.prototype.writeDoubleBE = function(S, j, Z) { + return xe(this, S, j, false, Z); + }, c.prototype.copy = function(S, j, Z, ne) { if (!c.isBuffer(S)) throw new TypeError("argument should be a Buffer"); - if (Z || (Z = 0), !ne && ne !== 0 && (ne = this.length), z >= S.length && (z = S.length), z || (z = 0), ne > 0 && ne < Z && (ne = Z), ne === Z || S.length === 0 || this.length === 0) return 0; - if (z < 0) throw new RangeError("targetStart out of bounds"); + if (Z || (Z = 0), !ne && ne !== 0 && (ne = this.length), j >= S.length && (j = S.length), j || (j = 0), ne > 0 && ne < Z && (ne = Z), ne === Z || S.length === 0 || this.length === 0) return 0; + if (j < 0) throw new RangeError("targetStart out of bounds"); if (Z < 0 || Z >= this.length) throw new RangeError("Index out of range"); if (ne < 0) throw new RangeError("sourceEnd out of bounds"); - ne > this.length && (ne = this.length), S.length - z < ne - Z && (ne = S.length - z + Z); - const ue = ne - Z; - return this === S && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(z, Z, ne) : Uint8Array.prototype.set.call(S, this.subarray(Z, ne), z), ue; - }, c.prototype.fill = function(S, z, Z, ne) { + ne > this.length && (ne = this.length), S.length - j < ne - Z && (ne = S.length - j + Z); + const ce = ne - Z; + return this === S && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(j, Z, ne) : Uint8Array.prototype.set.call(S, this.subarray(Z, ne), j), ce; + }, c.prototype.fill = function(S, j, Z, ne) { if (typeof S == "string") { - if (typeof z == "string" ? (ne = z, z = 0, Z = this.length) : typeof Z == "string" && (ne = Z, Z = this.length), ne !== void 0 && typeof ne != "string") throw new TypeError("encoding must be a string"); + if (typeof j == "string" ? (ne = j, j = 0, Z = this.length) : typeof Z == "string" && (ne = Z, Z = this.length), ne !== void 0 && typeof ne != "string") throw new TypeError("encoding must be a string"); if (typeof ne == "string" && !c.isEncoding(ne)) throw new TypeError("Unknown encoding: " + ne); if (S.length === 1) { const pe = S.charCodeAt(0); (ne === "utf8" && pe < 128 || ne === "latin1") && (S = pe); } } else typeof S == "number" ? S = S & 255 : typeof S == "boolean" && (S = Number(S)); - if (z < 0 || this.length < z || this.length < Z) throw new RangeError("Out of range index"); - if (Z <= z) return this; - z = z >>> 0, Z = Z === void 0 ? this.length : Z >>> 0, S || (S = 0); - let ue; - if (typeof S == "number") for (ue = z; ue < Z; ++ue) this[ue] = S; + if (j < 0 || this.length < j || this.length < Z) throw new RangeError("Out of range index"); + if (Z <= j) return this; + j = j >>> 0, Z = Z === void 0 ? this.length : Z >>> 0, S || (S = 0); + let ce; + if (typeof S == "number") for (ce = j; ce < Z; ++ce) this[ce] = S; else { const pe = c.isBuffer(S) ? S : c.from(S, ne), qe = pe.length; if (qe === 0) throw new TypeError('The value "' + S + '" is invalid for argument "value"'); - for (ue = 0; ue < Z - z; ++ue) this[ue + z] = pe[ue % qe]; + for (ce = 0; ce < Z - j; ++ce) this[ce + j] = pe[ce % qe]; } return this; }; const de = {}; - function he(q, S, z) { - de[q] = class extends z { + function he(q, S, j) { + de[q] = class extends j { constructor() { super(), Object.defineProperty(this, "message", { value: S.apply(this, arguments), @@ -1095,32 +1095,32 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy return q ? `${q} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds"; }, RangeError), he("ERR_INVALID_ARG_TYPE", function(q, S) { return `The "${q}" argument must be of type number. Received type ${typeof S}`; - }, TypeError), he("ERR_OUT_OF_RANGE", function(q, S, z) { - let Z = `The value of "${q}" is out of range.`, ne = z; - return Number.isInteger(z) && Math.abs(z) > 2 ** 32 ? ne = be(String(z)) : typeof z == "bigint" && (ne = String(z), (z > BigInt(2) ** BigInt(32) || z < -(BigInt(2) ** BigInt(32))) && (ne = be(ne)), ne += "n"), Z += ` It must be ${S}. Received ${ne}`, Z; + }, TypeError), he("ERR_OUT_OF_RANGE", function(q, S, j) { + let Z = `The value of "${q}" is out of range.`, ne = j; + return Number.isInteger(j) && Math.abs(j) > 2 ** 32 ? ne = be(String(j)) : typeof j == "bigint" && (ne = String(j), (j > BigInt(2) ** BigInt(32) || j < -(BigInt(2) ** BigInt(32))) && (ne = be(ne)), ne += "n"), Z += ` It must be ${S}. Received ${ne}`, Z; }, RangeError); function be(q) { - let S = "", z = q.length; + let S = "", j = q.length; const Z = q[0] === "-" ? 1 : 0; - for (; z >= Z + 4; z -= 3) S = `_${q.slice(z - 3, z)}${S}`; - return `${q.slice(0, z)}${S}`; + for (; j >= Z + 4; j -= 3) S = `_${q.slice(j - 3, j)}${S}`; + return `${q.slice(0, j)}${S}`; } - function ve(q, S, z) { - Ie(S, "offset"), (q[S] === void 0 || q[S + z] === void 0) && Ue(S, q.length - (z + 1)); + function ve(q, S, j) { + Ie(S, "offset"), (q[S] === void 0 || q[S + j] === void 0) && Ue(S, q.length - (j + 1)); } - function Ce(q, S, z, Z, ne, ue) { - if (q > z || q < S) { + function Ce(q, S, j, Z, ne, ce) { + if (q > j || q < S) { const pe = typeof S == "bigint" ? "n" : ""; let qe; - throw S === 0 || S === BigInt(0) ? qe = `>= 0${pe} and < 2${pe} ** ${(ue + 1) * 8}${pe}` : qe = `>= -(2${pe} ** ${(ue + 1) * 8 - 1}${pe}) and < 2 ** ${(ue + 1) * 8 - 1}${pe}`, new de.ERR_OUT_OF_RANGE("value", qe, q); + throw S === 0 || S === BigInt(0) ? qe = `>= 0${pe} and < 2${pe} ** ${(ce + 1) * 8}${pe}` : qe = `>= -(2${pe} ** ${(ce + 1) * 8 - 1}${pe}) and < 2 ** ${(ce + 1) * 8 - 1}${pe}`, new de.ERR_OUT_OF_RANGE("value", qe, q); } - ve(Z, ne, ue); + ve(Z, ne, ce); } function Ie(q, S) { if (typeof q != "number") throw new de.ERR_INVALID_ARG_TYPE(S, "number", q); } - function Ue(q, S, z) { - throw Math.floor(q) !== q ? (Ie(q, z), new de.ERR_OUT_OF_RANGE("offset", "an integer", q)) : S < 0 ? new de.ERR_BUFFER_OUT_OF_BOUNDS() : new de.ERR_OUT_OF_RANGE("offset", `>= 0 and <= ${S}`, q); + function Ue(q, S, j) { + throw Math.floor(q) !== q ? (Ie(q, j), new de.ERR_OUT_OF_RANGE("offset", "an integer", q)) : S < 0 ? new de.ERR_BUFFER_OUT_OF_BOUNDS() : new de.ERR_OUT_OF_RANGE("offset", `>= 0 and <= ${S}`, q); } const ge = /[^+/0-9A-Za-z-_]/g; function ke(q) { @@ -1130,62 +1130,62 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } function ze(q, S) { S = S || 1 / 0; - let z; + let j; const Z = q.length; let ne = null; - const ue = []; + const ce = []; for (let pe = 0; pe < Z; ++pe) { - if (z = q.charCodeAt(pe), z > 55295 && z < 57344) { + if (j = q.charCodeAt(pe), j > 55295 && j < 57344) { if (!ne) { - if (z > 56319) { - (S -= 3) > -1 && ue.push(239, 191, 189); + if (j > 56319) { + (S -= 3) > -1 && ce.push(239, 191, 189); continue; } else if (pe + 1 === Z) { - (S -= 3) > -1 && ue.push(239, 191, 189); + (S -= 3) > -1 && ce.push(239, 191, 189); continue; } - ne = z; + ne = j; continue; } - if (z < 56320) { - (S -= 3) > -1 && ue.push(239, 191, 189), ne = z; + if (j < 56320) { + (S -= 3) > -1 && ce.push(239, 191, 189), ne = j; continue; } - z = (ne - 55296 << 10 | z - 56320) + 65536; - } else ne && (S -= 3) > -1 && ue.push(239, 191, 189); - if (ne = null, z < 128) { + j = (ne - 55296 << 10 | j - 56320) + 65536; + } else ne && (S -= 3) > -1 && ce.push(239, 191, 189); + if (ne = null, j < 128) { if ((S -= 1) < 0) break; - ue.push(z); - } else if (z < 2048) { + ce.push(j); + } else if (j < 2048) { if ((S -= 2) < 0) break; - ue.push(z >> 6 | 192, z & 63 | 128); - } else if (z < 65536) { + ce.push(j >> 6 | 192, j & 63 | 128); + } else if (j < 65536) { if ((S -= 3) < 0) break; - ue.push(z >> 12 | 224, z >> 6 & 63 | 128, z & 63 | 128); - } else if (z < 1114112) { + ce.push(j >> 12 | 224, j >> 6 & 63 | 128, j & 63 | 128); + } else if (j < 1114112) { if ((S -= 4) < 0) break; - ue.push(z >> 18 | 240, z >> 12 & 63 | 128, z >> 6 & 63 | 128, z & 63 | 128); + ce.push(j >> 18 | 240, j >> 12 & 63 | 128, j >> 6 & 63 | 128, j & 63 | 128); } else throw new Error("Invalid code point"); } - return ue; + return ce; } function Qe(q) { const S = []; - for (let z = 0; z < q.length; ++z) S.push(q.charCodeAt(z) & 255); + for (let j = 0; j < q.length; ++j) S.push(q.charCodeAt(j) & 255); return S; } - function Me(q, S) { - let z, Z, ne; - const ue = []; - for (let pe = 0; pe < q.length && !((S -= 2) < 0); ++pe) z = q.charCodeAt(pe), Z = z >> 8, ne = z % 256, ue.push(ne), ue.push(Z); - return ue; + function Le(q, S) { + let j, Z, ne; + const ce = []; + for (let pe = 0; pe < q.length && !((S -= 2) < 0); ++pe) j = q.charCodeAt(pe), Z = j >> 8, ne = j % 256, ce.push(ne), ce.push(Z); + return ce; } function ft(q) { return t.toByteArray(ke(q)); } - function rt(q, S, z, Z) { + function rt(q, S, j, Z) { let ne; - for (ne = 0; ne < Z && !(ne + z >= S.length || ne >= q.length); ++ne) S[ne + z] = q[ne]; + for (ne = 0; ne < Z && !(ne + j >= S.length || ne >= q.length); ++ne) S[ne + j] = q[ne]; return ne; } function wt(q, S) { @@ -1196,9 +1196,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } const Wr = (function() { const q = "0123456789abcdef", S = new Array(256); - for (let z = 0; z < 16; ++z) { - const Z = z * 16; - for (let ne = 0; ne < 16; ++ne) S[Z + ne] = q[z] + q[ne]; + for (let j = 0; j < 16; ++j) { + const Z = j * 16; + for (let ne = 0; ne < 16; ++ne) S[Z + ne] = q[j] + q[ne]; } return S; })(); @@ -1221,11 +1221,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy function rb() { return Ap || (Ap = 1, (function(e) { function t(Y, Q) { - var G = Y.length; + var V = Y.length; Y.push(Q); - e: for (; 0 < G; ) { - var K = G - 1 >>> 1, V = Y[K]; - if (0 < a(V, Q)) Y[K] = Q, Y[G] = V, G = K; + e: for (; 0 < V; ) { + var M = V - 1 >>> 1, G = Y[M]; + if (0 < a(G, Q)) Y[M] = Q, Y[V] = G, V = M; else break e; } } @@ -1234,21 +1234,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } function n(Y) { if (Y.length === 0) return null; - var Q = Y[0], G = Y.pop(); - if (G !== Q) { - Y[0] = G; - e: for (var K = 0, V = Y.length, ee = V >>> 1; K < ee; ) { - var te = 2 * (K + 1) - 1, oe = Y[te], ie = te + 1, ce = Y[ie]; - if (0 > a(oe, G)) ie < V && 0 > a(ce, oe) ? (Y[K] = ce, Y[ie] = G, K = ie) : (Y[K] = oe, Y[te] = G, K = te); - else if (ie < V && 0 > a(ce, G)) Y[K] = ce, Y[ie] = G, K = ie; + var Q = Y[0], V = Y.pop(); + if (V !== Q) { + Y[0] = V; + e: for (var M = 0, G = Y.length, ee = G >>> 1; M < ee; ) { + var te = 2 * (M + 1) - 1, oe = Y[te], ie = te + 1, xe = Y[ie]; + if (0 > a(oe, V)) ie < G && 0 > a(xe, oe) ? (Y[M] = xe, Y[ie] = V, M = ie) : (Y[M] = oe, Y[te] = V, M = te); + else if (ie < G && 0 > a(xe, V)) Y[M] = xe, Y[ie] = V, M = ie; else break e; } } return Q; } function a(Y, Q) { - var G = Y.sortIndex - Q.sortIndex; - return G !== 0 ? G : Y.id - Q.id; + var V = Y.sortIndex - Q.sortIndex; + return V !== 0 ? V : Y.id - Q.id; } if (typeof performance == "object" && typeof performance.now == "function") { var i = performance; @@ -1280,14 +1280,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } function _(Y, Q) { y = false, B && (B = false, D(U), U = -1), m = true; - var G = p; + var V = p; try { for (k(Q), h = r(u); h !== null && (!(h.expirationTime > Q) || Y && !I()); ) { - var K = h.callback; - if (typeof K == "function") { + var M = h.callback; + if (typeof M == "function") { h.callback = null, p = h.priorityLevel; - var V = K(h.expirationTime <= Q); - Q = e.unstable_now(), typeof V == "function" ? h.callback = V : h === r(u) && n(u), k(Q); + var G = M(h.expirationTime <= Q); + Q = e.unstable_now(), typeof G == "function" ? h.callback = G : h === r(u) && n(u), k(Q); } else n(u); h = r(u); } @@ -1298,17 +1298,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } return ee; } finally { - h = null, p = G, m = false; + h = null, p = V, m = false; } } - var T = false, N = null, U = -1, C = 5, j = -1; + var T = false, N = null, U = -1, C = 5, z = -1; function I() { - return !(e.unstable_now() - j < C); + return !(e.unstable_now() - z < C); } function R() { if (N !== null) { var Y = e.unstable_now(); - j = Y; + z = Y; var Q = true; try { Q = N(true, Y); @@ -1357,12 +1357,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy default: Q = p; } - var G = p; + var V = p; p = Q; try { return Y(); } finally { - p = G; + p = V; } }, e.unstable_pauseExecution = function() { }, e.unstable_requestPaint = function() { @@ -1377,48 +1377,48 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy default: Y = 3; } - var G = p; + var V = p; p = Y; try { return Q(); } finally { - p = G; + p = V; } - }, e.unstable_scheduleCallback = function(Y, Q, G) { - var K = e.unstable_now(); - switch (typeof G == "object" && G !== null ? (G = G.delay, G = typeof G == "number" && 0 < G ? K + G : K) : G = K, Y) { + }, e.unstable_scheduleCallback = function(Y, Q, V) { + var M = e.unstable_now(); + switch (typeof V == "object" && V !== null ? (V = V.delay, V = typeof V == "number" && 0 < V ? M + V : M) : V = M, Y) { case 1: - var V = -1; + var G = -1; break; case 2: - V = 250; + G = 250; break; case 5: - V = 1073741823; + G = 1073741823; break; case 4: - V = 1e4; + G = 1e4; break; default: - V = 5e3; + G = 5e3; } - return V = G + V, Y = { + return G = V + G, Y = { id: f++, callback: Q, priorityLevel: Y, - startTime: G, - expirationTime: V, + startTime: V, + expirationTime: G, sortIndex: -1 - }, G > K ? (Y.sortIndex = G, t(x, Y), r(u) === null && Y === r(x) && (B ? (D(U), U = -1) : B = true, X(w, G - K))) : (Y.sortIndex = V, t(u, Y), y || m || (y = true, $(_))), Y; + }, V > M ? (Y.sortIndex = V, t(x, Y), r(u) === null && Y === r(x) && (B ? (D(U), U = -1) : B = true, X(w, V - M))) : (Y.sortIndex = G, t(u, Y), y || m || (y = true, $(_))), Y; }, e.unstable_shouldYield = I, e.unstable_wrapCallback = function(Y) { var Q = p; return function() { - var G = p; + var V = p; p = Q; try { return Y.apply(this, arguments); } finally { - p = G; + p = V; } }; }; @@ -1576,20 +1576,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy var b = v.hasOwnProperty(s) ? v[s] : null; (b !== null ? b.type !== 0 : g || !(2 < s.length) || s[0] !== "o" && s[0] !== "O" || s[1] !== "n" && s[1] !== "N") && (y(s, d, b, g) && (d = null), g || b === null ? p(s) && (d === null ? o.removeAttribute(s) : o.setAttribute(s, "" + d)) : b.mustUseProperty ? o[b.propertyName] = d === null ? b.type === 3 ? false : "" : d : (s = b.attributeName, g = b.attributeNamespace, d === null ? o.removeAttribute(s) : (b = b.type, d = b === 3 || b === 4 && d === true ? "" : "" + d, g ? o.setAttributeNS(g, s, d) : o.setAttribute(s, d)))); } - var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _ = Symbol.for("react.element"), T = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), I = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), X = Symbol.for("react.offscreen"), Y = Symbol.iterator; + var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _ = Symbol.for("react.element"), T = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), z = Symbol.for("react.provider"), I = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), X = Symbol.for("react.offscreen"), Y = Symbol.iterator; function Q(o) { return o === null || typeof o != "object" ? null : (o = Y && o[Y] || o["@@iterator"], typeof o == "function" ? o : null); } - var G = Object.assign, K; - function V(o) { - if (K === void 0) try { + var V = Object.assign, M; + function G(o) { + if (M === void 0) try { throw Error(); } catch (d) { var s = d.stack.trim().match(/\n( *(at )?)/); - K = s && s[1] || ""; + M = s && s[1] || ""; } return ` -` + K + o; +` + M + o; } var ee = false; function te(o, s) { @@ -1607,29 +1607,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(s, []); - } catch (xe) { - var g = xe; + } catch (ue) { + var g = ue; } Reflect.construct(o, [], s); } else { try { s.call(); - } catch (xe) { - g = xe; + } catch (ue) { + g = ue; } o.call(s.prototype); } else { try { throw Error(); - } catch (xe) { - g = xe; + } catch (ue) { + g = ue; } o(); } - } catch (xe) { - if (xe && g && typeof xe.stack == "string") { - for (var b = xe.stack.split(` + } catch (ue) { + if (ue && g && typeof ue.stack == "string") { + for (var b = ue.stack.split(` `), F = g.stack.split(` `), H = b.length - 1, J = F.length - 1; 1 <= H && 0 <= J && b[H] !== F[J]; ) J--; for (; 1 <= H && 0 <= J; H--, J--) if (b[H] !== F[J]) { @@ -1646,18 +1646,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } finally { ee = false, Error.prepareStackTrace = d; } - return (o = o ? o.displayName || o.name : "") ? V(o) : ""; + return (o = o ? o.displayName || o.name : "") ? G(o) : ""; } function oe(o) { switch (o.tag) { case 5: - return V(o.type); + return G(o.type); case 16: - return V("Lazy"); + return G("Lazy"); case 13: - return V("Suspense"); + return G("Suspense"); case 19: - return V("SuspenseList"); + return G("SuspenseList"); case 0: case 2: case 15: @@ -1691,7 +1691,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy if (typeof o == "object") switch (o.$$typeof) { case I: return (o.displayName || "Context") + ".Consumer"; - case j: + case z: return (o._context.displayName || "Context") + ".Provider"; case R: var s = o.render; @@ -1707,7 +1707,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } return null; } - function ce(o) { + function xe(o) { var s = o.type; switch (o.tag) { case 24: @@ -1821,7 +1821,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } function Ue(o, s) { var d = s.checked; - return G({}, s, { + return V({}, s, { defaultChecked: void 0, defaultValue: void 0, value: void 0, @@ -1847,7 +1847,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy o.removeAttribute("value"); return; } - s.hasOwnProperty("value") ? Me(o, s.type, d) : s.hasOwnProperty("defaultValue") && Me(o, s.type, de(s.defaultValue)), s.checked == null && s.defaultChecked != null && (o.defaultChecked = !!s.defaultChecked); + s.hasOwnProperty("value") ? Le(o, s.type, d) : s.hasOwnProperty("defaultValue") && Le(o, s.type, de(s.defaultValue)), s.checked == null && s.defaultChecked != null && (o.defaultChecked = !!s.defaultChecked); } function Qe(o, s, d) { if (s.hasOwnProperty("value") || s.hasOwnProperty("defaultValue")) { @@ -1857,7 +1857,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } d = o.name, d !== "" && (o.name = ""), o.defaultChecked = !!o._wrapperState.initialChecked, d !== "" && (o.name = d); } - function Me(o, s, d) { + function Le(o, s, d) { (s !== "number" || Ie(o.ownerDocument) !== o) && (d == null ? o.defaultValue = "" + o._wrapperState.initialValue : o.defaultValue !== "" + d && (o.defaultValue = "" + d)); } var ft = Array.isArray; @@ -1879,7 +1879,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } function wt(o, s) { if (s.dangerouslySetInnerHTML != null) throw Error(r(91)); - return G({}, s, { + return V({}, s, { value: void 0, defaultValue: void 0, children: "" + o._wrapperState.initialValue @@ -1923,7 +1923,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy function q(o, s) { return o == null || o === "http://www.w3.org/1999/xhtml" ? dr(s) : o === "http://www.w3.org/2000/svg" && s === "foreignObject" ? "http://www.w3.org/1999/xhtml" : o; } - var S, z = (function(o) { + var S, j = (function(o) { return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(s, d, g, b) { MSApp.execUnsafeLocalFunction(function() { return o(s, d, g, b); @@ -1990,14 +1990,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy strokeMiterlimit: true, strokeOpacity: true, strokeWidth: true - }, ue = [ + }, ce = [ "Webkit", "ms", "Moz", "O" ]; Object.keys(ne).forEach(function(o) { - ue.forEach(function(s) { + ce.forEach(function(s) { s = s + o.charAt(0).toUpperCase() + o.substring(1), ne[s] = ne[o]; }); }); @@ -2011,7 +2011,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy d === "float" && (d = "cssFloat"), g ? o.setProperty(d, b) : o[d] = b; } } - var yt = G({ + var yt = V({ menuitem: true }, { area: true, @@ -2133,9 +2133,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy Cs = false; } function qd(o, s, d, g, b, F, H, J, re) { - var xe = Array.prototype.slice.call(arguments, 3); + var ue = Array.prototype.slice.call(arguments, 3); try { - s.apply(d, xe); + s.apply(d, ue); } catch (ye) { this.onError(ye); } @@ -2151,10 +2151,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy function Vd(o, s, d, g, b, F, H, J, re) { if (Gd.apply(this, arguments), li) { if (li) { - var xe = io; + var ue = io; li = false, io = null; } else throw Error(r(198)); - a0 || (a0 = true, ks = xe); + a0 || (a0 = true, ks = ue); } } function Ba(o) { @@ -2178,7 +2178,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy function Ee(o) { if (Ba(o) !== o) throw Error(r(188)); } - function Le(o) { + function Me(o) { var s = o.alternate; if (!s) { if (s = Ba(o), s === null) throw Error(r(188)); @@ -2236,8 +2236,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy if (d.tag !== 3) throw Error(r(188)); return d.stateNode.current === d ? o : s; } - function Ke(o) { - return o = Le(o), o !== null ? ct(o) : null; + function Te(o) { + return o = Me(o), o !== null ? ct(o) : null; } function ct(o) { if (o.tag === 5 || o.tag === 6) return o; @@ -2673,7 +2673,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy for (var J in o) o.hasOwnProperty(J) && (d = o[J], this[J] = d ? d(F) : F[J]); return this.isDefaultPrevented = (F.defaultPrevented != null ? F.defaultPrevented : F.returnValue === false) ? Vc : t5, this.isPropagationStopped = t5, this; } - return G(s.prototype, { + return V(s.prototype, { preventDefault: function() { this.defaultPrevented = true; var d = this.nativeEvent; @@ -2697,10 +2697,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy }, defaultPrevented: 0, isTrusted: 0 - }, nf = $r(i0), js = G({}, i0, { + }, nf = $r(i0), js = V({}, i0, { view: 0, detail: 0 - }), vE = $r(js), af, of, zs, Wc = G({}, js, { + }), vE = $r(js), af, of, zs, Wc = V({}, js, { screenX: 0, screenY: 0, clientX: 0, @@ -2723,19 +2723,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy movementY: function(o) { return "movementY" in o ? o.movementY : of; } - }), r5 = $r(Wc), BE = G({}, Wc, { + }), r5 = $r(Wc), BE = V({}, Wc, { dataTransfer: 0 - }), CE = $r(BE), kE = G({}, js, { + }), CE = $r(BE), kE = V({}, js, { relatedTarget: 0 - }), sf = $r(kE), DE = G({}, i0, { + }), sf = $r(kE), DE = V({}, i0, { animationName: 0, elapsedTime: 0, pseudoElement: 0 - }), FE = $r(DE), SE = G({}, i0, { + }), FE = $r(DE), SE = V({}, i0, { clipboardData: function(o) { return "clipboardData" in o ? o.clipboardData : window.clipboardData; } - }), _E = $r(SE), IE = G({}, i0, { + }), _E = $r(SE), IE = V({}, i0, { data: 0 }), n5 = $r(IE), PE = { Esc: "Escape", @@ -2800,7 +2800,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy function lf() { return zE; } - var UE = G({}, js, { + var UE = V({}, js, { key: function(o) { if (o.key) { var s = PE[o.key] || o.key; @@ -2826,7 +2826,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy which: function(o) { return o.type === "keypress" ? Gc(o) : o.type === "keydown" || o.type === "keyup" ? o.keyCode : 0; } - }), TE = $r(UE), RE = G({}, Wc, { + }), TE = $r(UE), RE = V({}, Wc, { pointerId: 0, width: 0, height: 0, @@ -2837,7 +2837,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy twist: 0, pointerType: 0, isPrimary: 0 - }), a5 = $r(RE), KE = G({}, js, { + }), a5 = $r(RE), KE = V({}, js, { touches: 0, targetTouches: 0, changedTouches: 0, @@ -2846,11 +2846,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy ctrlKey: 0, shiftKey: 0, getModifierState: lf - }), ME = $r(KE), LE = G({}, i0, { + }), ME = $r(KE), LE = V({}, i0, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 - }), OE = $r(LE), HE = G({}, Wc, { + }), OE = $r(LE), HE = V({}, Wc, { deltaX: function(o) { return "deltaX" in o ? o.deltaX : "wheelDeltaX" in o ? -o.wheelDeltaX : 0; }, @@ -3145,13 +3145,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy e: { var F = void 0; if (s) for (var H = g.length - 1; 0 <= H; H--) { - var J = g[H], re = J.instance, xe = J.currentTarget; + var J = g[H], re = J.instance, ue = J.currentTarget; if (J = J.listener, re !== F && b.isPropagationStopped()) break e; - F5(b, J, xe), F = re; + F5(b, J, ue), F = re; } else for (H = 0; H < g.length; H++) { - if (J = g[H], re = J.instance, xe = J.currentTarget, J = J.listener, re !== F && b.isPropagationStopped()) break e; - F5(b, J, xe), F = re; + if (J = g[H], re = J.instance, ue = J.currentTarget, J = J.listener, re !== F && b.isPropagationStopped()) break e; + F5(b, J, ue), F = re; } } } @@ -3220,7 +3220,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy g = g.return; } Nc(function() { - var xe = F, ye = to(d), Ae = []; + var ue = F, ye = to(d), Ae = []; e: { var me = k5.get(o); if (me !== void 0) { @@ -3301,7 +3301,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } var _e = (s & 4) !== 0, Tt = !_e && o === "scroll", se = _e ? me !== null ? me + "Capture" : null : me; _e = []; - for (var ae = xe, le; ae !== null; ) { + for (var ae = ue, le; ae !== null; ) { le = ae; var we = le.stateNode; if (le.tag === 5 && we !== null && (le = we, se !== null && (we = oo(ae, se), we != null && _e.push(Hs(ae, we, le)))), Tt) break; @@ -3316,8 +3316,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy if ((s & 7) === 0) { e: { if (me = o === "mouseover" || o === "pointerover", De = o === "mouseout" || o === "pointerout", me && d !== Je && (Se = d.relatedTarget || d.fromElement) && (ui(Se) || Se[Ca])) break e; - if ((De || me) && (me = ye.window === ye ? ye : (me = ye.ownerDocument) ? me.defaultView || me.parentWindow : window, De ? (Se = d.relatedTarget || d.toElement, De = xe, Se = Se ? ui(Se) : null, Se !== null && (Tt = Ba(Se), Se !== Tt || Se.tag !== 5 && Se.tag !== 6) && (Se = null)) : (De = null, Se = xe), De !== Se)) { - if (_e = r5, we = "onMouseLeave", se = "onMouseEnter", ae = "mouse", (o === "pointerout" || o === "pointerover") && (_e = a5, we = "onPointerLeave", se = "onPointerEnter", ae = "pointer"), Tt = De == null ? me : d0(De), le = Se == null ? me : d0(Se), me = new _e(we, ae + "leave", De, d, ye), me.target = Tt, me.relatedTarget = le, we = null, ui(ye) === xe && (_e = new _e(se, ae + "enter", Se, d, ye), _e.target = le, _e.relatedTarget = Tt, we = _e), Tt = we, De && Se) t: { + if ((De || me) && (me = ye.window === ye ? ye : (me = ye.ownerDocument) ? me.defaultView || me.parentWindow : window, De ? (Se = d.relatedTarget || d.toElement, De = ue, Se = Se ? ui(Se) : null, Se !== null && (Tt = Ba(Se), Se !== Tt || Se.tag !== 5 && Se.tag !== 6) && (Se = null)) : (De = null, Se = ue), De !== Se)) { + if (_e = r5, we = "onMouseLeave", se = "onMouseEnter", ae = "mouse", (o === "pointerout" || o === "pointerover") && (_e = a5, we = "onPointerLeave", se = "onPointerEnter", ae = "pointer"), Tt = De == null ? me : d0(De), le = Se == null ? me : d0(Se), me = new _e(we, ae + "leave", De, d, ye), me.target = Tt, me.relatedTarget = le, we = null, ui(ye) === ue && (_e = new _e(se, ae + "enter", Se, d, ye), _e.target = le, _e.relatedTarget = Tt, we = _e), Tt = we, De && Se) t: { for (_e = De, se = Se, ae = 0, le = _e; le; le = u0(le)) ae++; for (le = 0, we = se; we; we = u0(we)) le++; for (; 0 < ae - le; ) _e = u0(_e), ae--; @@ -3333,22 +3333,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } } e: { - if (me = xe ? d0(xe) : window, De = me.nodeName && me.nodeName.toLowerCase(), De === "select" || De === "input" && me.type === "file") var Pe = YE; + if (me = ue ? d0(ue) : window, De = me.nodeName && me.nodeName.toLowerCase(), De === "select" || De === "input" && me.type === "file") var Pe = YE; else if (u5(me)) if (d5) Pe = tA; else { Pe = JE; - var Te = XE; + var Re = XE; } else (De = me.nodeName) && De.toLowerCase() === "input" && (me.type === "checkbox" || me.type === "radio") && (Pe = eA); - if (Pe && (Pe = Pe(o, xe))) { + if (Pe && (Pe = Pe(o, ue))) { x5(Ae, Pe, d, ye); break e; } - Te && Te(o, me, xe), o === "focusout" && (Te = me._wrapperState) && Te.controlled && me.type === "number" && Me(me, "number", me.value); + Re && Re(o, me, ue), o === "focusout" && (Re = me._wrapperState) && Re.controlled && me.type === "number" && Le(me, "number", me.value); } - switch (Te = xe ? d0(xe) : window, o) { + switch (Re = ue ? d0(ue) : window, o) { case "focusin": - (u5(Te) || Te.contentEditable === "true") && (l0 = Te, ff = xe, Ms = null); + (u5(Re) || Re.contentEditable === "true") && (l0 = Re, ff = ue, Ms = null); break; case "focusout": Ms = ff = l0 = null; @@ -3367,7 +3367,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy case "keyup": A5(Ae, d, ye); } - var Re; + var Ke; if (cf) e: { switch (o) { case "compositionstart": @@ -3383,13 +3383,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy Oe = void 0; } else s0 ? l5(o, d) && (Oe = "onCompositionEnd") : o === "keydown" && d.keyCode === 229 && (Oe = "onCompositionStart"); - Oe && (o5 && d.locale !== "ko" && (s0 || Oe !== "onCompositionStart" ? Oe === "onCompositionEnd" && s0 && (Re = e5()) : (fo = ye, rf = "value" in fo ? fo.value : fo.textContent, s0 = true)), Te = Jc(xe, Oe), 0 < Te.length && (Oe = new n5(Oe, o, null, d, ye), Ae.push({ + Oe && (o5 && d.locale !== "ko" && (s0 || Oe !== "onCompositionStart" ? Oe === "onCompositionEnd" && s0 && (Ke = e5()) : (fo = ye, rf = "value" in fo ? fo.value : fo.textContent, s0 = true)), Re = Jc(ue, Oe), 0 < Re.length && (Oe = new n5(Oe, o, null, d, ye), Ae.push({ event: Oe, - listeners: Te - }), Re ? Oe.data = Re : (Re = c5(d), Re !== null && (Oe.data = Re)))), (Re = GE ? VE(o, d) : WE(o, d)) && (xe = Jc(xe, "onBeforeInput"), 0 < xe.length && (ye = new n5("onBeforeInput", "beforeinput", null, d, ye), Ae.push({ + listeners: Re + }), Ke ? Oe.data = Ke : (Ke = c5(d), Ke !== null && (Oe.data = Ke)))), (Ke = GE ? VE(o, d) : WE(o, d)) && (ue = Jc(ue, "onBeforeInput"), 0 < ue.length && (ye = new n5("onBeforeInput", "beforeinput", null, d, ye), Ae.push({ event: ye, - listeners: xe - }), ye.data = Re)); + listeners: ue + }), ye.data = Ke)); } S5(Ae, s); }); @@ -3417,9 +3417,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } function I5(o, s, d, g, b) { for (var F = s._reactName, H = []; d !== null && d !== g; ) { - var J = d, re = J.alternate, xe = J.stateNode; + var J = d, re = J.alternate, ue = J.stateNode; if (re !== null && re === g) break; - J.tag === 5 && xe !== null && (J = xe, b ? (re = oo(d, F), re != null && H.unshift(Hs(d, re, J))) : b || (re = oo(d, F), re != null && H.push(Hs(d, re, J)))), d = d.return; + J.tag === 5 && ue !== null && (J = ue, b ? (re = oo(d, F), re != null && H.unshift(Hs(d, re, J))) : b || (re = oo(d, F), re != null && H.push(Hs(d, re, J)))), d = d.return; } H.length !== 0 && o.push({ event: s, @@ -3550,8 +3550,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy var g = o.stateNode; if (s = s.childContextTypes, typeof g.getChildContext != "function") return d; g = g.getChildContext(); - for (var b in g) if (!(b in s)) throw Error(r(108, ce(o) || "Unknown", b)); - return G({}, d, g); + for (var b in g) if (!(b in s)) throw Error(r(108, xe(o) || "Unknown", b)); + return V({}, d, g); } function au(o) { return o = (o = o.stateNode) && o.__reactInternalMemoizedMergedChildContext || mo, xi = fr.current, Et(fr, o), Et(Pr, Pr.current), true; @@ -3766,7 +3766,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy var Pe = le.type; return Pe === N ? ye(se, ae, le.props.children, we, le.key) : ae !== null && (ae.elementType === Pe || typeof Pe == "object" && Pe !== null && Pe.$$typeof === $ && Q5(Pe) === ae.type) ? (we = b(ae, le.props), we.ref = Gs(se, ae, le), we.return = se, we) : (we = Nu(le.type, le.key, le.props, null, se.mode, we), we.ref = Gs(se, ae, le), we.return = se, we); } - function xe(se, ae, le, we) { + function ue(se, ae, le, we) { return ae === null || ae.tag !== 4 || ae.stateNode.containerInfo !== le.containerInfo || ae.stateNode.implementation !== le.implementation ? (ae = B1(le, se.mode, we), ae.return = se, ae) : (ae = b(ae, le.children || []), ae.return = se, ae); } function ye(se, ae, le, we, Pe) { @@ -3797,7 +3797,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy case _: return le.key === Pe ? re(se, ae, le, we) : null; case T: - return le.key === Pe ? xe(se, ae, le, we) : null; + return le.key === Pe ? ue(se, ae, le, we) : null; case $: return Pe = le._init, me(se, ae, Pe(le._payload), we); } @@ -3813,10 +3813,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy case _: return se = se.get(we.key === null ? le : we.key) || null, re(ae, se, we, Pe); case T: - return se = se.get(we.key === null ? le : we.key) || null, xe(ae, se, we, Pe); + return se = se.get(we.key === null ? le : we.key) || null, ue(ae, se, we, Pe); case $: - var Te = we._init; - return De(se, ae, le, Te(we._payload), Pe); + var Re = we._init; + return De(se, ae, le, Re(we._payload), Pe); } if (ft(we) || Q(we)) return se = se.get(le) || null, ye(ae, se, we, Pe, null); cu(ae, we); @@ -3824,22 +3824,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy return null; } function Se(se, ae, le, we) { - for (var Pe = null, Te = null, Re = ae, Oe = ae = 0, Jt = null; Re !== null && Oe < le.length; Oe++) { - Re.index > Oe ? (Jt = Re, Re = null) : Jt = Re.sibling; - var at = me(se, Re, le[Oe], we); + for (var Pe = null, Re = null, Ke = ae, Oe = ae = 0, Jt = null; Ke !== null && Oe < le.length; Oe++) { + Ke.index > Oe ? (Jt = Ke, Ke = null) : Jt = Ke.sibling; + var at = me(se, Ke, le[Oe], we); if (at === null) { - Re === null && (Re = Jt); + Ke === null && (Ke = Jt); break; } - o && Re && at.alternate === null && s(se, Re), ae = F(at, ae, Oe), Te === null ? Pe = at : Te.sibling = at, Te = at, Re = Jt; + o && Ke && at.alternate === null && s(se, Ke), ae = F(at, ae, Oe), Re === null ? Pe = at : Re.sibling = at, Re = at, Ke = Jt; } - if (Oe === le.length) return d(se, Re), kt && fi(se, Oe), Pe; - if (Re === null) { - for (; Oe < le.length; Oe++) Re = Ae(se, le[Oe], we), Re !== null && (ae = F(Re, ae, Oe), Te === null ? Pe = Re : Te.sibling = Re, Te = Re); + if (Oe === le.length) return d(se, Ke), kt && fi(se, Oe), Pe; + if (Ke === null) { + for (; Oe < le.length; Oe++) Ke = Ae(se, le[Oe], we), Ke !== null && (ae = F(Ke, ae, Oe), Re === null ? Pe = Ke : Re.sibling = Ke, Re = Ke); return kt && fi(se, Oe), Pe; } - for (Re = g(se, Re); Oe < le.length; Oe++) Jt = De(Re, se, Oe, le[Oe], we), Jt !== null && (o && Jt.alternate !== null && Re.delete(Jt.key === null ? Oe : Jt.key), ae = F(Jt, ae, Oe), Te === null ? Pe = Jt : Te.sibling = Jt, Te = Jt); - return o && Re.forEach(function(Do) { + for (Ke = g(se, Ke); Oe < le.length; Oe++) Jt = De(Ke, se, Oe, le[Oe], we), Jt !== null && (o && Jt.alternate !== null && Ke.delete(Jt.key === null ? Oe : Jt.key), ae = F(Jt, ae, Oe), Re === null ? Pe = Jt : Re.sibling = Jt, Re = Jt); + return o && Ke.forEach(function(Do) { return s(se, Do); }), kt && fi(se, Oe), Pe; } @@ -3847,22 +3847,22 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy var Pe = Q(le); if (typeof Pe != "function") throw Error(r(150)); if (le = Pe.call(le), le == null) throw Error(r(151)); - for (var Te = Pe = null, Re = ae, Oe = ae = 0, Jt = null, at = le.next(); Re !== null && !at.done; Oe++, at = le.next()) { - Re.index > Oe ? (Jt = Re, Re = null) : Jt = Re.sibling; - var Do = me(se, Re, at.value, we); + for (var Re = Pe = null, Ke = ae, Oe = ae = 0, Jt = null, at = le.next(); Ke !== null && !at.done; Oe++, at = le.next()) { + Ke.index > Oe ? (Jt = Ke, Ke = null) : Jt = Ke.sibling; + var Do = me(se, Ke, at.value, we); if (Do === null) { - Re === null && (Re = Jt); + Ke === null && (Ke = Jt); break; } - o && Re && Do.alternate === null && s(se, Re), ae = F(Do, ae, Oe), Te === null ? Pe = Do : Te.sibling = Do, Te = Do, Re = Jt; + o && Ke && Do.alternate === null && s(se, Ke), ae = F(Do, ae, Oe), Re === null ? Pe = Do : Re.sibling = Do, Re = Do, Ke = Jt; } - if (at.done) return d(se, Re), kt && fi(se, Oe), Pe; - if (Re === null) { - for (; !at.done; Oe++, at = le.next()) at = Ae(se, at.value, we), at !== null && (ae = F(at, ae, Oe), Te === null ? Pe = at : Te.sibling = at, Te = at); + if (at.done) return d(se, Ke), kt && fi(se, Oe), Pe; + if (Ke === null) { + for (; !at.done; Oe++, at = le.next()) at = Ae(se, at.value, we), at !== null && (ae = F(at, ae, Oe), Re === null ? Pe = at : Re.sibling = at, Re = at); return kt && fi(se, Oe), Pe; } - for (Re = g(se, Re); !at.done; Oe++, at = le.next()) at = De(Re, se, Oe, at.value, we), at !== null && (o && at.alternate !== null && Re.delete(at.key === null ? Oe : at.key), ae = F(at, ae, Oe), Te === null ? Pe = at : Te.sibling = at, Te = at); - return o && Re.forEach(function($A) { + for (Ke = g(se, Ke); !at.done; Oe++, at = le.next()) at = De(Ke, se, Oe, at.value, we), at !== null && (o && at.alternate !== null && Ke.delete(at.key === null ? Oe : at.key), ae = F(at, ae, Oe), Re === null ? Pe = at : Re.sibling = at, Re = at); + return o && Ke.forEach(function($A) { return s(se, $A); }), kt && fi(se, Oe), Pe; } @@ -3871,29 +3871,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy switch (le.$$typeof) { case _: e: { - for (var Pe = le.key, Te = ae; Te !== null; ) { - if (Te.key === Pe) { + for (var Pe = le.key, Re = ae; Re !== null; ) { + if (Re.key === Pe) { if (Pe = le.type, Pe === N) { - if (Te.tag === 7) { - d(se, Te.sibling), ae = b(Te, le.props.children), ae.return = se, se = ae; + if (Re.tag === 7) { + d(se, Re.sibling), ae = b(Re, le.props.children), ae.return = se, se = ae; break e; } - } else if (Te.elementType === Pe || typeof Pe == "object" && Pe !== null && Pe.$$typeof === $ && Q5(Pe) === Te.type) { - d(se, Te.sibling), ae = b(Te, le.props), ae.ref = Gs(se, Te, le), ae.return = se, se = ae; + } else if (Re.elementType === Pe || typeof Pe == "object" && Pe !== null && Pe.$$typeof === $ && Q5(Pe) === Re.type) { + d(se, Re.sibling), ae = b(Re, le.props), ae.ref = Gs(se, Re, le), ae.return = se, se = ae; break e; } - d(se, Te); + d(se, Re); break; - } else s(se, Te); - Te = Te.sibling; + } else s(se, Re); + Re = Re.sibling; } le.type === N ? (ae = bi(le.props.children, se.mode, we, le.key), ae.return = se, se = ae) : (we = Nu(le.type, le.key, le.props, null, se.mode, we), we.ref = Gs(se, ae, le), we.return = se, se = we); } return H(se); case T: e: { - for (Te = le.key; ae !== null; ) { - if (ae.key === Te) if (ae.tag === 4 && ae.stateNode.containerInfo === le.containerInfo && ae.stateNode.implementation === le.implementation) { + for (Re = le.key; ae !== null; ) { + if (ae.key === Re) if (ae.tag === 4 && ae.stateNode.containerInfo === le.containerInfo && ae.stateNode.implementation === le.implementation) { d(se, ae.sibling), ae = b(ae, le.children || []), ae.return = se, se = ae; break e; } else { @@ -3907,7 +3907,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } return H(se); case $: - return Te = le._init, Tt(se, ae, Te(le._payload), we); + return Re = le._init, Tt(se, ae, Re(le._payload), we); } if (ft(le)) return Se(se, ae, le, we); if (Q(le)) return _e(se, ae, le, we); @@ -4049,14 +4049,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy var F = b.firstBaseUpdate, H = b.lastBaseUpdate, J = b.shared.pending; if (J !== null) { b.shared.pending = null; - var re = J, xe = re.next; - re.next = null, H === null ? F = xe : H.next = xe, H = re; + var re = J, ue = re.next; + re.next = null, H === null ? F = ue : H.next = ue, H = re; var ye = o.alternate; - ye !== null && (ye = ye.updateQueue, J = ye.lastBaseUpdate, J !== H && (J === null ? ye.firstBaseUpdate = xe : J.next = xe, ye.lastBaseUpdate = re)); + ye !== null && (ye = ye.updateQueue, J = ye.lastBaseUpdate, J !== H && (J === null ? ye.firstBaseUpdate = ue : J.next = ue, ye.lastBaseUpdate = re)); } if (F !== null) { var Ae = b.baseState; - H = 0, ye = xe = re = null, J = F; + H = 0, ye = ue = re = null, J = F; do { var me = J.lane, De = J.eventTime; if ((g & me) === me) { @@ -4082,7 +4082,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy Se.flags = Se.flags & -65537 | 128; case 0: if (Se = _e.payload, me = typeof Se == "function" ? Se.call(De, Ae, me) : Se, me == null) break e; - Ae = G({}, Ae, me); + Ae = V({}, Ae, me); break e; case 2: Eo = true; @@ -4098,13 +4098,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy payload: J.payload, callback: J.callback, next: null - }, ye === null ? (xe = ye = De, re = Ae) : ye = ye.next = De, H |= me; + }, ye === null ? (ue = ye = De, re = Ae) : ye = ye.next = De, H |= me; if (J = J.next, J === null) { if (J = b.shared.pending, J === null) break; me = J, J = me.next, me.next = null, b.lastBaseUpdate = me, b.shared.pending = null; } } while (true); - if (ye === null && (re = Ae), b.baseState = re, b.firstBaseUpdate = xe, b.lastBaseUpdate = ye, s = b.shared.interleaved, s !== null) { + if (ye === null && (re = Ae), b.baseState = re, b.firstBaseUpdate = ue, b.lastBaseUpdate = ye, s = b.shared.interleaved, s !== null) { b = s; do H |= b.lane, b = b.next; @@ -4245,28 +4245,28 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy } if (b !== null) { F = b.next, g = g.baseState; - var J = H = null, re = null, xe = F; + var J = H = null, re = null, ue = F; do { - var ye = xe.lane; + var ye = ue.lane; if ((gi & ye) === ye) re !== null && (re = re.next = { lane: 0, - action: xe.action, - hasEagerState: xe.hasEagerState, - eagerState: xe.eagerState, + action: ue.action, + hasEagerState: ue.hasEagerState, + eagerState: ue.eagerState, next: null - }), g = xe.hasEagerState ? xe.eagerState : o(g, xe.action); + }), g = ue.hasEagerState ? ue.eagerState : o(g, ue.action); else { var Ae = { lane: ye, - action: xe.action, - hasEagerState: xe.hasEagerState, - eagerState: xe.eagerState, + action: ue.action, + hasEagerState: ue.hasEagerState, + eagerState: ue.eagerState, next: null }; re === null ? (J = re = Ae, H = g) : re = re.next = Ae, Nt.lanes |= ye, mi |= ye; } - xe = xe.next; - } while (xe !== null && xe !== F); + ue = ue.next; + } while (ue !== null && ue !== F); re === null ? H = g : re.next = J, Pn(g, s.memoizedState) || (jr = true), s.memoizedState = g, s.baseState = H, s.baseQueue = re, d.lastRenderedState = g; } if (o = d.interleaved, o !== null) { @@ -4677,14 +4677,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy }; function jn(o, s) { if (o && o.defaultProps) { - s = G({}, s), o = o.defaultProps; + s = V({}, s), o = o.defaultProps; for (var d in o) s[d] === void 0 && (s[d] = o[d]); return s; } return s; } function Yf(o, s, d, g) { - s = o.memoizedState, d = d(g, s), d = d == null ? s : G({}, s, d), o.memoizedState = d, o.lanes === 0 && (o.updateQueue.baseState = d); + s = o.memoizedState, d = d(g, s), d = d == null ? s : V({}, s, d), o.memoizedState = d, o.lanes === 0 && (o.updateQueue.baseState = d); } var Au = { isMounted: function(o) { @@ -4877,18 +4877,18 @@ Error generating stack: ` + F.message + ` else if (o === null) { var H = s.stateNode, J = s.memoizedProps; H.props = J; - var re = H.context, xe = d.contextType; - typeof xe == "object" && xe !== null ? xe = un(xe) : (xe = Nr(d) ? xi : fr.current, xe = h0(s, xe)); + var re = H.context, ue = d.contextType; + typeof ue == "object" && ue !== null ? ue = un(ue) : (ue = Nr(d) ? xi : fr.current, ue = h0(s, ue)); var ye = d.getDerivedStateFromProps, Ae = typeof ye == "function" || typeof H.getSnapshotBeforeUpdate == "function"; - Ae || typeof H.UNSAFE_componentWillReceiveProps != "function" && typeof H.componentWillReceiveProps != "function" || (J !== g || re !== xe) && b2(s, H, g, xe), Eo = false; + Ae || typeof H.UNSAFE_componentWillReceiveProps != "function" && typeof H.componentWillReceiveProps != "function" || (J !== g || re !== ue) && b2(s, H, g, ue), Eo = false; var me = s.memoizedState; - H.state = me, fu(s, g, H, b), re = s.memoizedState, J !== g || me !== re || Pr.current || Eo ? (typeof ye == "function" && (Yf(s, d, ye, g), re = s.memoizedState), (J = Eo || E2(s, d, J, g, me, re, xe)) ? (Ae || typeof H.UNSAFE_componentWillMount != "function" && typeof H.componentWillMount != "function" || (typeof H.componentWillMount == "function" && H.componentWillMount(), typeof H.UNSAFE_componentWillMount == "function" && H.UNSAFE_componentWillMount()), typeof H.componentDidMount == "function" && (s.flags |= 4194308)) : (typeof H.componentDidMount == "function" && (s.flags |= 4194308), s.memoizedProps = g, s.memoizedState = re), H.props = g, H.state = re, H.context = xe, g = J) : (typeof H.componentDidMount == "function" && (s.flags |= 4194308), g = false); + H.state = me, fu(s, g, H, b), re = s.memoizedState, J !== g || me !== re || Pr.current || Eo ? (typeof ye == "function" && (Yf(s, d, ye, g), re = s.memoizedState), (J = Eo || E2(s, d, J, g, me, re, ue)) ? (Ae || typeof H.UNSAFE_componentWillMount != "function" && typeof H.componentWillMount != "function" || (typeof H.componentWillMount == "function" && H.componentWillMount(), typeof H.UNSAFE_componentWillMount == "function" && H.UNSAFE_componentWillMount()), typeof H.componentDidMount == "function" && (s.flags |= 4194308)) : (typeof H.componentDidMount == "function" && (s.flags |= 4194308), s.memoizedProps = g, s.memoizedState = re), H.props = g, H.state = re, H.context = ue, g = J) : (typeof H.componentDidMount == "function" && (s.flags |= 4194308), g = false); } else { - H = s.stateNode, W5(o, s), J = s.memoizedProps, xe = s.type === s.elementType ? J : jn(s.type, J), H.props = xe, Ae = s.pendingProps, me = H.context, re = d.contextType, typeof re == "object" && re !== null ? re = un(re) : (re = Nr(d) ? xi : fr.current, re = h0(s, re)); + H = s.stateNode, W5(o, s), J = s.memoizedProps, ue = s.type === s.elementType ? J : jn(s.type, J), H.props = ue, Ae = s.pendingProps, me = H.context, re = d.contextType, typeof re == "object" && re !== null ? re = un(re) : (re = Nr(d) ? xi : fr.current, re = h0(s, re)); var De = d.getDerivedStateFromProps; (ye = typeof De == "function" || typeof H.getSnapshotBeforeUpdate == "function") || typeof H.UNSAFE_componentWillReceiveProps != "function" && typeof H.componentWillReceiveProps != "function" || (J !== Ae || me !== re) && b2(s, H, g, re), Eo = false, me = s.memoizedState, H.state = me, fu(s, g, H, b); var Se = s.memoizedState; - J !== Ae || me !== Se || Pr.current || Eo ? (typeof De == "function" && (Yf(s, d, De, g), Se = s.memoizedState), (xe = Eo || E2(s, d, xe, g, me, Se, re) || false) ? (ye || typeof H.UNSAFE_componentWillUpdate != "function" && typeof H.componentWillUpdate != "function" || (typeof H.componentWillUpdate == "function" && H.componentWillUpdate(g, Se, re), typeof H.UNSAFE_componentWillUpdate == "function" && H.UNSAFE_componentWillUpdate(g, Se, re)), typeof H.componentDidUpdate == "function" && (s.flags |= 4), typeof H.getSnapshotBeforeUpdate == "function" && (s.flags |= 1024)) : (typeof H.componentDidUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 4), typeof H.getSnapshotBeforeUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 1024), s.memoizedProps = g, s.memoizedState = Se), H.props = g, H.state = Se, H.context = re, g = xe) : (typeof H.componentDidUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 4), typeof H.getSnapshotBeforeUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 1024), g = false); + J !== Ae || me !== Se || Pr.current || Eo ? (typeof De == "function" && (Yf(s, d, De, g), Se = s.memoizedState), (ue = Eo || E2(s, d, ue, g, me, Se, re) || false) ? (ye || typeof H.UNSAFE_componentWillUpdate != "function" && typeof H.componentWillUpdate != "function" || (typeof H.componentWillUpdate == "function" && H.componentWillUpdate(g, Se, re), typeof H.UNSAFE_componentWillUpdate == "function" && H.UNSAFE_componentWillUpdate(g, Se, re)), typeof H.componentDidUpdate == "function" && (s.flags |= 4), typeof H.getSnapshotBeforeUpdate == "function" && (s.flags |= 1024)) : (typeof H.componentDidUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 4), typeof H.getSnapshotBeforeUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 1024), s.memoizedProps = g, s.memoizedState = Se), H.props = g, H.state = Se, H.context = re, g = ue) : (typeof H.componentDidUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 4), typeof H.getSnapshotBeforeUpdate != "function" || J === o.memoizedProps && me === o.memoizedState || (s.flags |= 1024), g = false); } return r1(o, s, d, g, F, b); } @@ -5141,9 +5141,9 @@ Error generating stack: ` + F.message + ` b = Ue(o, b), g = Ue(o, g), F = []; break; case "select": - b = G({}, b, { + b = V({}, b, { value: void 0 - }), g = G({}, g, { + }), g = V({}, g, { value: void 0 }), F = []; break; @@ -5156,21 +5156,21 @@ Error generating stack: ` + F.message + ` Ze(d, g); var H; d = null; - for (xe in b) if (!g.hasOwnProperty(xe) && b.hasOwnProperty(xe) && b[xe] != null) if (xe === "style") { - var J = b[xe]; + for (ue in b) if (!g.hasOwnProperty(ue) && b.hasOwnProperty(ue) && b[ue] != null) if (ue === "style") { + var J = b[ue]; for (H in J) J.hasOwnProperty(H) && (d || (d = {}), d[H] = ""); - } else xe !== "dangerouslySetInnerHTML" && xe !== "children" && xe !== "suppressContentEditableWarning" && xe !== "suppressHydrationWarning" && xe !== "autoFocus" && (a.hasOwnProperty(xe) ? F || (F = []) : (F = F || []).push(xe, null)); - for (xe in g) { - var re = g[xe]; - if (J = b == null ? void 0 : b[xe], g.hasOwnProperty(xe) && re !== J && (re != null || J != null)) if (xe === "style") if (J) { + } else ue !== "dangerouslySetInnerHTML" && ue !== "children" && ue !== "suppressContentEditableWarning" && ue !== "suppressHydrationWarning" && ue !== "autoFocus" && (a.hasOwnProperty(ue) ? F || (F = []) : (F = F || []).push(ue, null)); + for (ue in g) { + var re = g[ue]; + if (J = b == null ? void 0 : b[ue], g.hasOwnProperty(ue) && re !== J && (re != null || J != null)) if (ue === "style") if (J) { for (H in J) !J.hasOwnProperty(H) || re && re.hasOwnProperty(H) || (d || (d = {}), d[H] = ""); for (H in re) re.hasOwnProperty(H) && J[H] !== re[H] && (d || (d = {}), d[H] = re[H]); - } else d || (F || (F = []), F.push(xe, d)), d = re; - else xe === "dangerouslySetInnerHTML" ? (re = re ? re.__html : void 0, J = J ? J.__html : void 0, re != null && J !== re && (F = F || []).push(xe, re)) : xe === "children" ? typeof re != "string" && typeof re != "number" || (F = F || []).push(xe, "" + re) : xe !== "suppressContentEditableWarning" && xe !== "suppressHydrationWarning" && (a.hasOwnProperty(xe) ? (re != null && xe === "onScroll" && vt("scroll", o), F || J === re || (F = [])) : (F = F || []).push(xe, re)); + } else d || (F || (F = []), F.push(ue, d)), d = re; + else ue === "dangerouslySetInnerHTML" ? (re = re ? re.__html : void 0, J = J ? J.__html : void 0, re != null && J !== re && (F = F || []).push(ue, re)) : ue === "children" ? typeof re != "string" && typeof re != "number" || (F = F || []).push(ue, "" + re) : ue !== "suppressContentEditableWarning" && ue !== "suppressHydrationWarning" && (a.hasOwnProperty(ue) ? (re != null && ue === "onScroll" && vt("scroll", o), F || J === re || (F = [])) : (F = F || []).push(ue, re)); } d && (F = F || []).push("style", d); - var xe = F; - (s.updateQueue = xe) && (s.flags |= 4); + var ue = F; + (s.updateQueue = ue) && (s.flags |= 4); } }, M2 = function(o, s, d, g) { d !== g && (s.flags |= 4); @@ -5323,7 +5323,7 @@ Error generating stack: ` + F.message + ` case "select": o._wrapperState = { wasMultiple: !!g.multiple - }, b = G({}, g, { + }, b = V({}, g, { value: void 0 }), vt("invalid", o); break; @@ -5336,7 +5336,7 @@ Error generating stack: ` + F.message + ` Ze(d, b), J = b; for (F in J) if (J.hasOwnProperty(F)) { var re = J[F]; - F === "style" ? qe(o, re) : F === "dangerouslySetInnerHTML" ? (re = re ? re.__html : void 0, re != null && z(o, re)) : F === "children" ? typeof re == "string" ? (d !== "textarea" || re !== "") && Z(o, re) : typeof re == "number" && Z(o, "" + re) : F !== "suppressContentEditableWarning" && F !== "suppressHydrationWarning" && F !== "autoFocus" && (a.hasOwnProperty(F) ? re != null && F === "onScroll" && vt("scroll", o) : re != null && k(o, F, re, H)); + F === "style" ? qe(o, re) : F === "dangerouslySetInnerHTML" ? (re = re ? re.__html : void 0, re != null && j(o, re)) : F === "children" ? typeof re == "string" ? (d !== "textarea" || re !== "") && Z(o, re) : typeof re == "number" && Z(o, "" + re) : F !== "suppressContentEditableWarning" && F !== "suppressHydrationWarning" && F !== "autoFocus" && (a.hasOwnProperty(F) ? re != null && F === "onScroll" && vt("scroll", o) : re != null && k(o, F, re, H)); } switch (d) { case "input": @@ -5508,12 +5508,12 @@ Error generating stack: ` + F.message + ` d = null; break e; } - var H = 0, J = -1, re = -1, xe = 0, ye = 0, Ae = o, me = null; + var H = 0, J = -1, re = -1, ue = 0, ye = 0, Ae = o, me = null; t: for (; ; ) { for (var De; Ae !== d || b !== 0 && Ae.nodeType !== 3 || (J = H + b), Ae !== F || g !== 0 && Ae.nodeType !== 3 || (re = H + g), Ae.nodeType === 3 && (H += Ae.nodeValue.length), (De = Ae.firstChild) !== null; ) me = Ae, Ae = De; for (; ; ) { if (Ae === o) break t; - if (me === d && ++xe === b && (J = H), me === F && ++ye === g && (re = H), (De = Ae.nextSibling) !== null) break; + if (me === d && ++ue === b && (J = H), me === F && ++ye === g && (re = H), (De = Ae.nextSibling) !== null) break; Ae = me, me = Ae.parentNode; } Ae = De; @@ -5728,8 +5728,8 @@ Error generating stack: ` + F.message + ` q2(F, H, b), or = null, zn = false; var re = b.alternate; re !== null && (re.return = null), b.return = null; - } catch (xe) { - jt(b, s, xe); + } catch (ue) { + jt(b, s, ue); } } if (s.subtreeFlags & 12854) for (s = s.child; s !== null; ) V2(s, o), s = s.sibling; @@ -5770,10 +5770,10 @@ Error generating stack: ` + F.message + ` var F = o.memoizedProps, H = d !== null ? d.memoizedProps : F, J = o.type, re = o.updateQueue; if (o.updateQueue = null, re !== null) try { J === "input" && F.type === "radio" && F.name != null && ke(b, F), We(J, H); - var xe = We(J, F); + var ue = We(J, F); for (H = 0; H < re.length; H += 2) { var ye = re[H], Ae = re[H + 1]; - ye === "style" ? qe(b, Ae) : ye === "dangerouslySetInnerHTML" ? z(b, Ae) : ye === "children" ? Z(b, Ae) : k(b, ye, Ae, xe); + ye === "style" ? qe(b, Ae) : ye === "dangerouslySetInnerHTML" ? j(b, Ae) : ye === "children" ? Z(b, Ae) : k(b, ye, Ae, ue); } switch (J) { case "input": @@ -5819,8 +5819,8 @@ Error generating stack: ` + F.message + ` Un(s, o), Yn(o), b = o.child, b.flags & 8192 && (F = b.memoizedState !== null, b.stateNode.isHidden = F, !F || b.alternate !== null && b.alternate.memoizedState !== null || (h1 = xt())), g & 4 && G2(o); break; case 22: - if (ye = d !== null && d.memoizedState !== null, o.mode & 1 ? (gr = (xe = gr) || ye, Un(s, o), gr = xe) : Un(s, o), Yn(o), g & 8192) { - if (xe = o.memoizedState !== null, (o.stateNode.isHidden = xe) && !ye && (o.mode & 1) !== 0) for (Fe = o, ye = o.child; ye !== null; ) { + if (ye = d !== null && d.memoizedState !== null, o.mode & 1 ? (gr = (ue = gr) || ye, Un(s, o), gr = ue) : Un(s, o), Yn(o), g & 8192) { + if (ue = o.memoizedState !== null, (o.stateNode.isHidden = ue) && !ye && (o.mode & 1) !== 0) for (Fe = o, ye = o.child; ye !== null; ) { for (Ae = Fe = ye; Fe !== null; ) { switch (me = Fe, De = me.child, me.tag) { case 0: @@ -5859,14 +5859,14 @@ Error generating stack: ` + F.message + ` if (ye === null) { ye = Ae; try { - b = Ae.stateNode, xe ? (F = b.style, typeof F.setProperty == "function" ? F.setProperty("display", "none", "important") : F.display = "none") : (J = Ae.stateNode, re = Ae.memoizedProps.style, H = re != null && re.hasOwnProperty("display") ? re.display : null, J.style.display = pe("display", H)); + b = Ae.stateNode, ue ? (F = b.style, typeof F.setProperty == "function" ? F.setProperty("display", "none", "important") : F.display = "none") : (J = Ae.stateNode, re = Ae.memoizedProps.style, H = re != null && re.hasOwnProperty("display") ? re.display : null, J.style.display = pe("display", H)); } catch (_e) { jt(o, o.return, _e); } } } else if (Ae.tag === 6) { if (ye === null) try { - Ae.stateNode.nodeValue = xe ? "" : Ae.memoizedProps; + Ae.stateNode.nodeValue = ue ? "" : Ae.memoizedProps; } catch (_e) { jt(o, o.return, _e); } @@ -5939,10 +5939,10 @@ Error generating stack: ` + F.message + ` if (!H) { var J = b.alternate, re = J !== null && J.memoizedState !== null || gr; J = vu; - var xe = gr; - if (vu = H, (gr = re) && !xe) for (Fe = b; Fe !== null; ) H = Fe, re = H.child, H.tag === 22 && H.memoizedState !== null ? Y2(b) : re !== null ? (re.return = H, Fe = re) : Y2(b); + var ue = gr; + if (vu = H, (gr = re) && !ue) for (Fe = b; Fe !== null; ) H = Fe, re = H.child, H.tag === 22 && H.memoizedState !== null ? Y2(b) : re !== null ? (re.return = H, Fe = re) : Y2(b); for (; F !== null; ) Fe = F, W2(F), F = F.sibling; - Fe = b, vu = J, gr = xe; + Fe = b, vu = J, gr = ue; } $2(o); } else (b.subtreeFlags & 8772) !== 0 && F !== null ? (F.return = b, Fe = F) : $2(o); @@ -6008,9 +6008,9 @@ Error generating stack: ` + F.message + ` break; case 13: if (s.memoizedState === null) { - var xe = s.alternate; - if (xe !== null) { - var ye = xe.memoizedState; + var ue = s.alternate; + if (ue !== null) { + var ye = ue.memoizedState; if (ye !== null) { var Ae = ye.dehydrated; Ae !== null && Ns(Ae); @@ -6366,14 +6366,14 @@ Error generating stack: ` + F.message + ` e: { var F = o, H = d.return, J = d, re = s; if (s = ir, J.flags |= 32768, re !== null && typeof re == "object" && typeof re.then == "function") { - var xe = re, ye = J, Ae = ye.tag; + var ue = re, ye = J, Ae = ye.tag; if ((ye.mode & 1) === 0 && (Ae === 0 || Ae === 11 || Ae === 15)) { var me = ye.alternate; me ? (ye.updateQueue = me.updateQueue, ye.memoizedState = me.memoizedState, ye.lanes = me.lanes) : (ye.updateQueue = null, ye.memoizedState = null); } var De = C2(H); if (De !== null) { - De.flags &= -257, k2(De, H, J, F, s), De.mode & 1 && B2(F, xe, s), s = De, re = xe; + De.flags &= -257, k2(De, H, J, F, s), De.mode & 1 && B2(F, ue, s), s = De, re = ue; var Se = s.updateQueue; if (Se === null) { var _e = /* @__PURE__ */ new Set(); @@ -6382,7 +6382,7 @@ Error generating stack: ` + F.message + ` break e; } else { if ((s & 1) === 0) { - B2(F, xe, s), b1(); + B2(F, ue, s), b1(); break e; } re = Error(r(426)); @@ -6536,8 +6536,8 @@ Error generating stack: ` + F.message + ` var J = F.deletions; if (J !== null) { for (var re = 0; re < J.length; re++) { - var xe = J[re]; - for (Fe = xe; Fe !== null; ) { + var ue = J[re]; + for (Fe = ue; Fe !== null; ) { var ye = Fe; switch (ye.tag) { case 0: @@ -6550,7 +6550,7 @@ Error generating stack: ` + F.message + ` else for (; Fe !== null; ) { ye = Fe; var me = ye.sibling, De = ye.return; - if (O2(ye), ye === xe) { + if (O2(ye), ye === ue) { Fe = null; break; } @@ -6779,11 +6779,11 @@ Error generating stack: ` + F.message + ` if (re.context === g) { if (F.tag === 1) { re = _a(-1, d & -d), re.tag = 2; - var xe = F.updateQueue; - if (xe !== null) { - xe = xe.shared; - var ye = xe.pending; - ye === null ? re.next = re : (re.next = ye.next, ye.next = re), xe.pending = re; + var ue = F.updateQueue; + if (ue !== null) { + ue = ue.shared; + var ye = ue.pending; + ye === null ? re.next = re : (re.next = ye.next, ye.next = re), ue.pending = re; } } F.lanes |= d, re = F.alternate, re !== null && (re.lanes |= d), Uf(F.return, d, s), J.lanes |= d; @@ -6875,7 +6875,7 @@ Error generating stack: ` + F.message + ` return ju(d, b, F, s); default: if (typeof o == "object" && o !== null) switch (o.$$typeof) { - case j: + case z: H = 10; break e; case I: @@ -7040,8 +7040,8 @@ Error generating stack: ` + F.message + ` if (typeof g == "function") { var F = g; g = function() { - var xe = Uu(H); - F.call(xe); + var ue = Uu(H); + F.call(ue); }; } var H = cp(s, g, o, 0, null, false, false, "", dp); @@ -7051,8 +7051,8 @@ Error generating stack: ` + F.message + ` if (typeof g == "function") { var J = g; g = function() { - var xe = Uu(re); - J.call(xe); + var ue = Uu(re); + J.call(ue); }; } var re = C1(o, 0, false, null, null, false, false, "", dp); @@ -7173,7 +7173,7 @@ Error generating stack: ` + F.message + ` scheduleUpdate: null, currentDispatcherRef: w.ReactCurrentDispatcher, findHostInstanceByFiber: function(o) { - return o = Ke(o), o === null ? null : o.stateNode; + return o = Te(o), o === null ? null : o.stateNode; }, findFiberByHostInstance: ol.findFiberByHostInstance || qA, findHostInstancesForRefresh: null, @@ -7203,7 +7203,7 @@ Error generating stack: ` + F.message + ` if (o.nodeType === 1) return o; var s = o._reactInternals; if (s === void 0) throw typeof o.render == "function" ? Error(r(188)) : (o = Object.keys(o).join(","), Error(r(268, o))); - return o = Ke(s), o = o === null ? null : o.stateNode, o; + return o = Te(s), o = o === null ? null : o.stateNode, o; }, Tr.flushSync = function(o) { return yi(o); }, Tr.hydrate = function(o, s, d) { @@ -9346,14 +9346,14 @@ Make sure your charset is UTF-8`); for (let T = 0; T < D.length; T++) { const N = D[T], U = []; for (let C = 0; C < N.length; C++) { - const j = N[C], I = "" + T + C; + const z = N[C], I = "" + T + C; U.push(I), k[I] = { - node: j, + node: z, lastCount: 0 }, w[I] = {}; for (let R = 0; R < _.length; R++) { const L = _[R]; - k[L] && k[L].node.mode === j.mode ? (w[L][I] = p(k[L].lastCount + j.length, j.mode) - p(k[L].lastCount, j.mode), k[L].lastCount += j.length) : (k[L] && (k[L].lastCount = j.length), w[L][I] = p(j.length, j.mode) + 4 + t.getCharCountIndicator(j.mode, P)); + k[L] && k[L].node.mode === z.mode ? (w[L][I] = p(k[L].lastCount + z.length, z.mode) - p(k[L].lastCount, z.mode), k[L].lastCount += z.length) : (k[L] && (k[L].lastCount = z.length), w[L][I] = p(z.length, z.mode) + 4 + t.getCharCountIndicator(z.mode, P)); } } _ = U; @@ -9400,8 +9400,8 @@ Make sure your charset is UTF-8`); const e = Zi(), t = a9(), r = Fb(), n = Sb(), a = _b(), i = Ib(), l = Pb(), c = pg(), u = zb(), x = Ub(), f = Tb(), h = Yi(), p = Hb(); function m(T, N) { const U = T.size, C = i.getPositions(N); - for (let j = 0; j < C.length; j++) { - const I = C[j][0], R = C[j][1]; + for (let z = 0; z < C.length; z++) { + const I = C[z][0], R = C[z][1]; for (let L = -1; L <= 7; L++) if (!(I + L <= -1 || U <= I + L)) for (let O = -1; O <= 7; O++) R + O <= -1 || U <= R + O || (L >= 0 && L <= 6 && (O === 0 || O === 6) || O >= 0 && O <= 6 && (L === 0 || L === 6) || L >= 2 && L <= 4 && O >= 2 && O <= 4 ? T.set(I + L, R + O, true, true) : T.set(I + L, R + O, false, true)); } } @@ -9415,31 +9415,31 @@ Make sure your charset is UTF-8`); function B(T, N) { const U = a.getPositions(N); for (let C = 0; C < U.length; C++) { - const j = U[C][0], I = U[C][1]; - for (let R = -2; R <= 2; R++) for (let L = -2; L <= 2; L++) R === -2 || R === 2 || L === -2 || L === 2 || R === 0 && L === 0 ? T.set(j + R, I + L, true, true) : T.set(j + R, I + L, false, true); + const z = U[C][0], I = U[C][1]; + for (let R = -2; R <= 2; R++) for (let L = -2; L <= 2; L++) R === -2 || R === 2 || L === -2 || L === 2 || R === 0 && L === 0 ? T.set(z + R, I + L, true, true) : T.set(z + R, I + L, false, true); } } function v(T, N) { const U = T.size, C = x.getEncodedBits(N); - let j, I, R; - for (let L = 0; L < 18; L++) j = Math.floor(L / 3), I = L % 3 + U - 8 - 3, R = (C >> L & 1) === 1, T.set(j, I, R, true), T.set(I, j, R, true); + let z, I, R; + for (let L = 0; L < 18; L++) z = Math.floor(L / 3), I = L % 3 + U - 8 - 3, R = (C >> L & 1) === 1, T.set(z, I, R, true), T.set(I, z, R, true); } function D(T, N, U) { - const C = T.size, j = f.getEncodedBits(N, U); + const C = T.size, z = f.getEncodedBits(N, U); let I, R; - for (I = 0; I < 15; I++) R = (j >> I & 1) === 1, I < 6 ? T.set(I, 8, R, true) : I < 8 ? T.set(I + 1, 8, R, true) : T.set(C - 15 + I, 8, R, true), I < 8 ? T.set(8, C - I - 1, R, true) : I < 9 ? T.set(8, 15 - I - 1 + 1, R, true) : T.set(8, 15 - I - 1, R, true); + for (I = 0; I < 15; I++) R = (z >> I & 1) === 1, I < 6 ? T.set(I, 8, R, true) : I < 8 ? T.set(I + 1, 8, R, true) : T.set(C - 15 + I, 8, R, true), I < 8 ? T.set(8, C - I - 1, R, true) : I < 9 ? T.set(8, 15 - I - 1 + 1, R, true) : T.set(8, 15 - I - 1, R, true); T.set(C - 8, 8, 1, true); } function P(T, N) { const U = T.size; - let C = -1, j = U - 1, I = 7, R = 0; + let C = -1, z = U - 1, I = 7, R = 0; for (let L = U - 1; L > 0; L -= 2) for (L === 6 && L--; ; ) { - for (let O = 0; O < 2; O++) if (!T.isReserved(j, L - O)) { + for (let O = 0; O < 2; O++) if (!T.isReserved(z, L - O)) { let W = false; - R < N.length && (W = (N[R] >>> I & 1) === 1), T.set(j, L - O, W), I--, I === -1 && (R++, I = 7); + R < N.length && (W = (N[R] >>> I & 1) === 1), T.set(z, L - O, W), I--, I === -1 && (R++, I = 7); } - if (j += C, j < 0 || U <= j) { - j -= C, C = -C; + if (z += C, z < 0 || U <= z) { + z -= C, C = -C; break; } } @@ -9449,59 +9449,59 @@ Make sure your charset is UTF-8`); U.forEach(function(O) { C.put(O.mode.bit, 4), C.put(O.getLength(), h.getCharCountIndicator(O.mode, T)), O.write(C); }); - const j = e.getSymbolTotalCodewords(T), I = c.getTotalCodewordsCount(T, N), R = (j - I) * 8; + const z = e.getSymbolTotalCodewords(T), I = c.getTotalCodewordsCount(T, N), R = (z - I) * 8; for (C.getLengthInBits() + 4 <= R && C.put(0, 4); C.getLengthInBits() % 8 !== 0; ) C.putBit(0); const L = (R - C.getLengthInBits()) / 8; for (let O = 0; O < L; O++) C.put(O % 2 ? 17 : 236, 8); return w(C, T, N); } function w(T, N, U) { - const C = e.getSymbolTotalCodewords(N), j = c.getTotalCodewordsCount(N, U), I = C - j, R = c.getBlocksCount(N, U), L = C % R, O = R - L, W = Math.floor(C / R), $ = Math.floor(I / R), X = $ + 1, Y = W - $, Q = new u(Y); - let G = 0; - const K = new Array(R), V = new Array(R); + const C = e.getSymbolTotalCodewords(N), z = c.getTotalCodewordsCount(N, U), I = C - z, R = c.getBlocksCount(N, U), L = C % R, O = R - L, W = Math.floor(C / R), $ = Math.floor(I / R), X = $ + 1, Y = W - $, Q = new u(Y); + let V = 0; + const M = new Array(R), G = new Array(R); let ee = 0; const te = new Uint8Array(T.buffer); for (let he = 0; he < R; he++) { const be = he < O ? $ : X; - K[he] = te.slice(G, G + be), V[he] = Q.encode(K[he]), G += be, ee = Math.max(ee, be); + M[he] = te.slice(V, V + be), G[he] = Q.encode(M[he]), V += be, ee = Math.max(ee, be); } const oe = new Uint8Array(C); - let ie = 0, ce, de; - for (ce = 0; ce < ee; ce++) for (de = 0; de < R; de++) ce < K[de].length && (oe[ie++] = K[de][ce]); - for (ce = 0; ce < Y; ce++) for (de = 0; de < R; de++) oe[ie++] = V[de][ce]; + let ie = 0, xe, de; + for (xe = 0; xe < ee; xe++) for (de = 0; de < R; de++) xe < M[de].length && (oe[ie++] = M[de][xe]); + for (xe = 0; xe < Y; xe++) for (de = 0; de < R; de++) oe[ie++] = G[de][xe]; return oe; } function _(T, N, U, C) { - let j; - if (Array.isArray(T)) j = p.fromArray(T); + let z; + if (Array.isArray(T)) z = p.fromArray(T); else if (typeof T == "string") { let W = N; if (!W) { const $ = p.rawSplit(T); W = x.getBestVersionForData($, U); } - j = p.fromString(T, W || 40); + z = p.fromString(T, W || 40); } else throw new Error("Invalid data"); - const I = x.getBestVersionForData(j, U); + const I = x.getBestVersionForData(z, U); if (!I) throw new Error("The amount of data is too big to be stored in a QR Code"); if (!N) N = I; else if (N < I) throw new Error(` The chosen QR Code version cannot contain this amount of data. Minimum version required to store current data is: ` + I + `. `); - const R = k(N, U, j), L = e.getSymbolSize(N), O = new n(L); + const R = k(N, U, z), L = e.getSymbolSize(N), O = new n(L); return m(O, N), y(O), B(O, N), D(O, U, 0), N >= 7 && v(O, N), P(O, R), isNaN(C) && (C = l.getBestMask(O, D.bind(null, O, U))), l.applyMask(C, O), D(O, U, C), { modules: O, version: N, errorCorrectionLevel: U, maskPattern: C, - segments: j + segments: z }; } return U1.create = function(N, U) { if (typeof N > "u" || N === "") throw new Error("No input text"); - let C = t.M, j, I; - return typeof U < "u" && (C = t.from(U.errorCorrectionLevel, t.M), j = x.from(U.version), I = l.from(U.maskPattern), U.toSJISFunc && e.setToSJISFunction(U.toSJISFunc)), _(N, j, C, I); + let C = t.M, z, I; + return typeof U < "u" && (C = t.from(U.errorCorrectionLevel, t.M), z = x.from(U.version), I = l.from(U.maskPattern), U.toSJISFunc && e.setToSJISFunction(U.toSJISFunc)), _(N, z, C, I); }, U1; } var th = {}, rh = {}, Xp; @@ -9965,11 +9965,11 @@ Minimum version required to store current data is: ` + I + `. B.set(v, D, 0.2126 * P + 0.7152 * k + 0.0722 * w); } for (var _ = Math.ceil(p / l), T = Math.ceil(m / l), N = new x(_, T), U = 0; U < T; U++) for (var C = 0; C < _; C++) { - for (var j = 0, I = 1 / 0, R = 0, D = 0; D < l; D++) for (var v = 0; v < l; v++) { + for (var z = 0, I = 1 / 0, R = 0, D = 0; D < l; D++) for (var v = 0; v < l; v++) { var L = B.get(C * l + v, U * l + D); - j += L, I = Math.min(I, L), R = Math.max(R, L); + z += L, I = Math.min(I, L), R = Math.max(R, L); } - var O = j / Math.pow(l, 2); + var O = z / Math.pow(l, 2); if (R - I <= c && (O = I / 2, U > 0 && C > 0)) { var W = (N.get(C, U - 1) + 2 * N.get(C - 1, U) + N.get(C - 1, U - 1)) / 4; I < W && (O = W); @@ -9979,10 +9979,10 @@ Minimum version required to store current data is: ` + I + `. var $ = i.BitMatrix.createEmpty(p, m), X = null; y && (X = i.BitMatrix.createEmpty(p, m)); for (var U = 0; U < T; U++) for (var C = 0; C < _; C++) { - for (var Y = u(C, 2, _ - 3), Q = u(U, 2, T - 3), j = 0, G = -2; G <= 2; G++) for (var K = -2; K <= 2; K++) j += N.get(Y + G, Q + K); - for (var V = j / 25, G = 0; G < l; G++) for (var K = 0; K < l; K++) { - var v = C * l + G, D = U * l + K, ee = B.get(v, D); - $.set(v, D, ee <= V), y && X.set(v, D, !(ee <= V)); + for (var Y = u(C, 2, _ - 3), Q = u(U, 2, T - 3), z = 0, V = -2; V <= 2; V++) for (var M = -2; M <= 2; M++) z += N.get(Y + V, Q + M); + for (var G = z / 25, V = 0; V < l; V++) for (var M = 0; M < l; M++) { + var v = C * l + V, D = U * l + M, ee = B.get(v, D); + $.set(v, D, ee <= G), y && X.set(v, D, !(ee <= G)); } } return y ? { @@ -10260,14 +10260,14 @@ Minimum version required to store current data is: ` + I + `. function m(w) { var _ = 17 + 4 * w.versionNumber, T = i.BitMatrix.createEmpty(_, _); T.setRegion(0, 0, 9, 9, true), T.setRegion(_ - 8, 0, 8, 9, true), T.setRegion(0, _ - 8, 9, 8, true); - for (var N = 0, U = w.alignmentPatternCenters; N < U.length; N++) for (var C = U[N], j = 0, I = w.alignmentPatternCenters; j < I.length; j++) { - var R = I[j]; + for (var N = 0, U = w.alignmentPatternCenters; N < U.length; N++) for (var C = U[N], z = 0, I = w.alignmentPatternCenters; z < I.length; z++) { + var R = I[z]; C === 6 && R === 6 || C === 6 && R === _ - 7 || C === _ - 7 && R === 6 || T.setRegion(C - 2, R - 2, 5, 5, true); } return T.setRegion(6, 9, 1, _ - 17, true), T.setRegion(9, 6, _ - 17, 1, true), w.versionNumber > 6 && (T.setRegion(_ - 11, 0, 3, 6, true), T.setRegion(0, _ - 11, 6, 3, true)), T; } function y(w, _, T) { - for (var N = p[T.dataMask], U = w.height, C = m(_), j = [], I = 0, R = 0, L = true, O = U - 1; O > 0; O -= 2) { + for (var N = p[T.dataMask], U = w.height, C = m(_), z = [], I = 0, R = 0, L = true, O = U - 1; O > 0; O -= 2) { O === 6 && O--; for (var W = 0; W < U; W++) for (var $ = L ? U - 1 - W : W, X = 0; X < 2; X++) { var Y = O - X; @@ -10277,23 +10277,23 @@ Minimum version required to store current data is: ` + I + `. N({ y: $, x: Y - }) && (Q = !Q), I = f(Q, I), R === 8 && (j.push(I), R = 0, I = 0); + }) && (Q = !Q), I = f(Q, I), R === 8 && (z.push(I), R = 0, I = 0); } } L = !L; } - return j; + return z; } function B(w) { var _ = w.height, T = Math.floor((_ - 17) / 4); if (T <= 6) return u.VERSIONS[T - 1]; for (var N = 0, U = 5; U >= 0; U--) for (var C = _ - 9; C >= _ - 11; C--) N = f(w.get(C, U), N); - for (var j = 0, C = 5; C >= 0; C--) for (var U = _ - 9; U >= _ - 11; U--) j = f(w.get(C, U), j); + for (var z = 0, C = 5; C >= 0; C--) for (var U = _ - 9; U >= _ - 11; U--) z = f(w.get(C, U), z); for (var I = 1 / 0, R, L = 0, O = u.VERSIONS; L < O.length; L++) { var W = O[L]; - if (W.infoBits === N || W.infoBits === j) return W; + if (W.infoBits === N || W.infoBits === z) return W; var $ = x(N, W.infoBits); - $ < I && (R = W, I = $), $ = x(j, W.infoBits), $ < I && (R = W, I = $); + $ < I && (R = W, I = $), $ = x(z, W.infoBits), $ < I && (R = W, I = $); } if (I <= 3) return R; } @@ -10302,24 +10302,24 @@ Minimum version required to store current data is: ` + I + `. for (var N = 7; N >= 0; N--) N !== 6 && (_ = f(w.get(8, N), _)); for (var U = w.height, C = 0, N = U - 1; N >= U - 7; N--) C = f(w.get(8, N), C); for (var T = U - 8; T < U; T++) C = f(w.get(T, 8), C); - for (var j = 1 / 0, I = null, R = 0, L = h; R < L.length; R++) { + for (var z = 1 / 0, I = null, R = 0, L = h; R < L.length; R++) { var O = L[R], W = O.bits, $ = O.formatInfo; if (W === _ || W === C) return $; var X = x(_, W); - X < j && (I = $, j = X), _ !== C && (X = x(C, W), X < j && (I = $, j = X)); + X < z && (I = $, z = X), _ !== C && (X = x(C, W), X < z && (I = $, z = X)); } - return j <= 3 ? I : null; + return z <= 3 ? I : null; } function D(w, _, T) { var N = _.errorCorrectionLevels[T], U = [], C = 0; if (N.ecBlocks.forEach(function(Q) { - for (var G = 0; G < Q.numBlocks; G++) U.push({ + for (var V = 0; V < Q.numBlocks; V++) U.push({ numDataCodewords: Q.dataCodewordsPerBlock, codewords: [] }), C += Q.dataCodewordsPerBlock + N.ecCodewordsPerBlock; }), w.length < C) return null; w = w.slice(0, C); - for (var j = N.ecBlocks[0].dataCodewordsPerBlock, I = 0; I < j; I++) for (var R = 0, L = U; R < L.length; R++) { + for (var z = N.ecBlocks[0].dataCodewordsPerBlock, I = 0; I < z; I++) for (var R = 0, L = U; R < L.length; R++) { var O = L[R]; O.codewords.push(w.shift()); } @@ -10339,13 +10339,13 @@ Minimum version required to store current data is: ` + I + `. if (!U) return null; for (var C = U.reduce(function(X, Y) { return X + Y.numDataCodewords; - }, 0), j = new Uint8ClampedArray(C), I = 0, R = 0, L = U; R < L.length; R++) { + }, 0), z = new Uint8ClampedArray(C), I = 0, R = 0, L = U; R < L.length; R++) { var O = L[R], W = c.decode(O.codewords, O.codewords.length - O.numDataCodewords); if (!W) return null; - for (var $ = 0; $ < O.numDataCodewords; $++) j[I++] = W[$]; + for (var $ = 0; $ < O.numDataCodewords; $++) z[I++] = W[$]; } try { - return l.decode(j, _.versionNumber); + return l.decode(z, _.versionNumber); } catch { return null; } @@ -10525,10 +10525,10 @@ Minimum version required to store current data is: ` + I + `. text: C.text }); } else if (U === u.Alphanumeric) { - var j = h(_, T); - N.text += j.text, (P = N.bytes).push.apply(P, j.bytes), N.chunks.push({ + var z = h(_, T); + N.text += z.text, (P = N.bytes).push.apply(P, z.bytes), N.chunks.push({ type: c.Alphanumeric, - text: j.text + text: z.text }); } else if (U === u.Byte) { var I = p(_, T); @@ -17638,8 +17638,8 @@ Minimum version required to store current data is: ` + I + `. if (v = D, P = k, v.isZero()) return null; D = w; for (var T = h.zero, N = v.getCoefficient(v.degree()), U = h.inverse(N); D.degree() >= v.degree() && !D.isZero(); ) { - var C = D.degree() - v.degree(), j = h.multiply(D.getCoefficient(D.degree()), U); - T = T.addOrSubtract(h.buildMonomial(C, j)), D = D.addOrSubtract(v.multiplyByMonomial(C, j)); + var C = D.degree() - v.degree(), z = h.multiply(D.getCoefficient(D.degree()), U); + T = T.addOrSubtract(h.buildMonomial(C, z)), D = D.addOrSubtract(v.multiplyByMonomial(C, z)); } if (k = T.multiplyPoly(P).addOrSubtract(_), D.degree() >= v.degree()) return null; } @@ -20243,12 +20243,12 @@ Minimum version required to store current data is: ` + I + `. }); } function f(k, w, _) { - var T, N, U, C, j = u(k, w), I = u(w, _), R = u(k, _), L, O, W; - return I >= j && I >= R ? (T = [ + var T, N, U, C, z = u(k, w), I = u(w, _), R = u(k, _), L, O, W; + return I >= z && I >= R ? (T = [ w, k, _ - ], L = T[0], O = T[1], W = T[2]) : R >= I && R >= j ? (N = [ + ], L = T[0], O = T[1], W = T[2]) : R >= I && R >= z ? (N = [ k, w, _ @@ -20268,17 +20268,17 @@ Minimum version required to store current data is: ` + I + `. function h(k, w, _, T) { var N = (x(m(k, _, T, 5)) / 7 + x(m(k, w, T, 5)) / 7 + x(m(_, k, T, 5)) / 7 + x(m(w, k, T, 5)) / 7) / 4; if (N < 1) throw new Error("Invalid module size"); - var U = Math.round(u(k, w) / N), C = Math.round(u(k, _) / N), j = Math.floor((U + C) / 2) + 7; - switch (j % 4) { + var U = Math.round(u(k, w) / N), C = Math.round(u(k, _) / N), z = Math.floor((U + C) / 2) + 7; + switch (z % 4) { case 0: - j++; + z++; break; case 2: - j--; + z--; break; } return { - dimension: j, + dimension: z, moduleSize: N }; } @@ -20288,28 +20288,28 @@ Minimum version required to store current data is: ` + I + `. x: Math.floor(k.x), y: Math.floor(k.y) } - ], U = Math.abs(w.y - k.y) > Math.abs(w.x - k.x), C, j, I, R; - U ? (C = Math.floor(k.y), j = Math.floor(k.x), I = Math.floor(w.y), R = Math.floor(w.x)) : (C = Math.floor(k.x), j = Math.floor(k.y), I = Math.floor(w.x), R = Math.floor(w.y)); - for (var L = Math.abs(I - C), O = Math.abs(R - j), W = Math.floor(-L / 2), $ = C < I ? 1 : -1, X = j < R ? 1 : -1, Y = true, Q = C, G = j; Q !== I + $; Q += $) { - var K = U ? G : Q, V = U ? Q : G; - if (_.get(K, V) !== Y && (Y = !Y, N.push({ - x: K, - y: V + ], U = Math.abs(w.y - k.y) > Math.abs(w.x - k.x), C, z, I, R; + U ? (C = Math.floor(k.y), z = Math.floor(k.x), I = Math.floor(w.y), R = Math.floor(w.x)) : (C = Math.floor(k.x), z = Math.floor(k.y), I = Math.floor(w.x), R = Math.floor(w.y)); + for (var L = Math.abs(I - C), O = Math.abs(R - z), W = Math.floor(-L / 2), $ = C < I ? 1 : -1, X = z < R ? 1 : -1, Y = true, Q = C, V = z; Q !== I + $; Q += $) { + var M = U ? V : Q, G = U ? Q : V; + if (_.get(M, G) !== Y && (Y = !Y, N.push({ + x: M, + y: G }), N.length === T + 1)) break; if (W += O, W > 0) { - if (G === R) break; - G += X, W -= L; + if (V === R) break; + V += X, W -= L; } } for (var ee = [], te = 0; te < T; te++) N[te] && N[te + 1] ? ee.push(u(N[te], N[te + 1])) : ee.push(0); return ee; } function m(k, w, _, T) { - var N, U = w.y - k.y, C = w.x - k.x, j = p(k, w, _, Math.ceil(T / 2)), I = p(k, { + var N, U = w.y - k.y, C = w.x - k.x, z = p(k, w, _, Math.ceil(T / 2)), I = p(k, { x: k.x - C, y: k.y - U - }, _, Math.ceil(T / 2)), R = j.shift() + I.shift() - 1; - return (N = I.concat(R)).concat.apply(N, j); + }, _, Math.ceil(T / 2)), R = z.shift() + I.shift() - 1; + return (N = I.concat(R)).concat.apply(N, z); } function y(k, w) { var _ = x(k) / x(w), T = 0; @@ -20331,10 +20331,10 @@ Minimum version required to store current data is: ` + I + `. }, _, w.length), U = { x: Math.max(0, k.x - k.y) - 1, y: Math.max(0, k.y - k.x) - 1 - }, C = m(k, U, _, w.length), j = { + }, C = m(k, U, _, w.length), z = { x: Math.min(_.width, k.x + k.y) + 1, y: Math.min(_.height, k.y + k.x) + 1 - }, I = m(k, j, _, w.length), R = y(T, w), L = y(N, w), O = y(C, w), W = y(I, w), $ = Math.sqrt(R.error * R.error + L.error * L.error + O.error * O.error + W.error * W.error), X = (R.averageSize + L.averageSize + O.averageSize + W.averageSize) / 4, Y = (Math.pow(R.averageSize - X, 2) + Math.pow(L.averageSize - X, 2) + Math.pow(O.averageSize - X, 2) + Math.pow(W.averageSize - X, 2)) / X; + }, I = m(k, z, _, w.length), R = y(T, w), L = y(N, w), O = y(C, w), W = y(I, w), $ = Math.sqrt(R.error * R.error + L.error * L.error + O.error * O.error + W.error * W.error), X = (R.averageSize + L.averageSize + O.averageSize + W.averageSize) / 4, Y = (Math.pow(R.averageSize - X, 2) + Math.pow(L.averageSize - X, 2) + Math.pow(O.averageSize - X, 2) + Math.pow(W.averageSize - X, 2)) / X; return $ + Y; } catch { return 1 / 0; @@ -20345,39 +20345,39 @@ Minimum version required to store current data is: ` + I + `. for (var T = Math.round(w.x); k.get(T, Math.round(w.y)); ) T++; for (var N = (_ + T) / 2, U = Math.round(w.y); k.get(Math.round(N), U); ) U--; for (var C = Math.round(w.y); k.get(Math.round(N), C); ) C++; - var j = (U + C) / 2; + var z = (U + C) / 2; return { x: N, - y: j + y: z }; } function D(k) { - for (var w = [], _ = [], T = [], N = [], U = function(K) { - for (var V = 0, ee = false, te = [ + for (var w = [], _ = [], T = [], N = [], U = function(M) { + for (var G = 0, ee = false, te = [ 0, 0, 0, 0, 0 - ], oe = function(ce) { - var de = k.get(ce, K); - if (de === ee) V++; + ], oe = function(xe) { + var de = k.get(xe, M); + if (de === ee) G++; else { te = [ te[1], te[2], te[3], te[4], - V - ], V = 1, ee = de; + G + ], G = 1, ee = de; var he = x(te) / 7, be = Math.abs(te[0] - he) < he && Math.abs(te[1] - he) < he && Math.abs(te[2] - 3 * he) < 3 * he && Math.abs(te[3] - he) < he && Math.abs(te[4] - he) < he && !de, ve = x(te.slice(-3)) / 3, Ce = Math.abs(te[2] - ve) < ve && Math.abs(te[3] - ve) < ve && Math.abs(te[4] - ve) < ve && de; if (be) { - var Ie = ce - te[3] - te[4], Ue = Ie - te[2], ge = { + var Ie = xe - te[3] - te[4], Ue = Ie - te[2], ge = { startX: Ue, endX: Ie, - y: K - }, ke = _.filter(function(Me) { - return Ue >= Me.bottom.startX && Ue <= Me.bottom.endX || Ie >= Me.bottom.startX && Ue <= Me.bottom.endX || Ue <= Me.bottom.startX && Ie >= Me.bottom.endX && te[2] / (Me.bottom.endX - Me.bottom.startX) < c && te[2] / (Me.bottom.endX - Me.bottom.startX) > l; + y: M + }, ke = _.filter(function(Le) { + return Ue >= Le.bottom.startX && Ue <= Le.bottom.endX || Ie >= Le.bottom.startX && Ue <= Le.bottom.endX || Ue <= Le.bottom.startX && Ie >= Le.bottom.endX && te[2] / (Le.bottom.endX - Le.bottom.startX) < c && te[2] / (Le.bottom.endX - Le.bottom.startX) > l; }); ke.length > 0 ? ke[0].bottom = ge : _.push({ top: ge, @@ -20385,9 +20385,9 @@ Minimum version required to store current data is: ` + I + `. }); } if (Ce) { - var ze = ce - te[4], Qe = ze - te[3], ge = { + var ze = xe - te[4], Qe = ze - te[3], ge = { startX: Qe, - y: K, + y: M, endX: ze }, ke = N.filter(function(rt) { return Qe >= rt.bottom.startX && Qe <= rt.bottom.endX || ze >= rt.bottom.startX && Qe <= rt.bottom.endX || Qe <= rt.bottom.startX && ze >= rt.bottom.endX && te[2] / (rt.bottom.endX - rt.bottom.startX) < c && te[2] / (rt.bottom.endX - rt.bottom.startX) > l; @@ -20399,30 +20399,30 @@ Minimum version required to store current data is: ` + I + `. } } }, ie = -1; ie <= k.width; ie++) oe(ie); - w.push.apply(w, _.filter(function(ce) { - return ce.bottom.y !== K && ce.bottom.y - ce.top.y >= 2; - })), _ = _.filter(function(ce) { - return ce.bottom.y === K; - }), T.push.apply(T, N.filter(function(ce) { - return ce.bottom.y !== K; - })), N = N.filter(function(ce) { - return ce.bottom.y === K; + w.push.apply(w, _.filter(function(xe) { + return xe.bottom.y !== M && xe.bottom.y - xe.top.y >= 2; + })), _ = _.filter(function(xe) { + return xe.bottom.y === M; + }), T.push.apply(T, N.filter(function(xe) { + return xe.bottom.y !== M; + })), N = N.filter(function(xe) { + return xe.bottom.y === M; }); }, C = 0; C <= k.height; C++) U(C); - w.push.apply(w, _.filter(function(K) { - return K.bottom.y - K.top.y >= 2; + w.push.apply(w, _.filter(function(M) { + return M.bottom.y - M.top.y >= 2; })), T.push.apply(T, N); - var j = w.filter(function(K) { - return K.bottom.y - K.top.y >= 2; - }).map(function(K) { - var V = (K.top.startX + K.top.endX + K.bottom.startX + K.bottom.endX) / 4, ee = (K.top.y + K.bottom.y + 1) / 2; - if (k.get(Math.round(V), Math.round(ee))) { + var z = w.filter(function(M) { + return M.bottom.y - M.top.y >= 2; + }).map(function(M) { + var G = (M.top.startX + M.top.endX + M.bottom.startX + M.bottom.endX) / 4, ee = (M.top.y + M.bottom.y + 1) / 2; + if (k.get(Math.round(G), Math.round(ee))) { var te = [ - K.top.endX - K.top.startX, - K.bottom.endX - K.bottom.startX, - K.bottom.y - K.top.y + 1 + M.top.endX - M.top.startX, + M.bottom.endX - M.bottom.startX, + M.bottom.y - M.top.y + 1 ], oe = x(te) / te.length, ie = B({ - x: Math.round(V), + x: Math.round(G), y: Math.round(ee) }, [ 1, @@ -20433,44 +20433,44 @@ Minimum version required to store current data is: ` + I + `. ], k); return { score: ie, - x: V, + x: G, y: ee, size: oe }; } - }).filter(function(K) { - return !!K; - }).sort(function(K, V) { - return K.score - V.score; - }).map(function(K, V, ee) { - if (V > i) return null; - var te = ee.filter(function(ie, ce) { - return V !== ce; + }).filter(function(M) { + return !!M; + }).sort(function(M, G) { + return M.score - G.score; + }).map(function(M, G, ee) { + if (G > i) return null; + var te = ee.filter(function(ie, xe) { + return G !== xe; }).map(function(ie) { return { x: ie.x, y: ie.y, - score: ie.score + Math.pow(ie.size - K.size, 2) / K.size, + score: ie.score + Math.pow(ie.size - M.size, 2) / M.size, size: ie.size }; - }).sort(function(ie, ce) { - return ie.score - ce.score; + }).sort(function(ie, xe) { + return ie.score - xe.score; }); if (te.length < 2) return null; - var oe = K.score + te[0].score + te[1].score; + var oe = M.score + te[0].score + te[1].score; return { points: [ - K + M ].concat(te.slice(0, 2)), score: oe }; - }).filter(function(K) { - return !!K; - }).sort(function(K, V) { - return K.score - V.score; + }).filter(function(M) { + return !!M; + }).sort(function(M, G) { + return M.score - G.score; }); - if (j.length === 0) return null; - var I = f(j[0].points[0], j[0].points[1], j[0].points[2]), R = I.topRight, L = I.topLeft, O = I.bottomLeft, W = P(k, T, R, L, O), $ = []; + if (z.length === 0) return null; + var I = f(z[0].points[0], z[0].points[1], z[0].points[2]), R = I.topRight, L = I.topLeft, O = I.bottomLeft, W = P(k, T, R, L, O), $ = []; W && $.push({ alignmentPattern: { x: W.alignmentPattern.x, @@ -20490,11 +20490,11 @@ Minimum version required to store current data is: ` + I + `. y: R.y } }); - var X = v(k, R), Y = v(k, L), Q = v(k, O), G = P(k, T, X, Y, Q); - return G && $.push({ + var X = v(k, R), Y = v(k, L), Q = v(k, O), V = P(k, T, X, Y, Q); + return V && $.push({ alignmentPattern: { - x: G.alignmentPattern.x, - y: G.alignmentPattern.y + x: V.alignmentPattern.x, + y: V.alignmentPattern.y }, bottomLeft: { x: Q.x, @@ -20508,47 +20508,47 @@ Minimum version required to store current data is: ` + I + `. x: X.x, y: X.y }, - dimension: G.dimension + dimension: V.dimension }), $.length === 0 ? null : $; } n.locate = D; function P(k, w, _, T, N) { - var U, C, j; + var U, C, z; try { - U = h(T, _, N, k), C = U.dimension, j = U.moduleSize; + U = h(T, _, N, k), C = U.dimension, z = U.moduleSize; } catch { return null; } var I = { x: _.x - T.x + N.x, y: _.y - T.y + N.y - }, R = (u(T, N) + u(T, _)) / 2 / j, L = 1 - 3 / R, O = { + }, R = (u(T, N) + u(T, _)) / 2 / z, L = 1 - 3 / R, O = { x: T.x + L * (I.x - T.x), y: T.y + L * (I.y - T.y) }, W = w.map(function(X) { var Y = (X.top.startX + X.top.endX + X.bottom.startX + X.bottom.endX) / 4, Q = (X.top.y + X.bottom.y + 1) / 2; if (k.get(Math.floor(Y), Math.floor(Q))) { - var G = [ + var V = [ X.top.endX - X.top.startX, X.bottom.endX - X.bottom.startX, X.bottom.y - X.top.y + 1 ]; - x(G) / G.length; - var K = B({ + x(V) / V.length; + var M = B({ x: Math.floor(Y), y: Math.floor(Q) }, [ 1, 1, 1 - ], k), V = K + u({ + ], k), G = M + u({ x: Y, y: Q }, O); return { x: Y, y: Q, - score: V + score: G }; } }).filter(function(X) { @@ -23561,7 +23561,7 @@ zoo } catch { } return false; - })(), M = { + })(), K = { isString: function(e) { return typeof e == "string" || e instanceof String; }, @@ -23603,19 +23603,19 @@ zoo return r; }, readDate: function(e) { - const t = M.readNumber(e); + const t = K.readNumber(e); return new Date(1e3 * t); }, writeDate: function(e) { const t = Math.floor(e.getTime() / 1e3); - return M.writeNumber(t, 4); + return K.writeNumber(t, 4); }, normalizeDate: function(e = Date.now()) { return e === null || e === 1 / 0 ? e : new Date(1e3 * Math.floor(+e / 1e3)); }, readMPI: function(e) { const t = (e[0] << 8 | e[1]) + 7 >>> 3; - return M.readExactSubarray(e, 2, 2 + t); + return K.readExactSubarray(e, 2, 2 + t); }, readExactSubarray: function(e, t, r) { if (e.length < r - t) throw Error("Input array too short"); @@ -23627,13 +23627,13 @@ zoo return r.set(e, n), r; }, uint8ArrayToMPI: function(e) { - const t = M.uint8ArrayBitLength(e); + const t = K.uint8ArrayBitLength(e); if (t === 0) throw Error("Zero MPI"); const r = e.subarray(e.length - Math.ceil(t / 8)), n = new Uint8Array([ (65280 & t) >> 8, 255 & t ]); - return M.concatUint8Array([ + return K.concatUint8Array([ n, r ]); @@ -23643,7 +23643,7 @@ zoo for (t = 0; t < e.length && e[t] === 0; t++) ; if (t === e.length) return 0; const r = e.subarray(t); - return 8 * (r.length - 1) + M.nbits(r[0]); + return 8 * (r.length - 1) + K.nbits(r[0]); }, hexToUint8Array: function(e) { const t = new Uint8Array(e.length >> 1); @@ -23659,7 +23659,7 @@ zoo }, stringToUint8Array: function(e) { return Ot(e, ((t) => { - if (!M.isString(t)) throw Error("stringToUint8Array: Data must be in the form of a string"); + if (!K.isString(t)) throw Error("stringToUint8Array: Data must be in the form of a string"); const r = new Uint8Array(t.length); for (let n = 0; n < t.length; n++) r[n] = t.charCodeAt(n); return r; @@ -23691,7 +23691,7 @@ zoo concat: Sr, concatUint8Array: kg, equalsUint8Array: function(e, t) { - if (!M.isUint8Array(e) || !M.isUint8Array(t)) throw Error("Data must be in the form of a Uint8Array"); + if (!K.isUint8Array(e) || !K.isUint8Array(t)) throw Error("Data must be in the form of a Uint8Array"); if (e.length !== t.length) return false; for (let r = 0; r < e.length; r++) if (e[r] !== t[r]) return false; return true; @@ -23703,7 +23703,7 @@ zoo writeChecksum: function(e) { let t = 0; for (let r = 0; r < e.length; r++) t = t + e[r] & 65535; - return M.writeNumber(t, 2); + return K.writeNumber(t, 2); }, printDebug: function(e) { i3 && console.log("[OpenPGP.js debug]", e); @@ -23743,13 +23743,13 @@ zoo return typeof navigator < "u" ? navigator.hardwareConcurrency || 1 : this.nodeRequire("os").cpus().length; }, isEmailAddress: function(e) { - return M.isString(e) ? /^[^\p{C}\p{Z}@<>\\]+@[^\p{C}\p{Z}@<>\\]+[^\p{C}\p{Z}\p{P}]$/u.test(e) : false; + return K.isString(e) ? /^[^\p{C}\p{Z}@<>\\]+@[^\p{C}\p{Z}@<>\\]+[^\p{C}\p{Z}\p{P}]$/u.test(e) : false; }, canonicalizeEOL: function(e) { let t = false; return Ot(e, ((r) => { let n; - t && (r = M.concatUint8Array([ + t && (r = K.concatUint8Array([ new Uint8Array([ 13 ]), @@ -23773,7 +23773,7 @@ zoo let t = false; return Ot(e, ((r) => { let n; - (r = t && r[0] !== 10 ? M.concatUint8Array([ + (r = t && r[0] !== 10 ? K.concatUint8Array([ new Uint8Array([ 13 ]), @@ -23845,12 +23845,12 @@ zoo isAES: function(e) { return e === A.symmetric.aes128 || e === A.symmetric.aes192 || e === A.symmetric.aes256; } - }, ah = M.getNodeBuffer(); + }, ah = K.getNodeBuffer(); let Ux, Tx; function Oa(e) { let t = new Uint8Array(); return Ot(e, ((r) => { - t = M.concatUint8Array([ + t = K.concatUint8Array([ t, r ]); @@ -23921,7 +23921,7 @@ zoo ah ? (Ux = (e) => ah.from(e).toString("base64"), Tx = (e) => { const t = ah.from(e, "base64"); return new Uint8Array(t.buffer, t.byteOffset, t.byteLength); - }) : (Ux = (e) => btoa(M.uint8ArrayToString(e)), Tx = (e) => M.stringToUint8Array(atob(e))); + }) : (Ux = (e) => btoa(K.uint8ArrayToString(e)), Tx = (e) => K.stringToUint8Array(atob(e))); const nr = [ Array(255), Array(255), @@ -23941,7 +23941,7 @@ zoo return new DataView(e).setInt16(0, 255, true), new Int16Array(e)[0] === 255; })(); function s3(e) { - for (let t = 0; t < e.length; t++) /^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(e[t]) || M.printDebugError(Error("Improperly formatted armor header: " + e[t])), /^(Version|Comment|MessageID|Hash|Charset): .+$/.test(e[t]) || M.printDebugError(Error("Unknown header: " + e[t])); + for (let t = 0; t < e.length; t++) /^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(e[t]) || K.printDebugError(Error("Improperly formatted armor header: " + e[t])), /^(Version|Comment|MessageID|Hash|Charset): .+$/.test(e[t]) || K.printDebugError(Error("Unknown header: " + e[t])); } function aw(e) { let t = e; @@ -23961,7 +23961,7 @@ zoo for (; ; ) { let v = await y.readLine(); if (v === void 0) throw Error("Misformed armored text"); - if (v = M.removeTrailingSpaces(v.replace(/[\r\n]/g, "")), i) if (c) u || i !== A.armor.signed || (n.test(v) ? (f = f.join(`\r + if (v = K.removeTrailingSpaces(v.replace(/[\r\n]/g, "")), i) if (c) u || i !== A.armor.signed || (n.test(v) ? (f = f.join(`\r `), u = true, s3(x), x = [], c = false) : f.push(v.replace(/^- /, ""))); else if (n.test(v) && r(Error("Mandatory blank line missing between armor headers and armor data")), a.test(v)) { if (s3(x), c = true, u || i !== A.armor.signed) { @@ -23988,7 +23988,7 @@ zoo const P = D + ""; if (P.indexOf("=") !== -1 || P.indexOf("-") !== -1) { let k = await y.readToEnd(); - k.length || (k = ""), k = P + k, k = M.removeTrailingSpaces(k.replace(/\r/g, "")); + k.length || (k = ""), k = P + k, k = K.removeTrailingSpaces(k.replace(/\r/g, "")); const w = k.split(n); if (w.length === 1) throw Error("Misformed armored text"); const _ = aw(w[0].slice(0, -1)); @@ -24052,7 +24052,7 @@ zoo `), f.push(wi(a, l)), f.push(Oa(t)), x && f.push("=", vi(x)), f.push(`-----END PGP SIGNATURE----- `); } - return M.concat(f); + return K.concat(f); } const qr = BigInt(0), $0 = BigInt(1); function je(e) { @@ -24128,7 +24128,7 @@ zoo for (; c < a; ) i[c + l] = parseInt(n.slice(2 * c, 2 * c + 2), 16), c++; return t !== "be" && i.reverse(), i; } - const iw = M.getNodeCrypto(); + const iw = K.getNodeCrypto(); function ur(e) { const t = typeof crypto < "u" ? crypto : iw == null ? void 0 : iw.webcrypto; if (t == null ? void 0 : t.getRandomValues) { @@ -24882,7 +24882,7 @@ zoo 4987, 4993, 4999 - ].map(((e) => BigInt(e))), u3 = M.getWebCrypto(), Rx = M.getNodeCrypto(), lw = Rx && Rx.getHashes(); + ].map(((e) => BigInt(e))), u3 = K.getWebCrypto(), Rx = K.getNodeCrypto(), lw = Rx && Rx.getHashes(); function Za(e) { if (Rx && lw.includes(e)) return async function(t) { const r = Rx.createHash(e); @@ -24900,7 +24900,7 @@ zoo return a; }; return async function(n) { - if (It(n) && (n = await Mt(n)), M.isStream(n)) { + if (It(n) && (n = await Mt(n)), K.isStream(n)) { const a = (await r()).create(); return Ot(n, ((i) => { a.update(i); @@ -24976,7 +24976,7 @@ zoo let r = 2, n = 1; for (let c = r; c < e.length; c++) n &= e[c] !== 0, r += n; const a = r - 2, i = e.subarray(r + 1), l = e[0] === 0 & e[1] === 2 & a >= 8 & !n; - if (t) return M.selectUint8Array(l, i, t); + if (t) return K.selectUint8Array(l, i, t); if (l) return i; throw Error("Decryption error"); } @@ -25122,11 +25122,11 @@ zoo 4, 28 ]; - const ts = M.getWebCrypto(), Mi = M.getNodeCrypto(), Jo = BigInt(1); + const ts = K.getWebCrypto(), Mi = K.getNodeCrypto(), Jo = BigInt(1); async function yw(e, t, r, n, a, i, l, c, u) { if (Wt(e) >= r.length) throw Error("Digest size cannot exceed key modulus size"); - if (t && !M.isStream(t)) { - if (M.getWebCrypto()) try { + if (t && !K.isStream(t)) { + if (K.getWebCrypto()) try { return await (async function(x, f, h, p, m, y, B, v) { const D = n8(h, p, m, y, B, v), P = { name: "RSASSA-PKCS1-v1_5", @@ -25139,9 +25139,9 @@ zoo return new Uint8Array(await ts.sign("RSASSA-PKCS1-v1_5", k, f)); })(A.read(A.webHash, e), t, r, n, a, i, l, c); } catch (x) { - M.printDebugError(x); + K.printDebugError(x); } - else if (M.getNodeCrypto()) return (function(x, f, h, p, m, y, B, v) { + else if (K.getNodeCrypto()) return (function(x, f, h, p, m, y, B, v) { const D = Mi.createSign(A.read(A.hash, x)); D.write(f), D.end(); const P = n8(h, p, m, y, B, v); @@ -25159,8 +25159,8 @@ zoo })(e, r, a, u); } async function Ew(e, t, r, n, a, i) { - if (t && !M.isStream(t)) { - if (M.getWebCrypto()) try { + if (t && !K.isStream(t)) { + if (K.getWebCrypto()) try { return await (async function(l, c, u, x, f) { const h = a8(x, f), p = await ts.importKey("jwk", h, { name: "RSASSA-PKCS1-v1_5", @@ -25173,9 +25173,9 @@ zoo return ts.verify("RSASSA-PKCS1-v1_5", p, u, c); })(A.read(A.webHash, e), t, r, n, a); } catch (l) { - M.printDebugError(l); + K.printDebugError(l); } - else if (M.getNodeCrypto()) return (function(l, c, u, x, f) { + else if (K.getNodeCrypto()) return (function(l, c, u, x, f) { const h = a8(x, f), p = { key: h, format: "jwk", @@ -25192,11 +25192,11 @@ zoo return (function(l, c, u, x, f) { if (u = je(u), c = je(c), x = je(x), c >= u) throw Error("Signature size cannot exceed modulus size"); const h = Kt(ar(c, x, u), "be", Gr(u)), p = zg(l, f, Gr(u)); - return M.equalsUint8Array(h, p); + return K.equalsUint8Array(h, p); })(e, r, n, a, i); } async function Aw(e, t, r) { - return M.getNodeCrypto() ? (function(n, a, i) { + return K.getNodeCrypto() ? (function(n, a, i) { const l = a8(a, i), c = { key: l, format: "jwk", @@ -25210,7 +25210,7 @@ zoo })(e, t, r); } async function bw(e, t, r, n, a, i, l, c) { - if (M.getNodeCrypto() && !c) try { + if (K.getNodeCrypto() && !c) try { return (function(u, x, f, h, p, m, y) { const B = n8(x, f, h, p, m, y), v = { key: B, @@ -25225,7 +25225,7 @@ zoo } })(e, t, r, n, a, i, l); } catch (u) { - M.printDebugError(u); + K.printDebugError(u); } return (function(u, x, f, h, p, m, y, B) { if (u = je(u), x = je(x), f = je(f), h = je(h), p = je(p), m = je(m), y = je(y), u >= x) throw Error("Data too large."); @@ -25284,7 +25284,7 @@ zoo class Wa { constructor(t) { if (t instanceof Wa) this.oid = t.oid; - else if (M.isArray(t) || M.isUint8Array(t)) { + else if (K.isArray(t) || K.isUint8Array(t)) { if ((t = new Uint8Array(t))[0] === 6) { if (t[1] !== t.length - 2) throw Error("Length mismatch in DER encoded oid"); t = t.subarray(2); @@ -25300,7 +25300,7 @@ zoo throw Error("Invalid oid"); } write() { - return M.concatUint8Array([ + return K.concatUint8Array([ new Uint8Array([ this.oid.length ]), @@ -25308,7 +25308,7 @@ zoo ]); } toHex() { - return M.uint8ArrayToHex(this.oid); + return K.uint8ArrayToHex(this.oid); } getName() { const t = ww[this.toHex()]; @@ -25319,7 +25319,7 @@ zoo function Ug(e) { let t, r = 0; const n = e[0]; - return n < 192 ? ([r] = e, t = 1) : n < 255 ? (r = (e[0] - 192 << 8) + e[1] + 192, t = 2) : n === 255 && (r = M.readNumber(e.subarray(1, 5)), t = 5), { + return n < 192 ? ([r] = e, t = 1) : n < 255 ? (r = (e[0] - 192 << 8) + e[1] + 192, t = 2) : n === 255 && (r = K.readNumber(e.subarray(1, 5)), t = 5), { len: r, offset: t }; @@ -25330,11 +25330,11 @@ zoo ]) : e > 191 && e < 8384 ? new Uint8Array([ 192 + (e - 192 >> 8), e - 192 & 255 - ]) : M.concatUint8Array([ + ]) : K.concatUint8Array([ new Uint8Array([ 255 ]), - M.writeNumber(e, 4) + K.writeNumber(e, 4) ]); } function vw(e) { @@ -25349,7 +25349,7 @@ zoo ]); } function d3(e, t) { - return M.concatUint8Array([ + return K.concatUint8Array([ Kx(e), xd(t) ]); @@ -25424,7 +25424,7 @@ zoo } } } while (p); - n ? (await n.ready, await n.close()) : (m = M.concatUint8Array(m), await r({ + n ? (await n.ready, await n.close()) : (m = K.concatUint8Array(m), await r({ tag: x, packet: m })); @@ -25462,7 +25462,7 @@ zoo switch (e) { case A.publicKey.ed25519: try { - const t = M.getWebCrypto(), r = await t.generateKey("Ed25519", true, [ + const t = K.getWebCrypto(), r = await t.generateKey("Ed25519", true, [ "sign", "verify" ]).catch(((i) => { @@ -25487,7 +25487,7 @@ zoo }; } case A.publicKey.ed448: { - const t = await M.getNobleCurve(A.publicKey.ed448), { secretKey: r, publicKey: n } = t.keygen(); + const t = await K.getNobleCurve(A.publicKey.ed448), { secretKey: r, publicKey: n } = t.keygen(); return { A: n, seed: r @@ -25502,7 +25502,7 @@ zoo switch (e) { case A.publicKey.ed25519: try { - const l = M.getWebCrypto(), c = Tg(e, n, a), u = await l.importKey("jwk", c, "Ed25519", false, [ + const l = K.getWebCrypto(), c = Tg(e, n, a), u = await l.importKey("jwk", c, "Ed25519", false, [ "sign" ]); return { @@ -25512,7 +25512,7 @@ zoo if (l.name !== "NotSupportedError") throw l; const { default: c } = await Promise.resolve().then((function() { return r0; - })), u = M.concatUint8Array([ + })), u = K.concatUint8Array([ a, n ]); @@ -25522,7 +25522,7 @@ zoo } case A.publicKey.ed448: return { - RS: (await M.getNobleCurve(A.publicKey.ed448)).sign(i, a) + RS: (await K.getNobleCurve(A.publicKey.ed448)).sign(i, a) }; default: throw Error("Unsupported EdDSA algorithm"); @@ -25533,7 +25533,7 @@ zoo switch (e) { case A.publicKey.ed25519: try { - const l = M.getWebCrypto(), c = c9(e, a), u = await l.importKey("jwk", c, "Ed25519", false, [ + const l = K.getWebCrypto(), c = c9(e, a), u = await l.importKey("jwk", c, "Ed25519", false, [ "verify" ]); return await l.verify("Ed25519", u, r, i); @@ -25545,7 +25545,7 @@ zoo return c.sign.detached.verify(i, r, a); } case A.publicKey.ed448: - return (await M.getNobleCurve(A.publicKey.ed448)).verify(r, i, a); + return (await K.getNobleCurve(A.publicKey.ed448)).verify(r, i, a); default: throw Error("Unsupported EdDSA algorithm"); } @@ -25554,7 +25554,7 @@ zoo switch (e) { case A.publicKey.ed25519: try { - const n = M.getWebCrypto(), a = Tg(e, t, r), i = c9(e, t), l = await n.importKey("jwk", a, "Ed25519", false, [ + const n = K.getWebCrypto(), a = Tg(e, t, r), i = c9(e, t), l = await n.importKey("jwk", a, "Ed25519", false, [ "sign" ]), c = await n.importKey("jwk", i, "Ed25519", false, [ "verify" @@ -25565,11 +25565,11 @@ zoo const { default: a } = await Promise.resolve().then((function() { return r0; })), { publicKey: i } = a.sign.keyPair.fromSeed(r); - return M.equalsUint8Array(t, i); + return K.equalsUint8Array(t, i); } case A.publicKey.ed448: { - const n = (await M.getNobleCurve(A.publicKey.ed448)).getPublicKey(r); - return M.equalsUint8Array(t, n); + const n = (await K.getNobleCurve(A.publicKey.ed448)).getPublicKey(r); + return K.equalsUint8Array(t, n); } default: return false; @@ -25753,8 +25753,8 @@ zoo let w = 0, _ = 0, T = 0, N = 0; for (let U = 0; U < m; U++) { if (!(k >>> m - U - 1 & 1)) continue; - const { s0: C, s1: j, s2: I, s3: R } = u[m * P + U]; - w ^= C, _ ^= j, T ^= I, N ^= R; + const { s0: C, s1: z, s2: I, s3: R } = u[m * P + U]; + w ^= C, _ ^= z, T ^= I, N ^= R; } D.push({ s0: w, @@ -26332,10 +26332,10 @@ zoo blockSize: Pw(e) }; } - const Y0 = M.getWebCrypto(); + const Y0 = K.getWebCrypto(); async function u8(e, t, r) { const { keySize: n } = gt(e); - if (!M.isAES(e) || t.length !== n) throw Error("Unexpected algorithm or key size"); + if (!K.isAES(e) || t.length !== n) throw Error("Unexpected algorithm or key size"); try { const a = await Y0.importKey("raw", t, { name: "AES-KW" @@ -26352,13 +26352,13 @@ zoo return new Uint8Array(l); } catch (a) { if (a.name !== "NotSupportedError" && (t.length !== 24 || a.name !== "OperationError")) throw a; - M.printDebugError("Browser did not support operation: " + a.message); + K.printDebugError("Browser did not support operation: " + a.message); } return Yg(t).encrypt(r); } async function x8(e, t, r) { const { keySize: n } = gt(e); - if (!M.isAES(e) || t.length !== n) throw Error("Unexpected algorithm or key size"); + if (!K.isAES(e) || t.length !== n) throw Error("Unexpected algorithm or key size"); let a; try { a = await Y0.importKey("raw", t, { @@ -26368,7 +26368,7 @@ zoo ]); } catch (i) { if (i.name !== "NotSupportedError" && (t.length !== 24 || i.name !== "OperationError")) throw i; - return M.printDebugError("Browser did not support operation: " + i.message), Yg(t).decrypt(r); + return K.printDebugError("Browser did not support operation: " + i.message), Yg(t).decrypt(r); } try { const i = await Y0.unwrapKey("raw", r, a, { @@ -26385,7 +26385,7 @@ zoo } } async function ei(e, t, r, n, a) { - const i = M.getWebCrypto(), l = A.read(A.webHash, e); + const i = K.getWebCrypto(), l = A.read(A.webHash, e); if (!l) throw Error("Hash algo not supported with HKDF"); const c = await i.importKey("raw", t, "HKDF", false, [ "deriveBits" @@ -26398,14 +26398,14 @@ zoo return new Uint8Array(u); } const Lx = { - x25519: M.encodeUTF8("OpenPGP X25519"), - x448: M.encodeUTF8("OpenPGP X448") + x25519: K.encodeUTF8("OpenPGP X25519"), + x448: K.encodeUTF8("OpenPGP X448") }; async function p9(e) { switch (e) { case A.publicKey.x25519: try { - const t = M.getWebCrypto(), r = await t.generateKey("X25519", true, [ + const t = K.getWebCrypto(), r = await t.generateKey("X25519", true, [ "deriveKey", "deriveBits" ]).catch(((i) => { @@ -26434,7 +26434,7 @@ zoo }; } case A.publicKey.x448: { - const t = await M.getNobleCurve(A.publicKey.x448), { secretKey: r, publicKey: n } = t.keygen(); + const t = await K.getNobleCurve(A.publicKey.x448), { secretKey: r, publicKey: n } = t.keygen(); return { A: n, k: r @@ -26449,20 +26449,20 @@ zoo case A.publicKey.x25519: try { const { ephemeralPublicKey: n, sharedSecret: a } = await md(e, t), i = await yd(e, n, t, r); - return M.equalsUint8Array(a, i); + return K.equalsUint8Array(a, i); } catch { return false; } case A.publicKey.x448: { - const n = (await M.getNobleCurve(A.publicKey.x448)).getPublicKey(r); - return M.equalsUint8Array(t, n); + const n = (await K.getNobleCurve(A.publicKey.x448)).getPublicKey(r); + return K.equalsUint8Array(t, n); } default: return false; } } async function Jg(e, t, r) { - const { ephemeralPublicKey: n, sharedSecret: a } = await md(e, r), i = M.concatUint8Array([ + const { ephemeralPublicKey: n, sharedSecret: a } = await md(e, r), i = K.concatUint8Array([ n, r, a @@ -26487,7 +26487,7 @@ zoo } } async function em(e, t, r, n, a) { - const i = await yd(e, t, n, a), l = M.concatUint8Array([ + const i = await yd(e, t, n, a), l = K.concatUint8Array([ t, n, i @@ -26519,7 +26519,7 @@ zoo switch (e) { case A.publicKey.x25519: try { - const r = M.getWebCrypto(), n = await r.generateKey("X25519", true, [ + const r = K.getWebCrypto(), n = await r.generateKey("X25519", true, [ "deriveKey", "deriveBits" ]).catch(((u) => { @@ -26552,7 +26552,7 @@ zoo }; } case A.publicKey.x448: { - const r = await M.getNobleCurve(A.publicKey.x448), { secretKey: n, publicKey: a } = r.keygen(), i = r.getSharedSecret(n, t); + const r = await K.getNobleCurve(A.publicKey.x448), { secretKey: n, publicKey: a } = r.keygen(), i = r.getSharedSecret(n, t); return Ox(i), { ephemeralPublicKey: a, sharedSecret: i @@ -26566,7 +26566,7 @@ zoo switch (e) { case A.publicKey.x25519: try { - const a = M.getWebCrypto(), i = (function(f, h, p) { + const a = K.getWebCrypto(), i = (function(f, h, p) { if (f === A.publicKey.x25519) { const m = d8(f, h); return m.d = lr(p), m; @@ -26588,7 +26588,7 @@ zoo return Ox(l), l; } case A.publicKey.x448: { - const a = (await M.getNobleCurve(A.publicKey.x448)).getSharedSecret(n, t); + const a = (await K.getNobleCurve(A.publicKey.x448)).getSharedSecret(n, t); return Ox(a), a; } default: @@ -26619,7 +26619,7 @@ zoo recomputeSharedSecret: yd, validateParams: g9 }); - const sh = M.getWebCrypto(), Hx = M.getNodeCrypto(), pa = { + const sh = K.getWebCrypto(), Hx = K.getNodeCrypto(), pa = { [A.curve.nistP256]: "P-256", [A.curve.nistP384]: "P-384", [A.curve.nistP521]: "P-521" @@ -26825,7 +26825,7 @@ zoo throw new st("Unknown curve"); } const r = tm[this.name]; - this.keyType = r.keyType, this.oid = r.oid, this.hash = r.hash, this.cipher = r.cipher, this.node = r.node, this.web = r.web, this.payloadSize = r.payloadSize, this.sharedSize = r.sharedSize, this.wireFormatLeadingByte = r.wireFormatLeadingByte, this.web && M.getWebCrypto() ? this.type = "web" : this.node && M.getNodeCrypto() ? this.type = "node" : this.name === A.curve.curve25519Legacy ? this.type = "curve25519Legacy" : this.name === A.curve.ed25519Legacy && (this.type = "ed25519Legacy"); + this.keyType = r.keyType, this.oid = r.oid, this.hash = r.hash, this.cipher = r.cipher, this.node = r.node, this.web = r.web, this.payloadSize = r.payloadSize, this.sharedSize = r.sharedSize, this.wireFormatLeadingByte = r.wireFormatLeadingByte, this.web && K.getWebCrypto() ? this.type = "web" : this.node && K.getNodeCrypto() ? this.type = "node" : this.name === A.curve.curve25519Legacy ? this.type = "curve25519Legacy" : this.name === A.curve.ed25519Legacy && (this.type = "ed25519Legacy"); } async genKeyPair() { switch (this.type) { @@ -26845,7 +26845,7 @@ zoo }; })(this.name, this.wireFormatLeadingByte); } catch (t) { - return M.printDebugError("Browser did not support generating ec key " + t.message), y3(this.name); + return K.printDebugError("Browser did not support generating ec key " + t.message), y3(this.name); } case "node": return (function(t) { @@ -26858,7 +26858,7 @@ zoo case "curve25519Legacy": { const { k: t, A: r } = await p9(A.publicKey.x25519), n = t.slice().reverse(); return n[0] = 127 & n[0] | 64, n[31] &= 248, { - publicKey: M.concatUint8Array([ + publicKey: K.concatUint8Array([ new Uint8Array([ this.wireFormatLeadingByte ]), @@ -26870,7 +26870,7 @@ zoo case "ed25519Legacy": { const { seed: t, A: r } = await o9(A.publicKey.ed25519); return { - publicKey: M.concatUint8Array([ + publicKey: K.concatUint8Array([ new Uint8Array([ this.wireFormatLeadingByte ]), @@ -26889,7 +26889,7 @@ zoo return { oid: r, Q: i.publicKey, - secret: M.leftPad(i.privateKey, t.payloadSize), + secret: K.leftPad(i.privateKey, t.payloadSize), hash: n, cipher: a }; @@ -26913,15 +26913,15 @@ zoo const c = n.slice().reverse(); return !(r.length < 1 || r[0] !== 64) && g9(A.publicKey.x25519, r.subarray(1), c); } - const l = (await M.getNobleCurve(A.publicKey.ecdsa, i)).getPublicKey(n, false); - return !!M.equalsUint8Array(l, r); + const l = (await K.getNobleCurve(A.publicKey.ecdsa, i)).getPublicKey(n, false); + return !!K.equalsUint8Array(l, r); } function Li(e, t) { const { payloadSize: r, wireFormatLeadingByte: n, name: a } = e, i = a === A.curve.curve25519Legacy || a === A.curve.ed25519Legacy ? r : 2 * r; if (t[0] !== n || t.length !== i + 1) throw Error("Invalid point encoding"); } async function y3(e) { - const t = await M.getNobleCurve(A.publicKey.ecdsa, e), { secretKey: r } = t.keygen(); + const t = await K.getNobleCurve(A.publicKey.ecdsa, e), { secretKey: r } = t.keygen(); return { publicKey: t.getPublicKey(r, false), privateKey: r @@ -26945,10 +26945,10 @@ zoo const a = Ed(e, t, r); return a.d = lr(n), a; } - const Qx = M.getWebCrypto(), im = M.getNodeCrypto(); + const Qx = K.getWebCrypto(), im = K.getNodeCrypto(); async function f8(e, t, r, n, a, i) { const l = new Bn(e); - if (Li(l, n), r && !M.isStream(r)) { + if (Li(l, n), r && !K.isStream(r)) { const u = { publicKey: n, privateKey: a @@ -26979,12 +26979,12 @@ zoo })(l, t, r, u); } catch (x) { if (l.name !== "nistP521" && (x.name === "DataError" || x.name === "OperationError")) throw x; - M.printDebugError("Browser did not support signing: " + x.message); + K.printDebugError("Browser did not support signing: " + x.message); } break; case "node": return (function(x, f, h, p) { - const m = M.nodeRequire("eckey-utils"), y = M.getNodeBuffer(), { privateKey: B } = m.generateDer({ + const m = K.nodeRequire("eckey-utils"), y = K.getNodeBuffer(), { privateKey: B } = m.generateDer({ curveName: sa[x.name], privateKey: y.from(p) }), v = im.createSign(A.read(A.hash, f)); @@ -27002,7 +27002,7 @@ zoo })(l, t, r, a); } } - const c = (await M.getNobleCurve(A.publicKey.ecdsa, l.name)).sign(i, a, { + const c = (await K.getNobleCurve(A.publicKey.ecdsa, l.name)).sign(i, a, { lowS: false }); return { @@ -27014,7 +27014,7 @@ zoo const l = new Bn(e); Li(l, a); const c = async () => i[0] === 0 && E3(l, r, i.subarray(1), a); - if (n && !M.isStream(n)) switch (l.type) { + if (n && !K.isStream(n)) switch (l.type) { case "web": try { return await (async function(x, f, { r: h, s: p }, m, y) { @@ -27026,7 +27026,7 @@ zoo } }, false, [ "verify" - ]), D = M.concatUint8Array([ + ]), D = K.concatUint8Array([ h, p ]).buffer; @@ -27040,17 +27040,17 @@ zoo })(l, t, r, n, a) || c(); } catch (u) { if (l.name !== "nistP521" && (u.name === "DataError" || u.name === "OperationError")) throw u; - M.printDebugError("Browser did not support verifying: " + u.message); + K.printDebugError("Browser did not support verifying: " + u.message); } break; case "node": return (function(x, f, { r: h, s: p }, m, y) { - const B = M.nodeRequire("eckey-utils"), v = M.getNodeBuffer(), { publicKey: D } = B.generateDer({ + const B = K.nodeRequire("eckey-utils"), v = K.getNodeBuffer(), { publicKey: D } = B.generateDer({ curveName: sa[x.name], publicKey: v.from(y) }), P = im.createVerify(A.read(A.hash, f)); P.write(m), P.end(); - const k = M.concatUint8Array([ + const k = K.concatUint8Array([ h, p ]); @@ -27069,7 +27069,7 @@ zoo return await E3(l, r, i, a) || c(); } async function E3(e, t, r, n) { - return (await M.getNobleCurve(A.publicKey.ecdsa, e.name)).verify(M.concatUint8Array([ + return (await K.getNobleCurve(A.publicKey.ecdsa, e.name)).verify(K.concatUint8Array([ t.r, t.s ]), r, n, { @@ -27109,7 +27109,7 @@ zoo } async function lm(e, t, { r, s: n }, a, i, l) { if (Li(new Bn(e), i), Wt(t) < Wt(A.hash.sha256)) throw Error("Hash algorithm too weak for EdDSA."); - const c = M.concatUint8Array([ + const c = K.concatUint8Array([ r, n ]); @@ -27132,19 +27132,19 @@ zoo const r = e[t - 1]; if (r >= 1) { const n = e.subarray(t - r), a = new Uint8Array(r).fill(r); - if (M.equalsUint8Array(n, a)) return e.subarray(0, t - r); + if (K.equalsUint8Array(n, a)) return e.subarray(0, t - r); } } throw Error("Invalid padding"); } function um(e, t, r, n) { - return M.concatUint8Array([ + return K.concatUint8Array([ t.write(), new Uint8Array([ e ]), r.write(), - M.stringToUint8Array("Anonymous Sender "), + K.stringToUint8Array("Anonymous Sender "), n ]); } @@ -27158,7 +27158,7 @@ zoo for (l = t.length - 1; l >= 0 && t[l] === 0; l--) ; t = t.subarray(0, l + 1); } - return (await Aa(e, M.concatUint8Array([ + return (await Aa(e, K.concatUint8Array([ new Uint8Array([ 0, 0, @@ -27174,7 +27174,7 @@ zoo case "curve25519Legacy": { const { sharedSecret: r, ephemeralPublicKey: n } = await md(A.publicKey.x25519, t.subarray(1)); return { - publicKey: M.concatUint8Array([ + publicKey: K.concatUint8Array([ new Uint8Array([ e.wireFormatLeadingByte ]), @@ -27184,9 +27184,9 @@ zoo }; } case "web": - if (e.web && M.getWebCrypto()) try { + if (e.web && K.getWebCrypto()) try { return await (async function(r, n) { - const a = M.getWebCrypto(), i = Ed(r.payloadSize, r.web, n); + const a = K.getWebCrypto(), i = Ed(r.payloadSize, r.web, n); let l = a.generateKey({ name: "ECDH", namedCurve: r.web @@ -27217,12 +27217,12 @@ zoo }; })(e, t); } catch (r) { - return M.printDebugError(r), b3(e, t); + return K.printDebugError(r), b3(e, t); } break; case "node": return (function(r, n) { - const a = M.getNodeCrypto(), i = a.createECDH(r.node); + const a = K.getNodeCrypto(), i = a.createECDH(r.node); i.generateKeys(); const l = new Uint8Array(i.computeSecret(n)); return { @@ -27260,9 +27260,9 @@ zoo }; } case "web": - if (e.web && M.getWebCrypto()) try { + if (e.web && K.getWebCrypto()) try { return await (async function(a, i, l, c) { - const u = M.getWebCrypto(), x = om(a.payloadSize, a.web, l, c); + const u = K.getWebCrypto(), x = om(a.payloadSize, a.web, l, c); let f = u.importKey("jwk", x, { name: "ECDH", namedCurve: a.web @@ -27295,12 +27295,12 @@ zoo }; })(e, t, r, n); } catch (a) { - return M.printDebugError(a), A3(e, t, n); + return K.printDebugError(a), A3(e, t, n); } break; case "node": return (function(a, i, l) { - const c = M.getNodeCrypto(), u = c.createECDH(a.node); + const c = K.getNodeCrypto(), u = c.createECDH(a.node); u.setPrivateKey(l); const x = new Uint8Array(u.computeSecret(i)); return { @@ -27328,11 +27328,11 @@ zoo async function A3(e, t, r) { return { secretKey: r, - sharedKey: (await M.getNobleCurve(A.publicKey.ecdh, e.name)).getSharedSecret(r, t).subarray(1) + sharedKey: (await K.getNobleCurve(A.publicKey.ecdh, e.name)).getSharedSecret(r, t).subarray(1) }; } async function b3(e, t) { - const r = await M.getNobleCurve(A.publicKey.ecdh, e.name), { publicKey: n, privateKey: a } = await e.genKeyPair(); + const r = await K.getNobleCurve(A.publicKey.ecdh, e.name), { publicKey: n, privateKey: a } = await e.genKeyPair(); return { publicKey: n, sharedKey: r.getSharedSecret(a, t).subarray(1) @@ -27369,7 +27369,7 @@ zoo throw Error("Invalid symmetric key"); } write() { - return M.concatUint8Array([ + return K.concatUint8Array([ new Uint8Array([ this.data.length ]), @@ -27404,10 +27404,10 @@ zoo } read(t) { let r = 0, n = t[r++]; - this.algorithm = n % 2 ? t[r++] : null, n -= n % 2, this.wrappedKey = M.readExactSubarray(t, r, r + n), r += n; + this.algorithm = n % 2 ? t[r++] : null, n -= n % 2, this.wrappedKey = K.readExactSubarray(t, r, r + n), r += n; } write() { - return M.concatUint8Array([ + return K.concatUint8Array([ this.algorithm ? new Uint8Array([ this.wrappedKey.length + 1, this.algorithm @@ -27447,7 +27447,7 @@ zoo } case A.publicKey.x25519: case A.publicKey.x448: { - if (t && !M.isAES(t)) throw Error("X25519 and X448 keys can only encrypt AES session keys"); + if (t && !K.isAES(t)) throw Error("X25519 and X448 keys can only encrypt AES session keys"); const { A: i } = r, { ephemeralPublicKey: l, wrappedKey: c } = await Jg(e, n, i); return { ephemeralPublicKey: l, @@ -27481,7 +27481,7 @@ zoo case A.publicKey.x25519: case A.publicKey.x448: { const { A: l } = t, { k: c } = r, { ephemeralPublicKey: u, C: x } = n; - if (x.algorithm !== null && !M.isAES(x.algorithm)) throw Error("AES session key expected"); + if (x.algorithm !== null && !K.isAES(x.algorithm)) throw Error("AES session key expected"); return em(e, u, x.wrappedKey, l, c); } default: @@ -27494,13 +27494,13 @@ zoo case A.publicKey.rsaEncrypt: case A.publicKey.rsaEncryptSign: case A.publicKey.rsaSign: { - const a = M.readMPI(t.subarray(n)); + const a = K.readMPI(t.subarray(n)); n += a.length + 2; - const i = M.readMPI(t.subarray(n)); + const i = K.readMPI(t.subarray(n)); n += i.length + 2; - const l = M.readMPI(t.subarray(n)); + const l = K.readMPI(t.subarray(n)); n += l.length + 2; - const c = M.readMPI(t.subarray(n)); + const c = K.readMPI(t.subarray(n)); return n += c.length + 2, { read: n, privateParams: { @@ -27513,7 +27513,7 @@ zoo } case A.publicKey.dsa: case A.publicKey.elgamal: { - const a = M.readMPI(t.subarray(n)); + const a = K.readMPI(t.subarray(n)); return n += a.length + 2, { read: n, privateParams: { @@ -27524,8 +27524,8 @@ zoo case A.publicKey.ecdsa: case A.publicKey.ecdh: { const a = Q0(e, r.oid); - let i = M.readMPI(t.subarray(n)); - return n += i.length + 2, i = M.leftPad(i, a), { + let i = K.readMPI(t.subarray(n)); + return n += i.length + 2, i = K.leftPad(i, a), { read: n, privateParams: { d: i @@ -27535,8 +27535,8 @@ zoo case A.publicKey.eddsaLegacy: { const a = Q0(e, r.oid); if (r.oid.getName() !== A.curve.ed25519Legacy) throw Error("Unexpected OID for eddsaLegacy"); - let i = M.readMPI(t.subarray(n)); - return n += i.length + 2, i = M.leftPad(i, a), { + let i = K.readMPI(t.subarray(n)); + return n += i.length + 2, i = K.leftPad(i, a), { read: n, privateParams: { seed: i @@ -27545,7 +27545,7 @@ zoo } case A.publicKey.ed25519: case A.publicKey.ed448: { - const a = Q0(e), i = M.readExactSubarray(t, n, n + a); + const a = Q0(e), i = K.readExactSubarray(t, n, n + a); return n += i.length, { read: n, privateParams: { @@ -27555,7 +27555,7 @@ zoo } case A.publicKey.x25519: case A.publicKey.x448: { - const a = Q0(e), i = M.readExactSubarray(t, n, n + a); + const a = Q0(e), i = K.readExactSubarray(t, n, n + a); return n += i.length, { read: n, privateParams: { @@ -27575,9 +27575,9 @@ zoo A.publicKey.x448 ]), n = Object.keys(t).map(((a) => { const i = t[a]; - return M.isUint8Array(i) ? r.has(e) ? i : M.uint8ArrayToMPI(i) : i.write(); + return K.isUint8Array(i) ? r.has(e) ? i : K.uint8ArrayToMPI(i) : i.write(); })); - return M.concatUint8Array(n); + return K.concatUint8Array(n); } function Hw(e, t, r) { switch (e) { @@ -27585,7 +27585,7 @@ zoo case A.publicKey.rsaEncryptSign: case A.publicKey.rsaSign: return (async function(n, a) { - if (a = BigInt(a), M.getWebCrypto()) { + if (a = BigInt(a), K.getWebCrypto()) { const x = { name: "RSASSA-PKCS1-v1_5", modulusLength: n, @@ -27599,7 +27599,7 @@ zoo ]); return x3(await ts.exportKey("jwk", f.privateKey), a); } - if (M.getNodeCrypto()) { + if (K.getNodeCrypto()) { const x = { modulusLength: n, publicExponent: r8(a), @@ -27801,7 +27801,7 @@ zoo throw Error("Unknown elliptic algo"); } } - const vx = M.getWebCrypto(), Zl = M.getNodeCrypto(), Bi = Zl ? Zl.getCiphers() : [], qx = { + const vx = K.getWebCrypto(), Zl = K.getNodeCrypto(), Bi = Zl ? Zl.getCiphers() : [], qx = { idea: Bi.includes("idea-cfb") ? "idea-cfb" : void 0, tripledes: Bi.includes("des-ede3-cfb") ? "des-ede3-cfb" : void 0, cast5: Bi.includes("cast5-cfb") ? "cast5-cfb" : void 0, @@ -27815,23 +27815,23 @@ zoo r[r.length - 2], r[r.length - 1] ]); - return M.concat([ + return K.concat([ r, n ]); } async function Yl(e, t, r, n, a) { const i = A.read(A.symmetric, e); - if (M.getNodeCrypto() && qx[i]) return (function(h, p, m, y) { + if (K.getNodeCrypto() && qx[i]) return (function(h, p, m, y) { const B = A.read(A.symmetric, h), v = new Zl.createCipheriv(qx[B], p, y); return Ot(m, ((D) => new Uint8Array(v.update(D)))); })(e, t, r, n); - if (M.isAES(e)) return (async function(h, p, m, y) { + if (K.isAES(e)) return (async function(h, p, m, y) { if (vx && await v3.isSupported(h)) { const B = new v3(h, p, y); - return M.isStream(m) ? e8(m, ((v) => B.encryptChunk(v)), (() => B.finish())) : B.encrypt(m); + return K.isStream(m) ? e8(m, ((v) => B.encryptChunk(v)), (() => B.finish())) : B.encrypt(m); } - if (M.isStream(m)) { + if (K.isStream(m)) { const B = new mm(true, h, p, y); return e8(m, ((v) => B.processChunk(v)), (() => B.finish())); } @@ -27840,7 +27840,7 @@ zoo const l = new (await Xg(e))(t), c = l.blockSize, u = n.slice(); let x = new Uint8Array(); const f = (h) => { - h && (x = M.concatUint8Array([ + h && (x = K.concatUint8Array([ x, h ])); @@ -27861,8 +27861,8 @@ zoo const y = A.read(A.symmetric, f), B = new Zl.createDecipheriv(qx[y], h, m); return Ot(p, ((v) => new Uint8Array(B.update(v)))); })(e, t, r, n); - if (M.isAES(e)) return (function(f, h, p, m) { - if (M.isStream(p)) { + if (K.isAES(e)) return (function(f, h, p, m) { + if (K.isStream(p)) { const y = new mm(false, f, h, m); return e8(p, ((B) => y.processChunk(B)), (() => y.finish())); } @@ -27871,7 +27871,7 @@ zoo const i = new (await Xg(e))(t), l = i.blockSize; let c = n, u = new Uint8Array(); const x = (f) => { - f && (u = M.concatUint8Array([ + f && (u = K.concatUint8Array([ u, f ])); @@ -27911,10 +27911,10 @@ zoo async encryptChunk(t) { const r = this.nextBlock.length - this.i, n = t.subarray(0, r); if (this.nextBlock.set(n, this.i), this.i + t.length >= 2 * this.blockSize) { - const i = (t.length - r) % this.blockSize, l = M.concatUint8Array([ + const i = (t.length - r) % this.blockSize, l = K.concatUint8Array([ this.nextBlock, t.subarray(r, t.length - i) - ]), c = M.concatUint8Array([ + ]), c = K.concatUint8Array([ this.prevBlock, l.subarray(0, l.length - this.blockSize) ]), u = await this._runCBC(c); @@ -27943,7 +27943,7 @@ zoo this.nextBlock.fill(0), this.prevBlock.fill(0), this.keyRef = null, this.key = null; } async encrypt(t) { - const r = (await this._runCBC(M.concatUint8Array([ + const r = (await this._runCBC(K.concatUint8Array([ new Uint8Array(this.blockSize), t ]), this.iv)).subarray(0, t.length); @@ -27967,7 +27967,7 @@ zoo async processChunk(t) { const r = this.nextBlock.length - this.i, n = t.subarray(0, r); if (this.nextBlock.set(n, this.i), this.i + t.length >= 2 * this.blockSize) { - const i = (t.length - r) % this.blockSize, l = M.concatUint8Array([ + const i = (t.length - r) % this.blockSize, l = K.concatUint8Array([ this.nextBlock, t.subarray(r, t.length - i) ]), c = this._runCFB(l); @@ -27993,7 +27993,7 @@ zoo const r = Math.min(e.length, t.length); for (let n = 0; n < r; n++) e[n] = e[n] ^ t[n]; } - const ch = (e) => new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4)), B3 = M.getWebCrypto(), qw = M.getNodeCrypto(), Ui = 16; + const ch = (e) => new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4)), B3 = K.getWebCrypto(), qw = K.getNodeCrypto(), Ui = 16; function C3(e, t) { const r = e.length - Ui; for (let n = 0; n < Ui; n++) e[n + r] ^= t[n]; @@ -28001,7 +28001,7 @@ zoo } const Bx = new Uint8Array(Ui); async function Gw(e) { - const t = await Vw(e), r = M.double(await t(Bx)), n = M.double(r); + const t = await Vw(e), r = K.double(await t(Bx)), n = K.double(r); return async function(a) { return (await t((function(i, l, c) { if (i.length && i.length % Ui == 0) return C3(i, l); @@ -28011,11 +28011,11 @@ zoo }; } async function Vw(e) { - if (M.getNodeCrypto()) return async function(t) { + if (K.getNodeCrypto()) return async function(t) { const r = new qw.createCipheriv("aes-" + 8 * e.length + "-cbc", e, Bx).update(t); return new Uint8Array(r); }; - if (M.getWebCrypto()) try { + if (K.getWebCrypto()) try { return e = await B3.importKey("raw", e, { name: "AES-CBC", length: 8 * e.length @@ -28031,7 +28031,7 @@ zoo }; } catch (t) { if (t.name !== "NotSupportedError" && (e.length !== 24 || t.name !== "OperationError")) throw t; - M.printDebugError("Browser did not support operation: " + t.message); + K.printDebugError("Browser did not support operation: " + t.message); } return async function(t) { return c8(e, Bx, { @@ -28039,27 +28039,27 @@ zoo }).encrypt(t); }; } - const k3 = M.getWebCrypto(), Ww = M.getNodeCrypto(), $w = M.getNodeBuffer(), Ac = 16, Cx = Ac, D3 = new Uint8Array(Ac), g8 = new Uint8Array(Ac); + const k3 = K.getWebCrypto(), Ww = K.getNodeCrypto(), $w = K.getNodeBuffer(), Ac = 16, Cx = Ac, D3 = new Uint8Array(Ac), g8 = new Uint8Array(Ac); g8[15] = 1; const m8 = new Uint8Array(Ac); async function Zw(e) { const t = await Gw(e); return function(r, n) { - return t(M.concatUint8Array([ + return t(K.concatUint8Array([ r, n ])); }; } async function Yw(e) { - if (M.getNodeCrypto()) return async function(t, r) { + if (K.getNodeCrypto()) return async function(t, r) { const n = new Ww.createCipheriv("aes-" + 8 * e.length + "-ctr", e, r), a = $w.concat([ n.update(t), n.final() ]); return new Uint8Array(a); }; - if (M.getWebCrypto()) try { + if (K.getWebCrypto()) try { const t = await k3.importKey("raw", e, { name: "AES-CTR", length: 8 * e.length @@ -28076,7 +28076,7 @@ zoo }; } catch (t) { if (t.name !== "NotSupportedError" && (e.length !== 24 || t.name !== "OperationError")) throw t; - M.printDebugError("Browser did not support operation: " + t.message); + K.printDebugError("Browser did not support operation: " + t.message); } return async function(t, r) { return _w(e, r).encrypt(t); @@ -28095,7 +28095,7 @@ zoo r(g8, l) ]), x = await n(a, c), f = await r(m8, x); for (let h = 0; h < Cx; h++) f[h] ^= u[h] ^ c[h]; - return M.concatUint8Array([ + return K.concatUint8Array([ x, f ]); @@ -28108,7 +28108,7 @@ zoo r(m8, c) ]), p = h; for (let m = 0; m < Cx; m++) p[m] ^= f[m] ^ x[m]; - if (!M.equalsUint8Array(u, p)) throw Error("Authentication tag mismatch"); + if (!K.equalsUint8Array(u, p)) throw Error("Authentication tag mismatch"); return await n(c, x); } }; @@ -28136,7 +28136,7 @@ zoo ]); async function Pl(e, t) { const { keySize: r } = gt(e); - if (!M.isAES(e) || t.length !== r) throw Error("Unexpected algorithm or key size"); + if (!K.isAES(e) || t.length !== r) throw Error("Unexpected algorithm or key size"); let n = 0; const a = (u) => c8(t, dl, { disablePadding: true @@ -28147,20 +28147,20 @@ zoo function c(u, x, f, h) { const p = x.length / Jr | 0; (function(N, U) { - const C = M.nbits(Math.max(N.length, U.length) / Jr | 0) - 1; - for (let j = n + 1; j <= C; j++) l[j] = M.double(l[j - 1]); + const C = K.nbits(Math.max(N.length, U.length) / Jr | 0) - 1; + for (let z = n + 1; z <= C; z++) l[z] = K.double(l[z - 1]); n = C; })(x, h); - const m = M.concatUint8Array([ + const m = K.concatUint8Array([ dl.subarray(0, 15 - f.length), Xw, f ]), y = 63 & m[15]; m[15] &= 192; - const B = a(m), v = M.concatUint8Array([ + const B = a(m), v = K.concatUint8Array([ B, Vu(B.subarray(0, 8), B.subarray(1, 9)) - ]), D = M.shiftRight(v.subarray(0 + (y >> 3), 17 + (y >> 3)), 8 - (7 & y)).subarray(1), P = new Uint8Array(Jr), k = new Uint8Array(x.length + y8); + ]), D = K.shiftRight(v.subarray(0 + (y >> 3), 17 + (y >> 3)), 8 - (7 & y)).subarray(1), P = new Uint8Array(Jr), k = new Uint8Array(x.length + y8); let w, _ = 0; for (w = 0; w < p; w++) Rr(D, l[F3(w + 1)]), k.set(Rr(u(Vu(D, x)), D), _), Rr(P, u === a ? x : k.subarray(_)), x = x.subarray(Jr), _ += Jr; if (x.length) { @@ -28172,20 +28172,20 @@ zoo } const T = Rr(a(Rr(Rr(P, D), l.$)), (function(N) { if (!N.length) return dl; - const U = N.length / Jr | 0, C = new Uint8Array(Jr), j = new Uint8Array(Jr); - for (let I = 0; I < U; I++) Rr(C, l[F3(I + 1)]), Rr(j, a(Vu(C, N))), N = N.subarray(Jr); + const U = N.length / Jr | 0, C = new Uint8Array(Jr), z = new Uint8Array(Jr); + for (let I = 0; I < U; I++) Rr(C, l[F3(I + 1)]), Rr(z, a(Vu(C, N))), N = N.subarray(Jr); if (N.length) { Rr(C, l.x); const I = new Uint8Array(Jr); - I.set(N, 0), I[N.length] = 128, Rr(I, C), Rr(j, a(I)); + I.set(N, 0), I[N.length] = 128, Rr(I, C), Rr(z, a(I)); } - return j; + return z; })(h)); return k.set(T, _), k; } return (function() { - const u = a(dl), x = M.double(u); - l = [], l[0] = M.double(x), l.x = u, l.$ = x; + const u = a(dl), x = K.double(u); + l = [], l[0] = K.double(x), l.x = u, l.$ = x; })(), { encrypt: async function(u, x, f) { return c(a, u, x, f); @@ -28195,7 +28195,7 @@ zoo const h = u.subarray(-16); u = u.subarray(0, -16); const p = c(i, u, x, f); - if (M.equalsUint8Array(h, p.subarray(-16))) return p.subarray(0, -16); + if (K.equalsUint8Array(h, p.subarray(-16))) return p.subarray(0, -16); throw Error("Authentication tag mismatch"); } }; @@ -28205,10 +28205,10 @@ zoo for (let n = 0; n < t.length; n++) r[7 + n] ^= t[n]; return r; }, Pl.blockLength = Jr, Pl.ivLength = 15, Pl.tagLength = y8; - const uh = M.getWebCrypto(), S3 = M.getNodeCrypto(), _3 = M.getNodeBuffer(), kx = 16, xh = "AES-GCM"; + const uh = K.getWebCrypto(), S3 = K.getNodeCrypto(), _3 = K.getNodeBuffer(), kx = 16, xh = "AES-GCM"; async function q0(e, t) { if (e !== A.symmetric.aes128 && e !== A.symmetric.aes192 && e !== A.symmetric.aes256) throw Error("GCM mode supports only AES cipher"); - if (M.getNodeCrypto()) return { + if (K.getNodeCrypto()) return { encrypt: async function(r, n, a = new Uint8Array()) { const i = new S3.createCipheriv("aes-" + 8 * t.length + "-gcm", t, n); i.setAAD(a); @@ -28229,7 +28229,7 @@ zoo return new Uint8Array(l); } }; - if (M.getWebCrypto()) try { + if (K.getWebCrypto()) try { const r = await uh.importKey("raw", t, { name: xh }, false, [ @@ -28264,7 +28264,7 @@ zoo }; } catch (r) { if (r.name !== "NotSupportedError" && (t.length !== 24 || r.name !== "OperationError")) throw r; - M.printDebugError("Browser did not support operation: " + r.message); + K.printDebugError("Browser did not support operation: " + r.message); } return { encrypt: async function(r, n, a) { @@ -28296,14 +28296,14 @@ zoo case A.publicKey.rsaEncrypt: case A.publicKey.rsaSign: { const { n: l, e: c } = n; - return Ew(t, a, M.leftPad(r.s, l.length), l, c, i); + return Ew(t, a, K.leftPad(r.s, l.length), l, c, i); } case A.publicKey.dsa: { const { g: l, p: c, q: u, y: x } = n, { r: f, s: h } = r; return (async function(p, m, y, B, v, D, P, k) { - if (m = je(m), y = je(y), D = je(D), P = je(P), v = je(v), k = je(k), m <= wx || m >= P || y <= wx || y >= P) return M.printDebug("invalid DSA Signature"), false; + if (m = je(m), y = je(y), D = je(D), P = je(P), v = je(v), k = je(k), m <= wx || m >= P || y <= wx || y >= P) return K.printDebug("invalid DSA Signature"), false; const w = Xe(je(B.subarray(0, Gr(P))), P), _ = es(y, P); - if (_ === wx) return M.printDebug("invalid DSA Signature"), false; + if (_ === wx) return K.printDebug("invalid DSA Signature"), false; v = Xe(v, D), k = Xe(k, D); const T = Xe(w * _, P), N = Xe(m * _, P); return Xe(Xe(ar(v, T, D) * ar(k, N, D), D), P) === m; @@ -28312,15 +28312,15 @@ zoo case A.publicKey.ecdsa: { const { oid: l, Q: c } = n, u = new Bn(l).payloadSize; return h8(l, t, { - r: M.leftPad(r.r, u), - s: M.leftPad(r.s, u) + r: K.leftPad(r.r, u), + s: K.leftPad(r.s, u) }, a, c, i); } case A.publicKey.eddsaLegacy: { const { oid: l, Q: c } = n, u = new Bn(l).payloadSize; return lm(l, t, { - r: M.leftPad(r.r, u), - s: M.leftPad(r.s, u) + r: K.leftPad(r.r, u), + s: K.leftPad(r.s, u) }, 0, c, i); } case A.publicKey.ed25519: @@ -28415,7 +28415,7 @@ zoo this.encodedM ]) ]; - return M.concatUint8Array(t); + return K.concatUint8Array(t); } async produceKey(t, r) { const n = 2 << this.encodedM - 1; @@ -28426,7 +28426,7 @@ zoo const a = await fl, i = a({ version: 19, type: 2, - password: M.encodeUTF8(t), + password: K.encodeUTF8(t), salt: this.salt, tagLength: r, memorySize: n, @@ -28466,7 +28466,7 @@ zoo this.salt = t.subarray(r, r + 8), r += 8, this.c = t[r++]; break; case "gnu": - if (M.uint8ArrayToString(t.subarray(r, r + 3)) !== "GNU") throw new st("Unknown s2k type."); + if (K.uint8ArrayToString(t.subarray(r, r + 3)) !== "GNU") throw new st("Unknown s2k type."); if (r += 3, 1e3 + t[r++] !== 1001) throw new st("Unknown s2k gnu protection mode."); this.type = "gnu-dummy"; break; @@ -28479,7 +28479,7 @@ zoo if (this.type === "gnu-dummy") return new Uint8Array([ 101, 0, - ...M.stringToUint8Array("GNU"), + ...K.stringToUint8Array("GNU"), 1 ]); const t = [ @@ -28504,30 +28504,30 @@ zoo default: throw Error("Unknown s2k type."); } - return M.concatUint8Array(t); + return K.concatUint8Array(t); } async produceKey(t, r) { - t = M.encodeUTF8(t); + t = K.encodeUTF8(t); const n = []; let a = 0, i = 0; for (; a < r; ) { let l; switch (this.type) { case "simple": - l = M.concatUint8Array([ + l = K.concatUint8Array([ new Uint8Array(i), t ]); break; case "salted": - l = M.concatUint8Array([ + l = K.concatUint8Array([ new Uint8Array(i), this.salt, t ]); break; case "iterated": { - const u = M.concatUint8Array([ + const u = K.concatUint8Array([ this.salt, t ]); @@ -28545,7 +28545,7 @@ zoo const c = await Aa(this.algorithm, l); n.push(c), a += c.length, i++; } - return M.concatUint8Array(n).subarray(0, r); + return K.concatUint8Array(n).subarray(0, r); } } const nv = /* @__PURE__ */ new Set([ @@ -28823,22 +28823,22 @@ zoo ja(t, f++, r), ++a[256]; for (var h = hh(a, 15), p = h.t, m = h.l, y = hh(i, 15), B = y.t, v = y.l, D = N3(p), P = D.c, k = D.n, w = N3(B), _ = w.c, T = w.n, N = new rn(19), U = 0; U < P.length; ++U) ++N[31 & P[U]]; for (U = 0; U < _.length; ++U) ++N[31 & _[U]]; - for (var C = hh(N, 7), j = C.t, I = C.l, R = 19; R > 4 && !j[E8[R - 1]]; --R) ; - var L, O, W, $, X = x + 5 << 3, Y = pl(a, ti) + pl(i, Xl) + l, Q = pl(a, p) + pl(i, B) + l + 14 + 3 * R + pl(N, j) + 2 * N[16] + 3 * N[17] + 7 * N[18]; + for (var C = hh(N, 7), z = C.t, I = C.l, R = 19; R > 4 && !z[E8[R - 1]]; --R) ; + var L, O, W, $, X = x + 5 << 3, Y = pl(a, ti) + pl(i, Xl) + l, Q = pl(a, p) + pl(i, B) + l + 14 + 3 * R + pl(N, z) + 2 * N[16] + 3 * N[17] + 7 * N[18]; if (u >= 0 && X <= Y && X <= Q) return wm(t, f, e.subarray(u, u + x)); if (ja(t, f, 1 + (Q < Y)), f += 2, Q < Y) { L = ga(p, m, 0), O = p, W = ga(B, v, 0), $ = B; - var G = ga(j, I, 0); - for (ja(t, f, k - 257), ja(t, f + 5, T - 1), ja(t, f + 10, R - 4), f += 14, U = 0; U < R; ++U) ja(t, f + 3 * U, j[E8[U]]); + var V = ga(z, I, 0); + for (ja(t, f, k - 257), ja(t, f + 5, T - 1), ja(t, f + 10, R - 4), f += 14, U = 0; U < R; ++U) ja(t, f + 3 * U, z[E8[U]]); f += 3 * R; - for (var K = [ + for (var M = [ P, _ - ], V = 0; V < 2; ++V) { - var ee = K[V]; + ], G = 0; G < 2; ++G) { + var ee = M[G]; for (U = 0; U < ee.length; ++U) { var te = 31 & ee[U]; - ja(t, f, G[te]), f += j[te], te > 15 && (ja(t, f, ee[U] >> 5 & 127), f += ee[U] >> 12); + ja(t, f, V[te]), f += z[te], te > 15 && (ja(t, f, ee[U] >> 5 & 127), f += ee[U] >> 12); } } } else L = ov, O = ti, W = sv, $ = Xl; @@ -28886,19 +28886,19 @@ zoo var m = p.z || c.length, y = new Rt(f + m + 5 * (1 + Math.ceil(m / 7e3)) + h), B = y.subarray(f, y.length - h), v = p.l, D = 7 & (p.r || 0); if (u) { D && (B[0] = p.r >> 3); - for (var P = uv[u - 1], k = P >> 13, w = 8191 & P, _ = (1 << x) - 1, T = p.p || new rn(32768), N = p.h || new rn(_ + 1), U = Math.ceil(x / 3), C = 2 * U, j = function(ft) { + for (var P = uv[u - 1], k = P >> 13, w = 8191 & P, _ = (1 << x) - 1, T = p.p || new rn(32768), N = p.h || new rn(_ + 1), U = Math.ceil(x / 3), C = 2 * U, z = function(ft) { return (c[ft] ^ c[ft + 1] << U ^ c[ft + 2] << C) & _; }, I = new m9(25e3), R = new rn(288), L = new rn(32), O = 0, W = 0, $ = p.i || 0, X = 0, Y = p.w || 0, Q = 0; $ + 2 < m; ++$) { - var G = j($), K = 32767 & $, V = N[G]; - if (T[K] = V, N[G] = K, Y <= $) { + var V = z($), M = 32767 & $, G = N[V]; + if (T[M] = G, N[V] = M, Y <= $) { var ee = m - $; if ((O > 7e3 || X > 24576) && (ee > 423 || !v)) { D = j3(c, B, 0, I, R, L, W, X, Q, $ - Q, D), X = O = W = 0, Q = $; for (var te = 0; te < 286; ++te) R[te] = 0; for (te = 0; te < 30; ++te) L[te] = 0; } - var oe = 2, ie = 0, ce = w, de = K - V & 32767; - if (ee > 2 && G == j($ - de)) for (var he = Math.min(k, ee) - 1, be = Math.min(32767, $), ve = Math.min(258, ee); de <= be && --ce && K != V; ) { + var oe = 2, ie = 0, xe = w, de = M - G & 32767; + if (ee > 2 && V == z($ - de)) for (var he = Math.min(k, ee) - 1, be = Math.min(32767, $), ve = Math.min(258, ee); de <= be && --xe && M != G; ) { if (c[$ + oe] == c[$ + oe - de]) { for (var Ce = 0; Ce < ve && c[$ + Ce] == c[$ + Ce - de]; ++Ce) ; if (Ce > oe) { @@ -28906,11 +28906,11 @@ zoo var Ie = Math.min(de, Ce - 2), Ue = 0; for (te = 0; te < Ie; ++te) { var ge = $ - de + te & 32767, ke = ge - T[ge] & 32767; - ke > Ue && (Ue = ke, V = ge); + ke > Ue && (Ue = ke, G = ge); } } } - de += (K = V) - (V = T[K]) & 32767; + de += (M = G) - (G = T[M]) & 32767; } if (ie) { I[X++] = 268435456 | A8[oe] << 18 | P3[ie]; @@ -28923,8 +28923,8 @@ zoo D = j3(c, B, v, I, R, L, W, X, Q, $ - Q, D), v || (p.r = 7 & D | B[D / 8 | 0] << 3, D -= 7, p.h = N, p.p = T, p.i = $, p.w = Y); } else { for ($ = p.w || 0; $ < m + v; $ += 65535) { - var Me = $ + 65535; - Me >= m && (B[D / 8 | 0] = v, Me = m), D = wm(B, D + 1, c.subarray($, Me)); + var Le = $ + 65535; + Le >= m && (B[D / 8 | 0] = v, Le = m), D = wm(B, D + 1, c.subarray($, Le)); } p.i = m; } @@ -29006,21 +29006,21 @@ zoo } if (_ == 1) v = iv, D = lv, P = 9, k = 5; else if (_ == 2) { - var U = Rn(a, y, 31) + 257, C = Rn(a, y + 10, 15) + 4, j = U + Rn(a, y + 5, 31) + 1; + var U = Rn(a, y, 31) + 257, C = Rn(a, y + 10, 15) + 4, z = U + Rn(a, y + 5, 31) + 1; y += 14; - for (var I = new Rt(j), R = new Rt(19), L = 0; L < C; ++L) R[E8[L]] = Rn(a, y + 3 * L, 7); + for (var I = new Rt(z), R = new Rt(19), L = 0; L < C; ++L) R[E8[L]] = Rn(a, y + 3 * L, 7); y += 3 * C; var O = dh(R), W = (1 << O) - 1, $ = ga(R, O, 1); - for (L = 0; L < j; ) { + for (L = 0; L < z; ) { var X, Y = $[Rn(a, y, W)]; if (y += 15 & Y, (X = Y >> 4) < 16) I[L++] = X; else { - var Q = 0, G = 0; - for (X == 16 ? (G = 3 + Rn(a, y, 3), y += 2, Q = I[L - 1]) : X == 17 ? (G = 3 + Rn(a, y, 7), y += 3) : X == 18 && (G = 11 + Rn(a, y, 127), y += 7); G--; ) I[L++] = Q; + var Q = 0, V = 0; + for (X == 16 ? (V = 3 + Rn(a, y, 3), y += 2, Q = I[L - 1]) : X == 17 ? (V = 3 + Rn(a, y, 7), y += 3) : X == 18 && (V = 11 + Rn(a, y, 127), y += 7); V--; ) I[L++] = Q; } } - var K = I.subarray(0, U), V = I.subarray(U); - P = dh(K), k = dh(V), v = ga(K, P, 1), D = ga(V, k, 1); + var M = I.subarray(0, U), G = I.subarray(U); + P = dh(M), k = dh(G), v = ga(M, P, 1), D = ga(G, k, 1); } else tr(1); if (y > w) { h && tr(0); @@ -29040,23 +29040,23 @@ zoo oe = y, v = null; break; } - var ce = ie - 254; + var xe = ie - 254; if (ie > 264) { var de = vd[L = ie - 257]; - ce = Rn(a, y, (1 << de) - 1) + bm[L], y += de; + xe = Rn(a, y, (1 << de) - 1) + bm[L], y += de; } var he = D[fh(a, y) & te], be = he >> 4; - if (he || tr(3), y += 15 & he, V = av[be], be > 3 && (de = Bd[be], V += fh(a, y) & (1 << de) - 1, y += de), y > w) { + if (he || tr(3), y += 15 & he, G = av[be], be > 3 && (de = Bd[be], G += fh(a, y) & (1 << de) - 1, y += de), y > w) { h && tr(0); break; } f && p(B + 131072); - var ve = B + ce; - if (B < V) { - var Ce = 0 - V, Ie = Math.min(V, ve); + var ve = B + xe; + if (B < G) { + var Ce = 0 - G, Ie = Math.min(G, ve); for (Ce + B < 0 && tr(3); B < Ie; ++B) l[B] = c[Ce + B]; } - for (; B < ve; ++B) l[B] = l[B - V]; + for (; B < ve; ++B) l[B] = l[B - G]; } } i.l = v, i.p = oe, i.b = B, i.f = m, v && (m = 1, i.m = P, i.d = D, i.n = k); @@ -29109,19 +29109,19 @@ zoo return A.packet.literalData; } constructor(t = /* @__PURE__ */ new Date()) { - this.format = A.literal.utf8, this.date = M.normalizeDate(t), this.text = null, this.data = null, this.filename = ""; + this.format = A.literal.utf8, this.date = K.normalizeDate(t), this.text = null, this.data = null, this.filename = ""; } setText(t, r = A.literal.utf8) { this.format = r, this.text = t, this.data = null; } getText(t = false) { - return (this.text === null || M.isStream(this.text)) && (this.text = M.decodeUTF8(M.nativeEOL(this.getBytes(t)))), this.text; + return (this.text === null || K.isStream(this.text)) && (this.text = K.decodeUTF8(K.nativeEOL(this.getBytes(t)))), this.text; } setBytes(t, r) { this.format = r, this.data = t, this.text = null; } getBytes(t = false) { - return this.data === null && (this.data = M.canonicalizeEOL(M.encodeUTF8(this.text))), t ? Ll(this.data) : this.data; + return this.data === null && (this.data = K.canonicalizeEOL(K.encodeUTF8(this.text))), t ? Ll(this.data) : this.data; } setFilename(t) { this.filename = t; @@ -29132,18 +29132,18 @@ zoo async read(t) { await ud(t, (async (r) => { const n = await r.readByte(), a = await r.readByte(); - this.filename = M.decodeUTF8(await r.readBytes(a)), this.date = M.readDate(await r.readBytes(4)); + this.filename = K.decodeUTF8(await r.readBytes(a)), this.date = K.readDate(await r.readBytes(4)); let i = r.remainder(); It(i) && (i = await Mt(i)), this.setBytes(i, n); })); } writeHeader() { - const t = M.encodeUTF8(this.filename), r = new Uint8Array([ + const t = K.encodeUTF8(this.filename), r = new Uint8Array([ t.length ]), n = new Uint8Array([ this.format - ]), a = M.writeDate(this.date); - return M.concatUint8Array([ + ]), a = K.writeDate(this.date); + return K.concatUint8Array([ n, r, t, @@ -29152,7 +29152,7 @@ zoo } write() { const t = this.writeHeader(), r = this.getBytes(); - return M.concat([ + return K.concat([ t, r ]); @@ -29163,13 +29163,13 @@ zoo this.bytes = ""; } read(t) { - return this.bytes = M.uint8ArrayToString(t.subarray(0, 8)), this.bytes.length; + return this.bytes = K.uint8ArrayToString(t.subarray(0, 8)), this.bytes.length; } write() { - return M.stringToUint8Array(this.bytes); + return K.stringToUint8Array(this.bytes); } toHex() { - return M.uint8ArrayToHex(M.stringToUint8Array(this.bytes)); + return K.uint8ArrayToHex(K.stringToUint8Array(this.bytes)); } equals(t, r = false) { return r && (t.isWildcard() || this.isWildcard()) || this.bytes === t.bytes; @@ -29185,7 +29185,7 @@ zoo } static fromID(t) { const r = new ma(); - return r.read(M.hexToUint8Array(t)), r; + return r.read(K.hexToUint8Array(t)), r; } static wildcard() { const t = new ma(); @@ -29219,7 +29219,7 @@ zoo case A.publicKey.rsaEncryptSign: case A.publicKey.rsaEncrypt: case A.publicKey.rsaSign: { - const f = M.readMPI(u.subarray(x)); + const f = K.readMPI(u.subarray(x)); return x += f.length + 2, { read: x, signatureParams: { @@ -29229,9 +29229,9 @@ zoo } case A.publicKey.dsa: case A.publicKey.ecdsa: { - const f = M.readMPI(u.subarray(x)); + const f = K.readMPI(u.subarray(x)); x += f.length + 2; - const h = M.readMPI(u.subarray(x)); + const h = K.readMPI(u.subarray(x)); return x += h.length + 2, { read: x, signatureParams: { @@ -29241,9 +29241,9 @@ zoo }; } case A.publicKey.eddsaLegacy: { - const f = M.readMPI(u.subarray(x)); + const f = K.readMPI(u.subarray(x)); x += f.length + 2; - const h = M.readMPI(u.subarray(x)); + const h = K.readMPI(u.subarray(x)); return x += h.length + 2, { read: x, signatureParams: { @@ -29254,7 +29254,7 @@ zoo } case A.publicKey.ed25519: case A.publicKey.ed448: { - const f = 2 * dd(c), h = M.readExactSubarray(u, x, x + f); + const f = 2 * dd(c), h = K.readExactSubarray(u, x, x + f); return x += h.length, { read: x, signatureParams: { @@ -29276,10 +29276,10 @@ zoo const t = []; return t.push(this.signatureData), t.push(this.writeUnhashedSubPackets()), t.push(this.signedHashValue), this.version === 6 && (t.push(new Uint8Array([ this.salt.length - ])), t.push(this.salt)), t.push(this.writeParams()), M.concat(t); + ])), t.push(this.salt)), t.push(this.writeParams()), K.concat(t); } async sign(t, r, n = /* @__PURE__ */ new Date(), a = false, i) { - this.version = t.version, this.created = M.normalizeDate(n), this.issuerKeyVersion = t.version, this.issuerFingerprint = t.getFingerprintBytes(), this.issuerKeyID = t.getKeyID(); + this.version = t.version, this.created = K.normalizeDate(n), this.issuerKeyVersion = t.version, this.issuerFingerprint = t.getFingerprintBytes(), this.issuerKeyID = t.getKeyID(); const l = [ new Uint8Array([ this.version, @@ -29304,27 +29304,27 @@ zoo }); } } - l.push(this.writeHashedSubPackets()), this.unhashedSubpackets = [], this.signatureData = M.concat(l); + l.push(this.writeHashedSubPackets()), this.unhashedSubpackets = [], this.signatureData = K.concat(l); const c = this.toHash(this.signatureType, r, a), u = await this.hash(this.signatureType, r, c, a); this.signedHashValue = cr(Ki(u), 0, 2); const x = async () => ev(this.publicKeyAlgorithm, this.hashAlgorithm, t.publicParams, t.privateParams, c, await Mt(u)); - M.isStream(u) ? this.params = x() : (this.params = await x(), this[gl] = true); + K.isStream(u) ? this.params = x() : (this.params = await x(), this[gl] = true); } writeHashedSubPackets() { const t = A.signatureSubpacket, r = []; let n; if (this.created === null) throw Error("Missing signature creation time"); - r.push(ht(t.signatureCreationTime, true, M.writeDate(this.created))), this.signatureExpirationTime !== null && r.push(ht(t.signatureExpirationTime, true, M.writeNumber(this.signatureExpirationTime, 4))), this.exportable !== null && r.push(ht(t.exportableCertification, true, new Uint8Array([ + r.push(ht(t.signatureCreationTime, true, K.writeDate(this.created))), this.signatureExpirationTime !== null && r.push(ht(t.signatureExpirationTime, true, K.writeNumber(this.signatureExpirationTime, 4))), this.exportable !== null && r.push(ht(t.exportableCertification, true, new Uint8Array([ this.exportable ? 1 : 0 ]))), this.trustLevel !== null && (n = new Uint8Array([ this.trustLevel, this.trustAmount ]), r.push(ht(t.trustSignature, true, n))), this.regularExpression !== null && r.push(ht(t.regularExpression, true, this.regularExpression)), this.revocable !== null && r.push(ht(t.revocable, true, new Uint8Array([ this.revocable ? 1 : 0 - ]))), this.keyExpirationTime !== null && r.push(ht(t.keyExpirationTime, true, M.writeNumber(this.keyExpirationTime, 4))), this.preferredSymmetricAlgorithms !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.preferredSymmetricAlgorithms)), r.push(ht(t.preferredSymmetricAlgorithms, false, n))), this.revocationKeyClass !== null && (n = new Uint8Array([ + ]))), this.keyExpirationTime !== null && r.push(ht(t.keyExpirationTime, true, K.writeNumber(this.keyExpirationTime, 4))), this.preferredSymmetricAlgorithms !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.preferredSymmetricAlgorithms)), r.push(ht(t.preferredSymmetricAlgorithms, false, n))), this.revocationKeyClass !== null && (n = new Uint8Array([ this.revocationKeyClass, this.revocationKeyAlgorithm - ]), n = M.concat([ + ]), n = K.concat([ n, this.revocationKeyFingerprint ]), r.push(ht(t.revocationKey, false, n))), !this.issuerKeyID.isNull() && this.issuerKeyVersion < 5 && r.push(ht(t.issuerKeyID, false, this.issuerKeyID.write())), this.rawNotations.forEach((({ name: l, value: c, humanReadable: u, critical: x }) => { @@ -29336,30 +29336,30 @@ zoo 0 ]) ]; - const f = M.encodeUTF8(l); - n.push(M.writeNumber(f.length, 2)), n.push(M.writeNumber(c.length, 2)), n.push(f), n.push(c), n = M.concat(n), r.push(ht(t.notationData, x, n)); - })), this.preferredHashAlgorithms !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.preferredHashAlgorithms)), r.push(ht(t.preferredHashAlgorithms, false, n))), this.preferredCompressionAlgorithms !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.preferredCompressionAlgorithms)), r.push(ht(t.preferredCompressionAlgorithms, false, n))), this.keyServerPreferences !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.keyServerPreferences)), r.push(ht(t.keyServerPreferences, false, n))), this.preferredKeyServer !== null && r.push(ht(t.preferredKeyServer, false, M.encodeUTF8(this.preferredKeyServer))), this.isPrimaryUserID !== null && r.push(ht(t.primaryUserID, false, new Uint8Array([ + const f = K.encodeUTF8(l); + n.push(K.writeNumber(f.length, 2)), n.push(K.writeNumber(c.length, 2)), n.push(f), n.push(c), n = K.concat(n), r.push(ht(t.notationData, x, n)); + })), this.preferredHashAlgorithms !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.preferredHashAlgorithms)), r.push(ht(t.preferredHashAlgorithms, false, n))), this.preferredCompressionAlgorithms !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.preferredCompressionAlgorithms)), r.push(ht(t.preferredCompressionAlgorithms, false, n))), this.keyServerPreferences !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.keyServerPreferences)), r.push(ht(t.keyServerPreferences, false, n))), this.preferredKeyServer !== null && r.push(ht(t.preferredKeyServer, false, K.encodeUTF8(this.preferredKeyServer))), this.isPrimaryUserID !== null && r.push(ht(t.primaryUserID, false, new Uint8Array([ this.isPrimaryUserID ? 1 : 0 - ]))), this.policyURI !== null && r.push(ht(t.policyURI, false, M.encodeUTF8(this.policyURI))), this.keyFlags !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.keyFlags)), r.push(ht(t.keyFlags, true, n))), this.signersUserID !== null && r.push(ht(t.signersUserID, false, M.encodeUTF8(this.signersUserID))), this.reasonForRevocationFlag !== null && (n = M.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag) + this.reasonForRevocationString), r.push(ht(t.reasonForRevocation, true, n))), this.features !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.features)), r.push(ht(t.features, false, n))), this.signatureTargetPublicKeyAlgorithm !== null && (n = [ + ]))), this.policyURI !== null && r.push(ht(t.policyURI, false, K.encodeUTF8(this.policyURI))), this.keyFlags !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.keyFlags)), r.push(ht(t.keyFlags, true, n))), this.signersUserID !== null && r.push(ht(t.signersUserID, false, K.encodeUTF8(this.signersUserID))), this.reasonForRevocationFlag !== null && (n = K.stringToUint8Array(String.fromCharCode(this.reasonForRevocationFlag) + this.reasonForRevocationString), r.push(ht(t.reasonForRevocation, true, n))), this.features !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.features)), r.push(ht(t.features, false, n))), this.signatureTargetPublicKeyAlgorithm !== null && (n = [ new Uint8Array([ this.signatureTargetPublicKeyAlgorithm, this.signatureTargetHashAlgorithm ]) - ], n.push(M.stringToUint8Array(this.signatureTargetHash)), n = M.concat(n), r.push(ht(t.signatureTarget, true, n))), this.embeddedSignature !== null && r.push(ht(t.embeddedSignature, true, this.embeddedSignature.write())), this.issuerFingerprint !== null && (n = [ + ], n.push(K.stringToUint8Array(this.signatureTargetHash)), n = K.concat(n), r.push(ht(t.signatureTarget, true, n))), this.embeddedSignature !== null && r.push(ht(t.embeddedSignature, true, this.embeddedSignature.write())), this.issuerFingerprint !== null && (n = [ new Uint8Array([ this.issuerKeyVersion ]), this.issuerFingerprint - ], n = M.concat(n), r.push(ht(t.issuerFingerprint, this.version >= 5, n))), this.preferredAEADAlgorithms !== null && (n = M.stringToUint8Array(M.uint8ArrayToString(this.preferredAEADAlgorithms)), r.push(ht(t.preferredAEADAlgorithms, false, n))), this.preferredCipherSuites !== null && (n = new Uint8Array([].concat(...this.preferredCipherSuites)), r.push(ht(t.preferredCipherSuites, false, n))); - const a = M.concat(r), i = M.writeNumber(a.length, this.version === 6 ? 4 : 2); - return M.concat([ + ], n = K.concat(n), r.push(ht(t.issuerFingerprint, this.version >= 5, n))), this.preferredAEADAlgorithms !== null && (n = K.stringToUint8Array(K.uint8ArrayToString(this.preferredAEADAlgorithms)), r.push(ht(t.preferredAEADAlgorithms, false, n))), this.preferredCipherSuites !== null && (n = new Uint8Array([].concat(...this.preferredCipherSuites)), r.push(ht(t.preferredCipherSuites, false, n))); + const a = K.concat(r), i = K.writeNumber(a.length, this.version === 6 ? 4 : 2); + return K.concat([ i, a ]); } writeUnhashedSubPackets() { - const t = this.unhashedSubpackets.map((({ type: a, critical: i, body: l }) => ht(a, i, l))), r = M.concat(t), n = M.writeNumber(r.length, this.version === 6 ? 4 : 2); - return M.concat([ + const t = this.unhashedSubpackets.map((({ type: a, critical: i, body: l }) => ht(a, i, l))), r = K.concat(t), n = K.writeNumber(r.length, this.version === 6 ? 4 : 2); + return K.concat([ n, r ]); @@ -29373,10 +29373,10 @@ zoo body: t.subarray(n, t.length) }), hv.has(i))) switch (i) { case A.signatureSubpacket.signatureCreationTime: - this.created = M.readDate(t.subarray(n, t.length)); + this.created = K.readDate(t.subarray(n, t.length)); break; case A.signatureSubpacket.signatureExpirationTime: { - const l = M.readNumber(t.subarray(n, t.length)); + const l = K.readNumber(t.subarray(n, t.length)); this.signatureNeverExpires = l === 0, this.signatureExpirationTime = l; break; } @@ -29393,7 +29393,7 @@ zoo this.revocable = t[n++] === 1; break; case A.signatureSubpacket.keyExpirationTime: { - const l = M.readNumber(t.subarray(n, t.length)); + const l = K.readNumber(t.subarray(n, t.length)); this.keyExpirationTime = l, this.keyNeverExpires = l === 0; break; } @@ -29412,17 +29412,17 @@ zoo case A.signatureSubpacket.notationData: { const l = !!(128 & t[n]); n += 4; - const c = M.readNumber(t.subarray(n, n + 2)); + const c = K.readNumber(t.subarray(n, n + 2)); n += 2; - const u = M.readNumber(t.subarray(n, n + 2)); + const u = K.readNumber(t.subarray(n, n + 2)); n += 2; - const x = M.decodeUTF8(t.subarray(n, n + c)), f = t.subarray(n + c, n + c + u); + const x = K.decodeUTF8(t.subarray(n, n + c)), f = t.subarray(n + c, n + c + u); this.rawNotations.push({ name: x, humanReadable: l, value: f, critical: a - }), l && (this.notations[x] = M.decodeUTF8(f)); + }), l && (this.notations[x] = K.decodeUTF8(f)); break; } case A.signatureSubpacket.preferredHashAlgorithms: @@ -29441,13 +29441,13 @@ zoo ]; break; case A.signatureSubpacket.preferredKeyServer: - this.preferredKeyServer = M.decodeUTF8(t.subarray(n, t.length)); + this.preferredKeyServer = K.decodeUTF8(t.subarray(n, t.length)); break; case A.signatureSubpacket.primaryUserID: this.isPrimaryUserID = t[n++] !== 0; break; case A.signatureSubpacket.policyURI: - this.policyURI = M.decodeUTF8(t.subarray(n, t.length)); + this.policyURI = K.decodeUTF8(t.subarray(n, t.length)); break; case A.signatureSubpacket.keyFlags: this.keyFlags = [ @@ -29455,10 +29455,10 @@ zoo ]; break; case A.signatureSubpacket.signersUserID: - this.signersUserID = M.decodeUTF8(t.subarray(n, t.length)); + this.signersUserID = K.decodeUTF8(t.subarray(n, t.length)); break; case A.signatureSubpacket.reasonForRevocation: - this.reasonForRevocationFlag = t[n++], this.reasonForRevocationString = M.decodeUTF8(t.subarray(n, t.length)); + this.reasonForRevocationFlag = t[n++], this.reasonForRevocationString = K.decodeUTF8(t.subarray(n, t.length)); break; case A.signatureSubpacket.features: this.features = [ @@ -29468,7 +29468,7 @@ zoo case A.signatureSubpacket.signatureTarget: { this.signatureTargetPublicKeyAlgorithm = t[n++], this.signatureTargetHashAlgorithm = t[n++]; const l = Wt(this.signatureTargetHashAlgorithm); - this.signatureTargetHash = M.uint8ArrayToString(t.subarray(n, n + l)); + this.signatureTargetHash = K.uint8ArrayToString(t.subarray(n, n + l)); break; } case A.signatureSubpacket.embeddedSignature: @@ -29498,7 +29498,7 @@ zoo } } readSubPackets(t, r = true, n) { - const a = this.version === 6 ? 4 : 2, i = M.readNumber(t.subarray(0, a)); + const a = this.version === 6 ? 4 : 2, i = K.readNumber(t.subarray(0, a)); let l = a; for (; l < 2 + i; ) { const c = Ug(t.subarray(l, t.length)); @@ -29510,10 +29510,10 @@ zoo const n = A.signature; switch (t) { case n.binary: - return r.text !== null ? M.encodeUTF8(r.getText(true)) : r.getBytes(true); + return r.text !== null ? K.encodeUTF8(r.getText(true)) : r.getBytes(true); case n.text: { const a = r.getBytes(true); - return M.canonicalizeEOL(a); + return K.canonicalizeEOL(a); } case n.standalone: return new Uint8Array(0); @@ -29529,19 +29529,19 @@ zoo i = 209, a = r.userAttribute; } const l = a.write(); - return M.concat([ + return K.concat([ this.toSign(n.key, r), new Uint8Array([ i ]), - M.writeNumber(l.length, 4), + K.writeNumber(l.length, 4), l ]); } case n.subkeyBinding: case n.subkeyRevocation: case n.keyBinding: - return M.concat([ + return K.concat([ this.toSign(n.key, r), this.toSign(n.key, { key: r.bind @@ -29569,12 +29569,12 @@ zoo return this.version !== 5 || this.signatureType !== A.signature.binary && this.signatureType !== A.signature.text || (r ? a.push(new Uint8Array(6)) : a.push(t.writeHeader())), a.push(new Uint8Array([ this.version, 255 - ])), this.version === 5 && a.push(new Uint8Array(4)), a.push(M.writeNumber(n, 4)), M.concat(a); + ])), this.version === 5 && a.push(new Uint8Array(4)), a.push(K.writeNumber(n, 4)), K.concat(a); })); } toHash(t, r, n = false) { const a = this.toSign(t, r); - return M.concat([ + return K.concat([ this.salt || new Uint8Array(), a, this.signatureData, @@ -29594,7 +29594,7 @@ zoo if (this.hashed ? f = await this.hashed : (x = this.toHash(r, n, i), f = await this.hash(r, n, x)), f = await Mt(f), this.signedHashValue[0] !== f[0] || this.signedHashValue[1] !== f[1]) throw Error("Signed digest did not match"); if (this.params = await this.params, this[gl] = await Jw(this.publicKeyAlgorithm, this.hashAlgorithm, this.params, t.publicParams, x, f), !this[gl]) throw Error("Signature verification failed"); } - const u = M.normalizeDate(a); + const u = K.normalizeDate(a); if (u && this.created > u) throw Error("Signature creation time is in the future"); if (u && u >= this.getExpirationTime()) throw Error("Signature is expired"); if (l.rejectHashAlgorithms.has(this.hashAlgorithm)) throw Error("Insecure hash algorithm: " + A.read(A.hash, this.hashAlgorithm).toUpperCase()); @@ -29609,7 +29609,7 @@ zoo })), this.revocationKeyClass !== null) throw Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support."); } isExpired(t = /* @__PURE__ */ new Date()) { - const r = M.normalizeDate(t); + const r = K.normalizeDate(t); return r !== null && !(this.created <= r && r < this.getExpirationTime()); } getExpirationTime() { @@ -29620,7 +29620,7 @@ zoo const n = []; return n.push(xd(r.length + 1)), n.push(new Uint8Array([ (t ? 128 : 0) | e - ])), n.push(r), M.concat(n); + ])), n.push(r), K.concat(n); } function ph(e) { switch (e) { @@ -29672,7 +29672,7 @@ zoo this.salt.length ]), this.salt, this.issuerFingerprint) : t.push(this.issuerKeyID.write()), t.push(new Uint8Array([ this.flags - ])), M.concatUint8Array(t); + ])), K.concatUint8Array(t); } calculateTrailer(...t) { return Xi((async () => xr.prototype.calculateTrailer.apply(await this.correspondingSig, t))); @@ -29680,7 +29680,7 @@ zoo async verify() { const t = await this.correspondingSig; if (!t || t.constructor.tag !== A.packet.signature) throw Error("Corresponding signature packet missing"); - if (t.signatureType !== this.signatureType || t.hashAlgorithm !== this.hashAlgorithm || t.publicKeyAlgorithm !== this.publicKeyAlgorithm || !t.issuerKeyID.equals(this.issuerKeyID) || this.version === 3 && t.version === 6 || this.version === 6 && t.version !== 6 || this.version === 6 && !M.equalsUint8Array(t.issuerFingerprint, this.issuerFingerprint) || this.version === 6 && !M.equalsUint8Array(t.salt, this.salt)) throw Error("Corresponding signature packet does not match one-pass signature packet"); + if (t.signatureType !== this.signatureType || t.hashAlgorithm !== this.hashAlgorithm || t.publicKeyAlgorithm !== this.publicKeyAlgorithm || !t.issuerKeyID.equals(this.issuerKeyID) || this.version === 3 && t.version === 6 || this.version === 6 && t.version !== 6 || this.version === 6 && !K.equalsUint8Array(t.issuerFingerprint, this.issuerFingerprint) || this.version === 6 && !K.equalsUint8Array(t.salt, this.salt)) throw Error("Corresponding signature packet does not match one-pass signature packet"); return t.hashed = this.hashed, t.verify.apply(t, arguments); } } @@ -29704,13 +29704,13 @@ zoo } async read(t, r, n = Be, a = null, i = false) { let l; - n.additionalAllowedPackets.length && (l = M.constructAllowedPackets(n.additionalAllowedPackets), r = { + n.additionalAllowedPackets.length && (l = K.constructAllowedPackets(n.additionalAllowedPackets), r = { ...r, ...l }), this.stream = ni(t, (async (u, x) => { const f = qn(u), h = an(x); try { - let p = M.isStream(u); + let p = K.isStream(u); for (; ; ) { let m, y; if (await h.ready, await Bw(f, p, (async (v) => { @@ -29721,13 +29721,13 @@ zoo a == null ? void 0 : a.recordPacket(v.tag, l); } catch (P) { if (n.enforceGrammar) throw P; - M.printDebugError(P); + K.printDebugError(P); } - D.packets = new dt(), D.fromStream = M.isStream(v.packet), y = D.fromStream; + D.packets = new dt(), D.fromStream = K.isStream(v.packet), y = D.fromStream; try { await D.read(v.packet, n); } catch (P) { - throw P instanceof st ? P : M.wrapError(new oh(`Parsing ${D.constructor.name} failed`), P); + throw P instanceof st ? P : K.wrapError(new oh(`Parsing ${D.constructor.name} failed`), P); } await h.write(D); } catch (D) { @@ -29737,7 +29737,7 @@ zoo const T = new o8(v.tag, v.packet); await h.write(T); } - M.printDebugError(D); + K.printDebugError(D); } })), y && (p = null), m) throw await f.readToEnd(), m; const B = await f.peekBytes(2); @@ -29746,7 +29746,7 @@ zoo a == null ? void 0 : a.recordEnd(); } catch (v) { if (n.enforceGrammar) throw v; - M.printDebugError(v); + K.printDebugError(v); } return await h.ready, void await h.close(); } @@ -29766,23 +29766,23 @@ zoo const t = []; for (let r = 0; r < this.length; r++) { const n = this[r] instanceof o8 ? this[r].tag : this[r].constructor.tag, a = this[r].write(); - if (M.isStream(a) && Ex(this[r].constructor.tag)) { + if (K.isStream(a) && Ex(this[r].constructor.tag)) { let i = [], l = 0; const c = 512; t.push(Kx(n)), t.push(Ot(a, ((u) => { if (i.push(u), l += u.length, l >= c) { - const x = Math.min(Math.log(l) / Math.LN2 | 0, 30), f = 2 ** x, h = M.concat([ + const x = Math.min(Math.log(l) / Math.LN2 | 0, 30), f = 2 ** x, h = K.concat([ vw(x) ].concat(i)); return i = [ h.subarray(1 + f) ], l = i[0].length, h.subarray(0, 1 + f); } - }), (() => M.concat([ + }), (() => K.concat([ xd(l) ].concat(i))))); } else { - if (M.isStream(a)) { + if (K.isStream(a)) { let i = 0; t.push(Ot(Ki(a), ((l) => { i += l.length; @@ -29791,7 +29791,7 @@ zoo t.push(a); } } - return M.concat(t); + return K.concat(t); } filterByTag(...t) { const r = new dt(), n = (a) => (i) => a === i; @@ -29879,7 +29879,7 @@ zoo } } } - const gv = M.constructAllowedPackets([ + const gv = K.constructAllowedPackets([ fs, wn, xr @@ -29897,7 +29897,7 @@ zoo })); } write() { - return this.compressed === null && this.compress(), M.concat([ + return this.compressed === null && this.compress(), K.concat([ new Uint8Array([ this.algorithm ]), @@ -29996,7 +29996,7 @@ zoo zip: Vx(Wx("deflate-raw").decompressor, Fx), zlib: Vx(Wx("deflate").decompressor, dv), bzip2: mv() - }, Av = M.constructAllowedPackets([ + }, Av = K.constructAllowedPackets([ fs, bc, wn, @@ -30021,7 +30021,7 @@ zoo })); } write() { - return this.version === 2 ? M.concat([ + return this.version === 2 ? K.concat([ new Uint8Array([ this.version, this.cipherAlgorithm, @@ -30030,7 +30030,7 @@ zoo ]), this.salt, this.encrypted - ]) : M.concat([ + ]) : K.concat([ new Uint8Array([ this.version ]), @@ -30046,11 +30046,11 @@ zoo const c = await gm(t), u = new Uint8Array([ 211, 20 - ]), x = M.concat([ + ]), x = K.concat([ c, l, u - ]), f = await Aa(A.hash.sha1, Ll(x)), h = M.concat([ + ]), f = await Aa(A.hash.sha1, Ll(x)), h = K.concat([ x, f ]); @@ -30071,13 +30071,13 @@ zoo Mt(await Aa(A.hash.sha1, Ll(f))), Mt(x) ]).then((([m, y]) => { - if (!M.equalsUint8Array(m, y)) throw Error("Modification detected."); + if (!K.equalsUint8Array(m, y)) throw Error("Modification detected."); return new Uint8Array(); })), p = cr(f, c + 2); a = cr(p, 0, -2), a = Sr([ a, Xi((() => h)) - ]), M.isStream(i) && n.allowUnauthenticatedStream ? l = true : a = await Mt(a); + ]), K.isStream(i) && n.allowUnauthenticatedStream ? l = true : a = await Mt(a); } return this.packets = await dt.fromBinary(a, Av, n, new Cd(), l), true; } @@ -30095,19 +30095,19 @@ zoo ], 0); let v, D, P = 0, k = Promise.resolve(), w = 0, _ = 0; if (a) { - const { keySize: N } = gt(e.cipherAlgorithm), { ivLength: U } = l, C = new Uint8Array(h, 0, 5), j = await ei(A.hash.sha256, r, e.salt, C, N + U); - r = j.subarray(0, N), v = j.subarray(N), v.fill(0, v.length - 8), D = new DataView(v.buffer, v.byteOffset, v.byteLength); + const { keySize: N } = gt(e.cipherAlgorithm), { ivLength: U } = l, C = new Uint8Array(h, 0, 5), z = await ei(A.hash.sha256, r, e.salt, C, N + U); + r = z.subarray(0, N), v = z.subarray(N), v.fill(0, v.length - 8), D = new DataView(v.buffer, v.byteOffset, v.byteLength); } else v = e.iv; const T = await l(e.cipherAlgorithm, r); return ni(n, (async (N, U) => { - if (M.isStream(N) !== "array") { + if (K.isStream(N) !== "array") { const I = new TransformStream({}, { - highWaterMark: M.getHardwareConcurrency() * 2 ** (e.chunkSizeByte + 6), + highWaterMark: K.getHardwareConcurrency() * 2 ** (e.chunkSizeByte + 6), size: (R) => R.length }); J0(I.readable, U), U = I.writable; } - const C = qn(N), j = an(U); + const C = qn(N), z = an(U); try { for (; ; ) { let I = await C.readBytes(x + c) || new Uint8Array(); @@ -30121,20 +30121,20 @@ zoo if (!P || I.length ? (C.unshift(R), L = T[t](I, W, p), L.catch((() => { })), _ += I.length - c + u) : (y.setInt32(5 + f + 4, w), L = T[t](R, W, m), L.catch((() => { })), _ += u, O = true), w += I.length - c, k = k.then((() => L)).then((async ($) => { - await j.ready, await j.write($), _ -= $.length; - })).catch((($) => j.abort($))), (O || _ > j.desiredSize) && await k, O) { - await j.close(); + await z.ready, await z.write($), _ -= $.length; + })).catch((($) => z.abort($))), (O || _ > z.desiredSize) && await k, O) { + await z.close(); break; } a ? D.setInt32(v.length - 4, ++P) : y.setInt32(9, ++P); } } catch (I) { - await j.ready.catch((() => { - })), await j.abort(I); + await z.ready.catch((() => { + })), await z.abort(I); } })); } - const bv = M.constructAllowedPackets([ + const bv = K.constructAllowedPackets([ fs, bc, wn, @@ -30157,7 +30157,7 @@ zoo })); } write() { - return M.concat([ + return K.concat([ new Uint8Array([ this.version, this.cipherAlgorithm, @@ -30208,17 +30208,17 @@ zoo case A.publicKey.rsaEncrypt: case A.publicKey.rsaEncryptSign: return { - c: M.readMPI(a.subarray(i)) + c: K.readMPI(a.subarray(i)) }; case A.publicKey.elgamal: { - const l = M.readMPI(a.subarray(i)); + const l = K.readMPI(a.subarray(i)); return i += l.length + 2, { c1: l, - c2: M.readMPI(a.subarray(i)) + c2: K.readMPI(a.subarray(i)) }; } case A.publicKey.ecdh: { - const l = M.readMPI(a.subarray(i)); + const l = K.readMPI(a.subarray(i)); i += l.length + 2; const c = new hm(); return c.read(a.subarray(i)), { @@ -30228,7 +30228,7 @@ zoo } case A.publicKey.x25519: case A.publicKey.x448: { - const l = Q0(n), c = M.readExactSubarray(a, i, i + l); + const l = Q0(n), c = K.readExactSubarray(a, i, i + l); i += c.length; const u = new Ad(); return u.read(a.subarray(i)), { @@ -30257,7 +30257,7 @@ zoo 0 ])) : t.push(this.publicKeyID.write()), t.push(new Uint8Array([ this.publicKeyAlgorithm - ]), rs(this.publicKeyAlgorithm, this.encrypted)), M.concatUint8Array(t); + ]), rs(this.publicKeyAlgorithm, this.encrypted)), K.concatUint8Array(t); } async encrypt(t) { const r = A.write(A.publicKey, this.publicKeyAlgorithm), n = this.version === 3 ? this.sessionKeyAlgorithm : null, a = t.version === 5 ? t.getFingerprintBytes().subarray(0, 20) : t.getFingerprintBytes(), i = R3(this.version, r, n, this.sessionKey); @@ -30271,7 +30271,7 @@ zoo case A.publicKey.rsaEncryptSign: case A.publicKey.elgamal: case A.publicKey.ecdh: { - const p = f.subarray(0, f.length - 2), m = f.subarray(f.length - 2), y = M.writeChecksum(p.subarray(p.length % 8)), B = y[0] === m[0] & y[1] === m[1], v = u === 6 ? { + const p = f.subarray(0, f.length - 2), m = f.subarray(f.length - 2), y = K.writeChecksum(p.subarray(p.length % 8)), B = y[0] === m[0] & y[1] === m[1], v = u === 6 ? { sessionKeyAlgorithm: null, sessionKey: p } : { @@ -30281,8 +30281,8 @@ zoo if (h) { const D = B & v.sessionKeyAlgorithm === h.sessionKeyAlgorithm & v.sessionKey.length === h.sessionKey.length; return { - sessionKey: M.selectUint8Array(D, v.sessionKey, h.sessionKey), - sessionKeyAlgorithm: u === 6 ? null : M.selectUint8(D, v.sessionKeyAlgorithm, h.sessionKeyAlgorithm) + sessionKey: K.selectUint8Array(D, v.sessionKey, h.sessionKey), + sessionKeyAlgorithm: u === 6 ? null : K.selectUint8(D, v.sessionKeyAlgorithm, h.sessionKeyAlgorithm) }; } if (B && (u === 6 || A.read(A.symmetric, v.sessionKeyAlgorithm))) return v; @@ -30311,12 +30311,12 @@ zoo case A.publicKey.rsaEncryptSign: case A.publicKey.elgamal: case A.publicKey.ecdh: - return M.concatUint8Array([ + return K.concatUint8Array([ new Uint8Array(e === 6 ? [] : [ r ]), n, - M.writeChecksum(n.subarray(n.length % 8)) + K.writeChecksum(n.subarray(n.length % 8)) ]); case A.publicKey.x25519: case A.publicKey.x448: @@ -30351,7 +30351,7 @@ zoo const n = this.s2k.write(); if (this.version === 6) { const a = n.length, i = 3 + a + this.iv.length; - r = M.concatUint8Array([ + r = K.concatUint8Array([ new Uint8Array([ this.version, i, @@ -30363,7 +30363,7 @@ zoo this.iv, this.encrypted ]); - } else this.version === 5 ? r = M.concatUint8Array([ + } else this.version === 5 ? r = K.concatUint8Array([ new Uint8Array([ this.version, t, @@ -30372,13 +30372,13 @@ zoo n, this.iv, this.encrypted - ]) : (r = M.concatUint8Array([ + ]) : (r = K.concatUint8Array([ new Uint8Array([ this.version, t ]), n - ]), this.encrypted !== null && (r = M.concatUint8Array([ + ]), this.encrypted !== null && (r = K.concatUint8Array([ r, this.encrypted ]))); @@ -30414,7 +30414,7 @@ zoo ]), x = this.version === 6 ? await ei(A.hash.sha256, l, new Uint8Array(), u, i) : l, f = await c(n, x); this.encrypted = await f.encrypt(this.sessionKey, this.iv, u); } else { - const c = M.concatUint8Array([ + const c = K.concatUint8Array([ new Uint8Array([ this.sessionKeyAlgorithm ]), @@ -30429,7 +30429,7 @@ zoo return A.packet.publicKey; } constructor(t = /* @__PURE__ */ new Date(), r = Be) { - this.version = r.v6Keys ? 6 : 4, this.created = M.normalizeDate(t), this.algorithm = null, this.publicParams = null, this.expirationTimeV3 = 0, this.fingerprint = null, this.keyID = null; + this.version = r.v6Keys ? 6 : 4, this.created = K.normalizeDate(t), this.algorithm = null, this.publicParams = null, this.expirationTimeV3 = 0, this.fingerprint = null, this.keyID = null; } static fromSecretKeyPacket(t) { const r = new da(), { version: n, created: a, algorithm: i, publicParams: l, keyID: c, fingerprint: u } = t; @@ -30439,16 +30439,16 @@ zoo let n = 0; if (this.version = t[n++], this.version === 5 && !r.enableParsingV5Entities) throw new st("Support for parsing v5 entities is disabled; turn on `config.enableParsingV5Entities` if needed"); if (this.version === 4 || this.version === 5 || this.version === 6) { - this.created = M.readDate(t.subarray(n, n + 4)), n += 4, this.algorithm = t[n++], this.version >= 5 && (n += 4); + this.created = K.readDate(t.subarray(n, n + 4)), n += 4, this.algorithm = t[n++], this.version >= 5 && (n += 4); const { read: a, publicParams: i } = (function(l, c) { let u = 0; switch (l) { case A.publicKey.rsaEncrypt: case A.publicKey.rsaEncryptSign: case A.publicKey.rsaSign: { - const x = M.readMPI(c.subarray(u)); + const x = K.readMPI(c.subarray(u)); u += x.length + 2; - const f = M.readMPI(c.subarray(u)); + const f = K.readMPI(c.subarray(u)); return u += f.length + 2, { read: u, publicParams: { @@ -30458,13 +30458,13 @@ zoo }; } case A.publicKey.dsa: { - const x = M.readMPI(c.subarray(u)); + const x = K.readMPI(c.subarray(u)); u += x.length + 2; - const f = M.readMPI(c.subarray(u)); + const f = K.readMPI(c.subarray(u)); u += f.length + 2; - const h = M.readMPI(c.subarray(u)); + const h = K.readMPI(c.subarray(u)); u += h.length + 2; - const p = M.readMPI(c.subarray(u)); + const p = K.readMPI(c.subarray(u)); return u += p.length + 2, { read: u, publicParams: { @@ -30476,11 +30476,11 @@ zoo }; } case A.publicKey.elgamal: { - const x = M.readMPI(c.subarray(u)); + const x = K.readMPI(c.subarray(u)); u += x.length + 2; - const f = M.readMPI(c.subarray(u)); + const f = K.readMPI(c.subarray(u)); u += f.length + 2; - const h = M.readMPI(c.subarray(u)); + const h = K.readMPI(c.subarray(u)); return u += h.length + 2, { read: u, publicParams: { @@ -30493,7 +30493,7 @@ zoo case A.publicKey.ecdsa: { const x = new Wa(); u += x.read(c), lh(x); - const f = M.readMPI(c.subarray(u)); + const f = K.readMPI(c.subarray(u)); return u += f.length + 2, { read: u, publicParams: { @@ -30505,8 +30505,8 @@ zoo case A.publicKey.eddsaLegacy: { const x = new Wa(); if (u += x.read(c), lh(x), x.getName() !== A.curve.ed25519Legacy) throw Error("Unexpected OID for eddsaLegacy"); - let f = M.readMPI(c.subarray(u)); - return u += f.length + 2, f = M.leftPad(f, 33), { + let f = K.readMPI(c.subarray(u)); + return u += f.length + 2, f = K.leftPad(f, 33), { read: u, publicParams: { oid: x, @@ -30517,7 +30517,7 @@ zoo case A.publicKey.ecdh: { const x = new Wa(); u += x.read(c), lh(x); - const f = M.readMPI(c.subarray(u)); + const f = K.readMPI(c.subarray(u)); u += f.length + 2; const h = new pm(); return u += h.read(c.subarray(u)), { @@ -30533,7 +30533,7 @@ zoo case A.publicKey.ed448: case A.publicKey.x25519: case A.publicKey.x448: { - const x = M.readExactSubarray(c, u, u + Q0(l)); + const x = K.readExactSubarray(c, u, u + Q0(l)); return u += x.length, { read: u, publicParams: { @@ -30554,19 +30554,19 @@ zoo const t = []; t.push(new Uint8Array([ this.version - ])), t.push(M.writeDate(this.created)), t.push(new Uint8Array([ + ])), t.push(K.writeDate(this.created)), t.push(new Uint8Array([ this.algorithm ])); const r = rs(this.algorithm, this.publicParams); - return this.version >= 5 && t.push(M.writeNumber(r.length, 4)), t.push(r), M.concatUint8Array(t); + return this.version >= 5 && t.push(K.writeNumber(r.length, 4)), t.push(r), K.concatUint8Array(t); } writeForHash(t) { const r = this.writePublicKey(), n = 149 + t, a = t >= 5 ? 4 : 2; - return M.concatUint8Array([ + return K.concatUint8Array([ new Uint8Array([ n ]), - M.writeNumber(r.length, a), + K.writeNumber(r.length, a), r ]); } @@ -30598,20 +30598,20 @@ zoo return this.fingerprint; } getFingerprint() { - return M.uint8ArrayToHex(this.getFingerprintBytes()); + return K.uint8ArrayToHex(this.getFingerprintBytes()); } hasSameFingerprintAs(t) { - return this.version === t.version && M.equalsUint8Array(this.writePublicKey(), t.writePublicKey()); + return this.version === t.version && K.equalsUint8Array(this.writePublicKey(), t.writePublicKey()); } getAlgorithmInfo() { const t = {}; t.algorithm = A.read(A.publicKey, this.algorithm); const r = this.publicParams.n || this.publicParams.p; - return r ? t.bits = M.uint8ArrayBitLength(r) : this.publicParams.oid && (t.curve = this.publicParams.oid.getName()), t; + return r ? t.bits = K.uint8ArrayBitLength(r) : this.publicParams.oid && (t.curve = this.publicParams.oid.getName()), t; } } da.prototype.readPublicKey = da.prototype.read, da.prototype.writePublicKey = da.prototype.write; - const vv = M.constructAllowedPackets([ + const vv = K.constructAllowedPackets([ fs, bc, wn, @@ -30637,7 +30637,7 @@ zoo } async encrypt(t, r, n = Be) { const a = this.packets.write(), { blockSize: i } = gt(t), l = await gm(t), c = await Yl(t, r, l, new Uint8Array(i)), u = await Yl(t, r, a, c.subarray(2)); - this.encrypted = M.concat([ + this.encrypted = K.concat([ c, u ]); @@ -30666,13 +30666,13 @@ zoo let r = 0; for (; r < t.length; ) { const n = Ug(t.subarray(r, t.length)); - r += n.offset, this.attributes.push(M.uint8ArrayToString(t.subarray(r, r + n.len))), r += n.len; + r += n.offset, this.attributes.push(K.uint8ArrayToString(t.subarray(r, r + n.len))), r += n.len; } } write() { const t = []; - for (let r = 0; r < this.attributes.length; r++) t.push(xd(this.attributes[r].length)), t.push(M.stringToUint8Array(this.attributes[r])); - return M.concatUint8Array(t); + for (let r = 0; r < this.attributes.length; r++) t.push(xd(this.attributes[r].length)), t.push(K.stringToUint8Array(this.attributes[r])); + return K.concatUint8Array(t); } equals(t) { return !!(t && t instanceof E9) && this.attributes.every((function(r, n) { @@ -30705,7 +30705,7 @@ zoo if (this.version === 5 && (n += 4), this.keyMaterial = t.subarray(n), this.isEncrypted = !!this.s2kUsage, !this.isEncrypted) { let i; if (this.version === 6) i = this.keyMaterial; - else if (i = this.keyMaterial.subarray(0, -2), !M.equalsUint8Array(M.writeChecksum(i), this.keyMaterial.subarray(-2))) throw Error("Key checksum mismatch"); + else if (i = this.keyMaterial.subarray(0, -2), !K.equalsUint8Array(K.writeChecksum(i), this.keyMaterial.subarray(-2))) throw Error("Key checksum mismatch"); try { const { read: l, privateParams: c } = w3(this.algorithm, i, this.publicParams); if (l < i.length) throw Error("Error reading MPIs"); @@ -30717,7 +30717,7 @@ zoo } write() { const t = this.writePublicKey(); - if (this.unparseableKeyMaterial) return M.concatUint8Array([ + if (this.unparseableKeyMaterial) return K.concatUint8Array([ t, this.unparseableKeyMaterial ]); @@ -30735,7 +30735,7 @@ zoo } return this.s2kUsage && this.s2k.type !== "gnu-dummy" && n.push(...this.iv), (this.version === 5 || this.version === 6 && this.s2kUsage) && r.push(new Uint8Array([ n.length - ])), r.push(new Uint8Array(n)), this.isDummy() || (this.s2kUsage || (this.keyMaterial = rs(this.algorithm, this.privateParams)), this.version === 5 && r.push(M.writeNumber(this.keyMaterial.length, 4)), r.push(this.keyMaterial), this.s2kUsage || this.version === 6 || r.push(M.writeChecksum(this.keyMaterial))), M.concatUint8Array(r); + ])), r.push(new Uint8Array(n)), this.isDummy() || (this.s2kUsage || (this.keyMaterial = rs(this.algorithm, this.privateParams)), this.version === 5 && r.push(K.writeNumber(this.keyMaterial.length, 4)), r.push(this.keyMaterial), this.s2kUsage || this.version === 6 || r.push(K.writeChecksum(this.keyMaterial))), K.concatUint8Array(r); } isDecrypted() { return this.isEncrypted === false; @@ -30763,7 +30763,7 @@ zoo this.isLegacyAEAD = this.version === 5, this.usedModernAEAD = !this.isLegacyAEAD; const l = Kx(this.constructor.tag), c = await gh(this.version, this.s2k, t, this.symmetric, this.aead, l, this.isLegacyAEAD), u = await i(this.symmetric, c); this.iv = this.isLegacyAEAD ? ur(a) : ur(i.ivLength); - const x = this.isLegacyAEAD ? new Uint8Array() : M.concatUint8Array([ + const x = this.isLegacyAEAD ? new Uint8Array() : K.concatUint8Array([ l, this.writePublicKey() ]); @@ -30771,7 +30771,7 @@ zoo } else { this.s2kUsage = 254, this.usedModernAEAD = false; const i = await gh(this.version, this.s2k, t, this.symmetric); - this.iv = ur(a), this.keyMaterial = await Yl(this.symmetric, i, M.concatUint8Array([ + this.iv = ur(a), this.keyMaterial = await Yl(this.symmetric, i, K.concatUint8Array([ n, await Aa(A.hash.sha1, n) ]), this.iv); @@ -30788,7 +30788,7 @@ zoo if (r = await gh(this.version, this.s2k, t, this.symmetric, this.aead, n, this.isLegacyAEAD), this.s2kUsage === 253) { const i = $a(this.aead, true), l = await i(this.symmetric, r); try { - const c = this.isLegacyAEAD ? new Uint8Array() : M.concatUint8Array([ + const c = this.isLegacyAEAD ? new Uint8Array() : K.concatUint8Array([ n, this.writePublicKey() ]); @@ -30800,7 +30800,7 @@ zoo const i = await bd(this.symmetric, r, this.keyMaterial, this.iv); a = i.subarray(0, -20); const l = await Aa(A.hash.sha1, a); - if (!M.equalsUint8Array(l, i.subarray(-20))) throw Error("Incorrect key passphrase"); + if (!K.equalsUint8Array(l, i.subarray(-20))) throw Error("Incorrect key passphrase"); } try { const { privateParams: i } = w3(this.algorithm, a, this.publicParams); @@ -30838,7 +30838,7 @@ zoo if (t.type === "simple" && e === 6) throw Error("Using Simple S2K with version 6 keys is not allowed"); const { keySize: c } = gt(n), u = await t.produceKey(r, c); if (!a || e === 5 || l) return u; - const x = M.concatUint8Array([ + const x = K.concatUint8Array([ i, new Uint8Array([ e, @@ -30856,14 +30856,14 @@ zoo this.userID = "", this.name = "", this.email = "", this.comment = ""; } static fromObject(t) { - if (M.isString(t) || t.name && !M.isString(t.name) || t.email && !M.isEmailAddress(t.email) || t.comment && !M.isString(t.comment)) throw Error("Invalid user ID format"); + if (K.isString(t) || t.name && !K.isString(t.name) || t.email && !K.isEmailAddress(t.email) || t.comment && !K.isString(t.comment)) throw Error("Invalid user ID format"); const r = new A9(); Object.assign(r, t); const n = []; return r.name && n.push(r.name), r.comment && n.push(`(${r.comment})`), r.email && n.push(`<${r.email}>`), r.userID = n.join(" "), r; } read(t, r = Be) { - const n = M.decodeUTF8(t); + const n = K.decodeUTF8(t); if (n.length > r.maxUserIDLength) throw Error("User ID string is too long"); const a = (c) => /^[^\s@]+@[^\s@]+$/.test(c), i = n.indexOf("<"), l = n.lastIndexOf(">"); if (i !== -1 && l !== -1 && l > i) { @@ -30877,7 +30877,7 @@ zoo this.userID = n; } write() { - return M.encodeUTF8(this.userID); + return K.encodeUTF8(this.userID); } equals(t) { return t && t.userID === this.userID; @@ -30917,11 +30917,11 @@ zoo } catch (x) { c = x; } - if (!l) throw M.wrapError(`Could not find valid ${A.read(A.signature, r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ", "self-").replace(/([a-z])([A-Z])/g, ((u, x, f) => x + " " + f.toLowerCase())), c); + if (!l) throw K.wrapError(`Could not find valid ${A.read(A.signature, r)} signature in key ${t.getKeyID().toHex()}`.replace("certGeneric ", "self-").replace(/([a-z])([A-Z])/g, ((u, x, f) => x + " " + f.toLowerCase())), c); return l; } function v8(e, t, r = /* @__PURE__ */ new Date()) { - const n = M.normalizeDate(r); + const n = K.normalizeDate(r); if (n !== null) { const a = Zx(e, t); return !(e.created <= n && n < a); @@ -30991,7 +30991,7 @@ zoo async function Ti(e, t, r, n = /* @__PURE__ */ new Date(), a) { (e = e[r]) && (t[r].length ? await Promise.all(e.map((async function(i) { i.isExpired(n) || a && !await a(i) || t[r].some((function(l) { - return M.equalsUint8Array(l.writeParams(), i.writeParams()); + return K.equalsUint8Array(l.writeParams(), i.writeParams()); })) || t[r].push(i); }))) : t[r] = e); } @@ -31017,7 +31017,7 @@ zoo return t.keyNeverExpires === false && (r = e.created.getTime() + 1e3 * t.keyExpirationTime), r ? new Date(r) : 1 / 0; } function Fv(e, t = {}) { - switch (e.type = e.type || t.type, e.curve = e.curve || t.curve, e.rsaBits = e.rsaBits || t.rsaBits, e.keyExpirationTime = e.keyExpirationTime !== void 0 ? e.keyExpirationTime : t.keyExpirationTime, e.passphrase = M.isString(e.passphrase) ? e.passphrase : t.passphrase, e.date = e.date || t.date, e.sign = e.sign || false, e.type) { + switch (e.type = e.type || t.type, e.curve = e.curve || t.curve, e.rsaBits = e.rsaBits || t.rsaBits, e.keyExpirationTime = e.keyExpirationTime !== void 0 ? e.keyExpirationTime : t.keyExpirationTime, e.passphrase = K.isString(e.passphrase) ? e.passphrase : t.passphrase, e.date = e.date || t.date, e.sign = e.sign || false, e.type) { case "ecc": try { e.curve = A.write(A.curve, e.curve); @@ -31156,7 +31156,7 @@ zoo try { await t.verify(h.keyPacket, A.signature.certGeneric, c, n, void 0, a); } catch (p) { - throw M.wrapError("User certificate is invalid", p); + throw K.wrapError("User certificate is invalid", p); } }))), true); } @@ -31181,7 +31181,7 @@ zoo try { await u.verify(a, A.signature.certGeneric, i, t, void 0, r); } catch (x) { - throw M.wrapError("Self-certification is invalid", x); + throw K.wrapError("Self-certification is invalid", x); } return true; } catch (u) { @@ -31313,7 +31313,7 @@ zoo return this.keyPacket[e](); }; })); - const Sv = M.constructAllowedPackets([ + const Sv = K.constructAllowedPackets([ xr ]), O3 = /* @__PURE__ */ new Set([ A.packet.publicKey, @@ -31359,7 +31359,7 @@ zoo case A.signature.certCasual: case A.signature.certPositive: if (!n) { - M.printDebug("Dropping certification signatures without preceding user packet"); + K.printDebug("Dropping certification signatures without preceding user packet"); continue; } c.issuerKeyID.equals(a) ? n.selfCertifications.push(c) : n.otherCertifications.push(c); @@ -31372,7 +31372,7 @@ zoo break; case A.signature.subkeyBinding: if (!i) { - M.printDebug("Dropping subkey binding signature without preceding subkey packet"); + K.printDebug("Dropping subkey binding signature without preceding subkey packet"); continue; } i.bindingSignatures.push(c); @@ -31382,7 +31382,7 @@ zoo break; case A.signature.subkeyRevocation: if (!i) { - M.printDebug("Dropping subkey revocation signature without preceding subkey packet"); + K.printDebug("Dropping subkey revocation signature without preceding subkey packet"); continue; } i.revocationSignatures.push(c); @@ -31426,7 +31426,7 @@ zoo try { Fi(i, a); } catch (u) { - throw M.wrapError("Could not verify primary key", u); + throw K.wrapError("Could not verify primary key", u); } const l = this.subkeys.slice().sort(((u, x) => x.keyPacket.created - u.keyPacket.created || x.keyPacket.algorithm - u.keyPacket.algorithm)); let c; @@ -31450,7 +31450,7 @@ zoo } catch (u) { c = u; } - throw M.wrapError("Could not find valid signing key packet in key " + this.getKeyID().toHex(), c); + throw K.wrapError("Could not find valid signing key packet in key " + this.getKeyID().toHex(), c); } async getEncryptionKey(t, r = /* @__PURE__ */ new Date(), n = {}, a = Be) { await this.verifyPrimaryKey(r, n, a); @@ -31458,7 +31458,7 @@ zoo try { Fi(i, a); } catch (u) { - throw M.wrapError("Could not verify primary key", u); + throw K.wrapError("Could not verify primary key", u); } const l = this.subkeys.slice().sort(((u, x) => x.keyPacket.created - u.keyPacket.created || x.keyPacket.algorithm - u.keyPacket.algorithm)); let c; @@ -31478,7 +31478,7 @@ zoo } catch (u) { c = u; } - throw M.wrapError("Could not find valid encryption key packet in key " + this.getKeyID().toHex(), c); + throw K.wrapError("Could not find valid encryption key packet in key " + this.getKeyID().toHex(), c); } async isRevoked(t, r, n = /* @__PURE__ */ new Date(), a = Be) { return os(this.keyPacket, A.signature.keyRevocation, { @@ -31511,7 +31511,7 @@ zoo } catch { n = null; } - return M.normalizeDate(n); + return K.normalizeDate(n); } async getPrimarySelfSignature(t = /* @__PURE__ */ new Date(), r = {}, n = Be) { const a = this.keyPacket; @@ -31593,7 +31593,7 @@ zoo key: this.keyPacket }, r, void 0, n); } catch (c) { - throw M.wrapError("Could not verify revocation signature", c); + throw K.wrapError("Could not verify revocation signature", c); } const l = this.clone(); return l.revocationSignatures.push(i), l; @@ -31791,7 +31791,7 @@ zoo return c.push(i, l), new Dd(c); } } - const Sm = M.constructAllowedPackets([ + const Sm = K.constructAllowedPackets([ da, kd, Cm, @@ -31814,8 +31814,8 @@ zoo ...Be, ...r }, !e && !t) throw Error("readKey: must pass options object containing `armoredKey` or `binaryKey`"); - if (e && !M.isString(e)) throw Error("readKey: options.armoredKey must be a string"); - if (t && !M.isUint8Array(t)) throw Error("readKey: options.binaryKey must be a Uint8Array"); + if (e && !K.isString(e)) throw Error("readKey: options.armoredKey must be a string"); + if (t && !K.isUint8Array(t)) throw Error("readKey: options.binaryKey must be a Uint8Array"); const a = Object.keys(n); if (a.length > 0) throw Error("Unknown option: " + a.join(", ")); let i; @@ -31833,8 +31833,8 @@ zoo ...Be, ...r }, !e && !t) throw Error("readPrivateKey: must pass options object containing `armoredKey` or `binaryKey`"); - if (e && !M.isString(e)) throw Error("readPrivateKey: options.armoredKey must be a string"); - if (t && !M.isUint8Array(t)) throw Error("readPrivateKey: options.binaryKey must be a Uint8Array"); + if (e && !K.isString(e)) throw Error("readPrivateKey: options.armoredKey must be a string"); + if (t && !K.isUint8Array(t)) throw Error("readPrivateKey: options.binaryKey must be a Uint8Array"); const a = Object.keys(n); if (a.length > 0) throw Error("Unknown option: " + a.join(", ")); let i; @@ -31851,7 +31851,7 @@ zoo } throw Error("No secret key packet found"); } - const Pv = M.constructAllowedPackets([ + const Pv = K.constructAllowedPackets([ fs, bc, wv, @@ -31861,9 +31861,9 @@ zoo as, wn, xr - ]), Nv = M.constructAllowedPackets([ + ]), Nv = K.constructAllowedPackets([ as - ]), jv = M.constructAllowedPackets([ + ]), jv = K.constructAllowedPackets([ xr ]); class mn { @@ -31886,12 +31886,12 @@ zoo const c = l[0], u = c.cipherAlgorithm, x = n || await this.decryptSessionKeys(t, r, u, a, i); let f = null; const h = Promise.all(x.map((async ({ algorithm: m, data: y }) => { - if (!M.isUint8Array(y) || !c.cipherAlgorithm && !M.isString(m)) throw Error("Invalid session key for decryption."); + if (!K.isUint8Array(y) || !c.cipherAlgorithm && !K.isString(m)) throw Error("Invalid session key for decryption."); try { const B = c.cipherAlgorithm || A.write(A.symmetric, m); await c.decrypt(B, y, i); } catch (B) { - M.printDebugError(B), f = B; + K.printDebugError(B), f = B; } }))); if (t8(c.encrypted), c.encrypted = null, await h, !c.packets || !c.packets.length) throw f || Error("Decryption failed."); @@ -31909,7 +31909,7 @@ zoo try { await p.decrypt(x), c.push(p); } catch (m) { - M.printDebugError(m), m instanceof wd && (l = m); + K.printDebugError(m), m instanceof wd && (l = m); } }))); }))); @@ -31953,7 +31953,7 @@ zoo try { await v.decrypt(m, D), c.push(v); } catch (P) { - M.printDebugError(P), l = P; + K.printDebugError(P), l = P; } }))); } else try { @@ -31962,7 +31962,7 @@ zoo if (y && !p.includes(A.write(A.symmetric, y))) throw Error("A non-preferred symmetric algorithm was used."); c.push(x); } catch (y) { - M.printDebugError(y), l = y; + K.printDebugError(y), l = y; } }))); }))), t8(x.encrypted), x.encrypted = null; @@ -31973,7 +31973,7 @@ zoo if (c.length > 1) { const u = /* @__PURE__ */ new Set(); c = c.filter(((x) => { - const f = x.sessionKeyAlgorithm + M.uint8ArrayToString(x.sessionKey); + const f = x.sessionKeyAlgorithm + K.uint8ArrayToString(x.sessionKey); return !u.has(f) && (u.add(f), true); })); } @@ -32027,7 +32027,7 @@ zoo }; })(t, r, n, a), c = A.read(A.symmetric, i), u = l ? A.read(A.aead, l) : void 0; return await Promise.all(t.map(((x) => x.getEncryptionKey().catch((() => null)).then(((f) => { - if (f && (f.keyPacket.algorithm === A.publicKey.x25519 || f.keyPacket.algorithm === A.publicKey.x448) && !u && !M.isAES(i)) throw Error("Could not generate a session key compatible with the given `encryptionKeys`: X22519 and X448 keys can only be used to encrypt AES session keys; change `config.preferredSymmetricAlgorithm` accordingly."); + if (f && (f.keyPacket.algorithm === A.publicKey.x25519 || f.keyPacket.algorithm === A.publicKey.x448) && !u && !K.isAES(i)) throw Error("Could not generate a session key compatible with the given `encryptionKeys`: X22519 and X448 keys can only be used to encrypt AES session keys; change `config.preferredSymmetricAlgorithm` accordingly."); }))))), { data: p8(i), algorithm: c, @@ -32036,7 +32036,7 @@ zoo } async encrypt(t, r, n, a = false, i = [], l = /* @__PURE__ */ new Date(), c = [], u = Be) { if (n) { - if (!M.isUint8Array(n.data) || !M.isString(n.algorithm)) throw Error("Invalid session key for encryption."); + if (!K.isUint8Array(n.data) || !K.isString(n.algorithm)) throw Error("Invalid session key for encryption."); } else if (t && t.length) n = await mn.generateSessionKey(t, l, c, u); else { if (!r || !r.length) throw Error("No keys, passwords, or session key provided."); @@ -32104,7 +32104,7 @@ zoo let l = a.packets; It(l.stream) && (l = l.concat(await Mt(l.stream, ((x) => x || [])))); const c = l.filterByTag(A.packet.onePassSignature).reverse(), u = l.filterByTag(A.packet.signature); - return c.length && !u.length && M.isStream(l.stream) && !It(l.stream) ? (await Promise.all(c.map((async (x) => { + return c.length && !u.length && K.isStream(l.stream) && !It(l.stream) ? (await Promise.all(c.map((async (x) => { x.correspondingSig = new Promise(((f, h) => { x.correspondingSigResolve = f, x.correspondingSigReject = h; })), x.signatureData = Xi((async () => (await x.correspondingSig).signatureData)), x.hashed = Mt(await x.hash(x.signatureType, i[0], void 0, false)), x.hashed.catch((() => { @@ -32134,7 +32134,7 @@ zoo return t.length ? new mn(t[0].packets) : this; } async appendSignature(t, r = Be) { - await this.packets.read(M.isUint8Array(t) ? t : (await mc(t)).data, jv, r); + await this.packets.read(K.isUint8Array(t) ? t : (await mc(t)).data, jv, r); } write() { return this.packets.write(); @@ -32208,11 +32208,11 @@ zoo }; let a = e || t; if (!a) throw Error("readMessage: must pass options object containing `armoredMessage` or `binaryMessage`"); - if (e && !M.isString(e) && !M.isStream(e)) throw Error("readMessage: options.armoredMessage must be a string or stream"); - if (t && !M.isUint8Array(t) && !M.isStream(t)) throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream"); + if (e && !K.isString(e) && !K.isStream(e)) throw Error("readMessage: options.armoredMessage must be a string or stream"); + if (t && !K.isUint8Array(t) && !K.isStream(t)) throw Error("readMessage: options.binaryMessage must be a Uint8Array or stream"); const i = Object.keys(n); if (i.length > 0) throw Error("Unknown option: " + i.join(", ")); - const l = M.isStream(a); + const l = K.isStream(a); if (e) { const { type: x, data: f } = await mc(a); if (x !== A.armor.message) throw Error("Armored text not of type message"); @@ -32224,11 +32224,11 @@ zoo async function Uv({ text: e, binary: t, filename: r, date: n = /* @__PURE__ */ new Date(), format: a = e !== void 0 ? "utf8" : "binary", ...i }) { const l = e !== void 0 ? e : t; if (l === void 0) throw Error("createMessage: must pass options object containing `text` or `binary`"); - if (e && !M.isString(e) && !M.isStream(e)) throw Error("createMessage: options.text must be a string or stream"); - if (t && !M.isUint8Array(t) && !M.isStream(t)) throw Error("createMessage: options.binary must be a Uint8Array or stream"); + if (e && !K.isString(e) && !K.isStream(e)) throw Error("createMessage: options.text must be a string or stream"); + if (t && !K.isUint8Array(t) && !K.isStream(t)) throw Error("createMessage: options.binary must be a Uint8Array or stream"); const c = Object.keys(i); if (c.length > 0) throw Error("Unknown option: " + c.join(", ")); - const u = M.isStream(l), x = new fs(n); + const u = K.isStream(l), x = new fs(n); e !== void 0 ? x.setText(l, A.write(A.literal, a)) : x.setBytes(l, A.write(A.literal, a)), r !== void 0 && x.setFilename(r); const f = new dt(); f.push(x); @@ -32243,13 +32243,13 @@ zoo const a = Object.keys(n); if (a.length > 0) throw Error("Unknown option: " + a.join(", ")); if (!e.isPrivate()) throw Error("Cannot decrypt a public key"); - const i = e.clone(true), l = M.isArray(t) ? t : [ + const i = e.clone(true), l = K.isArray(t) ? t : [ t ]; try { - return await Promise.all(i.getKeys().map(((c) => M.anyPromise(l.map(((u) => c.keyPacket.decrypt(u))))))), await i.validate(r), i; + return await Promise.all(i.getKeys().map(((c) => K.anyPromise(l.map(((u) => c.keyPacket.decrypt(u))))))), await i.validate(r), i; } catch (c) { - throw i.clearPrivateParams(), M.wrapError("Error decrypting private key", c); + throw i.clearPrivateParams(), K.wrapError("Error decrypting private key", c); } } async function Rv({ message: e, encryptionKeys: t, signingKeys: r, passwords: n, sessionKey: a, format: i = "armored", signature: l = null, wildcard: c = false, signingKeyIDs: u = [], encryptionKeyIDs: x = [], date: f = /* @__PURE__ */ new Date(), signingUserIDs: h = [], encryptionUserIDs: p = [], signatureNotations: m = [], config: y, ...B }) { @@ -32266,15 +32266,15 @@ zoo try { if ((r.length || l) && (e = await e.sign(r, t, l, u, f, h, x, m, y)), e = e.compress(await (async function(P = [], k = /* @__PURE__ */ new Date(), w = [], _ = Be) { const T = A.compression.uncompressed, N = _.preferredCompressionAlgorithm; - return (await Promise.all(P.map((async function(C, j) { - const I = (await C.getPrimarySelfSignature(k, w[j], _)).preferredCompressionAlgorithms; + return (await Promise.all(P.map((async function(C, z) { + const I = (await C.getPrimarySelfSignature(k, w[z], _)).preferredCompressionAlgorithms; return !!I && I.indexOf(N) >= 0; })))).every(Boolean) ? N : T; })(t, f, p, y), y), e = await e.encrypt(t, n, a, c, x, f, p, y), i === "object") return e; const D = i === "armored" ? e.armor(y) : e.write(); return await Pm(D); } catch (D) { - throw M.wrapError("Error encrypting message", D); + throw K.wrapError("Error encrypting message", D); } } async function Kv({ message: e, decryptionKeys: t, passwords: r, sessionKeys: n, verificationKeys: a, expectSigned: i = false, format: l = "utf8", signature: c = null, date: u = /* @__PURE__ */ new Date(), config: x, ...f }) { @@ -32297,12 +32297,12 @@ zoo if (m.signatures.length === 0) throw Error("Message is not signed"); m.data = Sr([ m.data, - Xi((async () => (await M.anyPromise(m.signatures.map(((y) => y.verified))), l === "binary" ? new Uint8Array() : ""))) + Xi((async () => (await K.anyPromise(m.signatures.map(((y) => y.verified))), l === "binary" ? new Uint8Array() : ""))) ]); } return m.data = await Pm(m.data), m; } catch (p) { - throw M.wrapError("Error decrypting message", p); + throw K.wrapError("Error decrypting message", p); } } function Im(e) { @@ -32319,12 +32319,12 @@ zoo } } function yn(e) { - return e && !M.isArray(e) && (e = [ + return e && !K.isArray(e) && (e = [ e ]), e; } async function Pm(e) { - return M.isStream(e) === "array" ? Mt(e) : e; + return K.isStream(e) === "array" ? Mt(e) : e; } function Ov(e, t, ...r) { e.data = ni(t.packets.stream, (async (n, a) => { @@ -33063,15 +33063,15 @@ zoo process(t, r) { for (let k = 0; k < 16; k++, r += 4) Po[k] = t.getUint32(r), No[k] = t.getUint32(r += 4); for (let k = 16; k < 80; k++) { - const w = 0 | Po[k - 15], _ = 0 | No[k - 15], T = S0(w, _, 1) ^ S0(w, _, 8) ^ n6(w, 0, 7), N = _0(w, _, 1) ^ _0(w, _, 8) ^ a6(w, _, 7), U = 0 | Po[k - 2], C = 0 | No[k - 2], j = S0(U, C, 19) ^ Yu(U, C, 61) ^ n6(U, 0, 6), I = _0(U, C, 19) ^ Xu(U, C, 61) ^ a6(U, C, 6), R = rB(N, I, No[k - 7], No[k - 16]), L = nB(R, T, j, Po[k - 7], Po[k - 16]); + const w = 0 | Po[k - 15], _ = 0 | No[k - 15], T = S0(w, _, 1) ^ S0(w, _, 8) ^ n6(w, 0, 7), N = _0(w, _, 1) ^ _0(w, _, 8) ^ a6(w, _, 7), U = 0 | Po[k - 2], C = 0 | No[k - 2], z = S0(U, C, 19) ^ Yu(U, C, 61) ^ n6(U, 0, 6), I = _0(U, C, 19) ^ Xu(U, C, 61) ^ a6(U, C, 6), R = rB(N, I, No[k - 7], No[k - 16]), L = nB(R, T, z, Po[k - 7], Po[k - 16]); Po[k] = 0 | L, No[k] = 0 | R; } let { Ah: n, Al: a, Bh: i, Bl: l, Ch: c, Cl: u, Dh: x, Dl: f, Eh: h, El: p, Fh: m, Fl: y, Gh: B, Gl: v, Hh: D, Hl: P } = this; for (let k = 0; k < 80; k++) { - const w = S0(h, p, 14) ^ S0(h, p, 18) ^ Yu(h, p, 41), _ = _0(h, p, 14) ^ _0(h, p, 18) ^ Xu(h, p, 41), T = h & m ^ ~h & B, N = aB(P, _, p & y ^ ~p & v, cB[k], No[k]), U = oB(N, D, w, T, lB[k], Po[k]), C = 0 | N, j = S0(n, a, 28) ^ Yu(n, a, 34) ^ Yu(n, a, 39), I = _0(n, a, 28) ^ Xu(n, a, 34) ^ Xu(n, a, 39), R = n & i ^ n & c ^ i & c, L = a & l ^ a & u ^ l & u; + const w = S0(h, p, 14) ^ S0(h, p, 18) ^ Yu(h, p, 41), _ = _0(h, p, 14) ^ _0(h, p, 18) ^ Xu(h, p, 41), T = h & m ^ ~h & B, N = aB(P, _, p & y ^ ~p & v, cB[k], No[k]), U = oB(N, D, w, T, lB[k], Po[k]), C = 0 | N, z = S0(n, a, 28) ^ Yu(n, a, 34) ^ Yu(n, a, 39), I = _0(n, a, 28) ^ Xu(n, a, 34) ^ Xu(n, a, 39), R = n & i ^ n & c ^ i & c, L = a & l ^ a & u ^ l & u; D = 0 | B, P = 0 | v, B = 0 | m, v = 0 | y, m = 0 | h, y = 0 | p, { h, l: p } = za(0 | x, 0 | f, 0 | U, 0 | C), x = 0 | c, f = 0 | u, c = 0 | i, u = 0 | l, i = 0 | n, l = 0 | a; const O = eB(C, I, L); - n = tB(O, U, j, R), a = 0 | O; + n = tB(O, U, z, R), a = 0 | O; } ({ h: n, l: a } = za(0 | this.Ah, 0 | this.Al, 0 | n, 0 | a)), { h: i, l } = za(0 | this.Bh, 0 | this.Bl, 0 | i, 0 | l), { h: c, l: u } = za(0 | this.Ch, 0 | this.Cl, 0 | c, 0 | u), { h: x, l: f } = za(0 | this.Dh, 0 | this.Dl, 0 | x, 0 | f), { h, l: p } = za(0 | this.Eh, 0 | this.El, 0 | h, 0 | p), { h: m, l: y } = za(0 | this.Fh, 0 | this.Fl, 0 | m, 0 | y), { h: B, l: v } = za(0 | this.Gh, 0 | this.Gl, 0 | B, 0 | v), { h: D, l: P } = za(0 | this.Hh, 0 | this.Hl, 0 | D, 0 | P), this.set(n, a, i, l, c, u, x, f, h, p, m, y, B, v, D, P); } @@ -33420,12 +33420,12 @@ zoo function f() { if (!n.isOdd) throw Error("compression is not supported: Field does not have .isOdd()"); } - const h = t.toBytes || function(j, I, R) { + const h = t.toBytes || function(z, I, R) { const { x: L, y: O } = I.toAffine(), W = n.toBytes(L); return Hi(R, "isCompressed"), R ? (f(), On(l7(!n.isOdd(O)), W)) : On(Uint8Array.of(4), W, n.toBytes(O)); - }, p = t.fromBytes || function(j) { - Qn(j, void 0, "Point"); - const { publicKey: I, publicKeyUncompressed: R } = x, L = j.length, O = j[0], W = j.subarray(1); + }, p = t.fromBytes || function(z) { + Qn(z, void 0, "Point"); + const { publicKey: I, publicKeyUncompressed: R } = x, L = z.length, O = z[0], W = z.subarray(1); if (L !== I || O !== 2 && O !== 3) { if (L === R && O === 4) { const $ = n.BYTES, X = n.fromBytes(W.subarray(0, $)), Y = n.fromBytes(W.subarray($, 2 * $)); @@ -33445,8 +33445,8 @@ zoo try { Y = n.sqrt(X); } catch (Q) { - const G = Q instanceof Error ? ": " + Q.message : ""; - throw Error("bad point: is not on curve, sqrt error" + G); + const V = Q instanceof Error ? ": " + Q.message : ""; + throw Error("bad point: is not on curve, sqrt error" + V); } return f(), !(1 & ~O) !== n.isOdd(Y) && (Y = n.neg(Y)), { x: $, @@ -33454,48 +33454,48 @@ zoo }; } }; - function m(j) { - const I = n.sqr(j), R = n.mul(I, j); - return n.add(n.add(R, n.mul(j, i.a)), i.b); + function m(z) { + const I = n.sqr(z), R = n.mul(I, z); + return n.add(n.add(R, n.mul(z, i.a)), i.b); } - function y(j, I) { - const R = n.sqr(I), L = m(j); + function y(z, I) { + const R = n.sqr(I), L = m(z); return n.eql(R, L); } if (!y(i.Gx, i.Gy)) throw Error("bad curve params: generator point"); const B = n.mul(n.pow(i.a, Ju), dB), v = n.mul(n.sqr(i.b), BigInt(27)); if (n.is0(n.add(B, v))) throw Error("bad curve params: a or b"); - function D(j, I, R = false) { - if (!n.isValid(I) || R && n.is0(I)) throw Error("bad point coordinate " + j); + function D(z, I, R = false) { + if (!n.isValid(I) || R && n.is0(I)) throw Error("bad point coordinate " + z); return I; } - function P(j) { - if (!(j instanceof N)) throw Error("ProjectivePoint expected"); + function P(z) { + if (!(z instanceof N)) throw Error("ProjectivePoint expected"); } - function k(j) { + function k(z) { if (!u || !u.basises) throw Error("no endo"); return (function(I, R, L) { const [[O, W], [$, X]] = R, Y = l6(X * I, L), Q = l6(-W * I, L); - let G = I - Y * O - Q * $, K = -Y * W - Q * X; - const V = G < Va, ee = K < Va; - V && (G = -G), ee && (K = -K); + let V = I - Y * O - Q * $, M = -Y * W - Q * X; + const G = V < Va, ee = M < Va; + G && (V = -V), ee && (M = -M); const te = Bc(Math.ceil(Tm(L) / 2)) + G0; - if (G < Va || G >= te || K < Va || K >= te) throw Error("splitScalar (endomorphism): failed, k=" + I); + if (V < Va || V >= te || M < Va || M >= te) throw Error("splitScalar (endomorphism): failed, k=" + I); return { - k1neg: V, - k1: G, + k1neg: G, + k1: V, k2neg: ee, - k2: K + k2: M }; - })(j, u.basises, a.ORDER); + })(z, u.basises, a.ORDER); } - const w = Xx(((j, I) => { - const { X: R, Y: L, Z: O } = j; + const w = Xx(((z, I) => { + const { X: R, Y: L, Z: O } = z; if (n.eql(O, n.ONE)) return { x: R, y: L }; - const W = j.is0(); + const W = z.is0(); I == null && (I = W ? n.ONE : n.inv(O)); const $ = n.mul(R, I), X = n.mul(L, I), Y = n.mul(O, I); if (W) return { @@ -33507,19 +33507,19 @@ zoo x: $, y: X }; - })), _ = Xx(((j) => { - if (j.is0()) { - if (t.allowInfinityPoint && !n.is0(j.Y)) return; + })), _ = Xx(((z) => { + if (z.is0()) { + if (t.allowInfinityPoint && !n.is0(z.Y)) return; throw Error("bad point: ZERO"); } - const { x: I, y: R } = j.toAffine(); + const { x: I, y: R } = z.toAffine(); if (!n.isValid(I) || !n.isValid(R)) throw Error("bad point: x or y not field elements"); if (!y(I, R)) throw Error("bad point: equation left != right"); - if (!j.isTorsionFree()) throw Error("bad point: not in prime-order subgroup"); + if (!z.isTorsionFree()) throw Error("bad point: not in prime-order subgroup"); return true; })); - function T(j, I, R, L, O) { - return R = new N(n.mul(R.X, j), R.Y, R.Z), I = Jx(L, I), R = Jx(O, R), I.add(R); + function T(z, I, R, L, O) { + return R = new N(n.mul(R.X, z), R.Y, R.Z), I = Jx(L, I), R = Jx(O, R), I.add(R); } class N { constructor(I, R, L) { @@ -33568,18 +33568,18 @@ zoo } double() { const { a: I, b: R } = i, L = n.mul(R, Ju), { X: O, Y: W, Z: $ } = this; - let X = n.ZERO, Y = n.ZERO, Q = n.ZERO, G = n.mul(O, O), K = n.mul(W, W), V = n.mul($, $), ee = n.mul(O, W); - return ee = n.add(ee, ee), Q = n.mul(O, $), Q = n.add(Q, Q), X = n.mul(I, Q), Y = n.mul(L, V), Y = n.add(X, Y), X = n.sub(K, Y), Y = n.add(K, Y), Y = n.mul(X, Y), X = n.mul(ee, X), Q = n.mul(L, Q), V = n.mul(I, V), ee = n.sub(G, V), ee = n.mul(I, ee), ee = n.add(ee, Q), Q = n.add(G, G), G = n.add(Q, G), G = n.add(G, V), G = n.mul(G, ee), Y = n.add(Y, G), V = n.mul(W, $), V = n.add(V, V), G = n.mul(V, ee), X = n.sub(X, G), Q = n.mul(V, K), Q = n.add(Q, Q), Q = n.add(Q, Q), new N(X, Y, Q); + let X = n.ZERO, Y = n.ZERO, Q = n.ZERO, V = n.mul(O, O), M = n.mul(W, W), G = n.mul($, $), ee = n.mul(O, W); + return ee = n.add(ee, ee), Q = n.mul(O, $), Q = n.add(Q, Q), X = n.mul(I, Q), Y = n.mul(L, G), Y = n.add(X, Y), X = n.sub(M, Y), Y = n.add(M, Y), Y = n.mul(X, Y), X = n.mul(ee, X), Q = n.mul(L, Q), G = n.mul(I, G), ee = n.sub(V, G), ee = n.mul(I, ee), ee = n.add(ee, Q), Q = n.add(V, V), V = n.add(Q, V), V = n.add(V, G), V = n.mul(V, ee), Y = n.add(Y, V), G = n.mul(W, $), G = n.add(G, G), V = n.mul(G, ee), X = n.sub(X, V), Q = n.mul(G, M), Q = n.add(Q, Q), Q = n.add(Q, Q), new N(X, Y, Q); } add(I) { P(I); const { X: R, Y: L, Z: O } = this, { X: W, Y: $, Z: X } = I; - let Y = n.ZERO, Q = n.ZERO, G = n.ZERO; - const K = i.a, V = n.mul(i.b, Ju); - let ee = n.mul(R, W), te = n.mul(L, $), oe = n.mul(O, X), ie = n.add(R, L), ce = n.add(W, $); - ie = n.mul(ie, ce), ce = n.add(ee, te), ie = n.sub(ie, ce), ce = n.add(R, O); + let Y = n.ZERO, Q = n.ZERO, V = n.ZERO; + const M = i.a, G = n.mul(i.b, Ju); + let ee = n.mul(R, W), te = n.mul(L, $), oe = n.mul(O, X), ie = n.add(R, L), xe = n.add(W, $); + ie = n.mul(ie, xe), xe = n.add(ee, te), ie = n.sub(ie, xe), xe = n.add(R, O); let de = n.add(W, X); - return ce = n.mul(ce, de), de = n.add(ee, oe), ce = n.sub(ce, de), de = n.add(L, O), Y = n.add($, X), de = n.mul(de, Y), Y = n.add(te, oe), de = n.sub(de, Y), G = n.mul(K, ce), Y = n.mul(V, oe), G = n.add(Y, G), Y = n.sub(te, G), G = n.add(te, G), Q = n.mul(Y, G), te = n.add(ee, ee), te = n.add(te, ee), oe = n.mul(K, oe), ce = n.mul(V, ce), te = n.add(te, oe), oe = n.sub(ee, oe), oe = n.mul(K, oe), ce = n.add(ce, oe), ee = n.mul(te, ce), Q = n.add(Q, ee), ee = n.mul(de, ce), Y = n.mul(ie, Y), Y = n.sub(Y, ee), ee = n.mul(ie, te), G = n.mul(de, G), G = n.add(G, ee), new N(Y, Q, G); + return xe = n.mul(xe, de), de = n.add(ee, oe), xe = n.sub(xe, de), de = n.add(L, O), Y = n.add($, X), de = n.mul(de, Y), Y = n.add(te, oe), de = n.sub(de, Y), V = n.mul(M, xe), Y = n.mul(G, oe), V = n.add(Y, V), Y = n.sub(te, V), V = n.add(te, V), Q = n.mul(Y, V), te = n.add(ee, ee), te = n.add(te, ee), oe = n.mul(M, oe), xe = n.mul(G, xe), te = n.add(te, oe), oe = n.sub(ee, oe), oe = n.mul(M, oe), xe = n.add(xe, oe), ee = n.mul(te, xe), Q = n.add(Q, ee), ee = n.mul(de, xe), Y = n.mul(ie, Y), Y = n.sub(Y, ee), ee = n.mul(ie, te), V = n.mul(de, V), V = n.add(V, ee), new N(Y, Q, V); } subtract(I) { return this.add(I.negate()); @@ -33593,8 +33593,8 @@ zoo let L, O; const W = ($) => C.cached(this, $, ((X) => Pi(N, X))); if (R) { - const { k1neg: $, k1: X, k2neg: Y, k2: Q } = k(I), { p: G, f: K } = W(X), { p: V, f: ee } = W(Q); - O = K.add(ee), L = T(R.beta, G, V, $, Y); + const { k1neg: $, k1: X, k2neg: Y, k2: Q } = k(I), { p: V, f: M } = W(X), { p: G, f: ee } = W(Q); + O = M.add(ee), L = T(R.beta, V, G, $, Y); } else { const { p: $, f: X } = W(I); L = $, O = X; @@ -33611,9 +33611,9 @@ zoo if (I === G0) return L; if (C.hasCache(this)) return this.multiply(I); if (R) { - const { k1neg: O, k1: W, k2neg: $, k2: X } = k(I), { p1: Y, p2: Q } = (function(G, K, V, ee) { - let te = K, oe = G.ZERO, ie = G.ZERO; - for (; V > ls || ee > ls; ) V & Ii && (oe = oe.add(te)), ee & Ii && (ie = ie.add(te)), te = te.double(), V >>= Ii, ee >>= Ii; + const { k1neg: O, k1: W, k2neg: $, k2: X } = k(I), { p1: Y, p2: Q } = (function(V, M, G, ee) { + let te = M, oe = V.ZERO, ie = V.ZERO; + for (; G > ls || ee > ls; ) G & Ii && (oe = oe.add(te)), ee & Ii && (ie = ie.add(te)), te = te.double(), G >>= Ii, ee >>= Ii; return { p1: oe, p2: ie @@ -33779,55 +33779,55 @@ zoo return C; } class P { - constructor(C, j, I) { - this.r = D("r", C), this.s = D("s", j), I != null && (this.recovery = I), Object.freeze(this); + constructor(C, z, I) { + this.r = D("r", C), this.s = D("s", z), I != null && (this.recovery = I), Object.freeze(this); } - static fromBytes(C, j = B) { + static fromBytes(C, z = B) { let I; if ((function(W, $) { k8($); const X = m.signature; Qn(W, $ === "compact" ? X : $ === "recovered" ? X + 1 : void 0, $ + " signature"); - })(C, j), j === "der") { + })(C, z), z === "der") { const { r: W, s: $ } = Qa.toSig(Qn(C)); return new P(W, $); } - j === "recovered" && (I = C[0], j = "compact", C = C.subarray(1)); + z === "recovered" && (I = C[0], z = "compact", C = C.subarray(1)); const R = l.BYTES, L = C.subarray(0, R), O = C.subarray(R, 2 * R); return new P(l.fromBytes(L), l.fromBytes(O), I); } - static fromHex(C, j) { - return this.fromBytes(Yx(C), j); + static fromHex(C, z) { + return this.fromBytes(Yx(C), z); } addRecoveryBit(C) { return new P(this.r, this.s, C); } recoverPublicKey(C) { - const j = i.ORDER, { r: I, s: R, recovery: L } = this; + const z = i.ORDER, { r: I, s: R, recovery: L } = this; if (L == null || ![ 0, 1, 2, 3 ].includes(L)) throw Error("recovery id invalid"); - if (c * s7 < j && L > 1) throw Error("recovery id is ambiguous for h>1 curve"); + if (c * s7 < z && L > 1) throw Error("recovery id is ambiguous for h>1 curve"); const O = L === 2 || L === 3 ? I + c : I; if (!i.isValid(O)) throw Error("recovery id 2 or 3 invalid"); - const W = i.toBytes(O), $ = e.fromBytes(On(l7(!(1 & L)), W)), X = l.inv(O), Y = w(St("msgHash", C)), Q = l.create(-Y * X), G = l.create(R * X), K = e.BASE.multiplyUnsafe(Q).add($.multiplyUnsafe(G)); - if (K.is0()) throw Error("point at infinify"); - return K.assertValidity(), K; + const W = i.toBytes(O), $ = e.fromBytes(On(l7(!(1 & L)), W)), X = l.inv(O), Y = w(St("msgHash", C)), Q = l.create(-Y * X), V = l.create(R * X), M = e.BASE.multiplyUnsafe(Q).add($.multiplyUnsafe(V)); + if (M.is0()) throw Error("point at infinify"); + return M.assertValidity(), M; } hasHighS() { return v(this.s); } toBytes(C = B) { if (k8(C), C === "der") return Yx(Qa.hexFromSig(this)); - const j = l.toBytes(this.r), I = l.toBytes(this.s); + const z = l.toBytes(this.r), I = l.toBytes(this.s); if (C === "recovered") { if (this.recovery == null) throw Error("recovery bit must be present"); - return On(Uint8Array.of(this.recovery), j, I); + return On(Uint8Array.of(this.recovery), z, I); } - return On(j, I); + return On(z, I); } toHex(C) { return Ri(this.toBytes(C)); @@ -33858,8 +33858,8 @@ zoo } const k = r.bits2int || function(U) { if (U.length > 8192) throw Error("input is too large"); - const C = Sd(U), j = 8 * U.length - u; - return j > 0 ? C >> BigInt(j) : C; + const C = Sd(U), z = 8 * U.length - u; + return z > 0 ? C >> BigInt(z) : C; }, w = r.bits2int_modN || function(U) { return l.create(k(U)); }, _ = Bc(u); @@ -33876,7 +33876,7 @@ zoo utils: p, lengths: m, Point: e, - sign: function(U, C, j = {}) { + sign: function(U, C, z = {}) { U = St("message", U); const { seed: I, k2sig: R } = (function(O, W, $) { if ([ @@ -33885,60 +33885,60 @@ zoo ].some(((oe) => oe in $))) throw Error("sign() legacy options not supported"); const { lowS: X, prehash: Y, extraEntropy: Q } = vh($, y); O = N(O, Y); - const G = w(O), K = V0(l, W), V = [ - T(K), - T(G) + const V = w(O), M = V0(l, W), G = [ + T(M), + T(V) ]; if (Q != null && Q !== false) { const oe = Q === true ? n(m.secretKey) : Q; - V.push(St("extraEntropy", oe)); + G.push(St("extraEntropy", oe)); } - const ee = On(...V), te = G; + const ee = On(...G), te = V; return { seed: ee, k2sig: function(oe) { const ie = k(oe); if (!l.isValidNot0(ie)) return; - const ce = l.inv(ie), de = e.BASE.multiply(ie).toAffine(), he = l.create(de.x); + const xe = l.inv(ie), de = e.BASE.multiply(ie).toAffine(), he = l.create(de.x); if (he === Va) return; - const be = l.create(ce * l.create(te + he * K)); + const be = l.create(xe * l.create(te + he * M)); if (be === Va) return; let ve = (de.x === he ? 0 : 2) | Number(de.y & G0), Ce = be; return X && v(be) && (Ce = l.neg(be), ve ^= 1), new P(he, Ce, ve); } }; - })(U, C, j); + })(U, C, z); return (function(O, W, $) { if (typeof O != "number" || O < 2) throw Error("hashLen must be a number"); if (typeof W != "number" || W < 2) throw Error("qByteLen must be a number"); if (typeof $ != "function") throw Error("hmacFn must be a function"); const X = (ie) => new Uint8Array(ie), Y = (ie) => Uint8Array.of(ie); - let Q = X(O), G = X(O), K = 0; - const V = () => { - Q.fill(1), G.fill(0), K = 0; - }, ee = (...ie) => $(G, Q, ...ie), te = (ie = X(0)) => { - G = ee(Y(0), ie), Q = ee(), ie.length !== 0 && (G = ee(Y(1), ie), Q = ee()); + let Q = X(O), V = X(O), M = 0; + const G = () => { + Q.fill(1), V.fill(0), M = 0; + }, ee = (...ie) => $(V, Q, ...ie), te = (ie = X(0)) => { + V = ee(Y(0), ie), Q = ee(), ie.length !== 0 && (V = ee(Y(1), ie), Q = ee()); }, oe = () => { - if (K++ >= 1e3) throw Error("drbg: tried 1000 values"); + if (M++ >= 1e3) throw Error("drbg: tried 1000 values"); let ie = 0; - const ce = []; + const xe = []; for (; ie < W; ) { Q = ee(); const de = Q.slice(); - ce.push(de), ie += Q.length; + xe.push(de), ie += Q.length; } - return On(...ce); + return On(...xe); }; - return (ie, ce) => { + return (ie, xe) => { let de; - for (V(), te(ie); !(de = ce(oe())); ) te(); - return V(), de; + for (G(), te(ie); !(de = xe(oe())); ) te(); + return G(), de; }; })(t.outputLen, l.BYTES, a)(I, R); }, - verify: function(U, C, j, I = {}) { + verify: function(U, C, z, I = {}) { const { lowS: R, prehash: L, format: O } = vh(I, y); - if (j = St("publicKey", j), C = N(St("message", C), L), "strict" in I) throw Error("options.strict was renamed to lowS"); + if (z = St("publicKey", z), C = N(St("message", C), L), "strict" in I) throw Error("options.strict was renamed to lowS"); const W = O === void 0 ? (function($) { let X; const Y = typeof $ == "string" || wc($), Q = !Y && $ !== null && typeof $ == "object" && typeof $.r == "bigint" && typeof $.s == "bigint"; @@ -33947,8 +33947,8 @@ zoo else if (Y) { try { X = P.fromBytes(St("sig", $), "der"); - } catch (G) { - if (!(G instanceof Qa.Err)) throw G; + } catch (V) { + if (!(V instanceof Qa.Err)) throw V; } if (!X) try { X = P.fromBytes(St("sig", $), "compact"); @@ -33960,16 +33960,16 @@ zoo })(U) : P.fromBytes(St("sig", U), O); if (W === false) return false; try { - const $ = e.fromBytes(j); + const $ = e.fromBytes(z); if (R && W.hasHighS()) return false; - const { r: X, s: Y } = W, Q = w(C), G = l.inv(Y), K = l.create(Q * G), V = l.create(X * G), ee = e.BASE.multiplyUnsafe(K).add($.multiplyUnsafe(V)); + const { r: X, s: Y } = W, Q = w(C), V = l.inv(Y), M = l.create(Q * V), G = l.create(X * V), ee = e.BASE.multiplyUnsafe(M).add($.multiplyUnsafe(G)); return ee.is0() ? false : l.create(ee.x) === X; } catch { return false; } }, - recoverPublicKey: function(U, C, j = {}) { - const { prehash: I } = vh(j, y); + recoverPublicKey: function(U, C, z = {}) { + const { prehash: I } = vh(z, y); return C = N(C, I), P.fromBytes(U, "recovered").recoverPublicKey(C).toBytes(); }, Signature: P, @@ -34221,8 +34221,8 @@ zoo })), m = Xx(((v) => { const { a: D, d: P } = i; if (v.is0()) throw Error("bad point: ZERO"); - const { X: k, Y: w, Z: _, T } = v, N = u(k * k), U = u(w * w), C = u(_ * _), j = u(C * C), I = u(N * D); - if (u(C * u(I + U)) !== u(j + u(P * u(N * U)))) throw Error("bad point: equation left != right (1)"); + const { X: k, Y: w, Z: _, T } = v, N = u(k * k), U = u(w * w), C = u(_ * _), z = u(C * C), I = u(N * D); + if (u(C * u(I + U)) !== u(z + u(P * u(N * U)))) throw Error("bad point: equation left != right (1)"); if (u(k * w) !== u(_ * T)) throw Error("bad point: equation left != right (2)"); return true; })); @@ -34245,7 +34245,7 @@ zoo T[k - 1] = -129 & N; const U = Qi(T), C = P ? c : n.ORDER; tc("point.y", U, jo, C); - const j = u(U * U), I = u(j - er), R = u(_ * j - w); + const z = u(U * U), I = u(z - er), R = u(_ * z - w); let { isValid: L, value: O } = x(I, R); if (!L) throw Error("bad point: invalid y coordinate"); const W = (O & er) === er, $ = !!(128 & N); @@ -34272,8 +34272,8 @@ zoo } equals(D) { h(D); - const { X: P, Y: k, Z: w } = this, { X: _, Y: T, Z: N } = D, U = u(P * N), C = u(_ * w), j = u(k * N), I = u(T * w); - return U === C && j === I; + const { X: P, Y: k, Z: w } = this, { X: _, Y: T, Z: N } = D, U = u(P * N), C = u(_ * w), z = u(k * N), I = u(T * w); + return U === C && z === I; } is0() { return this.equals(y.ZERO); @@ -34282,13 +34282,13 @@ zoo return new y(u(-this.X), this.Y, this.Z, u(-this.T)); } double() { - const { a: D } = i, { X: P, Y: k, Z: w } = this, _ = u(P * P), T = u(k * k), N = u(Bh * u(w * w)), U = u(D * _), C = P + k, j = u(u(C * C) - _ - T), I = U + T, R = I - N, L = U - T, O = u(j * R), W = u(I * L), $ = u(j * L), X = u(R * I); + const { a: D } = i, { X: P, Y: k, Z: w } = this, _ = u(P * P), T = u(k * k), N = u(Bh * u(w * w)), U = u(D * _), C = P + k, z = u(u(C * C) - _ - T), I = U + T, R = I - N, L = U - T, O = u(z * R), W = u(I * L), $ = u(z * L), X = u(R * I); return new y(O, W, X, $); } add(D) { h(D); - const { a: P, d: k } = i, { X: w, Y: _, Z: T, T: N } = this, { X: U, Y: C, Z: j, T: I } = D, R = u(w * U), L = u(_ * C), O = u(N * k * I), W = u(T * j), $ = u((w + _) * (U + C) - R - L), X = W - O, Y = W + O, Q = u(L - P * R), G = u($ * X), K = u(Y * Q), V = u($ * Q), ee = u(X * Y); - return new y(G, K, ee, V); + const { a: P, d: k } = i, { X: w, Y: _, Z: T, T: N } = this, { X: U, Y: C, Z: z, T: I } = D, R = u(w * U), L = u(_ * C), O = u(N * k * I), W = u(T * z), $ = u((w + _) * (U + C) - R - L), X = W - O, Y = W + O, Q = u(L - P * R), V = u($ * X), M = u(Y * Q), G = u($ * Q), ee = u(X * Y); + return new y(V, M, ee, G); } subtract(D) { return this.add(D.negate()); @@ -34374,12 +34374,12 @@ zoo } function h(k) { const { head: w, prefix: _, scalar: T } = (function(C) { - const j = v.secretKey; - C = St("private key", C, j); - const I = St("hashed private key", t(C), 2 * j), R = u(I.slice(0, j)); + const z = v.secretKey; + C = St("private key", C, z); + const I = St("hashed private key", t(C), 2 * z), R = u(I.slice(0, z)); return { head: R, - prefix: I.slice(j, 2 * j), + prefix: I.slice(z, 2 * z), scalar: f(R) }; })(k), N = a.multiply(T), U = N.toBytes(); @@ -34448,14 +34448,14 @@ zoo getPublicKey: p, sign: function(k, w, _ = {}) { k = St("message", k), n && (k = n(k)); - const { prefix: T, scalar: N, pointBytes: U } = h(w), C = m(_.context, T, k), j = a.multiply(C).toBytes(), I = m(_.context, j, U, k), R = l.create(C + I * N); + const { prefix: T, scalar: N, pointBytes: U } = h(w), C = m(_.context, T, k), z = a.multiply(C).toBytes(), I = m(_.context, z, U, k), R = l.create(C + I * N); if (!l.isValid(R)) throw Error("sign failed: invalid s"); - return Qn(On(j, l.toBytes(R)), v.signature, "result"); + return Qn(On(z, l.toBytes(R)), v.signature, "result"); }, verify: function(k, w, _, T = y) { const { context: N, zip215: U } = T, C = v.signature; k = St("signature", k, C), w = St("message", w), _ = St("publicKey", _, v.publicKey), U !== void 0 && Hi(U, "zip215"), n && (w = n(w)); - const j = C / 2, I = k.subarray(0, j), R = Qi(k.subarray(j, C)); + const z = C / 2, I = k.subarray(0, z), R = Qi(k.subarray(z, C)); let L, O, W; try { L = e.fromBytes(_, U), O = e.fromBytes(I, U), W = a.multiplyUnsafe(R); @@ -34486,24 +34486,24 @@ zoo function k(C) { return C9(D(C), h); } - function w(C, j) { + function w(C, z) { const I = (function(R, L) { tc("u", R, yl, n), tc("scalar", L, y, v); const O = L, W = R; - let $ = I0, X = yl, Y = R, Q = I0, G = yl; - for (let V = BigInt(f - 1); V >= yl; V--) { - const ee = O >> V & I0; - G ^= ee, { x_2: $, x_3: Y } = T(G, $, Y), { x_2: X, x_3: Q } = T(G, X, Q), G = ee; - const te = $ + X, oe = D(te * te), ie = $ - X, ce = D(ie * ie), de = oe - ce, he = Y + Q, be = D((Y - Q) * te), ve = D(he * ie), Ce = be + ve, Ie = be - ve; - Y = D(Ce * Ce), Q = D(W * D(Ie * Ie)), $ = D(oe * ce), X = D(de * (oe + D(m * de))); + let $ = I0, X = yl, Y = R, Q = I0, V = yl; + for (let G = BigInt(f - 1); G >= yl; G--) { + const ee = O >> G & I0; + V ^= ee, { x_2: $, x_3: Y } = T(V, $, Y), { x_2: X, x_3: Q } = T(V, X, Q), V = ee; + const te = $ + X, oe = D(te * te), ie = $ - X, xe = D(ie * ie), de = oe - xe, he = Y + Q, be = D((Y - Q) * te), ve = D(he * ie), Ce = be + ve, Ie = be - ve; + Y = D(Ce * Ce), Q = D(W * D(Ie * Ie)), $ = D(oe * xe), X = D(de * (oe + D(m * de))); } - ({ x_2: $, x_3: Y } = T(G, $, Y)), { x_2: X, x_3: Q } = T(G, X, Q); - const K = l(X); - return D($ * K); + ({ x_2: $, x_3: Y } = T(V, $, Y)), { x_2: X, x_3: Q } = T(V, X, Q); + const M = l(X); + return D($ * M); })((function(R) { const L = St("u coordinate", R, h); return u && (L[31] &= 127), D(Qi(L)); - })(j), (function(R) { + })(z), (function(R) { return Qi(i(St("scalar", R, h))); })(C)); if (I === yl) throw Error("invalid private or public key received"); @@ -34512,10 +34512,10 @@ zoo function _(C) { return w(C, P); } - function T(C, j, I) { - const R = D(C * (j - I)); + function T(C, z, I) { + const R = D(C * (z - I)); return { - x_2: j = D(j - R), + x_2: z = D(z - R), x_3: I = D(I + R) }; } @@ -34526,13 +34526,13 @@ zoo }, U = (C = x(h)) => (ba(C, N.seed), C); return { keygen: function(C) { - const j = U(C); + const z = U(C); return { - secretKey: j, - publicKey: _(j) + secretKey: z, + publicKey: _(z) }; }, - getSharedSecret: (C, j) => w(C, j), + getSharedSecret: (C, z) => w(C, z), getPublicKey: (C) => _(C), scalarMult: w, scalarMultBase: _, @@ -35169,8 +35169,8 @@ zoo for (var n = 0; n < 16; n++) e[n] = t[n] - r[n]; } function et(e, t, r) { - var n, a, i = 0, l = 0, c = 0, u = 0, x = 0, f = 0, h = 0, p = 0, m = 0, y = 0, B = 0, v = 0, D = 0, P = 0, k = 0, w = 0, _ = 0, T = 0, N = 0, U = 0, C = 0, j = 0, I = 0, R = 0, L = 0, O = 0, W = 0, $ = 0, X = 0, Y = 0, Q = 0, G = r[0], K = r[1], V = r[2], ee = r[3], te = r[4], oe = r[5], ie = r[6], ce = r[7], de = r[8], he = r[9], be = r[10], ve = r[11], Ce = r[12], Ie = r[13], Ue = r[14], ge = r[15]; - i += (n = t[0]) * G, l += n * K, c += n * V, u += n * ee, x += n * te, f += n * oe, h += n * ie, p += n * ce, m += n * de, y += n * he, B += n * be, v += n * ve, D += n * Ce, P += n * Ie, k += n * Ue, w += n * ge, l += (n = t[1]) * G, c += n * K, u += n * V, x += n * ee, f += n * te, h += n * oe, p += n * ie, m += n * ce, y += n * de, B += n * he, v += n * be, D += n * ve, P += n * Ce, k += n * Ie, w += n * Ue, _ += n * ge, c += (n = t[2]) * G, u += n * K, x += n * V, f += n * ee, h += n * te, p += n * oe, m += n * ie, y += n * ce, B += n * de, v += n * he, D += n * be, P += n * ve, k += n * Ce, w += n * Ie, _ += n * Ue, T += n * ge, u += (n = t[3]) * G, x += n * K, f += n * V, h += n * ee, p += n * te, m += n * oe, y += n * ie, B += n * ce, v += n * de, D += n * he, P += n * be, k += n * ve, w += n * Ce, _ += n * Ie, T += n * Ue, N += n * ge, x += (n = t[4]) * G, f += n * K, h += n * V, p += n * ee, m += n * te, y += n * oe, B += n * ie, v += n * ce, D += n * de, P += n * he, k += n * be, w += n * ve, _ += n * Ce, T += n * Ie, N += n * Ue, U += n * ge, f += (n = t[5]) * G, h += n * K, p += n * V, m += n * ee, y += n * te, B += n * oe, v += n * ie, D += n * ce, P += n * de, k += n * he, w += n * be, _ += n * ve, T += n * Ce, N += n * Ie, U += n * Ue, C += n * ge, h += (n = t[6]) * G, p += n * K, m += n * V, y += n * ee, B += n * te, v += n * oe, D += n * ie, P += n * ce, k += n * de, w += n * he, _ += n * be, T += n * ve, N += n * Ce, U += n * Ie, C += n * Ue, j += n * ge, p += (n = t[7]) * G, m += n * K, y += n * V, B += n * ee, v += n * te, D += n * oe, P += n * ie, k += n * ce, w += n * de, _ += n * he, T += n * be, N += n * ve, U += n * Ce, C += n * Ie, j += n * Ue, I += n * ge, m += (n = t[8]) * G, y += n * K, B += n * V, v += n * ee, D += n * te, P += n * oe, k += n * ie, w += n * ce, _ += n * de, T += n * he, N += n * be, U += n * ve, C += n * Ce, j += n * Ie, I += n * Ue, R += n * ge, y += (n = t[9]) * G, B += n * K, v += n * V, D += n * ee, P += n * te, k += n * oe, w += n * ie, _ += n * ce, T += n * de, N += n * he, U += n * be, C += n * ve, j += n * Ce, I += n * Ie, R += n * Ue, L += n * ge, B += (n = t[10]) * G, v += n * K, D += n * V, P += n * ee, k += n * te, w += n * oe, _ += n * ie, T += n * ce, N += n * de, U += n * he, C += n * be, j += n * ve, I += n * Ce, R += n * Ie, L += n * Ue, O += n * ge, v += (n = t[11]) * G, D += n * K, P += n * V, k += n * ee, w += n * te, _ += n * oe, T += n * ie, N += n * ce, U += n * de, C += n * he, j += n * be, I += n * ve, R += n * Ce, L += n * Ie, O += n * Ue, W += n * ge, D += (n = t[12]) * G, P += n * K, k += n * V, w += n * ee, _ += n * te, T += n * oe, N += n * ie, U += n * ce, C += n * de, j += n * he, I += n * be, R += n * ve, L += n * Ce, O += n * Ie, W += n * Ue, $ += n * ge, P += (n = t[13]) * G, k += n * K, w += n * V, _ += n * ee, T += n * te, N += n * oe, U += n * ie, C += n * ce, j += n * de, I += n * he, R += n * be, L += n * ve, O += n * Ce, W += n * Ie, $ += n * Ue, X += n * ge, k += (n = t[14]) * G, w += n * K, _ += n * V, T += n * ee, N += n * te, U += n * oe, C += n * ie, j += n * ce, I += n * de, R += n * he, L += n * be, O += n * ve, W += n * Ce, $ += n * Ie, X += n * Ue, Y += n * ge, w += (n = t[15]) * G, l += 38 * (T += n * V), c += 38 * (N += n * ee), u += 38 * (U += n * te), x += 38 * (C += n * oe), f += 38 * (j += n * ie), h += 38 * (I += n * ce), p += 38 * (R += n * de), m += 38 * (L += n * he), y += 38 * (O += n * be), B += 38 * (W += n * ve), v += 38 * ($ += n * Ce), D += 38 * (X += n * Ie), P += 38 * (Y += n * Ue), k += 38 * (Q += n * ge), i = (n = (i += 38 * (_ += n * K)) + (a = 1) + 65535) - 65536 * (a = Math.floor(n / 65536)), l = (n = l + a + 65535) - 65536 * (a = Math.floor(n / 65536)), c = (n = c + a + 65535) - 65536 * (a = Math.floor(n / 65536)), u = (n = u + a + 65535) - 65536 * (a = Math.floor(n / 65536)), x = (n = x + a + 65535) - 65536 * (a = Math.floor(n / 65536)), f = (n = f + a + 65535) - 65536 * (a = Math.floor(n / 65536)), h = (n = h + a + 65535) - 65536 * (a = Math.floor(n / 65536)), p = (n = p + a + 65535) - 65536 * (a = Math.floor(n / 65536)), m = (n = m + a + 65535) - 65536 * (a = Math.floor(n / 65536)), y = (n = y + a + 65535) - 65536 * (a = Math.floor(n / 65536)), B = (n = B + a + 65535) - 65536 * (a = Math.floor(n / 65536)), v = (n = v + a + 65535) - 65536 * (a = Math.floor(n / 65536)), D = (n = D + a + 65535) - 65536 * (a = Math.floor(n / 65536)), P = (n = P + a + 65535) - 65536 * (a = Math.floor(n / 65536)), k = (n = k + a + 65535) - 65536 * (a = Math.floor(n / 65536)), w = (n = w + a + 65535) - 65536 * (a = Math.floor(n / 65536)), i = (n = (i += a - 1 + 37 * (a - 1)) + (a = 1) + 65535) - 65536 * (a = Math.floor(n / 65536)), l = (n = l + a + 65535) - 65536 * (a = Math.floor(n / 65536)), c = (n = c + a + 65535) - 65536 * (a = Math.floor(n / 65536)), u = (n = u + a + 65535) - 65536 * (a = Math.floor(n / 65536)), x = (n = x + a + 65535) - 65536 * (a = Math.floor(n / 65536)), f = (n = f + a + 65535) - 65536 * (a = Math.floor(n / 65536)), h = (n = h + a + 65535) - 65536 * (a = Math.floor(n / 65536)), p = (n = p + a + 65535) - 65536 * (a = Math.floor(n / 65536)), m = (n = m + a + 65535) - 65536 * (a = Math.floor(n / 65536)), y = (n = y + a + 65535) - 65536 * (a = Math.floor(n / 65536)), B = (n = B + a + 65535) - 65536 * (a = Math.floor(n / 65536)), v = (n = v + a + 65535) - 65536 * (a = Math.floor(n / 65536)), D = (n = D + a + 65535) - 65536 * (a = Math.floor(n / 65536)), P = (n = P + a + 65535) - 65536 * (a = Math.floor(n / 65536)), k = (n = k + a + 65535) - 65536 * (a = Math.floor(n / 65536)), w = (n = w + a + 65535) - 65536 * (a = Math.floor(n / 65536)), i += a - 1 + 37 * (a - 1), e[0] = i, e[1] = l, e[2] = c, e[3] = u, e[4] = x, e[5] = f, e[6] = h, e[7] = p, e[8] = m, e[9] = y, e[10] = B, e[11] = v, e[12] = D, e[13] = P, e[14] = k, e[15] = w; + var n, a, i = 0, l = 0, c = 0, u = 0, x = 0, f = 0, h = 0, p = 0, m = 0, y = 0, B = 0, v = 0, D = 0, P = 0, k = 0, w = 0, _ = 0, T = 0, N = 0, U = 0, C = 0, z = 0, I = 0, R = 0, L = 0, O = 0, W = 0, $ = 0, X = 0, Y = 0, Q = 0, V = r[0], M = r[1], G = r[2], ee = r[3], te = r[4], oe = r[5], ie = r[6], xe = r[7], de = r[8], he = r[9], be = r[10], ve = r[11], Ce = r[12], Ie = r[13], Ue = r[14], ge = r[15]; + i += (n = t[0]) * V, l += n * M, c += n * G, u += n * ee, x += n * te, f += n * oe, h += n * ie, p += n * xe, m += n * de, y += n * he, B += n * be, v += n * ve, D += n * Ce, P += n * Ie, k += n * Ue, w += n * ge, l += (n = t[1]) * V, c += n * M, u += n * G, x += n * ee, f += n * te, h += n * oe, p += n * ie, m += n * xe, y += n * de, B += n * he, v += n * be, D += n * ve, P += n * Ce, k += n * Ie, w += n * Ue, _ += n * ge, c += (n = t[2]) * V, u += n * M, x += n * G, f += n * ee, h += n * te, p += n * oe, m += n * ie, y += n * xe, B += n * de, v += n * he, D += n * be, P += n * ve, k += n * Ce, w += n * Ie, _ += n * Ue, T += n * ge, u += (n = t[3]) * V, x += n * M, f += n * G, h += n * ee, p += n * te, m += n * oe, y += n * ie, B += n * xe, v += n * de, D += n * he, P += n * be, k += n * ve, w += n * Ce, _ += n * Ie, T += n * Ue, N += n * ge, x += (n = t[4]) * V, f += n * M, h += n * G, p += n * ee, m += n * te, y += n * oe, B += n * ie, v += n * xe, D += n * de, P += n * he, k += n * be, w += n * ve, _ += n * Ce, T += n * Ie, N += n * Ue, U += n * ge, f += (n = t[5]) * V, h += n * M, p += n * G, m += n * ee, y += n * te, B += n * oe, v += n * ie, D += n * xe, P += n * de, k += n * he, w += n * be, _ += n * ve, T += n * Ce, N += n * Ie, U += n * Ue, C += n * ge, h += (n = t[6]) * V, p += n * M, m += n * G, y += n * ee, B += n * te, v += n * oe, D += n * ie, P += n * xe, k += n * de, w += n * he, _ += n * be, T += n * ve, N += n * Ce, U += n * Ie, C += n * Ue, z += n * ge, p += (n = t[7]) * V, m += n * M, y += n * G, B += n * ee, v += n * te, D += n * oe, P += n * ie, k += n * xe, w += n * de, _ += n * he, T += n * be, N += n * ve, U += n * Ce, C += n * Ie, z += n * Ue, I += n * ge, m += (n = t[8]) * V, y += n * M, B += n * G, v += n * ee, D += n * te, P += n * oe, k += n * ie, w += n * xe, _ += n * de, T += n * he, N += n * be, U += n * ve, C += n * Ce, z += n * Ie, I += n * Ue, R += n * ge, y += (n = t[9]) * V, B += n * M, v += n * G, D += n * ee, P += n * te, k += n * oe, w += n * ie, _ += n * xe, T += n * de, N += n * he, U += n * be, C += n * ve, z += n * Ce, I += n * Ie, R += n * Ue, L += n * ge, B += (n = t[10]) * V, v += n * M, D += n * G, P += n * ee, k += n * te, w += n * oe, _ += n * ie, T += n * xe, N += n * de, U += n * he, C += n * be, z += n * ve, I += n * Ce, R += n * Ie, L += n * Ue, O += n * ge, v += (n = t[11]) * V, D += n * M, P += n * G, k += n * ee, w += n * te, _ += n * oe, T += n * ie, N += n * xe, U += n * de, C += n * he, z += n * be, I += n * ve, R += n * Ce, L += n * Ie, O += n * Ue, W += n * ge, D += (n = t[12]) * V, P += n * M, k += n * G, w += n * ee, _ += n * te, T += n * oe, N += n * ie, U += n * xe, C += n * de, z += n * he, I += n * be, R += n * ve, L += n * Ce, O += n * Ie, W += n * Ue, $ += n * ge, P += (n = t[13]) * V, k += n * M, w += n * G, _ += n * ee, T += n * te, N += n * oe, U += n * ie, C += n * xe, z += n * de, I += n * he, R += n * be, L += n * ve, O += n * Ce, W += n * Ie, $ += n * Ue, X += n * ge, k += (n = t[14]) * V, w += n * M, _ += n * G, T += n * ee, N += n * te, U += n * oe, C += n * ie, z += n * xe, I += n * de, R += n * he, L += n * be, O += n * ve, W += n * Ce, $ += n * Ie, X += n * Ue, Y += n * ge, w += (n = t[15]) * V, l += 38 * (T += n * G), c += 38 * (N += n * ee), u += 38 * (U += n * te), x += 38 * (C += n * oe), f += 38 * (z += n * ie), h += 38 * (I += n * xe), p += 38 * (R += n * de), m += 38 * (L += n * he), y += 38 * (O += n * be), B += 38 * (W += n * ve), v += 38 * ($ += n * Ce), D += 38 * (X += n * Ie), P += 38 * (Y += n * Ue), k += 38 * (Q += n * ge), i = (n = (i += 38 * (_ += n * M)) + (a = 1) + 65535) - 65536 * (a = Math.floor(n / 65536)), l = (n = l + a + 65535) - 65536 * (a = Math.floor(n / 65536)), c = (n = c + a + 65535) - 65536 * (a = Math.floor(n / 65536)), u = (n = u + a + 65535) - 65536 * (a = Math.floor(n / 65536)), x = (n = x + a + 65535) - 65536 * (a = Math.floor(n / 65536)), f = (n = f + a + 65535) - 65536 * (a = Math.floor(n / 65536)), h = (n = h + a + 65535) - 65536 * (a = Math.floor(n / 65536)), p = (n = p + a + 65535) - 65536 * (a = Math.floor(n / 65536)), m = (n = m + a + 65535) - 65536 * (a = Math.floor(n / 65536)), y = (n = y + a + 65535) - 65536 * (a = Math.floor(n / 65536)), B = (n = B + a + 65535) - 65536 * (a = Math.floor(n / 65536)), v = (n = v + a + 65535) - 65536 * (a = Math.floor(n / 65536)), D = (n = D + a + 65535) - 65536 * (a = Math.floor(n / 65536)), P = (n = P + a + 65535) - 65536 * (a = Math.floor(n / 65536)), k = (n = k + a + 65535) - 65536 * (a = Math.floor(n / 65536)), w = (n = w + a + 65535) - 65536 * (a = Math.floor(n / 65536)), i = (n = (i += a - 1 + 37 * (a - 1)) + (a = 1) + 65535) - 65536 * (a = Math.floor(n / 65536)), l = (n = l + a + 65535) - 65536 * (a = Math.floor(n / 65536)), c = (n = c + a + 65535) - 65536 * (a = Math.floor(n / 65536)), u = (n = u + a + 65535) - 65536 * (a = Math.floor(n / 65536)), x = (n = x + a + 65535) - 65536 * (a = Math.floor(n / 65536)), f = (n = f + a + 65535) - 65536 * (a = Math.floor(n / 65536)), h = (n = h + a + 65535) - 65536 * (a = Math.floor(n / 65536)), p = (n = p + a + 65535) - 65536 * (a = Math.floor(n / 65536)), m = (n = m + a + 65535) - 65536 * (a = Math.floor(n / 65536)), y = (n = y + a + 65535) - 65536 * (a = Math.floor(n / 65536)), B = (n = B + a + 65535) - 65536 * (a = Math.floor(n / 65536)), v = (n = v + a + 65535) - 65536 * (a = Math.floor(n / 65536)), D = (n = D + a + 65535) - 65536 * (a = Math.floor(n / 65536)), P = (n = P + a + 65535) - 65536 * (a = Math.floor(n / 65536)), k = (n = k + a + 65535) - 65536 * (a = Math.floor(n / 65536)), w = (n = w + a + 65535) - 65536 * (a = Math.floor(n / 65536)), i += a - 1 + 37 * (a - 1), e[0] = i, e[1] = l, e[2] = c, e[3] = u, e[4] = x, e[5] = f, e[6] = h, e[7] = p, e[8] = m, e[9] = y, e[10] = B, e[11] = v, e[12] = D, e[13] = P, e[14] = k, e[15] = w; } function Hn(e, t) { et(e, t, t); @@ -35356,10 +35356,10 @@ zoo 1246189591 ]; function k6(e, t, r, n) { - for (var a, i, l, c, u, x, f, h, p, m, y, B, v, D, P, k, w, _, T, N, U, C, j, I, R, L, O = new Int32Array(16), W = new Int32Array(16), $ = e[0], X = e[1], Y = e[2], Q = e[3], G = e[4], K = e[5], V = e[6], ee = e[7], te = t[0], oe = t[1], ie = t[2], ce = t[3], de = t[4], he = t[5], be = t[6], ve = t[7], Ce = 0; n >= 128; ) { + for (var a, i, l, c, u, x, f, h, p, m, y, B, v, D, P, k, w, _, T, N, U, C, z, I, R, L, O = new Int32Array(16), W = new Int32Array(16), $ = e[0], X = e[1], Y = e[2], Q = e[3], V = e[4], M = e[5], G = e[6], ee = e[7], te = t[0], oe = t[1], ie = t[2], xe = t[3], de = t[4], he = t[5], be = t[6], ve = t[7], Ce = 0; n >= 128; ) { for (T = 0; T < 16; T++) N = 8 * T + Ce, O[T] = r[N + 0] << 24 | r[N + 1] << 16 | r[N + 2] << 8 | r[N + 3], W[T] = r[N + 4] << 24 | r[N + 5] << 16 | r[N + 6] << 8 | r[N + 7]; - for (T = 0; T < 80; T++) if (a = $, i = X, l = Y, c = Q, u = G, x = K, f = V, p = te, m = oe, y = ie, B = ce, v = de, D = he, P = be, j = 65535 & (C = ve), I = C >>> 16, R = 65535 & (U = ee), L = U >>> 16, j += 65535 & (C = (de >>> 14 | G << 18) ^ (de >>> 18 | G << 14) ^ (G >>> 9 | de << 23)), I += C >>> 16, R += 65535 & (U = (G >>> 14 | de << 18) ^ (G >>> 18 | de << 14) ^ (de >>> 9 | G << 23)), L += U >>> 16, j += 65535 & (C = de & he ^ ~de & be), I += C >>> 16, R += 65535 & (U = G & K ^ ~G & V), L += U >>> 16, j += 65535 & (C = C6[2 * T + 1]), I += C >>> 16, R += 65535 & (U = C6[2 * T]), L += U >>> 16, U = O[T % 16], I += (C = W[T % 16]) >>> 16, R += 65535 & U, L += U >>> 16, R += (I += (j += 65535 & C) >>> 16) >>> 16, j = 65535 & (C = _ = 65535 & j | I << 16), I = C >>> 16, R = 65535 & (U = w = 65535 & R | (L += R >>> 16) << 16), L = U >>> 16, j += 65535 & (C = (te >>> 28 | $ << 4) ^ ($ >>> 2 | te << 30) ^ ($ >>> 7 | te << 25)), I += C >>> 16, R += 65535 & (U = ($ >>> 28 | te << 4) ^ (te >>> 2 | $ << 30) ^ (te >>> 7 | $ << 25)), L += U >>> 16, I += (C = te & oe ^ te & ie ^ oe & ie) >>> 16, R += 65535 & (U = $ & X ^ $ & Y ^ X & Y), L += U >>> 16, h = 65535 & (R += (I += (j += 65535 & C) >>> 16) >>> 16) | (L += R >>> 16) << 16, k = 65535 & j | I << 16, j = 65535 & (C = B), I = C >>> 16, R = 65535 & (U = c), L = U >>> 16, I += (C = _) >>> 16, R += 65535 & (U = w), L += U >>> 16, X = a, Y = i, Q = l, G = c = 65535 & (R += (I += (j += 65535 & C) >>> 16) >>> 16) | (L += R >>> 16) << 16, K = u, V = x, ee = f, $ = h, oe = p, ie = m, ce = y, de = B = 65535 & j | I << 16, he = v, be = D, ve = P, te = k, T % 16 == 15) for (N = 0; N < 16; N++) U = O[N], j = 65535 & (C = W[N]), I = C >>> 16, R = 65535 & U, L = U >>> 16, U = O[(N + 9) % 16], j += 65535 & (C = W[(N + 9) % 16]), I += C >>> 16, R += 65535 & U, L += U >>> 16, w = O[(N + 1) % 16], j += 65535 & (C = ((_ = W[(N + 1) % 16]) >>> 1 | w << 31) ^ (_ >>> 8 | w << 24) ^ (_ >>> 7 | w << 25)), I += C >>> 16, R += 65535 & (U = (w >>> 1 | _ << 31) ^ (w >>> 8 | _ << 24) ^ w >>> 7), L += U >>> 16, w = O[(N + 14) % 16], I += (C = ((_ = W[(N + 14) % 16]) >>> 19 | w << 13) ^ (w >>> 29 | _ << 3) ^ (_ >>> 6 | w << 26)) >>> 16, R += 65535 & (U = (w >>> 19 | _ << 13) ^ (_ >>> 29 | w << 3) ^ w >>> 6), L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, O[N] = 65535 & R | L << 16, W[N] = 65535 & j | I << 16; - j = 65535 & (C = te), I = C >>> 16, R = 65535 & (U = $), L = U >>> 16, U = e[0], I += (C = t[0]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[0] = $ = 65535 & R | L << 16, t[0] = te = 65535 & j | I << 16, j = 65535 & (C = oe), I = C >>> 16, R = 65535 & (U = X), L = U >>> 16, U = e[1], I += (C = t[1]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[1] = X = 65535 & R | L << 16, t[1] = oe = 65535 & j | I << 16, j = 65535 & (C = ie), I = C >>> 16, R = 65535 & (U = Y), L = U >>> 16, U = e[2], I += (C = t[2]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[2] = Y = 65535 & R | L << 16, t[2] = ie = 65535 & j | I << 16, j = 65535 & (C = ce), I = C >>> 16, R = 65535 & (U = Q), L = U >>> 16, U = e[3], I += (C = t[3]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[3] = Q = 65535 & R | L << 16, t[3] = ce = 65535 & j | I << 16, j = 65535 & (C = de), I = C >>> 16, R = 65535 & (U = G), L = U >>> 16, U = e[4], I += (C = t[4]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[4] = G = 65535 & R | L << 16, t[4] = de = 65535 & j | I << 16, j = 65535 & (C = he), I = C >>> 16, R = 65535 & (U = K), L = U >>> 16, U = e[5], I += (C = t[5]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[5] = K = 65535 & R | L << 16, t[5] = he = 65535 & j | I << 16, j = 65535 & (C = be), I = C >>> 16, R = 65535 & (U = V), L = U >>> 16, U = e[6], I += (C = t[6]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[6] = V = 65535 & R | L << 16, t[6] = be = 65535 & j | I << 16, j = 65535 & (C = ve), I = C >>> 16, R = 65535 & (U = ee), L = U >>> 16, U = e[7], I += (C = t[7]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (j += 65535 & C) >>> 16) >>> 16) >>> 16, e[7] = ee = 65535 & R | L << 16, t[7] = ve = 65535 & j | I << 16, Ce += 128, n -= 128; + for (T = 0; T < 80; T++) if (a = $, i = X, l = Y, c = Q, u = V, x = M, f = G, p = te, m = oe, y = ie, B = xe, v = de, D = he, P = be, z = 65535 & (C = ve), I = C >>> 16, R = 65535 & (U = ee), L = U >>> 16, z += 65535 & (C = (de >>> 14 | V << 18) ^ (de >>> 18 | V << 14) ^ (V >>> 9 | de << 23)), I += C >>> 16, R += 65535 & (U = (V >>> 14 | de << 18) ^ (V >>> 18 | de << 14) ^ (de >>> 9 | V << 23)), L += U >>> 16, z += 65535 & (C = de & he ^ ~de & be), I += C >>> 16, R += 65535 & (U = V & M ^ ~V & G), L += U >>> 16, z += 65535 & (C = C6[2 * T + 1]), I += C >>> 16, R += 65535 & (U = C6[2 * T]), L += U >>> 16, U = O[T % 16], I += (C = W[T % 16]) >>> 16, R += 65535 & U, L += U >>> 16, R += (I += (z += 65535 & C) >>> 16) >>> 16, z = 65535 & (C = _ = 65535 & z | I << 16), I = C >>> 16, R = 65535 & (U = w = 65535 & R | (L += R >>> 16) << 16), L = U >>> 16, z += 65535 & (C = (te >>> 28 | $ << 4) ^ ($ >>> 2 | te << 30) ^ ($ >>> 7 | te << 25)), I += C >>> 16, R += 65535 & (U = ($ >>> 28 | te << 4) ^ (te >>> 2 | $ << 30) ^ (te >>> 7 | $ << 25)), L += U >>> 16, I += (C = te & oe ^ te & ie ^ oe & ie) >>> 16, R += 65535 & (U = $ & X ^ $ & Y ^ X & Y), L += U >>> 16, h = 65535 & (R += (I += (z += 65535 & C) >>> 16) >>> 16) | (L += R >>> 16) << 16, k = 65535 & z | I << 16, z = 65535 & (C = B), I = C >>> 16, R = 65535 & (U = c), L = U >>> 16, I += (C = _) >>> 16, R += 65535 & (U = w), L += U >>> 16, X = a, Y = i, Q = l, V = c = 65535 & (R += (I += (z += 65535 & C) >>> 16) >>> 16) | (L += R >>> 16) << 16, M = u, G = x, ee = f, $ = h, oe = p, ie = m, xe = y, de = B = 65535 & z | I << 16, he = v, be = D, ve = P, te = k, T % 16 == 15) for (N = 0; N < 16; N++) U = O[N], z = 65535 & (C = W[N]), I = C >>> 16, R = 65535 & U, L = U >>> 16, U = O[(N + 9) % 16], z += 65535 & (C = W[(N + 9) % 16]), I += C >>> 16, R += 65535 & U, L += U >>> 16, w = O[(N + 1) % 16], z += 65535 & (C = ((_ = W[(N + 1) % 16]) >>> 1 | w << 31) ^ (_ >>> 8 | w << 24) ^ (_ >>> 7 | w << 25)), I += C >>> 16, R += 65535 & (U = (w >>> 1 | _ << 31) ^ (w >>> 8 | _ << 24) ^ w >>> 7), L += U >>> 16, w = O[(N + 14) % 16], I += (C = ((_ = W[(N + 14) % 16]) >>> 19 | w << 13) ^ (w >>> 29 | _ << 3) ^ (_ >>> 6 | w << 26)) >>> 16, R += 65535 & (U = (w >>> 19 | _ << 13) ^ (_ >>> 29 | w << 3) ^ w >>> 6), L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, O[N] = 65535 & R | L << 16, W[N] = 65535 & z | I << 16; + z = 65535 & (C = te), I = C >>> 16, R = 65535 & (U = $), L = U >>> 16, U = e[0], I += (C = t[0]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[0] = $ = 65535 & R | L << 16, t[0] = te = 65535 & z | I << 16, z = 65535 & (C = oe), I = C >>> 16, R = 65535 & (U = X), L = U >>> 16, U = e[1], I += (C = t[1]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[1] = X = 65535 & R | L << 16, t[1] = oe = 65535 & z | I << 16, z = 65535 & (C = ie), I = C >>> 16, R = 65535 & (U = Y), L = U >>> 16, U = e[2], I += (C = t[2]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[2] = Y = 65535 & R | L << 16, t[2] = ie = 65535 & z | I << 16, z = 65535 & (C = xe), I = C >>> 16, R = 65535 & (U = Q), L = U >>> 16, U = e[3], I += (C = t[3]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[3] = Q = 65535 & R | L << 16, t[3] = xe = 65535 & z | I << 16, z = 65535 & (C = de), I = C >>> 16, R = 65535 & (U = V), L = U >>> 16, U = e[4], I += (C = t[4]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[4] = V = 65535 & R | L << 16, t[4] = de = 65535 & z | I << 16, z = 65535 & (C = he), I = C >>> 16, R = 65535 & (U = M), L = U >>> 16, U = e[5], I += (C = t[5]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[5] = M = 65535 & R | L << 16, t[5] = he = 65535 & z | I << 16, z = 65535 & (C = be), I = C >>> 16, R = 65535 & (U = G), L = U >>> 16, U = e[6], I += (C = t[6]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[6] = G = 65535 & R | L << 16, t[6] = be = 65535 & z | I << 16, z = 65535 & (C = ve), I = C >>> 16, R = 65535 & (U = ee), L = U >>> 16, U = e[7], I += (C = t[7]) >>> 16, R += 65535 & U, L += U >>> 16, L += (R += (I += (z += 65535 & C) >>> 16) >>> 16) >>> 16, e[7] = ee = 65535 & R | L << 16, t[7] = ve = 65535 & z | I << 16, Ce += 128, n -= 128; } return n; } @@ -36095,8 +36095,8 @@ zoo 268701696 ]; let y, B, v, D, P, k, w, _, T, N, U = 0, C = t.length; - const j = e.length === 32 ? 3 : 9; - _ = j === 3 ? r ? [ + const z = e.length === 32 ? 3 : 9; + _ = z === 3 ? r ? [ 0, 32, 2 @@ -36139,7 +36139,7 @@ zoo })(t), C = t.length); let I = new Uint8Array(C), R = 0; for (; U < C; ) { - for (k = t[U++] << 24 | t[U++] << 16 | t[U++] << 8 | t[U++], w = t[U++] << 24 | t[U++] << 16 | t[U++] << 8 | t[U++], v = 252645135 & (k >>> 4 ^ w), w ^= v, k ^= v << 4, v = 65535 & (k >>> 16 ^ w), w ^= v, k ^= v << 16, v = 858993459 & (w >>> 2 ^ k), k ^= v, w ^= v << 2, v = 16711935 & (w >>> 8 ^ k), k ^= v, w ^= v << 8, v = 1431655765 & (k >>> 1 ^ w), w ^= v, k ^= v << 1, k = k << 1 | k >>> 31, w = w << 1 | w >>> 31, B = 0; B < j; B += 3) { + for (k = t[U++] << 24 | t[U++] << 16 | t[U++] << 8 | t[U++], w = t[U++] << 24 | t[U++] << 16 | t[U++] << 8 | t[U++], v = 252645135 & (k >>> 4 ^ w), w ^= v, k ^= v << 4, v = 65535 & (k >>> 16 ^ w), w ^= v, k ^= v << 16, v = 858993459 & (w >>> 2 ^ k), k ^= v, w ^= v << 2, v = 16711935 & (w >>> 8 ^ k), k ^= v, w ^= v << 8, v = 1431655765 & (k >>> 1 ^ w), w ^= v, k ^= v << 1, k = k << 1 | k >>> 31, w = w << 1 | w >>> 31, B = 0; B < z; B += 3) { for (T = _[B + 1], N = _[B + 2], y = _[B]; y !== T; y += N) D = w ^ e[y], P = (w >>> 4 | w << 28) ^ e[y + 1], v = k, k = w, w = v ^ (c[D >>> 24 & 63] | x[D >>> 16 & 63] | h[D >>> 8 & 63] | m[63 & D] | l[P >>> 24 & 63] | u[P >>> 16 & 63] | f[P >>> 8 & 63] | p[63 & P]); v = k, k = w, w = v; } @@ -36415,7 +36415,7 @@ zoo for (let N = 0; N < B; N++) { let U = e[_++] << 24 | e[_++] << 16 | e[_++] << 8 | e[_++], C = e[_++] << 24 | e[_++] << 16 | e[_++] << 8 | e[_++]; w = 252645135 & (U >>> 4 ^ C), C ^= w, U ^= w << 4, w = 65535 & (C >>> -16 ^ U), U ^= w, C ^= w << -16, w = 858993459 & (U >>> 2 ^ C), C ^= w, U ^= w << 2, w = 65535 & (C >>> -16 ^ U), U ^= w, C ^= w << -16, w = 1431655765 & (U >>> 1 ^ C), C ^= w, U ^= w << 1, w = 16711935 & (C >>> 8 ^ U), U ^= w, C ^= w << 8, w = 1431655765 & (U >>> 1 ^ C), C ^= w, U ^= w << 1, w = U << 8 | C >>> 20 & 240, U = C << 24 | C << 8 & 16711680 | C >>> 8 & 65280 | C >>> 24 & 240, C = w; - for (let j = 0; j < 16; j++) D[j] ? (U = U << 2 | U >>> 26, C = C << 2 | C >>> 26) : (U = U << 1 | U >>> 27, C = C << 1 | C >>> 27), U &= -15, C &= -15, P = t[U >>> 28] | r[U >>> 24 & 15] | n[U >>> 20 & 15] | a[U >>> 16 & 15] | i[U >>> 12 & 15] | l[U >>> 8 & 15] | c[U >>> 4 & 15], k = u[C >>> 28] | x[C >>> 24 & 15] | f[C >>> 20 & 15] | h[C >>> 16 & 15] | p[C >>> 12 & 15] | m[C >>> 8 & 15] | y[C >>> 4 & 15], w = 65535 & (k >>> 16 ^ P), v[T++] = P ^ w, v[T++] = k ^ w << 16; + for (let z = 0; z < 16; z++) D[z] ? (U = U << 2 | U >>> 26, C = C << 2 | C >>> 26) : (U = U << 1 | U >>> 27, C = C << 1 | C >>> 27), U &= -15, C &= -15, P = t[U >>> 28] | r[U >>> 24 & 15] | n[U >>> 20 & 15] | a[U >>> 16 & 15] | i[U >>> 12 & 15] | l[U >>> 8 & 15] | c[U >>> 4 & 15], k = u[C >>> 28] | x[C >>> 24 & 15] | f[C >>> 20 & 15] | h[C >>> 16 & 15] | p[C >>> 12 & 15] | m[C >>> 8 & 15] | y[C >>> 4 & 15], w = 65535 & (k >>> 16 ^ P), v[T++] = P ^ w, v[T++] = k ^ w << 16; } return v; } @@ -38963,7 +38963,7 @@ zoo 0, 8 ] - ], j = [ + ], z = [ [ 11, 10, @@ -39080,40 +39080,40 @@ zoo [], [] ]; - function $(K) { - return K ^ K >> 2 ^ [ + function $(M) { + return M ^ M >> 2 ^ [ 0, 90, 180, 238 - ][3 & K]; + ][3 & M]; } - function X(K) { - return K ^ K >> 1 ^ K >> 2 ^ [ + function X(M) { + return M ^ M >> 1 ^ M >> 2 ^ [ 0, 238, 180, 90 - ][3 & K]; + ][3 & M]; } - function Y(K, V) { + function Y(M, G) { let ee, te, oe; - for (ee = 0; ee < 8; ee++) te = V >>> 24, V = V << 8 & pn | K >>> 24, K = K << 8 & pn, oe = te << 1, 128 & te && (oe ^= 333), V ^= te ^ oe << 16, oe ^= te >>> 1, 1 & te && (oe ^= 166), V ^= oe << 24 | oe << 8; - return V; + for (ee = 0; ee < 8; ee++) te = G >>> 24, G = G << 8 & pn | M >>> 24, M = M << 8 & pn, oe = te << 1, 128 & te && (oe ^= 333), G ^= te ^ oe << 16, oe ^= te >>> 1, 1 & te && (oe ^= 166), G ^= oe << 24 | oe << 8; + return G; } - function Q(K, V) { - const ee = V >> 4, te = 15 & V, oe = U[K][ee ^ te], ie = C[K][R[te] ^ L[ee]]; - return I[K][R[ie] ^ L[oe]] << 4 | j[K][oe ^ ie]; + function Q(M, G) { + const ee = G >> 4, te = 15 & G, oe = U[M][ee ^ te], ie = C[M][R[te] ^ L[ee]]; + return I[M][R[ie] ^ L[oe]] << 4 | z[M][oe ^ ie]; } - function G(K, V) { - let ee = Ge(K, 0), te = Ge(K, 1), oe = Ge(K, 2), ie = Ge(K, 3); + function V(M, G) { + let ee = Ge(M, 0), te = Ge(M, 1), oe = Ge(M, 2), ie = Ge(M, 3); switch (k) { case 4: - ee = O[1][ee] ^ Ge(V[3], 0), te = O[0][te] ^ Ge(V[3], 1), oe = O[0][oe] ^ Ge(V[3], 2), ie = O[1][ie] ^ Ge(V[3], 3); + ee = O[1][ee] ^ Ge(G[3], 0), te = O[0][te] ^ Ge(G[3], 1), oe = O[0][oe] ^ Ge(G[3], 2), ie = O[1][ie] ^ Ge(G[3], 3); case 3: - ee = O[1][ee] ^ Ge(V[2], 0), te = O[1][te] ^ Ge(V[2], 1), oe = O[0][oe] ^ Ge(V[2], 2), ie = O[0][ie] ^ Ge(V[2], 3); + ee = O[1][ee] ^ Ge(G[2], 0), te = O[1][te] ^ Ge(G[2], 1), oe = O[0][oe] ^ Ge(G[2], 2), ie = O[0][ie] ^ Ge(G[2], 3); case 2: - ee = O[0][O[0][ee] ^ Ge(V[1], 0)] ^ Ge(V[0], 0), te = O[0][O[1][te] ^ Ge(V[1], 1)] ^ Ge(V[0], 1), oe = O[1][O[0][oe] ^ Ge(V[1], 2)] ^ Ge(V[0], 2), ie = O[1][O[1][ie] ^ Ge(V[1], 3)] ^ Ge(V[0], 3); + ee = O[0][O[0][ee] ^ Ge(G[1], 0)] ^ Ge(G[0], 0), te = O[0][O[1][te] ^ Ge(G[1], 1)] ^ Ge(G[0], 1), oe = O[1][O[0][oe] ^ Ge(G[1], 2)] ^ Ge(G[0], 2), ie = O[1][O[1][ie] ^ Ge(G[1], 3)] ^ Ge(G[0], 3); } return W[0][ee] ^ W[1][te] ^ W[2][oe] ^ W[3][ie]; } @@ -39122,7 +39122,7 @@ zoo for (h = 0; h < 256; h++) O[0][h] = Q(0, h), O[1][h] = Q(1, h); for (h = 0; h < 256; h++) _ = O[1][h], T = $(_), N = X(_), W[0][h] = _ + (T << 8) + (N << 16) + (N << 24), W[2][h] = T + (N << 8) + (_ << 16) + (N << 24), _ = O[0][h], T = $(_), N = X(_), W[1][h] = N + (N << 8) + (T << 16) + (_ << 24), W[3][h] = T + (_ << 8) + (N << 16) + (T << 24); for (k = P.length / 2, h = 0; h < k; h++) p = P[h + h], v[h] = p, m = P[h + h + 1], D[h] = m, w[k - h - 1] = Y(p, m); - for (h = 0; h < 40; h += 2) p = 16843009 * h, m = p + 16843009, p = G(p, v), m = ea(G(m, D), 8), a[h] = p + m & pn, a[h + 1] = ea(p + 2 * m, 9); + for (h = 0; h < 40; h += 2) p = 16843009 * h, m = p + 16843009, p = V(p, v), m = ea(V(m, D), 8), a[h] = p + m & pn, a[h + 1] = ea(p + 2 * m, 9); for (h = 0; h < 256; h++) switch (p = m = y = B = h, k) { case 4: p = O[1][p] ^ Ge(w[3], 0), m = O[0][m] ^ Ge(w[3], 1), y = O[0][y] ^ Ge(w[3], 2), B = O[1][B] ^ Ge(w[3], 3); @@ -40603,14 +40603,14 @@ zoo } function PC(e, { memory: t, instance: r }) { if (!FC) throw Error("BigEndian system not supported"); - const n = (function({ type: C, version: j, tagLength: I, password: R, salt: L, ad: O, secret: W, parallelism: $, memorySize: X, passes: Y }) { - const Q = (G, K, V, ee) => { - if (K < V || K > ee) throw Error(`${G} size should be between ${V} and ${ee} bytes`); + const n = (function({ type: C, version: z, tagLength: I, password: R, salt: L, ad: O, secret: W, parallelism: $, memorySize: X, passes: Y }) { + const Q = (V, M, G, ee) => { + if (M < G || M > ee) throw Error(`${V} size should be between ${G} and ${ee} bytes`); }; - if (C !== 2 || j !== 19) throw Error("Unsupported type or version"); + if (C !== 2 || z !== 19) throw Error("Unsupported type or version"); return Q("password", R, 8, 4294967295), Q("salt", L, 8, 4294967295), Q("tag", I, 4, 4294967295), Q("memory", X, 8 * $, 4294967295), O && Q("associated data", O, 0, 4294967295), W && Q("secret", W, 0, 32), { type: C, - version: j, + version: z, tagLength: I, password: R, salt: L, @@ -40641,12 +40641,12 @@ zoo }, B = new Uint8Array(t.buffer, p, Ta); p += B.length; const v = new Uint8Array(t.buffer, p, n.memorySize * Ta), D = new Uint8Array(t.buffer, 0, p), P = (function(C) { - const j = Sx(64), I = new Uint8Array(4), R = new Uint8Array(24); + const z = Sx(64), I = new Uint8Array(4), R = new Uint8Array(24); Mr(R, C.lanes, 0), Mr(R, C.tagLength, 4), Mr(R, C.memorySize, 8), Mr(R, C.passes, 12), Mr(R, C.version, 16), Mr(R, C.type, 20); const L = [ R ]; - C.password ? (L.push(Mr(new Uint8Array(4), C.password.length, 0)), L.push(C.password)) : L.push(I), C.salt ? (L.push(Mr(new Uint8Array(4), C.salt.length, 0)), L.push(C.salt)) : L.push(I), C.secret ? (L.push(Mr(new Uint8Array(4), C.secret.length, 0)), L.push(C.secret)) : L.push(I), C.ad ? (L.push(Mr(new Uint8Array(4), C.ad.length, 0)), L.push(C.ad)) : L.push(I), j.update((function(W) { + C.password ? (L.push(Mr(new Uint8Array(4), C.password.length, 0)), L.push(C.password)) : L.push(I), C.salt ? (L.push(Mr(new Uint8Array(4), C.salt.length, 0)), L.push(C.salt)) : L.push(I), C.secret ? (L.push(Mr(new Uint8Array(4), C.secret.length, 0)), L.push(C.secret)) : L.push(I), C.ad ? (L.push(Mr(new Uint8Array(4), C.ad.length, 0)), L.push(C.ad)) : L.push(I), z.update((function(W) { if (W.length === 1) return W[0]; let $ = 0; for (let Q = 0; Q < W.length; Q++) { @@ -40659,22 +40659,22 @@ zoo X.set(Q, Y), Y += Q.length; })), X; })(L)); - const O = j.digest(); + const O = z.digest(); return new Uint8Array(O); - })(n), k = f / n.lanes, w = Array(n.lanes).fill(null).map((() => Array(k))), _ = (C, j) => (w[C][j] = v.subarray(C * k * 1024 + 1024 * j, C * k * 1024 + 1024 * j + Ta), w[C][j]); + })(n), k = f / n.lanes, w = Array(n.lanes).fill(null).map((() => Array(k))), _ = (C, z) => (w[C][z] = v.subarray(C * k * 1024 + 1024 * z, C * k * 1024 + 1024 * z + Ta), w[C][z]); for (let C = 0; C < n.lanes; C++) { - const j = new Uint8Array(P.length + 8); - j.set(P), Mr(j, 0, P.length), Mr(j, C, P.length + 4), Ph(Ta, j, _(C, 0)), Mr(j, 1, P.length), Ph(Ta, j, _(C, 1)); + const z = new Uint8Array(P.length + 8); + z.set(P), Mr(z, 0, P.length), Mr(z, C, P.length + 4), Ph(Ta, z, _(C, 0)), Mr(z, 1, P.length), Ph(Ta, z, _(C, 1)); } const T = k / 4; - for (let C = 0; C < n.passes; C++) for (let j = 0; j < 4; j++) { - const I = C === 0 && j <= 1; + for (let C = 0; C < n.passes; C++) for (let z = 0; z < 4; z++) { + const I = C === 0 && z <= 1; for (let R = 0; R < n.lanes; R++) { - let L = j === 0 && C === 0 ? 2 : 0; - const O = I ? IC(y, C, R, j, f, n.passes, T, L) : null; + let L = z === 0 && C === 0 ? 2 : 0; + const O = I ? IC(y, C, R, z, f, n.passes, T, L) : null; for (; L < T; L++) { - const W = j * T + L, $ = W > 0 ? w[R][W - 1] : w[R][k - 1], X = I ? O.next().value : $; - c(m.byteOffset, X.byteOffset, R, n.lanes, C, j, L, 4, T); + const W = z * T + L, $ = W > 0 ? w[R][W - 1] : w[R][k - 1], X = I ? O.next().value : $; + c(m.byteOffset, X.byteOffset, R, n.lanes, C, z, L, 4, T); const Y = m[0], Q = m[1]; C === 0 && _(R, W), SC(y, $, w[Y][Q], C > 0 ? B : w[R][W]), C > 0 && I6(y, w[R][W], B, w[R][W]); } @@ -41045,25 +41045,25 @@ zoo for (D = w - 1; D >= 0; D--) this.mtfSymbol[D + 1] = this.mtfSymbol[D]; this.mtfSymbol[0] = _, this.selectors[p] = _; } - var T, N, U, C, j = v + 2, I = [], R = new Uint8Array(258), L = new Uint16Array(21); + var T, N, U, C, z = v + 2, I = [], R = new Uint8Array(258), L = new Uint16Array(21); for (w = 0; w < P; w++) { - for (B = i(5), p = 0; p < j; p++) { + for (B = i(5), p = 0; p < z; p++) { for (; (B < 1 || B > 20) && n("Invalid bzip data"), i(1); ) i(1) ? B-- : B++; R[p] = B; } var O, W; - for (O = W = R[0], p = 1; p < j; p++) R[p] > W ? W = R[p] : R[p] < O && (O = R[p]); + for (O = W = R[0], p = 1; p < z; p++) R[p] > W ? W = R[p] : R[p] < O && (O = R[p]); (T = I[w] = {}).permute = new Int32Array(258), T.limit = new Int32Array(21), T.base = new Int32Array(21), T.minLen = O, T.maxLen = W; var $ = T.base, X = T.limit, Y = 0; - for (p = O; p <= W; p++) for (B = 0; B < j; B++) R[B] == p && (T.permute[Y++] = B); + for (p = O; p <= W; p++) for (B = 0; B < z; B++) R[B] == p && (T.permute[Y++] = B); for (p = O; p <= W; p++) L[p] = X[p] = 0; - for (p = 0; p < j; p++) L[R[p]]++; + for (p = 0; p < z; p++) L[R[p]]++; for (Y = B = 0, p = O; p < W; p++) Y += L[p], X[p] = Y - 1, Y <<= 1, $[p + 1] = Y - (B += L[p]); X[W] = Y + L[W] - 1, $[O] = 0; } for (p = 0; p < 256; p++) this.mtfSymbol[p] = p, this.byteCount[p] = 0; - for (N = U = j = C = 0; ; ) { - for (j-- || (j = 49, C >= k && n("Invalid bzip data"), $ = (T = I[this.selectors[C++]]).base, X = T.limit), w = i(p = T.minLen); p > T.maxLen && n("Invalid bzip data"), !(w <= X[p]); ) p++, w = w << 1 | i(1); + for (N = U = z = C = 0; ; ) { + for (z-- || (z = 49, C >= k && n("Invalid bzip data"), $ = (T = I[this.selectors[C++]]).base, X = T.limit), w = i(p = T.minLen); p > T.maxLen && n("Invalid bzip data"), !(w <= X[p]); ) p++, w = w << 1 | i(1); ((w -= $[p]) < 0 || w >= 258) && n("Invalid bzip data"); var Q = T.permute[w]; if (Q != 0 && Q != 1) { @@ -41075,10 +41075,10 @@ zoo } for ((y < 0 || y >= U) && n("Invalid bzip data"), w = 0, p = 0; p < 256; p++) D = w + this.byteCount[p], this.byteCount[p] = w, w = D; for (p = 0; p < U; p++) _ = 255 & c[p], c[this.byteCount[_]] |= p << 8, this.byteCount[_]++; - var G, K, V, ee = 0, te = 0, oe = 0; + var V, M, G, ee = 0, te = 0, oe = 0; for (U && (te = 255 & (ee = c[y]), ee >>= 8, oe = -1); U; ) { - for (U--, K = te, te = 255 & (ee = c[ee]), ee >>= 8, oe++ == 3 ? (G = te, V = K, te = -1) : (G = 1, V = te); G--; ) f = 4294967295 & (f << 8 ^ this.crcTable[255 & (f >> 24 ^ V)]), l(V); - te != K && (oe = 0); + for (U--, M = te, te = 255 & (ee = c[ee]), ee >>= 8, oe++ == 3 ? (V = te, G = M, te = -1) : (V = 1, G = te); V--; ) f = 4294967295 & (f << 8 ^ this.crcTable[255 & (f >> 24 ^ G)]), l(G); + te != M && (oe = 0); } return (0 | (f = ~f >>> 0)) != (0 | m) && n("Error in bzip2: crc32 do not match"), 4294967295 & (f ^ (x << 1 | x >>> 31)); }, N6 = a; @@ -41922,13 +41922,13 @@ zoo }; const ox = 16209, vD = 16191; var BD = function(t, r) { - let n, a, i, l, c, u, x, f, h, p, m, y, B, v, D, P, k, w, _, T, N, U, C, j; + let n, a, i, l, c, u, x, f, h, p, m, y, B, v, D, P, k, w, _, T, N, U, C, z; const I = t.state; - n = t.next_in, C = t.input, a = n + (t.avail_in - 5), i = t.next_out, j = t.output, l = i - (r - t.avail_out), c = i + (t.avail_out - 257), u = I.dmax, x = I.wsize, f = I.whave, h = I.wnext, p = I.window, m = I.hold, y = I.bits, B = I.lencode, v = I.distcode, D = (1 << I.lenbits) - 1, P = (1 << I.distbits) - 1; + n = t.next_in, C = t.input, a = n + (t.avail_in - 5), i = t.next_out, z = t.output, l = i - (r - t.avail_out), c = i + (t.avail_out - 257), u = I.dmax, x = I.wsize, f = I.whave, h = I.wnext, p = I.window, m = I.hold, y = I.bits, B = I.lencode, v = I.distcode, D = (1 << I.lenbits) - 1, P = (1 << I.distbits) - 1; e: do { y < 15 && (m += C[n++] << y, y += 8, m += C[n++] << y, y += 8), k = B[m & D]; t: for (; ; ) { - if (w = k >>> 24, m >>>= w, y -= w, w = k >>> 16 & 255, w === 0) j[i++] = k & 65535; + if (w = k >>> 24, m >>>= w, y -= w, w = k >>> 16 & 255, w === 0) z[i++] = k & 65535; else if (w & 16) { _ = k & 65535, w &= 15, w && (y < w && (m += C[n++] << y, y += 8), _ += m & (1 << w) - 1, m >>>= w, y -= w), y < 15 && (m += C[n++] << y, y += 8, m += C[n++] << y, y += 8), k = v[m & P]; r: for (; ; ) { @@ -41946,39 +41946,39 @@ zoo if (N += x - w, w < _) { _ -= w; do - j[i++] = p[N++]; + z[i++] = p[N++]; while (--w); - N = i - T, U = j; + N = i - T, U = z; } } else if (h < w) { if (N += x + h - w, w -= h, w < _) { _ -= w; do - j[i++] = p[N++]; + z[i++] = p[N++]; while (--w); if (N = 0, h < _) { w = h, _ -= w; do - j[i++] = p[N++]; + z[i++] = p[N++]; while (--w); - N = i - T, U = j; + N = i - T, U = z; } } } else if (N += h - w, w < _) { _ -= w; do - j[i++] = p[N++]; + z[i++] = p[N++]; while (--w); - N = i - T, U = j; + N = i - T, U = z; } - for (; _ > 2; ) j[i++] = U[N++], j[i++] = U[N++], j[i++] = U[N++], _ -= 3; - _ && (j[i++] = U[N++], _ > 1 && (j[i++] = U[N++])); + for (; _ > 2; ) z[i++] = U[N++], z[i++] = U[N++], z[i++] = U[N++], _ -= 3; + _ && (z[i++] = U[N++], _ > 1 && (z[i++] = U[N++])); } else { N = i - T; do - j[i++] = j[N++], j[i++] = j[N++], j[i++] = j[N++], _ -= 3; + z[i++] = z[N++], z[i++] = z[N++], z[i++] = z[N++], _ -= 3; while (_ > 2); - _ && (j[i++] = j[N++], _ > 1 && (j[i++] = j[N++])); + _ && (z[i++] = z[N++], _ > 1 && (z[i++] = z[N++])); } } else if ((w & 64) === 0) { k = v[(k & 65535) + (m & (1 << w) - 1)]; @@ -42137,16 +42137,16 @@ zoo ]), SD = (e, t, r, n, a, i, l, c) => { const u = c.bits; let x = 0, f = 0, h = 0, p = 0, m = 0, y = 0, B = 0, v = 0, D = 0, P = 0, k, w, _, T, N, U = null, C; - const j = new Uint16Array(U0 + 1), I = new Uint16Array(U0 + 1); + const z = new Uint16Array(U0 + 1), I = new Uint16Array(U0 + 1); let R = null, L, O, W; - for (x = 0; x <= U0; x++) j[x] = 0; - for (f = 0; f < n; f++) j[t[r + f]]++; - for (m = u, p = U0; p >= 1 && j[p] === 0; p--) ; + for (x = 0; x <= U0; x++) z[x] = 0; + for (f = 0; f < n; f++) z[t[r + f]]++; + for (m = u, p = U0; p >= 1 && z[p] === 0; p--) ; if (m > p && (m = p), p === 0) return a[i++] = 1 << 24 | 64 << 16 | 0, a[i++] = 1 << 24 | 64 << 16 | 0, c.bits = 1, 0; - for (h = 1; h < p && j[h] === 0; h++) ; - for (m < h && (m = h), v = 1, x = 1; x <= U0; x++) if (v <<= 1, v -= j[x], v < 0) return -1; + for (h = 1; h < p && z[h] === 0; h++) ; + for (m < h && (m = h), v = 1, x = 1; x <= U0; x++) if (v <<= 1, v -= z[x], v < 0) return -1; if (v > 0 && (e === Y6 || p !== 1)) return -1; - for (I[1] = 0, x = 1; x < U0; x++) I[x + 1] = I[x] + j[x]; + for (I[1] = 0, x = 1; x < U0; x++) I[x + 1] = I[x] + z[x]; for (f = 0; f < n; f++) t[r + f] !== 0 && (l[I[t[r + f]]++] = f); if (e === Y6 ? (U = R = l, C = 20) : e === Kh ? (U = CD, R = kD, C = 257) : (U = DD, R = FD, C = 0), P = 0, f = 0, x = h, N = i, y = m, B = 0, _ = -1, D = 1 << m, T = D - 1, e === Kh && D > $6 || e === X6 && D > Z6) return 1; for (; ; ) { @@ -42155,12 +42155,12 @@ zoo w -= k, a[N + (P >> B) + w] = L << 24 | O << 16 | W | 0; while (w !== 0); for (k = 1 << x - 1; P & k; ) k >>= 1; - if (k !== 0 ? (P &= k - 1, P += k) : P = 0, f++, --j[x] === 0) { + if (k !== 0 ? (P &= k - 1, P += k) : P = 0, f++, --z[x] === 0) { if (x === p) break; x = t[r + l[f]]; } if (x > m && (P & T) !== _) { - for (B === 0 && (B = m), N += h, y = x - B, v = 1 << y; y + B < p && (v -= j[y + B], !(v <= 0)); ) y++, v <<= 1; + for (B === 0 && (B = m), N += h, y = x - B, v = 1 << y; y + B < p && (v -= z[y + B], !(v <= 0)); ) y++, v <<= 1; if (D += 1 << y, e === Kh && D > $6 || e === X6 && D > Z6) return 1; _ = P & T, a[_] = m << 24 | y << 16 | N - i | 0; } @@ -42220,7 +42220,7 @@ zoo }, OD = (e, t) => { let r, n, a, i, l, c, u, x, f, h, p, m, y, B, v = 0, D, P, k, w, _, T, N, U; const C = new Uint8Array(4); - let j, I; + let z, I; const R = new Uint8Array([ 16, 17, @@ -42421,9 +42421,9 @@ zoo r.lens[R[r.have++]] = x & 7, x >>>= 3, f -= 3; } for (; r.have < 19; ) r.lens[R[r.have++]] = 0; - if (r.lencode = r.lendyn, r.lenbits = 7, j = { + if (r.lencode = r.lendyn, r.lenbits = 7, z = { bits: r.lenbits - }, U = ql(_D, r.lens, 0, 19, r.lencode, 0, r.work, j), r.lenbits = j.bits, U) { + }, U = ql(_D, r.lens, 0, 19, r.lencode, 0, r.work, z), r.lenbits = z.bits, U) { e.msg = "invalid code lengths set", r.mode = Dt; break; } @@ -42471,15 +42471,15 @@ zoo e.msg = "invalid code -- missing end-of-block", r.mode = Dt; break; } - if (r.lenbits = 9, j = { + if (r.lenbits = 9, z = { bits: r.lenbits - }, U = ql(ly, r.lens, 0, r.nlen, r.lencode, 0, r.work, j), r.lenbits = j.bits, U) { + }, U = ql(ly, r.lens, 0, r.nlen, r.lencode, 0, r.work, z), r.lenbits = z.bits, U) { e.msg = "invalid literal/lengths set", r.mode = Dt; break; } - if (r.distbits = 6, r.distcode = r.distdyn, j = { + if (r.distbits = 6, r.distcode = r.distdyn, z = { bits: r.distbits - }, U = ql(cy, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, j), r.distbits = j.bits, U) { + }, U = ql(cy, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, z), r.distbits = z.bits, U) { e.msg = "invalid distances set", r.mode = Dt; break; } @@ -42736,7 +42736,7 @@ zoo return k4 || (k4 = 1, (function(e) { Object.defineProperty(e, "__esModule", { value: true - }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = r, e.anumber = n, e.abytes = a, e.ahash = i, e.aexists = l, e.aoutput = c, e.u8 = u, e.u32 = x, e.clean = f, e.createView = h, e.rotr = p, e.rotl = m, e.byteSwap = y, e.byteSwap32 = B, e.bytesToHex = P, e.hexToBytes = _, e.asyncLoop = N, e.utf8ToBytes = U, e.bytesToUtf8 = C, e.toBytes = j, e.kdfInputToBytes = I, e.concatBytes = R, e.checkOpts = L, e.createHasher = W, e.createOptHasher = $, e.createXOFer = X, e.randomBytes = Y; + }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = r, e.anumber = n, e.abytes = a, e.ahash = i, e.aexists = l, e.aoutput = c, e.u8 = u, e.u32 = x, e.clean = f, e.createView = h, e.rotr = p, e.rotl = m, e.byteSwap = y, e.byteSwap32 = B, e.bytesToHex = P, e.hexToBytes = _, e.asyncLoop = N, e.utf8ToBytes = U, e.bytesToUtf8 = C, e.toBytes = z, e.kdfInputToBytes = I, e.concatBytes = R, e.checkOpts = L, e.createHasher = W, e.createOptHasher = $, e.createXOFer = X, e.randomBytes = Y; const t = yF(); function r(Q) { return Q instanceof Uint8Array || ArrayBuffer.isView(Q) && Q.constructor.name === "Uint8Array"; @@ -42744,22 +42744,22 @@ zoo function n(Q) { if (!Number.isSafeInteger(Q) || Q < 0) throw new Error("positive integer expected, got " + Q); } - function a(Q, ...G) { + function a(Q, ...V) { if (!r(Q)) throw new Error("Uint8Array expected"); - if (G.length > 0 && !G.includes(Q.length)) throw new Error("Uint8Array expected of length " + G + ", got length=" + Q.length); + if (V.length > 0 && !V.includes(Q.length)) throw new Error("Uint8Array expected of length " + V + ", got length=" + Q.length); } function i(Q) { if (typeof Q != "function" || typeof Q.create != "function") throw new Error("Hash should be wrapped by utils.createHasher"); n(Q.outputLen), n(Q.blockLen); } - function l(Q, G = true) { + function l(Q, V = true) { if (Q.destroyed) throw new Error("Hash instance has been destroyed"); - if (G && Q.finished) throw new Error("Hash#digest() has already been called"); + if (V && Q.finished) throw new Error("Hash#digest() has already been called"); } - function c(Q, G) { + function c(Q, V) { a(Q); - const K = G.outputLen; - if (Q.length < K) throw new Error("digestInto() expects output buffer of length at least " + K); + const M = V.outputLen; + if (Q.length < M) throw new Error("digestInto() expects output buffer of length at least " + M); } function u(Q) { return new Uint8Array(Q.buffer, Q.byteOffset, Q.byteLength); @@ -42768,16 +42768,16 @@ zoo return new Uint32Array(Q.buffer, Q.byteOffset, Math.floor(Q.byteLength / 4)); } function f(...Q) { - for (let G = 0; G < Q.length; G++) Q[G].fill(0); + for (let V = 0; V < Q.length; V++) Q[V].fill(0); } function h(Q) { return new DataView(Q.buffer, Q.byteOffset, Q.byteLength); } - function p(Q, G) { - return Q << 32 - G | Q >>> G; + function p(Q, V) { + return Q << 32 - V | Q >>> V; } - function m(Q, G) { - return Q << G | Q >>> 32 - G >>> 0; + function m(Q, V) { + return Q << V | Q >>> 32 - V >>> 0; } e.isLE = new Uint8Array(new Uint32Array([ 287454020 @@ -42787,18 +42787,18 @@ zoo } e.swap8IfBE = e.isLE ? (Q) => Q : (Q) => y(Q), e.byteSwapIfBE = e.swap8IfBE; function B(Q) { - for (let G = 0; G < Q.length; G++) Q[G] = y(Q[G]); + for (let V = 0; V < Q.length; V++) Q[V] = y(Q[V]); return Q; } e.swap32IfBE = e.isLE ? (Q) => Q : B; const v = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", D = Array.from({ length: 256 - }, (Q, G) => G.toString(16).padStart(2, "0")); + }, (Q, V) => V.toString(16).padStart(2, "0")); function P(Q) { if (a(Q), v) return Q.toHex(); - let G = ""; - for (let K = 0; K < Q.length; K++) G += D[Q[K]]; - return G; + let V = ""; + for (let M = 0; M < Q.length; M++) V += D[Q[M]]; + return V; } const k = { _0: 48, @@ -42816,28 +42816,28 @@ zoo function _(Q) { if (typeof Q != "string") throw new Error("hex string expected, got " + typeof Q); if (v) return Uint8Array.fromHex(Q); - const G = Q.length, K = G / 2; - if (G % 2) throw new Error("hex string expected, got unpadded hex of length " + G); - const V = new Uint8Array(K); - for (let ee = 0, te = 0; ee < K; ee++, te += 2) { + const V = Q.length, M = V / 2; + if (V % 2) throw new Error("hex string expected, got unpadded hex of length " + V); + const G = new Uint8Array(M); + for (let ee = 0, te = 0; ee < M; ee++, te += 2) { const oe = w(Q.charCodeAt(te)), ie = w(Q.charCodeAt(te + 1)); if (oe === void 0 || ie === void 0) { - const ce = Q[te] + Q[te + 1]; - throw new Error('hex string expected, got non-hex character "' + ce + '" at index ' + te); + const xe = Q[te] + Q[te + 1]; + throw new Error('hex string expected, got non-hex character "' + xe + '" at index ' + te); } - V[ee] = oe * 16 + ie; + G[ee] = oe * 16 + ie; } - return V; + return G; } const T = async () => { }; e.nextTick = T; - async function N(Q, G, K) { - let V = Date.now(); + async function N(Q, V, M) { + let G = Date.now(); for (let ee = 0; ee < Q; ee++) { - K(ee); - const te = Date.now() - V; - te >= 0 && te < G || (await (0, e.nextTick)(), V += te); + M(ee); + const te = Date.now() - G; + te >= 0 && te < V || (await (0, e.nextTick)(), G += te); } } function U(Q) { @@ -42847,43 +42847,43 @@ zoo function C(Q) { return new TextDecoder().decode(Q); } - function j(Q) { + function z(Q) { return typeof Q == "string" && (Q = U(Q)), a(Q), Q; } function I(Q) { return typeof Q == "string" && (Q = U(Q)), a(Q), Q; } function R(...Q) { - let G = 0; - for (let V = 0; V < Q.length; V++) { - const ee = Q[V]; - a(ee), G += ee.length; + let V = 0; + for (let G = 0; G < Q.length; G++) { + const ee = Q[G]; + a(ee), V += ee.length; } - const K = new Uint8Array(G); - for (let V = 0, ee = 0; V < Q.length; V++) { - const te = Q[V]; - K.set(te, ee), ee += te.length; + const M = new Uint8Array(V); + for (let G = 0, ee = 0; G < Q.length; G++) { + const te = Q[G]; + M.set(te, ee), ee += te.length; } - return K; + return M; } - function L(Q, G) { - if (G !== void 0 && {}.toString.call(G) !== "[object Object]") throw new Error("options should be object or undefined"); - return Object.assign(Q, G); + function L(Q, V) { + if (V !== void 0 && {}.toString.call(V) !== "[object Object]") throw new Error("options should be object or undefined"); + return Object.assign(Q, V); } class O { } e.Hash = O; function W(Q) { - const G = (V) => Q().update(j(V)).digest(), K = Q(); - return G.outputLen = K.outputLen, G.blockLen = K.blockLen, G.create = () => Q(), G; + const V = (G) => Q().update(z(G)).digest(), M = Q(); + return V.outputLen = M.outputLen, V.blockLen = M.blockLen, V.create = () => Q(), V; } function $(Q) { - const G = (V, ee) => Q(ee).update(j(V)).digest(), K = Q({}); - return G.outputLen = K.outputLen, G.blockLen = K.blockLen, G.create = (V) => Q(V), G; + const V = (G, ee) => Q(ee).update(z(G)).digest(), M = Q({}); + return V.outputLen = M.outputLen, V.blockLen = M.blockLen, V.create = (G) => Q(G), V; } function X(Q) { - const G = (V, ee) => Q(ee).update(j(V)).digest(), K = Q({}); - return G.outputLen = K.outputLen, G.blockLen = K.blockLen, G.create = (V) => Q(V), G; + const V = (G, ee) => Q(ee).update(z(G)).digest(), M = Q({}); + return V.outputLen = M.outputLen, V.blockLen = M.blockLen, V.create = (G) => Q(G), V; } e.wrapConstructor = W, e.wrapConstructorWithOpts = $, e.wrapXOFConstructorWithOpts = X; function Y(Q = 32) { @@ -43018,8 +43018,8 @@ zoo value: true }), He.toBig = He.shrSL = He.shrSH = He.rotrSL = He.rotrSH = He.rotrBL = He.rotrBH = He.rotr32L = He.rotr32H = He.rotlSL = He.rotlSH = He.rotlBL = He.rotlBH = He.add5L = He.add5H = He.add4L = He.add4H = He.add3L = He.add3H = void 0, He.add = D, He.fromBig = r, He.split = n; const e = BigInt(2 ** 32 - 1), t = BigInt(32); - function r(C, j = false) { - return j ? { + function r(C, z = false) { + return z ? { h: Number(C & e), l: Number(C >> t & e) } : { @@ -43027,11 +43027,11 @@ zoo l: Number(C & e) | 0 }; } - function n(C, j = false) { + function n(C, z = false) { const I = C.length; let R = new Uint32Array(I), L = new Uint32Array(I); for (let O = 0; O < I; O++) { - const { h: W, l: $ } = r(C[O], j); + const { h: W, l: $ } = r(C[O], z); [R[O], L[O]] = [ W, $ @@ -43042,50 +43042,50 @@ zoo L ]; } - const a = (C, j) => BigInt(C >>> 0) << t | BigInt(j >>> 0); + const a = (C, z) => BigInt(C >>> 0) << t | BigInt(z >>> 0); He.toBig = a; - const i = (C, j, I) => C >>> I; + const i = (C, z, I) => C >>> I; He.shrSH = i; - const l = (C, j, I) => C << 32 - I | j >>> I; + const l = (C, z, I) => C << 32 - I | z >>> I; He.shrSL = l; - const c = (C, j, I) => C >>> I | j << 32 - I; + const c = (C, z, I) => C >>> I | z << 32 - I; He.rotrSH = c; - const u = (C, j, I) => C << 32 - I | j >>> I; + const u = (C, z, I) => C << 32 - I | z >>> I; He.rotrSL = u; - const x = (C, j, I) => C << 64 - I | j >>> I - 32; + const x = (C, z, I) => C << 64 - I | z >>> I - 32; He.rotrBH = x; - const f = (C, j, I) => C >>> I - 32 | j << 64 - I; + const f = (C, z, I) => C >>> I - 32 | z << 64 - I; He.rotrBL = f; - const h = (C, j) => j; + const h = (C, z) => z; He.rotr32H = h; - const p = (C, j) => C; + const p = (C, z) => C; He.rotr32L = p; - const m = (C, j, I) => C << I | j >>> 32 - I; + const m = (C, z, I) => C << I | z >>> 32 - I; He.rotlSH = m; - const y = (C, j, I) => j << I | C >>> 32 - I; + const y = (C, z, I) => z << I | C >>> 32 - I; He.rotlSL = y; - const B = (C, j, I) => j << I - 32 | C >>> 64 - I; + const B = (C, z, I) => z << I - 32 | C >>> 64 - I; He.rotlBH = B; - const v = (C, j, I) => C << I - 32 | j >>> 64 - I; + const v = (C, z, I) => C << I - 32 | z >>> 64 - I; He.rotlBL = v; - function D(C, j, I, R) { - const L = (j >>> 0) + (R >>> 0); + function D(C, z, I, R) { + const L = (z >>> 0) + (R >>> 0); return { h: C + I + (L / 2 ** 32 | 0) | 0, l: L | 0 }; } - const P = (C, j, I) => (C >>> 0) + (j >>> 0) + (I >>> 0); + const P = (C, z, I) => (C >>> 0) + (z >>> 0) + (I >>> 0); He.add3L = P; - const k = (C, j, I, R) => j + I + R + (C / 2 ** 32 | 0) | 0; + const k = (C, z, I, R) => z + I + R + (C / 2 ** 32 | 0) | 0; He.add3H = k; - const w = (C, j, I, R) => (C >>> 0) + (j >>> 0) + (I >>> 0) + (R >>> 0); + const w = (C, z, I, R) => (C >>> 0) + (z >>> 0) + (I >>> 0) + (R >>> 0); He.add4L = w; - const _ = (C, j, I, R, L) => j + I + R + L + (C / 2 ** 32 | 0) | 0; + const _ = (C, z, I, R, L) => z + I + R + L + (C / 2 ** 32 | 0) | 0; He.add4H = _; - const T = (C, j, I, R, L) => (C >>> 0) + (j >>> 0) + (I >>> 0) + (R >>> 0) + (L >>> 0); + const T = (C, z, I, R, L) => (C >>> 0) + (z >>> 0) + (I >>> 0) + (R >>> 0) + (L >>> 0); He.add5L = T; - const N = (C, j, I, R, L, O) => j + I + R + L + O + (C / 2 ** 32 | 0) | 0; + const N = (C, z, I, R, L, O) => z + I + R + L + O + (C / 2 ** 32 | 0) | 0; He.add5H = N; const U = { fromBig: r, @@ -43190,7 +43190,7 @@ zoo super(64, k, 8, false), this.A = e.SHA256_IV[0] | 0, this.B = e.SHA256_IV[1] | 0, this.C = e.SHA256_IV[2] | 0, this.D = e.SHA256_IV[3] | 0, this.E = e.SHA256_IV[4] | 0, this.F = e.SHA256_IV[5] | 0, this.G = e.SHA256_IV[6] | 0, this.H = e.SHA256_IV[7] | 0; } get() { - const { A: k, B: w, C: _, D: T, E: N, F: U, G: C, H: j } = this; + const { A: k, B: w, C: _, D: T, E: N, F: U, G: C, H: z } = this; return [ k, w, @@ -43199,11 +43199,11 @@ zoo N, U, C, - j + z ]; } - set(k, w, _, T, N, U, C, j) { - this.A = k | 0, this.B = w | 0, this.C = _ | 0, this.D = T | 0, this.E = N | 0, this.F = U | 0, this.G = C | 0, this.H = j | 0; + set(k, w, _, T, N, U, C, z) { + this.A = k | 0, this.B = w | 0, this.C = _ | 0, this.D = T | 0, this.E = N | 0, this.F = U | 0, this.G = C | 0, this.H = z | 0; } process(k, w) { for (let L = 0; L < 16; L++, w += 4) a[L] = k.getUint32(w, false); @@ -43211,12 +43211,12 @@ zoo const O = a[L - 15], W = a[L - 2], $ = (0, r.rotr)(O, 7) ^ (0, r.rotr)(O, 18) ^ O >>> 3, X = (0, r.rotr)(W, 17) ^ (0, r.rotr)(W, 19) ^ W >>> 10; a[L] = X + a[L - 7] + $ + a[L - 16] | 0; } - let { A: _, B: T, C: N, D: U, E: C, F: j, G: I, H: R } = this; + let { A: _, B: T, C: N, D: U, E: C, F: z, G: I, H: R } = this; for (let L = 0; L < 64; L++) { - const O = (0, r.rotr)(C, 6) ^ (0, r.rotr)(C, 11) ^ (0, r.rotr)(C, 25), W = R + O + (0, e.Chi)(C, j, I) + n[L] + a[L] | 0, X = ((0, r.rotr)(_, 2) ^ (0, r.rotr)(_, 13) ^ (0, r.rotr)(_, 22)) + (0, e.Maj)(_, T, N) | 0; - R = I, I = j, j = C, C = U + W | 0, U = N, N = T, T = _, _ = W + X | 0; + const O = (0, r.rotr)(C, 6) ^ (0, r.rotr)(C, 11) ^ (0, r.rotr)(C, 25), W = R + O + (0, e.Chi)(C, z, I) + n[L] + a[L] | 0, X = ((0, r.rotr)(_, 2) ^ (0, r.rotr)(_, 13) ^ (0, r.rotr)(_, 22)) + (0, e.Maj)(_, T, N) | 0; + R = I, I = z, z = C, C = U + W | 0, U = N, N = T, T = _, _ = W + X | 0; } - _ = _ + this.A | 0, T = T + this.B | 0, N = N + this.C | 0, U = U + this.D | 0, C = C + this.E | 0, j = j + this.F | 0, I = I + this.G | 0, R = R + this.H | 0, this.set(_, T, N, U, C, j, I, R); + _ = _ + this.A | 0, T = T + this.B | 0, N = N + this.C | 0, U = U + this.D | 0, C = C + this.E | 0, z = z + this.F | 0, I = I + this.G | 0, R = R + this.H | 0, this.set(_, T, N, U, C, z, I, R); } roundClean() { (0, r.clean)(a); @@ -43319,7 +43319,7 @@ zoo super(128, k, 16, false), this.Ah = e.SHA512_IV[0] | 0, this.Al = e.SHA512_IV[1] | 0, this.Bh = e.SHA512_IV[2] | 0, this.Bl = e.SHA512_IV[3] | 0, this.Ch = e.SHA512_IV[4] | 0, this.Cl = e.SHA512_IV[5] | 0, this.Dh = e.SHA512_IV[6] | 0, this.Dl = e.SHA512_IV[7] | 0, this.Eh = e.SHA512_IV[8] | 0, this.El = e.SHA512_IV[9] | 0, this.Fh = e.SHA512_IV[10] | 0, this.Fl = e.SHA512_IV[11] | 0, this.Gh = e.SHA512_IV[12] | 0, this.Gl = e.SHA512_IV[13] | 0, this.Hh = e.SHA512_IV[14] | 0, this.Hl = e.SHA512_IV[15] | 0; } get() { - const { Ah: k, Al: w, Bh: _, Bl: T, Ch: N, Cl: U, Dh: C, Dl: j, Eh: I, El: R, Fh: L, Fl: O, Gh: W, Gl: $, Hh: X, Hl: Y } = this; + const { Ah: k, Al: w, Bh: _, Bl: T, Ch: N, Cl: U, Dh: C, Dl: z, Eh: I, El: R, Fh: L, Fl: O, Gh: W, Gl: $, Hh: X, Hl: Y } = this; return [ k, w, @@ -43328,7 +43328,7 @@ zoo N, U, C, - j, + z, I, R, L, @@ -43339,23 +43339,23 @@ zoo Y ]; } - set(k, w, _, T, N, U, C, j, I, R, L, O, W, $, X, Y) { - this.Ah = k | 0, this.Al = w | 0, this.Bh = _ | 0, this.Bl = T | 0, this.Ch = N | 0, this.Cl = U | 0, this.Dh = C | 0, this.Dl = j | 0, this.Eh = I | 0, this.El = R | 0, this.Fh = L | 0, this.Fl = O | 0, this.Gh = W | 0, this.Gl = $ | 0, this.Hh = X | 0, this.Hl = Y | 0; + set(k, w, _, T, N, U, C, z, I, R, L, O, W, $, X, Y) { + this.Ah = k | 0, this.Al = w | 0, this.Bh = _ | 0, this.Bl = T | 0, this.Ch = N | 0, this.Cl = U | 0, this.Dh = C | 0, this.Dl = z | 0, this.Eh = I | 0, this.El = R | 0, this.Fh = L | 0, this.Fl = O | 0, this.Gh = W | 0, this.Gl = $ | 0, this.Hh = X | 0, this.Hl = Y | 0; } process(k, w) { - for (let K = 0; K < 16; K++, w += 4) f[K] = k.getUint32(w), h[K] = k.getUint32(w += 4); - for (let K = 16; K < 80; K++) { - const V = f[K - 15] | 0, ee = h[K - 15] | 0, te = t.rotrSH(V, ee, 1) ^ t.rotrSH(V, ee, 8) ^ t.shrSH(V, ee, 7), oe = t.rotrSL(V, ee, 1) ^ t.rotrSL(V, ee, 8) ^ t.shrSL(V, ee, 7), ie = f[K - 2] | 0, ce = h[K - 2] | 0, de = t.rotrSH(ie, ce, 19) ^ t.rotrBH(ie, ce, 61) ^ t.shrSH(ie, ce, 6), he = t.rotrSL(ie, ce, 19) ^ t.rotrBL(ie, ce, 61) ^ t.shrSL(ie, ce, 6), be = t.add4L(oe, he, h[K - 7], h[K - 16]), ve = t.add4H(be, te, de, f[K - 7], f[K - 16]); - f[K] = ve | 0, h[K] = be | 0; + for (let M = 0; M < 16; M++, w += 4) f[M] = k.getUint32(w), h[M] = k.getUint32(w += 4); + for (let M = 16; M < 80; M++) { + const G = f[M - 15] | 0, ee = h[M - 15] | 0, te = t.rotrSH(G, ee, 1) ^ t.rotrSH(G, ee, 8) ^ t.shrSH(G, ee, 7), oe = t.rotrSL(G, ee, 1) ^ t.rotrSL(G, ee, 8) ^ t.shrSL(G, ee, 7), ie = f[M - 2] | 0, xe = h[M - 2] | 0, de = t.rotrSH(ie, xe, 19) ^ t.rotrBH(ie, xe, 61) ^ t.shrSH(ie, xe, 6), he = t.rotrSL(ie, xe, 19) ^ t.rotrBL(ie, xe, 61) ^ t.shrSL(ie, xe, 6), be = t.add4L(oe, he, h[M - 7], h[M - 16]), ve = t.add4H(be, te, de, f[M - 7], f[M - 16]); + f[M] = ve | 0, h[M] = be | 0; } - let { Ah: _, Al: T, Bh: N, Bl: U, Ch: C, Cl: j, Dh: I, Dl: R, Eh: L, El: O, Fh: W, Fl: $, Gh: X, Gl: Y, Hh: Q, Hl: G } = this; - for (let K = 0; K < 80; K++) { - const V = t.rotrSH(L, O, 14) ^ t.rotrSH(L, O, 18) ^ t.rotrBH(L, O, 41), ee = t.rotrSL(L, O, 14) ^ t.rotrSL(L, O, 18) ^ t.rotrBL(L, O, 41), te = L & W ^ ~L & X, oe = O & $ ^ ~O & Y, ie = t.add5L(G, ee, oe, x[K], h[K]), ce = t.add5H(ie, Q, V, te, u[K], f[K]), de = ie | 0, he = t.rotrSH(_, T, 28) ^ t.rotrBH(_, T, 34) ^ t.rotrBH(_, T, 39), be = t.rotrSL(_, T, 28) ^ t.rotrBL(_, T, 34) ^ t.rotrBL(_, T, 39), ve = _ & N ^ _ & C ^ N & C, Ce = T & U ^ T & j ^ U & j; - Q = X | 0, G = Y | 0, X = W | 0, Y = $ | 0, W = L | 0, $ = O | 0, { h: L, l: O } = t.add(I | 0, R | 0, ce | 0, de | 0), I = C | 0, R = j | 0, C = N | 0, j = U | 0, N = _ | 0, U = T | 0; + let { Ah: _, Al: T, Bh: N, Bl: U, Ch: C, Cl: z, Dh: I, Dl: R, Eh: L, El: O, Fh: W, Fl: $, Gh: X, Gl: Y, Hh: Q, Hl: V } = this; + for (let M = 0; M < 80; M++) { + const G = t.rotrSH(L, O, 14) ^ t.rotrSH(L, O, 18) ^ t.rotrBH(L, O, 41), ee = t.rotrSL(L, O, 14) ^ t.rotrSL(L, O, 18) ^ t.rotrBL(L, O, 41), te = L & W ^ ~L & X, oe = O & $ ^ ~O & Y, ie = t.add5L(V, ee, oe, x[M], h[M]), xe = t.add5H(ie, Q, G, te, u[M], f[M]), de = ie | 0, he = t.rotrSH(_, T, 28) ^ t.rotrBH(_, T, 34) ^ t.rotrBH(_, T, 39), be = t.rotrSL(_, T, 28) ^ t.rotrBL(_, T, 34) ^ t.rotrBL(_, T, 39), ve = _ & N ^ _ & C ^ N & C, Ce = T & U ^ T & z ^ U & z; + Q = X | 0, V = Y | 0, X = W | 0, Y = $ | 0, W = L | 0, $ = O | 0, { h: L, l: O } = t.add(I | 0, R | 0, xe | 0, de | 0), I = C | 0, R = z | 0, C = N | 0, z = U | 0, N = _ | 0, U = T | 0; const Ie = t.add3L(de, be, Ce); - _ = t.add3H(Ie, ce, he, ve), T = Ie | 0; + _ = t.add3H(Ie, xe, he, ve), T = Ie | 0; } - ({ h: _, l: T } = t.add(this.Ah | 0, this.Al | 0, _ | 0, T | 0)), { h: N, l: U } = t.add(this.Bh | 0, this.Bl | 0, N | 0, U | 0), { h: C, l: j } = t.add(this.Ch | 0, this.Cl | 0, C | 0, j | 0), { h: I, l: R } = t.add(this.Dh | 0, this.Dl | 0, I | 0, R | 0), { h: L, l: O } = t.add(this.Eh | 0, this.El | 0, L | 0, O | 0), { h: W, l: $ } = t.add(this.Fh | 0, this.Fl | 0, W | 0, $ | 0), { h: X, l: Y } = t.add(this.Gh | 0, this.Gl | 0, X | 0, Y | 0), { h: Q, l: G } = t.add(this.Hh | 0, this.Hl | 0, Q | 0, G | 0), this.set(_, T, N, U, C, j, I, R, L, O, W, $, X, Y, Q, G); + ({ h: _, l: T } = t.add(this.Ah | 0, this.Al | 0, _ | 0, T | 0)), { h: N, l: U } = t.add(this.Bh | 0, this.Bl | 0, N | 0, U | 0), { h: C, l: z } = t.add(this.Ch | 0, this.Cl | 0, C | 0, z | 0), { h: I, l: R } = t.add(this.Dh | 0, this.Dl | 0, I | 0, R | 0), { h: L, l: O } = t.add(this.Eh | 0, this.El | 0, L | 0, O | 0), { h: W, l: $ } = t.add(this.Fh | 0, this.Fl | 0, W | 0, $ | 0), { h: X, l: Y } = t.add(this.Gh | 0, this.Gl | 0, X | 0, Y | 0), { h: Q, l: V } = t.add(this.Hh | 0, this.Hl | 0, Q | 0, V | 0), this.set(_, T, N, U, C, z, I, R, L, O, W, $, X, Y, Q, V); } roundClean() { (0, r.clean)(f, h); @@ -43607,15 +43607,15 @@ Please pass a 2048 word array explicitly.`; function f(C) { return (C || "").normalize("NFKD"); } - function h(C, j, I) { - for (; C.length < I; ) C = j + C; + function h(C, z, I) { + for (; C.length < I; ) C = z + C; return C; } function p(C) { return parseInt(C, 2); } function m(C) { - return C.map((j) => h(j.toString(2), "0", 8)).join(""); + return C.map((z) => h(z.toString(2), "0", 8)).join(""); } function y(C) { const I = C.length * 8 / 32, R = e.sha256(Uint8Array.from(C)); @@ -43624,30 +43624,30 @@ Please pass a 2048 word array explicitly.`; function B(C) { return "mnemonic" + (C || ""); } - function v(C, j) { - const I = Uint8Array.from(Buffer.from(f(C), "utf8")), R = Uint8Array.from(Buffer.from(B(f(j)), "utf8")), L = r.pbkdf2(t.sha512, I, R, { + function v(C, z) { + const I = Uint8Array.from(Buffer.from(f(C), "utf8")), R = Uint8Array.from(Buffer.from(B(f(z)), "utf8")), L = r.pbkdf2(t.sha512, I, R, { c: 2048, dkLen: 64 }); return Buffer.from(L); } hn.mnemonicToSeedSync = v; - function D(C, j) { - const I = Uint8Array.from(Buffer.from(f(C), "utf8")), R = Uint8Array.from(Buffer.from(B(f(j)), "utf8")); + function D(C, z) { + const I = Uint8Array.from(Buffer.from(f(C), "utf8")), R = Uint8Array.from(Buffer.from(B(f(z)), "utf8")); return r.pbkdf2Async(t.sha512, I, R, { c: 2048, dkLen: 64 }).then((L) => Buffer.from(L)); } hn.mnemonicToSeed = D; - function P(C, j) { - if (j = j || i, !j) throw new Error(x); + function P(C, z) { + if (z = z || i, !z) throw new Error(x); const I = f(C).split(" "); if (I.length % 3 !== 0) throw new Error(l); const R = I.map((Q) => { - const G = j.indexOf(Q); - if (G === -1) throw new Error(l); - return h(G.toString(2), "0", 11); + const V = z.indexOf(Q); + if (V === -1) throw new Error(l); + return h(V.toString(2), "0", 11); }).join(""), L = Math.floor(R.length / 33) * 32, O = R.slice(0, L), W = R.slice(L), $ = O.match(/(.{1,8})/g).map(p); if ($.length < 16) throw new Error(c); if ($.length > 32) throw new Error(c); @@ -43657,26 +43657,26 @@ Please pass a 2048 word array explicitly.`; return X.toString("hex"); } hn.mnemonicToEntropy = P; - function k(C, j) { - if (Buffer.isBuffer(C) || (C = Buffer.from(C, "hex")), j = j || i, !j) throw new Error(x); + function k(C, z) { + if (Buffer.isBuffer(C) || (C = Buffer.from(C, "hex")), z = z || i, !z) throw new Error(x); if (C.length < 16) throw new TypeError(c); if (C.length > 32) throw new TypeError(c); if (C.length % 4 !== 0) throw new TypeError(c); const I = m(Array.from(C)), R = y(C), W = (I + R).match(/(.{1,11})/g).map(($) => { const X = p($); - return j[X]; + return z[X]; }); - return j[0] === "\u3042\u3044\u3053\u304F\u3057\u3093" ? W.join("\u3000") : W.join(" "); + return z[0] === "\u3042\u3044\u3053\u304F\u3057\u3093" ? W.join("\u3000") : W.join(" "); } hn.entropyToMnemonic = k; - function w(C, j, I) { + function w(C, z, I) { if (C = C || 128, C % 32 !== 0) throw new TypeError(c); - return j = j || ((R) => Buffer.from(n.randomBytes(R))), k(j(C / 8), I); + return z = z || ((R) => Buffer.from(n.randomBytes(R))), k(z(C / 8), I); } hn.generateMnemonic = w; - function _(C, j) { + function _(C, z) { try { - P(C, j); + P(C, z); } catch { return false; } @@ -43684,14 +43684,14 @@ Please pass a 2048 word array explicitly.`; } hn.validateMnemonic = _; function T(C) { - const j = a.wordlists[C]; - if (j) i = j; + const z = a.wordlists[C]; + if (z) i = z; else throw new Error('Could not find wordlist for language "' + C + '"'); } hn.setDefaultWordlist = T; function N() { if (!i) throw new Error("No Default Wordlist set"); - return Object.keys(a.wordlists).filter((C) => C === "JA" || C === "EN" ? false : a.wordlists[C].every((j, I) => j === i[I]))[0]; + return Object.keys(a.wordlists).filter((C) => C === "JA" || C === "EN" ? false : a.wordlists[C].every((z, I) => z === i[I]))[0]; } hn.getDefaultWordlist = N; var U = z4(); @@ -44299,14 +44299,14 @@ Please pass a 2048 word array explicitly.`; process(t, r) { for (let k = 0; k < 16; k++, r += 4) Mo[k] = t.getUint32(r), Lo[k] = t.getUint32(r += 4); for (let k = 16; k < 80; k++) { - const w = Mo[k - 15] | 0, _ = Lo[k - 15] | 0, T = T0(w, _, 1) ^ T0(w, _, 8) ^ M4(w, _, 7), N = R0(w, _, 1) ^ R0(w, _, 8) ^ L4(w, _, 7), U = Mo[k - 2] | 0, C = Lo[k - 2] | 0, j = T0(U, C, 19) ^ dx(U, C, 61) ^ M4(U, C, 6), I = R0(U, C, 19) ^ fx(U, C, 61) ^ L4(U, C, 6), R = nS(N, I, Lo[k - 7], Lo[k - 16]), L = aS(R, T, j, Mo[k - 7], Mo[k - 16]); + const w = Mo[k - 15] | 0, _ = Lo[k - 15] | 0, T = T0(w, _, 1) ^ T0(w, _, 8) ^ M4(w, _, 7), N = R0(w, _, 1) ^ R0(w, _, 8) ^ L4(w, _, 7), U = Mo[k - 2] | 0, C = Lo[k - 2] | 0, z = T0(U, C, 19) ^ dx(U, C, 61) ^ M4(U, C, 6), I = R0(U, C, 19) ^ fx(U, C, 61) ^ L4(U, C, 6), R = nS(N, I, Lo[k - 7], Lo[k - 16]), L = aS(R, T, z, Mo[k - 7], Mo[k - 16]); Mo[k] = L | 0, Lo[k] = R | 0; } let { Ah: n, Al: a, Bh: i, Bl: l, Ch: c, Cl: u, Dh: x, Dl: f, Eh: h, El: p, Fh: m, Fl: y, Gh: B, Gl: v, Hh: D, Hl: P } = this; for (let k = 0; k < 80; k++) { - const w = T0(h, p, 14) ^ T0(h, p, 18) ^ dx(h, p, 41), _ = R0(h, p, 14) ^ R0(h, p, 18) ^ fx(h, p, 41), T = h & m ^ ~h & B, N = p & y ^ ~p & v, U = oS(P, _, N, uS[k], Lo[k]), C = iS(U, D, w, T, cS[k], Mo[k]), j = U | 0, I = T0(n, a, 28) ^ dx(n, a, 34) ^ dx(n, a, 39), R = R0(n, a, 28) ^ fx(n, a, 34) ^ fx(n, a, 39), L = n & i ^ n & c ^ i & c, O = a & l ^ a & u ^ l & u; - D = B | 0, P = v | 0, B = m | 0, v = y | 0, m = h | 0, y = p | 0, { h, l: p } = Ka(x | 0, f | 0, C | 0, j | 0), x = c | 0, f = u | 0, c = i | 0, u = l | 0, i = n | 0, l = a | 0; - const W = tS(j, R, O); + const w = T0(h, p, 14) ^ T0(h, p, 18) ^ dx(h, p, 41), _ = R0(h, p, 14) ^ R0(h, p, 18) ^ fx(h, p, 41), T = h & m ^ ~h & B, N = p & y ^ ~p & v, U = oS(P, _, N, uS[k], Lo[k]), C = iS(U, D, w, T, cS[k], Mo[k]), z = U | 0, I = T0(n, a, 28) ^ dx(n, a, 34) ^ dx(n, a, 39), R = R0(n, a, 28) ^ fx(n, a, 34) ^ fx(n, a, 39), L = n & i ^ n & c ^ i & c, O = a & l ^ a & u ^ l & u; + D = B | 0, P = v | 0, B = m | 0, v = y | 0, m = h | 0, y = p | 0, { h, l: p } = Ka(x | 0, f | 0, C | 0, z | 0), x = c | 0, f = u | 0, c = i | 0, u = l | 0, i = n | 0, l = a | 0; + const W = tS(z, R, O); n = rS(W, C, I, L), a = W | 0; } ({ h: n, l: a } = Ka(this.Ah | 0, this.Al | 0, n | 0, a | 0)), { h: i, l } = Ka(this.Bh | 0, this.Bl | 0, i | 0, l | 0), { h: c, l: u } = Ka(this.Ch | 0, this.Cl | 0, c | 0, u | 0), { h: x, l: f } = Ka(this.Dh | 0, this.Dl | 0, x | 0, f | 0), { h, l: p } = Ka(this.Eh | 0, this.El | 0, h | 0, p | 0), { h: m, l: y } = Ka(this.Fh | 0, this.Fl | 0, m | 0, y | 0), { h: B, l: v } = Ka(this.Gh | 0, this.Gl | 0, B | 0, v | 0), { h: D, l: P } = Ka(this.Hh | 0, this.Hl | 0, D | 0, P | 0), this.set(n, a, i, l, c, u, x, f, h, p, m, y, B, v, D, P); @@ -46692,7 +46692,7 @@ Please pass a 2048 word array explicitly.`; function oP({ onDirtyStateChange: e, setMnemonicForBackup: t, requestTabChange: r, incomingSeed: n, onSeedReceived: a }) { const i = fe.useRef(/* @__PURE__ */ new Set()), [l, c] = fe.useState([ kl() - ]), [u, x] = fe.useState(false), [f, h] = fe.useState(null), [p, m] = fe.useState(null), [y, B] = fe.useState(null), [v, D] = fe.useState(""), [P, k] = fe.useState(false), [w, _] = fe.useState(""), [T, N] = fe.useState(null), [U, C] = fe.useState(null), [j, I] = fe.useState(null), [R, L] = fe.useState(null), [O, W] = fe.useState(false), [$, X] = fe.useState(false), [Y, Q] = fe.useState(false), [G, K] = fe.useState(24); + ]), [u, x] = fe.useState(false), [f, h] = fe.useState(null), [p, m] = fe.useState(null), [y, B] = fe.useState(null), [v, D] = fe.useState(""), [P, k] = fe.useState(false), [w, _] = fe.useState(""), [T, N] = fe.useState(null), [U, C] = fe.useState(null), [z, I] = fe.useState(null), [R, L] = fe.useState(null), [O, W] = fe.useState(false), [$, X] = fe.useState(false), [Y, Q] = fe.useState(false), [V, M] = fe.useState(24); fe.useEffect(() => { const ge = l.some((ke) => ke.rawInput.length > 0) || w.length > 0; e(ge); @@ -46701,10 +46701,10 @@ Please pass a 2048 word array explicitly.`; w, e ]); - const V = (ge) => { + const G = (ge) => { c((ke) => { const ze = ke.findIndex((Qe) => !Qe.rawInput.trim()); - if (ze !== -1) return ke.map((Qe, Me) => Me === ze ? { + if (ze !== -1) return ke.map((Qe, Le) => Le === ze ? { ...Qe, rawInput: ge, decryptedMnemonic: ge, @@ -46721,22 +46721,22 @@ Please pass a 2048 word array explicitly.`; }); }; fe.useEffect(() => { - n && n.trim() && (i.current.has(n) || l.some((ke) => ke.decryptedMnemonic === n) || (V(n), i.current.add(n)), a == null ? void 0 : a()); + n && n.trim() && (i.current.has(n) || l.some((ke) => ke.decryptedMnemonic === n) || (G(n), i.current.add(n)), a == null ? void 0 : a()); }, [ n ]), fe.useEffect(() => { ug(async () => { k(true), D(""); - const ke = l.map((Me) => Me.decryptedMnemonic).filter((Me) => Me !== null && Me.length > 0), ze = l.map(async (Me) => { - if (!Me.rawInput.trim()) return { + const ke = l.map((Le) => Le.decryptedMnemonic).filter((Le) => Le !== null && Le.length > 0), ze = l.map(async (Le) => { + if (!Le.rawInput.trim()) return { isValid: null, error: null }; - if (Me.isEncrypted && !Me.decryptedMnemonic) return { + if (Le.isEncrypted && !Le.decryptedMnemonic) return { isValid: null, error: null }; - const ft = Me.decryptedMnemonic || Me.rawInput; + const ft = Le.decryptedMnemonic || Le.rawInput; try { return await Qd(ft.trim()), { isValid: true, @@ -46749,7 +46749,7 @@ Please pass a 2048 word array explicitly.`; }; } }), Qe = await Promise.all(ze); - if (c((Me) => Me.map((ft, rt) => { + if (c((Le) => Le.map((ft, rt) => { var _a, _b2; return { ...ft, @@ -46757,10 +46757,10 @@ Please pass a 2048 word array explicitly.`; error: ((_b2 = Qe[rt]) == null ? void 0 : _b2.error) ?? ft.error }; })), ke.length > 0) try { - const Me = await DI(ke); - m(Me), B(kI(Me.blendedEntropy)); - } catch (Me) { - D(Me.message), m(null); + const Le = await DI(ke); + m(Le), B(kI(Le.blendedEntropy)); + } catch (Le) { + D(Le.message), m(null); } else m(null); k(false); @@ -46782,7 +46782,7 @@ Please pass a 2048 word array explicitly.`; p ]); const ee = (ge, ke) => { - c((ze) => ze.map((Qe, Me) => Me === ge ? { + c((ze) => ze.map((Qe, Le) => Le === ge ? { ...Qe, ...ke } : Qe)); @@ -46795,10 +46795,10 @@ Please pass a 2048 word array explicitly.`; ]); }, ie = (ge) => { h(ge), x(true); - }, ce = fe.useCallback(async (ge) => { + }, xe = fe.useCallback(async (ge) => { if (f === null) return; const ke = typeof ge == "string" ? ge : Array.from(ge).map((rt) => rt.toString(16).padStart(2, "0")).join(""), ze = sE(ke); - let Qe = ke, Me = null, ft = "text"; + let Qe = ke, Le = null, ft = "text"; try { ze === "seedqr" ? (Qe = await aE(ke), ft = "seedqr", ee(f, { rawInput: Qe, @@ -46823,9 +46823,9 @@ Please pass a 2048 word array explicitly.`; error: null }); } catch (rt) { - Me = rt.message || "Failed to process QR code", ee(f, { + Le = rt.message || "Failed to process QR code", ee(f, { rawInput: ke, - error: Me + error: Le }); } x(false); @@ -46866,7 +46866,7 @@ Please pass a 2048 word array explicitly.`; if (p) { W(true); try { - const ge = G === 12 ? 128 : 256, ke = await FI(p.blendedEntropy, w, ge); + const ge = V === 12 ? 128 : 256, ke = await FI(p.blendedEntropy, w, ge); L(ke.finalMnemonic); } catch { L(null); @@ -47208,7 +47208,7 @@ Please pass a 2048 word array explicitly.`; }) ] }), - j && E.jsxs("div", { + z && E.jsxs("div", { className: "space-y-1 pt-2", children: [ E.jsx("label", { @@ -47221,7 +47221,7 @@ Please pass a 2048 word array explicitly.`; E.jsx("p", { "data-sensitive": "Dice-Only Preview Mnemonic", className: "p-2 md:p-3 bg-[#1a1a2e] rounded-md font-mono text-xs md:text-sm text-[#00f0ff] break-words border-2 border-[#00f0ff]/30", - children: j + children: z }) ] }) @@ -47371,17 +47371,17 @@ Please pass a 2048 word array explicitly.`; className: "grid grid-cols-2 gap-3 max-w-sm mx-auto", children: [ E.jsx("button", { - onClick: () => K(12), - className: `py-2.5 text-sm rounded-lg font-medium transition-all ${G === 12 ? "bg-[#1a1a2e] text-[#00f0ff] border-2 border-[#ff006e] shadow-[0_0_15px_rgba(255,0,110,0.5)]" : "bg-[#16213e] text-[#9d84b7] border-2 border-[#00f0ff]/30 hover:text-[#6ef3f7] hover:border-[#00f0ff]/50"}`, - style: G === 12 ? { + onClick: () => M(12), + className: `py-2.5 text-sm rounded-lg font-medium transition-all ${V === 12 ? "bg-[#1a1a2e] text-[#00f0ff] border-2 border-[#ff006e] shadow-[0_0_15px_rgba(255,0,110,0.5)]" : "bg-[#16213e] text-[#9d84b7] border-2 border-[#00f0ff]/30 hover:text-[#6ef3f7] hover:border-[#00f0ff]/50"}`, + style: V === 12 ? { textShadow: "0 0 10px rgba(0, 240, 255, 0.8)" } : void 0, children: "12 Words" }), E.jsx("button", { - onClick: () => K(24), - className: `py-2.5 text-sm rounded-lg font-medium transition-all ${G === 24 ? "bg-[#1a1a2e] text-[#00f0ff] border-2 border-[#ff006e] shadow-[0_0_15px_rgba(255,0,110,0.5)]" : "bg-[#16213e] text-[#9d84b7] border-2 border-[#00f0ff]/30 hover:text-[#6ef3f7] hover:border-[#00f0ff]/50"}`, - style: G === 24 ? { + onClick: () => M(24), + className: `py-2.5 text-sm rounded-lg font-medium transition-all ${V === 24 ? "bg-[#1a1a2e] text-[#00f0ff] border-2 border-[#ff006e] shadow-[0_0_15px_rgba(255,0,110,0.5)]" : "bg-[#16213e] text-[#9d84b7] border-2 border-[#00f0ff]/30 hover:text-[#6ef3f7] hover:border-[#00f0ff]/50"}`, + style: V === 24 ? { textShadow: "0 0 10px rgba(0, 240, 255, 0.8)" } : void 0, children: "24 Words" @@ -47411,7 +47411,7 @@ Please pass a 2048 word array explicitly.`; ] }), u && E.jsx(wg, { - onScanSuccess: ce, + onScanSuccess: xe, onClose: de, onError: he }), @@ -47468,10 +47468,10 @@ Please pass a 2048 word array explicitly.`; const Y = X.getContext("2d"); if (Y && O.videoWidth > 0 && O.videoHeight > 0) { Y.drawImage(O, 0, 0); - const Q = Y.getImageData(0, 0, Math.min(10, O.videoWidth), Math.min(10, O.videoHeight)), G = Array.from(Q.data.slice(0, 40)); - console.log("\u{1F3A8} First 40 pixel values:", G); - const K = G.every((ee) => ee === 0), V = G.every((ee) => ee === G[0]); - K ? console.error("\u274C All pixels are zero - video not rendering!") : V ? console.warn("\u26A0\uFE0F All pixels same value - possible issue") : console.log("\u2705 Video has actual frame data"); + const Q = Y.getImageData(0, 0, Math.min(10, O.videoWidth), Math.min(10, O.videoHeight)), V = Array.from(Q.data.slice(0, 40)); + console.log("\u{1F3A8} First 40 pixel values:", V); + const M = V.every((ee) => ee === 0), G = V.every((ee) => ee === V[0]); + M ? console.error("\u274C All pixels are zero - video not rendering!") : G ? console.warn("\u26A0\uFE0F All pixels same value - possible issue") : console.log("\u2705 Video has actual frame data"); } U(); }, 300); @@ -47515,8 +47515,8 @@ Please pass a 2048 word array explicitly.`; console.error("\u274C ImageData is empty"), T.current = requestAnimationFrame(O); return; } - const { entropy: Q, variance: G } = C(Y); - x(Q), h(G), m(Q >= 7.5 && G >= 1e3); + const { entropy: Q, variance: V } = C(Y); + x(Q), h(V), m(Q >= 7.5 && V >= 1e3); } catch (Y) { console.error("\u274C Error in entropy analysis:", Y); } @@ -47526,26 +47526,26 @@ Please pass a 2048 word array explicitly.`; }, C = (O) => { const W = O.data, $ = new Array(256).fill(0); let X = 0, Y = 0; - for (let V = 0; V < W.length; V += 16) { - const ee = Math.floor((W[V] + W[V + 1] + W[V + 2]) / 3); + for (let G = 0; G < W.length; G += 16) { + const ee = Math.floor((W[G] + W[G + 1] + W[G + 2]) / 3); $[ee]++, X += ee, Y++; } const Q = X / Y; - let G = 0; - for (const V of $) if (V > 0) { - const ee = V / Y; - G -= ee * Math.log2(ee); + let V = 0; + for (const G of $) if (G > 0) { + const ee = G / Y; + V -= ee * Math.log2(ee); } - let K = 0; - for (let V = 0; V < W.length; V += 16) { - const ee = Math.floor((W[V] + W[V + 1] + W[V + 2]) / 3); - K += Math.pow(ee - Q, 2); + let M = 0; + for (let G = 0; G < W.length; G += 16) { + const ee = Math.floor((W[G] + W[G + 1] + W[G + 2]) / 3); + M += Math.pow(ee - Q, 2); } - return K = K / Y, { - entropy: G, - variance: K + return M = M / Y, { + entropy: V, + variance: M }; - }, j = async () => { + }, z = async () => { if (!w.current || !_.current) return; T.current && (cancelAnimationFrame(T.current), console.log("\u{1F6D1} Stopped entropy analysis loop")), i("processing"); const O = _.current, W = O.getContext("2d", { @@ -47554,26 +47554,26 @@ Please pass a 2048 word array explicitly.`; if (!W) return; O.width = w.current.videoWidth, O.height = w.current.videoHeight, W.drawImage(w.current, 0, 0, O.width, O.height); const $ = W.getImageData(0, 0, O.width, O.height), X = performance.now(), Y = await I($, X), Q = await R(Y, e, O); - B(Y), i("stats"), l && (l.getTracks().forEach((G) => G.stop()), console.log("\u{1F4F7} Camera stopped")), D(Q); + B(Y), i("stats"), l && (l.getTracks().forEach((V) => V.stop()), console.log("\u{1F4F7} Camera stopped")), D(Q); }, I = async (O, W) => { - const $ = O.data, X = $.length / 4, Y = [], Q = [], G = [], K = new Array(10).fill(0), V = /* @__PURE__ */ new Set(); + const $ = O.data, X = $.length / 4, Y = [], Q = [], V = [], M = new Array(10).fill(0), G = /* @__PURE__ */ new Set(); let ee = 255, te = 0; const oe = []; for (let ve = 0; ve < $.length; ve += 4) { - Y.push($[ve]), Q.push($[ve + 1]), G.push($[ve + 2]); + Y.push($[ve]), Q.push($[ve + 1]), V.push($[ve + 2]); const Ce = Math.floor(($[ve] + $[ve + 1] + $[ve + 2]) / 3); oe.push(Ce); const Ie = Math.floor(Ce / 25.6); - K[Math.min(Ie, 9)]++, ee = Math.min(ee, Ce), te = Math.max(te, Ce); + M[Math.min(Ie, 9)]++, ee = Math.min(ee, Ce), te = Math.max(te, Ce); const Ue = $[ve] << 16 | $[ve + 1] << 8 | $[ve + 2]; - V.add(Ue); + G.add(Ue); } const ie = new Array(256).fill(0); for (const ve of oe) ie[ve]++; - let ce = 0; + let xe = 0; for (const ve of ie) if (ve > 0) { const Ce = ve / X; - ce -= Ce * Math.log2(Ce); + xe -= Ce * Math.log2(Ce); } const de = (ve) => { const Ce = ve.reduce((Ue, ge) => Ue + ge, 0) / ve.length, Ie = ve.reduce((Ue, ge) => Ue + Math.pow(ge - Ce, 2), 0) / ve.length; @@ -47584,31 +47584,31 @@ Please pass a 2048 word array explicitly.`; }, he = { r: de(Y), g: de(Q), - b: de(G) + b: de(V) }, be = de(oe).stddev ** 2; return { - shannon: ce, + shannon: xe, variance: be, - uniqueColors: V.size, + uniqueColors: G.size, brightnessRange: [ ee, te ], rgbStats: he, - histogram: K, + histogram: M, captureTimeMicros: Math.floor(W % 1 * 1e6), interactionSamples: n.getSampleCount().total, totalBits: 256, dataSize: $.length }; }, R = async (O, W, $) => { - const X = $.toDataURL(), Y = await n.getEntropyBytes(), Q = crypto.getRandomValues(new Uint8Array(32)), G = [ + const X = $.toDataURL(), Y = await n.getEntropyBytes(), Q = crypto.getRandomValues(new Uint8Array(32)), V = [ X, O.captureTimeMicros.toString(), Array.from(Y).join(","), Array.from(Q).join(","), performance.now().toString() - ].join("|"), V = new TextEncoder().encode(G), ee = await crypto.subtle.digest("SHA-256", V), te = W === 12 ? 16 : 32, oe = new Uint8Array(ee).slice(0, te); + ].join("|"), G = new TextEncoder().encode(V), ee = await crypto.subtle.digest("SHA-256", G), te = W === 12 ? 16 : 32, oe = new Uint8Array(ee).slice(0, te); return wa(oe); }; fe.useEffect(() => () => { @@ -47779,7 +47779,7 @@ Please pass a 2048 word array explicitly.`; className: "flex gap-3", children: [ E.jsxs("button", { - onClick: j, + onClick: z, disabled: !p, className: "flex-1 py-2.5 bg-gradient-to-r from-[#ff006e] to-[#ff4d8f] text-white text-sm rounded-lg font-bold uppercase disabled:opacity-30 disabled:cursor-not-allowed hover:shadow-[0_0_20px_rgba(255,0,110,0.5)] transition-all", children: [ @@ -48220,8 +48220,8 @@ Please pass a 2048 word array explicitly.`; C >= 1 && C <= 6 && k[C - 1]++; } const w = P.length / 6, _ = k.reduce((U, C) => { - const j = C - w; - return U + j * j / w; + const z = C - w; + return U + z * z / w; }, 0), T = { rolls: P, length: P.length, @@ -48242,7 +48242,7 @@ Please pass a 2048 word array explicitly.`; return { entropyToMnemonic: R }; - }, void 0, import.meta.url), C = e === 12 ? 16 : 32, j = new Uint8Array(N).slice(0, C), I = Buffer.from(j).toString("hex"); + }, void 0, import.meta.url), C = e === 12 ? 16 : 32, z = new Uint8Array(N).slice(0, C), I = Buffer.from(z).toString("hex"); return U(I); }; return E.jsxs("div", { @@ -48701,7 +48701,7 @@ Please pass a 2048 word array explicitly.`; try { const C = cP(f); if (C.length < u) throw new Error(`Need at least ${u} D6 samples, got ${C.length}.`); - const j = C.slice(0, u), I = [ + const z = C.slice(0, u), I = [ 0, 0, 0, @@ -48709,16 +48709,16 @@ Please pass a 2048 word array explicitly.`; 0, 0 ]; - for (let L = 0; L < j.length; L++) { - const O = j[L]; + for (let L = 0; L < z.length; L++) { + const O = z[L]; if (!Number.isInteger(O) || O < 1 || O > 6) throw new Error(`Invalid D6 at index ${L}: ${String(O)}`); I[O - 1]++; } - const R = await uP(j, e, n); + const R = await uP(z, e, n); _(R), k({ source: "randomorg", nRequested: u, - nUsed: j.length, + nUsed: z.length, distribution: I, interactionSamples: n.getSampleCount().total, totalBits: 256 @@ -49018,7 +49018,7 @@ Please pass a 2048 word array explicitly.`; }), E.jsx("div", { className: "space-y-1 font-mono text-[10px]", - children: P.distribution.map((C, j) => { + children: P.distribution.map((C, z) => { const I = C / P.nUsed * 100; return E.jsxs("div", { className: "flex justify-between", @@ -49026,7 +49026,7 @@ Please pass a 2048 word array explicitly.`; E.jsxs("span", { children: [ "Face ", - j + 1 + z + 1 ] }), E.jsxs("span", { @@ -49039,7 +49039,7 @@ Please pass a 2048 word array explicitly.`; ] }) ] - }, j); + }, z); }) }) ] @@ -49176,8 +49176,8 @@ Please pass a 2048 word array explicitly.`; } } const fP = ({ wordCount: e, onEntropyGenerated: t, onCancel: r, interactionEntropy: n }) => { - const [a, i] = fe.useState("permission"), [l, c] = fe.useState(null), [u, x] = fe.useState(0), [f, h] = fe.useState(false), [p, m] = fe.useState(null), [y, B] = fe.useState(""), [v, D] = fe.useState(""), [P, k] = fe.useState(0), w = fe.useRef(null), _ = fe.useRef(null), T = fe.useRef(), N = fe.useRef([]), U = fe.useRef(false), C = fe.useRef(null), j = fe.useRef([]), I = fe.useRef(0), R = async () => { - if (T.current && (cancelAnimationFrame(T.current), T.current = void 0), l && (l.getTracks().forEach((G) => G.stop()), c(null)), C.current) { + const [a, i] = fe.useState("permission"), [l, c] = fe.useState(null), [u, x] = fe.useState(0), [f, h] = fe.useState(false), [p, m] = fe.useState(null), [y, B] = fe.useState(""), [v, D] = fe.useState(""), [P, k] = fe.useState(0), w = fe.useRef(null), _ = fe.useRef(null), T = fe.useRef(), N = fe.useRef([]), U = fe.useRef(false), C = fe.useRef(null), z = fe.useRef([]), I = fe.useRef(0), R = async () => { + if (T.current && (cancelAnimationFrame(T.current), T.current = void 0), l && (l.getTracks().forEach((V) => V.stop()), c(null)), C.current) { C.current.onaudioprocess = null; try { C.current.disconnect(); @@ -49193,7 +49193,7 @@ Please pass a 2048 word array explicitly.`; } }, L = async () => { try { - console.log("\u{1F3A4} Requesting microphone access..."), await R(); + await R(); const Q = await navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: false, @@ -49204,92 +49204,75 @@ Please pass a 2048 word array explicitly.`; }, channelCount: 1 } - }); - console.log("\u2705 Microphone access granted"); - const G = new (window.AudioContext || window.webkitAudioContext)(), K = G.createAnalyser(); - K.fftSize = 2048, K.smoothingTimeConstant = 0.3, K.minDecibels = -100, K.maxDecibels = 0, K.channelCount = 1; - const V = G.createMediaStreamSource(Q), ee = G.createGain(); + }), V = new (window.AudioContext || window.webkitAudioContext)(), M = V.createAnalyser(); + M.fftSize = 2048, M.smoothingTimeConstant = 0.3, M.minDecibels = -100, M.maxDecibels = 0, M.channelCount = 1; + const G = V.createMediaStreamSource(Q), ee = V.createGain(); ee.gain.value = 0; - const te = G.createMediaStreamDestination(); - V.connect(K), K.connect(ee), ee.connect(te); + const te = V.createMediaStreamDestination(); + G.connect(M), M.connect(ee), ee.connect(te); try { - const oe = G.createScriptProcessor(1024, 1, 1); + const oe = V.createScriptProcessor(1024, 1, 1); oe.onaudioprocess = (ie) => { - const ce = ie.inputBuffer.getChannelData(0); - j.current.push(new Float32Array(ce)); + const xe = ie.inputBuffer.getChannelData(0); + z.current.push(new Float32Array(xe)); let de = 0; - for (let be = 0; be < ce.length; be++) de += ce[be] * ce[be]; - const he = Math.sqrt(de / ce.length); - Math.random() < 0.1 && x(Math.min(he * 2e3, 100)), I.current++ % 30 === 0 && console.log("\u{1F399}\uFE0F RAW mic RMS:", he.toFixed(4), "Sample:", ce.slice(0, 5)); - }, V.connect(oe), oe.connect(ee), C.current = oe, console.log("\u2705 ScriptProcessor active (Safari fallback)"); + for (let be = 0; be < xe.length; be++) de += xe[be] * xe[be]; + const he = Math.sqrt(de / xe.length); + Math.random() < 0.1 && x(Math.min(he * 2e3, 100)), I.current++ % 30; + }, G.connect(oe), oe.connect(ee), C.current = oe; } catch { - console.log("\u26A0\uFE0F ScriptProcessor not supported"); } - console.log("\u{1F3A7} Pipeline primed:", { - sampleRate: G.sampleRate, - state: G.state, - fftSize: K.fftSize, - channels: K.channelCount - }), w.current = G, _.current = K, c(Q), G.state === "suspended" && (await G.resume(), console.log("\u25B6\uFE0F Audio context resumed:", G.state)), setTimeout(() => { - _.current && (console.log("\u25B6\uFE0F Starting analysis after buffer fill"), O(), i("capture")); + w.current = V, _.current = M, c(Q), V.state === "suspended" && await V.resume(), setTimeout(() => { + _.current && (O(), i("capture")); }, 300); } catch (Q) { - console.error("\u274C Microphone error:", Q), D(`Microphone access denied: ${Q.message}`), setTimeout(() => r(), 2e3); + D(`Microphone access denied: ${Q.message}`), setTimeout(() => r(), 2e3); } }, O = () => { - if (!_.current) { - console.error("\u274C No analyser"); - return; - } - console.log("\u2705 Analysis loop started"); + if (!_.current) return; const Q = () => { if (!_.current) return; - const G = _.current.frequencyBinCount, K = new Float32Array(G), V = new Float32Array(G); - _.current.getFloatTimeDomainData(K), _.current.getFloatFrequencyData(V); + const V = _.current.frequencyBinCount, M = new Float32Array(V), G = new Float32Array(V); + _.current.getFloatTimeDomainData(M), _.current.getFloatFrequencyData(G); let ee = 0; - for (let Ce = 0; Ce < G; Ce++) ee += K[Ce] * K[Ce]; - const te = Math.sqrt(ee / G), oe = Math.min(te * 2e3, 100); - let ie = 0, ce = 0; - for (let Ce = 0; Ce < G; Ce++) { - const Ie = V[Ce]; + for (let Ce = 0; Ce < V; Ce++) ee += M[Ce] * M[Ce]; + const te = Math.sqrt(ee / V), oe = Math.min(te * 2e3, 100); + let ie = 0, xe = 0; + for (let Ce = 0; Ce < V; Ce++) { + const Ie = G[Ce]; if (Ie > -100) { const Ue = Math.pow(10, Ie / 20); - ie += Ue * Ue, ce++; + ie += Ue * Ue, xe++; } } - const de = ce > 0 ? Math.sqrt(ie / ce) : 0, he = Math.min(de * 1e3, 50), be = Math.max(oe, he), ve = Math.min(Math.max(be, 0), 100); - U.current ? Math.random() < 0.03 && console.log("\u{1F3B5} Level:", ve.toFixed(1), "RMS:", te.toFixed(4)) : (U.current = true, console.log("\u{1F4CA} First frame:", { - rms: te.toFixed(4), - level: oe.toFixed(1), - timeSample: K.slice(0, 5), - freqSample: V.slice(0, 5) - })), x(ve), h(ve > 1), T.current = requestAnimationFrame(Q); + const de = xe > 0 ? Math.sqrt(ie / xe) : 0, he = Math.min(de * 1e3, 50), be = Math.max(oe, he), ve = Math.min(Math.max(be, 0), 100); + U.current || (U.current = true), x(ve), h(ve > 1), T.current = requestAnimationFrame(Q); }; Q(); }; fe.useEffect(() => { - _.current && a === "capture" && !T.current && (console.log("\u{1F3AC} useEffect: Starting audio analysis"), O()); + _.current && a === "capture" && !T.current && O(); }, [ _.current, a ]); const W = async () => { - w.current && w.current.state === "suspended" && (await w.current.resume(), console.log("\u25B6\uFE0F Audio context resumed on capture")), i("processing"), k(0), console.log("\u{1F399}\uFE0F Capturing audio entropy..."); - const Q = 3e3, G = 50, K = Q / G; - N.current = [], j.current = []; - for (let te = 0; te < K; te++) { - if (await new Promise((oe) => setTimeout(oe, G)), _.current) { + w.current && w.current.state === "suspended" && await w.current.resume(), i("processing"), k(0); + const Q = 3e3, V = 50, M = Q / V; + N.current = [], z.current = []; + for (let te = 0; te < M; te++) { + if (await new Promise((oe) => setTimeout(oe, V)), _.current) { const oe = _.current.frequencyBinCount, ie = new Float32Array(oe); _.current.getFloatTimeDomainData(ie), N.current.push(new Float32Array(ie)); } - k((te + 1) / K * 100); + k((te + 1) / M * 100); } - j.current.length > 0 && (console.log("\u2705 Using raw audio data from ScriptProcessor:", j.current.length, "samples"), N.current = j.current.slice(-K)), console.log("\u2705 Audio captured:", N.current.length, "samples"); - const V = await $(), ee = await X(V); - m(V), B(ee), i("stats"), await R(); + z.current.length > 0 && (N.current = z.current.slice(-M)); + const G = await $(), ee = await X(G); + m(G), B(ee), i("stats"), await R(); }, $ = async () => { var _a; - const Q = N.current.flatMap((he) => Array.from(he)), G = ((_a = w.current) == null ? void 0 : _a.sampleRate) || 48e3, K = Math.max(...Q.map(Math.abs)), V = Q.reduce((he, be) => he + be * be, 0), ee = Math.sqrt(V / Q.length); + const Q = N.current.flatMap((he) => Array.from(he)), V = ((_a = w.current) == null ? void 0 : _a.sampleRate) || 48e3, M = Math.max(...Q.map(Math.abs)), G = Q.reduce((he, be) => he + be * be, 0), ee = Math.sqrt(G / Q.length); let te = 0; for (let he = 1; he < Q.length; he++) (Q[he] >= 0 && Q[he - 1] < 0 || Q[he] < 0 && Q[he - 1] >= 0) && te++; const oe = Array(8).fill(0); @@ -49304,34 +49287,34 @@ Please pass a 2048 word array explicitly.`; } const ie = Math.max(...oe); if (ie > 0) for (let he = 0; he < oe.length; he++) oe[he] = oe[he] / ie * 100; - let ce = 0; + let xe = 0; const de = oe.reduce((he, be) => he + be, 0); if (de > 0) { for (const he of oe) if (he > 0) { const be = he / de; - ce -= be * Math.log2(be); + xe -= be * Math.log2(be); } } return { - sampleRate: G, + sampleRate: V, duration: N.current.length * 50, - peakAmplitude: K, + peakAmplitude: M, rmsAmplitude: ee, zeroCrossings: te, frequencyBands: oe, - spectralEntropy: ce, + spectralEntropy: xe, interactionSamples: n.getSampleCount().total, totalBits: 256 }; }, X = async (Q) => { - const G = N.current.flatMap((be) => Array.from(be)), K = await crypto.subtle.digest("SHA-256", new Float32Array(G).buffer), V = await n.getEntropyBytes(), ee = crypto.getRandomValues(new Uint8Array(32)), te = [ - Array.from(new Uint8Array(K)).join(","), + const V = N.current.flatMap((be) => Array.from(be)), M = await crypto.subtle.digest("SHA-256", new Float32Array(V).buffer), G = await n.getEntropyBytes(), ee = crypto.getRandomValues(new Uint8Array(32)), te = [ + Array.from(new Uint8Array(M)).join(","), Q.zeroCrossings.toString(), Q.peakAmplitude.toString(), performance.now().toString(), - Array.from(V).join(","), + Array.from(G).join(","), Array.from(ee).join(",") - ].join("|"), ie = new TextEncoder().encode(te), ce = await crypto.subtle.digest("SHA-256", ie), de = e === 12 ? 16 : 32, he = new Uint8Array(ce).slice(0, de); + ].join("|"), ie = new TextEncoder().encode(te), xe = await crypto.subtle.digest("SHA-256", ie), de = e === 12 ? 16 : 32, he = new Uint8Array(xe).slice(0, de); return wa(he); }; fe.useEffect(() => () => { @@ -49426,13 +49409,13 @@ Please pass a 2048 word array explicitly.`; className: "flex items-end gap-1 h-full", children: [ ...Array(20) - ].map((Q, G) => E.jsx("div", { + ].map((Q, V) => E.jsx("div", { className: "w-2 bg-[#00f0ff] rounded-t transition-all", style: { height: `${Math.max(10, u * (0.5 + Math.random() * 0.5))}%`, opacity: 0.3 + u / 100 * 0.7 } - }, G)) + }, V)) }) }) }), @@ -49656,12 +49639,12 @@ Please pass a 2048 word array explicitly.`; }), E.jsx("div", { className: "flex items-end justify-between h-16 gap-1", - children: p.frequencyBands.map((Q, G) => E.jsx("div", { + children: p.frequencyBands.map((Q, V) => E.jsx("div", { className: "flex-1 bg-[#00f0ff] rounded-t", style: { height: `${Q}%` } - }, G)) + }, V)) }), E.jsxs("div", { className: "flex justify-between text-[9px] text-[#6ef3f7] mt-1", @@ -49826,7 +49809,7 @@ Please pass a 2048 word array explicitly.`; }); }; function hP() { - const [e, t] = fe.useState("create"), [r, n] = fe.useState(""), [a, i] = fe.useState(""), [l, c] = fe.useState(""), [u, x] = fe.useState(""), [f, h] = fe.useState(""), [p, m] = fe.useState(""), [y, B] = fe.useState(false), [v, D] = fe.useState(""), [P, k] = fe.useState(""), [w, _] = fe.useState(""), [T, N] = fe.useState(null), [U, C] = fe.useState(""), [j, I] = fe.useState(false), [R, L] = fe.useState(false), [O, W] = fe.useState(false), [$, X] = fe.useState(false), [Y, Q] = fe.useState(false), [G, K] = fe.useState(null), [V, ee] = fe.useState(false), [te, oe] = fe.useState(false), [ie, ce] = fe.useState(false), [de, he] = fe.useState([]), [be, ve] = fe.useState([]), [Ce, Ie] = fe.useState([]), [Ue, ge] = fe.useState(false), [ke, ze] = fe.useState(0), [Qe, Me] = fe.useState("pgp"), [ft, rt] = fe.useState("standard"), [wt, _n] = fe.useState(""), [Wr, Ir] = fe.useState(24), [dr, q] = fe.useState("backup"), [S, z] = fe.useState(null), [Z, ne] = fe.useState(""), [ue, pe] = fe.useState(0), [qe, yt] = fe.useState(true), [Ze, We] = fe.useState(null), [Je, to] = fe.useState(null), ro = fe.useRef(new dP()), no = [ + const [e, t] = fe.useState("create"), [r, n] = fe.useState(""), [a, i] = fe.useState(""), [l, c] = fe.useState(""), [u, x] = fe.useState(""), [f, h] = fe.useState(""), [p, m] = fe.useState(""), [y, B] = fe.useState(false), [v, D] = fe.useState(""), [P, k] = fe.useState(""), [w, _] = fe.useState(""), [T, N] = fe.useState(null), [U, C] = fe.useState(""), [z, I] = fe.useState(false), [R, L] = fe.useState(false), [O, W] = fe.useState(false), [$, X] = fe.useState(false), [Y, Q] = fe.useState(false), [V, M] = fe.useState(null), [G, ee] = fe.useState(false), [te, oe] = fe.useState(false), [ie, xe] = fe.useState(false), [de, he] = fe.useState([]), [be, ve] = fe.useState([]), [Ce, Ie] = fe.useState([]), [Ue, ge] = fe.useState(false), [ke, ze] = fe.useState(0), [Qe, Le] = fe.useState("pgp"), [ft, rt] = fe.useState("standard"), [wt, _n] = fe.useState(""), [Wr, Ir] = fe.useState(24), [dr, q] = fe.useState("backup"), [S, j] = fe.useState(null), [Z, ne] = fe.useState(""), [ce, pe] = fe.useState(0), [qe, yt] = fe.useState(true), [Ze, We] = fe.useState(null), [Je, to] = fe.useState(null), ro = fe.useRef(new dP()), no = [ "key", "mnemonic", "seed", @@ -49835,15 +49818,15 @@ Please pass a 2048 word array explicitly.`; "pgp", "password" ], ao = (Ee) => { - const Le = Ee.toLowerCase(); - return no.some((Ke) => Le.includes(Ke)); + const Me = Ee.toLowerCase(); + return no.some((Te) => Me.includes(Te)); }, ws = (Ee) => { - const Le = []; - for (let Ke = 0; Ke < Ee.length; Ke++) { - const ct = Ee.key(Ke); + const Me = []; + for (let Te = 0; Te < Ee.length; Te++) { + const ct = Ee.key(Te); if (ct) { const ut = Ee.getItem(ct) || ""; - Le.push({ + Me.push({ key: ct, value: ut.substring(0, 50) + (ut.length > 50 ? "..." : ""), size: new Blob([ @@ -49853,7 +49836,7 @@ Please pass a 2048 word array explicitly.`; }); } } - return Le.sort((Ke, ct) => (ct.isSensitive ? 1 : 0) - (Ke.isSensitive ? 1 : 0)); + return Me.sort((Te, ct) => (ct.isSensitive ? 1 : 0) - (Te.isSensitive ? 1 : 0)); }, vs = () => { he(ws(localStorage)), ve(ws(sessionStorage)); }; @@ -49868,18 +49851,18 @@ Please pass a 2048 word array explicitly.`; }, []), fe.useEffect(() => () => { t9(); }, []), fe.useEffect(() => { - const Ee = (Le) => { + const Ee = (Me) => { var _a, _b2, _c2; - const Ke = Le.target, ut = (((_a = window.getSelection()) == null ? void 0 : _a.toString()) || "").length; + const Te = Me.target, ut = (((_a = window.getSelection()) == null ? void 0 : _a.toString()) || "").length; if (ut === 0) return; let Br = "Unknown field"; - const sn = Ke.getAttribute("data-sensitive") || ((_b2 = Ke.closest("[data-sensitive]")) == null ? void 0 : _b2.getAttribute("data-sensitive")); + const sn = Te.getAttribute("data-sensitive") || ((_b2 = Te.closest("[data-sensitive]")) == null ? void 0 : _b2.getAttribute("data-sensitive")); if (sn) Br = sn; - else if (Ke.tagName === "TEXTAREA" || Ke.tagName === "INPUT") { - Br = Ke.getAttribute("aria-label") || Ke.getAttribute("name") || Ke.getAttribute("id") || Ke.type || Ke.tagName.toLowerCase(); - const ci = Ke.closest("label") || document.querySelector(`label[for="${Ke.id}"]`); - if (ci && (Br = ((_c2 = ci.textContent) == null ? void 0 : _c2.trim()) || Br), /mnemonic|seed|key|private|password|secret/i.test(Ke.className + " " + Br + " " + (Ke.getAttribute("placeholder") || "")) && Br === Ke.tagName.toLowerCase()) { - const so = Ke.getAttribute("placeholder"); + else if (Te.tagName === "TEXTAREA" || Te.tagName === "INPUT") { + Br = Te.getAttribute("aria-label") || Te.getAttribute("name") || Te.getAttribute("id") || Te.type || Te.tagName.toLowerCase(); + const ci = Te.closest("label") || document.querySelector(`label[for="${Te.id}"]`); + if (ci && (Br = ((_c2 = ci.textContent) == null ? void 0 : _c2.trim()) || Br), /mnemonic|seed|key|private|password|secret/i.test(Te.className + " " + Br + " " + (Te.getAttribute("placeholder") || "")) && Br === Te.tagName.toLowerCase()) { + const so = Te.getAttribute("placeholder"); so && (Br = so.substring(0, 40) + "..."); } } @@ -49896,8 +49879,8 @@ Please pass a 2048 word array explicitly.`; }, []), fe.useEffect(() => { if (e === "restore" && w.trim()) { const Ee = sE(w); - z(Ee), (Ee === "pgp" || Ee === "krux") && Ee !== Qe && Me(Ee); - } else z(null); + j(Ee), (Ee === "pgp" || Ee === "krux") && Ee !== Qe && Le(Ee); + } else j(null); }, [ w, e, @@ -49907,40 +49890,40 @@ Please pass a 2048 word array explicitly.`; try { await navigator.clipboard.writeText(""), Ie([]), alert("\u2705 Clipboard cleared and history wiped"); } catch { - const Le = document.createElement("textarea"); - Le.value = "", document.body.appendChild(Le), Le.select(), document.execCommand("copy"), document.body.removeChild(Le), Ie([]), alert("\u2705 History cleared (clipboard may require manual clearing)"); + const Me = document.createElement("textarea"); + Me.value = "", document.body.appendChild(Me), Me.select(), document.execCommand("copy"), document.body.removeChild(Me), Ie([]), alert("\u2705 History cleared (clipboard may require manual clearing)"); } - }, Pc = async (Ee, Le = "Data") => { + }, Pc = async (Ee, Me = "Data") => { if (Y) { C("Copy to clipboard is disabled in Read-only mode."); return; } - const Ke = typeof Ee == "string" ? Ee : Array.from(Ee).map((ct) => ct.toString(16).padStart(2, "0")).join(""); + const Te = typeof Ee == "string" ? Ee : Array.from(Ee).map((ct) => ct.toString(16).padStart(2, "0")).join(""); try { - await navigator.clipboard.writeText(Ke), L(true), (Le.toLowerCase().includes("mnemonic") || Le.toLowerCase().includes("seed") || Le.toLowerCase().includes("password") || Le.toLowerCase().includes("key")) && (Ie((ut) => [ + await navigator.clipboard.writeText(Te), L(true), (Me.toLowerCase().includes("mnemonic") || Me.toLowerCase().includes("seed") || Me.toLowerCase().includes("password") || Me.toLowerCase().includes("key")) && (Ie((ut) => [ { timestamp: /* @__PURE__ */ new Date(), - field: `${Le} (will clear in 10s)`, - length: Ke.length + field: `${Me} (will clear in 10s)`, + length: Te.length }, ...ut.slice(0, 9) ]), setTimeout(async () => { try { - const ut = crypto.getRandomValues(new Uint8Array(Math.max(Ke.length, 64))).reduce((Br, sn) => Br + String.fromCharCode(32 + sn % 95), ""); + const ut = crypto.getRandomValues(new Uint8Array(Math.max(Te.length, 64))).reduce((Br, sn) => Br + String.fromCharCode(32 + sn % 95), ""); await navigator.clipboard.writeText(ut); } catch { } - }, 1e4), alert(`\u26A0\uFE0F ${Le} copied to clipboard! + }, 1e4), alert(`\u26A0\uFE0F ${Me} copied to clipboard! \u2705 Will auto-clear in 10 seconds. \u{1F512} Warning: Clipboard is accessible to other apps and browser extensions.`)), window.setTimeout(() => L(false), 1500); } catch { const ct = document.createElement("textarea"); - ct.value = Ke, ct.style.position = "fixed", ct.style.left = "-9999px", document.body.appendChild(ct), ct.focus(), ct.select(), document.execCommand("copy"), document.body.removeChild(ct), L(true), window.setTimeout(() => L(false), 1500); + ct.value = Te, ct.style.position = "fixed", ct.style.left = "-9999px", document.body.appendChild(ct), ct.focus(), ct.select(), document.execCommand("copy"), document.body.removeChild(ct), L(true), window.setTimeout(() => L(false), 1500); } - }, ii = (Ee, Le) => { - _n(Ee), to(Le); + }, ii = (Ee, Me) => { + _n(Ee), to(Me); }, Bs = () => { dr === "backup" ? (n(wt), t("backup")) : dr === "seedblender" && (ne(wt), t("seedblender")), _n(""), We(null), to(null); }, Nc = async () => { @@ -49948,11 +49931,11 @@ Please pass a 2048 word array explicitly.`; try { const Ee = await tw(r); if (!Ee.valid) throw new Error(Ee.error); - const Le = oE(r, y); - let Ke; - if (Qe === "seedqr") ft === "standard" ? Ke = { + const Me = oE(r, y); + let Te; + if (Qe === "seedqr") ft === "standard" ? Te = { framed: await UI(r) - } : Ke = { + } : Te = { framed: await TI(r) }; else { @@ -49960,19 +49943,19 @@ Please pass a 2048 word array explicitly.`; const ut = await MI(u); if (!ut.valid) throw new Error(`PGP Key Validation Failed: ${ut.error}`); } - Ke = await qI({ - plaintext: Le, + Te = await qI({ + plaintext: Me, publicKeyArmored: u || void 0, messagePassword: a || void 0, mode: Qe }); } - D(Ke.framed), Ke.recipientFingerprint && k(Ke.recipientFingerprint), await e9(); + D(Te.framed), Te.recipientFingerprint && k(Te.recipientFingerprint), await e9(); const ct = await lg({ mnemonic: r, timestamp: Date.now() }); - K(ct), n(""), i(""), m(""); + M(ct), n(""), i(""), m(""); } catch (Ee) { C(Ee instanceof Error ? Ee.message : "Encryption failed"); } finally { @@ -49982,11 +49965,11 @@ Please pass a 2048 word array explicitly.`; I(true), C(""); try { if (Ee.type.startsWith("image/")) { - const Le = new Image(), Ke = document.createElement("canvas"), ct = Ke.getContext("2d"); + const Me = new Image(), Te = document.createElement("canvas"), ct = Te.getContext("2d"); await new Promise((xt, so) => { - Le.onload = xt, Le.onerror = so, Le.src = URL.createObjectURL(Ee); - }), Ke.width = Le.width, Ke.height = Le.height, ct == null ? void 0 : ct.drawImage(Le, 0, 0); - const ut = ct == null ? void 0 : ct.getImageData(0, 0, Ke.width, Ke.height); + Me.onload = xt, Me.onerror = so, Me.src = URL.createObjectURL(Ee); + }), Te.width = Me.width, Te.height = Me.height, ct == null ? void 0 : ct.drawImage(Me, 0, 0); + const ut = ct == null ? void 0 : ct.getImageData(0, 0, Te.width, Te.height); if (!ut) throw new Error("Could not read image"); const Br = (await ld(async () => { const { default: xt } = await Promise.resolve().then(() => Yb); @@ -49999,20 +49982,20 @@ Please pass a 2048 word array explicitly.`; const xt = Array.from(sn.binaryData).map((so) => so.toString(16).padStart(2, "0")).join(""); _(xt); } else _(sn.data); - URL.revokeObjectURL(Le.src); + URL.revokeObjectURL(Me.src); } else if (Ee.type === "text/plain" || Ee.name.endsWith(".txt") || Ee.name.endsWith(".asc")) { - const Le = await Ee.text(); - _(Le.trim()); + const Me = await Ee.text(); + _(Me.trim()); } else throw new Error("Unsupported file type. Use PNG/JPG (QR) or TXT/ASC (armor)"); - } catch (Le) { - C(Le instanceof Error ? Le.message : "File upload failed"); + } catch (Me) { + C(Me instanceof Error ? Me.message : "File upload failed"); } finally { I(false); } }, Cs = async (Ee) => { Ee.preventDefault(), X(false); - const Le = Ee.dataTransfer.files[0]; - Le && await oo(Le); + const Me = Ee.dataTransfer.files[0]; + Me && await oo(Me); }, si = (Ee) => { Ee.preventDefault(), X(true); }, qd = () => { @@ -50020,7 +50003,7 @@ Please pass a 2048 word array explicitly.`; }, li = async () => { I(true), C(""), N(null); try { - const Le = await iE({ + const Me = await iE({ frameText: w, privateKeyArmored: f || void 0, privateKeyPassphrase: p || void 0, @@ -50028,11 +50011,11 @@ Please pass a 2048 word array explicitly.`; mode: S || Qe }); await e9(); - const Ke = await lg({ - mnemonic: Le.w, + const Te = await lg({ + mnemonic: Me.w, timestamp: Date.now() }); - K(Ke), N(Le.w), c(""), m(""), _(""), setTimeout(() => { + M(Te), N(Me.w), c(""), m(""), _(""), setTimeout(() => { N(null); }, 1e4); } catch (Ee) { @@ -50052,21 +50035,22 @@ Please pass a 2048 word array explicitly.`; }), navigator.sendBeacon = () => false; const Ee = window.Image; window.Image = new Proxy(Ee, { - construct(Le) { + construct(Me) { var _a, _b2; - const Ke = Reflect.construct(Le, []), ct = (_a = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, "src")) == null ? void 0 : _a.set; - return Object.defineProperty(Ke, "src", { + const Te = Reflect.construct(Me, []), ct = (_a = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, "src")) == null ? void 0 : _a.set; + return Object.defineProperty(Te, "src", { configurable: true, set(ut) { if (ut && !ut.startsWith("data:") && !ut.startsWith("blob:")) throw new Error("Network blocked: cannot load external resource"); ct == null ? void 0 : ct.call(this, ut); }, get: (_b2 = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, "src")) == null ? void 0 : _b2.get - }), Ke; + }), Te; } }), navigator.serviceWorker && (navigator.serviceWorker.register = async () => { throw new Error("Network blocked: Service Workers disabled"); - }); + }, navigator.serviceWorker.getRegistrations().then((Me) => Me.forEach((Te) => Te.unregister())).catch(() => { + })); }, a0 = () => { window.__originalFetch && (window.fetch = window.__originalFetch), window.__originalXHR && (window.XMLHttpRequest = window.__originalXHR), window.__originalWS && (window.WebSocket = window.__originalWS), window.__originalImage && (window.Image = window.__originalImage), window.__originalBeacon && (navigator.sendBeacon = window.__originalBeacon); }, ks = () => { @@ -50074,12 +50058,12 @@ Please pass a 2048 word array explicitly.`; }, jc = (Ee) => { t(Ee); }, Gd = () => { - window.confirm("\u26A0\uFE0F Reset ALL data? This will clear everything including any displayed entropy analysis.") && (n(""), _n(""), i(""), c(""), x(""), h(""), m(""), D(""), k(""), _(""), N(null), C(""), We(null), to(null), ne(""), localStorage.clear(), sessionStorage.clear(), t9(), K(null), ze((Ee) => Ee + 1), pe((Ee) => Ee + 1), t("create")); + window.confirm("\u26A0\uFE0F Reset ALL data? This will clear everything including any displayed entropy analysis.") && (n(""), _n(""), i(""), c(""), x(""), h(""), m(""), D(""), k(""), _(""), N(null), C(""), We(null), to(null), ne(""), localStorage.clear(), sessionStorage.clear(), t9(), M(null), ze((Ee) => Ee + 1), pe((Ee) => Ee + 1), t("create")); }, Vd = fe.useCallback((Ee) => { if (typeof Ee == "string") _(Ee); else { - const Le = Array.from(Ee).map((Ke) => Ke.toString(16).padStart(2, "0")).join(""); - _(Le); + const Me = Array.from(Ee).map((Te) => Te.toString(16).padStart(2, "0")).join(""); + _(Me); } W(false), C(""); }, []), Ba = fe.useCallback(() => { @@ -50104,7 +50088,7 @@ Please pass a 2048 word array explicitly.`; sessionItems: be, onOpenStorageModal: () => oe(true), events: Ce, - onOpenClipboardModal: () => ce(true), + onOpenClipboardModal: () => xe(true), activeTab: e, onRequestTabChange: jc, appVersion: "1.4.7", @@ -50732,7 +50716,7 @@ Paste or drag & drop your private key...`, requestTabChange: jc, incomingSeed: Z, onSeedReceived: () => ne("") - }, ue) + }, ce) }) ] }), @@ -50767,7 +50751,7 @@ Paste or drag & drop your private key...`, }), E.jsxs("select", { value: Qe, - onChange: (Ee) => Me(Ee.target.value), + onChange: (Ee) => Le(Ee.target.value), disabled: Y, className: "w-full px-3 py-2 bg-[#16213e] border-2 border-[#00f0ff]/50 rounded-lg text-[#00f0ff] text-xs focus:outline-none focus:border-[#ff006e] focus:shadow-[0_0_20px_rgba(255,0,110,0.5)] transition-all appearance-none bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgPHBhdGggZD0iTTEgMUw2IDZMMTEgMSIgc3Ryb2tlPSIjMDBmMGZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==')] bg-[length:12px] bg-[position:right_12px_center] bg-no-repeat pr-10", style: { @@ -50910,35 +50894,35 @@ Paste or drag & drop your private key...`, }), e === "backup" ? E.jsxs("button", { onClick: Nc, - disabled: !r || j || Y, + disabled: !r || z || Y, className: "w-full py-3 bg-gradient-to-r from-[#ff006e] to-[#ff4d8f] text-white text-sm rounded-xl font-bold uppercase tracking-wider flex items-center justify-center gap-2 hover:shadow-[0_0_30px_rgba(255,0,110,0.8)] active:scale-95 transition-all disabled:opacity-50 disabled:cursor-not-allowed border border-[#ff006e]", style: { textShadow: "0 0 10px rgba(255,255,255,0.8)" }, children: [ - j ? E.jsx(zx, { + z ? E.jsx(zx, { className: "animate-spin", size: 20 }) : E.jsx(jx, { size: 20 }), - j ? "Generating..." : "Generate QR Backup" + z ? "Generating..." : "Generate QR Backup" ] }) : E.jsxs("button", { onClick: li, - disabled: !w || j || Y, + disabled: !w || z || Y, className: "w-full py-3 bg-gradient-to-r from-[#ff006e] to-[#ff4d8f] text-white text-sm rounded-xl font-bold uppercase tracking-wider flex items-center justify-center gap-2 hover:shadow-[0_0_30px_rgba(255,0,110,0.8)] active:scale-95 transition-all disabled:opacity-50 disabled:cursor-not-allowed border border-[#ff006e]", style: { textShadow: "0 0 10px rgba(255,255,255,0.8)" }, children: [ - j ? E.jsx(zx, { + z ? E.jsx(zx, { className: "animate-spin", size: 20 }) : E.jsx(wb, { size: 20 }), - j ? "Decrypting..." : "Decrypt & Restore" + z ? "Decrypting..." : "Decrypt & Restore" ] }) ] @@ -51064,15 +51048,15 @@ Paste or drag & drop your private key...`, }), E.jsx(nP, { appVersion: "1.4.7", - buildHash: "127b479", - buildTimestamp: "2026-02-17T19:15:49.990Z" + buildHash: "4da39b7", + buildTimestamp: "2026-02-19T14:31:53.931Z" }), O && E.jsx(wg, { onScanSuccess: Vd, onClose: Ba, onError: zc }), - V && E.jsx("div", { + G && E.jsx("div", { className: "fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50", onClick: () => ee(false), children: E.jsxs("div", { @@ -51113,7 +51097,7 @@ Paste or drag & drop your private key...`, }), ie && E.jsx("div", { className: "fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50", - onClick: () => ce(false), + onClick: () => xe(false), children: E.jsxs("div", { className: "bg-[#1a1a2e] rounded-xl border-2 border-[#00f0ff]/30 p-6 max-w-md w-full mx-4 shadow-[0_0_30px_rgba(0,240,255,0.3)]", onClick: (Ee) => Ee.stopPropagation(), diff --git a/dist-tails/index.html b/dist-tails/index.html index 9736cbd..9a42380 100644 --- a/dist-tails/index.html +++ b/dist-tails/index.html @@ -2,15 +2,15 @@ - SeedPGP Web - - - + + + @@ -18,4 +18,4 @@
- \ No newline at end of file + diff --git a/index.html b/index.html index 0a7a555..a071591 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,22 @@ SeedPGP Web - - + + @@ -16,4 +30,4 @@ - \ No newline at end of file + diff --git a/src/App.tsx b/src/App.tsx index ae4e92b..259bb9d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -552,9 +552,18 @@ function App() { // 6. Block Service Workers if (navigator.serviceWorker) { + // Block new registrations (navigator.serviceWorker as any).register = async () => { throw new Error('Network blocked: Service Workers disabled'); }; + + // Unregister any existing service workers (defense-in-depth) + navigator.serviceWorker + .getRegistrations() + .then(regs => regs.forEach(reg => reg.unregister())) + .catch(() => { + // Ignore errors; SWs are defense-in-depth only. + }); } }; diff --git a/src/AudioEntropy.tsx b/src/AudioEntropy.tsx index 2fc2dbf..12d3271 100644 --- a/src/AudioEntropy.tsx +++ b/src/AudioEntropy.tsx @@ -72,24 +72,28 @@ const AudioEntropy: React.FC = ({ } }; - const requestMicrophoneAccess = async () => { - try { - console.log('🎤 Requesting microphone access...'); + const requestMicrophoneAccess = async () => { + try { + if (import.meta.env.DEV) { + console.log('🎤 Requesting microphone access...'); + } - // Clean up any existing audio context first - await teardownAudio(); + // Clean up any existing audio context first + await teardownAudio(); - const mediaStream = await navigator.mediaDevices.getUserMedia({ - audio: { - echoCancellation: false, - noiseSuppression: false, - autoGainControl: false, - sampleRate: { ideal: 44100 }, // Safari prefers this - channelCount: 1, - }, - }); + const mediaStream = await navigator.mediaDevices.getUserMedia({ + audio: { + echoCancellation: false, + noiseSuppression: false, + autoGainControl: false, + sampleRate: { ideal: 44100 }, // Safari prefers this + channelCount: 1, + }, + }); - console.log('✅ Microphone access granted'); + if (import.meta.env.DEV) { + console.log('✅ Microphone access granted'); + } // Set up Web Audio API const audioContext = new (window.AudioContext || (window as any).webkitAudioContext)(); @@ -138,7 +142,7 @@ const AudioEntropy: React.FC = ({ } // Deterministic logging every 30 frames - if (frameCounterRef.current++ % 30 === 0) { + if (frameCounterRef.current++ % 30 === 0 && import.meta.env.DEV) { console.log('🎙️ RAW mic RMS:', rawRms.toFixed(4), 'Sample:', inputBuffer.slice(0, 5)); } }; @@ -148,17 +152,23 @@ const AudioEntropy: React.FC = ({ scriptProcessor.connect(silentGain); // pull it via the same sink path scriptProcessorRef.current = scriptProcessor; - console.log('✅ ScriptProcessor active (Safari fallback)'); + if (import.meta.env.DEV) { + console.log('✅ ScriptProcessor active (Safari fallback)'); + } } catch (e) { - console.log('⚠️ ScriptProcessor not supported'); + if (import.meta.env.DEV) { + console.log('⚠️ ScriptProcessor not supported'); + } } - console.log('🎧 Pipeline primed:', { - sampleRate: audioContext.sampleRate, - state: audioContext.state, - fftSize: analyser.fftSize, - channels: analyser.channelCount, - }); + if (import.meta.env.DEV) { + console.log('🎧 Pipeline primed:', { + sampleRate: audioContext.sampleRate, + state: audioContext.state, + fftSize: analyser.fftSize, + channels: analyser.channelCount, + }); + } audioContextRef.current = audioContext; analyserRef.current = analyser; @@ -167,20 +177,26 @@ const AudioEntropy: React.FC = ({ // Resume context if (audioContext.state === 'suspended') { await audioContext.resume(); - console.log('▶️ Audio context resumed:', audioContext.state); + if (import.meta.env.DEV) { + console.log('▶️ Audio context resumed:', audioContext.state); + } } // Give pipeline 300ms to fill buffer setTimeout(() => { if (analyserRef.current) { - console.log('▶️ Starting analysis after buffer fill'); + if (import.meta.env.DEV) { + console.log('▶️ Starting analysis after buffer fill'); + } startAudioAnalysis(); setStep('capture'); } }, 300); } catch (err: any) { - console.error('❌ Microphone error:', err); + if (import.meta.env.DEV) { + console.error('❌ Microphone error:', err); + } setError(`Microphone access denied: ${err.message}`); setTimeout(() => onCancel(), 2000); } @@ -188,11 +204,15 @@ const AudioEntropy: React.FC = ({ const startAudioAnalysis = () => { if (!analyserRef.current) { - console.error('❌ No analyser'); + if (import.meta.env.DEV) { + console.error('❌ No analyser'); + } return; } - console.log('✅ Analysis loop started'); + if (import.meta.env.DEV) { + console.log('✅ Analysis loop started'); + } const analyze = () => { if (!analyserRef.current) return; @@ -235,14 +255,18 @@ const AudioEntropy: React.FC = ({ // Log first few + random if (!audioLevelLoggedRef.current) { audioLevelLoggedRef.current = true; - console.log('📊 First frame:', { - rms: rms.toFixed(4), - level: level.toFixed(1), - timeSample: timeData.slice(0, 5), - freqSample: freqData.slice(0, 5) - }); + if (import.meta.env.DEV) { + console.log('📊 First frame:', { + rms: rms.toFixed(4), + level: level.toFixed(1), + timeSample: timeData.slice(0, 5), + freqSample: freqData.slice(0, 5) + }); + } } else if (Math.random() < 0.03) { - console.log('🎵 Level:', clampedLevel.toFixed(1), 'RMS:', rms.toFixed(4)); + if (import.meta.env.DEV) { + console.log('🎵 Level:', clampedLevel.toFixed(1), 'RMS:', rms.toFixed(4)); + } } setAudioLevel(clampedLevel); @@ -257,7 +281,9 @@ const AudioEntropy: React.FC = ({ // Auto-start analysis when analyser is ready useEffect(() => { if (analyserRef.current && step === 'capture' && !animationRef.current) { - console.log('🎬 useEffect: Starting audio analysis'); + if (import.meta.env.DEV) { + console.log('🎬 useEffect: Starting audio analysis'); + } startAudioAnalysis(); } }, [analyserRef.current, step]); @@ -266,13 +292,17 @@ const AudioEntropy: React.FC = ({ // Ensure audio context is running if (audioContextRef.current && audioContextRef.current.state === 'suspended') { await audioContextRef.current.resume(); - console.log('▶️ Audio context resumed on capture'); + if (import.meta.env.DEV) { + console.log('▶️ Audio context resumed on capture'); + } } setStep('processing'); setCaptureProgress(0); - console.log('🎙️ Capturing audio entropy...'); + if (import.meta.env.DEV) { + console.log('🎙️ Capturing audio entropy...'); + } // Capture 3 seconds of audio data const captureDuration = 3000; // 3 seconds @@ -301,11 +331,15 @@ const AudioEntropy: React.FC = ({ // Use raw audio data if available (from ScriptProcessor) if (rawAudioDataRef.current.length > 0) { - console.log('✅ Using raw audio data from ScriptProcessor:', rawAudioDataRef.current.length, 'samples'); + if (import.meta.env.DEV) { + console.log('✅ Using raw audio data from ScriptProcessor:', rawAudioDataRef.current.length, 'samples'); + } audioDataRef.current = rawAudioDataRef.current.slice(-totalSamples); // Use most recent samples } - console.log('✅ Audio captured:', audioDataRef.current.length, 'samples'); + if (import.meta.env.DEV) { + console.log('✅ Audio captured:', audioDataRef.current.length, 'samples'); + } // Analyze captured audio const audioStats = await analyzeAudioEntropy();