"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isString=exports.isObject=exports.noop=void 0;var _typeof2=require("babel-runtime/helpers/typeof"),_typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getKey(e){return e._reactInternalFiber&&e._reactInternalFiber.key||Math.random().toString()}exports.getKey=getKey,exports.getStyle=getStyle,exports.getSize=getSize,exports.getStyleNum=getStyleNum,exports.setStyle=setStyle;var noop=exports.noop=function(){},isObject=exports.isObject=function(e){return"object"===(void 0===e?"undefined":(0,_typeof3.default)(e))},isString=exports.isString=function(e){return"string"==typeof e};function getStyle(e,t){return e.style[t]?e.style[t]:e.currentStyle?e.currentStyle[t]:window.getComputedStyle(e,void 0)[t]}function getSize(e){if("none"!==getStyle(e,"display"))return{width:e.offsetWidth||getStyleNum(e,"width"),height:e.offsetHeight||getStyleNum(e,"height")};var t={display:"",position:"absolute",visibility:"hidden"},r={};for(var i in t)r[i]=getStyle(e,i);setStyle(e,t);var n=e.clientWidth||getStyleNum(e,"width"),o=e.clientHeight||getStyleNum(e,"height");return Object.keys(r).forEach(function(){setStyle(e,r)}),{width:n,height:o}}function getStyleNum(e,t){return parseInt(getStyle(e,t).replace(/px|pt|em/gi,""))}function setStyle(e,t){if(isObject(t))for(var r in t){for(var i=r.split("-"),n=1;n<i.length;n++)i[n]=i[n].replace(i[n].charAt(0),i[n].charAt(0).toUpperCase());var o=i.join("");e.style[o]=t[r]}else isString(t)&&(e.style.cssText=t)}