@glasstrace/sdk 0.17.3 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13953,10 +13953,152 @@ var DEFAULT_CAPTURE_CONFIG = {
13953
13953
  consoleErrors: false,
13954
13954
  errorResponseBodies: false
13955
13955
  };
13956
+ var K = new Uint32Array([
13957
+ 1116352408,
13958
+ 1899447441,
13959
+ 3049323471,
13960
+ 3921009573,
13961
+ 961987163,
13962
+ 1508970993,
13963
+ 2453635748,
13964
+ 2870763221,
13965
+ 3624381080,
13966
+ 310598401,
13967
+ 607225278,
13968
+ 1426881987,
13969
+ 1925078388,
13970
+ 2162078206,
13971
+ 2614888103,
13972
+ 3248222580,
13973
+ 3835390401,
13974
+ 4022224774,
13975
+ 264347078,
13976
+ 604807628,
13977
+ 770255983,
13978
+ 1249150122,
13979
+ 1555081692,
13980
+ 1996064986,
13981
+ 2554220882,
13982
+ 2821834349,
13983
+ 2952996808,
13984
+ 3210313671,
13985
+ 3336571891,
13986
+ 3584528711,
13987
+ 113926993,
13988
+ 338241895,
13989
+ 666307205,
13990
+ 773529912,
13991
+ 1294757372,
13992
+ 1396182291,
13993
+ 1695183700,
13994
+ 1986661051,
13995
+ 2177026350,
13996
+ 2456956037,
13997
+ 2730485921,
13998
+ 2820302411,
13999
+ 3259730800,
14000
+ 3345764771,
14001
+ 3516065817,
14002
+ 3600352804,
14003
+ 4094571909,
14004
+ 275423344,
14005
+ 430227734,
14006
+ 506948616,
14007
+ 659060556,
14008
+ 883997877,
14009
+ 958139571,
14010
+ 1322822218,
14011
+ 1537002063,
14012
+ 1747873779,
14013
+ 1955562222,
14014
+ 2024104815,
14015
+ 2227730452,
14016
+ 2361852424,
14017
+ 2428436474,
14018
+ 2756734187,
14019
+ 3204031479,
14020
+ 3329325298
14021
+ ]);
14022
+ function rotr(x, n) {
14023
+ return (x >>> n | x << 32 - n) >>> 0;
14024
+ }
14025
+ function sha256Hex(input) {
14026
+ const message = new TextEncoder().encode(input);
14027
+ const bitLength = message.length * 8;
14028
+ const paddedLength = Math.ceil((message.length + 9) / 64) * 64;
14029
+ const padded = new Uint8Array(paddedLength);
14030
+ padded.set(message);
14031
+ padded[message.length] = 128;
14032
+ const view = new DataView(padded.buffer);
14033
+ view.setUint32(paddedLength - 8, Math.floor(bitLength / 4294967296), false);
14034
+ view.setUint32(paddedLength - 4, bitLength >>> 0, false);
14035
+ const H = new Uint32Array([
14036
+ 1779033703,
14037
+ 3144134277,
14038
+ 1013904242,
14039
+ 2773480762,
14040
+ 1359893119,
14041
+ 2600822924,
14042
+ 528734635,
14043
+ 1541459225
14044
+ ]);
14045
+ const W = new Uint32Array(64);
14046
+ for (let offset = 0; offset < paddedLength; offset += 64) {
14047
+ for (let i = 0; i < 16; i++) {
14048
+ W[i] = view.getUint32(offset + i * 4, false);
14049
+ }
14050
+ for (let i = 16; i < 64; i++) {
14051
+ const s0 = rotr(W[i - 15], 7) ^ rotr(W[i - 15], 18) ^ W[i - 15] >>> 3;
14052
+ const s1 = rotr(W[i - 2], 17) ^ rotr(W[i - 2], 19) ^ W[i - 2] >>> 10;
14053
+ W[i] = W[i - 16] + s0 + W[i - 7] + s1 >>> 0;
14054
+ }
14055
+ let a = H[0];
14056
+ let b = H[1];
14057
+ let c = H[2];
14058
+ let d = H[3];
14059
+ let e = H[4];
14060
+ let f = H[5];
14061
+ let g = H[6];
14062
+ let h = H[7];
14063
+ for (let i = 0; i < 64; i++) {
14064
+ const S1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
14065
+ const ch = e & f ^ ~e & g;
14066
+ const temp1 = h + S1 + ch + K[i] + W[i] >>> 0;
14067
+ const S0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
14068
+ const maj = a & b ^ a & c ^ b & c;
14069
+ const temp2 = S0 + maj >>> 0;
14070
+ h = g;
14071
+ g = f;
14072
+ f = e;
14073
+ e = d + temp1 >>> 0;
14074
+ d = c;
14075
+ c = b;
14076
+ b = a;
14077
+ a = temp1 + temp2 >>> 0;
14078
+ }
14079
+ H[0] = H[0] + a >>> 0;
14080
+ H[1] = H[1] + b >>> 0;
14081
+ H[2] = H[2] + c >>> 0;
14082
+ H[3] = H[3] + d >>> 0;
14083
+ H[4] = H[4] + e >>> 0;
14084
+ H[5] = H[5] + f >>> 0;
14085
+ H[6] = H[6] + g >>> 0;
14086
+ H[7] = H[7] + h >>> 0;
14087
+ }
14088
+ let out = "";
14089
+ for (let i = 0; i < 8; i++) {
14090
+ out += H[i].toString(16).padStart(8, "0");
14091
+ }
14092
+ return out;
14093
+ }
14094
+ function deriveSessionId(apiKey, origin, date5, windowIndex) {
14095
+ const input = JSON.stringify([apiKey, origin, date5, windowIndex]);
14096
+ const digest = sha256Hex(input).slice(0, 16);
14097
+ return SessionIdSchema.parse(digest);
14098
+ }
13956
14099
 
13957
14100
  export {
13958
14101
  AnonApiKeySchema,
13959
- SessionIdSchema,
13960
14102
  createAnonApiKey,
13961
14103
  createBuildHash,
13962
14104
  SdkCachedConfigSchema,
@@ -13965,6 +14107,7 @@ export {
13965
14107
  PresignedUploadResponseSchema,
13966
14108
  SourceMapManifestResponseSchema,
13967
14109
  GLASSTRACE_ATTRIBUTE_NAMES,
13968
- DEFAULT_CAPTURE_CONFIG
14110
+ DEFAULT_CAPTURE_CONFIG,
14111
+ deriveSessionId
13969
14112
  };
13970
- //# sourceMappingURL=chunk-GSGX76Q5.js.map
14113
+ //# sourceMappingURL=chunk-5N2IR4EO.js.map