@happyvertical/smrt-core 0.56.0 → 0.56.2

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 (114) hide show
  1. package/AGENTS.md +6 -0
  2. package/agents/browser-entry.md +5 -0
  3. package/agents/generators.md +61 -0
  4. package/agents/object-runtime.md +17 -0
  5. package/dist/browser.d.ts +2 -0
  6. package/dist/browser.d.ts.map +1 -1
  7. package/dist/browser.js +3 -1
  8. package/dist/cookbook/engine/commands.d.ts.map +1 -1
  9. package/dist/cookbook/engine/commands.js +12 -0
  10. package/dist/cookbook/engine/commands.js.map +1 -1
  11. package/dist/cookbook/engine/defaults.d.ts.map +1 -1
  12. package/dist/cookbook/engine/defaults.js +8 -0
  13. package/dist/cookbook/engine/defaults.js.map +1 -1
  14. package/dist/cookbook/engine/document.d.ts +4 -0
  15. package/dist/cookbook/engine/document.d.ts.map +1 -1
  16. package/dist/cookbook/engine/document.js +11 -3
  17. package/dist/cookbook/engine/document.js.map +1 -1
  18. package/dist/cookbook/engine/engine.d.ts.map +1 -1
  19. package/dist/cookbook/engine/engine.js +3 -1
  20. package/dist/cookbook/engine/engine.js.map +1 -1
  21. package/dist/cookbook/engine/schemas.d.ts.map +1 -1
  22. package/dist/cookbook/engine/schemas.js +8 -0
  23. package/dist/cookbook/engine/schemas.js.map +1 -1
  24. package/dist/cookbook/engine/types.d.ts +5 -1
  25. package/dist/cookbook/engine/types.d.ts.map +1 -1
  26. package/dist/cookbook/engine/types.js.map +1 -1
  27. package/dist/generators/index.d.ts +1 -0
  28. package/dist/generators/index.d.ts.map +1 -1
  29. package/dist/generators/index.js +2 -1
  30. package/dist/generators/mcp-runtime-template.d.ts +3 -0
  31. package/dist/generators/mcp-runtime-template.d.ts.map +1 -1
  32. package/dist/generators/mcp-runtime-template.js +30 -4
  33. package/dist/generators/mcp-runtime-template.js.map +1 -1
  34. package/dist/generators/mcp.d.ts +5 -0
  35. package/dist/generators/mcp.d.ts.map +1 -1
  36. package/dist/generators/mcp.js +78 -7
  37. package/dist/generators/mcp.js.map +1 -1
  38. package/dist/generators.js +2 -1
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +3 -1
  42. package/dist/interceptors.d.ts +7 -0
  43. package/dist/interceptors.d.ts.map +1 -1
  44. package/dist/interceptors.js +15 -1
  45. package/dist/interceptors.js.map +1 -1
  46. package/dist/manifest/browser-capability.generated.d.ts.map +1 -1
  47. package/dist/manifest/browser-capability.generated.js +47 -5
  48. package/dist/manifest/browser-capability.generated.js.map +1 -1
  49. package/dist/manifest/index.js +1 -1
  50. package/dist/manifest/manifest-loader.d.ts.map +1 -1
  51. package/dist/manifest/manifest-loader.js +1 -2
  52. package/dist/manifest/manifest-loader.js.map +1 -1
  53. package/dist/manifest/static-manifest.js +1 -1
  54. package/dist/manifest/static-manifest.js.map +1 -1
  55. package/dist/manifest/store.js +1 -1
  56. package/dist/manifest.json +1 -1
  57. package/dist/mcp-serializer.d.ts +38 -0
  58. package/dist/mcp-serializer.d.ts.map +1 -0
  59. package/dist/mcp-serializer.js +60 -0
  60. package/dist/mcp-serializer.js.map +1 -0
  61. package/dist/object.d.ts +1 -0
  62. package/dist/object.d.ts.map +1 -1
  63. package/dist/object.js +44 -13
  64. package/dist/object.js.map +1 -1
  65. package/dist/registry/collection-exposure.d.ts +99 -0
  66. package/dist/registry/collection-exposure.d.ts.map +1 -0
  67. package/dist/registry/collection-exposure.js +135 -0
  68. package/dist/registry/collection-exposure.js.map +1 -0
  69. package/dist/registry/types.d.ts +13 -0
  70. package/dist/registry/types.d.ts.map +1 -1
  71. package/dist/registry.d.ts +8 -1
  72. package/dist/registry.d.ts.map +1 -1
  73. package/dist/registry.js +76 -3
  74. package/dist/registry.js.map +1 -1
  75. package/dist/scanner/manifest-generator.d.ts +14 -0
  76. package/dist/scanner/manifest-generator.d.ts.map +1 -1
  77. package/dist/scanner/manifest-generator.js +66 -13
  78. package/dist/scanner/manifest-generator.js.map +1 -1
  79. package/dist/smrt-knowledge.json +13 -11
  80. package/dist/utils/import-project-vite.js +1 -1
  81. package/dist/utils/import-workspace-module.js +1 -1
  82. package/dist/utils/sha256.js +2 -2
  83. package/dist/vite-plugin/dev-plane-route.js +1 -1
  84. package/dist/vite-plugin/import-build-aware.js +1 -1
  85. package/dist/vite-plugin/index.js +2 -2
  86. package/dist/vite-plugin/resources-route.js +1 -1
  87. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
  88. package/dist/vite-plugin/sveltekit-generator.js +5 -1
  89. package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
  90. package/package.json +16 -10
  91. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/_md.js +0 -169
  92. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/_md.js.map +0 -1
  93. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/_u64.js +0 -13
  94. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/_u64.js.map +0 -1
  95. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/sha2.js +0 -198
  96. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/sha2.js.map +0 -1
  97. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/utils.js +0 -243
  98. package/dist/node_modules/.pnpm/@noble_hashes@2.4.0/node_modules/@noble/hashes/utils.js.map +0 -1
  99. package/dist/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js +0 -51
  100. package/dist/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js.map +0 -1
  101. package/dist/node_modules/.pnpm/brace-expansion@5.0.11/node_modules/brace-expansion/dist/esm/index.js +0 -202
  102. package/dist/node_modules/.pnpm/brace-expansion@5.0.11/node_modules/brace-expansion/dist/esm/index.js.map +0 -1
  103. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -10
  104. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +0 -1
  105. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/ast.js +0 -514
  106. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/ast.js.map +0 -1
  107. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js +0 -124
  108. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
  109. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/escape.js +0 -21
  110. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/escape.js.map +0 -1
  111. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js +0 -629
  112. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js.map +0 -1
  113. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/unescape.js +0 -28
  114. package/dist/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/unescape.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-core",
