PageSourceSearch

https://postbold.com/_next/static/chunks/1182-229812412fc39bdc.js

js postbold.com collected 2026-09-24 14:02:50 UTC 9,925 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1182],{11182:function(e,t,l){l.r(t),l.d(t,{default:function(){return h}});var a=l(85893),r=l(67294),s=l(11163),n=l(56137),o=l(9008),i=l.n(o),c=l(22655),d=l(37489),u=l(78773);l(21094);var m=l(31499),x=l(98471);let g=[{value:"flat vector",label:"Flat vector",image:"flat vector.jpg"},{value:"3D render",label:"3D render",image:"3dmodel.jpg"},{value:"sketch / line art",label:"Sketch / line art",image:"sketch line art.jpg"},{value:"watercolor",label:"Watercolor",image:"water color.jpg"},{value:"isometric",label:"Isometric",image:"isometric.jpg"},{value:"sci-fi / futuristic",label:"Sci-fi / futuristic",image:"futuristic.jpg"},{value:"photorealistic",label:"Photorealistic",image:"photorealistic.jpg"},{value:"minimal geometric",label:"Minimal geometric",image:"minimal geometric.jpg"}];function b(e){var t,l;let{dimension:r,setDimension:s,noOfSlides:n,setNoOfSlides:o,content:i,setContent:c,setError:d,isGenerating:u,isProPlus:x,maxFreeSlides:b,maxSlides:h,dimensions:v,selectedTemplate:p,setSelectedTemplate:f,selectedPalette:j,setSelectedPalette:y,paletteCategory:N,setPaletteCategory:w,imageStyle:C,setImageStyle:k,error:S,onGenerate:P}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-lg font-semibold text-gray-700 mb-3",children:"Select Dimension"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{value:r,onChange:e=>s(e.target.value),className:"w-full text-lg p-4 pr-10 border-2 border-gray-200 rounded-xl focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition-all appearance-none cursor-pointer bg-white",children:v.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("div",{className:"absolute right-4 top-1/2 transform -translate-y-1/2 pointer-events-none text-2xl",children:null===(t=v.find(e=>e.value===r))||void 0===t?void 0:t.icon})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-lg font-semibold text-gray-700 mb-3",children:"Number of Slides"}),(0,a.jsx)("select",{value:n,onChange:e=>o(parseInt(e.target.value,10)),className:"w-full text-lg p-4 border-2 border-gray-200 rounded-xl focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition-all cursor-pointer",children:Array.from({length:h},(e,t)=>t+1).map(e=>{let t=!x&&e>b;return(0,a.jsxs)("option",{value:e,disabled:t,className:t?"text-gray-400":"text-gray-900",children:[e," ",1===e?"slide":"slides",t?" \uD83D\uDD12 (Pro+ only)":""]},e)})}),!x&&(0,a.jsxs)("div",{className:"mt-2 text-sm text-amber-700",children:[(0,a.jsx)("a",{href:"/pricing",className:"underline hover:text-amber-900",children:"Upgrade to Pro+"})," ","for up to ",h," slides"]})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-lg font-semibold text-gray-700 mb-3",children:"Paste Your Content"}),(0,a.jsx)("textarea",{value:i,onChange:e=>{c(e.target.value),d("")},placeholder:"Paste your content, note, or idea here. It can be a paragraph, an article, or any text you want to turn into a carousel...",className:"text-lg w-full h-64 p-4 border-2 border-gray-200 rounded-xl focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition-all resize-none",disabled:u}),(0,a.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,a.jsxs)("span",{className:"text-md text-gray-500",children:[i.length," characters"]}),i.length>0&&(0,a.jsx)("button",{type:"button",onClick:()=>c(""),className:"text-md text-gray-500 hover:text-gray-700",children:"Clear"})]})]}),(0,a.jsx)("div",{className:"mb-6 p-4 border-2 border-gray-100 rounded-xl bg-gray-50",children:(0,a.jsx)(m.default,{palettesOnly:!0,compactPalettes:!0,activeTab:"palettes",onActiveTabChange:()=>{},selectedCategory:N,onCategoryChange:w,selectedPaletteId:null!==(l=null==j?void 0:j.id)&&void 0!==l?l:null,onFullPaletteSelect:y,solidColor:"#ffffff",onSolidColorChange:()=>{},onSolidSwatchSelect:()=>{},gradientDirection:"to bottom",onGradientColorChange:()=>{},onGradientDirectionChange:()=>{},onGradientSwatchClick:()=>{}})}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"block text-lg font-semibold text-gray-700 mb-3",children:"Image Style"}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mb-3",children:"Choose the visual style for AI-generated slide illustrations"}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:g.map(e=>{let t=C===e.value,l="/carousel_image_ref/".concat(encodeURIComponent(e.image));return(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.value),disabled:u,className:"group flex flex-col overflow-hidden rounded-xl border-2 text-left transition-all ".concat(t?"border-blue-500 ring-2 ring-blue-200":"border-gray-200 hover:border-gray-300"," ").concat(u?"opacity-60 cursor-not-allowed":"cursor-pointer"),children:[(0,a.jsxs)("div",{className:"relative aspect-[4/3] w-full bg-gray-100",children:[(0,a.jsx)("img",{src:l,alt:"".concat(e.label," style preview"),className:"h-full w-full object-cover"}),t&&(0,a.jsx)("div",{className:"absolute inset-0 bg-blue-500/10 ring-inset ring-2 ring-blue-500"})]}),(0,a.jsx)("span",{className:"px-2 py-2 text-center text-xs font-medium sm:text-sm ".concat(t?"bg-blue-50 text-blue-700":"bg-white text-gray-700 group-hover:bg-gray-50"),children:e.label})]},e.value)})})]}),S&&(0,a.jsx)("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded-lg",children:(0,a.jsx)("p",{className:"text-sm text-red-700",children:S})}),(0,a.jsx)("button",{type:"button",onClick:P,disabled:u||!i.trim(),className:"w-full text-lg py-4 rounded-xl font-semibold text-white transition-all duration-200 ".concat(u||!i.trim()?"bg-gray-400 cursor-not-allowed":"bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 shadow-lg hover:shadow-xl"),children:u?(0,a.jsxs)("div",{className:"flex items-center justify-center",children:[(0,a.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating your carousel..."]}):"Generate Carousel"})]})}function h(e){var t,l;let{embedded:o=!1,onBack:m,onGenerate:g}=e,h=c.Z.aiCarousel,v=(0,s.useRouter)(),{data:p,status:f}=(0,d.k)(),[j,y]=(0,r.useState)("linkedin-4-5"),[N,w]=(0,r.useState)(""),[C,k]=(0,r.useState)(!1),[S,P]=(0,r.useState)(""),[I,D]=(0,r.useState)(5),[_,G]=(0,r.useState)(null),[A,F]=(0,r.useState)(()=>{var e;return null!==(e=x.z[0])&&void 0!==e?e:null}),[R,z]=(0,r.useState)("All"),[E,Z]=(0,r.useState)("flat vector"),L=[{value:"linkedin-4-5",label:"LinkedIn (4:5)",as
1pectRatio:"4:5",icon:(0,a.jsx)(u.ltd,{})},{value:"instagram-4-5",label:"Instagram (4:5)",aspectRatio:"4:5",icon:(0,a.jsx)(u.Zf_,{})},{value:"linkedin",label:"LinkedIn (1:1)",aspectRatio:"1:1",icon:(0,a.jsx)(u.ltd,{})},{value:"instagram-1-1",label:"Instagram (1:1)",aspectRatio:"1:1",icon:(0,a.jsx)(u.Zf_,{})}],Y=(null==p?void 0:null===(t=p.user)||void 0===t?void 0:t.role)==="pro+"||(null==p?void 0:null===(l=p.user)||void 0===l?void 0:l.role)==="admin";(0,r.useEffect)(()=>{"loading"===f||p||v.push("/signin")},[p,f,v]);let M=async()=>{if(!N.trim()){P("Please paste some content before generating");return}P(""),k(!0);try{g?await g({source:"paste-content",dimension:j,content:N,noOfSlides:I,template:_,colorPalette:A?{background:A.background,text:A.text,accent:A.accent}:null,selectedPalette:A,imageStyle:E}):P("Generation handler not available.")}catch(e){console.error("Error generating carousel:",e),P("Failed to generate carousel. Please try again.")}finally{k(!1)}},T={dimension:j,setDimension:y,noOfSlides:I,setNoOfSlides:D,content:N,setContent:w,setError:P,isGenerating:C,isProPlus:Y,maxFreeSlides:5,maxSlides:20,dimensions:L,selectedTemplate:_,setSelectedTemplate:G,selectedPalette:A,setSelectedPalette:F,paletteCategory:R,setPaletteCategory:z,imageStyle:E,setImageStyle:Z,error:S,onGenerate:M};return"loading"===f?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:"Loading..."}):(0,a.jsxs)(a.Fragment,{children:[!o&&(0,a.jsxs)(i(),{children:[(0,a.jsx)("title",{children:"Paste Content - Create AI Carousel"}),(0,a.jsx)("meta",{name:"description",content:"Paste your existing content to create a stunning carousel"}),(0,a.jsx)("link",{rel:"icon",href:h.icon})]}),o?(0,a.jsx)("div",{className:"bg-gradient-to-br from-gray-50 to-gray-100 py-8 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-3",children:"Paste Your Content"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Share your note, idea, or article and we'll transform it into a beautiful carousel"})]}),(0,a.jsx)("div",{className:"bg-white rounded-2xl shadow-xl p-8",children:(0,a.jsx)(b,{...T})})]})}):(0,a.jsx)(n.Z,{children:(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 py-12 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-3",children:"Paste Your Content"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Share your note, idea, or article and we'll transform it into a beautiful carousel"})]}),(0,a.jsx)("div",{className:"bg-white rounded-2xl shadow-xl p-8",children:(0,a.jsx)(b,{...T})})]})})})]})}}}]);

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.