!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).objectSha={})}(this,(function(e){"use strict";function r(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function t(e){return r(e)||Array.isArray(e)?Array.isArray(e)?e.map((e=>Array.isArray(e)||r(e)?t(e):e)):Object.keys(e).sort().map((r=>[r,t(e[r])])):e}function n(e){return JSON.stringify(t(e))}e.digest=function(e,r="SHA-256"){const t=["SHA-1","SHA-256","SHA-384","SHA-512"];if(!t.includes(r))throw RangeError(`Valid hash algorithm values are any of ${JSON.stringify(t)}`);return async function(e,r){const t=(new TextEncoder).encode(n(e)).buffer;let o="";{const e=await crypto.subtle.digest(r,t),n="0123456789abcdef";new Uint8Array(e).forEach((e=>{o+=n[e>>4]+n[15&e]}))}return o}(e,r)},e.hashable=n}));