1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[106],{1828:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(7437);function a(e){let{background:t,type:n="button",children:a,rounded:l,disabled:o,outline:i,className:s,...c}=e;return(0,r.jsx)("button",{...c,type:n,disabled:o,className:"".concat("dark"==t?"bg-primary text-primary-white":""," ").concat(o?"bg-gray text-[#757575]":""," ").concat(l?"rounded-full":"rounded-[3px]"," ").concat(i?"border-2 border-primary":""," ").concat(s),children:a})}n(2265)},2106:function(e,t,n){n.d(t,{Z:function(){return x}});var r=n(7437),a=n(4414),l=n(152),o=n(2293),i=n(2929),s=n(2265),c=n(2399),u=n(5595),d=n(162),h=n(1828);function m(e){let{placeholder:t="Search",type:n="text",rounded:a,className:l,borderDark:o=!1,noBorder:i=!0,bgWhite:s,helperText:c="",value:u="",...d}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{...d,value:u,type:n,className:"block outline-none ".concat(a?"rounded-full":"rounded"," text-sm ").concat(l," ").concat(i?"bg-searchBg":"border ".concat(o?"border-primary":"border-gray")," ").concat(s?"bg-primary-white":""),placeholder:t,autoFocus:!0}),c?(0,r.jsx)("small",{className:"text-secondary pl-4",children:c}):null]})}var g=n(9256),f=()=>{let e=["Please wait while we fetch the content...","Preparing your media for download...","Hold tight, gathering your files...","Almost there, organizing your media...","Pulling in the latest content...","Working on your download...","Getting everything ready for you...","Fetching the content you requested...","Finalizing your files...","Just a moment, we're organizing everything...","Securing the media for you...","Making sure everything's ready for download...","Preparing to grab your content...","Retrieving your media now...","Almost ready... gathering your files...","Final checks... your media is almost here...","Hang tight... getting your content in place..."],[t,n]=(0,s.useState)(e[0]);return(0,s.useEffect)(()=>{let t=0,r=setInterval(()=>{t=(t+1)%e.length,n(e[t])},1500);return()=>clearInterval(r)},[]),(0,r.jsxs)("div",{className:"flex items-center flex-col justify-center space-x-2 gap-2 p-5",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full size-10 border-t-2 border-blue-600"}),(0,r.jsx)(g.Z,{variant:"h6",className:"w-full text-gray-600 font-normal animate-pulse",children:t})]})};function x(e){let{onSubmit:t,type:n="thread",downloadUrl:x=!1,isDark:p=!1,placeholder:y="",showOnHomePage:w=!1,initialInputURL:b=""}=e,[v,j]=(0,s.useState)(b),{isLoading:N,setIsLoading:k}=(0,s.useContext)(d.O);(0,s.useEffect)(()=>{k(!1)},[v,k]);let D=(e,t)=>{e.stopPropagation(),(0,u.l9)(t,e=>{j(e);let t=document.querySelector('[type="submit"]');t&&t.focus()})};return(0,r.jsxs)("div",{className:"max-w-4xl mx-auto w-full",children:[(0,r.jsxs)("form",{className:"flex lg:items-start items-center justify-center lg:flex-row flex-col gap-4",onSubmit:e=>void 0!==t&&"function"==typeof t&&t(e),children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 w-full flex-1 lg:items-start justify-start items-center",children:[(0,r.jsxs)("div",{className:"max-w-[700px] w-full flex-1 relative",children:[(0,r.jsx)(i.Z,{className:"text-lightGray rotate-[145deg] absolute top-1/2 left-8 -translate-y-1/2 -translate-x-1/2"}),(0,r.jsx)(m,{type:"url",name:c.uu,disabled:N,onChange:e=>{var t;return j(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.value)},value:null!=v?v:"",className:"p-3 px-12 shadow-sm border border-secondary border-1 focus:border-indigo-500 \n block w-full rounded-md placeholder:text-lightGray placeholder:text-small focus:outline-2 ".concat(N?"bg-[#e3e3e3]":""),placeholder:y,autoComplete:"off",required:!0}),v&&!N?(0,r.jsx)(a.Z,{onClick:()=>{let e=document.getElementsByName(c.uu);e&&e.length&&(e[0].value=""),j(null)},className:"cursor-pointer absolute top-1/2 right-2 -translate-y-1/2 -translate-x-1/2"}):null]}),w&&!x?(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:["thread"===n?(0,r.jsxs)(g.Z,{className:"text-lightGray !text-xs cursor-pointer break-all",onClick:e=>D(e,c.A8),children:["Sample Threads link:"," ",(0,r.jsx)("span",{className:"underline text-primary",children:c.A8}),"\xa0\xa0"]}):null,"instagram"===n?(0,r.jsxs)(g.Z,{className:"text-lightGray !text-xs cursor-pointer break-all",onClick:e=>D(e,c.Df),children:["Sample Instagram link:"," ",(0,r.jsx)("span",{className:"underline text-primary",children:c.Df}),"\xa0\xa0"]}):null]}):null]}),(0,r.jsxs)(h.Z,{type:"submit",background:"dark",disabled:N,className:"sm:w-52 w-full inline-flex items-center justify-center p-3 border shadow-sm font-medium \n rounded-md text-primary-white text-sm hover:bg-indigo-500 gap-3 focus:bg-indigo-500 \n ".concat(p?"border-primary-white":"border-transparent"),children:[(0,r.jsx)("span",{className:N?"animate-pulse":"",children:N?"Fetching...":"Fetch"}),(0,r.jsx)(l.Z,{className:"size-5 cursor-pointer"})]})]}),c.xk?(0,r.jsxs)("div",{className:"relative mt-4 text-left bg-lime-200 flex items-center gap-3 text-black rounded-lg p-3",children:[(0,r.jsx)(o.Z,{className:"text-black"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-lg",children:"Threads Video download issue is Fixed! \uD83C\uDF89"}),(0,r.jsxs)("p",{className:"text-base",children:["If you have any feedback or issues, email us at"," ",(0,r.jsx)("a",{href:"mailto:".concat(c.te),className:"text-indigo-600 font-bold",children:c.te}),"."]})]})]}):null,N?(0,r.jsx)(f,{}):null]})}},9256:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(7437);function a(e){let{variant:t="body",className:n="",onClick:a,children:l,title:o=""}=e;return(0,r.jsx)("p",{className:"font-medium ".concat("h1"==t?"text-[35px] md:text-[40px] lg:text-[50px] xl:text-[55px] leading-[45px] sm:leading-[50px] lg:leading-[65px]":"h2"==t?"text-[30px] md:text-[35px] lg:text-h2 leading-h3 lg:leading-h2":"h3"==t?"text-[25px] md:text-[30px] lg:text-h3 leading-h4 lg:leading-h3":"h4"==t?"text-[20px] md:text-h4 leading-h5 md:leading-h4":"h5"==t?"text-[18px] sm:text-[20px] md:text-h5 leading-h5 md:leading-h4":"h6"==t?"text-h6 leading-h6":"bodyBold"==t?"text-body leading-body font-semibold":"body"==t?"text-body leading-body":"small"==t?"text-small leading-body":"xs"==t?"text-xs leading-4":"grayBody"==t?"text-body leading-body text-secondary":null," ").concat(n),onClick:a,title:o,children:l})}n(2265)},162:function(e,t,n){n.d(t,{O:function(){return l},default:function(){return o}});var r=n(7437),a=n(2265);let l=(0,a.createContext)({});function o(e){let{children:t}=e,[n,o]=(0,a.useState)();return(0,r.jsx)(l.Provider,{value:{isLoading:n,setIsLoading:o},children:t})}},5595:function(e,t,n){n.d(t,{Dy:function(){return y},Lr:function(){return c},PV:function(){return h},Rq:function(){return w},ei:function(){return i},gR:function(){return u},gS:function(){return x},l5:function(){return b},l9:function(){return d},mP:function(){return s},p6:function(){return v},qW:function(){return p},r4:function(){return l},ty:function(){return g},uq:function(){return o},x6:function(){return f},yx:function(){return m}});var r=n(8726),a=n(2399);let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!e&&(/^https?:\/\/(?:www\.)?threads\.net\/(?:t\/[\w-]+\/?|@[\w-]+\/post\/[\w-]+\/?)(?:\?.*)?$/.test(e)||/^https?:\/\/(?:www\.)?instagram\.com\/p\/[\w-]+\/?(?:\?.*)?$/.test(e))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if("threads"===t)return/^https?:\/\/(?:www\.)?threads\.(?:net|com)\/(?:@[\w.-]+\/post\/[\w-]+(?:\/media)?|t\/[\w-]+)\/?(?:\?.*)?$/.test(e);
1if("instagram"===t)return(n?/^https?:\/\/(?:www\.)?instagram\.com\/(?:reel\/[\w-]+\/?|reels\/[\w-]+\/?|stories\/[\w.-]+\/[\d]+\/?|p\/[\w-]+\/?)(?:\?.*)?$/:/^https?:\/\/(?:www\.)?instagram\.com\/(?:reel\/[\w-]+\/?|[\w.-]+\/(?:reel|p)\/[\w-]+\/?|p\/[\w-]+\/?)(?:\?.*)?$/).test(e)}return!1},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)return"";try{let t=new URL(e.trim()).pathname.split("/").filter(Boolean),n=t[t.length-1];return"media"===n.toLowerCase()&&t.length>1&&(n=t[t.length-2]),n||""}catch(e){return console.log("\uD83D\uDE80 ~ getThreadsIdFromURL ~ e:",e),""}},s=e=>["instagram","threads"].includes(e),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{title:a.iC,url:a.JF};navigator.share&&navigator.share(e).then(()=>{}).catch(console.error)},u=async()=>await navigator.clipboard.readText().then(e=>e).catch(e=>{console.error("Failed to read from clipboard: ",e)}),d=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return await navigator.clipboard.writeText(e).then(n=>{void 0!==t&&"function"==typeof t&&t(e)}).catch(e=>{console.error("Failed to write to clipboard: ",e)})},h=e=>{let{message:t,position:n="bottom-center",duration:a=5e3,type:l="error"}=e,o={position:n,duration:a,style:{borderRadius:"10px",background:"#333",color:"#fff"}};"success"===l?r.toast.success(t,o):r.toast.error(t,o)},m=e=>{if(void 0===e)return"-";e*=1e3;let t=Math.floor((new Date().getTime()-e)/1e3),n=t/31536e3;return n>1?Math.floor(n)+"y":(n=t/2592e3)>1?Math.floor(n)+"m":(n=t/86400)>1?Math.floor(n)+"d":(n=t/3600)>1?Math.floor(n)+"h":(n=t/60)>1?Math.floor(n)+"m":Math.floor(t)+"s"},g=()=>{if(a.uu){let e=document.getElementsByName(a.uu);e&&e.length&&e[0].focus()}},f=e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e){let n=document.createElement("a");n.href="".concat(e,"&dl=1"),t&&(n.download=t),document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(e),n.remove()}},p=()=>window.scroll({top:0,left:0}),y=()=>(Date.now||(Date.now=function(){return new Date().getTime()}),Date.now()),w=/(https?:\/\/)?(www\.)?[^\s]+\.[^\s]+/g,b=e=>{if(e){let t=e;return t.startsWith("http")||(t="https://"+e),'<a\n className="text-indigo-600 hover:underline"\n target="_blank"\n href="'.concat(t,'"\n >').concat(e,"</a>")}},v=e=>e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):null}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.