PageSourceSearch

https://lacuna.pub/build/assets/conversion-funnel-C6zRYjQs.js

js lacuna.pub collected 2026-09-25 14:51:52 UTC 3,133 bytes, 1 lines download raw bytes

1import{j as e}from"./app-D2hV7Ye0.js";import{C as d,R as c,a as x,X as h,Y as g,b as m,c as f,B as p}from"./chart-CkqJh2Ps.js";import{B as u}from"./BarChart-BAA6HPEO.js";/* empty css            */import"./utils-DBwg5IJ2.js";const j={count:{label:"Users",color:"var(--chart-1)"}};function N({data:t}){var o,i;const l=t.map((r,a)=>{const n=t[a-1],s=n&&n.count>0?(n.count-r.count)/n.count*100:0;return{...r,dropOffRate:s>0?s:0}});return e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-white p-6 shadow-sm dark:bg-gray-800/75 dark:shadow-none dark:ring-1 dark:ring-white/10",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Conversion Funnel"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"User journey from signup to customer conversion"})]}),e.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border bg-white p-4 text-center shadow-sm dark:bg-gray-800/75 dark:shadow-none dark:ring-1 dark:ring-white/10",children:[e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Overall Conversion"}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:[t.length>0&&t[0].count>0?((((o=t[t.length-1])==null?void 0:o.count)||0)/t[0].count*100).toFixed(1):0,"%"]})]}),e.jsxs("div",{className:"rounded-lg border bg-white p-4 text-center shadow-sm dark:bg-gray-800/75 dark:shadow-none dark:ring-1 dark:ring-white/10",children:[e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Total Customers"}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:((i=t[t.length-1])==null?void 0:i.count.toLocaleString())||0})]})]}),e.jsx(d,{className:"h-96 w-full min-w-0",config:j,children:e.jsx(c,{height:"100%",width:"100%",children:e.jsxs(u,{data:l,margin:{top:20,right:12,left:12,bottom:80},children:[e.jsx(x,{stroke:"var(--border)",strokeDasharray:"3 3"}),e.jsx(h,{angle:-45,axisLine:!1,dataKey:"stage",height:80,textAnchor:"end",tick:{fontSize:12},tickLine:!1}),e.jsx(g,{axisLine:!1,tick:{fontSize:12},tickFormatter:r=>r.toLocaleString(),tickLine:!1}),e.jsx(m,{content:e.jsx(f,{className:"w-[200px]",formatter:(r,a,n)=>{const s=n.payload;return[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:"Users:"}),e.jsx("span",{className:"font-medium",children:s.count.toLocaleString()})]}),e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:"% of Total:"}),e.jsxs("span",{className:"font-medium",children:[s.percentage,"%"]})]}),s.dropOffRate>0&&e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:"Drop-off:"}),e.jsxs("span",{className:"font-medium text-red-600 dark:text-red-400",children:[s.dropOffRate.toFixed(1),"%"]})]})]},"details"),""]},labelFormatter:(r,a)=>a&&a.length>0?a[0].payload.stage:r})}),e.jsx(p,{dataKey:"count",fill:"var(--color-count)",radius:[4,4,0,0]})]})})})]})}export{N 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.