"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={getWhatsappVersion:true,deepEqual:true,decodeMessageStanza:true};exports.getWhatsappVersion=getWhatsappVersion;exports.deepEqual=deepEqual;Object.defineProperty(exports,"decodeMessageStanza",{enumerable:true,get:function(){return _baileys.decodeMessageStanza}});var _axios=_interopRequireDefault(require("axios"));var _array=_interopRequireWildcard(require("./array"));Object.keys(_array).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_array[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function(){return _array[key]}})});var _baileys=require("../../Baileys");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(_next,_throw)}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(undefined)})}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap;_getRequireWildcardCache=function(){return cache};return cache}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}if(obj===null|| typeof obj!=="object"&& typeof obj!=="function"){return{default:obj}}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj)}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc)}else{newObj[key]=obj[key]}}}newObj.default=obj;if(cache){cache.set(obj,newObj)}return newObj}function getWhatsappVersion(){return _getWhatsappVersion.apply(this,arguments)}function _getWhatsappVersion(){_getWhatsappVersion=_asyncToGenerator(function*(){let res=yield _axios.default.get("https://web.whatsapp.com/check-update?version=2.2210.9&platform=web");if(res.status==200){let data=res.data;let version=data.currentVersion.split(".");return version.map(n=>n)}return[2,2210,9]});return _getWhatsappVersion.apply(this,arguments)}function deepEqual(a,b){return JSON.stringify(a)===JSON.stringify(b)}