Build 589089stable
Module 412700
1,734 characters · in 514.d733764d42c2ab66.jsDependencies
Source Raw
function(e){var t="u">typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,a){try{return function e(a,o){if(a===o)return!0;if(a&&o&&"object"==typeof a&&"object"==typeof o){var s,l,u,c;if(a.constructor!==o.constructor)return!1;if(Array.isArray(a)){if((s=a.length)!=o.length)return!1;for(l=s;0!=l--;)if(!e(a[l],o[l]))return!1;return!0}if(n&&a instanceof Map&&o instanceof Map){if(a.size!==o.size)return!1;for(c=a.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;for(c=a.entries();!(l=c.next()).done;)if(!e(l.value[1],o.get(l.value[0])))return!1;return!0}if(r&&a instanceof Set&&o instanceof Set){if(a.size!==o.size)return!1;for(c=a.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(o)){if((s=a.length)!=o.length)return!1;for(l=s;0!=l--;)if(a[l]!==o[l])return!1;return!0}if(a.constructor===RegExp)return a.source===o.source&&a.flags===o.flags;if(a.valueOf!==Object.prototype.valueOf&&"function"==typeof a.valueOf&&"function"==typeof o.valueOf)return a.valueOf()===o.valueOf();if(a.toString!==Object.prototype.toString&&"function"==typeof a.toString&&"function"==typeof o.toString)return a.toString()===o.toString();if((s=(u=Object.keys(a)).length)!==Object.keys(o).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(o,u[l]))return!1;if(t&&a instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!a.$$typeof)&&!e(a[u[l]],o[u[l]]))return!1;return!0}return a!=a&&o!=o}(e,a)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}}