@private.me/xbind 1.2.17 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +97 -7
  2. package/dist-standalone/_deps/crypto/base64.js +198 -86
  3. package/dist-standalone/_deps/shared/cjs/errors.js +232 -539
  4. package/dist-standalone/_deps/shared/cjs/index.js +88 -442
  5. package/dist-standalone/_deps/shared/cjs/types.js +61 -374
  6. package/dist-standalone/_deps/shared/errors.d.ts +7 -1
  7. package/dist-standalone/_deps/shared/errors.d.ts.map +1 -1
  8. package/dist-standalone/_deps/shared/errors.js +231 -161
  9. package/dist-standalone/_deps/shared/errors.js.map +1 -1
  10. package/dist-standalone/_deps/shared/index.js +54 -55
  11. package/dist-standalone/_deps/shared/types.js +60 -58
  12. package/dist-standalone/_deps/ux-helpers/cjs/errors.js +1 -1
  13. package/dist-standalone/_deps/ux-helpers/cjs/pagination.js +1 -1
  14. package/dist-standalone/_deps/ux-helpers/cjs/progress.js +1 -1
  15. package/dist-standalone/_deps/ux-helpers/cjs/search.js +1 -1
  16. package/dist-standalone/_deps/ux-helpers/errors.js +1 -1
  17. package/dist-standalone/_deps/ux-helpers/pagination.js +1 -1
  18. package/dist-standalone/_deps/ux-helpers/progress.js +1 -1
  19. package/dist-standalone/_deps/ux-helpers/search.js +1 -1
  20. package/dist-standalone/_deps/xregistry/cjs/discovery.js +1 -1
  21. package/dist-standalone/_deps/xregistry/cjs/errors.js +1 -1
  22. package/dist-standalone/_deps/xregistry/cjs/index.js +1 -1
  23. package/dist-standalone/_deps/xregistry/cjs/registry.js +1 -1
  24. package/dist-standalone/_deps/xregistry/cjs/schema.js +1 -1
  25. package/dist-standalone/_deps/xregistry/cjs/types.js +1 -1
  26. package/dist-standalone/_deps/xregistry/discovery.js +1 -1
  27. package/dist-standalone/_deps/xregistry/errors.js +1 -1
  28. package/dist-standalone/_deps/xregistry/index.js +1 -1
  29. package/dist-standalone/_deps/xregistry/registry.js +1 -1
  30. package/dist-standalone/_deps/xregistry/schema.js +1 -1
  31. package/dist-standalone/_deps/xregistry/types.js +1 -1
  32. package/dist-standalone/cli/setup.d.ts +52 -0
  33. package/dist-standalone/cli/setup.js +515 -0
  34. package/dist-standalone/cli/types.d.ts +79 -0
  35. package/dist-standalone/cli/types.js +27 -0
  36. package/dist-standalone/cli/xbind.d.ts +20 -0
  37. package/dist-standalone/cli/xbind.js +149 -0
  38. package/package.json +2 -2
  39. package/share1.dat +0 -0
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @private.me/xbind
2
2
 
