!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["fast-equals"]={})}(this,function(e){"use strict";var t={};e.stringify=function(e,n){var i=void 0===n?t:n,r=i.indent,f=i.replacer,l=i.circularReplacer,o=i.stable,u=i.stabilizer,s=[],a=[],c=o&&u?function(e){var t={get:function(t){return e[t]}};return function(n,i){return u({key:n,value:e[n]},{key:i,value:e[i]},t)}}:void 0;return JSON.stringify(e,function(e,t){var n=t;if("object"==typeof n&&null!==n){if(s.length){var i=s.indexOf(this)+1;0===i?s[s.length]=this:(s.splice(i),a.splice(i)),a[a.length]=e;var r=s.indexOf(n)+1;if(r>0){var u=a.slice(0,r).join(".")||".";return l?l.call(this,e,n,u):"[ref="+u+"]"}}else s[0]=n,a[0]=e;o&&!Array.isArray(n)&&(n=Object.keys(n).sort(null==c?void 0:c(n)).reduce(function(e,t){return e[t]=n[t],e},{}))}return f?f.call(this,e,n):n},r)}});
