PageSourceSearch

https://www.smartbettor.ai/_next/static/chunks/971-a6e34f20e19c4c34.js

js smartbettor.ai collected 2026-10-05 12:38:42 UTC 33,709 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{66131:function(e,t,a){var s=a(49700),r=a(89266),l=a(41185),i=a(37022),n=a(78386),o=a(62882),c=a(71957),d=a(20989),m=a(14698),h=a(2100),x=a(42033),g=a(39007),u=a(13927),p=a(56779),f=a(57284),b=a(31987),v=a(53316),j=a(58104);let y={average:"Average",highest_bettable_odds:"Highest"},N=["#FF6B6B","#4ECDC4","#FFD93D","#95E1D3","#F38181","#6C5CE7","#00B894","#FFA502","#0984E3","#E84393","#00CEC9","#FDCB6E","#6C5CE7","#00B894","#FF7675"];function w(e){if(!e.length)return null;let t=e.map(e=>e.average).filter(Boolean);return{high:Math.max(...t),low:Math.min(...t),open:t[0],close:t[t.length-1],volatility:function(e){if(e.length<2)return 0;let t=e.slice(1).map((t,a)=>Math.abs(t-e[a])/e[a]*100);return t.reduce((e,t)=>e+t,0)/t.length}(t),volume:e.length}}function k(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]}let _=e=>{let{active:t,children:a,onClick:r}=e;return(0,s.jsx)(d.E.button,{whileHover:{scale:t?1:1.05},whileTap:{scale:.95},onClick:r,className:(0,b.cn)("px-3 py-1.5 text-xs font-medium rounded-lg transition-all duration-200",t?"bg-gradient-to-r from-emerald-500/20 to-emerald-400/10 text-emerald-400 border border-emerald-500/20 shadow-[inset_0_1px_1px_rgba(59,130,246,0.1)]":"text-gray-400 hover:text-gray-300 hover:bg-gray-800/50"),children:a})},S=e=>{let{isOpen:t,onClose:a,availableSportsbooks:r,selectedSportsbooks:l,onToggleSportsbook:i}=e;return t?(0,s.jsxs)(d.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-[#00130A] flex flex-col",style:{paddingTop:"env(safe-area-inset-top)",paddingBottom:"env(safe-area-inset-bottom)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)"},children:[(0,s.jsx)("div",{className:"bg-[#00130A]/95 backdrop-blur-md border-b border-emerald-900/50",children:(0,s.jsxs)("div",{className:"px-4 h-14 flex items-center justify-between",children:[(0,s.jsxs)("button",{onClick:a,className:"flex items-center text-emerald-400 font-medium -ml-2 px-2 py-1 active:opacity-60 transition-opacity",children:[(0,s.jsx)(h.Z,{className:"w-5 h-5"}),(0,s.jsx)("span",{children:"Back"})]}),(0,s.jsx)("h1",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2  text-base font-semibold text-white",children:"Sportsbooks"}),(0,s.jsx)("div",{className:"w-16"})]})}),(0,s.jsxs)("div",{className:"bg-[#00130A] px-4 py-6 space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-white text-lg font-semibold",children:"Select Sportsbooks to Compare"}),(0,s.jsx)("p",{className:"text-gray-400 text-sm",children:"Choose which sportsbooks you want to track alongside the market average."})]}),(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)("button",{onClick:()=>r.forEach(i),className:"flex-1 h-10 rounded-lg bg-emerald-900/30 text-sm font-medium text-emerald-400 active:opacity-60 transition-all",children:"Select All"}),(0,s.jsx)("button",{onClick:()=>l.forEach(i),className:"flex-1 h-10 rounded-lg bg-emerald-900/30 text-sm font-medium text-emerald-400 active:opacity-60 transition-all",children:"Clear All"})]})]}),(0,s.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,s.jsx)("div",{className:"px-4 space-y-1 pb-6",children:r.map(e=>(0,s.jsxs)(d.E.button,{onClick:()=>i(e),className:"w-full flex items-center gap-4 p-4   active:bg-emerald-900/20 transition-colors border-b border-emerald-900/50",whileTap:{scale:.98},children:[(0,s.jsx)("img",{src:"/mobile_deeplink_button/sportsbook_pngs/".concat(e,".png"),alt:y[e]||e,className:"w-8 h-8 rounded-lg object-contain"}),(0,s.jsxs)("span",{className:"flex-1 text-left",children:[(0,s.jsx)("span",{className:"block text-white font-medium -mb-0.5",children:f.XQ[e]||e}),(0,s.jsx)("span",{className:"block text-sm text-gray-400",children:"View odds history"})]}),(0,s.jsx)("div",{className:(0,b.cn)("w-6 h-6 rounded-full border-2 flex items-center justify-center transition-all",l.includes(e)?"border-emerald-500 bg-emerald-500 scale-110":"border-gray-600"),children:l.includes(e)&&(0,s.jsx)(d.E.svg,{initial:{scale:0},animate:{scale:1},className:"w-3.5 h-3.5 text-white",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"})})})]},e))})})]}):null},M=e=>{let{name:t,color:a,value:r}=e;return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-emerald-900/20  border border-emerald-900/50 sportsbook_pill",children:[(0,s.jsx)("div",{className:"w-1.5 h-1.5 rounded-full sportsbook_pill",style:{backgroundColor:a}}),(0,s.jsx)("span",{className:"text-xs font-medium text-gray-300 sportsbook_pill",children:f.XQ[t]||t}),(0,s.jsx)("span",{className:"text-xs font-medium text-gray-400 sportsbook_pill",children:(0,v.lx)(r.toString(),localStorage.getItem("decimalOrAmerican")||"american")})]})},C=e=>{let{data:t,timeFrame:a}=e,r=w(t);if(!r)return null;let l=[{label:"".concat(a," High"),value:(0,v.lx)(r.high.toString(),localStorage.getItem("decimalOrAmerican")||"american"),color:"text-emerald-400"},{label:"".concat(a," Low"),value:(0,v.lx)(r.low.toString(),localStorage.getItem("decimalOrAmerican")||"american"),color:"text-red-400"},{label:"Open",value:(0,v.lx)(r.open.toString(),localStorage.getItem("decimalOrAmerican")||"american"),color:"text-gray-200"},{label:"Volatility",value:"".concat(r.volatility.toFixed(1),"%"),color:"text-gray-200"},{label:"Updates",value:r.volume,color:"text-gray-200"}];return(0,s.jsxs)("div",{className:"border-t border-emerald-900/10 bg-black/20 backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"grid grid-cols-5 divide-x divide-emerald-900/10",children:l.map(e=>(0,s.jsxs)("div",{className:"px-4 py-3 whitespace-nowrap",children:[(0,s.jsx)("div",{className:"text-[11px] font-medium text-gray-400 uppercase tracking-wider",children:e.label}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-medium ".concat(e.color),children:e.value})]},e.label))}),(0,s.jsxs)("div",{className:"border-t border-emerald-900/10 px-4 py-3 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(x.Z,{className:"w-3.5 h-3.5 text-emerald-400"}),(0,s.jsx)("span",{className:"text-xs text-gray-300",children:"".concat(((r.close-r.low)/(r.high-r.low)*100).toFixed(1),"% above ").concat(a," low")})]}),(0,s.jsx)("div",{className:"text-[11px] text-gray-500",children:"".concat(r.volume," updates • ").concat(a," timeframe")})]})]})},A=e=>{let{data:t}=e,[a,l]=(0,r.useState)(!0),[i,n]=(0,r.useState)({volumeAnalysis:!0,priceMovement:!0,bookmakerCoverage:!0,marketSummary:!0}),o=w(t),c=e=>{n(t=>({...t,[e]:!t[e]}))},h=(0,r.useMemo)(()=>
1{if(!t.length)return{current:0,names:[],max:0};let e=Object.entries(t[t.length-1]).filter(e=>{let[t,a]=e;return"timestamp"!==t&&"average"!==t&&"highest"!==t&&"average_market_odds"!==t&&"highest_bettable_odds"!==t&&null!==a}),a=t.reduce((e,t)=>Math.max(e,Object.entries(t).filter(e=>{let[t,a]=e;return"timestamp"!==t&&"average"!==t&&"highest"!==t&&"average_market_odds"!==t&&"highest_bettable_odds"!==t&&null!==a}).length),0);return{current:e.length,names:e.map(e=>{let[t]=e;return f.XQ[t]||t}),max:a}},[t]);return o?(0,s.jsx)("div",{className:"border-t border-emerald-900/10",children:(0,s.jsx)(m.M,{children:a&&(0,s.jsx)(d.E.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:(0,s.jsxs)("div",{className:"px-4 py-3 space-y-4",children:[(0,s.jsxs)("div",{className:"border-b border-emerald-900/10 sm:pb-4",children:[(0,s.jsxs)("button",{onClick:()=>c("marketSummary"),className:"w-full flex items-center justify-between text-gray-300 hover:bg-emerald-900/5 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g.Z,{className:"w-4 h-4 text-emerald-400"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"Market Summary"})]}),(0,s.jsx)(u.Z,{className:"w-4 h-4 transition-transform ".concat(i.marketSummary?"rotate-90":"")})]}),(0,s.jsx)(m.M,{children:i.marketSummary&&(0,s.jsxs)(d.E.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden pt-2",children:[(0,s.jsxs)("p",{className:"text-sm text-gray-400 leading-relaxed",children:["The market has shown"," ",o.volatility>5?"significant":"minimal"," ","volatility over this period, with a volatility index of"," ",o.volatility.toFixed(1),"%.",o.close>o.open?" The odds have trended upward, indicating increasing value.":" The odds have trended downward, suggesting decreasing value."," Market coverage is ".concat(h.current>=.8*h.max?"strong with high participation":"showing reduced participation"," from bookmakers.")]}),(0,s.jsx)("div",{className:"px-4",children:(0,s.jsxs)("div",{className:"p-3 bg-emerald-900/10 rounded-lg border border-emerald-900/20",children:[(0,s.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-200",children:"Key Insight"})}),(0,s.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed",children:o.volatility>8?"High market volatility suggests active price discovery. Consider monitoring closely for opportunities.":"Stable market conditions with predictable price movement. Suitable for strategic positions."})]})})]})})]}),(0,s.jsxs)("div",{className:"border-b border-emerald-900/10 sm:pb-4",children:[(0,s.jsxs)("button",{onClick:()=>c("priceMovement"),className:"w-full flex items-center justify-between text-gray-300 hover:bg-emerald-900/5 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(x.Z,{className:"w-4 h-4 text-emerald-400"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"Price Movement"})]}),(0,s.jsx)(u.Z,{className:"w-4 h-4 transition-transform ".concat(i.priceMovement?"rotate-90":"")})]}),(0,s.jsx)(m.M,{children:i.priceMovement&&(0,s.jsx)(d.E.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden pt-2",children:(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"Total Change"}),(0,s.jsxs)("div",{className:"text-sm font-medium ".concat(o.close>o.open?"text-emerald-400":"text-red-400"),children:[((o.close-o.open)/o.open*100).toFixed(2),"%"]})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"Range"}),(0,s.jsxs)("div",{className:"text-sm font-medium text-gray-200",children:[((o.high-o.low)/o.low*100).toFixed(2),"%"]})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"text-xs text-gray-400",children:"Active Books"}),(0,s.jsxs)("div",{className:"text-sm font-medium text-gray-200",children:[h.current,"/65"]}
1)]})]})})})]}),(0,s.jsxs)("div",{className:"border-b border-emerald-900/10 sm:pb-4",children:[(0,s.jsxs)("button",{onClick:()=>c("bookmakerCoverage"),className:"w-full flex items-center justify-between text-gray-300 hover:bg-emerald-900/5 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g.Z,{className:"w-4 h-4 text-emerald-400"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"Bookmaker Coverage"})]}),(0,s.jsx)(u.Z,{className:"w-4 h-4 transition-transform ".concat(i.bookmakerCoverage?"rotate-90":"")})]}),(0,s.jsx)(m.M,{children:i.bookmakerCoverage&&(0,s.jsx)(d.E.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden pt-2",children:(0,s.jsxs)("p",{className:"text-sm text-gray-400 leading-relaxed",children:["Currently ",h.current," bookmaker",1!==h.current?"s":""," offering odds",h.current<h.max?", down from a peak of ".concat(h.max," during this period"):" (peak coverage for this period)",".",h.names.length>0&&" Active books include ".concat(h.names.slice(0,3).join(", ")).concat(h.names.length>3?" and ".concat(h.names.length-3," more"):"",".")]})})})]}),(0,s.jsxs)("div",{className:"border-b border-emerald-900/10 sm:pb-4",children:[(0,s.jsxs)("button",{onClick:()=>c("volumeAnalysis"),className:"w-full flex items-center justify-between text-gray-300 hover:bg-emerald-900/5 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(p.Z,{className:"w-4 h-4 text-emerald-400"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"Volume Analysis"})]}),(0,s.jsx)(u.Z,{className:"w-4 h-4 transition-transform ".concat(i.volumeAnalysis?"rotate-90":"")})]}),(0,s.jsx)(m.M,{children:i.volumeAnalysis&&(0,s.jsx)(d.E.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden pt-2",children:(0,s.jsxs)("p",{className:"text-sm text-gray-400 leading-relaxed",children:["Total updates: ",o.volume,o.volume>100?" - High market activity indicating strong interest":" - Moderate market activity"]})})})]})]})})})}):null},D=e=>{let{isOpen:t,onClose:a}=e;return t?(0,s.jsx)(d.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",onClick:a,style:{paddingTop:"env(safe-area-inset-top)",paddingBottom:"env(safe-area-inset-bottom)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)"},children:(0,s.jsxs)(d.E.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:40,stiffness:400},onClick:e=>e.stopPropagation(),className:"absolute bottom-0 inset-x-0 rounded-t-2xl bg-[#00130A] border-t border-emerald-900/50 overflow-hidden shadow-xl",style:{maxHeight:"85vh"},children:[(0,s.jsxs)(d.E.div,{className:"sticky top-0 z-10 bg-[#00130A] pt-3 pb-4 cursor-grab active:cursor-grabbing",drag:"y",dragConstraints:{top:0,bottom:0},dragElastic:.2,onDragEnd:(e,t)=>{let{offset:s,velocity:r}=t;s.y+r.y>100&&a()},children:[(0,s.jsx)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2",children:(0,s.jsx)("div",{className:"h-1 w-12 rounded-full bg-gray-600/50"})}),(0,s.jsx)("div",{className:"px-4 flex items-center justify-between mt-4",children:(0,s.jsx)("h1",{className:"text-lg font-semibold text-white",children:"Line Movement Info"})})]}),(0,s.jsxs)("div",{className:"overflow-y-auto px-4 pb-8 space-y-6",style:{maxHeight:"calc(85vh - 80px)",overscrollBehavior:"contain"},children:[(0,s.jsxs)("div",{className:"bg-emerald-900/20 rounded-lg p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(p.Z,{className:"w-4 h-4 text-emerald-400"}),(0,s.jsx)("h3",{className:"text-sm font-medium text-emerald-400",children:"Market Average & Sportsbooks"})]}),(0,s.jsxs)("p",{className:"text-gray-300 text-sm leading-relaxed",children:["By default, you're viewing the market average odds. To compare individual sportsbook odds, tap the ",(0,s.jsx)(p.Z,{className:"w-3.5 h-3.5 inline text-gray-400"})," icon next to the time frame buttons below the chart."]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-white",children:"Understanding Line Colors"}),(0,s.jsx)("p",{className:"text-gray-300 leading-relaxed text-sm",children:"The line color indicates the trend in odds movement:"}),(0,s.jsxs)("ul",{className:"space-y-3 mt-4",children:[(0,s.jsxs)("li",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-4 h-4 rounded-full bg-emerald-400"}),(0,s.jsx)("span",{className:"text-gray-300 text-sm",children:"Green indicates improving (higher) odds, representing better potential value"})]}),(0,s.jsxs)("li",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-4 h-4 rounded-full bg-red-500"}),(0,s.jsx)("span",{className:"text-gray-300 text-sm",children:"Red indicates worsening (lower) odds, representing decreased value"})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-white",children:"How It Works"}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"bg-emerald-900/20 rounded-lg p-4",children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-emerald-400 mb-2",children:"Active Viewing"}),(0,s.jsx)("p",{className:"text-gray-300 text-sm leading-relaxed",children:"When scrolling through the chart, the color shows the change between the current point and the previous point, helping you track moment-to-moment movements."})]}),(0,s.jsxs)("div",{className:"bg-emerald-900/20 rounded-lg p-4",children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-emerald-400 mb-2",children:"Overall Trend"}),(0,s.jsx)("p",{className:"text-gray-300 text-sm leading-relaxed",children:"When not interacting, the color reflects the overall trend across the selected time period, giving you a broader view of the market direction."})]})]})]})]})]})}):null},E=e=>{let{data:t,highest_bettable_odds:a}=e,[l,i]=(0,r.useState)(null);if(!a||!t.length)return null;let n=t.flatMap(e=>{if(!a)return[];let t=Math.round(100*a)/100;return Object.entries(e).filter(e=>{let[a,s]=e;return"timestamp"!==a&&"average"!==a&&"highest"!==a&&"average_market_odds"!==a&&"highest_bettable_odds"!==a&&null!==s&&Number(s)>=t}).map(t=>{let[a,s]=t;return{sportsbook:a,odds:s,timestamp:e.timestamp}})}),o=n.reduce((e,t)=>
1(e[t.sportsbook]||(e[t.sportsbook]=[]),e[t.sportsbook].push(t),e),{}),c=Object.keys(o);return 0===n.length?null:(0,s.jsx)("div",{className:"border-t border-emerald-900/10",children:(0,s.jsx)("div",{className:"m-4 rounded-xl border-2 border-emerald-500/20 shadow-[0_0_25px_-5px_rgba(16,185,129,0.1)]  bg-gradient-to-b from-emerald-900/20 to-transparent backdrop-blur-sm",children:(0,s.jsxs)("div",{className:"px-4 py-6 space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"h-8 w-1 bg-emerald-500 rounded-full shadow-[0_0_10px_rgba(16,185,129,0.3)]"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Historical Value Opportunities"})]}),(0,s.jsxs)("div",{className:"pl-4 space-y-2",children:[(0,s.jsx)("div",{className:"inline-block px-3 py-1 bg-emerald-500/10 border border-emerald-500/30  rounded-lg shadow-[0_0_10px_rgba(16,185,129,0.1)]",children:(0,s.jsxs)("span",{className:"text-emerald-400 font-medium",children:["AI Model Identified Target Value: ",(0,v.lx)(a.toString(),localStorage.getItem("decimalOrAmerican")||"american")]})}),(0,s.jsx)("p",{className:"text-sm text-gray-400",children:"The following sportsbooks offered these odds (or better) during this period. Click to see when:"})]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(e=>(0,s.jsxs)("button",{onClick:()=>i(e===l?null:e),className:(0,b.cn)("flex items-center gap-2 px-4 py-2.5 rounded-lg transition-all duration-200","border hover:scale-105 active:scale-95","shadow-sm hover:shadow-md",l===e?"bg-emerald-500/20 border-emerald-500/40 shadow-[0_0_15px_rgba(16,185,129,0.15)]":"bg-emerald-900/20 border-emerald-900/40 hover:bg-emerald-900/30 hover:border-emerald-500/30"),children:[(0,s.jsx)("img",{src:"/mobile_deeplink_button/sportsbook_pngs/".concat(e,".png"),alt:f.XQ[e]||e,className:"w-5 h-5 rounded-md object-contain"}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-200",children:f.XQ[e]||e}),(0,s.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-400",children:o[e].length})]},e))}),(0,s.jsx)(m.M,{mode:"wait",children:l&&(0,s.jsxs)(d.E.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-3 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-emerald-400",children:[(0,s.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}
1),"Available times for ",f.XQ[l]||l,":"]}),(0,s.jsx)("div",{className:"space-y-2 max-h-48 overflow-y-auto pl-3",children:o[l].map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 bg-emerald-900/10 rounded-lg border border-emerald-900/20 hover:bg-emerald-900/20 transition-colors",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-emerald-400",children:(0,v.lx)(e.odds.toString(),localStorage.getItem("decimalOrAmerican")||"american")}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:new Date(e.timestamp).toLocaleString([],{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})})]},"".concat(e.timestamp,"-").concat(t)))})]})})]})})})};t.Z=(0,r.memo)(e=>{var t;let{betId:a,mini:h=!1,height:x="h-60",solo:u=!1,initialData:f,outcome:y=null,game_id:w=null,commence_time:T=null,sport_title:O=null,home_team:H=null,highest_bettable_odds:F=null}=e,[I,L]=(0,r.useState)(u?"1W":"12H"),[B,Z]=(0,r.useState)(f||[]),[z,W]=(0,r.useState)(!f),[V,P]=(0,r.useState)(""),[Q,X]=(0,r.useState)(!1),[R,G]=(0,r.useState)([]),[K,U]=(0,r.useState)([]),[q,J]=(0,r.useState)(null),[$,Y]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(0),[ea,es]=(0,r.useState)(!1),[er,el]=(0,r.useState)(!1),[ei,en]=(0,r.useState)(!1),[eo,ec]=(0,r.useState)(null),{user:ed}=(0,j.aF)(),[em,eh]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=async()=>{try{let e=u?"".concat(v.v2,"/get_line_movement_data_widget?outcome=").concat(y,"&game_id=").concat(w,"&commence_time=").concat(T,"&sport_title=").concat(O,"&home_team=").concat(H):"".concat(v.v2,"/get_line_movement_data?bet_id=").concat(a),t=await fetch(e);if(!t.ok)throw Error("API error");let s=await t.json();Z(s)}catch(e){P(e.message||"Error fetching data")}finally{W(!1)}};f||e()},[a,f]),(0,r.useEffect)(()=>{B.length>0&&(U(Array.from(new Set(B.map(e=>e.sportsbook_key)))),G([]))},[B]),(0,r.useEffect)(()=>{(async()=>{if((null==ed?void 0:ed.sub)&&!h)try{let e=await fetch("".concat(v.v2,"/get_line_movement_sportsbooks?auth0_id=").concat(ed.sub));if(!e.ok)throw Error("Failed to load sportsbooks");let t=await e.json();if("success"===t.status){let e=t.sportsbooks.filter(e=>K.includes(e));G(e)}}catch(e){console.error("Error loading sportsbooks:",e)}})()},[null==ed?void 0:ed.sub,u,h,K]);let ex=(0,r.useMemo)(()=>{let e=u?function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=[...e].sort((e,t)=>new Date(e.time_pulled).getTime()-new Date(t.time_pulled).getTime()),r=new Map,l=new Map,i=e=>{let t={timestamp:e};return l.forEach((e,a)=>{t[a]=e}),t};if(s.forEach(e=>{let t=new Date(e.time_pulled);t.setSeconds(0,0);let a=t.toISOString();r.has(a)||r.set(a,i(a)),r.get(a)[e.sportsbook_key]=parseFloat(e.odds),l.set(e.sportsbook_key,parseFloat(e.odds))}),s.length>0){let e=new Date(a||0);e.setSeconds(0,0);let s=new Date;s.setSeconds(0,0);let n=new Date(e),o=t?e:s;for(;n<=o;){let e=n.toISOString();!r.has(e)&&l.size>0&&r.set(e,i(e)),n.setMinutes(n.getMinutes()+1)}}let n=Array.from(r.values());return n.sort((e,t)=>new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()),n.forEach(e=>{let t=Object.entries(e).filter(e=>{let[t]=e;return"timestamp"!==t}).map(e=>{let[,t]=e;return t});t.length&&(e.average=t.reduce((e,t)=>e+t)/t.length,e.highest=Math.max(...t))}),n}(B,u,T):function(e){let t=[...e].sort((e,t)=>new Date(e.time_pulled).getTime()-new Date(t.time_pulled).getTime()),a=new Map,s=new Map,r=e=>{let t={timestamp:e};return s.forEach((e,a)=>{t[a]=e}),t};if(t.forEach(e=>{let t=new Date(e.time_pulled);t.setSeconds(0,0);let l=t.toISOString();a.has(l)||a.set(l,r(l)),a.get(l)[e.sportsbook_key]=parseFloat(e.odds),s.set(e.sportsbook_key,parseFloat(e.odds))}),t.length>0){let e=new Date;e.setSeconds(0,0);let l=new Date(t[t.length-1].time_pulled);l.setSeconds(0,0);let i=new Date(l);for(;i<=e;){let e=i.toISOString();!a.has(e)&&s.size>0&&a.set(e,r(e)),i.setMinutes(i.getMinutes()+1)}}let l=Array.from(a.values());return l.sort((e,t)=>new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()),l.forEach(e=>{let t=Object.entries(e).filter(e=>{let[t]=e;return"timestamp"!==t}).map(e=>{let[,t]=e;return t});t.length&&(e.average=t.reduce((e,t)=>
1e+t)/t.length,e.highest=Math.max(...t))}),l}(B);return u?function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if("ALL"===t||0===e.length)return e;let r=new Date(s||0),l=a?r:new Date,i=new Date(l);switch(t){case"5M":i.setMinutes(l.getMinutes()-5);break;case"30M":i.setMinutes(l.getMinutes()-30);break;case"1H":i.setHours(l.getHours()-1);break;case"12H":i.setHours(l.getHours()-12);break;case"1D":i.setDate(l.getDate()-1);break;case"1W":i.setDate(l.getDate()-7)}return e.filter(e=>new Date(e.timestamp)>=i)}(e,I,u,T):function(e,t){if("ALL"===t)return e;let a=new Date,s=new Date(a);switch(t){case"5M":s.setMinutes(a.getMinutes()-5);break;case"30M":s.setMinutes(a.getMinutes()-30);break;case"1H":s.setHours(a.getHours()-1);break;case"12H":s.setHours(a.getHours()-12);break;case"1D":s.setDate(a.getDate()-1);break;case"1W":s.setDate(a.getDate()-7)}return e.filter(e=>new Date(e.timestamp)>=s)}(e,I)},[B,I,u,T]),eg=async e=>{let t=R.includes(e)?R.filter(t=>t!==e):[...R,e];if(G(t),(null==ed?void 0:ed.sub)&&!u&&!h)try{await fetch("".concat(v.v2,"/set_line_movement_sportsbooks"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sportsbooks:t,auth0_id:ed.sub})})}catch(e){console.log(e,"error syncing sportsbooks"),console.error("Error syncing sportsbooks:",e)}},eu=(0,r.useMemo)(()=>0===R.length?ex:ex.map(e=>({...e,...R.reduce((t,a)=>({...t,[a]:e[a]}),{})})),[ex,R]);(0,r.useEffect)(()=>{R.length>0?eh(function(e,t){if(e.length<=t)return e;let a=e.map(k),s=[],r=[];for(s.push(e[0]),r.push(0);s.length<t;){let t=-1,l=-1;for(let s=0;s<e.length;s++){if(r.includes(s))continue;let e=Math.min(...r.map(e=>(function(e,t){let[a,s,r]=e,[l,i,n]=t;return Math.sqrt(Math.pow(l-a,2)+Math.pow(i-s,2)+Math.pow(n-r,2))})(a[s],a[e])));e>t&&(t=e,l=s)}-1!==l&&(s.push(e[l]),r.push(l))}return s}(N,R.length)):eh([])},[R]);let ep=(0,r.useCallback)((e,t)=>(e-t)/t*100,[]),ef=(0,r.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||e.length<2)return!1;if(t){let a=e.findIndex(e=>e.timestamp===t.timestamp);if(a>0){let s=e[a-1].average;return t.average>s}}let a=e[0].average;return e[e.length-1].average>a},[]),eb=(0,r.useCallback)(e=>{if(e.activePayload){el(!0);let t=e.activePayload[0].payload,a=eu.findIndex(e=>e.timestamp===t.timestamp);if(a>0){let e=eu[a-1].average,s=t.average>e,r=ep(t.average,e);Y(s),et(r)}J(t),es(!0)}},[eu,ep]),ev=(0,r.useCallback)(()=>{if(el(!1),es(!1),eu.length){let e=ef(eu),t=ep(eu[eu.length-1].average,eu[0].average);J(eu[eu.length-1]),Y(e),et(t)}else J(null),Y(!1),et(0)},[eu,ep,ef]);(0,r.useEffect)(()=>{ev()},[eu,ev]);let ej=(0,r.useMemo)(()=>{if(!eu.length)return["dataMin","dataMax"];let e=eu.flatMap(e=>{let t=[e.average];return R.forEach(a=>{null!=e[a]&&t.push(e[a])}),t}),t=Math.min(...e),a=Math.max(...e),s=(a-t)*.1;return[t-s,a+s]},[eu,R]);return z?(0,s.jsx)("div",{className:"".concat(x," w-full bg-gradient-to-br from-[#00130A] via-black to-[#00130A] flex items-center justify-center"),children:(0,s.jsx)(d.E.div,{animate:{opacity:[.5,1,.5]},transition:{duration:1.5,repeat:1/0},className:"text-emerald-400 text-sm font-medium",children:"Loading market data..."})}):V?(0,s.jsx)("div",{className:"".concat(x," w-full bg-gradient-to-br from-[#00130A] via-black to-[#00130A] flex items-center justify-center"),children:(0,s.jsx)("div",{className:"text-red-400 text-sm",children:u?"Line History data currently being backfilled":V})}):(0,s.jsxs)("div",{className:"relative overflow-scroll h-full bg-gradient-to-br from-[#00130A] via-black to-[#00130A] ".concat(h?"border-b border-white/10":""),children:[(0,s.jsxs)("div",{className:"relative ".concat(x,"  w-full backdrop-blur-sm ").concat(h?"p-0 pt-2":"p-4 px-0"," mt-4 border-none"),children:[(0,s.jsx)("div",{className:"absolute z-10 ".concat(h?"top-0 left-2":"top-4 left-4"),children:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:(0,b.cn)("text-3xl font-semibold transition-colors",$?"text-emerald-400":"text-red-500",h?"text-lg":"text-3xl"),children:(0,v.lx)((null==q?void 0:null===(t=q.average)||void 0===t?void 0:t.toString())||"0",localStorage.getItem("decimalOrAmerican")||"american")}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:(0,b.cn)("text-sm font-medium",$?"text-emerald-400":"text-red-500",h?"text-xs":"text-sm"),children:[Math.abs(ee).toFixed(2),"%"]}),!h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-gray-400 ".concat(h?"text-xs":"text-sm"),children:q?function(e,t){let a=new Date(e);switch(t){case"5M":case"30M":return a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"});case"1H":case"12H":return a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});default:return a.toLocaleDateString([],{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})}}(q.timestamp,I):""}),(0,s.jsx)("button",{onClick:()=>en(!0),className:"relative",children:(0,s.jsx)(g.Z,{className:"w-4 h-4 text-gray-400"})})]})]})]})}),(0,s.jsx)("div",{className:(0,b.cn)("h-[calc(100%-3rem)]",R.length>0?"mt-28":"mt-16",h?"mt-6":"mt-16"),children:(0,s.jsx)("div",{onTouchEnd:ev,style:{width:"100%",height:"100%"},children:(0,s.jsx)(l.h,{width:"100%",height:"100%",children:(0,s.jsxs)(i.T,{data:eu,onMouseMove:eb,onMouseLeave:ev,margin:{top:20,right:0,left:0,bottom:0},children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:"colorGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:$?"#34d399":"#ef4444",stopOpacity:.2}),(0,s.jsx)("stop",{offset:"100%",stopColor:$?"#34d399":"#ef4444",stopOpacity:0})]})}),R.map((e,t)=>(0,s.jsx)(n.u,{type:"monotone",dataKey:e,stroke:em[t],strokeWidth:1.5,dot:!1,activeDot:!!er&&{r:3,fill:em[t],stroke:"#fff",strokeWidth:1},fill:"none",strokeOpacity:.6,isAnimationActive:!1,connectNulls:!0},e)),(0,s.jsx)(n.u,{type:"monotone",dataKey:"average",stroke:$?"#34d399":"#ef4444",strokeWidth:2,fill:"url(#colorGradient)",dot:!1,activeDot:!!er&&{r:4,fill:$?"#34d399":"#ef4444",stroke:"#fff",strokeWidth:2},isAnimationActive:!1,connectNulls:!0}
1),(0,s.jsx)(o.B,{type:"number",domain:ej,axisLine:!1,tickLine:!1,tick:{fill:"#6b7280",fontSize:10},dx:-10,hide:h,tickCount:20,tickFormatter:e=>(0,v.lx)(e.toString(),localStorage.getItem("decimalOrAmerican")||"american")}),(0,s.jsx)(c.u,{cursor:{stroke:ea?$?"#34d399":"#ef4444":"transparent",strokeWidth:1,strokeDasharray:"3 3"},content:()=>null})]})})})})]}),!h&&(0,s.jsxs)("div",{className:"flex flex-col sportsbook_pill",children:[R.length>0&&(0,s.jsx)("div",{className:"overflow-x-auto  scrollbar-hide px-4 sportsbook_pill",children:(0,s.jsxs)("div",{className:"flex gap-2 pb-2 sportsbook_pill",children:[(0,s.jsx)(M,{name:"Average",color:$?"#22c55e":"#ef4444",value:(null==q?void 0:q.average)||0}),R.map((e,t)=>(0,s.jsx)(M,{name:e,color:em[t],value:(null==q?void 0:q[e])||0},e))]})}),(0,s.jsxs)("div",{className:"flex justify-center gap-1",children:[["5M","30M","1H","12H","1D","1W"].map(e=>(0,s.jsx)(_,{active:I===e,onClick:()=>L(e),className:(0,b.cn)("px-3 py-1.5 text-xs font-medium rounded-lg transition-all duration-200",I===e?"bg-gradient-to-r from-emerald-500/20 to-emerald-400/10 text-emerald-400 border border-emerald-500/20":"text-gray-400 hover:text-gray-300 hover:bg-gray-800/50"),children:e},e)),(0,s.jsx)(_,{active:!1,onClick:()=>X(!0),children:(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:(0,s.jsx)(p.Z,{className:"w-3 h-3"})})})]})]}),(0,s.jsx)(m.M,{children:Q&&(0,s.jsx)(S,{isOpen:Q,onClose:()=>X(!1),availableSportsbooks:K,selectedSportsbooks:R,onToggleSportsbook:eg})}),!h&&u&&(0,s.jsx)(E,{data:eu,highest_bettable_odds:F}),!h&&(0,s.jsx)(C,{data:eu,timeFrame:I}),!h&&(0,s.jsx)(A,{data:eu}),(0,s.jsx)(m.M,{children:ei&&(0,s.jsx)(D,{isOpen:ei,onClose:()=>en(!1)})})]})})},44465:function(e,t,a){a.d(t,{z:function(){return c}});var s=a(49700),r=a(89266),l=a(27007),i=a(22718),n=a(31987);let o=(0,i.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=r.forwardRef((e,t)=>{let{className:a,variant:r,size:i,asChild:c=!1,...d}=e,m=c?l.g7:"button";return(0,s.jsx)(m,{className:(0,n.cn)(o({variant:r,size:i,className:a})),ref:t,...d})});c.displayName="Button"},31987:function(e,t,a){a.d(t,{cn:function(){return l},kN:function(){return i}});var s=a(66935),r=a(90292);function l(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.m6)((0,s.Z)(t))}let i=["outline outline-offset-2 outline-0 focus-visible:outline-2","outline-blue-500 dark:outline-blue-500"]}}]);

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.