(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3734],{59925:function(e,t,a){Promise.resolve().then(a.bind(a,18677))},16463:function(e,t,a){"use strict";var n=a(71169);a.o(n,"redirect")&&a.d(t,{redirect:function(){return n.redirect}}),a.o(n,"useParams")&&a.d(t,{useParams:function(){return n.useParams}}),a.o(n,"usePathname")&&a.d(t,{usePathname:function(){return n.usePathname}}),a.o(n,"useRouter")&&a.d(t,{useRouter:function(){return n.useRouter}}),a.o(n,"useSearchParams")&&a.d(t,{useSearchParams:function(){return n.useSearchParams}}),a.o(n,"useServerInsertedHTML")&&a.d(t,{useServerInsertedHTML:function(){return n.useServerInsertedHTML}})},18677:function(e,t,a){"use strict";a.d(t,{default:function(){return k}});var n=a(57437),l=a(2265),s=a(2612),o=a(91485),r=e=>{let{content:t}=e,a=(e=>{let t=e.split("\n"),a=[],n="";return t.forEach(e=>{""===e.trim()?n&&(a.push({type:"paragraph",content:n.trim()}),n=""):e.startsWith("#")?a.push({type:"hashtag",content:e.trim()}):n+=e+" "}),n&&a.push({type:"paragraph",content:n.trim()}),a})(t);return(0,n.jsx)("div",{className:"flex flex-col items-start w-full max-w-2xl justify-between gap-4 rounded-2xl bg-white p-6 dark:bg-[#232323]",children:a.map((e,t)=>"paragraph"===e.type?(0,n.jsx)("p",{className:"text-base font-light text-black dark:text-white",children:e.content},t):"hashtag"===e.type?(0,n.jsx)("span",{className:"text-sm font-medium text-blue-500",children:e.content},t):void 0)})},i=a(7432),c=a(38472),d=a(88726),m=a(85097),u=a(41942),p=a(14189),f=a(16463),x=a(66648),h=a(37261),g=a(95779),b=a(46682),j=a(23051),y=a(37692),w=a(16356);let v={Facebook:(0,n.jsx)(u.Am9,{}),Twitter:(0,n.jsx)(u.fWC,{}),Instagram:(0,n.jsx)(u.Zf_,{}),LinkedIn:(0,n.jsx)(u.ltd,{}),YouTube:(0,n.jsx)(u.V2E,{}),TikTok:(0,n.jsx)(u.nTm,{}),Pinterest:(0,n.jsx)(u.oIN,{})};var k=()=>{let[e,t]=(0,l.useState)({question1:null,question2:null,question3:"Instagram"}),[a,k]=(0,l.useState)(3),[D,P]=(0,l.useState)([]),[N,E]=(0,l.useState)(1),[S,C]=(0,l.useState)("English"),[I,T]=(0,l.useState)({}),[A,_]=(0,l.useState)(!1),z=e=>{e.style.height="auto",e.style.height="".concat(e.scrollHeight+30,"px")},B=e=>{P(t=>{let a=[...t];return a.splice(e,1),a})};(0,f.usePathname)();let F=async()=>{try{if(!H.platform){d.Am.error("Please select Social Media to generate results.");return}if(!H.platform_type){d.Am.error("Please select Topic to generate results.");return}if(!H.platform_subtype){d.Am.error("Please select Sub Topic to generate results.");return}if(!H.tone_style){d.Am.error("Please select Tone Style to generate results.");return}if(!H.text){d.Am.error("Please Enter text to generate results.");return}_(!0);let e=Object.entries(I).length;for(let t=e;t<e+a;t++){let e=await c.Z.post("/api/social-media-post-generator/",{data:H,language:S});T(a=>({...a,[t]:e.data}))}}catch(e){d.Am.error("An error occurred. Please try again later.")}finally{_(!1)}},M=(0,l.useRef)(null);(0,l.useEffect)(()=>{M.current&&I[Object.keys(I).length-1]&&M.current.scrollIntoView({behavior:"smooth"})},[I]);let[H,L]=(0,l.useState)({text:"",post_topic:"Social Media",tone_style:null,platform:null,platform_type:null,platform_subtype:null}),[G,R]=(0,l.useState)(!1),[V,O]=(0,l.useState)(!1),U=[{platform:"LinkedIn",categories:[{name:"Headlines",options:["Default","Recruiter Focused","Industry Peer-Focused","Client or Customer-Focused","Networking or General Audience-Focused","Employer Branding or Company Culture-Focused"]},{name:"Talking About",options:["Default","Industry Trends","Company Culture","Professional Insights","Industry Challenges","Personal Achievements"]},{name:"Ad",options:["Default","Event Promotion","Lead Generation","Brand Awareness","Product Launch","Service Highlight"]},{name:"Job Postings",options:["Default"]}]},{platform:"Facebook",categories:[{name:"New Post",options:["Default","Informative","Expressive","Storytelling","Engaging"]},{name:"Ads",options:["Default","Event Promotion","Lead Generation","Brand Awareness","Product Launch"]},{name:"Brand Promotion Post",options:["Default","New Product","Brand Story","Customer Engagement"]},{name:"Customer Success Story",options:["Default","Video Testimonials","Case Study"]}]},{platform:"YouTube",categories:[{name:"Video Description",options:["Default","Informative","Promotional","Engaging"]},{name:"Channel Description",options:["Default","Personal Expertise Showcase","Entertainment","Education","Tutorial"]},{name:"Video Ideas",options:["Default","Education","Entertainment","Product Reviews","Interviews"]},{name:"Video Scripts",options:["Default","Pointers","Detailed","Dialogues"]}]},{platform:"Instagram",categories:[{name:"Post Caption",options:["Default","Humorous","Philosophical","Storytelling","Behind-the-Scenes Insights","Interactive","Inspiring"]},{name:"Reel Ideas",options:["Default","Trendy Challenges","Educational Tutorials","Comedic Skits","Behind the Scenes"]},{name:"Promotional Post",options:["Default","Product Showcase","Contest or Giveaway Promotion","Limited Time Offers","Discount or Sale Announcement","Brand Partnership or Collaboration"]}]},{platform:"Pinterest",categories:[{name:"Product Description",options:["Default","Boost Visibility","Narrate a Story","Educate Users","Boost Conversions"]},{name:"Pins",options:["Default","Recipe Pins","DIY Pins","Infographic Pins","Travel Pins"]},{name:"Marketing",options:["Default","Promoted Pins","Seasonal Campaigns","Collaboration Tips","Content Series","Engagement Campaigns"]},{name:"Titles",options:["Default","Eye-Catching","SEO Friendly","Instructional","Solution Oriented"]},{name:"Project Ideas",options:["Default","Seasonal Projects","Challenges","Collaborative Projects","Educational Projects","Interactive Projects"]}]},{platform:"TikTok",categories:[{name:"Ideas on the Topic",options:["Default","Trending","Niche"]},{name:"Ideas for a Business",options:["Default","Challenges","Tutorials","Behind the Scenes","Product Demos","User Generated Content"]},{name:"TikTok Script",options:["Default","Pointers","Detailed"]},{name:"Video Captions",options:["Default","Engaging","Informative","Humorous"]},{name:"Video Descriptions",options:["Default","Engaging","Funny"]}]}];return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"mt-10 flex h-full flex-col items-start justify-start gap-4 overflow-x-hidden px-4 pb-12 lg:px-0 xl:ml-12 xl:mr-12 xl:flex-row xl:gap-16 xl:pb-12",children:[(0,n.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-6 xl:w-[65%]",children:[(0,n.jsxs)("div",{className:"hidden flex-col items-start justify-center gap-2 md:flex",children:[(0,n.jsx)("p",{className:"heading-text",children:"Social Media Generator"}),(0,n.jsx)("p",{className:"mt-5 text-[16px] font-normal text-black dark:text-white",children:"Running out of ideas for social media content - Our AI Social Media Post Generator can generate wholesome ideas on different topics. Whether you are promoting your brand, engaging with followers, or sharing updates, this intuitive tool generates creative and engaging posts tailored to your audience and objectives, helping you stand out in the crowded digital landscape."})]}),(0,n.jsxs)("div",{className:"flex w-full flex-col gap-2 overflow-auto",children:[(0,n.jsx)("h1",{className:"text-[16px] font-normal text-[#2D323C] dark:text-[#D1D6DD] xl:text-lg",children:"What do you want to do?"}),(0,n.jsx)("div",{className:"flex w-full flex-col items-center justify-center gap-2 overflow-auto lg:w-full",children:(0,n.jsx)("div",{className:"scroll-container hidden w-full items-center justify-start gap-4 overflow-x-auto md:flex",children:U.map((e,t)=>(0,n.jsx)(o.Z,{onClick:()=>{L({...H,platform:e.platform,platform_type:null,platform_subtype:null,tone_style:null})},selected:e.platform===H.platform,children:(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[v[e.platform],e.platform]})},t))})}),(0,n.jsx)("div",{className:"md:hidden",children:(0,n.jsx)(g.default,{popupClassName:"!rounded-lg",options:U.map(e=>({label:e.platform,value:e.platform})),value:H.platform,placeholder:"Select a social media",onChange:e=>{L({...H,platform:e,platform_type:null,platform_subtype:null,tone_style:null})},size:"large",className:"min-w-full text-white",suffixIcon:(0,n.jsx)(w.KK6,{color:"#E0E3E8",size:20})})})]}),(0,n.jsxs)("div",{className:"flex w-full flex-col justify-between gap-6 md:w-full md:flex-row",children:[(0,n.jsxs)("div",{className:"flex flex-col items-start justify-center gap-2 xl:w-full",children:[(0,n.jsx)("h1",{className:"text-[16px] font-normal text-[#2D323C] dark:text-[#D1D6DD] xl:text-lg",children:"Post Topic"}),(0,n.jsx)(g.default,{popupClassName:"!rounded-lg",options:U.filter(e=>e.platform===H.platform).flatMap(e=>e.categories.map(e=>({label:e.name,value:e.name}))),value:H.platform_type,placeholder:"Select a topic",onChange:e=>{L({...H,platform_type:e})},size:"large",className:"min-w-full text-white md:min-w-[250px]",suffixIcon:(0,n.jsx)(y.w1S,{color:"#E0E3E8",size:20}),open:!!H.platform&&void 0,onDropdownVisibleChange:e=>H.platform?e:(d.Am.error("Please select Social Media first"),!1)})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start justify-center gap-2 xl:w-full",children:[(0,n.jsx)("h1",{className:"text-[16px] font-normal text-[#2D323C] dark:text-[#D1D6DD] xl:text-lg",children:"Post Sub Topic"}),(0,n.jsx)(g.default,{popupClassName:"!rounded-lg",options:(e=>{let t=e.find(e=>e.platform===H.platform);if(!t)return[];let a=t.categories.find(e=>e.name===H.platform_type);return a?a.options.map(e=>({label:e,value:e})):[]})(U),value:H.platform_subtype,placeholder:"Select a sub-topic",onChange:e=>{L({...H,platform_subtype:e})},size:"large",className:"min-w-full text-white md:min-w-[250px]",suffixIcon:(0,n.jsx)(y.w1S,{color:"#E0E3E8",size:20}),open:!!H.platform_type&&void 0,onDropdownVisibleChange:e=>H.platform_type?e:(d.Am.error("Please select Topic first"),!1)})]}),(0,n.jsxs)("div",{className:"flex flex-col items-start justify-center gap-2",children:[(0,n.jsx)("h1",{className:"text-[16px] font-normal text-[#2D323C] dark:text-[#D1D6DD] xl:text-lg",children:"Conversational Tone?"}),(0,n.jsx)(g.default,{popupClassName:"!rounded-lg",options:H.platform_subtype?H.platform_subtype?[{label:"Default",value:"Default"},{label:"Funny",value:"Funny"},{label:"Sad",value:"Sad"},{label:"Nostalgic",value:"Nostalgic"},{label:"Angry",value:"Angry"},{label:"Empathetic",value:"Empathetic"},{label:"Sarcastic",value:"Sarcastic"}]:(d.Am.error("Please select Post Sub Topic first"),[]):[],value:H.tone_style,placeholder:"Select a tone",onChange:e=>{L({...H,tone_style:e})},size:"large",className:"min-w-full text-white md:min-w-[250px]",suffixIcon:(0,n.jsx)(j.ldP,{color:"#E0E3E8",size:20}),open:!!H.platform_subtype&&void 0,onDropdownVisibleChange:e=>H.platform_subtype?e:(d.Am.error("Please select Sub Topic first"),!1)})]})]}),(0,n.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-2",children:[(0,n.jsx)("div",{className:"flex w-full items-center justify-between",children:(0,n.jsx)("h3",{className:"text-[16px] font-normal text-[#2D323C] dark:text-[#D1D6DD] xl:text-lg",children:"Generate by Keyword or Upload Image"})}),D.length?(0,n.jsx)("div",{className:"flex w-[100%] appearance-none items-center justify-start gap-2 rounded-2xl border border-solid border-primary bg-white px-6 py-4 text-black focus:outline-none dark:bg-[#0D0D0D] dark:text-white xl:w-full",children:D.map((e,t)=>(0,n.jsx)("div",{className:"relative aspect-square h-fit w-auto",children:(0,n.jsx)(x.default,{src:e.url,alt:"Uploaded ".concat(e.id),width:100,height:100,className:"rounded-md bg-black object-contain dark:bg-white"})},t))}):(0,n.jsx)("div",{className:"relative w-full",children:(0,n.jsx)("textarea",{rows:4,value:H.text,className:"min-h-[200px] w-[100%] appearance-none rounded-2xl border border-solid border-primary bg-white px-6 py-4 text-black focus:outline-none dark:bg-[#0D0D0D] dark:text-white xl:w-full",placeholder:"Type your description here",onChange:e=>{let t=e.target.value;t.length<=6e3&&(L({...H,text:t}),z(e.target))}})}),(0,n.jsx)("div",{className:"flex gap-1",children:D.length?D.map((e,t)=>(0,n.jsx)("span",{className:"mt-4 flex gap-1 rounded-3xl border border-solid border-[#3E3E3E] bg-transparent px-4 py-2 xl:flex-row",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-black dark:text-[#8B8B8C]",children:e.file.name},e.id),(0,n.jsx)(i.$iT,{onClick:()=>B(t),className:"h-5 w-5 cursor-pointer text-black dark:text-[#E0E3E8]"})]})},t)):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{type:"file",accept:".webp, .webp",className:"absolute inset-0 z-50 m-0 h-full w-full cursor-pointer p-0 opacity-0 outline-none",onChange:e=>{let t=e.target.files;if(t){let e=Array.from(t).map(e=>({id:N,url:URL.createObjectURL(e),file:e}));E(t=>t+e.length),P(t=>[...t,...e])}},multiple:!0}),(0,n.jsxs)("span",{className:"mt-2 flex items-center justify-center gap-1 rounded-3xl border border-solid border-[#3E3E3E] bg-transparent px-4 py-2 xl:flex-row",children:[(0,n.jsx)(m.gux,{className:"size-4 text-[#8B8B8C]"}),(0,n.jsx)("span",{className:"text-sm font-medium text-black dark:text-[#8B8B8C]",children:"Upload Image"})]})]})})}),(0,n.jsxs)("div",{className:"flex w-full flex-col items-center justify-between gap-4 xl:w-full xl:flex-row",children:[(0,n.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,n.jsx)(g.default,{popupClassName:"!rounded-lg",showSearch:!0,options:p.M.map(e=>({label:e.name,value:e.name})),onChange:e=>C(e),value:S,size:"large",className:"text-white md:min-w-[200px]",suffixIcon:(0,n.jsx)(h.ImN,{color:"#E0E3E8",size:20})}),(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 text-[#22262E] dark:text-[#E0E3E8]",children:["no. of posts",(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 rounded-lg bg-[#6a38b2] p-3 text-[16px] text-black dark:text-[#E0E3E8]",children:[(0,n.jsx)(u.iFH,{onClick:()=>k(e=>e<=1?1:e-1),className:"h-3 w-3 text-black dark:text-[#E0E3E8]"}),a,(0,n.jsx)(u.wEH,{onClick:()=>k(e=>e>=10?10:e+1),className:"h-3 w-3 text-black dark:text-[#E0E3E8]"})]})]})]}),(0,n.jsx)(b.ZP,{onClick:()=>F(),size:"large",type:"primary",disabled:A,className:"w-full bg-[#6a38b2] md:w-[200px]",children:"Generate"})]})]})]}),(0,n.jsx)("div",{className:"flex w-full flex-col items-center justify-start gap-4 overflow-y-scroll",children:(0,n.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-start gap-2 overflow-y-auto pb-[10px]",ref:M,children:[A&&(0,n.jsxs)("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1",children:[(0,n.jsx)(s.Z,{src:"https://lottie.host/77da15ae-e595-47a4-ace7-7109ce8a9e24/nNWmdW5ss5.json"}),(0,n.jsx)("p",{className:"text-center text-lg font-normal text-black dark:text-white",children:"Hold tight! Awesomeness is in the making."})]}),Object.keys(I).sort((e,t)=>parseInt(e)-parseInt(t)).map((e,t)=>(0,n.jsx)("div",{id:e,ref:t===Object.keys(I).length-1?M:void 0,children:(0,n.jsx)(r,{id:e,content:I[parseInt(e)]},e)},t))]})})]})})}},2612:function(e,t,a){"use strict";var n=a(57437);a(2265);var l=a(32981),s=a.n(l);t.Z=e=>{let{src:t,height:a,width:l}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(s(),{animationPath:t,loop:!0,autoplay:!0,style:{height:"".concat(null!=a?a:"150px","px"),width:"".concat(null!=l?l:"100","px")}})})}},91485:function(e,t,a){"use strict";var n=a(57437);a(2265),t.Z=e=>{let{children:t,onClick:a,label:l,disabled:s,icon:o,selected:r,padding:i="0.7em 1.5em",fontSize:c="17px"}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("button",{style:{padding:i,fontSize:c},className:"".concat(r?"border-white border-opacity-20":"border-white border-opacity-10 opacity-30"," flex items-center justify-center gap-2 whitespace-nowrap rounded-lg border border-solid bg-white font-normal text-[#0d0d0d]transition-all duration-300 ease-in-out dark:bg-[#0D0D0D] dark:text-white"),onClick:a,disabled:s,children:null!=l?l:t})})}},14189:function(e,t,a){"use strict";a.d(t,{M:function(){return n}});let n=[{name:"Afrikaans",code:"af"},{name:"Albanian",code:"sq"},{name:"Amharic",code:"am"},{name:"Arabic",code:"ar"},{name:"Armenian",code:"hy"},{name:"Azerbaijani",code:"az"},{name:"Bengali",code:"bn"},{name:"Bosnian",code:"bs"},{name:"Bulgarian",code:"bg"},{name:"Catalan",code:"ca"},{name:"Chinese (Simplified)",code:"zh"},{name:"Chinese (Traditional)",code:"zh-TW"},{name:"Croatian",code:"hr"},{name:"Czech",code:"cs"},{name:"Danish",code:"da"},{name:"Dari",code:"fa-AF"},{name:"Dutch",code:"nl"},{name:"English",code:"en"},{name:"Estonian",code:"et"},{name:"Farsi (Persian)",code:"fa"},{name:"Filipino, Tagalog",code:"tl"},{name:"Finnish",code:"fi"},{name:"French",code:"fr"},{name:"French (Canada)",code:"fr-CA"},{name:"Georgian",code:"ka"},{name:"German",code:"de"},{name:"Greek",code:"el"},{name:"Gujarati",code:"gu"},{name:"Haitian Creole",code:"ht"},{name:"Hausa",code:"ha"},{name:"Hebrew",code:"he"},{name:"Hindi",code:"hi"},{name:"Hungarian",code:"hu"},{name:"Icelandic",code:"is"},{name:"Indonesian",code:"id"},{name:"Irish",code:"ga"},{name:"Italian",code:"it"},{name:"Japanese",code:"ja"},{name:"Kannada",code:"kn"},{name:"Kazakh",code:"kk"},{name:"Korean",code:"ko"},{name:"Latvian",code:"lv"},{name:"Lithuanian",code:"lt"},{name:"Macedonian",code:"mk"},{name:"Malay",code:"ms"},{name:"Malayalam",code:"ml"},{name:"Maltese",code:"mt"},{name:"Marathi",code:"mr"},{name:"Mongolian",code:"mn"},{name:"Norwegian (Bokm\xe5l)",code:"no"},{name:"Pashto",code:"ps"},{name:"Polish",code:"pl"},{name:"Portuguese (Brazil)",code:"pt"},{name:"Portuguese (Portugal)",code:"pt-PT"},{name:"Punjabi",code:"pa"},{name:"Romanian",code:"ro"},{name:"Russian",code:"ru"},{name:"Serbian",code:"sr"},{name:"Sinhala",code:"si"},{name:"Slovak",code:"sk"},{name:"Slovenian",code:"sl"},{name:"Somali",code:"so"},{name:"Spanish",code:"es"},{name:"Spanish (Mexico)",code:"es-MX"},{name:"Swahili",code:"sw"},{name:"Swedish",code:"sv"},{name:"Tamil",code:"ta"},{name:"Telugu",code:"te"},{name:"Thai",code:"th"},{name:"Turkish",code:"tr"},{name:"Ukrainian",code:"uk"},{name:"Urdu",code:"ur"},{name:"Uzbek",code:"uz"},{name:"Vietnamese",code:"vi"},{name:"Welsh",code:"cy"}]}},function(e){e.O(0,[7699,4705,9212,522,6051,5706,3665,4574,3223,6682,9349,8726,9109,8472,778,9488,3144,3742,5779,8173,3270,2971,7023,1744],function(){return e(e.s=59925)}),_N_E=e.O()}]);