3
- "version": "0.56.0",
3
+ "version": "0.56.2",
4
4
  "description": "Core AI agent framework with standardized collections, object-relational mapping, and code generators",
5
5
  "author": "HappyVertical",
6
6
  "type": "module",
@@ -71,6 +71,11 @@
71
71
  "import": "./dist/generators/mcp.js",
72
72
  "default": "./dist/generators/mcp.js"
73
73
  },
74
+ "./mcp-serializer": {
75
+ "types": "./dist/mcp-serializer.d.ts",
76
+ "import": "./dist/mcp-serializer.js",
77
+ "default": "./dist/mcp-serializer.js"
78
+ },
74
79
  "./generators/swagger": {
75
80
  "types": "./dist/generators/swagger.d.ts",
76
81
  "import": "./dist/generators/swagger.js",
@@ -185,19 +190,20 @@
185
190
  "./dist/utils/json.js": "./dist/utils/json.browser.js"
186
191
  },
187
192
  "dependencies": {
188
- "@happyvertical/ai": "^0.103.6",
189
- "@happyvertical/files": "^0.103.6",
190
- "@happyvertical/json": "^0.103.6",
191
- "@happyvertical/logger": "^0.103.6",
192
- "@happyvertical/smrt-config": "0.56.0",
193
- "@happyvertical/smrt-scanner": "0.56.0",
194
- "@happyvertical/smrt-types": "0.56.0",
195
- "@happyvertical/sql": "^0.103.6",
196
- "@happyvertical/utils": "^0.103.6",
193
+ "@happyvertical/ai": "^0.103.7",
194
+ "@happyvertical/files": "^0.103.7",
195
+ "@happyvertical/json": "^0.103.7",
196
+ "@happyvertical/logger": "^0.103.7",
197
+ "@happyvertical/smrt-config": "0.56.2",
198
+ "@happyvertical/smrt-scanner": "0.56.2",
199
+ "@happyvertical/smrt-types": "0.56.2",
200
+ "@happyvertical/sql": "^0.103.7",
201
+ "@happyvertical/utils": "^0.103.7",
197
202
  "@noble/hashes": "^2.4.0",
198
203
  "@oxc-project/runtime": "^0.150.0",
199
204
  "cheerio": "^1.2.0",
200
205
  "fast-glob": "3.3.3",
206
+ "import-meta-resolve": "4.2.0",
201
207
  "minimatch": "10.2.6",
202
208
  "oxc-transform": "0.150.0",
203
209
  "pluralize": "^8.0.0",
@@ -1,169 +0,0 @@
1
- import { setU64FromNum } from "./_u64.js";
2
- import { abytes, aexists, aoutput, createView } from "./utils.js";
3
- //#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_md.js
4
- /**
5
- * Internal Merkle-Damgard hash utils.
6
- * @module
7
- */
8
- /**
9
- * Shared 32-bit conditional boolean primitive reused by SHA-256, SHA-1, and MD5 `F`.
10
- * Returns bits from `b` when `a` is set, otherwise from `c`.
11
- * The XOR form is equivalent to MD5's `F(X,Y,Z) = XY v not(X)Z` because the masked terms never
12
- * set the same bit.
13
- * @param a - selector word
14
- * @param b - word chosen when selector bit is set
15
- * @param c - word chosen when selector bit is clear
16
- * @returns Mixed 32-bit word.
17
- * @example
18
- * Combine three words with the shared 32-bit choice primitive.
19
- * ```ts
20
- * Chi(0xffffffff, 0x12345678, 0x87654321);
21
- * ```
22
- */
23
- function Chi(a, b, c) {
24
- return a & b ^ ~a & c;
25
- }
26
- /**
27
- * Shared 32-bit majority primitive reused by SHA-256 and SHA-1.
28
- * Returns bits shared by at least two inputs.
29
- * @param a - first input word
30
- * @param b - second input word
31
- * @param c - third input word
32
- * @returns Mixed 32-bit word.
33
- * @example
34
- * Combine three words with the shared 32-bit majority primitive.
35
- * ```ts
36
- * Maj(0xffffffff, 0x12345678, 0x87654321);
37
- * ```
38
- */
39
- function Maj(a, b, c) {
40
- return a & b ^ a & c ^ b & c;
41
- }
42
- /**
43
- * Merkle-Damgard hash construction base class.
44
- * Could be used to create MD5, RIPEMD, SHA1, SHA2.
45
- * Accepts only byte-aligned `Uint8Array` input, even when the underlying spec describes bit
46
- * strings with partial-byte tails.
47
- * @param blockLen - internal block size in bytes
48
- * @param outputLen - digest size in bytes
49
- * @param padOffset - trailing length field size in bytes
50
- * @param isLE - whether length and state words are encoded in little-endian
51
- * @example
52
- * Use a concrete subclass to get the shared Merkle-Damgard update/digest flow.
53
- * ```ts
54
- * import { _SHA1 } from '@noble/hashes/legacy.js';
55
- * const hash = new _SHA1();
56
- * hash.update(new Uint8Array([97, 98, 99]));
57
- * hash.digest();
58
- * ```
59
- */
60
- var HashMD = class {
61
- blockLen;
62
- outputLen;
63
- canXOF = false;
64
- padOffset;
65
- isLE;
66
- buffer;
67
- view;
68
- finished = false;
69
- length = 0;
70
- pos = 0;
71
- destroyed = false;
72
- constructor(blockLen, outputLen, padOffset, isLE) {
73
- this.blockLen = blockLen;
74
- this.outputLen = outputLen;
75
- this.padOffset = padOffset;
76
- this.isLE = isLE;
77
- this.buffer = new Uint8Array(blockLen);
78
- this.view = createView(this.buffer);
79
- }
80
- update(data) {
81
- aexists(this);
82
- abytes(data);
83
- const { view, buffer, blockLen } = this;
84
- const len = data.length;
85
- let processed = false;
86
- for (let pos = 0; pos < len;) {
87
- const take = Math.min(blockLen - this.pos, len - pos);
88
- if (take === blockLen) {
89
- const dataView = createView(data);
90
- for (; blockLen <= len - pos; pos += blockLen) this.process(dataView, pos);
91
- processed = true;
92
- continue;
93
- }
94
- buffer.set(pos === 0 && take === len ? data : data.subarray(pos, pos + take), this.pos);
95
- this.pos += take;
96
- pos += take;
97
- if (this.pos === blockLen) {
98
- this.process(view, 0);
99
- this.pos = 0;
100
- processed = true;
101
- }
102
- }
103
- this.length += data.length;
104
- if (processed) this.roundClean();
105
- return this;
106
- }
107
- digestInto(out) {
108
- aexists(this);
109
- aoutput(out, this);
110
- this.finished = true;
111
- const { buffer, view, blockLen, isLE } = this;
112
- let { pos } = this;
113
- buffer[pos++] = 128;
114
- buffer.fill(0, pos);
115
- if (this.padOffset > blockLen - pos) {
116
- this.process(view, 0);
117
- buffer.fill(0);
118
- }
119
- setU64FromNum(view, blockLen - 8, this.length * 8, isLE);
120
- this.process(view, 0);
121
- this.roundClean();
122
- const oview = out === buffer ? view : createView(out);
123
- const len = this.outputLen;
124
- const outLen = len / 4;
125
- const state = this.get();
126
- if (len % 4 || outLen > state.length) throw new Error("invalid outputLen");
127
- for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);
128
- }
129
- digest() {
130
- const { buffer, outputLen } = this;
131
- this.digestInto(buffer);
132
- const res = buffer.slice(0, outputLen);
133
- this.destroy();
134
- return res;
135
- }
136
- _cloneIntoMeta(to) {
137
- const { buffer, length, finished, destroyed, pos } = this;
138
- to.destroyed = destroyed;
139
- to.finished = finished;
140
- to.length = length;
141
- to.pos = pos;
142
- if (pos) to.buffer.set(buffer);
143
- return to;
144
- }
145
- clone() {
146
- return this._cloneInto();
147
- }
148
- };
149
- /**
150
- * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
151
- * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
152
- */
153
- /** Initial SHA256 state from RFC 6234 §6.1: the first 32 bits of the fractional parts of the
154
- * square roots of the first eight prime numbers. Exported as a shared table; callers must treat
155
- * it as read-only because constructors copy words from it by index. */
156
- var SHA256_IV = /* @__PURE__ */ Uint32Array.from([
157
- 1779033703,
158
- 3144134277,
159
- 1013904242,
160
- 2773480762,
161
- 1359893119,
162
- 2600822924,
163
- 528734635,
164
- 1541459225
165
- ]);
166
- //#endregion
167
- export { Chi, HashMD, Maj, SHA256_IV };
168
-
169
- //# sourceMappingURL=_md.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_md.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_md.js"],"sourcesContent":["/**\n * Internal Merkle-Damgard hash utils.\n * @module\n */\nimport { setU64FromNum } from \"./_u64.js\";\nimport { abytes, aexists, aoutput, createView } from \"./utils.js\";\n/**\n * Shared 32-bit conditional boolean primitive reused by SHA-256, SHA-1, and MD5 `F`.\n * Returns bits from `b` when `a` is set, otherwise from `c`.\n * The XOR form is equivalent to MD5's `F(X,Y,Z) = XY v not(X)Z` because the masked terms never\n * set the same bit.\n * @param a - selector word\n * @param b - word chosen when selector bit is set\n * @param c - word chosen when selector bit is clear\n * @returns Mixed 32-bit word.\n * @example\n * Combine three words with the shared 32-bit choice primitive.\n * ```ts\n * Chi(0xffffffff, 0x12345678, 0x87654321);\n * ```\n */\nexport function Chi(a, b, c) {\n return (a & b) ^ (~a & c);\n}\n/**\n * Shared 32-bit majority primitive reused by SHA-256 and SHA-1.\n * Returns bits shared by at least two inputs.\n * @param a - first input word\n * @param b - second input word\n * @param c - third input word\n * @returns Mixed 32-bit word.\n * @example\n * Combine three words with the shared 32-bit majority primitive.\n * ```ts\n * Maj(0xffffffff, 0x12345678, 0x87654321);\n * ```\n */\nexport function Maj(a, b, c) {\n return (a & b) ^ (a & c) ^ (b & c);\n}\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n * Accepts only byte-aligned `Uint8Array` input, even when the underlying spec describes bit\n * strings with partial-byte tails.\n * @param blockLen - internal block size in bytes\n * @param outputLen - digest size in bytes\n * @param padOffset - trailing length field size in bytes\n * @param isLE - whether length and state words are encoded in little-endian\n * @example\n * Use a concrete subclass to get the shared Merkle-Damgard update/digest flow.\n * ```ts\n * import { _SHA1 } from '@noble/hashes/legacy.js';\n * const hash = new _SHA1();\n * hash.update(new Uint8Array([97, 98, 99]));\n * hash.digest();\n * ```\n */\nexport class HashMD {\n blockLen;\n outputLen;\n canXOF = false;\n padOffset;\n isLE;\n // For partial updates less than block size\n buffer;\n view;\n finished = false;\n length = 0;\n pos = 0;\n destroyed = false;\n constructor(blockLen, outputLen, padOffset, isLE) {\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n abytes(data);\n const { view, buffer, blockLen } = this;\n const len = data.length;\n let processed = false;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path only when there is no buffered partial block: `take === blockLen` implies\n // `this.pos === 0`, so we can process full blocks directly from the input view.\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n processed = true;\n continue;\n }\n // When the whole input is buffered in one go (common for short messages), passing `data`\n // directly avoids allocating a subarray view.\n buffer.set(pos === 0 && take === len ? data : data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n processed = true;\n }\n }\n this.length += data.length;\n // Shared schedule buffers only pick up input-derived words inside process(); if everything\n // was buffered without processing, there is nothing to zero.\n if (processed)\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message, then zero-pad the rest of the block\n buffer[pos++] = 0b10000000;\n buffer.fill(0, pos);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n buffer.fill(0);\n }\n // `padOffset` reserves the whole length field. For SHA-384/512 the high 64 bits stay zero from\n // the padding fill above, and JS will overflow before user input can make that half non-zero.\n // So we only need to write the low 64 bits here (`length * 8` only scales the exponent of an\n // integer below 2**53, so the split inside the helper stays exact).\n setU64FromNum(view, blockLen - 8, this.length * 8, isLE);\n this.process(view, 0);\n // The final block above is processed outside update(), so the shared message-schedule\n // buffers (e.g. SHA256_W) would otherwise retain input-derived words after digest().\n this.roundClean();\n // digest() passes our own `buffer` as `out`; reuse its cached view instead of allocating one.\n const oview = out === buffer ? view : createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which must be fused in single op with modulo by JIT\n const outLen = len / 4;\n const state = this.get();\n // Subclass-misconfiguration invariant: outputLen must be 32-bit aligned and fit the state.\n if (len % 4 || outLen > state.length)\n throw new Error('invalid outputLen');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n // Copy before destroy(): subclasses wipe `buffer` during cleanup, but `digest()` must return\n // fresh bytes to the caller.\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneIntoMeta(to) {\n const { buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n // Only partial-block bytes need copying: when `length % blockLen === 0`, `pos === 0` and\n // later `update()` / `digestInto()` overwrite `to.buffer` from the start before reading it.\n if (pos)\n to.buffer.set(buffer); // Avoid a hot modulo guard.\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n}\n/**\n * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.\n * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.\n */\n/** Initial SHA256 state from RFC 6234 §6.1: the first 32 bits of the fractional parts of the\n * square roots of the first eight prime numbers. Exported as a shared table; callers must treat\n * it as read-only because constructors copy words from it by index. */\nexport const SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,\n]);\n/** Initial SHA224 state `H(0)` from RFC 6234 §6.1. Exported as a shared table; callers must\n * treat it as read-only because constructors copy words from it by index. */\nexport const SHA224_IV = /* @__PURE__ */ Uint32Array.from([\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4,\n]);\n/** Initial SHA384 state from RFC 6234 §6.3: eight RFC 64-bit `H(0)` words stored as sixteen\n * big-endian 32-bit halves. Derived from the fractional parts of the square roots of the ninth\n * through sixteenth prime numbers. Exported as a shared table; callers must treat it as read-only\n * because constructors copy halves from it by index. */\nexport const SHA384_IV = /* @__PURE__ */ Uint32Array.from([\n 0xcbbb9d5d, 0xc1059ed8, 0x629a292a, 0x367cd507, 0x9159015a, 0x3070dd17, 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31, 0x8eb44a87, 0x68581511, 0xdb0c2e0d, 0x64f98fa7, 0x47b5481d, 0xbefa4fa4,\n]);\n/** Initial SHA512 state from RFC 6234 §6.3: eight RFC 64-bit `H(0)` words stored as sixteen\n * big-endian 32-bit halves. Derived from the fractional parts of the square roots of the first\n * eight prime numbers. Exported as a shared table; callers must treat it as read-only because\n * constructors copy halves from it by index. */\nexport const SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 0x6a09e667, 0xf3bcc908, 0xbb67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J,OAAO,KAAK,WAAW;CAC3B;AACJ;;;;;;;;AAQA,IAAa,YAA4B,4BAAY,KAAK;CACtD;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;AACxF,CAAC"}
@@ -1,13 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_u64.js
2
- var fromNumH = (n) => n / 2 ** 32 | 0;
3
- var fromNumL = (n) => n >>> 0;
4
- function setU64FromNum(view, byteOffset, n, isLE) {
5
- const h = fromNumH(n);
6
- const l = fromNumL(n);
7
- view.setUint32(byteOffset, isLE ? l : h, isLE);
8
- view.setUint32(byteOffset + 4, isLE ? h : l, isLE);
9
- }
10
- //#endregion
11
- export { fromNumH, fromNumL, setU64FromNum };
12
-
13
- //# sourceMappingURL=_u64.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_u64.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/_u64.js"],"sourcesContent":["const U32_MASK64 = /* @__PURE__ */ (() => BigInt(2 ** 32 - 1))();\nconst _32n = /* @__PURE__ */ BigInt(32);\n// Split bigint into two 32-bit halves. With `le=true`, returned fields become `{ h: low, l: high\n// }` to match little-endian word order rather than the property names.\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\n// Split bigint list into `[highWords, lowWords]` when `le=false`; with `le=true`, the first array\n// holds the low halves because `fromBig(...)` swaps the semantic meaning of `h` and `l`.\nfunction split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\n// Combine explicit `(high, low)` 32-bit halves into a bigint; `>>> 0` normalizes signed JS\n// bitwise results back to uint32 first, and little-endian callers must swap.\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// Split a JS number into u32 halves without a BigInt allocation. Exact only for integers\n// `0 <= n < 2**53`; callers use it on byte / bit counters, which JS length math caps far below\n// that (an ArrayBuffer cannot exceed 2**53 - 1 bytes).\nconst fromNumH = (n) => (n / 2 ** 32) | 0;\nconst fromNumL = (n) => n >>> 0;\n// Drop-in replacement for `view.setBigUint64(byteOffset, BigInt(n), isLE)` without the per-call\n// BigInt allocation. Same `n < 2**53` precondition as `fromNumH`/`fromNumL`.\nfunction setU64FromNum(view, byteOffset, n, isLE) {\n const h = fromNumH(n);\n const l = fromNumL(n);\n view.setUint32(byteOffset, isLE ? l : h, isLE);\n view.setUint32(byteOffset + 4, isLE ? h : l, isLE);\n}\n// High 32-bit half of a 64-bit logical right shift for `s` in `0..31`.\nconst shrSH = (h, _l, s) => h >>> s;\n// Low 32-bit half of a 64-bit logical right shift, valid for `s` in `1..31`.\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// High 32-bit half of a 64-bit right rotate, valid for `s` in `1..31`.\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\n// Low 32-bit half of a 64-bit right rotate, valid for `s` in `1..31`.\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// High 32-bit half of a 64-bit right rotate, valid for `s` in `33..63`; `32` uses `rotr32*`.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\n// Low 32-bit half of a 64-bit right rotate, valid for `s` in `33..63`; `32` uses `rotr32*`.\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// High 32-bit half of a 64-bit right rotate for `s === 32`; this is just the swapped low half.\nconst rotr32H = (_h, l) => l;\n// Low 32-bit half of a 64-bit right rotate for `s === 32`; this is just the swapped high half.\nconst rotr32L = (h, _l) => h;\n// 64-bit left rotates (rotl*) are not defined here: sha3.ts, their only consumer, keeps\n// local copies so V8 inlines them into keccakP.\n// Add two split 64-bit words and return the split `{ h, l }` sum.\n// JS uses 32-bit signed integers for bitwise operations, so we cannot simply shift the carry out\n// of the low sum and instead use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\n// Unmasked low-word accumulator for 3-way addition; pass the raw result into `add3H(...)`.\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n// High-word finalize step for 3-way addition; `low` must be the untruncated output of `add3L(...)`.\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\n// Unmasked low-word accumulator for 4-way addition; pass the raw result into `add4H(...)`.\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n// High-word finalize step for 4-way addition; `low` must be the untruncated output of `add4L(...)`.\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\n// Unmasked low-word accumulator for 5-way addition; pass the raw result into `add5H(...)`.\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n// High-word finalize step for 5-way addition; `low` must be the untruncated output of `add5L(...)`.\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, fromNumH, fromNumL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, setU64FromNum, shrSH, shrSL, split, toBig };\n"],"x_google_ignoreList":[0],"mappings":";AA2BA,IAAM,YAAY,MAAO,IAAI,KAAK,KAAM;AACxC,IAAM,YAAY,MAAM,MAAM;AAG9B,SAAS,cAAc,MAAM,YAAY,GAAG,MAAM;CAC9C,MAAM,IAAI,SAAS,CAAC;CACpB,MAAM,IAAI,SAAS,CAAC;CACpB,KAAK,UAAU,YAAY,OAAO,IAAI,GAAG,IAAI;CAC7C,KAAK,UAAU,aAAa,GAAG,OAAO,IAAI,GAAG,IAAI;AACrD"}
@@ -1,198 +0,0 @@
1
- import { clean, createHasher, oidNist, rotr } from "./utils.js";
2
- import { Chi, HashMD, Maj, SHA256_IV } from "./_md.js";
3
- //#region ../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/sha2.js
4
- /**
5
- * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.
6
- * SHA256 is the fastest hash implementable in JS, even faster than Blake3.
7
- * Check out {@link https://www.rfc-editor.org/rfc/rfc4634 | RFC 4634} and
8
- * {@link https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf | FIPS 180-4}.
9
- * @module
10
- */
11
- /**
12
- * SHA-224 / SHA-256 round constants from RFC 6234 §5.1: the first 32 bits
13
- * of the cube roots of the first 64 primes (2..311).
14
- */
15
- var SHA256_K = /* @__PURE__ */ Uint32Array.from([
16
- 1116352408,
17
- 1899447441,
18
- 3049323471,
19
- 3921009573,
20
- 961987163,
21
- 1508970993,
22
- 2453635748,
23
- 2870763221,
24
- 3624381080,
25
- 310598401,
26
- 607225278,
27
- 1426881987,
28
- 1925078388,
29
- 2162078206,
30
- 2614888103,
31
- 3248222580,
32
- 3835390401,
33
- 4022224774,
34
- 264347078,
35
- 604807628,
36
- 770255983,
37
- 1249150122,
38
- 1555081692,
39
- 1996064986,
40
- 2554220882,
41
- 2821834349,
42
- 2952996808,
43
- 3210313671,
44
- 3336571891,
45
- 3584528711,
46
- 113926993,
47
- 338241895,
48
- 666307205,
49
- 773529912,
50
- 1294757372,
51
- 1396182291,
52
- 1695183700,
53
- 1986661051,
54
- 2177026350,
55
- 2456956037,
56
- 2730485921,
57
- 2820302411,
58
- 3259730800,
59
- 3345764771,
60
- 3516065817,
61
- 3600352804,
62
- 4094571909,
63
- 275423344,
64
- 430227734,
65
- 506948616,
66
- 659060556,
67
- 883997877,
68
- 958139571,
69
- 1322822218,
70
- 1537002063,
71
- 1747873779,
72
- 1955562222,
73
- 2024104815,
74
- 2227730452,
75
- 2361852424,
76
- 2428436474,
77
- 2756734187,
78
- 3204031479,
79
- 3329325298
80
- ]);
81
- /** Reusable SHA-224 / SHA-256 message schedule buffer `W_t` from RFC 6234 §6.2 step 1. */
82
- var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
83
- /** Internal SHA-224 / SHA-256 compression engine from RFC 6234 §6.2. */
84
- var SHA2_32B = class extends HashMD {
85
- A = 0;
86
- B = 0;
87
- C = 0;
88
- D = 0;
89
- E = 0;
90
- F = 0;
91
- G = 0;
92
- H = 0;
93
- constructor(outputLen, IV) {
94
- super(64, outputLen, 8, false);
95
- this.A = IV[0] | 0;
96
- this.B = IV[1] | 0;
97
- this.C = IV[2] | 0;
98
- this.D = IV[3] | 0;
99
- this.E = IV[4] | 0;
100
- this.F = IV[5] | 0;
101
- this.G = IV[6] | 0;
102
- this.H = IV[7] | 0;
103
- }
104
- get() {
105
- const { A, B, C, D, E, F, G, H } = this;
106
- return [
107
- A,
108
- B,
109
- C,
110
- D,
111
- E,
112
- F,
113
- G,
114
- H
115
- ];
116
- }
117
- set(A, B, C, D, E, F, G, H) {
118
- this.A = A | 0;
119
- this.B = B | 0;
120
- this.C = C | 0;
121
- this.D = D | 0;
122
- this.E = E | 0;
123
- this.F = F | 0;
124
- this.G = G | 0;
125
- this.H = H | 0;
126
- }
127
- _cloneInto(to) {
128
- (to ||= new this.constructor()).set(...this.get());
129
- return this._cloneIntoMeta(to);
130
- }
131
- process(view, offset) {
132
- for (let i = 0; i < 16; i++, offset += 4) SHA256_W[i] = view.getUint32(offset, false);
133
- for (let i = 16; i < 64; i++) {
134
- const W15 = SHA256_W[i - 15];
135
- const W2 = SHA256_W[i - 2];
136
- const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;
137
- SHA256_W[i] = (rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10) + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;
138
- }
139
- let { A, B, C, D, E, F, G, H } = this;
140
- for (let i = 0; i < 64; i++) {
141
- const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
142
- const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;
143
- const T2 = (rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22)) + Maj(A, B, C) | 0;
144
- H = G;
145
- G = F;
146
- F = E;
147
- E = D + T1 | 0;
148
- D = C;
149
- C = B;
150
- B = A;
151
- A = T1 + T2 | 0;
152
- }
153
- A = A + this.A | 0;
154
- B = B + this.B | 0;
155
- C = C + this.C | 0;
156
- D = D + this.D | 0;
157
- E = E + this.E | 0;
158
- F = F + this.F | 0;
159
- G = G + this.G | 0;
160
- H = H + this.H | 0;
161
- this.set(A, B, C, D, E, F, G, H);
162
- }
163
- roundClean() {
164
- clean(SHA256_W);
165
- }
166
- destroy() {
167
- this.destroyed = true;
168
- this.set(0, 0, 0, 0, 0, 0, 0, 0);
169
- clean(this.buffer);
170
- }
171
- };
172
- /** Internal SHA-256 hash class grounded in RFC 6234 §6.2. */
173
- var _SHA256 = class extends SHA2_32B {
174
- constructor() {
175
- super(32, SHA256_IV);
176
- }
177
- };
178
- /**
179
- * SHA2-256 hash function from RFC 4634. In JS it's the fastest: even faster than Blake3. Some info:
180
- *
181
- * - Trying 2^128 hashes would get 50% chance of collision, using birthday attack.
182
- * - BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
183
- * - Each sha256 hash is executing 2^18 bit operations.
184
- * - Good 2024 ASICs can do 200Th/sec with 3500 watts of power, corresponding to 2^36 hashes/joule.
185
- * @param msg - message bytes to hash
186
- * @param opts - Reserved hash options.
187
- * @returns Digest bytes.
188
- * @example
189
- * Hash a message with SHA2-256.
190
- * ```ts
191
- * sha256(new Uint8Array([97, 98, 99]));
192
- * ```
193
- */
194
- var sha256 = /* @__PURE__ */ createHasher(() => new _SHA256(), /* @__PURE__ */ oidNist(1));
195
- //#endregion
196
- export { _SHA256, sha256 };
197
-
198
- //# sourceMappingURL=sha2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sha2.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@noble+hashes@2.4.0/node_modules/@noble/hashes/sha2.js"],"sourcesContent":["/**\n * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.\n * SHA256 is the fastest hash implementable in JS, even faster than Blake3.\n * Check out {@link https://www.rfc-editor.org/rfc/rfc4634 | RFC 4634} and\n * {@link https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf | FIPS 180-4}.\n * @module\n */\nimport { Chi, HashMD, Maj, SHA224_IV, SHA256_IV, SHA384_IV, SHA512_IV } from \"./_md.js\";\nimport * as u64 from \"./_u64.js\";\nimport { clean, createHasher, oidNist, rotr } from \"./utils.js\";\n/**\n * SHA-224 / SHA-256 round constants from RFC 6234 §5.1: the first 32 bits\n * of the cube roots of the first 64 primes (2..311).\n */\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n/** Reusable SHA-224 / SHA-256 message schedule buffer `W_t` from RFC 6234 §6.2 step 1. */\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n/** Internal SHA-224 / SHA-256 compression engine from RFC 6234 §6.2. */\nclass SHA2_32B extends HashMD {\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n // Numeric initializers matter: starting the fields as `undefined` changes\n // V8's field representation and makes sha256 3x slower (measured).\n A = 0;\n B = 0;\n C = 0;\n D = 0;\n E = 0;\n F = 0;\n G = 0;\n H = 0;\n constructor(outputLen, IV) {\n super(64, outputLen, 8, false);\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n _cloneInto(to) {\n (to ||= new this.constructor()).set(...this.get());\n return this._cloneIntoMeta(to);\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n // HashMD callers route post-destroy usability through `destroyed`; zeroizing alone still leaves\n // update()/digest() callable on reused instances.\n this.destroyed = true;\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n}\n/** Internal SHA-256 hash class grounded in RFC 6234 §6.2. */\nexport class _SHA256 extends SHA2_32B {\n constructor() {\n super(32, SHA256_IV);\n }\n}\n/** Internal SHA-224 hash class grounded in RFC 6234 §6.2 and §8.5. */\nexport class _SHA224 extends SHA2_32B {\n constructor() {\n super(28, SHA224_IV);\n }\n}\n// SHA2-512 is slower than sha256 in js because u64 operations are slow.\n// SHA-384 / SHA-512 round constants from RFC 6234 §5.2:\n// 80 full 64-bit words split into high/low halves.\n// prettier-ignore\nconst K512 = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\nconst SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\nconst SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n// Reusable high-half schedule buffer for the RFC 6234 §6.4 64-bit `W_t` words.\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n// Reusable low-half schedule buffer for the RFC 6234 §6.4 64-bit `W_t` words.\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n/** Internal SHA-384 / SHA-512 compression engine from RFC 6234 §6.4. */\nclass SHA2_64B extends HashMD {\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n // h -- high 32 bits, l -- low 32 bits\n // Numeric initializers matter: starting the fields as `undefined` changes\n // V8's field representation and slows hashing down (measured on sha256).\n Ah = 0;\n Al = 0;\n Bh = 0;\n Bl = 0;\n Ch = 0;\n Cl = 0;\n Dh = 0;\n Dl = 0;\n Eh = 0;\n El = 0;\n Fh = 0;\n Fl = 0;\n Gh = 0;\n Gl = 0;\n Hh = 0;\n Hl = 0;\n constructor(outputLen, IV) {\n super(128, outputLen, 16, false);\n this.Ah = IV[0] | 0;\n this.Al = IV[1] | 0;\n this.Bh = IV[2] | 0;\n this.Bl = IV[3] | 0;\n this.Ch = IV[4] | 0;\n this.Cl = IV[5] | 0;\n this.Dh = IV[6] | 0;\n this.Dl = IV[7] | 0;\n this.Eh = IV[8] | 0;\n this.El = IV[9] | 0;\n this.Fh = IV[10] | 0;\n this.Fl = IV[11] | 0;\n this.Gh = IV[12] | 0;\n this.Gl = IV[13] | 0;\n this.Hh = IV[14] | 0;\n this.Hl = IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n _cloneInto(to) {\n (to ||= new this.constructor()).set(...this.get());\n return this._cloneIntoMeta(to);\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA512_W[i] = s0 + s1 + SHA512_W[i - 7] + SHA512_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n // HashMD callers route post-destroy usability through `destroyed`; zeroizing alone still leaves\n // update()/digest() callable on reused instances.\n this.destroyed = true;\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\n/** Internal SHA-512 hash class grounded in RFC 6234 §6.3 and §6.4. */\nexport class _SHA512 extends SHA2_64B {\n constructor() {\n super(64, SHA512_IV);\n }\n}\n/** Internal SHA-384 hash class grounded in RFC 6234 §6.3 and §6.4. */\nexport class _SHA384 extends SHA2_64B {\n constructor() {\n super(48, SHA384_IV);\n }\n}\n/**\n * Truncated SHA512/256 and SHA512/224.\n * SHA512_IV is XORed with 0xa5a5a5a5a5a5a5a5, then used as \"intermediary\" IV of SHA512/t.\n * Then t hashes string to produce result IV.\n * See the repo-side derivation recipe in `test/misc/sha2-gen-iv.js`.\n * These IV literals are checked against that script rather than a dedicated\n * local RFC section.\n */\n/** SHA-512/224 IV derived by the SHA-512/t recipe in `test/misc/sha2-gen-iv.js` and\n * stored as sixteen big-endian 32-bit halves. */\nconst T224_IV = /* @__PURE__ */ Uint32Array.from([\n 0x8c3d37c8, 0x19544da2, 0x73e19966, 0x89dcd4d6, 0x1dfab7ae, 0x32ff9c82, 0x679dd514, 0x582f9fcf,\n 0x0f6d2b69, 0x7bd44da8, 0x77e36f73, 0x04c48942, 0x3f9d85a8, 0x6a1d36c8, 0x1112e6ad, 0x91d692a1,\n]);\n/** SHA-512/256 IV derived by the SHA-512/t recipe in `test/misc/sha2-gen-iv.js` and\n * stored as sixteen big-endian 32-bit halves. */\nconst T256_IV = /* @__PURE__ */ Uint32Array.from([\n 0x22312194, 0xfc2bf72c, 0x9f555fa3, 0xc84c64c2, 0x2393b86b, 0x6f53b151, 0x96387719, 0x5940eabd,\n 0x96283ee2, 0xa88effe3, 0xbe5e1e25, 0x53863992, 0x2b0199fc, 0x2c85b8aa, 0x0eb72ddc, 0x81c52ca2,\n]);\n/** Internal SHA-512/224 hash class using the derived `T224_IV` and the shared\n * RFC 6234 §6.4 compression engine. */\nexport class _SHA512_224 extends SHA2_64B {\n constructor() {\n super(28, T224_IV);\n }\n}\n/** Internal SHA-512/256 hash class using the derived `T256_IV` and the shared\n * RFC 6234 §6.4 compression engine. */\nexport class _SHA512_256 extends SHA2_64B {\n constructor() {\n super(32, T256_IV);\n }\n}\n/**\n * SHA2-256 hash function from RFC 4634. In JS it's the fastest: even faster than Blake3. Some info:\n *\n * - Trying 2^128 hashes would get 50% chance of collision, using birthday attack.\n * - BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.\n * - Each sha256 hash is executing 2^18 bit operations.\n * - Good 2024 ASICs can do 200Th/sec with 3500 watts of power, corresponding to 2^36 hashes/joule.\n * @param msg - message bytes to hash\n * @param opts - Reserved hash options.\n * @returns Digest bytes.\n * @example\n * Hash a message with SHA2-256.\n * ```ts\n * sha256(new Uint8Array([97, 98, 99]));\n * ```\n */\nexport const sha256 = /* @__PURE__ */ createHasher(() => new _SHA256(), \n/* @__PURE__ */ oidNist(0x01));\n/**\n * SHA2-224 hash function from RFC 4634.\n * @param msg - message bytes to hash\n * @param opts - Reserved hash options.\n * @returns Digest bytes.\n * @example\n * Hash a message with SHA2-224.\n * ```ts\n * sha224(new Uint8Array([97, 98, 99]));\n * ```\n */\nexport const sha224 = /* @__PURE__ */ createHasher(() => new _SHA224(), \n/* @__PURE__ */ oidNist(0x04));\n/**\n * SHA2-512 hash function from RFC 4634.\n * @param msg - message bytes to hash\n * @param opts - Reserved hash options.\n * @returns Digest bytes.\n * @example\n * Hash a message with SHA2-512.\n * ```ts\n * sha512(new Uint8Array([97, 98, 99]));\n * ```\n */\nexport const sha512 = /* @__PURE__ */ createHasher(() => new _SHA512(), \n/* @__PURE__ */ oidNist(0x03));\n/**\n * SHA2-384 hash function from RFC 4634.\n * @param msg - message bytes to hash\n * @param opts - Reserved hash options.\n * @returns Digest bytes.\n * @example\n * Hash a message with SHA2-384.\n * ```ts\n * sha384(new Uint8Array([97, 98, 99]));\n * ```\n */\nexport const sha384 = /* @__PURE__ */ createHasher(() => new _SHA384(), \n/* @__PURE__ */ oidNist(0x02));\n/**\n * SHA2-512/256 \"truncated\" hash function, with improved resistance to length extension attacks.\n * See the paper on {@link https://eprint.iacr.org/2010/548.pdf | truncated SHA512}.\n * @param msg - message bytes to hash\n * @param opts - Reserved hash options.\n * @returns Digest bytes.\n * @example\n * Hash a message with SHA2-512/256.\n * ```ts\n * sha512_256(new Uint8Array([97, 98, 99]));\n * ```\n */\nexport const sha512_256 = /* @__PURE__ */ createHasher(() => new _SHA512_256(), \n/* @__PURE__ */ oidNist(0x06));\n/**\n * SHA2-512/224 \"truncated\" hash function, with improved resistance to length extension attacks.\n * See the paper on {@link https://eprint.iacr.org/2010/548.pdf | truncated SHA512}.\n * @param msg - message bytes to hash\n * @param opts - Reserved hash options.\n * @returns Digest bytes.\n * @example\n * Hash a message with SHA2-512/224.\n * ```ts\n * sha512_224(new Uint8Array([97, 98, 99]));\n * ```\n */\nexport const sha512_224 = /* @__PURE__ */ createHasher(() => new _SHA512_224(), \n/* @__PURE__ */ oidNist(0x05));\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;AAeA,IAAM,WAA2B,4BAAY,KAAK;CAC9C;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CAAY;CACpF;CAAY;CAAY;CAAY;CAAY;C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