@private.me/xbind 1.3.0 → 2.3.4
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.
- package/LICENSES.md +212 -0
- package/README.md +388 -6
- package/dist-standalone/_deps/mldsa-wasm/dist/mldsa.js +1 -1920
- package/dist-standalone/_deps/shared/cjs/errors.js +1 -275
- package/dist-standalone/_deps/shared/cjs/index.js +1 -138
- package/dist-standalone/_deps/shared/cjs/types.js +1 -90
- package/dist-standalone/_deps/shared/errors.js +1 -262
- package/dist-standalone/_deps/shared/index.js +1 -77
- package/dist-standalone/_deps/shared/types.js +1 -91
- package/dist-standalone/_deps/ux-helpers/cjs/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/index.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/types.js +1 -1
- package/dist-standalone/_deps/ux-helpers/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/index.js +1 -1
- package/dist-standalone/_deps/ux-helpers/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/search.js +1 -1
- package/dist-standalone/_deps/xchange/auto-accept.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/auto-accept.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/index.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/invite-client.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/lazy-init.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/trust-integration.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/xchange.js +1 -1
- package/dist-standalone/_deps/xchange/errors.js +1 -1
- package/dist-standalone/_deps/xchange/index.js +1 -1
- package/dist-standalone/_deps/xchange/invite-client.js +1 -1
- package/dist-standalone/_deps/xchange/lazy-init.js +1 -1
- package/dist-standalone/_deps/xchange/trust-integration.js +1 -1
- package/dist-standalone/_deps/xchange/xchange.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/index.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/types.js +1 -1
- package/dist-standalone/_deps/xregistry/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/index.js +1 -1
- package/dist-standalone/_deps/xregistry/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/types.js +1 -1
- package/dist-standalone/agent-call.js +1 -642
- package/dist-standalone/agent-sdk.js +1 -328
- package/dist-standalone/agent.d.ts +95 -5
- package/dist-standalone/agent.js +1 -1545
- package/dist-standalone/approval.js +1 -193
- package/dist-standalone/async-iterators.d.ts +275 -0
- package/dist-standalone/async-iterators.js +1 -0
- package/dist-standalone/auth.js +1 -219
- package/dist-standalone/auto-accept.js +1 -229
- package/dist-standalone/backup-config.js +1 -201
- package/dist-standalone/backup.d.ts +114 -0
- package/dist-standalone/backup.js +1 -0
- package/dist-standalone/batch-operations.d.ts +297 -0
- package/dist-standalone/batch-operations.js +1 -0
- package/dist-standalone/cancellation.d.ts +301 -0
- package/dist-standalone/cancellation.js +1 -0
- package/dist-standalone/checkpoint.js +1 -186
- package/dist-standalone/circuit-breaker.d.ts +351 -0
- package/dist-standalone/circuit-breaker.js +1 -0
- package/dist-standalone/cjs/agent-call.js +1 -651
- package/dist-standalone/cjs/agent-sdk.js +1 -332
- package/dist-standalone/cjs/agent.js +1 -1582
- package/dist-standalone/cjs/approval.js +1 -199
- package/dist-standalone/cjs/async-iterators.js +1 -0
- package/dist-standalone/cjs/auth.js +1 -225
- package/dist-standalone/cjs/auto-accept.js +1 -233
- package/dist-standalone/cjs/backup-config.js +1 -207
- package/dist-standalone/cjs/backup.js +1 -0
- package/dist-standalone/cjs/batch-operations.js +1 -0
- package/dist-standalone/cjs/cancellation.js +1 -0
- package/dist-standalone/cjs/checkpoint.js +1 -193
- package/dist-standalone/cjs/circuit-breaker.js +1 -0
- package/dist-standalone/cjs/cli/init.js +1 -486
- package/dist-standalone/cjs/config-validation.js +1 -0
- package/dist-standalone/cjs/connect.js +1 -312
- package/dist-standalone/cjs/connection-pool.js +1 -0
- package/dist-standalone/cjs/correlation-id.js +1 -339
- package/dist-standalone/cjs/crypto-utils.js +1 -0
- package/dist-standalone/cjs/debug-mode.js +1 -0
- package/dist-standalone/cjs/did-document.js +1 -101
- package/dist-standalone/cjs/did-privateme.js +1 -130
- package/dist-standalone/cjs/did-web.js +1 -201
- package/dist-standalone/cjs/discovery.js +1 -462
- package/dist-standalone/cjs/dual-mode.js +1 -251
- package/dist-standalone/cjs/email-templates.js +1 -313
- package/dist-standalone/cjs/email-transport.js +1 -239
- package/dist-standalone/cjs/envelope.js +1 -510
- package/dist-standalone/cjs/errors.js +1 -826
- package/dist-standalone/cjs/event-emitter.js +1 -0
- package/dist-standalone/cjs/gateway-state.js +1 -55
- package/dist-standalone/cjs/gateway-transport.js +1 -120
- package/dist-standalone/cjs/graceful-degradation.js +1 -0
- package/dist-standalone/cjs/guardrails.js +1 -223
- package/dist-standalone/cjs/health-check.js +1 -0
- package/dist-standalone/cjs/http-compat.js +1 -272
- package/dist-standalone/cjs/http-status-map.js +1 -571
- package/dist-standalone/cjs/identity.js +1 -541
- package/dist-standalone/cjs/index.js +1 -237
- package/dist-standalone/cjs/invitation.js +1 -421
- package/dist-standalone/cjs/invite.js +1 -328
- package/dist-standalone/cjs/key-agreement.js +1 -246
- package/dist-standalone/cjs/lazy-init.js +1 -300
- package/dist-standalone/cjs/logger.js +1 -0
- package/dist-standalone/cjs/mdns-discovery.js +1 -202
- package/dist-standalone/cjs/nonce-store.js +1 -66
- package/dist-standalone/cjs/pairing-manager.js +1 -223
- package/dist-standalone/cjs/plugin-system.js +1 -0
- package/dist-standalone/cjs/plugins/logging.js +1 -0
- package/dist-standalone/cjs/plugins/metrics.js +1 -0
- package/dist-standalone/cjs/plugins/validation.js +1 -0
- package/dist-standalone/cjs/policy.js +1 -320
- package/dist-standalone/cjs/progress-callbacks.js +1 -0
- package/dist-standalone/cjs/redis-nonce-store.js +1 -76
- package/dist-standalone/cjs/registry-middleware.js +1 -50
- package/dist-standalone/cjs/retry-strategies.js +1 -0
- package/dist-standalone/cjs/retry-transport.js +1 -102
- package/dist-standalone/cjs/runtime/browser.js +1 -0
- package/dist-standalone/cjs/runtime/edge.js +1 -0
- package/dist-standalone/cjs/runtime/react-native.js +1 -0
- package/dist-standalone/cjs/security-policy.js +1 -245
- package/dist-standalone/cjs/serialization.js +1 -0
- package/dist-standalone/cjs/split-channel.js +1 -177
- package/dist-standalone/cjs/subscription-proof.js +1 -230
- package/dist-standalone/cjs/succession.js +1 -148
- package/dist-standalone/cjs/timeouts.js +1 -0
- package/dist-standalone/cjs/trace-context.js +1 -0
- package/dist-standalone/cjs/trace-spans.js +1 -0
- package/dist-standalone/cjs/transport.js +1 -63
- package/dist-standalone/cjs/trust-registry.js +1 -742
- package/dist-standalone/cjs/types/error-response.js +1 -56
- package/dist-standalone/cjs/vault-auth.js +1 -0
- package/dist-standalone/cjs/vault-store-loader.js +1 -0
- package/dist-standalone/cjs/verify.js +1 -25
- package/dist-standalone/cjs/version-info.js +1 -0
- package/dist-standalone/cjs/xfetch.js +1 -252
- package/dist-standalone/cli/init.js +1 -449
- package/dist-standalone/cli/setup.js +1 -514
- package/dist-standalone/cli/types.js +1 -27
- package/dist-standalone/cli/xbind.js +1 -148
- package/dist-standalone/config-validation.d.ts +185 -0
- package/dist-standalone/config-validation.js +1 -0
- package/dist-standalone/connect.js +1 -274
- package/dist-standalone/connection-pool.d.ts +251 -0
- package/dist-standalone/connection-pool.js +1 -0
- package/dist-standalone/correlation-id.js +1 -326
- package/dist-standalone/crypto-utils.d.ts +60 -0
- package/dist-standalone/crypto-utils.js +1 -0
- package/dist-standalone/debug-mode.d.ts +286 -0
- package/dist-standalone/debug-mode.js +1 -0
- package/dist-standalone/did-document.js +1 -96
- package/dist-standalone/did-privateme.js +1 -121
- package/dist-standalone/did-web.js +1 -196
- package/dist-standalone/discovery.js +1 -458
- package/dist-standalone/dual-mode.js +1 -247
- package/dist-standalone/email-templates.js +1 -309
- package/dist-standalone/email-transport.js +1 -232
- package/dist-standalone/envelope.d.ts +29 -1
- package/dist-standalone/envelope.js +1 -497
- package/dist-standalone/errors.d.ts +10 -0
- package/dist-standalone/errors.js +1 -811
- package/dist-standalone/event-emitter.d.ts +395 -0
- package/dist-standalone/event-emitter.js +1 -0
- package/dist-standalone/gateway-state.js +1 -51
- package/dist-standalone/gateway-transport.js +1 -116
- package/dist-standalone/graceful-degradation.d.ts +246 -0
- package/dist-standalone/graceful-degradation.js +1 -0
- package/dist-standalone/guardrails.js +1 -216
- package/dist-standalone/health-check.d.ts +150 -0
- package/dist-standalone/health-check.js +1 -0
- package/dist-standalone/http-compat.js +1 -267
- package/dist-standalone/http-status-map.js +1 -561
- package/dist-standalone/identity.d.ts +64 -1
- package/dist-standalone/identity.js +1 -516
- package/dist-standalone/index.d.ts +45 -3
- package/dist-standalone/index.js +1 -52
- package/dist-standalone/invitation.js +1 -415
- package/dist-standalone/invite.js +1 -324
- package/dist-standalone/key-agreement.d.ts +61 -13
- package/dist-standalone/key-agreement.js +1 -236
- package/dist-standalone/lazy-init.js +1 -295
- package/dist-standalone/logger.d.ts +77 -0
- package/dist-standalone/logger.js +1 -0
- package/dist-standalone/mdns-discovery.js +1 -195
- package/dist-standalone/nonce-store.d.ts +16 -3
- package/dist-standalone/nonce-store.js +1 -62
- package/dist-standalone/package.json +0 -1
- package/dist-standalone/pairing-manager.js +1 -219
- package/dist-standalone/plugin-system.d.ts +145 -0
- package/dist-standalone/plugin-system.js +1 -0
- package/dist-standalone/policy.js +1 -315
- package/dist-standalone/progress-callbacks.d.ts +394 -0
- package/dist-standalone/progress-callbacks.js +1 -0
- package/dist-standalone/redis-nonce-store.js +1 -72
- package/dist-standalone/registry-middleware.js +1 -47
- package/dist-standalone/retry-strategies.d.ts +382 -0
- package/dist-standalone/retry-strategies.js +1 -0
- package/dist-standalone/retry-transport.js +1 -98
- package/dist-standalone/security-policy.js +1 -239
- package/dist-standalone/serialization.d.ts +244 -0
- package/dist-standalone/serialization.js +1 -0
- package/dist-standalone/split-channel.d.ts +49 -1
- package/dist-standalone/split-channel.js +1 -171
- package/dist-standalone/subscription-proof.js +1 -224
- package/dist-standalone/succession.js +1 -142
- package/dist-standalone/timeouts.d.ts +275 -0
- package/dist-standalone/timeouts.js +1 -0
- package/dist-standalone/trace-context.d.ts +252 -0
- package/dist-standalone/trace-context.js +1 -0
- package/dist-standalone/trace-spans.d.ts +360 -0
- package/dist-standalone/trace-spans.js +1 -0
- package/dist-standalone/transport.js +1 -59
- package/dist-standalone/trust-registry.d.ts +106 -5
- package/dist-standalone/trust-registry.js +1 -702
- package/dist-standalone/vault-auth.d.ts +91 -0
- package/dist-standalone/vault-auth.js +1 -0
- package/dist-standalone/vault-store-loader.d.ts +110 -0
- package/dist-standalone/vault-store-loader.js +1 -0
- package/dist-standalone/verify.js +1 -16
- package/dist-standalone/version-info.d.ts +259 -0
- package/dist-standalone/version-info.js +1 -0
- package/dist-standalone/xfetch.js +1 -247
- package/llms.txt +1 -0
- package/package.json +66 -5
- package/share1.dat +0 -0
- package/dist-standalone/_deps/crypto/base64.d.ts +0 -29
- package/dist-standalone/_deps/crypto/base64.js +0 -209
- package/dist-standalone/_deps/crypto/cjs/base64.js +0 -103
- package/dist-standalone/_deps/crypto/cjs/errors.js +0 -119
- package/dist-standalone/_deps/crypto/cjs/hmac.js +0 -71
- package/dist-standalone/_deps/crypto/cjs/index.js +0 -86
- package/dist-standalone/_deps/crypto/cjs/padding.js +0 -57
- package/dist-standalone/_deps/crypto/cjs/share-header.js +0 -68
- package/dist-standalone/_deps/crypto/cjs/shares.js +0 -152
- package/dist-standalone/_deps/crypto/cjs/tlv.js +0 -199
- package/dist-standalone/_deps/crypto/cjs/uuid.js +0 -61
- package/dist-standalone/_deps/crypto/cjs/verify.js +0 -24
- package/dist-standalone/_deps/crypto/cjs/xorida.js +0 -221
- package/dist-standalone/_deps/crypto/errors.d.ts +0 -51
- package/dist-standalone/_deps/crypto/errors.js +0 -109
- package/dist-standalone/_deps/crypto/hmac.d.ts +0 -39
- package/dist-standalone/_deps/crypto/hmac.js +0 -66
- package/dist-standalone/_deps/crypto/index.d.ts +0 -20
- package/dist-standalone/_deps/crypto/index.js +0 -45
- package/dist-standalone/_deps/crypto/padding.d.ts +0 -19
- package/dist-standalone/_deps/crypto/padding.js +0 -53
- package/dist-standalone/_deps/crypto/share-header.d.ts +0 -44
- package/dist-standalone/_deps/crypto/share-header.js +0 -63
- package/dist-standalone/_deps/crypto/shares.d.ts +0 -27
- package/dist-standalone/_deps/crypto/shares.js +0 -148
- package/dist-standalone/_deps/crypto/tlv.d.ts +0 -26
- package/dist-standalone/_deps/crypto/tlv.js +0 -195
- package/dist-standalone/_deps/crypto/uuid.d.ts +0 -22
- package/dist-standalone/_deps/crypto/uuid.js +0 -56
- package/dist-standalone/_deps/crypto/verify.d.ts +0 -15
- package/dist-standalone/_deps/crypto/verify.js +0 -15
- package/dist-standalone/_deps/crypto/xorida.d.ts +0 -44
- package/dist-standalone/_deps/crypto/xorida.js +0 -215
- package/dist-standalone/_deps/shared/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/shared/errors.js.map +0 -1
- package/dist-standalone/_deps/shared/index.d.ts.map +0 -1
- package/dist-standalone/_deps/shared/index.js.map +0 -1
- package/dist-standalone/_deps/shared/types.d.ts.map +0 -1
- package/dist-standalone/_deps/shared/types.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/errors.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/index.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/index.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/types.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/types.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/errors.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/index.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/index.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/pagination.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/pagination.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/progress.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/progress.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/search.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/search.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/types.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/types.js.map +0 -1
- package/dist-standalone/_deps/xregistry/discovery.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/discovery.js.map +0 -1
- package/dist-standalone/_deps/xregistry/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/errors.js.map +0 -1
- package/dist-standalone/_deps/xregistry/index.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/index.js.map +0 -1
- package/dist-standalone/_deps/xregistry/registry.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/registry.js.map +0 -1
- package/dist-standalone/_deps/xregistry/schema.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/schema.js.map +0 -1
- package/dist-standalone/_deps/xregistry/types.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/types.js.map +0 -1
|
@@ -1,262 +1 @@
|
|
|
1
|
-
function
|
|
2
|
-
_0x50bf94 = _0x50bf94 - 0x73;
|
|
3
|
-
const _0x42ef01 = a7_0x42ef();
|
|
4
|
-
let _0xf7bea2 = _0x42ef01[_0x50bf94];
|
|
5
|
-
if (a7_0xf7be['bgsuIy'] === undefined) {
|
|
6
|
-
var _0x2902bf = function (_0x13cf28) {
|
|
7
|
-
const _0xdb360 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
8
|
-
let _0x1aee2b = '', _0x3445de = '';
|
|
9
|
-
for (let _0x33a7dc = 0x0, _0x19c175, _0x4e135d, _0x3a62fa = 0x0; _0x4e135d = _0x13cf28['charAt'](_0x3a62fa++); ~_0x4e135d && (_0x19c175 = _0x33a7dc % 0x4 ? _0x19c175 * 0x40 + _0x4e135d : _0x4e135d, _0x33a7dc++ % 0x4) ? _0x1aee2b += String['fromCharCode'](0xff & _0x19c175 >> (-0x2 * _0x33a7dc & 0x6)) : 0x0) {
|
|
10
|
-
_0x4e135d = _0xdb360['indexOf'](_0x4e135d);
|
|
11
|
-
}
|
|
12
|
-
for (let _0x3cef12 = 0x0, _0x5189b4 = _0x1aee2b['length']; _0x3cef12 < _0x5189b4; _0x3cef12++) {
|
|
13
|
-
_0x3445de += '%' + ('00' + _0x1aee2b['charCodeAt'](_0x3cef12)['toString'](0x10))['slice'](-0x2);
|
|
14
|
-
}
|
|
15
|
-
return decodeURIComponent(_0x3445de);
|
|
16
|
-
};
|
|
17
|
-
a7_0xf7be['IGtDid'] = _0x2902bf, a7_0xf7be['edTRCe'] = {}, a7_0xf7be['bgsuIy'] = !![];
|
|
18
|
-
}
|
|
19
|
-
const _0x3b5b11 = _0x42ef01[0x0], _0x396f93 = _0x50bf94 + _0x3b5b11, _0x2bd2d7 = a7_0xf7be['edTRCe'][_0x396f93];
|
|
20
|
-
return !_0x2bd2d7 ? (_0xf7bea2 = a7_0xf7be['IGtDid'](_0xf7bea2), a7_0xf7be['edTRCe'][_0x396f93] = _0xf7bea2) : _0xf7bea2 = _0x2bd2d7, _0xf7bea2;
|
|
21
|
-
}
|
|
22
|
-
const a7_0x524e99 = a7_0xf7be;
|
|
23
|
-
(function (_0xe207c, _0x5d871a) {
|
|
24
|
-
const a7_0x56eacb = {
|
|
25
|
-
_0x5547c8: 0x79,
|
|
26
|
-
_0x12267c: 0x8f,
|
|
27
|
-
_0x3af935: 0x7f,
|
|
28
|
-
_0x2e605c: 0x88
|
|
29
|
-
}, _0x43602b = a7_0xf7be, _0x1a9ce1 = _0xe207c();
|
|
30
|
-
while (!![]) {
|
|
31
|
-
try {
|
|
32
|
-
const _0xf7bb6d = parseInt(_0x43602b(0x93)) / 0x1 * (parseInt(_0x43602b(a7_0x56eacb._0x5547c8)) / 0x2) + -parseInt(_0x43602b(0x7e)) / 0x3 * (parseInt(_0x43602b(a7_0x56eacb._0x12267c)) / 0x4) + parseInt(_0x43602b(0x78)) / 0x5 * (parseInt(_0x43602b(a7_0x56eacb._0x3af935)) / 0x6) + -parseInt(_0x43602b(0x76)) / 0x7 + -parseInt(_0x43602b(a7_0x56eacb._0x2e605c)) / 0x8 + parseInt(_0x43602b(0x74)) / 0x9 + parseInt(_0x43602b(0x96)) / 0xa * (parseInt(_0x43602b(0x9c)) / 0xb);
|
|
33
|
-
if (_0xf7bb6d === _0x5d871a)
|
|
34
|
-
break;
|
|
35
|
-
else
|
|
36
|
-
_0x1a9ce1['push'](_0x1a9ce1['shift']());
|
|
37
|
-
} catch (_0x57e06b) {
|
|
38
|
-
_0x1a9ce1['push'](_0x1a9ce1['shift']());
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}(a7_0x42ef, 0x4aca2));
|
|
42
|
-
const DOC_BASE = a7_0x524e99(0xa7);
|
|
43
|
-
export class SharedError extends Error {
|
|
44
|
-
[a7_0x524e99(0x80)];
|
|
45
|
-
[a7_0x524e99(0x73)];
|
|
46
|
-
[a7_0x524e99(0x90)];
|
|
47
|
-
constructor(_0x423e83, _0x456fe9, _0x8fd2cb) {
|
|
48
|
-
const a7_0x527c33 = {
|
|
49
|
-
_0x106d4f: 0x92,
|
|
50
|
-
_0x2e8319: 0x73,
|
|
51
|
-
_0xa8713e: 0x85,
|
|
52
|
-
_0x577e1d: 0x90
|
|
53
|
-
}, _0x51c5ec = a7_0xf7be, _0x126b07 = {
|
|
54
|
-
'EPndo': _0x51c5ec(a7_0x527c33._0x106d4f),
|
|
55
|
-
'FqOaZ': function (_0x239343, _0x1d961e) {
|
|
56
|
-
return _0x239343 > _0x1d961e;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
super(_0x456fe9), this[_0x51c5ec(0x7a)] = _0x126b07[_0x51c5ec(0x98)];
|
|
60
|
-
const _0x4a4cda = _0x423e83['split'](':');
|
|
61
|
-
this['code'] = _0x4a4cda[0x0] ?? _0x423e83, this[_0x51c5ec(a7_0x527c33._0x2e8319)] = _0x126b07[_0x51c5ec(a7_0x527c33._0xa8713e)](_0x4a4cda['length'], 0x1) ? _0x4a4cda[_0x51c5ec(0x99)](0x1)[_0x51c5ec(0x82)](':') : undefined, this[_0x51c5ec(a7_0x527c33._0x577e1d)] = _0x8fd2cb;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
export class SharedTypeError extends SharedError {
|
|
65
|
-
constructor(_0x2b9e3f, _0x9c1dc9) {
|
|
66
|
-
const _0xdd1952 = a7_0xf7be;
|
|
67
|
-
super(_0x2b9e3f, _0x9c1dc9, DOC_BASE + _0xdd1952(0xa4)), this[_0xdd1952(0x7a)] = _0xdd1952(0x81);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export class SharedResultError extends SharedError {
|
|
71
|
-
constructor(_0xca91b1, _0x280037) {
|
|
72
|
-
const _0x14b0ed = a7_0xf7be, _0x31416e = { 'ADmTv': _0x14b0ed(0x9f) };
|
|
73
|
-
super(_0xca91b1, _0x280037, DOC_BASE + '#result-pattern'), this[_0x14b0ed(0x7a)] = _0x31416e[_0x14b0ed(0x9b)];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export class SharedTlvError extends SharedError {
|
|
77
|
-
constructor(_0x2f9511, _0x2cb8c5) {
|
|
78
|
-
const a7_0x2a5f6a = { _0x26e49d: 0x7b }, _0x2e6938 = a7_0xf7be, _0x4064ec = { 'dNGjc': 'SharedTlvError' };
|
|
79
|
-
super(_0x2f9511, _0x2cb8c5, DOC_BASE + _0x2e6938(0x9a)), this[_0x2e6938(0x7a)] = _0x4064ec[_0x2e6938(a7_0x2a5f6a._0x26e49d)];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
export const ERROR_MESSAGES = {
|
|
83
|
-
'INVALID_PROVIDER': a7_0x524e99(0x89),
|
|
84
|
-
'INVALID_SECURITY_TIER': a7_0x524e99(0x7c),
|
|
85
|
-
'INVALID_CONTENT_TYPE': a7_0x524e99(0x91),
|
|
86
|
-
'INVALID_MESSAGE_TYPE': a7_0x524e99(0xa8),
|
|
87
|
-
'INVALID_TLV_TYPE': a7_0x524e99(0x97),
|
|
88
|
-
'INVALID_RESULT': a7_0x524e99(0x95),
|
|
89
|
-
'MISSING_VALUE': a7_0x524e99(0x9d),
|
|
90
|
-
'MISSING_ERROR': a7_0x524e99(0x87),
|
|
91
|
-
'INVALID_CHANNEL_ADDRESS': 'Channel\x20address\x20is\x20missing\x20required\x20fields',
|
|
92
|
-
'INVALID_CONTACT_INFO': a7_0x524e99(0x8c),
|
|
93
|
-
'INVALID_ATTACHMENT': a7_0x524e99(0x86)
|
|
94
|
-
};
|
|
95
|
-
export const ERROR_DETAILS = {
|
|
96
|
-
'INVALID_PROVIDER': {
|
|
97
|
-
'message': a7_0x524e99(0xa1),
|
|
98
|
-
'aws': 'InvalidParameterValue',
|
|
99
|
-
'grpc': a7_0x524e99(0xa0),
|
|
100
|
-
'http': 0x190,
|
|
101
|
-
'severity': 'high'
|
|
102
|
-
},
|
|
103
|
-
'INVALID_SECURITY_TIER': {
|
|
104
|
-
'message': a7_0x524e99(0x8e),
|
|
105
|
-
'aws': 'InvalidParameterValue',
|
|
106
|
-
'grpc': 'INVALID_ARGUMENT',
|
|
107
|
-
'http': 0x190,
|
|
108
|
-
'severity': a7_0x524e99(0x8d)
|
|
109
|
-
},
|
|
110
|
-
'INVALID_CONTENT_TYPE': {
|
|
111
|
-
'message': 'Content\x20type\x20must\x20be\x20text/plain\x20or\x20text/html\x20for\x20message\x20bodies.',
|
|
112
|
-
'aws': a7_0x524e99(0x84),
|
|
113
|
-
'grpc': 'INVALID_ARGUMENT',
|
|
114
|
-
'http': 0x190,
|
|
115
|
-
'severity': 'medium'
|
|
116
|
-
},
|
|
117
|
-
'INVALID_MESSAGE_TYPE': {
|
|
118
|
-
'message': a7_0x524e99(0x7d),
|
|
119
|
-
'aws': 'InvalidParameterValue',
|
|
120
|
-
'grpc': a7_0x524e99(0xa0),
|
|
121
|
-
'http': 0x190,
|
|
122
|
-
'severity': a7_0x524e99(0xa2)
|
|
123
|
-
},
|
|
124
|
-
'INVALID_TLV_TYPE': {
|
|
125
|
-
'message': a7_0x524e99(0x77),
|
|
126
|
-
'aws': a7_0x524e99(0x84),
|
|
127
|
-
'grpc': a7_0x524e99(0xa0),
|
|
128
|
-
'http': 0x190,
|
|
129
|
-
'severity': a7_0x524e99(0x8d)
|
|
130
|
-
},
|
|
131
|
-
'INVALID_RESULT': {
|
|
132
|
-
'message': 'Result\x20object\x20must\x20have\x20exactly\x20one\x20of:\x20{ok:\x20true,\x20value:\x20T}\x20or\x20{ok:\x20false,\x20error:\x20E}.',
|
|
133
|
-
'aws': 'InvalidParameterValue',
|
|
134
|
-
'grpc': a7_0x524e99(0xa0),
|
|
135
|
-
'http': 0x190,
|
|
136
|
-
'severity': a7_0x524e99(0xa2)
|
|
137
|
-
},
|
|
138
|
-
'MISSING_VALUE': {
|
|
139
|
-
'message': a7_0x524e99(0xa3),
|
|
140
|
-
'aws': 'InvalidParameterValue',
|
|
141
|
-
'grpc': a7_0x524e99(0xa0),
|
|
142
|
-
'http': 0x190,
|
|
143
|
-
'severity': a7_0x524e99(0xa2)
|
|
144
|
-
},
|
|
145
|
-
'MISSING_ERROR': {
|
|
146
|
-
'message': a7_0x524e99(0xa6),
|
|
147
|
-
'aws': 'InvalidParameterValue',
|
|
148
|
-
'grpc': a7_0x524e99(0xa0),
|
|
149
|
-
'http': 0x190,
|
|
150
|
-
'severity': 'high'
|
|
151
|
-
},
|
|
152
|
-
'INVALID_CHANNEL_ADDRESS': {
|
|
153
|
-
'message': a7_0x524e99(0x94),
|
|
154
|
-
'aws': a7_0x524e99(0x84),
|
|
155
|
-
'grpc': a7_0x524e99(0xa0),
|
|
156
|
-
'http': 0x190,
|
|
157
|
-
'severity': 'high'
|
|
158
|
-
},
|
|
159
|
-
'INVALID_CONTACT_INFO': {
|
|
160
|
-
'message': a7_0x524e99(0x83),
|
|
161
|
-
'aws': a7_0x524e99(0x84),
|
|
162
|
-
'grpc': a7_0x524e99(0xa0),
|
|
163
|
-
'http': 0x190,
|
|
164
|
-
'severity': a7_0x524e99(0xa2)
|
|
165
|
-
},
|
|
166
|
-
'INVALID_ATTACHMENT': {
|
|
167
|
-
'message': a7_0x524e99(0x8a),
|
|
168
|
-
'aws': 'InvalidParameterValue',
|
|
169
|
-
'grpc': a7_0x524e99(0xa0),
|
|
170
|
-
'http': 0x190,
|
|
171
|
-
'severity': a7_0x524e99(0x8d)
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
export function toSharedError(_0x595d90) {
|
|
175
|
-
const a7_0x520bbe = {
|
|
176
|
-
_0x2c0390: 0xa5,
|
|
177
|
-
_0x3c4c0e: 0x8b
|
|
178
|
-
}, _0x215f0c = a7_0xf7be, _0x50f2ab = {
|
|
179
|
-
'DyDZo': function (_0x323233, _0x1a1ba7) {
|
|
180
|
-
return _0x323233 instanceof _0x1a1ba7;
|
|
181
|
-
},
|
|
182
|
-
'MMUDa': _0x215f0c(0x9e),
|
|
183
|
-
'UHFmE': function (_0xba7025, _0x463a31) {
|
|
184
|
-
return _0xba7025(_0x463a31);
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
if (_0x50f2ab[_0x215f0c(a7_0x520bbe._0x2c0390)](_0x595d90, SharedError))
|
|
188
|
-
return _0x595d90;
|
|
189
|
-
if (_0x595d90 instanceof Error)
|
|
190
|
-
return new SharedError(_0x50f2ab[_0x215f0c(0x75)], _0x595d90['message']);
|
|
191
|
-
return new SharedError('INVALID_RESULT', _0x50f2ab[_0x215f0c(a7_0x520bbe._0x3c4c0e)](String, _0x595d90));
|
|
192
|
-
}
|
|
193
|
-
function a7_0x42ef() {
|
|
194
|
-
const _0x4884e8 = [
|
|
195
|
-
'sw52ywXPzcbTzxnZywDLihr5CguGkg11C3qGyMuGCMvNDwXHCIbVCIbZzwn1CMuP',
|
|
196
|
-
'C3vIq29Kzq',
|
|
197
|
-
'ndyWmZy3muTovefLua',
|
|
198
|
-
'tu1vrge',
|
|
199
|
-
'mZaZmZK2ofvssefQBG',
|
|
200
|
-
'veXwihr5CguGy29KzsbPCYbUB3qGCMvJB2DUAxPLzc4Gq2HLy2SGveXwx1rzueuGy29UC3rHBNqGzM9YihzHBgLKihzHBhvLCY4',
|
|
201
|
-
'mtm5mtu1mfvTsgzgwa',
|
|
202
|
-
'nZbYA3boBNu',
|
|
203
|
-
'BMfTzq',
|
|
204
|
-
'ze5hAMm',
|
|
205
|
-
'sw52ywXPzcbZzwn1CML0Esb0AwvYicHTDxn0igjLigjSDwuGB3iGz3jLzw4P',
|
|
206
|
-
'twvZC2fNzsb0ExbLig11C3qGyMuGCMvNDwXHCIaODw5Zzwn1CMvKksbVCIbZzwn1CMuGkhnWBgL0lwnOyw5UzwWPlG',
|
|
207
|
-
'mZi2mZC5t0nfz2nt',
|
|
208
|
-
'nLv1BLn1Dq',
|
|
209
|
-
'y29Kzq',
|
|
210
|
-
'u2HHCMvKvhLWzuvYCM9Y',
|
|
211
|
-
'AM9PBG',
|
|
212
|
-
'q29UDgfJDeLUzM8GBxvZDcbOyxzLig5HBwuSignOyw5UzwXZigfYCMf5lcbHBMqGDMfSAwqGC2vJDxjPDhLuAwvYlG',
|
|
213
|
-
'sw52ywXPzfbHCMfTzxrLCLzHBhvL',
|
|
214
|
-
'rNfpyvO',
|
|
215
|
-
'qxr0ywnOBwvUDcbPCYbTAxnZAw5NihjLCxvPCMvKigzPzwXKCW',
|
|
216
|
-
'uMvZDwX0ig1HCMTLzcbHCYbMywLSzwqGyNv0igvYCM9YigLZig1PC3nPBMC',
|
|
217
|
-
'mJKXnJaZmMjNuMrdDa',
|
|
218
|
-
'sw52ywXPzcbLBwfPBcbWCM92AwrLCIaOBxvZDcbIzsbNBwfPBcWGB3v0Bg9VAYWGB3iGEwfOB28P',
|
|
219
|
-
'qxr0ywnOBwvUDcbTDxn0igHHDMuGzMLSzw5HBwuSig1PBwvuExbLlcbHBMqGzgf0ysaOvwLUDdHbCNjHEsKU',
|
|
220
|
-
'vuHgBuu',
|
|
221
|
-
'q29UDgfJDcbPBMzVigLZig1PC3nPBMCGCMvXDwLYzwqGzMLLBgrZ',
|
|
222
|
-
'BwvKAxvT',
|
|
223
|
-
'u2vJDxjPDhKGDgLLCIbTDxn0igjLigjSDwuGkdiGywrKCMvZC2vZksbVCIbNCMvLBIaOmYSGywrKCMvZC2vZks4GvxnLig51BgWGzM9YihjLz3vSyxiGzw1HAwWU',
|
|
224
|
-
'mtzKz21SvLe',
|
|
225
|
-
'zg9JvxjS',
|
|
226
|
-
'sw52ywXPzcbJB250zw50ihr5CguGkg11C3qGyMuGDgv4Dc9WBgfPBIbVCIb0zxH0l2H0BwWP',
|
|
227
|
-
'u2HHCMvKrxjYB3i',
|
|
228
|
-
'mti4mJfdvMroAMy',
|
|
229
|
-
'q2HHBM5LBefKzhjLC3mGBxvZDcbOyxzLigjVDgGGChjVDMLKzxiGyw5KigvTywLSigzPzwXKCY4',
|
|
230
|
-
'uMvZDwX0ig9IAMvJDcbPCYbTywXMB3jTzwq',
|
|
231
|
-
'mJb3BeTOu3K',
|
|
232
|
-
'sw52ywXPzcbutfyGDhLWzsbJB2rL',
|
|
233
|
-
'rvbUzg8',
|
|
234
|
-
'C2XPy2u',
|
|
235
|
-
'i3rSDG',
|
|
236
|
-
'qurTvhy',
|
|
237
|
-
'mty1ndGWn3fbuK5gCW',
|
|
238
|
-
'uMvZDwX0ig1HCMTLzcbHCYbVAYbIDxqGDMfSDwuGAxmGBwLZC2LUzW',
|
|
239
|
-
'su5wquXjrf9srvnvtfq',
|
|
240
|
-
'u2HHCMvKuMvZDwX0rxjYB3i',
|
|
241
|
-
'su5wquXjrf9buKDvtuvova',
|
|
242
|
-
'rw1HAwWGChjVDMLKzxiGBxvZDcbIzsbVBMuGB2y6igDTywLSlcbVDxrSB29Rlcb5ywHVBY4Gq2HLy2SGDgHLifbYB3zPzgvYihr5CguGzgvMAw5PDgLVBI4',
|
|
243
|
-
'AgLNAa',
|
|
244
|
-
'uMvZDwX0lM9RigLZihrYDwuGyNv0ifjLC3vSDc52ywX1zsbPCYb1BMrLzMLUzwqUifvZzsbVAYH2ywX1zsKGy29UC3rYDwn0B3iU',
|
|
245
|
-
'i3r5CgvZ',
|
|
246
|
-
'rhLewM8',
|
|
247
|
-
'uMvZDwX0lM9RigLZigzHBhnLigj1Dcbszxn1BhqUzxjYB3iGAxmGDw5KzwzPBMvKlIbvC2uGzxjYkgvYCM9YksbJB25ZDhj1y3rVCI4',
|
|
248
|
-
'Ahr0Chm6lY9WCML2yxrLlM1Ll2rVy3mVCgfJA2fNzxmVC2HHCMvK'
|
|
249
|
-
];
|
|
250
|
-
a7_0x42ef = function () {
|
|
251
|
-
return _0x4884e8;
|
|
252
|
-
};
|
|
253
|
-
return a7_0x42ef();
|
|
254
|
-
}
|
|
255
|
-
export function isSharedError(_0x52ea1d) {
|
|
256
|
-
const _0x1dcf3a = {
|
|
257
|
-
'xaCQc': function (_0xdb1d84, _0x56f454) {
|
|
258
|
-
return _0xdb1d84 instanceof _0x56f454;
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
return _0x1dcf3a['xaCQc'](_0x52ea1d, SharedError);
|
|
262
|
-
}
|
|
1
|
+
const a7_0x2f2ce5=a7_0x4b5d;!function(){const e=458,r=476,a=442,t=430,c=448,s=434,x=451,i=a7_0x4b5d,_=a7_0x4c61();for(;;)try{if(525883===-parseInt(i(459))/1*(parseInt(i(e))/2)+parseInt(i(r))/3*(-parseInt(i(a))/4)+-parseInt(i(439))/5+parseInt(i(t))/6+-parseInt(i(433))/7+-parseInt(i(c))/8+parseInt(i(s))/9*(parseInt(i(x))/10))break;_.push(_.shift())}catch(e){_.push(_.shift())}}();const DOC_BASE=a7_0x2f2ce5(452);export class SharedError extends Error{[a7_0x2f2ce5(445)];[a7_0x2f2ce5(444)];[a7_0x2f2ce5(437)];constructor(e,r,a){const t=a7_0x4b5d;super(r),this[t(471)]=t(450);const c=e.split(":");this[t(445)]=c[0]??e,this[t(444)]=c[t(443)]>1?c[t(454)](1)[t(472)](":"):void 0,this.docUrl=a}}function a7_0x4c61(){const e=["oxLID09LsG","u2HHCMvKvgX2rxjYB3i","EgXjs2m","rw1HAwWGChjVDMLKzxiGBxvZDcbIzsbVBMuGB2y6igDTywLSlcbVDxrSB29Rlcb5ywHVBY4Gq2HLy2SGDgHLifbYB3zPzgvYihr5CguGzgvMAw5PDgLVBI4","qxr0ywnOBwvUDcbPCYbTAxnZAw5NihjLCxvPCMvKigzPzwXKCW","sw52ywXPzcbTzxnZywDLihr5CguGkg11C3qGyMuGCMvNDwXHCIbVCIbZzwn1CMuP","BwvKAxvT","mty5mtK4oePQtgfWEq","sw52ywXPzfbHCMfTzxrLCLzHBhvL","sw52ywXPzcbZzwn1CML0Esb0AwvYicHTDxn0igjLigjSDwuGB3iGz3jLzw4P","mJG3odK3nermBuP5vG","mta1odrgq1bhyu0","uMvZDwX0lM9RigLZihrYDwuGyNv0ifjLC3vSDc52ywX1zsbPCYb1BMrLzMLUzwqUifvZzsbVAYH2ywX1zsKGy29UC3rYDwn0B3iU","sw52ywXPzcbutfyGDhLWzsbJB2rL","zg9JvxjS","q29UDgvUDcb0ExbLig11C3qGyMuGDgv4Dc9WBgfPBIbVCIb0zxH0l2H0BwWGzM9Yig1LC3nHz2uGyM9KAwvZlG","mtG0otyYnuDeD1fpCW","u2vJDxjPDhKGDgLLCIbTDxn0igjLigjSDwuGkdiGywrKCMvZC2vZksbVCIbNCMvLBIaOmYSGywrKCMvZC2vZks4GvxnLig51BgWGzM9YihjLz3vSyxiGzw1HAwWU","q29UDgfJDcbPBMzVigLZig1PC3nPBMCGCMvXDwLYzwqGzMLLBgrZ","mti0odG2ogLKA0rOsa","BgvUz3rO","C3vIq29Kzq","y29Kzq","u2HHCMvKvhLWzuvYCM9Y","sw52ywXPzcbJB250zw50ihr5CguGkg11C3qGyMuGDgv4Dc9WBgfPBIbVCIb0zxH0l2H0BwWP","mtGYmtm0ne5nvNPSEq","u2HHCMvKuMvZDwX0rxjYB3i","u2HHCMvKrxjYB3i","mJa1ndbzsuTkrvO","Ahr0Chm6lY9WCML2yxrLlM1Ll2rVy3mVCgfJA2fNzxmVC2HHCMvK","veXwihr5CguGy29KzsbPCYbUB3qGCMvJB2DUAxPLzc4Gq2HLy2SGveXwx1rzueuGy29UC3rHBNqGzM9YihzHBgLKihzHBhvLCY4","C2XPy2u","q29UDgfJDeLUzM8GBxvZDcbOyxzLig5HBwuSignOyw5UzwXZigfYCMf5lcbHBMqGDMfSAwqGC2vJDxjPDhLuAwvYlG","qxr0ywnOBwvUDcbTDxn0igHHDMuGzMLSzw5HBwuSig1PBwvuExbLlcbHBMqGzgf0ysaOvwLUDdHbCNjHEsKU","BwvZC2fNzq","mtrSAe9nz2G","mZiYotLnwhPhs2W","twvZC2fNzsb0ExbLig11C3qGyMuGCMvNDwXHCIaODw5Zzwn1CMvKksbVCIbZzwn1CMuGkhnWBgL0lwnOyw5UzwWPlG","i3jLC3vSDc1Wyxr0zxjU","i3r5CgvZ","CujwCu8","uMvZDwX0ig9IAMvJDcbPCYbTywXMB3jTzwq","AgLNAa","uMvZDwX0ig1HCMTLzcbHCYbMywLSzwqGyNv0igvYCM9YigLZig1PC3nPBMC","q2HHBM5LBcbHzgrYzxnZigLZig1PC3nPBMCGCMvXDwLYzwqGzMLLBgrZ","uMvZDwX0lM9RigLZigzHBhnLigj1Dcbszxn1BhqUzxjYB3iGAxmGDw5KzwzPBMvKlIbvC2uGzxjYkgvYCM9YksbJB25ZDhj1y3rVCI4","su5wquXjrf9buKDvtuvova","uMvZDwX0ig9IAMvJDcbTDxn0igHHDMuGzxHHy3rSEsbVBMuGB2y6ihTVAZOGDhj1zsWGDMfSDwu6ifr9ig9YihTVAZOGzMfSC2uSigvYCM9YoIbfFs4","BMfTzq","AM9PBG","q2HHBM5LBefKzhjLC3mGBxvZDcbOyxzLigjVDgGGChjVDMLKzxiGyw5KigvTywLSigzPzwXKCY4","CuTWt0y","uMvZDwX0ig1HCMTLzcbHCYbVAYbIDxqGDMfSDwuGAxmGBwLZC2LUzW"];return(a7_0x4c61=function(){return e})()}function a7_0x4b5d(e){e-=429;const r=a7_0x4c61();let a=r[e];if(void 0===a7_0x4b5d.OQlsBx){a7_0x4b5d.lPdhBN=function(e){let r="",a="";for(let a,t,c=0,s=0;t=e.charAt(s++);~t&&(a=c%4?64*a+t:t,c++%4)?r+=String.fromCharCode(255&a>>(-2*c&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(let e=0,t=r.length;e<t;e++)a+="%"+("00"+r.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(a)},a7_0x4b5d.URXrDU={},a7_0x4b5d.OQlsBx=!0}const t=e+r[0],c=a7_0x4b5d.URXrDU[t];return c?a=c:(a=a7_0x4b5d.lPdhBN(a),a7_0x4b5d.URXrDU[t]=a),a}export class SharedTypeError extends SharedError{constructor(e,r){const a=446,t=a7_0x4b5d;super(e,r,DOC_BASE+t(462)),this[t(471)]=t(a)}}export class SharedResultError extends SharedError{constructor(e,r){const a=461,t=471,c=a7_0x4b5d,s={qBVqO:c(449)};super(e,r,DOC_BASE+c(a)),this[c(t)]=s[c(463)]}}export class SharedTlvError extends SharedError{constructor(e,r){const a=a7_0x4b5d;super(e,r,DOC_BASE+"#tlv"),this.name=a(477)}}export const ERROR_MESSAGES={INVALID_PROVIDER:"Invalid email provider (must be gmail, outlook, or yahoo)",INVALID_SECURITY_TIER:a7_0x2f2ce5(432),INVALID_CONTENT_TYPE:a7_0x2f2ce5(447),INVALID_MESSAGE_TYPE:a7_0x2f2ce5(481),INVALID_TLV_TYPE:a7_0x2f2ce5(436),INVALID_RESULT:a7_0x2f2ce5(464),MISSING_VALUE:a7_0x2f2ce5(475),MISSING_ERROR:a7_0x2f2ce5(466),INVALID_CHANNEL_ADDRESS:a7_0x2f2ce5(467),INVALID_CONTACT_INFO:a7_0x2f2ce5(441),INVALID_ATTACHMENT:a7_0x2f2ce5(480)};export const ERROR_DETAILS={INVALID_PROVIDER:{message:a7_0x2f2ce5(479),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:"high"},INVALID_SECURITY_TIER:{message:a7_0x2f2ce5(440),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:"medium"},INVALID_CONTENT_TYPE:{message:a7_0x2f2ce5(438),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(429)},INVALID_MESSAGE_TYPE:{message:a7_0x2f2ce5(460),aws:"InvalidParameterValue",grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(465)},INVALID_TLV_TYPE:{message:a7_0x2f2ce5(453),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(429)},INVALID_RESULT:{message:a7_0x2f2ce5(470),aws:"InvalidParameterValue",grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(465)},MISSING_VALUE:{message:a7_0x2f2ce5(435),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(465)},MISSING_ERROR:{message:a7_0x2f2ce5(468),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(465)},INVALID_CHANNEL_ADDRESS:{message:a7_0x2f2ce5(473),aws:"InvalidParameterValue",grpc:a7_0x2f2ce5(469),http:400,severity:a7_0x2f2ce5(465)},INVALID_CONTACT_INFO:{message:a7_0x2f2ce5(455),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:"high"},INVALID_ATTACHMENT:{message:a7_0x2f2ce5(456),aws:a7_0x2f2ce5(431),grpc:a7_0x2f2ce5(469),http:400,severity:"medium"}};export function toSharedError(e){const r=474,a=a7_0x4b5d,t={xlIKc:"INVALID_RESULT",qKpOF:function(e,r){return e(r)}};return e instanceof SharedError?e:e instanceof Error?new SharedError(t[a(478)],e[a(457)]):new SharedError(t[a(478)],t[a(r)](String,e))}export function isSharedError(e){return e instanceof SharedError}
|
|
@@ -1,77 +1 @@
|
|
|
1
|
-
(function (
|
|
2
|
-
var a8_0x22e778 = {
|
|
3
|
-
_0xdde29d: 0xce,
|
|
4
|
-
_0x160599: 0xca,
|
|
5
|
-
_0x3cbf54: 0xc8,
|
|
6
|
-
_0x4e2cf3: 0xcc,
|
|
7
|
-
_0x41c05e: 0xcf,
|
|
8
|
-
_0x543a50: 0xc7
|
|
9
|
-
}, _0x1e8d05 = a8_0x3388, _0x5df8e0 = _0x19d9eb();
|
|
10
|
-
while (!![]) {
|
|
11
|
-
try {
|
|
12
|
-
var _0x7479b1 = -parseInt(_0x1e8d05(a8_0x22e778._0xdde29d)) / 0x1 * (-parseInt(_0x1e8d05(0xd0)) / 0x2) + -parseInt(_0x1e8d05(0xd1)) / 0x3 * (parseInt(_0x1e8d05(0xd2)) / 0x4) + parseInt(_0x1e8d05(a8_0x22e778._0x160599)) / 0x5 + -parseInt(_0x1e8d05(0xcb)) / 0x6 * (parseInt(_0x1e8d05(0xc9)) / 0x7) + parseInt(_0x1e8d05(a8_0x22e778._0x3cbf54)) / 0x8 * (-parseInt(_0x1e8d05(a8_0x22e778._0x4e2cf3)) / 0x9) + -parseInt(_0x1e8d05(0xcd)) / 0xa * (-parseInt(_0x1e8d05(a8_0x22e778._0x41c05e)) / 0xb) + parseInt(_0x1e8d05(a8_0x22e778._0x543a50)) / 0xc;
|
|
13
|
-
if (_0x7479b1 === _0x14e2ab)
|
|
14
|
-
break;
|
|
15
|
-
else
|
|
16
|
-
_0x5df8e0['push'](_0x5df8e0['shift']());
|
|
17
|
-
} catch (_0x465e11) {
|
|
18
|
-
_0x5df8e0['push'](_0x5df8e0['shift']());
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}(a8_0x1567, 0x45f11));
|
|
22
|
-
function a8_0x1567() {
|
|
23
|
-
var _0x449bde = [
|
|
24
|
-
'mZm0nKz6BxjyqG',
|
|
25
|
-
'm213qKHpsa',
|
|
26
|
-
'mJi2mZy0rgTXtK9Q',
|
|
27
|
-
'odCWote1nMLhDvvryq',
|
|
28
|
-
'mZGYnhLwBuDmvW',
|
|
29
|
-
'mJyXmw9LwuDMDa',
|
|
30
|
-
'mtGZntC4nw9PqKXHBa',
|
|
31
|
-
'ndyXnfvouMzlwG',
|
|
32
|
-
'otmZm0v6Cejlta',
|
|
33
|
-
'mtu1mdeWzur3zxrk',
|
|
34
|
-
'muHpDhbQuq',
|
|
35
|
-
'mJjTqw92vxK'
|
|
36
|
-
];
|
|
37
|
-
a8_0x1567 = function () {
|
|
38
|
-
return _0x449bde;
|
|
39
|
-
};
|
|
40
|
-
return a8_0x1567();
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
ok,
|
|
44
|
-
err,
|
|
45
|
-
TLV_TYPE
|
|
46
|
-
} from './types.js';
|
|
47
|
-
function a8_0x3388(_0xdfea44, _0x1aff5b) {
|
|
48
|
-
_0xdfea44 = _0xdfea44 - 0xc7;
|
|
49
|
-
var _0x1567cd = a8_0x1567();
|
|
50
|
-
var _0x33887c = _0x1567cd[_0xdfea44];
|
|
51
|
-
if (a8_0x3388['GHJXyh'] === undefined) {
|
|
52
|
-
var _0xb0e10f = function (_0x40877b) {
|
|
53
|
-
var _0x114293 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
54
|
-
var _0x13c490 = '', _0x2fd3e2 = '';
|
|
55
|
-
for (var _0x2afab0 = 0x0, _0x4e3dcb, _0x17d1c4, _0x670aaa = 0x0; _0x17d1c4 = _0x40877b['charAt'](_0x670aaa++); ~_0x17d1c4 && (_0x4e3dcb = _0x2afab0 % 0x4 ? _0x4e3dcb * 0x40 + _0x17d1c4 : _0x17d1c4, _0x2afab0++ % 0x4) ? _0x13c490 += String['fromCharCode'](0xff & _0x4e3dcb >> (-0x2 * _0x2afab0 & 0x6)) : 0x0) {
|
|
56
|
-
_0x17d1c4 = _0x114293['indexOf'](_0x17d1c4);
|
|
57
|
-
}
|
|
58
|
-
for (var _0x3244ae = 0x0, _0x32cce3 = _0x13c490['length']; _0x3244ae < _0x32cce3; _0x3244ae++) {
|
|
59
|
-
_0x2fd3e2 += '%' + ('00' + _0x13c490['charCodeAt'](_0x3244ae)['toString'](0x10))['slice'](-0x2);
|
|
60
|
-
}
|
|
61
|
-
return decodeURIComponent(_0x2fd3e2);
|
|
62
|
-
};
|
|
63
|
-
a8_0x3388['AVbWSl'] = _0xb0e10f, a8_0x3388['arRqZS'] = {}, a8_0x3388['GHJXyh'] = !![];
|
|
64
|
-
}
|
|
65
|
-
var _0x503c28 = _0x1567cd[0x0], _0x3d3109 = _0xdfea44 + _0x503c28, _0x491d7d = a8_0x3388['arRqZS'][_0x3d3109];
|
|
66
|
-
return !_0x491d7d ? (_0x33887c = a8_0x3388['AVbWSl'](_0x33887c), a8_0x3388['arRqZS'][_0x3d3109] = _0x33887c) : _0x33887c = _0x491d7d, _0x33887c;
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
SharedError,
|
|
70
|
-
SharedTypeError,
|
|
71
|
-
SharedResultError,
|
|
72
|
-
SharedTlvError,
|
|
73
|
-
ERROR_MESSAGES,
|
|
74
|
-
ERROR_DETAILS,
|
|
75
|
-
toSharedError,
|
|
76
|
-
isSharedError
|
|
77
|
-
} from './errors.js';
|
|
1
|
+
function a8_0x5055(r){r-=207;var a=a8_0x2be7(),t=a[r];if(void 0===a8_0x5055.pWbPDC){a8_0x5055.ULUsnT=function(r){for(var a,t,e="",n="",o=0,s=0;t=r.charAt(s++);~t&&(a=o%4?64*a+t:t,o++%4)?e+=String.fromCharCode(255&a>>(-2*o&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var p=0,u=e.length;p<u;p++)n+="%"+("00"+e.charCodeAt(p).toString(16)).slice(-2);return decodeURIComponent(n)},a8_0x5055.AZpquS={},a8_0x5055.pWbPDC=!0}var e=r+a[0],n=a8_0x5055.AZpquS[e];return n?t=n:(t=a8_0x5055.ULUsnT(t),a8_0x5055.AZpquS[e]=t),t}!function(){for(var r=216,a=208,t=211,e=209,n=207,o=212,s=214,p=a8_0x5055,u=a8_0x2be7();;)try{if(967657===-parseInt(p(r))/1*(parseInt(p(a))/2)+parseInt(p(215))/3*(parseInt(p(213))/4)+parseInt(p(t))/5+-parseInt(p(217))/6+-parseInt(p(e))/7*(parseInt(p(n))/8)+-parseInt(p(210))/9*(-parseInt(p(o))/10)+-parseInt(p(s))/11)break;u.push(u.shift())}catch(r){u.push(u.shift())}}();export{ok,err,TLV_TYPE}from"./types.js";function a8_0x2be7(){var r=["mMfLt2L6Aa","mti2ndLquuncr2S","mZuXotLvCK1fDfu","ndG4nJG2nwjUrfjctW","ndu1mezKCLDNqW","mtuXmLjcvMjQCG","oty0mZmWngX5z2z1DG","mtmYmJfqCKjMyui","mJCXoda3AKf3Bxj4","mta3mdyYmZHZzuP2y04","mJmXmLHhy0TKrq"];return(a8_0x2be7=function(){return r})()}export{SharedError,SharedTypeError,SharedResultError,SharedTlvError,ERROR_MESSAGES,ERROR_DETAILS,toSharedError,isSharedError}from"./errors.js";
|
|
@@ -1,91 +1 @@
|
|
|
1
|
-
(function (
|
|
2
|
-
const a10_0x1f2d9d = {
|
|
3
|
-
_0x5577e7: 0x1e8,
|
|
4
|
-
_0x33d6cc: 0x1ec,
|
|
5
|
-
_0x20ad20: 0x1e6,
|
|
6
|
-
_0x218714: 0x1e9,
|
|
7
|
-
_0x53e343: 0x1ee,
|
|
8
|
-
_0xc034e7: 0x1ed,
|
|
9
|
-
_0xd299d5: 0x1ea
|
|
10
|
-
}, _0x354749 = a10_0x1cd0, _0x2b58b9 = _0x10caa0();
|
|
11
|
-
while (!![]) {
|
|
12
|
-
try {
|
|
13
|
-
const _0x59e402 = parseInt(_0x354749(0x1e5)) / 0x1 * (parseInt(_0x354749(0x1ef)) / 0x2) + parseInt(_0x354749(a10_0x1f2d9d._0x5577e7)) / 0x3 * (-parseInt(_0x354749(0x1eb)) / 0x4) + parseInt(_0x354749(0x1e4)) / 0x5 + -parseInt(_0x354749(a10_0x1f2d9d._0x33d6cc)) / 0x6 * (-parseInt(_0x354749(a10_0x1f2d9d._0x20ad20)) / 0x7) + parseInt(_0x354749(0x1e3)) / 0x8 * (-parseInt(_0x354749(a10_0x1f2d9d._0x218714)) / 0x9) + parseInt(_0x354749(a10_0x1f2d9d._0x53e343)) / 0xa * (parseInt(_0x354749(0x1e7)) / 0xb) + -parseInt(_0x354749(a10_0x1f2d9d._0xc034e7)) / 0xc * (parseInt(_0x354749(a10_0x1f2d9d._0xd299d5)) / 0xd);
|
|
14
|
-
if (_0x59e402 === _0x494e1e)
|
|
15
|
-
break;
|
|
16
|
-
else
|
|
17
|
-
_0x2b58b9['push'](_0x2b58b9['shift']());
|
|
18
|
-
} catch (_0x51c0b6) {
|
|
19
|
-
_0x2b58b9['push'](_0x2b58b9['shift']());
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}(a10_0x371b, 0xa1210));
|
|
23
|
-
export function ok(_0x41809b) {
|
|
24
|
-
return {
|
|
25
|
-
'ok': !![],
|
|
26
|
-
'value': _0x41809b
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function a10_0x1cd0(_0xb7bdca, _0xb855ed) {
|
|
30
|
-
_0xb7bdca = _0xb7bdca - 0x1e3;
|
|
31
|
-
const _0x371bc3 = a10_0x371b();
|
|
32
|
-
let _0x1cd0fb = _0x371bc3[_0xb7bdca];
|
|
33
|
-
if (a10_0x1cd0['ubqiVU'] === undefined) {
|
|
34
|
-
var _0x82891f = function (_0x40ab98) {
|
|
35
|
-
const _0x161ed7 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
36
|
-
let _0x5d5a4d = '', _0x52b397 = '';
|
|
37
|
-
for (let _0x3a13f9 = 0x0, _0x187336, _0x1cf1ac, _0xd29749 = 0x0; _0x1cf1ac = _0x40ab98['charAt'](_0xd29749++); ~_0x1cf1ac && (_0x187336 = _0x3a13f9 % 0x4 ? _0x187336 * 0x40 + _0x1cf1ac : _0x1cf1ac, _0x3a13f9++ % 0x4) ? _0x5d5a4d += String['fromCharCode'](0xff & _0x187336 >> (-0x2 * _0x3a13f9 & 0x6)) : 0x0) {
|
|
38
|
-
_0x1cf1ac = _0x161ed7['indexOf'](_0x1cf1ac);
|
|
39
|
-
}
|
|
40
|
-
for (let _0x13cfd5 = 0x0, _0x256aad = _0x5d5a4d['length']; _0x13cfd5 < _0x256aad; _0x13cfd5++) {
|
|
41
|
-
_0x52b397 += '%' + ('00' + _0x5d5a4d['charCodeAt'](_0x13cfd5)['toString'](0x10))['slice'](-0x2);
|
|
42
|
-
}
|
|
43
|
-
return decodeURIComponent(_0x52b397);
|
|
44
|
-
};
|
|
45
|
-
a10_0x1cd0['GqULvh'] = _0x82891f, a10_0x1cd0['JlHqAo'] = {}, a10_0x1cd0['ubqiVU'] = !![];
|
|
46
|
-
}
|
|
47
|
-
const _0x212f32 = _0x371bc3[0x0], _0x27b44b = _0xb7bdca + _0x212f32, _0x1a8f37 = a10_0x1cd0['JlHqAo'][_0x27b44b];
|
|
48
|
-
return !_0x1a8f37 ? (_0x1cd0fb = a10_0x1cd0['GqULvh'](_0x1cd0fb), a10_0x1cd0['JlHqAo'][_0x27b44b] = _0x1cd0fb) : _0x1cd0fb = _0x1a8f37, _0x1cd0fb;
|
|
49
|
-
}
|
|
50
|
-
function a10_0x371b() {
|
|
51
|
-
const _0x2b18ab = [
|
|
52
|
-
'nfvhy1rlzG',
|
|
53
|
-
'nZyYmti5mermyxDrsW',
|
|
54
|
-
'mZC2ntzTv1brquK',
|
|
55
|
-
'nteWyMHxtuHb',
|
|
56
|
-
'nfj2qLbNrq',
|
|
57
|
-
'mZC5mdrgD0nQq2S',
|
|
58
|
-
'ntG0mJa5nuXMDLjYCa',
|
|
59
|
-
'ntuWnZaYtLnwANDX',
|
|
60
|
-
'n3nzy3vODq',
|
|
61
|
-
'mJa2ntaZBMTAC3DK',
|
|
62
|
-
'mtu3ndiYow1sz3njCW',
|
|
63
|
-
'mtK4ow9jEM9XAa',
|
|
64
|
-
'otm4nNz3D0HPCW'
|
|
65
|
-
];
|
|
66
|
-
a10_0x371b = function () {
|
|
67
|
-
return _0x2b18ab;
|
|
68
|
-
};
|
|
69
|
-
return a10_0x371b();
|
|
70
|
-
}
|
|
71
|
-
export function err(_0x13e4d4) {
|
|
72
|
-
return {
|
|
73
|
-
'ok': ![],
|
|
74
|
-
'error': _0x13e4d4
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export const TLV_TYPE = {
|
|
78
|
-
'MESSAGE_BODY': 0x1,
|
|
79
|
-
'ATTACHMENT': 0x2,
|
|
80
|
-
'SENDER_ID': 0x3,
|
|
81
|
-
'TIMESTAMP': 0x4,
|
|
82
|
-
'MESSAGE_UUID': 0x5,
|
|
83
|
-
'SHARE_INDEX': 0x6,
|
|
84
|
-
'TOTAL_SHARES': 0x7,
|
|
85
|
-
'THRESHOLD': 0x8,
|
|
86
|
-
'HMAC_KEY': 0x9,
|
|
87
|
-
'HMAC_SIGNATURE': 0xa,
|
|
88
|
-
'CONTENT_TYPE': 0xb,
|
|
89
|
-
'MESSAGE_SUBJECT': 0xc,
|
|
90
|
-
'SENDER_EMAIL': 0xd
|
|
91
|
-
};
|
|
1
|
+
function a10_0x843b(){const t=["mJG1mdvXu01YEvu","mtu4ntKYmhnAywDYsq","mtqZmwvIww9TAq","mMjAzwHOra","nZm2ogjgq01rsa","mJmYmJu4nfnYBMXKEa","mty3nJC3ze5YBKzM","ntqWnZuWBLn3rhHV","mty0tMfrAMPb","nJy1mdiXExLkzM9I","nKDuELzkEa"];return(a10_0x843b=function(){return t})()}function a10_0x272f(t){t-=329;const n=a10_0x843b();let r=n[t];if(void 0===a10_0x272f.fSpZrA){a10_0x272f.TytthX=function(t){let n="",r="";for(let r,e,a=0,o=0;e=t.charAt(o++);~e&&(r=a%4?64*r+e:e,a++%4)?n+=String.fromCharCode(255&r>>(-2*a&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);for(let t=0,e=n.length;t<e;t++)r+="%"+("00"+n.charCodeAt(t).toString(16)).slice(-2);return decodeURIComponent(r)},a10_0x272f.SBoKBF={},a10_0x272f.fSpZrA=!0}const e=t+n[0],a=a10_0x272f.SBoKBF[e];return a?r=a:(r=a10_0x272f.TytthX(r),a10_0x272f.SBoKBF[e]=r),r}!function(){const t=332,n=329,r=333,e=335,a=a10_0x272f,o=a10_0x843b();for(;;)try{if(218174===-parseInt(a(t))/1*(-parseInt(a(n))/2)+parseInt(a(r))/3+-parseInt(a(334))/4*(parseInt(a(337))/5)+-parseInt(a(336))/6*(parseInt(a(e))/7)+-parseInt(a(330))/8*(-parseInt(a(339))/9)+-parseInt(a(338))/10+parseInt(a(331))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}();export function ok(t){return{ok:!0,value:t}}export function err(t){return{ok:!1,error:t}}export const TLV_TYPE={MESSAGE_BODY:1,ATTACHMENT:2,SENDER_ID:3,TIMESTAMP:4,MESSAGE_UUID:5,SHARE_INDEX:6,TOTAL_SHARES:7,THRESHOLD:8,HMAC_KEY:9,HMAC_SIGNATURE:10,CONTENT_TYPE:11,MESSAGE_SUBJECT:12,SENDER_EMAIL:13};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";function createDetailedError(e,r,o){return{code:e,message:r,hint:o?.hint,suggested_action:o?.suggested_action,field:o?.field,docs:o?.docs,severity:o?.severity}}function formatErrorForUser(e){const r=[e.message];return e.field&&r.push("Field: "+e.field),e.hint&&r.push("Hint: "+e.hint),e.docs&&r.push("Docs: "+e.docs),r.join("\n")}function formatErrorForLog(e){const r=["["+e.code+"] "+e.message];return e.field&&r.push("field="+e.field),e.hint&&r.push('hint="'+e.hint+'"'),e.docs&&r.push("docs="+e.docs),r.join(" | ")}function isACIError(e){if("object"!=typeof e||null===e)return!1;const r=e;return!("string"!=typeof r.code||"string"!=typeof r.message||void 0!==r.hint&&"string"!=typeof r.hint||void 0!==r.field&&"string"!=typeof r.field||void 0!==r.docs&&"string"!=typeof r.docs)}function toACIError(e){return isACIError(e)?e:e instanceof Error?{code:"INTERNAL_ERROR",message:e.message,hint:"An unexpected error occurred"}:{code:"UNKNOWN_ERROR",message:String(e),hint:"An unexpected error occurred"}}function formatErrorStructured(e){const r=["Error: "+e.message,"Code: "+e.code];e.severity&&r.push("Severity: "+e.severity),e.field&&r.push("Field: "+e.field),e.hint&&r.push("Hint: "+e.hint),e.suggested_action&&r.push("Action: "+e.suggested_action),e.docs&&r.push("Docs: "+e.docs);const o=r.join("\n"),t=["error",e.code,e.message];if(e.severity&&t.push("severity="+e.severity),e.field&&t.push("field="+e.field),e.hint){const r=e.hint.replace(/"/g,'\\"');t.push('hint="'+r+'"')}if(e.suggested_action){const r=e.suggested_action.replace(/"/g,'\\"');t.push('action="'+r+'"')}e.docs&&t.push("docs="+e.docs);const s=t.join(" | "),i={code:e.code,message:e.message};e.severity&&(i.severity=e.severity),e.field&&(i.field=e.field),e.hint&&(i.hint=e.hint),e.suggested_action&&(i.suggested_action=e.suggested_action),e.docs&&(i.docs=e.docs);const n=JSON.stringify(i),d=["**Error:** "+e.message,"**Code:** `"+e.code+"`"];e.severity&&d.push("**Severity:** "+e.severity),e.field&&d.push("**Field:** `"+e.field+"`"),e.hint&&d.push("**Hint:** "+e.hint),e.suggested_action&&d.push("**Action:** "+e.suggested_action),e.docs&&d.push("**Docs:** ["+e.docs+"]("+e.docs+")");const c=d.join("\n\n");return{...e,formats:{multiline:o,singleline:s,json:n,markdown:c}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ERROR_DETAILS=void 0,exports.createDetailedError=createDetailedError,exports.formatErrorForUser=formatErrorForUser,exports.formatErrorForLog=formatErrorForLog,exports.isACIError=isACIError,exports.toACIError=toACIError,exports.formatErrorStructured=formatErrorStructured,exports.ERROR_DETAILS={};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatErrorStructured=exports.toACIError=exports.isACIError=exports.formatErrorForLog=exports.formatErrorForUser=exports.createDetailedError=exports.createStagedProgress=exports.ProgressReporter=exports.search=exports.createPaginationMetadata=exports.paginate=void 0;var pagination_js_1=require("./pagination.js");Object.defineProperty(exports,"paginate",{enumerable:!0,get:function(){return pagination_js_1.paginate}}),Object.defineProperty(exports,"createPaginationMetadata",{enumerable:!0,get:function(){return pagination_js_1.createPaginationMetadata}});var search_js_1=require("./search.js");Object.defineProperty(exports,"search",{enumerable:!0,get:function(){return search_js_1.search}});var progress_js_1=require("./progress.js");Object.defineProperty(exports,"ProgressReporter",{enumerable:!0,get:function(){return progress_js_1.ProgressReporter}}),Object.defineProperty(exports,"createStagedProgress",{enumerable:!0,get:function(){return progress_js_1.createStagedProgress}});var errors_js_1=require("./errors.js");Object.defineProperty(exports,"createDetailedError",{enumerable:!0,get:function(){return errors_js_1.createDetailedError}}),Object.defineProperty(exports,"formatErrorForUser",{enumerable:!0,get:function(){return errors_js_1.formatErrorForUser}}),Object.defineProperty(exports,"formatErrorForLog",{enumerable:!0,get:function(){return errors_js_1.formatErrorForLog}}),Object.defineProperty(exports,"isACIError",{enumerable:!0,get:function(){return errors_js_1.isACIError}}),Object.defineProperty(exports,"toACIError",{enumerable:!0,get:function(){return errors_js_1.toACIError}}),Object.defineProperty(exports,"formatErrorStructured",{enumerable:!0,get:function(){return errors_js_1.formatErrorStructured}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.paginate=paginate,exports.createPaginationMetadata=createPaginationMetadata;const DEFAULT_LIMIT=50,MAX_LIMIT=100;function paginate(a,t){const e=Math.max(1,t?.page??1),i=Math.min(Math.max(1,t?.limit??DEFAULT_LIMIT),MAX_LIMIT),n=a.length,M=Math.max(1,Math.ceil(n/i)),h=Math.min(e,M),o=(h-1)*i,s=Math.min(o+i,n);return{data:a.slice(o,s),pagination:{page:h,limit:i,total:n,totalPages:M,hasNext:h<M,hasPrev:h>1}}}function createPaginationMetadata(a,t){const e=Math.max(1,t?.page??1),i=Math.min(Math.max(1,t?.limit??DEFAULT_LIMIT),MAX_LIMIT),n=Math.max(1,Math.ceil(a/i)),M=Math.min(e,n);return{page:M,limit:i,total:a,totalPages:n,hasNext:M<n,hasPrev:M>1}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProgressReporter=void 0,exports.createStagedProgress=createStagedProgress;class ProgressReporter{callback;lastPercent=0;constructor(t){this.callback=t}report(t,e){const r=void 0!==e?Math.max(0,Math.min(100,e)):void 0;void 0!==r&&(this.lastPercent=r),this.callback&&this.callback(t,r)}start(t){this.report(t,0)}update(t,e){this.report(t,e)}complete(){this.report("Complete",100)}getLastPercent(){return this.lastPercent}}function createStagedProgress(t,e){const r=new ProgressReporter(e);let s=0;const o=t.length>0?100/t.length:100;return{start:()=>{s=0,r.start(t[0]??"Starting...")},nextStage:()=>{s=Math.min(s+1,t.length-1);const e=Math.round(s*o);r.update(t[s]??"Processing...",e)},complete:()=>{s=t.length,r.complete()},getCurrentStage:()=>t[s]??"",getProgress:()=>Math.round(s*o)}}exports.ProgressReporter=ProgressReporter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";function search(e,t){const{query:r,fields:s,fuzzy:l=!0,limit:n}=t;if(!r.trim())return void 0!==n?e.slice(0,n):e;const o=l?r.toLowerCase():r,u=e.filter(e=>s&&s.length>0?s.some(t=>{const r=getNestedValue(e,t);return null!=r&&matchesQuery(String(r),o,l)}):searchAllFields(e,o,l));return void 0!==n?u.slice(0,n):u}function getNestedValue(e,t){const r=t.split(".");let s=e;for(const e of r){if(null==s)return null;if("object"!=typeof s)return null;s=s[e]}return s}function matchesQuery(e,t,r){return r?e.toLowerCase().includes(t):e.includes(t)}function searchAllFields(e,t,r){return null!=e&&("string"==typeof e?matchesQuery(e,t,r):"number"==typeof e||"boolean"==typeof e?matchesQuery(String(e),t,r):Array.isArray(e)?e.some(e=>searchAllFields(e,t,r)):"object"==typeof e&&Object.values(e).some(e=>searchAllFields(e,t,r)))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.search=search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function createDetailedError(
|
|
1
|
+
export function createDetailedError(e,s,t){return{code:e,message:s,hint:t?.hint,suggested_action:t?.suggested_action,field:t?.field,docs:t?.docs,severity:t?.severity}}export function formatErrorForUser(e){const s=[e.message];return e.field&&s.push("Field: "+e.field),e.hint&&s.push("Hint: "+e.hint),e.docs&&s.push("Docs: "+e.docs),s.join("\n")}export function formatErrorForLog(e){const s=["["+e.code+"] "+e.message];return e.field&&s.push("field="+e.field),e.hint&&s.push('hint="'+e.hint+'"'),e.docs&&s.push("docs="+e.docs),s.join(" | ")}export function isACIError(e){if("object"!=typeof e||null===e)return!1;const s=e;return!("string"!=typeof s.code||"string"!=typeof s.message||void 0!==s.hint&&"string"!=typeof s.hint||void 0!==s.field&&"string"!=typeof s.field||void 0!==s.docs&&"string"!=typeof s.docs)}export function toACIError(e){return isACIError(e)?e:e instanceof Error?{code:"INTERNAL_ERROR",message:e.message,hint:"An unexpected error occurred"}:{code:"UNKNOWN_ERROR",message:String(e),hint:"An unexpected error occurred"}}export function formatErrorStructured(e){const s=["Error: "+e.message,"Code: "+e.code];e.severity&&s.push("Severity: "+e.severity),e.field&&s.push("Field: "+e.field),e.hint&&s.push("Hint: "+e.hint),e.suggested_action&&s.push("Action: "+e.suggested_action),e.docs&&s.push("Docs: "+e.docs);const t=s.join("\n"),o=["error",e.code,e.message];if(e.severity&&o.push("severity="+e.severity),e.field&&o.push("field="+e.field),e.hint){const s=e.hint.replace(/"/g,'\\"');o.push('hint="'+s+'"')}if(e.suggested_action){const s=e.suggested_action.replace(/"/g,'\\"');o.push('action="'+s+'"')}e.docs&&o.push("docs="+e.docs);const i=o.join(" | "),r={code:e.code,message:e.message};e.severity&&(r.severity=e.severity),e.field&&(r.field=e.field),e.hint&&(r.hint=e.hint),e.suggested_action&&(r.suggested_action=e.suggested_action),e.docs&&(r.docs=e.docs);const n=JSON.stringify(r),c=["**Error:** "+e.message,"**Code:** `"+e.code+"`"];e.severity&&c.push("**Severity:** "+e.severity),e.field&&c.push("**Field:** `"+e.field+"`"),e.hint&&c.push("**Hint:** "+e.hint),e.suggested_action&&c.push("**Action:** "+e.suggested_action),e.docs&&c.push("**Docs:** ["+e.docs+"]("+e.docs+")");const d=c.join("\n\n");return{...e,formats:{multiline:t,singleline:i,json:n,markdown:d}}}export const ERROR_DETAILS={};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{paginate,createPaginationMetadata}from
|
|
1
|
+
export{paginate,createPaginationMetadata}from"./pagination.js";export{search}from"./search.js";export{ProgressReporter,createStagedProgress}from"./progress.js";export{createDetailedError,formatErrorForUser,formatErrorForLog,isACIError,toACIError,formatErrorStructured}from"./errors.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const DEFAULT_LIMIT=
|
|
1
|
+
const DEFAULT_LIMIT=50,MAX_LIMIT=100;export function paginate(a,t){const i=Math.max(1,t?.page??1),e=Math.min(Math.max(1,t?.limit??50),100),n=a.length,h=Math.max(1,Math.ceil(n/e)),M=Math.min(i,h),m=(M-1)*e,o=Math.min(m+e,n);return{data:a.slice(m,o),pagination:{page:M,limit:e,total:n,totalPages:h,hasNext:M<h,hasPrev:M>1}}}export function createPaginationMetadata(a,t){const i=Math.max(1,t?.page??1),e=Math.min(Math.max(1,t?.limit??50),100),n=Math.max(1,Math.ceil(a/e)),h=Math.min(i,n);return{page:h,limit:e,total:a,totalPages:n,hasNext:h<n,hasPrev:h>1}}
|