PageSourceSearch

https://page2doc.com/assets/ToolsIndex-DcWGwmr8.js

js page2doc.com collected 2026-09-24 14:49:54 UTC 6,376 bytes, 1 lines download raw bytes

1import{h as I,a4 as S,u as C,r as j,j as e,t as o,n as E,B as L,F as R,a as $,L as v,A as T,b as A,e as _,p as F,g as O}from"./index--O6ybP7K.js";import{G as P,F as G}from"./git-compare-Del-3Nnj.js";const B=new Set(["save-medium-as-pdf","convert-medium-article-behind-paywall-to-pdf","save-substack-as-pdf","save-twitter-as-pdf","save-linkedin-as-pdf","save-wikipedia-as-pdf","convert-news-article-with-ads-to-pdf","save-notion-as-pdf"]),D={pdf:{icon:$,color:"from-red-500 to-rose-600",pillar:"/webpage-to-pdf"},word:{icon:G,color:"from-blue-500 to-indigo-600",pillar:"/webpage-to-word"},excel:{icon:R,color:"from-green-500 to-emerald-600",pillar:"/webpage-to-excel"},ai:{icon:L,color:"from-purple-500 to-violet-600",pillar:"/ai-features"},comparison:{icon:P,color:"from-amber-500 to-orange-600",pillar:"/tools"}},N={pdf:"toolsIndex.labelPdf",word:"toolsIndex.labelWord",excel:"toolsIndex.labelExcel",ai:"toolsIndex.labelAi",comparison:"toolsIndex.labelComparison"},U={pdf:"toolsIndex.descPdf",word:"toolsIndex.descWord",excel:"toolsIndex.descExcel",ai:"toolsIndex.descAi",comparison:"toolsIndex.descComparison"};function K(){const r=[],s=new Set;for(const a of F){const l=a;r.push({slug:l.slug,h1:l.seo?.h1||l.slug,cluster:l.cluster,isRich:!0}),s.add(l.slug)}const g=O.pages??{};for(const[a,l]of Object.entries(g))s.has(a)||B.has(a)||(r.push({slug:a,h1:l.seo?.h1||a,cluster:l.cluster,isRich:!1}),s.add(a));return r}function Y(){const{lang:r}=I(),s=S.includes(r)?r:"en",g=s!=="en"?`/${s}`:"";C();const[a,l]=j.useState(""),[d,h]=j.useState(null),p=K(),m=["pdf","word","excel","ai","comparison"],c={};for(const t of m)c[t]=[];for(const t of p)c[t.cluster]&&c[t.cluster].push(t);const f=a.toLowerCase(),u={};for(const t of m){const i=c[t].filter(n=>(!d||d===t)&&(!a||n.h1.toLowerCase().includes(f)||n.slug.includes(f)));i.length>0&&(u[t]=i)}const b=p.length;return e.jsxs("div",{className:"min-h-screen bg-white dark:bg-gray-950",children:[e.jsx("section",{className:"bg-gradient-to-br from-slate-950 via-indigo-950 to-slate-900 text-white py-20 px-6",children:e.jsxs("div",{className:"max-w-5xl mx-auto text-center",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4","data-testid":"text-page-title",children:o(s,"toolsIndex.pageTitle")}),e.jsx("p",{className:"text-slate-300 text-lg max-w-3xl mx-auto mb-8",children:o(s,"toolsIndex.pageSubtitle",{count:String(b)})}),e.jsxs("div",{className:"relative max-w-xl mx-auto",children:[e.jsx(E,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx("input",{type:"text",placeholder:o(s,"toolsIndex.searchPlaceholder"),value:a,onChange:t=>l(t.target.value),className:"w-full pl-12 pr-4 py-3 rounded-xl bg-white/10 border border-white/20 text-white placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-400 focus:border-transparent","data-testid":"input-search-tools"})]}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-6",children:[e.jsxs("button",{onClick:()=>h(null),className:`px-4 py-2 rounded-lg text-sm font-medium transition ${d?"bg-white/10 text-slate-300 hover:bg-white/20":"bg-white text-indigo-900"}`,"data-testid":"button-filter-all",children:[o(s,"toolsIndex.filterAll")," (",b,")"]}),m.map(t=>{const i=c[t].length,n=o(s,N[t]);return e.jsxs("button",{onClick:()=>h(d===t?null:t),className:`px-4 py-2 rounded-lg text-sm font-medium transition ${d===t?"bg-white text-indigo-900":"bg-white/10 text-slate-300 hover:bg-white/20"}`,"data-testid":`button-filter-${t}`,children:[n," (",i,")"]},t)})]})]})}),e.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-16 space-y-16",children:[m.map(t=>{const i=u[t];if(!i||i.length===0)return null;const n=D[t],k=n.icon,w=o(s,N[t]),y=o(s,U[t]);return e.jsxs("section",{"data-testid":`section-cluster-${t}`,children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl bg-gradient-to-br ${n.color} flex items-center justify-center`,children:e.jsx(k,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:w}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:y})]})]}),n.pillar!=="/tools"&&e.jsxs(v,{href:`${g}${n.pillar}`,className:"inline-flex items-center gap-1 text-sm text-indigo-600 dark:text-indigo-400 hover:underline mb-4",children:[o(s,"toolsIndex.viewOverview",{label:w})," ",e.jsx(T,{className:"w-3 h-3"})]}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3 mt-4",children:i.map(x=>e.jsxs(v,{href:`${g}/tools/${x.slug}`,className:"group flex items-start gap-3 p-4 rounded-xl border border-gray-200 dark:border-gray-800 hover:border-indigo-300 dark:hover:border-indigo-700 hover:shadow-md transition bg-white dark:bg-gray-900","data-testid":`link-tool-${x.slug}`,children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-white group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition line-clamp-2",children:x.h1}),x.isRich&&e.jsx("span",{className:"inline-block mt-1 text-[10px] px-2 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-900/50 text-indigo-700 dark:text-indigo-300 font-medium",children:o(s,"toolsIndex.inDepthGuide")})]}),e.jsx(A,{className:"w-4 h-4 text-gray-400 group-hover:text-indigo-500 mt-1 shrink-0 transition"})]},x.slug))})]},t)}),Object.keys(u).length===0&&e.jsxs("div",{className:"text-center py-20",children:[e.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-lg",children:o(s,"toolsIndex.noResults",{filter:a})}),e.jsx("button",{onClick:()=>{l(""),h(null)},className:"mt-4 text-indigo-600 dark:text-indigo-400 underline","data-testid":"button-clear-search",children:o(s,"toolsIndex.clearSearch")})]}),e.jsxs("section",{className:"bg-indigo-600 text-white rounded-2xl p-8 text-center","data-testid":"section-cta",children:[e.jsx("h2",{className:"text-2xl font-bold mb-3",children:o(s,"toolsIndex.ctaTitle")}),e.jsx("p",{className:"text-indigo-200 mb-6 max-w-2xl mx-auto",children:o(s,"toolsIndex.ctaSubtitle")}),e.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-white text-indigo-700 font-bold px-6 py-3 rounded-xl hover:bg-indigo-50 transition","data-testid":"button-cta-install",children:o(s,"toolsIndex.ctaButton")})]})]})]})}export{Y as default};

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.