import{b7 as M,r as d,O as q,c as A,ca as H,Q as z,aY as o,aT as n,a$ as e,b9 as S,b0 as a,bg as v,bh as m,N as _,bf as B,bc as N,bq as O,ba as Q,bo as W,p as X,aX as Y}from"./index-xnhGKCfe.js";import{C as j,R as G}from"./index-BprM6Ssl.js";import{E as J}from"./index-DxHrjCNU.js";import{b as K,a as U}from"./main.vue_vue_type_style_index_0_scoped_cf719de6_lang-BLJh8Idj.js";/* empty css              *//* empty css              */import{u as Z}from"./BettingPopup-BrL_1D5T.js";import"./index-BaI210iY.js";import"./index-CPJxzQTf.js";import"./dragon-65oA2ftS.js";import"./useWorkerIntervalFn.hook-BuwsgSxq.js";import"./tips-DJIxz9GI.js";import"./currency-DTUBf2lI.js";import"./countdown-Bkuhrach.js";import"./wingo-D-E9w345.js";import"./index-BPVaJMve.js";import"./use-route-ooe9RtXE.js";const ee={class:"t"},te={class:"t_head"},se={class:"t-b1"},ae={class:"t-b1-l w"},oe={class:"t-b1-l lottery"},ne={class:"t-b1-l-n"},le={class:"t-b1-l"},ie={class:"t-b1-l-n"},re={class:"t-b1-l"},ue={class:"t-b1-l-n"},ce={class:"t-b1-l"},de={class:"t-b1-l-n"},ve={class:"t-b1-l"},me={class:"t-b1-l-n"},_e={class:"t-b2"},pe=["IssueNumber","Number","Colour","rowId"],be={class:"t-b2-i"},ge={class:"t-b2-Num"},he=["id"],fe={key:0,class:"flex-center t-b2-loading",style:{height:"100%"}},ye={key:1,class:"t-b2-empty flex-center"},Ce={key:0,class:"t-foot"},Ne={class:"t-foot-page"},we=M({__name:"trend",setup(ke){const{historyIssues:E,gameCode:P,historyIssuesTotalPage:L,issue:R}=Z(),w=d([]),r=A(()=>w.value.length?w.value:E.value),p=d([]),i=d(1),D=d(10),b=d(!1),k=d(!1),g=d(L.value);function I(){X(()=>{for(let s=0;s<r.value.length;s++)r.value[s+1]&&V(s,r.value[s],r.value[s+1])})}function V(s,c,h){const f=parseInt(c.number),y=parseInt(h.number),u=document.getElementById("myCanvas"+s);if(u&&u.getContext){const t=u.getContext("2d");t.clearRect(0,0,u.width,u.height),t.beginPath(),t.moveTo(f==0?20:f*29+20,0),t.lineTo(y==0?20:y*29+20,u.height),t.strokeStyle="red",t.stroke(),t.closePath()}}const x=()=>{i.value<2||(i.value--,T())},F=()=>{i.value++,!(i.value>g.value)&&T()},$=async()=>{if(!k.value)try{k.value=!0;const{result:s,data:c}=await K({gameCode:P.value,pageNo:i.value,pageSize:10});s&&(p.value=c)}catch{}finally{k.value=!1}},T=async()=>{if(!b.value)try{b.value=!0;const{result:s,data:c}=await U({gameCode:P.value,pageNo:i.value,pageSize:D.value});s&&(w.value=c.list||[],i.value=c.pageNo||1,g.value=c.totalPage||0)}catch{}finally{b.value=!1}};return q(async()=>{r.value.length&&I(),await $()}),H(()=>{I(),$()}),z(R,()=>{$()}),z(r,()=>{I()}),(s,c)=>{const h=j,f=G,y=O,u=W;return n(),o("div",ee,[e("div",te,[e("div",null,a(s.$t("common.issue")),1),e("div",null,a(s.$t("common.number")),1)]),e("div",se,[e("div",ae,[e("div",null,a(s.$t("common.w8")),1),e("span",null,a(s.$t("common.w9")),1)]),e("div",oe,[e("div",null,a(s.$t("common.w11")),1),e("div",ne,[(n(),o(v,null,m(10,t=>e("div",{key:t},a(t-1),1)),64))])]),e("div",le,[e("div",null,a(s.$t("common.w12")),1),e("div",ie,[(n(!0),o(v,null,m(p.value,(t,l)=>(n(),o("div",{key:"4"+l},a(t.missingCount),1))),128))])]),e("div",re,[e("div",null,a(s.$t("common.w13")),1),e("div",ue,[(n(!0),o(v,null,m(p.value,(t,l)=>(n(),o("div",{key:"2"+l},a(t.avgMissing),1))),128))])]),e("div",ce,[e("div",null,a(s.$t("common.w14")),1),e("div",de,[(n(!0),o(v,null,m(p.value,(t,l)=>(n(),o("div",{key:"5"+l},a(t.openCount),1))),128))])]),e("div",ve,[e("div",null,a(s.$t("common.w15")),1),e("div",me,[(n(!0),o(v,null,m(p.value,(t,l)=>(n(),o("div",{key:"3"+l},a(t.maxContinuous),1))),128))])])]),e("div",_e,[(n(!0),o(v,null,m(r.value,(t,l)=>(n(),o("div",{key:l,IssueNumber:t.issueNumber,Number:t.number,Colour:t.colour,rowId:l,class:"t-b2-item"},[_(f,null,{default:B(()=>[_(h,{span:"9"},{default:B(()=>[e("div",be,a(t.issueNumber),1)]),_:2},1024),_(h,{span:"15"},{default:B(()=>[e("div",ge,[e("canvas",{id:"myCanvas"+l,ref_for:!0,ref:"canvas",class:"line-canvas"},null,8,he),(n(),o(v,null,m(10,C=>e("div",{class:N(["t-b2-Num-item",Number(t.number)==C-1?"action"+(C-1):""]),key:C},a(C-1),3)),64)),e("div",{class:N(["t-b2-Num-BS",{isB:Number(t.number)>4}])},a(Number(t.number)>4?"B":"S"),3)])]),_:2},1024)]),_:2},1024)],8,pe))),128)),b.value?(n(),o("div",fe,[_(y,{type:"spinner",color:"#FD565C"})])):S("",!0),r.value.length===0&&!b.value?(n(),o("div",ye,[_(Q(J))])):S("",!0)]),r.value.length?(n(),o("div",Ce,[e("div",{class:N(["t-foot-previous",{disabled:i.value<=1}]),onClick:x},[_(u,{name:"arrow-left",class:"t-icon",size:"20"})],2),e("div",Ne,a(i.value)+"/"+a(g.value),1),e("div",{class:N(["t-foot-next",{disabled:i.value>=g.value}]),onClick:F},[_(u,{name:"arrow",class:"t-icon",size:"20"})],2)])):S("",!0)])}}}),He=Y(we,[["__scopeId","data-v-6f1c18a2"]]);export{He as default};
