var __awaiter=this&&this.__awaiter||function(e,t,n,o){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function i(e){try{r(o.next(e))}catch(e){s(e)}}function l(e){try{r(o["throw"](e))}catch(e){s(e)}}function r(e){e.done?n(e.value):a(e.value).then(i,l)}r((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,a,s,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return r([e,t])}}function r(l){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(n=0)),n)try{if(o=1,a&&(s=l[0]&2?a["return"]:l[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;if(a=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;a=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]