import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _regeneratorRuntime from"@babel/runtime/regenerator";import version from"./version";import compareVersion from"./utils/compareVersion";import apis from"./index";var u=navigator&&navigator.userAgent||"",isAndroid=function(){return u.indexOf("Android")>-1||u.indexOf("Adr")>-1},isiOS=function(){return!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},isWindows=function(){return/(windows)/i.test(navigator.userAgent)};export default function canIUse(r){return _canIUse.apply(this,arguments)}function _canIUse(){return(_canIUse=_asyncToGenerator(_regeneratorRuntime.mark((function r(e){var n,i,t,o;return _regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(apis[e]){r.next=2;break}return r.abrupt("return",!1);case 2:return r.next=4,version();case 4:return n=r.sent,i=n.version,t=apis[e].version,o=isAndroid()?"android":isiOS()?"ios":isWindows()?"pc":"unknown",r.abrupt("return",!(!t||!t[o])&&compareVersion(i,t[o])>0);case 9:case"end":return r.stop()}}),r)})))).apply(this,arguments)}