plugin.exports=class a{static ID="FeY7BVuCE_rFKdrE0cenj";static TYPE=plugin.type.BOOK_SOURCE;static GROUP="👻MaxOS";static NAME="笔趣阁";static VERSION="1.0.0";static VERSION_CODE=0;static PLUGIN_FILE_URL="https://raw.kkgithub.com/Maxthos/ReadCat-BookSource/main/Plugin/maxos-xzmncy.com.ts.js";static BASE_URL="https://www.xzmncy.com";static REQUIRE={};request;store;cheerio;nanoid;constructor(t){var{request:t,store:e,cheerio:i,nanoid:r}=t;this.request=t,this.store=e,this.cheerio=i,this.nanoid=r}async search(t){t=(await this.request.get(a.BASE_URL+"/api/search?q="+t)).body,t=JSON.parse(t).data.search;if(isUndefined(t)||!isArray(t))return[];var e,i=[];for(e of t)i.push({bookname:e.book_name,author:e.author,coverImageUrl:a.BASE_URL+e.cover,detailPageUrl:a.BASE_URL+e.book_list_url,latestChapterTitle:e.latest_chapter_name});return i}async getDetail(t){var e,t=(await this.request.get(t))["body"],i=this.cheerio(t),t=i("#info > div.info > div.infobar > h1").text(),r=i("#info > div.info > div.infobar > p:nth-child(2)").text().substring(5),o=i("#info > div.info > div.infobar > p:nth-child(6) > a").text(),s=i("#info > div.sidebar > div > img").attr("src"),n=i("#info > div.info > div.intro > p").text(),c=[];for(e of i("#list > dl > dd")){var h=i(e).children("a");c.push({title:h.text(),url:a.BASE_URL+h.attr("href")})}return{bookname:t,author:r,latestChapterTitle:o,coverImageUrl:s,intro:n,chapterList:c}}async getTextContent(t){t=(await this.request.get(t.url)).body;return this.cheerio(t)("#htmlContent").html().split("
").filter(t=>t.trim())}};