1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8338],{310:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(7963).A)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},1508:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(7963).A)("CircleAlert",[["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"}]])},3494:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(7963).A)("SpellCheck",[["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m16 20 2 2 4-4",key:"13tcca"}]])},3868:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(7876),a=s(8159),l=s(4232);let o=e=>{let{text:t="",delay:s=200,className:o="",animateBy:i="words",direction:c="top",threshold:n=.1,rootMargin:d="0px",animationFrom:m,animationTo:x,easing:g=e=>e,onAnimationComplete:h,stepDuration:u=.35}=e,y="words"===i?t.split(" "):t.split(""),[p,b]=(0,l.useState)(!1),j=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!j.current)return;let e=new IntersectionObserver(t=>{let[s]=t;s.isIntersecting&&(b(!0),e.unobserve(j.current))},{threshold:n,rootMargin:d});return e.observe(j.current),()=>e.disconnect()},[n,d]);let f=(0,l.useMemo)(()=>"top"===c?{filter:"blur(10px)",opacity:0,y:-50}:{filter:"blur(10px)",opacity:0,y:50},[c]),N=(0,l.useMemo)(()=>[{filter:"blur(5px)",opacity:.5,y:"top"===c?5:-5},{filter:"blur(0px)",opacity:1,y:0}],[c]),w=null!=m?m:f,v=null!=x?x:N,k=v.length+1,A=u*(k-1),T=Array.from({length:k},(e,t)=>1===k?0:t/(k-1));return(0,r.jsx)("p",{ref:j,className:"blur-text ".concat(o," flex flex-wrap"),children:y.map((e,t)=>{let l=((e,t)=>{let s=new Set([...Object.keys(e),...t.flatMap(e=>Object.keys(e))]),r={};return s.forEach(s=>{r[s]=[e[s],...t.map(e=>e[s])]}),r})(w,v);return(0,r.jsxs)(a.PY1.span,{initial:w,animate:p?l:w,transition:{duration:A,times:T,delay:t*s/1e3,ease:g},onAnimationComplete:t===y.length-1?h:void 0,style:{display:"inline-block",willChange:"transform, filter, opacity"},children:[" "===e?"\xa0":e,"words"===i&&t<y.length-1&&"\xa0"]},t)})})}},4206:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(7963).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},5739:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(7963).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},7055:(e,t,s)=>{"use strict";s.d(t,{o:()=>a});var r=s(9688);let a={success:e=>r.toast.success(e),error:e=>r.toast.error(e),info:e=>r.toast.info(e),warning:e=>r.toast.warning(e),message:e=>(0,r.toast)(e),default:e=>(0,r.toast)(e)}},8103:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(7876);function a(e){let{children:t,className:s="",colors:a=["#ffaa40","#9c40ff","#ffaa40"],animationSpeed:l=8,showBorder:o=!1,id:i}=e,c={backgroundImage:"linear-gradient(to right, ".concat(a.join(", "),")"),animationDuration:"".concat(l,"s")};return(0,r.jsxs)("div",{id:i,className:"relative mx-auto flex max-w-fit flex-row items-center justify-center font-extrabold backdrop-blur transition-shadow duration-500 cursor-pointer ".concat(s),children:[o&&(0,r.jsx)("div",{className:"absolute inset-0 bg-cover z-0 pointer-events-none animate-gradient",style:{...c,backgroundSize:"300% 100%"},children:(0,r.jsx)("div",{className:"absolute inset-0 bg-black z-[-1]",style:{width:"calc(100% - 2px)",height:"calc(100% - 2px)",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}})}),(0,r.jsx)("div",{className:"inline-block relative z-2 text-transparent bg-cover animate-gradient",style:{...c,backgroundClip:"text",WebkitBackgroundClip:"text",backgroundSize:"300% 100%"},children:t})]})}s(4232)},8412:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/tools/grammarly",function(){return s(9639)}])},9639:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSG:()=>v,default:()=>k});var r=s(7876),a=s(4232),l=s(8230),o=s.n(l),i=s(7328),c=s.n(i),n=s(8805),d=s(9892),m=s(9674),x=s(8103),g=s(3868),h=s(1508),u=s(9926),y=s(2257),p=s(4206),b=s(310),j=s(5739),f=s(3494),N=s(7055),w=s(7137),v=!0;function k(){var e;let{t}=(0,n.Bd)("common"),[s,l]=(0,a.useState)(""),[i,v]=(0,a.useState)(!1),[k,A]=(0,a.useState)(null),[T,S]=(0,a.useState)(!1),_=async()=>
1{if(!s.trim())return void N.o.error(t("tools.grammarly.emptyText"));if(s.length>1e4)return void N.o.error(t("tools.grammarly.textTooLong"));v(!0),A(null);try{let{data:{session:e}}=await w.N.auth.getSession();if(!(null==e?void 0:e.access_token)){N.o.error(t("tools.grammarly.authRequired")),v(!1);return}let r=await fetch("/api/grammar-check",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e.access_token)},body:JSON.stringify({text:s.trim()})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||t("tools.grammarly.checkFailed"))}let a=await r.json();if(a.success&&a.result)A(a.result),N.o.success(t("tools.grammarly.checkComplete"));else throw Error(a.error||t("tools.grammarly.checkFailed"))}catch(e){console.error("Grammar check error:",e),N.o.error(e instanceof Error?e.message:t("tools.grammarly.checkFailed"))}finally{v(!1)}},C=async e=>{try{await navigator.clipboard.writeText(e),S(!0),N.o.success(t("tools.copied")),setTimeout(()=>S(!1),2e3)}catch(e){N.o.error(t("copyFailed"))}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(c(),{children:[(0,r.jsxs)("title",{children:[t("tools.grammarly.pageTitle")," - Voyagard"]}),(0,r.jsx)("meta",{name:"description",content:t("tools.grammarly.metaDescription")})]}),(0,r.jsxs)("div",{className:"min-h-screen bg-black",children:[(0,r.jsx)("div",{className:"absolute top-0 left-0 w-full h-[600px] z-0 pointer-events-none",style:{background:"radial-gradient(ellipse at 50% 20%, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.15) 30%, rgba(0, 0, 0, 0) 70%)"}}),(0,r.jsxs)("div",{className:"relative z-10",children:[(0,r.jsx)(d.A,{}),(0,r.jsx)("section",{className:"px-6 pt-16 pb-12",children:(0,r.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,r.jsxs)(o(),{href:"/tools",className:"inline-flex items-center gap-2 text-blue-400 hover:text-blue-300 transition-colors mb-6",children:[(0,r.jsx)(u.A,{className:"w-4 h-4"}),t("tools.grammarly.backToTools")]}),(0,r.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,r.jsx)("div",{className:"p-3 bg-blue-600/20 rounded-lg text-blue-400",children:(0,r.jsx)(f.A,{className:"w-8 h-8"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(x.A,{className:"text-4xl md:text-5xl font-bold",children:t("tools.grammarly.title")}),(0,r.jsx)(g.A,{text:t("tools.grammarly.subtitle"),delay:150,animateBy:"words",direction:"top",className:"text-lg text-gray-300 mt-2"})]})]})]})}),(0,r.jsx)("section",{className:"px-6 pb-20",children:(0,r.jsxs)("div",{className:"max-w-6xl mx-auto grid lg:grid-cols-2 gap-8",children:[(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-6",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold text-white mb-4",children:t("tools.grammarly.inputTitle")}),(0,r.jsx)("textarea",{value:s,onChange:e=>l(e.target.value),placeholder:t("tools.grammarly.inputPlaceholder"),className:"w-full h-64 px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none"}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-400",children:[s.length," / 10,000 ",t("tools.grammarly.characters")]}),(0,r.jsx)("button",{onClick:_,disabled:i||!s.trim(),className:"px-6 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:i?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j.A,{className:"w-4 h-4 animate-spin"}),t("tools.grammarly.checking")]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.A,{className:"w-4 h-4"}),t("tools.grammarly.checkButton")]})})]})]}),(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-6",children:[(0,r.jsxs)("h3",{className:"text-lg font-semibold text-white mb-3 flex items-center gap-2",children:[(0,r.jsx)(b.A,{className:"w-5 h-5 text-yellow-400"}),t("tools.grammarly.tipsTitle")]}),(0,r.jsxs)("ul",{className:"space-y-2 text-sm text-gray-400",children:[(0,r.jsxs)("li",{children:["⢠",t("tools.grammarly.tip1")]}),(0,r.jsxs)("li",{children:["⢠",t("tools.grammarly.tip2")]}),(0,r.jsxs)("li",{children:["⢠",t("tools.grammarly.tip3")]}),(0,r.jsxs)("li",{children:["⢠",t("tools.grammarly.tip4")]})]})]})]}),(0,r.jsx)("div",{className:"space-y-6",children:k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-white",children:t("tools.grammarly.scoreTitle")}),(0,r.jsx)("div",{className:"text-3xl font-bold ".concat((e=k.score)>=90?"text-green-400":e>=70?"text-yellow-400":"text-red-400"),children:k.score})]}),(0,r.jsx)("div",{className:"w-full bg-gray-800 rounded-full h-2",children:(0,r.jsx)("div",{className:"h-2 rounded-full transition-all ".concat(k.score>=90?"bg-green-500":k.score>=70?"bg-yellow-500":"bg-red-500"),style:{width:"".concat(k.score,"%")}})}),(0,r.jsx)("p",{className:"text-sm text-gray-400 mt-2",children:0===k.issues.length?t("tools.grammarly.noIssues"):t("tools.grammarly.issuesFound",{count:k.issues.length})})]}),(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-white",children:t("tools.grammarly.correctedText")}),(0,r.jsx)("button",{onClick:()=>C(k.correctedText),className:"flex items-center gap-2 px-3 py-1.5 text-blue-400 hover:text-blue-300 transition-colors text-sm",children:T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.A,{className:"w-4 h-4"}),t("tools.copied")]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{className:"w-4 h-4"}),t("tools.grammarly.copy")]})})]}),(0,r.jsx)("div",{className:"bg-gray-800 border border-gray-700 rounded-lg p-4",children:(0,r.jsx)("p",{className:"text-white whitespace-pre-wrap leading-relaxed",children:k.correctedText})})]}),k.issues.length>0&&(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-6",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-white mb-4",children:t("tools.grammarly.issuesTitle")}),(0,r.jsx)("div",{className:"space-y-4 max-h-96 overflow-y-auto",children:k.issues.map((e,s)=>{let a;return(0,r.jsx)("div",{className:"bg-gray-800 border border-gray-700 rounded-lg p-4",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(e=>{switch(e){case"grammar":return(0,r.jsx)(h.A,{className:"w-4 h-4 text-yellow-400"});case"spelling":return(0,r.jsx)(h.A,{className:"w-4 h-4 text-red-400"});case"style":return(0,r.jsx)(b.A,{className:"w-4 h-4 text-blue-400"});case"clarity":return(0,r.jsx)(b.A,{className:"w-4 h-4 text-purple-400"});case"punctuation":return(0,r.jsx)(h.A,{className:"w-4 h-4 text-orange-400"});default:return(0,r.jsx)(h.A,{className:"w-4 h-4 text-gray-400"})}})(e.type),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,r.jsx)("span",{className:"text-xs font-medium text-gray-400 uppercase",children:(a=e.type,t("tools.grammarly.issueTypes.".concat(a)))})}),(0,r.jsx)("p",{className:"text-sm text-gray-300 mb-2",children:e.message}),e.suggestion&&(0,r.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-700",children:[(0,r.jsxs)("p",{className:"text-xs text-gray-400 mb-1",children:[t("tools.grammarly.suggestion"),":"]}),(0,r.jsx)("p",{className:"text-sm text-blue-400",children:e.suggestion})]})]})]})},s)})})]})]}):(0,r.jsxs)("div",{className:"bg-gray-900 border border-gray-800 rounded-xl p-12 text-center",children:[(0,r.jsx)(f.A,{className:"w-16 h-16 text-gray-600 mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-gray-400 text-lg mb-2",children:t("tools.grammarly.emptyState")}),(0,r.jsx)("p",{className:"text-gray-500 text-sm",children:t("tools.grammarly.emptyStateSubtitle")})]})})]})}),(0,r.jsx)(m.A,{})]})]})]})}},9926:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(7963).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])}},e=>{e.O(0,[5695,8451,4990,8390,9688,1673,9731,705,636,6593,8792],()=>e(e.s=8412)),_N_E=e.O()}]);
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.