1import{c as e,r as t,t as s,j as c,i as a,U as i,E as n,Z as r,g as o}from"./index-BVEqls2J.js";import{E as l}from"./eye-B5168_33.js";import{L as x}from"./lightbulb-BOh_Oyj_.js";import{C as d}from"./clock-BuFTbrGX.js";import{a as v,M as m,T as p}from"./Admin-B9jUXvUl.js";import{M as u}from"./mouse-pointer-BO8MtO-E.js";import{S as h}from"./smartphone-DlI1zw8I.js";import{A as w}from"./arrow-up-right-CiIYdHqO.js";import{A as g}from"./arrow-down-right-CpSjS9EA.js";import{L as j}from"./linkedin-LtUe_0HH.js";import{T as b}from"./trending-down-Bi-8XkIk.js";import"./input-mywHTS_V.js";import"./textarea-Bk5HKF33.js";import"./refresh-cw-Bw9Qz_3e.js";import"./file-text-DJleaMSY.js";import"./book-open-CTgBvHtP.js";import"./loader-circle-EmFF-N3I.js";import"./circle-check-big-CBSHW-FK.js";import"./arrow-left-Vl22YsRQ.js";import"./sparkles-B92qu_O6.js";import"./search-mcpljFSy.js";import"./share-2-D9q7Qx6_.js";import"./calendar-BaLPswXa.js";import"./target-tvqI3pog.js";import"./circle-help-41VFAezT.js";import"./route-D9xbf4QO.js";import"./message-square-Btv-0b_c.js";import"./filter-YfMaMFKj.js";import"./phone-DNZ7fYxH.js";import"./map-pin-Bm6J632f.js";import"./send-xwYlFm2J.js";import"./pause-DxgN5fZC.js";import"./camera-oXLbp9ns.js";import"./activity-CoEVE7cO.js";const f=e("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]),N=e("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]),E=e("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]),y=e("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),O=[{label:"7d",value:7},{label:"14d",value:14},{label:"30d",value:30},{label:"90d",value:90}];function k(e){return{instagram:"text-pink-400",linkedin:"text-blue-400",twitter:"text-sky-400",youtube:"text-red-400",facebook:"text-blue-500",tiktok:"text-white",whatsapp:"text-green-400",telegram:"text-sky-300"}[e]||"text-white/60"}function A(e){const t={social:"bg-pink-500/20 text-pink-400 border-pink-500/30",organic:"bg-green-500/20 text-green-400 border-green-500/30",direct:"bg-blue-500/20 text-blue-400 border-blue-500/30",paid:"bg-amber-500/20 text-amber-400 border-amber-500/30",referral:"bg-purple-500/20 text-purple-400 border-purple-500/30",email:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",unknown:"bg-white/10 text-white/40 border-white/20"};return t[e]||t.unknown}function T({label:e,value:t,change:s,icon:a,color:i}){return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:63",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:64",className:"flex items-center justify-between mb-3",children:[c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:65",className:`w-9 h-9 rounded-lg flex items-center justify-center ${i}`,children:c.jsx(a,{"data-loc":"client/src/components/ExecutiveOverview.tsx:66",className:"w-4.5 h-4.5"})}),void 0!==s&&0!==s&&c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:69",className:"flex items-center gap-1 text-xs font-mono "+(s>0?"text-green-400":"text-red-400"),children:[s>0?c.jsx(w,{"data-loc":"client/src/components/ExecutiveOverview.tsx:70",className:"w-3 h-3"}):c.jsx(g,{"data-loc":"client/src/components/ExecutiveOverview.tsx:70",className:"w-3 h-3"}),Math.abs(s),"%"]})]}),c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:75",className:"text-2xl font-bold text-white tracking-tight",children:"number"==typeof t?t.toLocaleString():t}),c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:78",className:"text-xs text-white/40 mt-1.5",children:e})]})}function M({text:e,type:t}){const s={positive:c.jsx(o,{"data-loc":"client/src/components/ExecutiveOverview.tsx:91",className:"w-3.5 h-3.5 text-green-400 shrink-0 mt-0.5"}),negative:c.jsx(b,{"data-loc":"client/src/components/ExecutiveOverview.tsx:92",className:"w-3.5 h-3.5 text-red-400 shrink-0 mt-0.5"}),neutral:c.jsx(x,{"data-loc":"client/src/components/ExecutiveOverview.tsx:93",className:"w-3.5 h-3.5 text-blue-400 shrink-0 mt-0.5"})};return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:96",className:`flex items-start gap-2.5 p-3 rounded-lg border ${{positive:"border-green-500/20 bg-green-500/5",negative:"border-red-500/20 bg-red-500/5",neutral:"border-blue-500/20 bg-blue-500/5"}[t]}`,children:[s[t],c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:98",className:"text-xs text-white/70 leading-relaxed",children:e})]})}function $(){const[e,o]=t.useState(7),{data:g}=s.analytics.totalPageViews.useQuery({days:e}),{data:b}=s.analytics.uniqueVisitors.useQuery({days:e}),{data:$}=s.analytics.pageViews.useQuery({days:e}),{data:C}=s.analytics.topCTAs.useQuery({days:e}),{data:D}=s.analytics.sessionsByDay.useQuery({days:e}),{data:S}=s.analytics.weeklyGrowth.useQuery(),{data:Q}=s.analytics.trafficChannelBreakdown.useQuery({days:e}),{data:L}=s.analytics.socialSourceBreakdown.useQuery({days:e}),{data:B}=s.analytics.languageBreakdown.useQuery({days:e}),{data:F}=s.analytics.topPagesByDuration.useQuery({days:e}),{data:P}=s.analytics.leadsByTrafficChannel.useQuery({days:Math.max(e,30)}),{data:z}=s.analytics.insightsData.useQuery({days:e}),{data:V}=s.analytics.scrollDepthStats.useQuery({days:e}),{data:H}=s.analytics.deviceBreakdown.useQuery({days:e}),{data:q}=s.analytics.leadsTotalCount.useQuery(),I=t.useMemo(()=>D?D.reduce((e,t)=>
1e+(t.sessions??0),0):0,[D]),U=t.useMemo(()=>{if(!z)return[];const e=[];if(z.currentTopPages&&z.prevTopPages)for(const t of z.currentTopPages.slice(0,5)){const s=z.prevTopPages.find(e=>e.path===t.path);if(s&&s.views>0){const c=Math.round((t.views-s.views)/s.views*100);if(c>30){const s="/"===t.path?"Homepage":t.path.replace(/^\//,"").replace(/-/g," ");e.push({text:`"${s}" had a ${c}% increase in views`,type:"positive"})}else if(c<-30){const s="/"===t.path?"Homepage":t.path.replace(/^\//,"").replace(/-/g," ");e.push({text:`"${s}" dropped ${Math.abs(c)}% in views`,type:"negative"})}}}if(z.currentTopCTAs&&z.currentTopCTAs.length>0)try{const t=JSON.parse(z.currentTopCTAs[0].eventData||"{}");t.label&&e.push({text:`"${t.label.slice(0,40)}" is the most clicked CTA (${z.currentTopCTAs[0].total} clicks)`,type:"neutral"})}catch{}if(z.currentSocial&&z.currentSocial.length>0){const t=z.currentSocial[0],s=t.sourceName||"social";e.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} is the top social source (${t.sessions} sessions)`,type:"positive"})}if(z.deviceBreakdown&&z.deviceBreakdown.length>1){const t=z.deviceBreakdown.find(e=>"mobile"===e.deviceType),s=z.deviceBreakdown.find(e=>"desktop"===e.deviceType);t&&s&&t.avgDuration&&s.avgDuration&&t.avgDuration<.6*s.avgDuration&&e.push({text:`Mobile users spend ${Math.round(100*(1-t.avgDuration/s.avgDuration))}% less time on pages`,type:"negative"})}if(z.leadsCount>0&&z.prevLeadsCount>0){const t=Math.round((z.leadsCount-z.prevLeadsCount)/z.prevLeadsCount*100);t>20?e.push({text:`Lead generation up ${t}% vs previous period`,type:"positive"}):t<-20&&e.push({text:`Lead generation down ${Math.abs(t)}% vs previous period`,type:"negative"})}return e.slice(0,6)},[z]);return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:192",className:"space-y-6",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:194",className:"flex items-center justify-between flex-wrap gap-3",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:195",className:"flex items-center gap-3",children:[c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:196",className:"w-10 h-10 rounded-xl bg-gradient-to-br from-[#A096FA]/20 to-[#A096FA]/5 flex items-center justify-center border border-[#A096FA]/20",children:c.jsx(a,{"data-loc":"client/src/components/ExecutiveOverview.tsx:197",className:"w-5 h-5 text-[#A096FA]"})}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:199",children:[c.jsx("h2",{"data-loc":"client/src/components/ExecutiveOverview.tsx:200",className:"text-xl font-bold text-white",children:"Executive Overview"}),c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:201",className:"text-xs text-white/40",children:"Key metrics at a glance"})]})]}),c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:204",className:"flex items-center gap-1 bg-white/5 rounded-lg p-1 border border-white/10",children:O.map(t=>c.jsx("button",{"data-loc":"client/src/components/ExecutiveOverview.tsx:206",onClick:()=>o(t.value),className:"px-3 py-1.5 text-xs font-medium rounded-md transition-all "+(e===t.value?"bg-[#A096FA]/20 text-[#A096FA] border border-[#A096FA]/30":"text-white/50 hover:text-white/70"),children:t.label},t.value))})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:222",className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[c.jsx(T,{"data-loc":"client/src/components/ExecutiveOverview.tsx:223",label:"Sessions",value:I,change:S?.growth,icon:i,color:"bg-blue-500/15 text-blue-400"}),c.jsx(T,{"data-loc":"client/src/components/ExecutiveOverview.tsx:230",label:"Page Views",value:g??0,icon:l,color:"bg-purple-500/15 text-purple-400"}),c.jsx(T,{"data-loc":"client/src/components/ExecutiveOverview.tsx:236",label:"Unique Visitors",value:b??0,icon:n,color:"bg-cyan-500/15 text-cyan-400"}),c.jsx(T,{"data-loc":"client/src/components/ExecutiveOverview.tsx:242",label:"Total Leads",value:q??0,icon:r,color:"bg-amber-500/15 text-amber-400"})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:251",className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:253",className:"lg:col-span-2 p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:254",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(n,{"data-loc":"client/src/components/ExecutiveOverview.tsx:255",className:"w-4 h-4 text-[#A096FA]"}),"Traffic by Channel"]}),Q&&Q.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:259",className:"space-y-2.5",children:Q.map((e,t)=>{const s=Q.reduce((e,t)=>
1e+(t.sessions??0),0),a=s>0?Math.round(e.sessions/s*100):0;return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:264",className:"flex items-center gap-3",children:[c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:265",className:`px-2 py-0.5 text-[10px] font-mono uppercase rounded border ${A(e.channel)}`,children:e.channel}),c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:268",className:"flex-1 h-2 bg-white/5 rounded-full overflow-hidden",children:c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:269",className:"h-full rounded-full bg-[#A096FA]/60",style:{width:`${a}%`}})}),c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:274",className:"text-xs text-white/60 font-mono w-16 text-right",children:[e.sessions?.toLocaleString()," ",c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:275",className:"text-white/30",children:["(",a,"%)"]})]})]},t)})}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:282",className:"text-xs text-white/30",children:"No channel data yet. New visits will be classified automatically."})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:287",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:288",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(x,{"data-loc":"client/src/components/ExecutiveOverview.tsx:289",className:"w-4 h-4 text-amber-400"}),"Auto Insights"]}),U.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:293",className:"space-y-2",children:U.map((e,t)=>c.jsx(M,{"data-loc":"client/src/components/ExecutiveOverview.tsx:295",text:e.text,type:e.type},t))}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:299",className:"text-xs text-white/30",children:"Insights will appear as data accumulates over time."})]})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:305",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:307",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:308",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(N,{"data-loc":"client/src/components/ExecutiveOverview.tsx:309",className:"w-4 h-4 text-pink-400"}),"Social Traffic"]}),L&&L.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:313",className:"space-y-3",children:L.slice(0,6).map((e,t)=>{const s=(a=e.sourceName,{instagram:N,linkedin:j,twitter:E,youtube:y,facebook:f}[a]||n);var a;return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:317",className:"flex items-center justify-between",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:318",className:"flex items-center gap-2",children:[c.jsx(s,{"data-loc":"client/src/components/ExecutiveOverview.tsx:319",className:`w-4 h-4 ${k(e.sourceName)}`}),c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:320",className:"text-xs text-white/70 capitalize",children:e.sourceName})]}),c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:322",className:"text-xs font-mono text-white/50",children:[e.sessions," sessions"]})]},t)})}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:328",className:"text-xs text-white/30",children:"No social traffic detected yet."})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:333",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:334",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(d,{"data-loc":"client/src/components/ExecutiveOverview.tsx:335",className:"w-4 h-4 text-cyan-400"}),"Highest Engagement"]}),F&&F.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:339",className:"space-y-2.5",children:F.slice(0,6).map((e,t)=>c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:341",className:"flex items-center justify-between",children:[c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:342",className:"text-xs text-white/70 truncate max-w-[140px]",children:"/"===e.path?"Homepage":e.path.replace(/^\//,"")}),c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:345",className:"text-xs font-mono text-white/50",children:e.avgDuration>60?`${Math.round(e.avgDuration/60)}m ${Math.round(e.avgDuration%60)}s`:`${Math.round(e.avgDuration)}s`})]},t))}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:352",className:"text-xs text-white/30",children:"Duration data will appear after visits."})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:357",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:358",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(v,{"data-loc":"client/src/components/ExecutiveOverview.tsx:359",className:"w-4 h-4 text-green-400"}),"By Language"]}),B&&B.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:363",className:"space-y-3",children:B.map((e,t)=>{const s=B.reduce((e,t)=>
1e+(t.sessions??0),0),a=s>0?Math.round(e.sessions/s*100):0;return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:369",className:"flex items-center justify-between",children:[c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:370",className:"text-xs text-white/70",children:{en:"English",pt:"Português",es:"Español"}[e.language]||e.language}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:371",className:"flex items-center gap-2",children:[c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:372",className:"w-16 h-1.5 bg-white/5 rounded-full overflow-hidden",children:c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:373",className:"h-full rounded-full bg-green-400/60",style:{width:`${a}%`}})}),c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:375",className:"text-xs font-mono text-white/50 w-8 text-right",children:[a,"%"]})]})]},t)})}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:382",className:"text-xs text-white/30",children:"Language data will appear with new visits."})]})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:388",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:390",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:391",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(l,{"data-loc":"client/src/components/ExecutiveOverview.tsx:392",className:"w-4 h-4 text-purple-400"}),"Most Visited Pages"]}),$&&$.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:396",className:"space-y-2.5",children:$.slice(0,7).map((e,t)=>c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:398",className:"flex items-center justify-between",children:[c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:399",className:"text-xs text-white/70 truncate max-w-[140px]",children:"/"===e.path?"Homepage":e.path.replace(/^\//,"")}),c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:402",className:"text-xs font-mono text-white/50",children:e.views?.toLocaleString()})]},t))}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:407",className:"text-xs text-white/30",children:"No page data yet."})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:412",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:413",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(u,{"data-loc":"client/src/components/ExecutiveOverview.tsx:414",className:"w-4 h-4 text-amber-400"}),"Top CTAs"]}),C&&C.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:418",className:"space-y-2.5",children:C.slice(0,7).map((e,t)=>{let s="";try{const t=JSON.parse(e.eventData||"{}");s=t?.label||t?.button||""}catch{}if(!s)return null;const a=s.replace(/^(link:|external:|icon:|parent:|nav_megamenu_|cta:)/,"").replace(/_/g," ");return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:431",className:"flex items-center justify-between",children:[c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:432",className:"text-xs text-white/70 truncate max-w-[140px]",children:a.slice(0,35)}),c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:433",className:"text-xs font-mono text-white/50",children:[e.total," clicks"]})]},t)})}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:439",className:"text-xs text-white/30",children:"No CTA data yet."})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:444",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:445",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(r,{"data-loc":"client/src/components/ExecutiveOverview.tsx:446",className:"w-4 h-4 text-amber-400"}),"Leads by Source"]}),P&&P.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:450",className:"space-y-2.5",children:P.slice(0,7).map((e,t)=>c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:452",className:"flex items-center justify-between",children:[c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:453",className:"text-xs text-white/70 capitalize",children:[e.source," / ",e.medium]}),c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:454",className:"text-xs font-mono text-white/50",children:[e.total," leads"]})]},t))}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:459",className:"text-xs text-white/30",children:"No lead attribution data yet."})]})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:465",className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:467",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:468",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(m,{"data-loc":"client/src/components/ExecutiveOverview.tsx:469",className:"w-4 h-4 text-blue-400"}),"Device Breakdown"]}),H&&H.length>0?c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:473",className:"flex items-center gap-4",children:H.map((e,t)=>{const s=H.reduce((e,t)=>
1e+(t.sessions??0),0),a=s>0?Math.round(e.sessions/s*100):0,i="mobile"===e.deviceType?h:"tablet"===e.deviceType?p:m;return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:479",className:"flex-1 text-center p-3 bg-white/[0.03] rounded-lg border border-white/5",children:[c.jsx(i,{"data-loc":"client/src/components/ExecutiveOverview.tsx:480",className:"w-5 h-5 text-[#A096FA] mx-auto mb-2"}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:481",className:"text-lg font-bold text-white",children:[a,"%"]}),c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:482",className:"text-[10px] text-white/40 capitalize",children:e.deviceType})]},t)})}):c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:488",className:"text-xs text-white/30",children:"No device data yet."})]}),c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:493",className:"p-5 bg-white/[0.03] border border-white/8 rounded-xl",children:[c.jsxs("h3",{"data-loc":"client/src/components/ExecutiveOverview.tsx:494",className:"text-sm font-semibold text-white mb-4 flex items-center gap-2",children:[c.jsx(w,{"data-loc":"client/src/components/ExecutiveOverview.tsx:495",className:"w-4 h-4 text-green-400"}),"Scroll Depth"]}),V&&V.length>0?(()=>{const e=V.reduce((e,t)=>({d25:e.d25+(t.d25??0),d50:e.d50+(t.d50??0),d75:e.d75+(t.d75??0),d100:e.d100+(t.d100??0)}),{d25:0,d50:0,d75:0,d100:0}),t=[{depth:25,total:e.d25},{depth:50,total:e.d50},{depth:75,total:e.d75},{depth:100,total:e.d100}],s=Math.max(...t.map(e=>e.total),1);return c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:515",className:"flex items-end gap-3 h-24",children:t.map((e,t)=>{const a=Math.max(e.total/s*100,8);return c.jsxs("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:519",className:"flex-1 flex flex-col items-center gap-1",children:[c.jsx("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:520",className:"text-[10px] font-mono text-white/40",children:e.total.toLocaleString()}),c.jsx("div",{"data-loc":"client/src/components/ExecutiveOverview.tsx:521",className:"w-full rounded-t bg-gradient-to-t from-[#A096FA]/40 to-[#A096FA]/80",style:{height:`${a}%`}}),c.jsxs("span",{"data-loc":"client/src/components/ExecutiveOverview.tsx:525",className:"text-[10px] font-mono text-white/50",children:[e.depth,"%"]})]},t)})})})():c.jsx("p",{"data-loc":"client/src/components/ExecutiveOverview.tsx:532",className:"text-xs text-white/30",children:"No scroll data yet."})]})]})]})}export{$ 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.