@nibssplc/cams-sdk-react 1.0.0-rc.36 → 1.0.0-rc.37
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/dist/index.cjs.js +20 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -28
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -131,36 +131,28 @@ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DialogPri
|
|
|
131
131
|
}); };
|
|
132
132
|
// Force override crypto.subtle
|
|
133
133
|
var originalSubtle = window.crypto.subtle;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
writable: true,
|
|
149
|
-
configurable: true
|
|
150
|
-
});
|
|
134
|
+
window.crypto.subtle = {
|
|
135
|
+
digest: function (algorithm, data) { return __awaiter(_this, void 0, void 0, function () {
|
|
136
|
+
var alg;
|
|
137
|
+
return __generator(this, function (_a) {
|
|
138
|
+
alg = typeof algorithm === 'string' ? algorithm : algorithm.name;
|
|
139
|
+
if (alg === 'SHA-256')
|
|
140
|
+
return [2 /*return*/, sha256(data)];
|
|
141
|
+
if (originalSubtle === null || originalSubtle === void 0 ? void 0 : originalSubtle.digest)
|
|
142
|
+
return [2 /*return*/, originalSubtle.digest(algorithm, data)];
|
|
143
|
+
throw new Error("Unsupported algorithm: ".concat(alg));
|
|
144
|
+
});
|
|
145
|
+
}); }
|
|
146
|
+
};
|
|
151
147
|
// Polyfill randomUUID
|
|
152
148
|
if (!window.crypto.randomUUID) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
writable: true,
|
|
162
|
-
configurable: true
|
|
163
|
-
});
|
|
149
|
+
window.crypto.randomUUID = function () {
|
|
150
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
151
|
+
var r = (Math.random() * 16) | 0;
|
|
152
|
+
var v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
153
|
+
return v.toString(16);
|
|
154
|
+
});
|
|
155
|
+
};
|
|
164
156
|
}
|
|
165
157
|
})();
|
|
166
158
|
|