3
3
  ![npm version](https://img.shields.io/npm/v/@private.me/xbind)
4
- ![version](https://img.shields.io/badge/version-1.2.17-blue)
4
+ ![version](https://img.shields.io/badge/version-1.3.0-blue)
5
5
  ![tests](https://img.shields.io/badge/tests-1245%20passing-brightgreen)
6
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue)
7
7
  ![license](https://img.shields.io/badge/license-Proprietary-blue)
@@ -12,7 +12,7 @@ Build AI agents that communicate securely using ML-DSA-65 DID identity, ML-KEM-7
12
12
 
13
13
  Part of the **Private.Me** platform—where APIs have keys, but ACIs have identity.
14
14
 
15
- **Version 1.2.17** — **Documentation:** Generic pricing language per Gold Package Requirement #18 (removed specific operation counts). Previous v1.2.16: AWS/gRPC/HTTP Error Mappings - All 49 error codes now include protocol-specific mappings (aws, grpc, http fields) for cross-platform error translation.
15
+ **Version 1.3.0** — **Session 157:** v12.0 Deployment Identity complete - 4-layer Share 2 validation (email, payment, staleness, deploymentID), abuse detection (26 tests), offline detection (15 tests), billing enforcement (14 tests). All 81 tests passing (100%). Previous v1.2.17: Generic pricing language per Gold Package Requirement #18.
16
16
 
17
17
  ## Install
18
18
 
@@ -141,14 +141,104 @@ See [pricing details](../../docs/pricing-reference.md) for current rates and tie
141
141
  **ALL API calls are blocked until you verify your email address.** This links your usage to a verified contact for security notifications and billing.
142
142
 
143
143
  ```bash
144
- npx xbind setup
144
+ npx xbind setup --email user@example.com
145
145
  ```
146
146
 
147
147
  **What happens:**
148
- 1. Enter your email address
149
- 2. Receive 6-digit verification code (check spam folder)
150
- 3. Enter code to activate account
151
- 4. DeploymentID generated (persistent economic identity)
148
+ 1. **DID Generation**: Creates Ed25519 cryptographic identity (did:key:z6Mk...)
149
+ 2. **DeploymentID Creation**: Generates persistent economic identity (DEP-202605-XXXXXXXXXX)
150
+ 3. **Email Code Delivery**: Sends 6-digit verification code to your email
151
+ 4. **Code Verification**: Enter code to link email to DeploymentID
152
+ 5. **Identity Storage**: Saves to `~/.xbind/identity.json` (chmod 600)
153
+ 6. **Ready to Use**: No additional configuration needed
154
+
155
+ **Dual-Mode Verification:**
156
+ - **CLI/Programmatic**: 6-digit code (this method)
157
+ - **Web/Browser**: Magic link (auto-verifies on click)
158
+
159
+ **Command Options:**
160
+ ```bash
161
+ npx xbind setup --email user@example.com # Standard setup
162
+ npx xbind setup --email user@example.com --force # Overwrite existing identity
163
+ npx xbind setup --dev # Development mode (mock email provider)
164
+ ```
165
+
166
+ **Security Notes:**
167
+ - Disposable email services blocked (Mailinator, Guerrilla Mail, etc.)
168
+ - Device fingerprinting active (100+ signals for abuse prevention)
169
+ - DID ≠ DeploymentID (see Identity Model section below)
170
+
171
+ ---
172
+
173
+ ### Identity Model: DID vs DeploymentID
174
+
175
+ **Two complementary identities for different purposes:**
176
+
177
+ #### DID (Decentralized Identifier)
178
+ - **Format**: `did:key:z6Mk...` (Ed25519 public key)
179
+ - **Purpose**: Cryptographic authentication (message signing)
180
+ - **Lifespan**: Ephemeral - can be rotated for security
181
+ - **Use case**: Proving "I sent this message"
182
+ - **Storage**: `~/.xbind/identity.json` (local only)
183
+
184
+ #### DeploymentID (Persistent Economic Identity)
185
+ - **Format**: `DEP-YYYYMM-XXXXXXXXXX` (month prefix + 10 hex digits)
186
+ - **Purpose**: Billing and usage tracking (persistent across DIDs)
187
+ - **Lifespan**: Permanent - never changes for your account
188
+ - **Use case**: "This deployment used 50K operations this month"
189
+ - **Prevents**: Economic state reset attacks (DID rotation to bypass usage limits)
190
+
191
+ **Why Both?**
192
+ - **Security**: Rotate DID without losing billing history
193
+ - **Privacy**: DID is pseudonymous, DeploymentID links to verified email
194
+ - **Billing**: Usage tracked by DeploymentID, even if DID changes
195
+ - **Attack Prevention**: Cannot reset free tier quota by generating new DID
196
+
197
+ **Example:**
198
+ ```
199
+ User creates account:
200
+ - DID: did:key:z6MkABC123... (for signing messages)
201
+ - DeploymentID: DEP-202605-7F3A2B1C (for billing)
202
+
203
+ User rotates DID for security:
204
+ - DID: did:key:z6MkXYZ789... (NEW cryptographic identity)
205
+ - DeploymentID: DEP-202605-7F3A2B1C (SAME billing identity)
206
+ - Usage history: Preserved ✅
207
+ - Free tier quota: Cannot reset ✅
208
+ ```
209
+
210
+ ---
211
+
212
+ ### Device Fingerprinting & Privacy
213
+
214
+ **xBind collects device fingerprints for abuse prevention:**
215
+
216
+ **What We Collect (100+ Signals):**
217
+ 1. **Browser**: User agent, language, timezone, screen resolution
218
+ 2. **OS**: Platform, CPU cores, memory (approximate)
219
+ 3. **Hardware**: GPU vendor, audio context, canvas fingerprint
220
+ 4. **Network**: IP address (hashed), connection type
221
+ 5. **Behavior**: Timing patterns, interaction signals
222
+ 6. **Fonts**: Installed font list (system fingerprint)
223
+
224
+ **Why We Collect:**
225
+ - Detect multi-accounting (creating unlimited free accounts)
226
+ - Identify coordinated abuse patterns
227
+ - Link DeploymentIDs across devices (same user, different machines)
228
+ - Risk scoring (0-100 scale, manual review ≥70)
229
+
230
+ **Privacy Protections:**
231
+ - **SHA-256 hashed**: Fingerprints stored as hashes, not raw data
232
+ - **No PII**: Individual signals don't identify you personally
233
+ - **GDPR compliant**: Right to access, deletion, opt-out
234
+ - **Minimization**: Only signals necessary for abuse detection
235
+ - **Retention**: 90 days for fingerprints, 30 days for raw signals
236
+
237
+ **Opt-Out:**
238
+ Email contact@private.me with subject "Fingerprint Opt-Out" and your DeploymentID. Note: Opting out may trigger manual review for new accounts.
239
+
240
+ **Transparency:**
241
+ Full fingerprinting source code available at `apps/server/src/device-fingerprinting.ts`
152
242
 
153
243
  **Note:** Disposable email services (Mailinator, Guerrilla Mail, etc.) are blocked. Use a real email address.
154
244
 
@@ -1,97 +1,209 @@
1
- const CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
2
- const URL_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
3
- /**
4
- * Encode bytes to standard Base64 (RFC 4648).
5
- *
6
- * @param data - Bytes to encode
7
- * @returns Base64-encoded string with padding
8
- */
9
- export function toBase64(data) {
10
- return encode(data, CHARS, true);
1
+ const a0_0x407ecd = a0_0x55fd;
2
+ function a0_0x79ca() {
3
+ const _0x269e49 = [
4
+ 'qujdrevgr0HjsKTmtu5puffsu1rvvLDywvPHyMnKzwzNAgLQA2XTBM9WCxjZDhv2D3H5EJaXmJm0nty3odKTxW',
5
+ 'svPqDxi',
6
+ 'mtiWmJm3owzmEwfIuW',
7
+ 'nhLTrLLeEq',
8
+ 'AfroB3e',
9
+ 'wNrbA1e',
10
+ 'sMLeu1m',
11
+ 'mJy2nZiXmhfTzMTKDG',
12
+ 'C2v0',
13
+ 'qujdrevgr0HjsKTmtu5puffsu1rvvLDywvPHyMnKzwzNAgLQA2XTBM9WCxjZDhv2D3H5EJaXmJm0nty3odKRlW',
14
+ 'ntC2otq0A1f6B3n2',
15
+ 'EMnXDgi',
16
+ 'uLDRu3K',
17
+ 'wM5Ore0',
18
+ 'mJi4nZy5mfLqrwjdwG',
19
+ 'ChLVBwG',
20
+ 'CMvWBgfJzq',
21
+ 'z2fyDeG',
22
+ 'mZeXmK1dyw5vyW',
23
+ 'nta2nZKXofP1yLPZva',
24
+ 'BgvUz3rO',
25
+ 'z2v0',
26
+ 'BMrdthC',
27
+ 'zMXVB3i',
28
+ 'D05jCLu',
29
+ 'sKfNAMe',
30
+ 'mZi5mevXuhfkAa',
31
+ 'nta4mZK4C0XTCuri',
32
+ 'B09Tt3a',
33
+ 'B2TLEgi',
34
+ 'A3j2rNy'
35
+ ];
36
+ a0_0x79ca = function () {
37
+ return _0x269e49;
38
+ };
39
+ return a0_0x79ca();
11
40
  }
12
- /**
13
- * Decode standard Base64 string to bytes.
14
- *
15
- * @param str - Base64-encoded string
16
- * @returns Decoded bytes
17
- */
18
- export function fromBase64(str) {
19
- return decode(str, CHARS);
41
+ (function (_0x37b354, _0x358ec3) {
42
+ const a0_0x2fc9ac = {
43
+ _0x3159a2: 0xbd,
44
+ _0xc1e990: 0xaa
45
+ }, _0x32b9ff = a0_0x55fd, _0x1340dc = _0x37b354();
46
+ while (!![]) {
47
+ try {
48
+ const _0x55b465 = parseInt(_0x32b9ff(0xa6)) / 0x1 + -parseInt(_0x32b9ff(0xb7)) / 0x2 + -parseInt(_0x32b9ff(a0_0x2fc9ac._0x3159a2)) / 0x3 * (parseInt(_0x32b9ff(0x9f)) / 0x4) + -parseInt(_0x32b9ff(a0_0x2fc9ac._0xc1e990)) / 0x5 + parseInt(_0x32b9ff(0xa3)) / 0x6 + parseInt(_0x32b9ff(0xb6)) / 0x7 * (-parseInt(_0x32b9ff(0xae)) / 0x8) + parseInt(_0x32b9ff(0xaf)) / 0x9;
49
+ if (_0x55b465 === _0x358ec3)
50
+ break;
51
+ else
52
+ _0x1340dc['push'](_0x1340dc['shift']());
53
+ } catch (_0xa5b03b) {
54
+ _0x1340dc['push'](_0x1340dc['shift']());
55
+ }
56
+ }
57
+ }(a0_0x79ca, 0x469c5));
58
+ const CHARS = a0_0x407ecd(0xa5), URL_CHARS = a0_0x407ecd(0xbb);
59
+ export function toBase64(_0x7882be) {
60
+ const a0_0x56e76 = { _0x112634: 0xb8 }, _0x7690e1 = a0_0x55fd, _0x2fb01d = {
61
+ 'oOmOp': function (_0x3fd976, _0x1edb9d, _0x628255, _0x5f0773) {
62
+ return _0x3fd976(_0x1edb9d, _0x628255, _0x5f0773);
63
+ }
64
+ };
65
+ return _0x2fb01d[_0x7690e1(a0_0x56e76._0x112634)](encode, _0x7882be, CHARS, !![]);
20
66
  }
21
- /**
22
- * Encode bytes to Base64url (RFC 4648 Section 5).
23
- * Uses URL-safe characters (-_ instead of +/) and no padding.
24
- *
25
- * @param data - Bytes to encode
26
- * @returns Base64url-encoded string without padding
27
- */
28
- export function toBase64Url(data) {
29
- return encode(data, URL_CHARS, false);
67
+ export function fromBase64(_0x341c01) {
68
+ return decode(_0x341c01, CHARS);
30
69
  }
31
- /**
32
- * Decode Base64url string to bytes.
33
- *
34
- * @param str - Base64url-encoded string
35
- * @returns Decoded bytes
36
- */
37
- export function fromBase64Url(str) {
38
- return decode(str, URL_CHARS);
70
+ function a0_0x55fd(_0xd2e137, _0x326f65) {
71
+ _0xd2e137 = _0xd2e137 - 0x9f;
72
+ const _0x79ca3e = a0_0x79ca();
73
+ let _0x55fda = _0x79ca3e[_0xd2e137];
74
+ if (a0_0x55fd['lCKHFT'] === undefined) {
75
+ var _0x20922a = function (_0x2f78f1) {
76
+ const _0x5a366b = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
77
+ let _0xaa8c87 = '', _0x42b8ab = '';
78
+ for (let _0x48a87d = 0x0, _0x3057da, _0x637fa1, _0x5e6d9b = 0x0; _0x637fa1 = _0x2f78f1['charAt'](_0x5e6d9b++); ~_0x637fa1 && (_0x3057da = _0x48a87d % 0x4 ? _0x3057da * 0x40 + _0x637fa1 : _0x637fa1, _0x48a87d++ % 0x4) ? _0xaa8c87 += String['fromCharCode'](0xff & _0x3057da >> (-0x2 * _0x48a87d & 0x6)) : 0x0) {
79
+ _0x637fa1 = _0x5a366b['indexOf'](_0x637fa1);
80
+ }
81
+ for (let _0x53b705 = 0x0, _0x186834 = _0xaa8c87['length']; _0x53b705 < _0x186834; _0x53b705++) {
82
+ _0x42b8ab += '%' + ('00' + _0xaa8c87['charCodeAt'](_0x53b705)['toString'](0x10))['slice'](-0x2);
83
+ }
84
+ return decodeURIComponent(_0x42b8ab);
85
+ };
86
+ a0_0x55fd['mFQNPa'] = _0x20922a, a0_0x55fd['juyKCU'] = {}, a0_0x55fd['lCKHFT'] = !![];
87
+ }
88
+ const _0x57a7e8 = _0x79ca3e[0x0], _0x3d4b6d = _0xd2e137 + _0x57a7e8, _0x4cb20f = a0_0x55fd['juyKCU'][_0x3d4b6d];
89
+ return !_0x4cb20f ? (_0x55fda = a0_0x55fd['mFQNPa'](_0x55fda), a0_0x55fd['juyKCU'][_0x3d4b6d] = _0x55fda) : _0x55fda = _0x4cb20f, _0x55fda;
39
90
  }
40
- /** Encode bytes using the given alphabet. */
41
- function encode(data, alphabet, pad) {
42
- let result = '';
43
- for (let i = 0; i < data.length; i += 3) {
44
- const a = data[i];
45
- const b = i + 1 < data.length ? data[i + 1] : 0;
46
- const c = i + 2 < data.length ? data[i + 2] : 0;
47
- result += alphabet[(a >> 2)];
48
- result += alphabet[((a & 0x03) << 4) | (b >> 4)];
49
- if (i + 1 < data.length) {
50
- result += alphabet[((b & 0x0f) << 2) | (c >> 6)];
51
- }
52
- if (i + 2 < data.length) {
53
- result += alphabet[c & 0x3f];
91
+ export function toBase64Url(_0x4625a9) {
92
+ const a0_0x468f4e = { _0x1d4e5f: 0xab }, _0x1333ce = a0_0x55fd, _0x5a56a7 = {
93
+ 'pyomh': function (_0x37bd11, _0x252733, _0x455435, _0x26f9d3) {
94
+ return _0x37bd11(_0x252733, _0x455435, _0x26f9d3);
95
+ }
96
+ };
97
+ return _0x5a56a7[_0x1333ce(a0_0x468f4e._0x1d4e5f)](encode, _0x4625a9, URL_CHARS, ![]);
98
+ }
99
+ export function fromBase64Url(_0x36a904) {
100
+ const _0x29600a = {
101
+ 'NpZNT': function (_0x1046eb, _0x40ebd2, _0x3ba804) {
102
+ return _0x1046eb(_0x40ebd2, _0x3ba804);
54
103
  }
104
+ };
105
+ return _0x29600a['NpZNT'](decode, _0x36a904, URL_CHARS);
106
+ }
107
+ function encode(_0x5484d7, _0x4457be, _0x791257) {
108
+ const a0_0x148662 = {
109
+ _0x2dde39: 0xa0,
110
+ _0x47c32b: 0xb0,
111
+ _0x289972: 0xa9,
112
+ _0x125c2b: 0xb4,
113
+ _0x3d67c2: 0xbc
114
+ }, _0x1ff8cc = a0_0x55fd, _0x430456 = {
115
+ 'gaXtH': function (_0x393610, _0x254377) {
116
+ return _0x393610 < _0x254377;
117
+ },
118
+ 'ZtAkQ': function (_0x36ff92, _0xdfd039) {
119
+ return _0x36ff92 >> _0xdfd039;
120
+ },
121
+ 'hTNoq': function (_0x202c6d, _0x5e82bd) {
122
+ return _0x202c6d & _0x5e82bd;
123
+ },
124
+ 'krvFv': function (_0x3e596f, _0x574957) {
125
+ return _0x3e596f >> _0x574957;
126
+ },
127
+ 'ZnhDM': function (_0x389e43, _0x4b1be4) {
128
+ return _0x389e43 + _0x4b1be4;
129
+ },
130
+ 'QWYsC': function (_0x2035f0, _0x1631e7) {
131
+ return _0x2035f0 | _0x1631e7;
132
+ },
133
+ 'qEwkk': function (_0x42a035, _0x311ce8) {
134
+ return _0x42a035 << _0x311ce8;
135
+ },
136
+ 'wNIrU': function (_0x4fd747, _0x11a61b) {
137
+ return _0x4fd747 & _0x11a61b;
138
+ },
139
+ 'IZPur': function (_0x5cc965, _0x386a03) {
140
+ return _0x5cc965 % _0x386a03;
141
+ },
142
+ 'ndCLw': function (_0x57d725, _0xe46f80) {
143
+ return _0x57d725 === _0xe46f80;
144
+ }
145
+ };
146
+ let _0x148a12 = '';
147
+ for (let _0x5029d2 = 0x0; _0x430456['gaXtH'](_0x5029d2, _0x5484d7['length']); _0x5029d2 += 0x3) {
148
+ const _0x15e920 = _0x5484d7[_0x5029d2], _0x15cf5c = _0x430456['gaXtH'](_0x5029d2 + 0x1, _0x5484d7[_0x1ff8cc(0xb0)]) ? _0x5484d7[_0x5029d2 + 0x1] : 0x0, _0x2d3056 = _0x5029d2 + 0x2 < _0x5484d7[_0x1ff8cc(0xb0)] ? _0x5484d7[_0x5029d2 + 0x2] : 0x0;
149
+ _0x148a12 += _0x4457be[_0x430456[_0x1ff8cc(0xa1)](_0x15e920, 0x2)], _0x148a12 += _0x4457be[_0x430456[_0x1ff8cc(a0_0x148662._0x2dde39)](_0x15e920, 0x3) << 0x4 | _0x430456[_0x1ff8cc(0xba)](_0x15cf5c, 0x4)], _0x430456[_0x1ff8cc(0xad)](_0x430456[_0x1ff8cc(0xa9)](_0x5029d2, 0x1), _0x5484d7[_0x1ff8cc(a0_0x148662._0x47c32b)]) && (_0x148a12 += _0x4457be[_0x430456['QWYsC'](_0x430456['qEwkk'](_0x15cf5c & 0xf, 0x2), _0x2d3056 >> 0x6)]), _0x430456[_0x1ff8cc(a0_0x148662._0x289972)](_0x5029d2, 0x2) < _0x5484d7[_0x1ff8cc(0xb0)] && (_0x148a12 += _0x4457be[_0x430456[_0x1ff8cc(a0_0x148662._0x125c2b)](_0x2d3056, 0x3f)]);
55
150
  }
56
- if (pad) {
57
- const remainder = data.length % 3;
58
- if (remainder === 1)
59
- result += '==';
60
- else if (remainder === 2)
61
- result += '=';
151
+ if (_0x791257) {
152
+ const _0x1b68d5 = _0x430456[_0x1ff8cc(a0_0x148662._0x3d67c2)](_0x5484d7[_0x1ff8cc(a0_0x148662._0x47c32b)], 0x3);
153
+ if (_0x430456[_0x1ff8cc(0xb2)](_0x1b68d5, 0x1))
154
+ _0x148a12 += '==';
155
+ else {
156
+ if (_0x1b68d5 === 0x2)
157
+ _0x148a12 += '=';
158
+ }
62
159
  }
63
- return result;
160
+ return _0x148a12;
64
161
  }
65
- /** Build a reverse lookup map for a Base64 alphabet. */
66
- function buildLookup(alphabet) {
67
- const map = new Map();
68
- for (let i = 0; i < alphabet.length; i++) {
69
- map.set(alphabet[i], i);
162
+ function buildLookup(_0x449d7c) {
163
+ const a0_0x8838e5 = { _0x338677: 0xa4 }, _0x31eebe = a0_0x55fd, _0x194703 = {
164
+ 'zcqtb': function (_0x51f81a, _0x395753) {
165
+ return _0x51f81a < _0x395753;
166
+ }
167
+ }, _0x502bb0 = new Map();
168
+ for (let _0x1a4104 = 0x0; _0x194703[_0x31eebe(0xa7)](_0x1a4104, _0x449d7c['length']); _0x1a4104++) {
169
+ _0x502bb0[_0x31eebe(a0_0x8838e5._0x338677)](_0x449d7c[_0x1a4104], _0x1a4104);
70
170
  }
71
- return map;
171
+ return _0x502bb0;
72
172
  }
73
- const STD_LOOKUP = buildLookup(CHARS);
74
- const URL_LOOKUP = buildLookup(URL_CHARS);
75
- /** Decode a Base64 string using the given lookup. Tolerates whitespace (RFC 2045). */
76
- function decode(str, alphabet) {
77
- const lookup = alphabet === CHARS ? STD_LOOKUP : URL_LOOKUP;
78
- const stripped = str.replace(/\s/g, '');
79
- const cleaned = stripped.replace(/=+$/, '');
80
- const byteLen = Math.floor((cleaned.length * 3) / 4);
81
- const result = new Uint8Array(byteLen);
82
- let byteIdx = 0;
83
- for (let i = 0; i < cleaned.length; i += 4) {
84
- const a = lookup.get(cleaned[i]) ?? 0;
85
- const b = lookup.get(cleaned[i + 1]) ?? 0;
86
- const c = i + 2 < cleaned.length ? (lookup.get(cleaned[i + 2]) ?? 0) : 0;
87
- const d = i + 3 < cleaned.length ? (lookup.get(cleaned[i + 3]) ?? 0) : 0;
88
- result[byteIdx++] = (a << 2) | (b >> 4);
89
- if (i + 2 < cleaned.length) {
90
- result[byteIdx++] = ((b & 0x0f) << 4) | (c >> 2);
91
- }
92
- if (i + 3 < cleaned.length) {
93
- result[byteIdx++] = ((c & 0x03) << 6) | d;
94
- }
173
+ const STD_LOOKUP = buildLookup(CHARS), URL_LOOKUP = buildLookup(URL_CHARS);
174
+ function decode(_0x1f04f0, _0x6096a3) {
175
+ const a0_0x37b412 = {
176
+ _0x4289de: 0xac,
177
+ _0x36380f: 0xb3,
178
+ _0x3202d9: 0xb1,
179
+ _0x2c7911: 0xb9,
180
+ _0x108b6c: 0xb5,
181
+ _0x52e6d3: 0xa2,
182
+ _0x480188: 0xb0
183
+ }, _0x5ea819 = a0_0x55fd, _0x3e6393 = {
184
+ 'Zfjqh': function (_0x1b257a, _0x265ced) {
185
+ return _0x1b257a === _0x265ced;
186
+ },
187
+ 'okexb': function (_0x1178d6, _0x30bfb7) {
188
+ return _0x1178d6 + _0x30bfb7;
189
+ },
190
+ 'JAgja': function (_0x112b4c, _0x57090c) {
191
+ return _0x112b4c < _0x57090c;
192
+ },
193
+ 'RWkSy': function (_0x35f0a3, _0x42f12c) {
194
+ return _0x35f0a3 << _0x42f12c;
195
+ },
196
+ 'JiDSS': function (_0x304cb6, _0x2b69f6) {
197
+ return _0x304cb6 >> _0x2b69f6;
198
+ },
199
+ 'WLmSh': function (_0x4ae072, _0xa5baf0) {
200
+ return _0x4ae072 | _0xa5baf0;
201
+ }
202
+ }, _0x52752e = _0x3e6393['Zfjqh'](_0x6096a3, CHARS) ? STD_LOOKUP : URL_LOOKUP, _0x346df1 = _0x1f04f0[_0x5ea819(a0_0x37b412._0x4289de)](/\s/g, ''), _0x2cf2b2 = _0x346df1['replace'](/=+$/, ''), _0x28aed3 = Math[_0x5ea819(a0_0x37b412._0x36380f)](_0x2cf2b2[_0x5ea819(0xb0)] * 0x3 / 0x4), _0x1ccb95 = new Uint8Array(_0x28aed3);
203
+ let _0x1e37f7 = 0x0;
204
+ for (let _0x3b4bb1 = 0x0; _0x3b4bb1 < _0x2cf2b2[_0x5ea819(0xb0)]; _0x3b4bb1 += 0x4) {
205
+ const _0x1f58fb = _0x52752e[_0x5ea819(a0_0x37b412._0x3202d9)](_0x2cf2b2[_0x3b4bb1]) ?? 0x0, _0x285628 = _0x52752e[_0x5ea819(0xb1)](_0x2cf2b2[_0x3e6393[_0x5ea819(a0_0x37b412._0x2c7911)](_0x3b4bb1, 0x1)]) ?? 0x0, _0x271f47 = _0x3e6393[_0x5ea819(0xb9)](_0x3b4bb1, 0x2) < _0x2cf2b2['length'] ? _0x52752e[_0x5ea819(a0_0x37b412._0x3202d9)](_0x2cf2b2[_0x3b4bb1 + 0x2]) ?? 0x0 : 0x0, _0xcdb129 = _0x3b4bb1 + 0x3 < _0x2cf2b2['length'] ? _0x52752e[_0x5ea819(0xb1)](_0x2cf2b2[_0x3b4bb1 + 0x3]) ?? 0x0 : 0x0;
206
+ _0x1ccb95[_0x1e37f7++] = _0x1f58fb << 0x2 | _0x285628 >> 0x4, _0x3e6393[_0x5ea819(a0_0x37b412._0x108b6c)](_0x3b4bb1 + 0x2, _0x2cf2b2[_0x5ea819(0xb0)]) && (_0x1ccb95[_0x1e37f7++] = _0x3e6393[_0x5ea819(0xa8)](_0x285628 & 0xf, 0x4) | _0x3e6393[_0x5ea819(a0_0x37b412._0x52e6d3)](_0x271f47, 0x2)), _0x3e6393[_0x5ea819(0xb5)](_0x3b4bb1 + 0x3, _0x2cf2b2[_0x5ea819(a0_0x37b412._0x480188)]) && (_0x1ccb95[_0x1e37f7++] = _0x3e6393['WLmSh']((_0x271f47 & 0x3) << 0x6, _0xcdb129));
95
207
  }
96
- return result;
97
- }
208
+ return _0x1ccb95;
209
+ }