"use strict";function retry(e,t){return __awaiter(this,void 0,void 0,function(){var r,n,i,o,s,a,u,c,f,l,h;return __generator(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),[4,t()];case 1:return[2,p.sent()];case 2:return r=p.sent(),n=e.method,i=e.isAuthApi,o=e.apiConfig,s=this.hadConfig&&void 0===this.isReady&&-1!==this.configJsApiList.indexOf(n),a="object"==typeof r&&"string"==typeof r.errorCode&&r.errorCode===sdkLib_1.ERROR_CODE.no_permission,u="object"==typeof r&&"string"==typeof r.errorCode&&r.errorCode===sdkLib_1.ERROR_CODE.cancel,c=__1.getTargetApiConfigVS(o,this.env),f=c&&this.env.version&&sdkLib_1.compareVersion(this.env.version,c),l=(this.env.platform===sdkLib_1.ENV_ENUM.ios||this.env.platform===sdkLib_1.ENV_ENUM.android)&&s&&a,h=this.env.platform===sdkLib_1.ENV_ENUM.pc&&s&&(f&&!u&&i||a),l||h?[2,this.config$.then(function(){return t()})]:[2,Promise.reject(r)];case 3:return[2]}})})}var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(s=2&r[0]?o.return:r[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,o=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]