"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of __getOwnPropNames(t))__hasOwnProp.call(e,s)||s===r||__defProp(e,s,{get:()=>t[s],enumerable:!(o=__getOwnPropDesc(t,s))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,s)=>{var n=e=>{try{i(r.next(e))}catch(e){s(e)}},a=e=>{try{i(r.throw(e))}catch(e){s(e)}},i=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,a);i((r=r.apply(e,t)).next())}),posts_exports={};__export(posts_exports,{getPosts:()=>getPosts,getSearchPosts:()=>getSearchPosts});var getPosts=__name(function(e){return __async(this,arguments,function*({filter:e,page:t,signal:r,providerContext:o}){const{getBaseUrl:s,axios:n,cheerio:a}=o;return posts({url:`${(yield s("w4u"))+e}/page/${t}/`,signal:r,axios:n,cheerio:a})})},"getPosts"),getSearchPosts=__name(function(e){return __async(this,arguments,function*({searchQuery:e,page:t,signal:r,providerContext:o}){const{getBaseUrl:s,axios:n,cheerio:a}=o;return posts({url:`${yield s("w4u")}/page/${t}/?s=${e}`,signal:r,axios:n,cheerio:a})})},"getSearchPosts");function posts(e){return __async(this,arguments,function*({url:e,signal:t,axios:r,cheerio:o}){try{const s=(yield r.get(e,{signal:t})).data,n=o.load(s),a=[];return n(".recent-posts").children().map((e,t)=>{const r=n(t).find(".post-thumb").find("a").attr("title"),o=n(t).find(".post-thumb").find("a").attr("href"),s=n(t).find(".post-thumb").find("img").attr("data-src")||n(t).find(".post-thumb").find("img").attr("src");r&&o&&s&&a.push({title:r.replace("Download","").trim(),link:o,image:s})}),a}catch(e){return[]}})}__name(posts,"posts"),exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;