// Works with __proto__ only. Old v8 can't work with null proto objects./* eslint-disable no-proto */varisObject=require('./_is-object');varanObject=require('./_an-object');varcheck=function(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throwTypeError(proto+": can't set as prototype!");};module.exports={set:Object.setPrototypeOf||('__proto__'in{}?// eslint-disable-linefunction(test,buggy,set){try{set=require('./_ctx')(Function.call,require('./_object-gopd').f(Object.prototype,'__proto__').set,2);set(test,[]);buggy=!(testinstanceofArray);}catch(e){buggy=true;}returnfunctionsetPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;elseset(O,proto);returnO;};}({},false):undefined),check:check};