"use strict";var t=require("axios"),e=require("groq-sdk"),i=require("cheerio"),a=require("path"),r=require("form-data"),n=require("yt-search"),o=require("fs");function d(t,e,i,a){return new(i||(i=Promise))((function(r,n){function o(t){try{s(a.next(t))}catch(t){n(t)}}function d(t){try{s(a.throw(t))}catch(t){n(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,d)}s((a=a.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var s=Object.freeze({__proto__:null,LlamaAI:class{constructor(t){if(!t)throw new Error("API Key is required");this.apiKey=t,this.groq=new e({apiKey:this.apiKey}),this.model="llama-3.1-8b-instant"}getChatCompletion(t){return d(this,void 0,void 0,(function*(){return this.groq.chat.completions.create({messages:t,model:this.model})}))}getVoiceCompletion(t){return d(this,void 0,void 0,(function*(){const{stream:e,prompt:i,temperature:a=.5,language:r="ID",response_format:n="json"}=t;return this.groq.audio.transcriptions.create({file:e,model:this.model,prompt:i,temperature:a,language:r,response_format:n})}))}getModels(){return d(this,void 0,void 0,(function*(){return(yield this.groq.models.list()).data}))}setModel(t){this.model=t}setApiKey(t){if(!t)throw new Error("API Key is required");this.apiKey=t,this.groq=new e({apiKey:this.apiKey})}},ainews:function(e){return d(this,void 0,void 0,(function*(){try{return(yield t.post("https://api.hai.news/question",{chat_id:"9ea5fef5-bbea-4e13-a3d8-3998bb58d344",question:e,storage_path:"/var/www/hai.news/storage/app/public/",temperature:.8,tokens:1e7,language:"en"},{headers:{"Content-Type":"application/json","User-Agent":"Mozilla/5.0 (Android 12; Mobile; rv:130.0) Gecko/130.0 Firefox/130.0",Referer:"https://hai.news/news/9ea5fef5-bbea-4e13-a3d8-3998bb58d344"}})).data}catch(t){return console.error(t),null}}))},animagine:function(e={}){return new Promise(((i,a)=>d(this,void 0,void 0,(function*(){try{let{prompt:r="Cute Cat",negative:n="Not Real",style:o="Anime",sampler:d="Euler a",ratio:s="896 x 1152",quality:c="Standard",width:l=1024,height:u=1024}=e;const h="https://linaqruf-animagine-xl.hf.space",p=Math.random().toString(36).substring(2);if(/\(None\)|Cinematic|Photographic|Anime|Manga|Digital Art|Pixel art|Fantasy art|Neonpunk|3D Model/.test(o)||(o="Anime"),/DDIM|Euler a|Euler|DPM\+\+ 2M Karras|DPM\+\+ 2M SDE Karras|DPM\+\+ SDE Karras/.test(d)||(d="Euler a"),/\(none\)|Light|Standard|Heavy/.test(c)||(c="Heavy"),/Custom|640 x 1536|832 x 1216|1024 x 1024|1152 x 896|1344 x 768|768 x 1344|896 x 1152|1216 x 832|1536 x 640/.test(s)||(s="896 x 1152"),"Custom"===s){if(!l||isNaN(l)||l>2048)return a("Enter Valid Image Width Below 2048");if(!u||isNaN(u)||u>2048)return a("Enter Valid Image Height Below 2048")}const m={origin:h,referer:h+"/?","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","Content-Type":"application/json"},f=(yield t.post(h+"/run/predict",{data:[0,!0],event_data:null,fn_index:4,session_hash:p,trigger_id:6},{headers:m})).data.data[0];yield t.post(h+"/queue/join?",{data:[r,n,f,l,u,7,28,d,s,o,c,!1,.55,1.5,!0],event_data:null,fn_index:5,session_hash:p,trigger_id:7},{headers:m});(yield t.get(h+"/queue/data?"+new URLSearchParams({session_hash:p}),{responseType:"stream",headers:m})).data.on("data",(t=>{var e;const r=JSON.parse(null!==(e=t.toString().split("data: ")[1])&&void 0!==e?e:"{}");if("process_completed"===r.msg)return r.success?i(r.output.data[0]):a("Image Generation Failed!")}))}catch(t){a(t)}}))))},stableDiff:function(e,i=""){return new Promise(((a,r)=>d(this,void 0,void 0,(function*(){try{if(!e)return r("Enter Prompt!");const n=yield t.post("https://requesteracessibili.joaovitorkas13.workers.dev",{prompt:e,negative_prompt:i,sync_mode:1},{headers:{authority:"requesteracessibili.joaovitorkas13.workers.dev","Content-Type":"application/json",origin:"https://just4demo24.blogspot.com",referer:"https://just4demo24.blogspot.com/","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"}});if(n.data.images&&n.data.images.length>0){const t=n.data.images[0].url.replace(/^data:image\/jpeg;base64,/,""),e=Buffer.from(t,"base64");a(e)}else r({status:!1})}catch(t){r(t)}}))))}});var c=Object.freeze({__proto__:null,v1:function(e){return d(this,void 0,void 0,(function*(){try{let i={status:!0,media:[]};const{data:a}=yield t("https://www.y2mate.com/mates/analyzeV2/ajax",{method:"post",data:new URLSearchParams({k_query:e,k_page:"Instagram",hl:"id",q_auto:"0"}),headers:{"content-type":"application/x-www-form-urlencoded","user-agent":"PostmanRuntime/7.32.2"}});return a.links.video.forEach((t=>i.media.push(t.url))),i}catch(t){return console.error(t),{status:!1,message:"Media not found"}}}))},v2:function(e){return d(this,void 0,void 0,(function*(){try{const i=yield t.request({method:"GET",url:"https://instagram-post-reels-stories-downloader.p.rapidapi.com/instagram/",params:{url:e},headers:{"X-RapidAPI-Key":"6a9259358bmshba34d148ba324e8p12ca27jsne16ce200ce10","X-RapidAPI-Host":"instagram-post-reels-stories-downloader.p.rapidapi.com"}});return i.data.result.map((t=>t.url))}catch(t){return[]}}))}});var l=Object.freeze({__proto__:null,v1:function(e){return new Promise(((a,n)=>d(this,void 0,void 0,(function*(){var o,d;const s=new r;s.append("id",e);try{const e=yield t.post("https://getsnackvideo.com/results",s,{headers:Object.assign({},s.getHeaders())}),r=i.load(e.data),n={creator:"XYZ TEAM",url:null!==(o=r("td.text-right > a.download_link").attr("href"))&&void 0!==o?o:void 0,thumb:null!==(d=r(".img_thumb > img").attr("src"))&&void 0!==d?d:void 0};a(n)}catch(t){n(t)}}))))},v2:function(t){return new Promise(((e,a)=>d(this,void 0,void 0,(function*(){var r,n,o;try{if(!/snackvideo.com/gi.test(t))return a("Invalid URL!");const d=yield fetch(t).then((t=>t.text())),s=i.load(d),c=s("div.video-box").find("a-video-player"),l=s("div.author-info"),u=s("div.action"),h={title:s(l).find("div.author-desc > span").children("span").eq(0).text().trim(),thumbnail:null!==(r=s(c).parent().siblings("div.background-mask").children("img").attr("src"))&&void 0!==r?r:void 0,media:null!==(n=s(c).attr("src"))&&void 0!==n?n:void 0,author:s("div.author-name").text().trim(),authorImage:null!==(o=s(u).find("div.avatar > img").attr("src"))&&void 0!==o?o:void 0,like:s(u).find("div.common").eq(0).text().trim(),comment:s(u).find("div.common").eq(1).text().trim(),share:s(u).find("div.common").eq(2).text().trim()};e(h)}catch(t){a(t)}}))))}});function u(t){return new Promise((e=>setTimeout(e,t)))}function h(e){return t.get(e,{responseType:"arraybuffer"}).then((t=>t.data))}var p=Object.freeze({__proto__:null,fetchBuffer:h,fetchJson:function(e){return t.get(e).then((t=>t.data))},getBuffer:function(e){return t.get(e,{responseType:"arraybuffer"}).then((t=>Buffer.from(t.data)))},getMimeType:function(e){return t.head(e).then((t=>t.headers["content-type"]))},pickRandom:function(t){return t[Math.floor(Math.random()*t.length)]},randomID:function(){return Math.random().toString(36).substring(2)},sleep:u});var m=Object.freeze({__proto__:null,search:function(t){return new Promise(((e,i)=>d(this,void 0,void 0,(function*(){try{const i=(yield n(t)).videos.map((t=>({title:t.title,url:t.url,thumbnail:t.image,duration:{seconds:t.seconds,timestamp:t.timestamp},views:t.views,publish:t.ago})));e(i)}catch(t){i(t)}}))))},youtube:function(e){return new Promise(((i,a)=>d(this,void 0,void 0,(function*(){try{const a=new r;a.append("url",e);const{data:n}=yield t.post("https://www.aiodownloader.in/wp-json/aio-dl/video-data/",a,{headers:a.getHeaders()}),o={title:n.title,thumbnail:n.thumbnail,duration:n.duration,video:{url:n.medias[0].url,size:n.medias[0].size,quality:n.medias[0].quality,formattedSize:n.medias[0].formattedSize},audio:{url:n.medias[5].url,size:n.medias[5].size,quality:n.medias[5].quality,formattedSize:n.medias[5].formattedSize}};i(o)}catch(t){a(t)}}))))}}),f=Object.freeze({__proto__:null,drive:function(e){return d(this,void 0,void 0,(function*(){var a,r,n;try{if(!/drive\.google\.com\/file\/d\//gi.test(e))throw new Error("Invalid URL");const o=yield t.get(e),d=i.load(o.data),s=e.split("/")[5];return{name:null!==(n=null===(r=null===(a=d("head").find("title").text())||void 0===a?void 0:a.split("-")[0])||void 0===r?void 0:r.trim())&&void 0!==n?n:"",download:`https://drive.google.com/uc?id=${s}&export=download`,link:e}}catch(t){throw t}}))},igStory:function(e){return d(this,void 0,void 0,(function*(){try{const a=`https://instagram.com/stories/${e}`,r=(yield t.post("https://v3.saveig.app/api/ajaxSearch",`q=${encodeURIComponent(a)}&t=media&lang=en`,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Accept:"*/*"}})).data.data,n=i.load(r),o=[];return n(".download-items").each(((t,e)=>{const i=n(e).find(".download-items__thumb img").attr("src"),a=n(e).find(".download-items__btn a").attr("href");o.push({author:"XYZ TEAM",thumb:i||"",url:a||""})})),o}catch(t){throw console.error(t),t}}))},igdl:c,mediafire:function(e){return d(this,void 0,void 0,(function*(){try{if(!/mediafire\.com\/file\//gi.test(e))throw new Error("Invalid URL");const r=yield t.get(e),n=i.load(r.data),o=n(".dl-btn-cont"),d=n(".dl-info");return{name:o.find("div.dl-btn-label").text().trim(),filename:o.find("div.dl-btn-label").attr("title"),type:a.extname(o.find("div.dl-btn-label").attr("title")||""),size:d.find("ul.details li > span").eq(0).text().trim(),created:new Date(d.find("ul.details li > span").eq(1).text().trim()),descHeader:d.find("div.description > p").eq(0).text().trim(),desc:d.find("div.description > p").eq(1).text().trim(),media:o.find("a.popsok").attr("href"),link:e}}catch(t){throw t}}))},pindl:e=>d(void 0,void 0,void 0,(function*(){return new Promise(((a,r)=>d(void 0,void 0,void 0,(function*(){try{const{data:r}=yield t.get("https://www.savepin.app/download.php?url="+e+"&lang=en&type=redirect"),n=i.load(r),o=n(".content p strong").text().trim(),d=n(".image.is-64x64 img").attr("src"),s=[];n("tbody tr").each(((t,e)=>{const i=n(e).find(".video-quality").text().trim(),a=n(e).find("td").eq(1).text().trim(),r="https://www.savepin.app/"+n(e).find("a").attr("href");s.push({quality:i,format:a,link:r})})),a({title:o,thumbnail:d,download:s})}catch(t){r(t)}}))))})),samehadaku:function(e){return d(this,void 0,void 0,(function*(){return new Promise(((a,n)=>d(this,void 0,void 0,(function*(){try{if(!/samehadaku\.email/gi.test(e))return n("Invalid URL!");const o=yield t.get(e,{headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"}}),s=i.load(o.data),c={title:s('h1[itemprop="name"]').text().trim(),link:e,downloads:[]},l=s("div#server > ul > li").map(((e,a)=>d(this,void 0,void 0,(function*(){const e={name:s(a).find("span").text().trim(),post:s(a).find("div").attr("data-post")||"",nume:s(a).find("div").attr("data-nume")||"",type:s(a).find("div").attr("data-type")||"",link:""},n=new r;n.append("action","player_ajax"),n.append("post",e.post),n.append("nume",e.nume),n.append("type",e.type);const o=yield t.post("https://samehadaku.email/wp-admin/admin-ajax.php",n,{headers:Object.assign({"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",Origin:"https://samehadaku.email"},n.getHeaders())});return e.link=i.load(o.data)("iframe").attr("src")||"",e})))).get();c.downloads=yield Promise.all(l),a(c)}catch(t){n(t)}}))))}))},snackvideo:l,spotifydl:function(e){return new Promise(((i,a)=>d(this,void 0,void 0,(function*(){try{const{data:a}=yield t.get(`https://spotifydownloaders.com/api/getSpotifyDetails?url=${e}`),r={createdDate:a.preview.date,title:a.preview.title,type:a.preview.type,thumbnail:a.preview.image,artist:a.preview.artist,duration:{duration:a.tracks[0].duration,time:a.tracks[0].time}},n=yield h(`https://spotifydownloaders.com/api/spotify?url=${e}`);i({creator:"XYZ TEAMS",buffer:n,metadata:r})}catch(t){a(t)}}))))},terabox:function(e){return d(this,void 0,void 0,(function*(){try{const i=yield t.get(`https://tera.instavideosave.com/?url=${encodeURIComponent(e)}`);return{status:!0,data:i.data}}catch(t){console.error("Error fetching data from terabox:",t);return{status:!1,message:"Error fetching data from terabox"}}}))},threads:function(e){return d(this,void 0,void 0,(function*(){try{return(yield t.get(`https://api.threadsphotodownloader.com/v2/media?url=${encodeURIComponent(e)}`)).data}catch(t){return void console.error(t)}}))},tiktokdl:function(e){return d(this,void 0,void 0,(function*(){let a={status:!0},n=new r;n.append("q",e),n.append("lang","id");try{let{data:e}=yield t("https://savetik.co/api/ajaxSearch",{method:"post",data:n,headers:{"content-type":"application/x-www-form-urlencoded","User-Agent":"PostmanRuntime/7.32.2"}}),r=i.load(e.data);a.creator="XYZ TEAMS",a.caption=r("div.video-data > div > .tik-left > div > .content > div > h3").text(),a.url=r("div.video-data > div > .tik-right > div > p:nth-child(1) > a").attr("href"),a.audio=r("div.video-data > div > .tik-right > div > p:nth-child(4) > a").attr("href")}catch(t){a.status=!1,a.message=t,console.log(a)}return a}))},ttslide:function(e){return d(this,void 0,void 0,(function*(){try{const a=yield t({method:"POST",url:"https://tikvideo.app/api/ajaxSearch",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"},data:{q:e,lang:"id"}});let r=[];if("ok"===a.data.status){let t=i.load(a.data.data);t("img").each(((e,i)=>{const a=t(i).attr("src");a&&!a.includes(".webp")&&r.push(a)}))}return r.length>0?r:null}catch(t){return console.error(t),null}}))},twitter:function(e){return d(this,void 0,void 0,(function*(){try{const a=new URLSearchParams;a.append("URL",e);const r=yield t.post("https://twdown.net/download.php",a.toString(),{headers:{"Content-Type":"application/x-www-form-urlencoded",accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","sec-ch-ua":'" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",cookie:"_ga=GA1.2.1388798541.1625064838; _gid=GA1.2.1351476739.1625064838; __gads=ID=7a60905ab10b2596-229566750eca0064:T=1625064837:RT=1625064837:S=ALNI_Mbg3GGC2b3oBVCUJt9UImup-j20Iw; _gat=1"}}),n=i.load(r.data),o=n("div:nth-child(1) > div:nth-child(2) > p").text().trim(),d=n("div:nth-child(1) > img").attr("src"),s=n("tr:nth-child(2) > td:nth-child(4) > a").attr("href"),c=n("tbody > tr:nth-child(1) > td:nth-child(4) > a").attr("href"),l=n("body > div.jumbotron > div > center > div.row > div > div:nth-child(5) > table > tbody > tr:nth-child(3) > td:nth-child(4) > a").attr("href");return{desc:o,thumb:d,video_sd:s,video_hd:c,audio:l?`https://twdown.net/${l}`:void 0}}catch(t){throw new Error("Failed to fetch Twitter data. Please try again later.")}}))},youtube:m});var v=Object.freeze({__proto__:null,gempa:function(){return d(this,void 0,void 0,(function*(){var e;try{const a=yield t.get("https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg"),r=i.load(a.data),n=r("table.table-hover.table-striped");for(let t=0;t div > img").attr("src")}}}}throw new Error("No data found")}catch(t){throw new Error(`Error: ${t}`)}}))}});var g=Object.freeze({__proto__:null,quote:function(e,i,a){return d(this,void 0,void 0,(function*(){const r={type:"quote",format:"png",backgroundColor:"#FFFFFF",width:512,height:768,scale:2,messages:[{entities:[],avatar:!0,from:{id:1,name:a,photo:{url:i}},text:e,replyMessage:{}}]};return yield t.post("https://bot.lyo.su/quote/generate",r,{headers:{"Content-Type":"application/json"}}).then((t=>t.data)).catch((t=>{throw t}))}))}});var w=Object.freeze({__proto__:null,Khodam:function(e){return d(this,void 0,void 0,(function*(){return new Promise(((a,r)=>d(this,void 0,void 0,(function*(){try{const{data:r}=yield t.get(`https://khodam.vercel.app/v2?nama=${e}`),n=i.load(r)("span.__className_cad559.text-3xl.font-bold.text-rose-600").text().trim();a({nama:e,khodam:n,share:`https://khodam.vercel.app/v2?nama=${e}&share`})}catch(t){r(t)}}))))}))},ngl:function(e,i){return d(this,void 0,void 0,(function*(){try{return{creator:"XYZ TEAM",response:(yield t.post("https://ngl.link/api/submit",`username=${encodeURIComponent(e)}&question=${encodeURIComponent(i)}&deviceId=18d7b980-ac6a-4878-906e-087dfec6ea1b&gameSlug=&referrer=`,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}}catch(t){throw console.error(t),t}}))},quotes:function(e){return new Promise(((a,r)=>{const n=`https://jagokata.com/kata-bijak/kata-${e.replace(/\s/g,"_")}.html?page=1`;t.get(n).then((t=>{const e=i.load(t.data),r=[];if(e('div[id="main"]').find('ul[id="citatenrijen"] > li').each(((t,i)=>{const a=t+1,n=e(i).find('div[class="citatenlijst-auteur"] > a').text().trim(),o=e(i).find('span[class="auteur-beschrijving"]').text().trim(),d=e(i).find('q[class="fbquote"]').text().trim();r.push({number:a,author:n,bio:o,quote:d})})),r.splice(2,1),0===r.length)return a({status:!1});a({status:!0,data:r})})).catch(r)}))},quotesanime:function(){return new Promise(((e,a)=>{const r=`https://otakotaku.com/quote/feed/${Math.floor(184*Math.random())}`;t.get(r).then((({data:t})=>{const a=i.load(t),r=[];a("div.kotodama-list").each(((t,e)=>{r.push({link:a(e).find("a").attr("href")||"",gambar:a(e).find("img").attr("data-src")||"",karakter:a(e).find("div.char-name").text().trim(),anime:a(e).find("div.anime-title").text().trim(),episode:a(e).find("div.meta").text().trim(),up_at:a(e).find("small.meta").text().trim(),quotes:a(e).find("div.quote").text().trim()})})),e(r)})).catch(a)}))},servermc:function(){return new Promise(((e,a)=>{t.get("https://minecraftpocket-servers.com/country/indonesia/").then((t=>{const a=i.load(t.data),r=[];a("tr").each(((t,e)=>{const i=a(e).find("button.btn.btn-secondary.btn-sm").eq(1).text().trim().split(":").shift(),n=parseInt(a(e).find("button.btn.btn-secondary.btn-sm").eq(1).text().trim().split(":").pop()||"0",10),o=a(e).find("a.btn.btn-info.btn-sm").text(),d=a(e).find("td.d-none.d-md-table-cell > strong").eq(1).text().trim();if(i){const t={ip:i,port:n,versi:o,player:d};r.push(t)}})),e(r)})).catch(a)}))},simi:function(e){return d(this,void 0,void 0,(function*(){try{const i="https://api.simsimi.vn/v1/simtalk",a=new URLSearchParams({text:e,lc:"id",key:""});return(yield t.post(i,a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data.message}catch(t){return console.error("Error occurred while communicating with Simsimi API:",t),"Unexpected error occurred. Please try again later."}}))}});var y=Object.freeze({__proto__:null,getStickers:function(e){return d(this,arguments,void 0,(function*(e,a="sticker",r=1){const n=`https://www.flaticon.com/search/${r}?word=${encodeURI(e)}&type=${a}`,o=yield t.get(n),d=i.load(o.data),s={total_get:d("p#total_icon_badge").text().trim(),page:r,stickers:[]};return d("ul.icons").find("li[data-id]").each(((t,e)=>{const i={},a=d(e).attr();for(const[t,e]of Object.entries(a))t.startsWith("data-")&&(i[t.replace("data-","")]=e);s.stickers.push(i)})),s}))},pinterest:e=>d(void 0,void 0,void 0,(function*(){try{const a=yield t.get(`https://id.pinterest.com/search/pins/?autologin=true&q=${e}`,{headers:{cookie:'_auth=1; _b="AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg="; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0'}}),r=i.load(a.data),n=[],o=[];return r("div > a").each(((t,e)=>{const i=r(e).find("img").attr("src");n.push(i||"")})),n.forEach((t=>{t&&o.push(t.replace(/236/g,"736"))})),o.shift(),o}catch(t){throw new Error(`Error fetching Pinterest data: ${t.message||t}`)}})),tiktokSearch:function(e){return d(this,void 0,void 0,(function*(){try{const i=(yield t.post("https://tikwm.com/api/feed/search",new URLSearchParams({keywords:e,count:"10",cursor:"0",HD:"1"}),{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Cookie:"current_language=en","User-Agent":"Mozilla/5.0 (Linux Android 10 K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"}})).data.data.videos;if(0===i.length)throw new Error("Tidak ada video ditemukan.");return i.map((t=>({title:t.title,cover:t.cover,origin_cover:t.origin_cover,link:`https://www.tiktok.com/@${t.author.unique_id}/video/${t.video_id}`,no_watermark:t.play,watermark:t.wmplay,music:t.music_info,views:t.play_count,like:t.digg_count,comment:t.comment_count||null,share:t.share_count,download:t.download_count||null,save:t.collect_count||null,create_time:1e3*t.create_time})))}catch(t){throw t}}))}});var b=Object.freeze({__proto__:null,igstalk:function(e){return d(this,void 0,void 0,(function*(){try{const i=yield t.get(`https://igram.world/api/ig/userInfoByUsername/${e.replace(/[^\w\d]/gi,"")}`);return i.data.result}catch(t){throw t}}))}});var k=Object.freeze({__proto__:null,removebg:function(e){return d(this,void 0,void 0,(function*(){return new Promise(((i,a)=>d(this,void 0,void 0,(function*(){try{if(e||a("Required Path Or Url"),e.match(/^https?:\/\//)){const i=yield t.get(e,{responseType:"arraybuffer"}).then((t=>t.data));o.writeFileSync("images.png",i),e="images.png"}const n=(yield t.get("https://www.onlineconverter.com/get/host",{headers:{authority:"www.onlineconverter.com",accept:"/","accept-language":"ms-MY,ms;q=0.9,en-US;q=0.8,en;q=0.7,id;q=0.6",referer:"https://www.onlineconverter.com/remove-image-background","sec-ch-ua":'"Not)A;Brand";v="24", "Chromium";v="116"',"sec-ch-ua-mobile":"?1","sec-ch-ua-platform":'"Android"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","user-agent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"}})).data,d=o.readFileSync(e),s=e.split(".").pop(),c=new r;c.append("file",d,{filename:`${Date.now()}.${s}`}),c.append("select","1"),c.append("class","tool"),c.append("from","image"),c.append("to","remove-image-background"),c.append("source","online");const l=yield t.post(n,c,{headers:Object.assign(Object.assign({},c.getHeaders()),{authority:n,accept:"/","accept-language":"ms-MY,ms;q=0.9,en-US;q=0.8,en;q=0.7,id;q=0.6",origin:"https://www.onlineconverter.com",referer:"https://www.onlineconverter.com/","sec-ch-ua":'"Not)A;Brand";v="24", "Chromium";v="116"',"sec-ch-ua-mobile":"?1","sec-ch-ua-platform":'"Android"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site","user-agent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"})}),h=l.data.match(/(?:convert\/)(\w+)/)[1],p=`${n.split("/send").join("")}/${h}`;o.unlinkSync(e),u(2e3),i(p+"/download")}catch(t){a(t)}}))))}))},ssweb:function(e,i){const a="https://www.screenshotmachine.com",r=new URLSearchParams({url:e,device:i,cacheLimit:"0"});return t.post(`${a}/capture.php`,r,{headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((e=>{var i;if("success"===e.data.status){const r=e.data.link,n=(null===(i=e.headers["set-cookie"])||void 0===i?void 0:i.join(""))||"";return t.get(`${a}/${r}`,{headers:{cookie:n},responseType:"arraybuffer"}).then((t=>t.data))}throw new Error("ScreenshotMachine request failed.")})).catch((t=>{throw t}))},styleText:function(e){return t.get(`http://qaz.wtf/u/convert.cgi?text=${e}`).then((({data:t})=>{const e=i.load(t),a=[];return e("table > tbody > tr").each(((t,i)=>{a.push({author:"XYZ TEAMS",text:e(i).find("td:nth-child(2)").text().trim()})})),a}))}}),x={Scapers:Object.freeze({__proto__:null,AI:s,Download:f,Information:v,Maker:g,Random:w,Search:y,Stalk:b,Tools:k}),Func:p};module.exports=x;