1function Ve(o,l){if(!o||!o.detailedHistory||o.detailedHistory.length===0)return{totalMatches:0,overLine:0,underLine:0,exactlyLine:0,sweeps:0,splits:0,avgOvertimes:0,avgSets:0,splitPercentage:0,totalSets:0,totalSet1s:0,totalSet2s:0,totalSet3s:0,totalSet4s:0,totalSet5s:0,over15_5Games:0,over15_5Percentage:0,over16_5Games:0,over16_5Percentage:0,over17_5Games:0,over17_5Percentage:0,over18_5Games:0,over18_5Percentage:0,over19_5Games:0,over19_5Percentage:0,over20_5Games:0,over20_5Percentage:0,set1Over15_5Count:0,set1Over15_5Percentage:0,set1Over16_5Count:0,set1Over16_5Percentage:0,set1Over17_5Count:0,set1Over17_5Percentage:0,set1Over18_5Count:0,set1Over18_5Percentage:0,set1Over19_5Count:0,set1Over19_5Percentage:0,set1Over20_5Count:0,set1Over20_5Percentage:0,set2Over15_5Count:0,set2Over15_5Percentage:0,set2Over16_5Count:0,set2Over16_5Percentage:0,set2Over17_5Count:0,set2Over17_5Percentage:0,set2Over18_5Count:0,set2Over18_5Percentage:0,set2Over19_5Count:0,set2Over19_5Percentage:0,set2Over20_5Count:0,set2Over20_5Percentage:0,set3Over15_5Count:0,set3Over15_5Percentage:0,set3Over16_5Count:0,set3Over16_5Percentage:0,set3Over17_5Count:0,set3Over17_5Percentage:0,set3Over18_5Count:0,set3Over18_5Percentage:0,set3Over19_5Count:0,set3Over19_5Percentage:0,set3Over20_5Count:0,set3Over20_5Percentage:0,set4Over15_5Count:0,set4Over15_5Percentage:0,set4Over16_5Count:0,set4Over16_5Percentage:0,set4Over17_5Count:0,set4Over17_5Percentage:0,set4Over18_5Count:0,set4Over18_5Percentage:0,set4Over19_5Count:0,set4Over19_5Percentage:0,set4Over20_5Count:0,set4Over20_5Percentage:0,set5Over15_5Count:0,set5Over15_5Percentage:0,set5Over16_5Count:0,set5Over16_5Percentage:0,set5Over17_5Count:0,set5Over17_5Percentage:0,set5Over18_5Count:0,set5Over18_5Percentage:0,set5Over19_5Count:0,set5Over19_5Percentage:0,set5Over20_5Count:0,set5Over20_5Percentage:0,lastMeeting:null,lastTotal:0,last5:null,last10:null,last15:null,last20:null,last30:null,last50:null,detailedHistory:[],player1WinPercentage:0,player2WinPercentage:0};const{detailedHistory:f}=o,t=f.length;let s=0,u=0,p=0,a=0,e=0,O=0,i=0,c=0,n=0,r=0,v=0,_=0,d=0,P=0,h=0,M=0,m=0,C=0,x=0,L=0,F=0,G=0,k=0,I=0,R=0,A=0,H=0,U=0,j=0,B=0,K=0,z=0,Y=0,q=0,J=0,Q=0,X=0,Z=0,$=0,V=0,D=0,ee=0,te=0,re=0,ne=0,oe=0,se=0,ae=0,w=null,ie=0;f.forEach(S=>{const{totalPoints:T}=S;T>l?s++:T<l?u++:p++,S.setScores&&S.setScores.length>0&&(i+=S.setScores.length,S.setScores.forEach((E,y)=>{const g=E.home+E.away;g>15.5&&d++,g>16.5&&P++,g>17.5&&h++,g>18.5&&M++,g>19.5&&m++,g>20.5&&C++,y===0?(c++,g>15.5&&x++,g>16.5&&L++,g>17.5&&F++,g>18.5&&G++,g>19.5&&k++,g>20.5&&I++):y===1?(n++,g>15.5&&R++,g>16.5&&A++,g>17.5&&H++,g>18.5&&U++,g>19.5&&j++,g>20.5&&B++):y===2?(r++,g>15.5&&K++,g>16.5&&z++,g>17.5&&Y++,g>18.5&&q++,g>19.5&&J++,g>20.5&&Q++):y===3?(v++,g>15.5&&X++,g>16.5&&Z++,g>17.5&&$++,g>18.5&&V++,g>19.5&&D++,g>20.5&&ee++):y===4&&(_++,g>15.5&&te++,g>16.5&&re++,g>17.5&&ne++,g>18.5&&oe++,g>19.5&&se++,g>20.5&&ae++)})),S.isSweep&&a++,S.isSplit&&e++,O+=S.overtimes,(!w||S.timestamp>new Date(w).getTime()/1e3)&&(w=S.date,ie=T)});const ue=t>0?Number((O/t).toFixed(1)):0,ve=t>0?Number((i/t).toFixed(1)):0,_e=t>0?Number((e/t*100).toFixed(1)):0,ge=i>0?Math.round(d/i*100):0,pe=i>0?Math.round(P/i*100):0,fe=i>0?Math.round(h/i*100):0,Oe=i>0?Math.round(M/i*100):0,de=i>0?Math.round(m/i*100):0,he=i>0?Math.round(C/i*100):0,Pe=c>0?Math.round(x/c*100):0,Se=c>0?Math.round(L/c*100):0,Me=c>0?Math.round(F/c*100):0,me=c>0?Math.round(G/c*100):0,Ce=c>0?Math.round(k/c*100):0,ye=c>0?Math.round(I/c*100):0,Le=n>0?Math.round(R/n*100):0,We=n>0?Math.round(A/n*100):0,xe=n>0?Math.round(H/n*100):0,Te=n>0?Math.round(U/n*100):0,Ee=n>0?Math.round(j/n*100):0,we=n>0?Math.round(B/n*100):0,Ne=r>0?Math.round(K/r*100):0,be=r>0?Math.round(z/r*100):0,Fe=r>0?Math.round(Y/r*100):0,Ge=r>0?Math.round(q/r*100):0,ke=r>0?Math.round(J/r*100):0,Ie=r>0?Math.round(Q/r*100):0,Re=v>0?Math.round(X/v*100):0,Ae=v>0?Math.round(Z/v*100):0,He=v>0?Math.round($/v*100):0,Ue=v>0?Math.round(V/v*100):0,je=v>0?Math.round(D/v*100):0,Be=v>0?Math.round(ee/v*100):0,Ke=_>0?Math.round(te/_*100):0,ze=_>0?Math.round(re/_*100):0,Ye=_>0?Math.round(ne/_*100):0,qe=_>0?Math.round(oe/_*100):0,Je=_>0?Math.round(se/_*100):0,Qe=_>0?Math.round(ae/_*100):0,W=S=>{if(t<S)return null;const T=f.slice(0,S);let E=0,y=0,g=0,le=0,ce=0;return T.forEach(N=>{N.totalPoints>l?E++:N.totalPoints<l?y++:g++,N.isSweep&&le++,N.isSplit&&ce++}),{overLine:E,underLine:y,exactlyLine:g,sweeps:le,splits:ce,splitPercentage:Number((ce/S*100).toFixed(1))}};return{totalMatches:t,overLine:s,underLine:u,exactlyLine:p,sweeps:a,splits:e,avgOvertimes:ue,avgSets:ve,splitPercentage:_e,totalSets:i,totalSet1s:c,totalSet2s:n,totalSet3s:r,totalSet4s:v,totalSet5s:_,over15_5Games:d,over15_5Percentage:ge,over16_5Games:P,over16_5Percentage:pe,over17_5Games:h,over17_5Percentage:fe,over18_5Games:M,over18_5Percentage:Oe,over19_5Games:m,over19_5Percentage:de,over20_5Games:C,over20_5Percentage:he,set1Over15_5Count:x,set1Over15_5Percentage:Pe,set1Over16_5Count:L,set1Over16_5Percentage:Se,set1Over17_5Count:F,set1Over17_5Percentage:Me,set1Over18_5Count:G,set1Over18_5Percentage:me,set1Over19_5Count:k,set1Over19_5Percentage:Ce,set1Over20_5Count:I,set1Over20_5Percentage:ye,set2Over15_5Count:R,set2Over15_5Percentage:Le,set2Over16_5Count:A,set2Over16_5Percentage:We,set2Over17_5Count:H,set2Over17_5Percentage:xe,set2Over18_5Count:U,set2Over18_5Percentage:Te,set2Over19_5Count:j,set2Over19_5Percentage:Ee,set2Over20_5Count:B,set2Over20_5Percentage:we,set3Over15_5Count:K,set3Over15_5Percentage:Ne,set3Over16_5Count:z,set3Over16_5Percentage:be,set3Over17_5Count:Y,set3Over17_5Percentage:Fe,set3Over18_5Count:q,set3Over18_5Percentage:Ge,set3Over19_5Count:J,set3Over19_5Percentage:ke,set3Over20_5Count:Q,set3Over20_5Percentage:Ie,set4Over15_5Count:X,set4Over15_5Percentage:Re,set4Over16_5Count:Z,set4Over16_5Percentage:Ae,set4Over17_5Count:$,set4Over17_5Percentage:He,set4Over18_5Count:V,set4Over18_5Percentage:Ue,set4Over19_5Count:D,set4Over19_5Percentage:je,set4Over20_5Count:ee,set4Over20_5Percentage:Be,set5Over15_5Count:te,set5Over15_5Percentage:Ke,set5Over16_5Count:re,set5Over16_5Percentage:ze,set5Over17_5Count:ne,set5Over17_5Percentage:Ye,set5Over18_5Count:oe,set5Over18_5Percentage:qe,set5Over19_5Count:se,set5Over19_5Percentage:Je,set5Over20_5Count:ae,set5Over20_5Percentage:Qe,lastMeeting:w,lastTotal:ie,last5:W(5),last10:W(10),last15:W(15),last20:W(20),last30:W(30),last50:W(50),detailedHistory:f,player1WinPercentage:o.player1WinPercentage,player2WinPercentage:o.player2WinPercentage}}function De(o=58.5,l=90.5){const f=[];for(let t=o;t<=l;t+=1)f.push(Number(t.toFixed(1)));return f}const et=12,Xe=[5.5,6.5,7.5,8.5,9.5,10.5];function tt(o,l,f){const t=Xe,s=[];let u=0,p=0;const a={all:t.map(()=>0),1:t.map(()=>0),2:t.map(()=>0),3:t.map(()=>0),4:t.map(()=>0),5:t.map(()=>0)},e={all:0,1:0,2:0,3:0,4:0,5:0};o.forEach(v=>{if(!v.setScores||v.setScores.length===0||f!==void 0&&v.homeTeam!==l&&v.homeTeam!==f)return;const _=v.homeTeam===l;let d=0;
1v.setScores.forEach((P,h)=>{const M=_?P.home:P.away;d+=M,u+=M,p++,e.all++;const m=h+1,C=h<5;C&&e[m]++,t.forEach((x,L)=>{M>x&&(a.all[L]++,C&&a[m][L]++)})}),s.push(d)});const O=s.length,i=O>0?Number((s.reduce((v,_)=>v+_,0)/O).toFixed(1)):0,c=p>0?Number((u/p).toFixed(1)):0,n=(v,_)=>v.map(d=>_>0?Math.round(d/_*100):0),r={all:n(a.all,e.all),1:n(a[1],e[1]),2:n(a[2],e[2]),3:n(a[3],e[3]),4:n(a[4],e[4]),5:n(a[5],e[5])};return{validMatches:O,playerTotals:s,avgPlayerPoints:i,avgPlayerSetPoints:c,setCounts:e,setOverRates:r,setOverCounts:a}}function rt(o){return o%1===0?o.toString():o.toFixed(1)}const Ze=74.5,nt=["Czech Liga Pro","TT Cup","TT Elite Series","Setka Cup","Setka Cup Women"];function ot(o,l,f){if(!l?.enabled)return f;const t=l.perLeague?.[o];return typeof t=="number"?t:typeof l.defaultLine=="number"?l.defaultLine:Ze}function b(o,l){return l===0?0:Math.round(o/l*100)}function st(){return{over:"text-green-600 dark:text-green-300",under:"text-red-600 dark:text-red-400"}}function at(o,l,f,t="all",s="all"){const u=[1.5,2.5,3.5,4.5],p=()=>({"1.5":{covered:0,total:0,percentage:0},"2.5":{covered:0,total:0,percentage:0},"3.5":{covered:0,total:0,percentage:0},"4.5":{covered:0,total:0,percentage:0}}),a=p(),e=p();let O=0;return o.forEach(i=>{if(!i.setScores||i.setScores.length===0)return;const c=i.homeTeam===l;i.setScores.forEach((n,r)=>{if(s!=="all"&&r+1!==s)return;const v=n.home>n.away,_=Math.abs(n.home-n.away);O++;const d=c&&v||!c&&!v;u.forEach(P=>{const h=P.toString();if(t==="wins")d?(a[h].total++,_>P&&a[h].covered++):(e[h].total++,_>P&&e[h].covered++);else if(t==="inverted"){a[h].total++,e[h].total++;const M=!d&&_>P,m=d&&_>P;M||a[h].covered++,m||e[h].covered++}else a[h].total++,e[h].total++,d&&_>P?a[h].covered++:!d&&_>P&&e[h].covered++})})}),u.forEach(i=>{const c=i.toString();a[c].percentage=a[c].total>0?Math.round(a[c].covered/a[c].total*100):0,e[c].percentage=e[c].total>0?Math.round(e[c].covered/e[c].total*100):0}),{player1:{name:l,spreads:a},player2:{name:f,spreads:e},totalSets:O}}function ct(o,l,f,t=1){const s={name:l,up2_0:{opportunities:0,closed:0,percentage:0},up2_1:{opportunities:0,closed:0,percentage:0},tied2_2:{opportunities:0,closed:0,percentage:0}},u={name:f,up2_0:{opportunities:0,closed:0,percentage:0},up2_1:{opportunities:0,closed:0,percentage:0},tied2_2:{opportunities:0,closed:0,percentage:0}};return o.forEach(p=>{if(!p.setScores||p.setScores.length<3)return;const a=p.homeTeam===l,e=[],O=[];p.setScores.forEach(n=>{const r=n.home>n.away,v=a&&r||!a&&!r;e.push(v),O.push(Math.abs(n.home-n.away))});const i=n=>e[n]===!0&&(O[n]??0)>=t,c=n=>e[n]===!1&&(O[n]??0)>=t;for(let n=0;n<e.length;n++){if(n===2){const r={p1:(e[0]?1:0)+(e[1]?1:0),p2:0};r.p2=2-r.p1,r.p1===2?(s.up2_0.opportunities++,i(2)&&s.up2_0.closed++):r.p2===2&&(u.up2_0.opportunities++,c(2)&&u.up2_0.closed++)}if(n===3&&e.length>=4){const r={p1:(e[0]?1:0)+(e[1]?1:0)+(e[2]?1:0),p2:0};r.p2=3-r.p1,r.p1===2&&r.p2===1?(s.up2_1.opportunities++,i(3)&&s.up2_1.closed++):r.p2===2&&r.p1===1&&(u.up2_1.opportunities++,c(3)&&u.up2_1.closed++)}n===4&&e.length===5&&(s.tied2_2.opportunities++,u.tied2_2.opportunities++,i(4)?s.tied2_2.closed++:c(4)&&u.tied2_2.closed++)}}),s.up2_0.percentage=s.up2_0.opportunities>0?Math.round(s.up2_0.closed/s.up2_0.opportunities*100):0,s.up2_1.percentage=s.up2_1.opportunities>0?Math.round(s.up2_1.closed/s.up2_1.opportunities*100):0,s.tied2_2.percentage=s.tied2_2.opportunities>0?Math.round(s.tied2_2.closed/s.tied2_2.opportunities*100):0,u.up2_0.percentage=u.up2_0.opportunities>0?Math.round(u.up2_0.closed/u.up2_0.opportunities*100):0,u.up2_1.percentage=u.up2_1.opportunities>0?Math.round(u.up2_1.closed/u.up2_1.opportunities*100):0,u.tied2_2.percentage=u.tied2_2.opportunities>0?Math.round(u.tied2_2.closed/u.tied2_2.opportunities*100):0,{player1:s,player2:u,totalMatches:o.length}}function it(o,l,f,t,s=!0){const u=[],p=[],a={name:l,coveredCount:0,totalWins:0,percentage:0,avgMargin:0,medianMargin:0,minMargin:0,maxMargin:0},e={name:f,coveredCount:0,totalWins:0,percentage:0,avgMargin:0,medianMargin:0,minMargin:0,maxMargin:0};let O=0;o.forEach(r=>{if(!r.setScores||r.setScores.length===0||r.homeSetScore===void 0||r.awaySetScore===void 0)return;O++;const v=r.homeTeam===l,_=r.setScores.reduce((m,C)=>m+C.home,0),d=r.setScores.reduce((m,C)=>m+C.away,0),P=Math.abs(_-d),h=r.homeSetScore>r.awaySetScore;v&&h||!v&&!h?(a.totalWins++,u.push(P),P>t&&a.coveredCount++):(e.totalWins++,p.push(P),P>t&&e.coveredCount++)});const i=r=>{if(r.length===0)return 0;const v=[...r].sort((d,P)=>d-P),_=Math.floor(v.length/2);return v.length%2===0?((v[_-1]??0)+(v[_]??0))/2:v[_]??0},c=s?a.totalWins:O,n=s?e.totalWins:O;return a.percentage=c>0?Math.round(a.coveredCount/c*100):0,a.avgMargin=u.length>0?Number((u.reduce((r,v)=>r+v,0)/u.length).toFixed(1)):0,a.medianMargin=i(u),a.minMargin=u.length>0?Math.min(...u):0,a.maxMargin=u.length>0?Math.max(...u):0,e.percentage=n>0?Math.round(e.coveredCount/n*100):0,e.avgMargin=p.length>0?Number((p.reduce((r,v)=>r+v,0)/p.length).toFixed(1)):0,e.medianMargin=i(p),e.minMargin=p.length>0?Math.min(...p):0,e.maxMargin=p.length>0?Math.max(...p):0,{player1:a,player2:e,totalMatches:o.length}}function lt(){const o=[];for(let l=.5;l<=14.5;l+=1)o.push(Number(l.toFixed(1)));return o}function ut(o,l,f){if(!o||o.totalMatches<20)return!1;if(f&&l?.enabled&&l.functionBody)try{return!!new Function("data","calculatePercentage",l.functionBody)(o,b)}catch(t){console.error("Custom outlier criteria error:",t)}if(o.last10){const t=b(o.last10.overLine,10);if(t>=80||t<=20)return!0}if(o.last20){const t=b(o.last20.overLine,20);if(t>=80||t<=20)return!0}if(o.last30){const t=b(o.last30.overLine,30);if(t>=80||t<=20)return!0}return!1}function $e(o,l,f,t){if(!o||o.length===0||f<1)return null;const s=[...o].reverse(),u=s.length,p=i=>t===void 0?!0:u-1-i<t;let a=0,e=0,O=0;for(let i=0;i<s.length;i++){const c=s[i];if(!c||c.homeSetScore===void 0||c.awaySetScore===void 0||!c.homeTeam)continue;const n=c.homeTeam===l,r=c.homeSetScore>c.awaySetScore;if(n&&r||!n&&!r)a=0;else if(a++,a===f)for(let _=i+1;_<s.length;_++){const d=s[_];if(!(!d||d.homeSetScore===void 0||d.awaySetScore===void 0||!d.homeTeam)){if(p(_)){const P=d.homeTeam===l,h=d.homeSetScore>d.awaySetScore,M=P&&h||!P&&!h;O++,M&&e++}break}}}return O<1?null:{streakLength:f,wins:e,total:O,percentage:Math.round(e/O*100)}}function vt(o,l,f){if(!o||o.length===0)return null;let t=0,s="";for(let a=0;a<o.length;a++){const e=o[a];if(!e||e.homeSetScore===void 0||e.awaySetScore===void 0)continue;const O=e.homeTeam===l,i=e.homeSetScore>
1e.awaySetScore,n=O&&i||!O&&!i?l:f;if(a===0)t=1,s=n;else if(n===s)t++;else break}if(t<1||!s)return null;const u=s===l?f:l,p=$e(o,u,t);return p?{losingPlayer:u,streakLength:t,wins:p.wins,total:p.total,percentage:p.percentage}:null}function _t(o,l,f,t){if(!o||o.length===0||l<1)return null;const s=[...o].reverse(),u=s.length,p=i=>t===void 0?!0:u-1-i<t;let a=0,e=0,O=0;for(let i=0;i<s.length;i++){const c=s[i];if(!c)continue;const n=c.totalPoints>74.5,r=c.totalPoints<74.5;if(f==="over"?n:r){if(a++,a===l)for(let _=i+1;_<s.length;_++){const d=s[_];if(d){p(_)&&(O++,d.totalPoints>74.5&&e++);break}}}else a=0}return O<1?null:{streakLength:l,streakType:f,overs:e,total:O,percentage:Math.round(e/O*100)}}export{Ze as D,et as I,nt as K,Xe as P,b as a,vt as b,Ve as c,De as d,$e as e,rt as f,st as g,_t as h,ut as i,tt as j,at as k,ct as l,lt as m,it as n,ot as r};
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.