PageSourceSearch

https://www.automateed.com/_next/static/chunks/5640.9c87dd45414ba907.js

js automateed.com collected 2026-10-01 13:09:46 UTC 9,639 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5640],{22252:function(e,r,t){t.d(r,{Z:function(){return a}});let a=(0,t(39763).Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},15863:function(e,r,t){t.d(r,{Z:function(){return a}});let a=(0,t(39763).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},88906:function(e,r,t){t.d(r,{Z:function(){return a}});let a=(0,t(39763).Z)("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]])},17689:function(e,r,t){t.d(r,{Z:function(){return a}});let a=(0,t(39763).Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},15640:function(e,r,t){t.r(r),t.d(r,{KindleToEpubConverter:function(){return g}});var a=t(57437),s=t(2265),l=t(71769),n=t(82023),o=t(88906),d=t(66901),i=t(48736),c=t(17689),x=t(22252),m=t(92735),p=t(15863),u=t(76858);function g(){let[e,r]=(0,s.useState)(null),[t,g]=(0,s.useState)(!1),[h,f]=(0,s.useState)(null),[b,y]=(0,s.useState)(!1),v=[".mobi",".azw",".azw3",".kfx",".prc"],w=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?y(!0):"dragleave"===e.type&&y(!1)},[]),k=e=>{var r;let t="."+(null===(r=e.name.split(".").pop())||void 0===r?void 0:r.toLowerCase());return v.includes(t)},j=(0,s.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),y(!1),e.dataTransfer.files&&e.dataTransfer.files[0]){let t=e.dataTransfer.files[0];k(t)?(r(t),f(null)):f({success:!1,message:"Invalid file format. Please upload a Kindle file (".concat(v.join(", "),")")})}},[]),N=async()=>{if(e){g(!0),f(null);try{let r=new FormData;r.append("file",e);let t=await fetch("/api/convert-kindle-to-epub",{method:"POST",body:r}),a=await t.json();t.ok&&a.success?f({success:!0,message:"Conversion successful! Your EPUB file is ready.",downloadUrl:a.downloadUrl,fileName:a.fileName}):f({success:!1,message:a.error||"Conversion failed. Please try again or use a different file."})}catch(e){f({success:!1,message:"An error occurred during conversion. Please check your file and try again."})}finally{g(!1)}}},C=()=>{r(null),f(null),g(!1)};return(0,a.jsxs)("div",{className:"not-prose my-8 w-full",style:{fontFamily:"system-ui, -apple-system, sans-serif"},children:[(0,a.jsxs)("div",{className:"bg-gradient-to-br from-purple-600 via-indigo-600 to-blue-600 rounded-2xl p-8 mb-6 text-white shadow-2xl",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-3 bg-white/20 rounded-xl backdrop-blur-sm",children:(0,a.jsx)(l.Z,{className:"w-8 h-8 text-white"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl md:text-3xl font-bold text-white",children:"Free Kindle to EPUB Converter"}),(0,a.jsx)("p",{className:"text-purple-100",children:"Convert your Kindle books instantly - no signup required"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-white",children:[(0,a.jsx)(n.Z,{className:"w-5 h-5 text-yellow-300"}),(0,a.jsx)("span",{className:"text-white",children:"100% Free - No limits"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-white",children:[(0,a.jsx)(o.Z,{className:"w-5 h-5 text-green-300"}),(0,a.jsx)("span",{className:"text-white",children:"Secure & Private"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-white",children:[(0,a.jsx)(d.Z,{className:"w-5 h-5 text-blue-300"}),(0,a.jsx)("span",{className:"text-white",children:"Preserves Formatting"})]})]})]}),(0,a.jsxs)("div",{className:"bg-white dark:bg-gray-800 rounded-2xl shadow-xl border border-gray-200 dark:border-gray-700 overflow-hidden",children:[(0,a.jsxs)("div",{className:"p-6 md:p-8",children:[(0,a.jsxs)("div",{className:"relative border-2 border-dashed rounded-xl p-8 text-center transition-all duration-300 ".concat(b?"border-purple-500 bg-purple-50 dark:bg-purple-900/20":e?"border-green-500 bg-green-50 dark:bg-green-900/20":"border-gray-300 dark:border-gray-600 hover:border-purple-400 hover:bg-gray-50 dark:hover:bg-gray-700/50"),onDragEnter:w,onDragLeave:w,onDragOver:w,onDrop:j,children:[(0,a.jsx)("input",{type:"file",accept:".mobi,.azw,.azw3,.kfx,.prc","aria-label":"Upload a Kindle ebook file to convert",onChange:e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0];k(t)?(r(t),f(null)):f({success:!1,message:"Invalid file format. Please upload a Kindle file (".concat(v.join(", "),")")})}},className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer",disabled:t}),e?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto bg-green-100 dark:bg-green-900/40 rounded-full flex items-center justify-center",children:(0,a.jsx)(i.Z,{className:"w-8 h-8 text-green-600 dark:text-green-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[(e.size/1048576).toFixed(2)," MB"]})]}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),C()},className:"text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 font-medium",children:"Choose different file"})]}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto bg-purple-100 dar
1k:bg-purple-900/40 rounded-full flex items-center justify-center",children:(0,a.jsx)(c.Z,{className:"w-8 h-8 text-purple-600 dark:text-purple-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-gray-900 dark:text-white text-lg",children:"Drop your Kindle file here"}),(0,a.jsx)("p",{className:"text-gray-500 dark:text-gray-400 mt-1",children:"or click to browse"})]}),(0,a.jsxs)("p",{className:"text-xs text-gray-600 dark:text-gray-300",children:["Supports: ",v.join(", ")," • Max 50MB"]}),(0,a.jsx)("a",{href:"/samples/sample-ebook.mobi",download:"alice-in-wonderland-sample.mobi",onClick:e=>e.stopPropagation(),className:"inline-block text-xs text-purple-600 hover:text-purple-700 dark:text-purple-400 underline",children:"Download sample MOBI file to test"})]})]}),h&&(0,a.jsxs)("div",{className:"mt-6 p-4 rounded-xl flex items-start gap-3 ".concat(h.success?"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800":"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800"),children:[h.success?(0,a.jsx)(d.Z,{className:"w-5 h-5 text-green-600 dark:text-green-400 flex-shrink-0 mt-0.5"}):(0,a.jsx)(x.Z,{className:"w-5 h-5 text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)("p",{className:"font-medium ".concat(h.success?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"),children:h.message})})]}),(0,a.jsxs)("div",{className:"mt-6 flex flex-col sm:flex-row gap-3",children:[(null==h?void 0:h.success)&&h.downloadUrl?(0,a.jsxs)("button",{onClick:()=>{if(null==h?void 0:h.downloadUrl){let e=document.createElement("a");e.href=h.downloadUrl,e.download=h.fileName||"converted.epub",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},className:"flex-1 flex items-center justify-center gap-2 px-6 py-4 bg-gradient-to-r from-green-600 to-emerald-600 text-white font-semibold rounded-xl hover:from-green-700 hover:to-emerald-700 transition-all shadow-lg hover:shadow-xl",children:[(0,a.jsx)(m.Z,{className:"w-5 h-5"}),"Download EPUB"]}):(0,a.jsx)("button",{onClick:N,disabled:!e||t,className:"flex-1 flex items-center justify-center gap-2 px-6 py-4 font-semibold rounded-xl transition-all shadow-lg hover:shadow-xl ".concat(!e||t?"bg-gray-200 dark:bg-gray-700 text-gray-500 dark:text-gray-400 cursor-not-allowed":"bg-gradient-to-r from-purple-600 to-indigo-600 text-white hover:from-purple-700 hover:to-indigo-700"),children:t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z,{className:"w-5 h-5 animate-spin"}),"Converting..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{className:"w-5 h-5"}),"Convert to EPUB"]})}),(e||h)&&(0,a.jsx)("button",{onClick:C,className:"px-6 py-4 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 font-medium rounded-xl hover:bg-gray-50 dark:hover:bg-gray-700 transition-all",children:"Reset"})]})]}),(0,a.jsx)("div",{className:"bg-gray-50 dark:bg-gray-900/50 px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:(0,a.jsxs)("p",{className:"text-xs text-gray-500 dark:text-gray-400 text-center",children:[(0,a.jsx)("strong",{children:"Note:"})," This tool works with DRM-free Kindle files only. Files you've purchased may have DRM protection. Your files are processed securely and deleted immediately after conversion."]})})]}),(0,a.jsxs)("div",{className:"mt-8 bg-gradient-to-r from-orange-500 to-pink-500 rounded-2xl p-6 text-white text-center shadow-xl",children:[(0,a.jsx)("h3",{className:"text-xl font-bold mb-2 text-white",children:"Want to Create Professional eBooks?"}),(0,a.jsx)("p",{className:"text-orange-100 mb-4",children:"Use Automateed's AI-powered platform to create stunning eBooks in minutes!"}),(0,a.jsxs)("a",{href:"https://www.automateed.com",className:"inline-flex items-center gap-2 rounded-lg bg-white px-6 py-3 font-bold text-orange-800 transition-all hover:bg-orange-50",children:["Try Automateed Free",(0,a.jsx)(u.Z,{className:"w-4 h-4"})]})]})]})}}}]);

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.