"use strict";exports.__esModule=!0,exports.default=getUserAgent;var _invoker=_interopRequireWildcard(require("./invoker"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:r})(e)}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}var RGE_CLIENT_INFO=/TaurusApp\((\S*)\/(\S*)\)/;function getUserAgentInternal(){if(window&&window.navigator){var e=window.navigator.userAgent;if(e){var r=e.match(RGE_CLIENT_INFO);return Promise.resolve({group:"TaurusApp",name:r[1],version:r[2]})}return Promise.reject("调用错误：无法检测到当下环境的 userAgent，请确保在政务钉钉客户端 H5 容器下调用。")}}function getUserAgent(){var e=_invoker.default.getAppType();return e===_invoker.API_INVOKER_TYPE.PC||e===_invoker.API_INVOKER_TYPE.MOBILE?getUserAgentInternal():e===_invoker.API_INVOKER_TYPE.MINI_APP?_invoker.default.invoke("getUserAgent",{}):void 0}_invoker.default.registerAPI("getUserAgent",{mobile:!0,mini:!0,pc:!0}),getUserAgent.version={android:"1.6.2",ios:"1.6.2",pc:"1.6.2"},module.exports=exports.default,module.exports.default=exports.default;