var e=this&&this.__awaiter||function(e,t,a,l){return new(a||(a=Promise))(function(s,r){function i(e){try{n(l.next(e))}catch(e){r(e)}}function o(e){try{n(l.throw(e))}catch(e){r(e)}}function n(e){var t;e.done?s(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(i,o)}n((l=l.apply(e,t||[])).next())})},t=this&&this.__generator||function(e,t){var a,l,s,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=o(0),i.throw=o(1),i.return=o(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(o){return function(n){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;i&&(i=0,o[0]&&(r=0)),r;)try{if(a=1,l&&(s=2&o[0]?l.return:o[0]?l.throw||((s=l.return)&&s.call(l),0):l.next)&&!(s=s.call(l,o[1])).done)return s;switch(l=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,l=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(s=r.trys,(s=s.length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1](.*?)<\/title>/))||void 0===c?void 0:c[1])||void 0===v?void 0:v.trim(),this.getHostname(a)!=this.getHostname(o.url)||u&&("Bot Verification"==u||"You are being redirected..."==u||"Un instant..."==u||"Just a moment..."==u||"Redirecting..."==u))throw new Error("Captcha error, please open in webview (or the website has changed url)");return[2,n]}})})},n.prototype.parseNovels=function(e){var t=this;e=(0,a.load)(e).html();var l=[];return(e.match(//g)||[]).forEach(function(e){var a=e.match(/]*?src="([^"]*)"[^>]*?(?: data-src="([^"]*)")?[^>]*>/)||[],n=void 0;if(s.includes(t.site))n=s.replace(t.site,"");else{var u=s.split("/");u.shift(),u.shift(),u.shift(),n=u.join("/")}l.push({name:r,cover:o[2]||o[1]||i.defaultCover,path:n})}}),l},n.prototype.popularNovels=function(a,l){return e(this,arguments,void 0,function(e,a){var l,s,r,i,o,n,u,c,v,h=a.filters,p=a.showLatestNovels;return t(this,function(t){switch(t.label){case 0:for(r in l=null!==(v=null===(c=this.options)||void 0===c?void 0:c.seriesPath)&&void 0!==v?v:"/series/",s=this.site+l+"?page="+e,h||(h=this.filters||{}),p&&(s+="&order=latest"),h)if("object"==typeof h[r].value)for(i=0,o=h[r].value;i