PageSourceSearch

https://softonrank.com/assets/SEOROICalculator-q6FNb2Fs.js

js softonrank.com collected 2026-10-05 06:41:25 UTC 2,877 bytes, 1 lines download raw bytes

1import{r as n,j as e,c6 as r,I as o,B as A,$ as y,x as d}from"./index-Bg6wynkv.js";import{D as j}from"./dollar-sign-BlDktGEp.js";const D=()=>{const[m,R]=n.useState(""),[h,b]=n.useState("2"),[x,O]=n.useState(""),[v,f]=n.useState(""),[t,C]=n.useState(null),N=()=>{const s=parseFloat(m)||0,i=parseFloat(h)/100||0,g=parseFloat(x)||0,a=parseFloat(v)||0;if(!s||!g||!a)return;const l=s*i,u=l*g,p=u*12,I=(u-a)/a*100,F=(p-a*12)/(a*12)*100,$=l>0?a/l:0;C({monthlyRevenue:u,annualRevenue:p,monthlyROI:I,annualROI:F,costPerAcquisition:$,monthlyConversions:l})},S=s=>s.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}),c=s=>`$${s.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{children:["Monthly Organic Traffic ",e.jsx("span",{className:"text-xs text-destructive",children:"*"})]}),e.jsx(o,{type:"number",value:m,onChange:s=>R(s.target.value),placeholder:"e.g. 10000"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{children:["Conversion Rate (%) ",e.jsx("span",{className:"text-xs text-destructive",children:"*"})]}),e.jsx(o,{type:"number",value:h,onChange:s=>b(s.target.value),placeholder:"e.g. 2",step:"0.1"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{children:["Average Order Value ($) ",e.jsx("span",{className:"text-xs text-destructive",children:"*"})]}),e.jsx(o,{type:"number",value:x,onChange:s=>O(s.target.value),placeholder:"e.g. 75"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{children:["Monthly SEO Investment ($) ",e.jsx("span",{className:"text-xs text-destructive",children:"*"})]}),e.jsx(o,{type:"number",value:v,onChange:s=>f(s.target.value),placeholder:"e.g. 2000"})]})]}),e.jsxs(A,{onClick:N,children:[e.jsx(y,{className:"w-4 h-4 mr-2"})," Calculate SEO ROI"]}),t&&e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[{label:"Monthly Conversions",value:S(t.monthlyConversions),icon:d},{label:"Monthly Revenue",value:c(t.monthlyRevenue),icon:j},{label:"Annual Revenue",value:c(t.annualRevenue),icon:j},{label:"Monthly ROI",value:`${t.monthlyROI.toFixed(1)}%`,icon:d,highlight:t.monthlyROI>0},{label:"Annual ROI",value:`${t.annualROI.toFixed(1)}%`,icon:d,highlight:t.annualROI>0},{label:"Cost Per Acquisition",value:c(t.costPerAcquisition),icon:y}].map((s,i)=>e.jsxs("div",{className:`border rounded-lg p-4 ${s.highlight?"border-primary/40 bg-primary/5":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(s.icon,{className:"w-4 h-4 text-primary"}),e.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s.label})]}),e.jsx("p",{className:"text-xl font-bold",children:s.value})]},i))})]})};export{D 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.