1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
"use strict";(self["webpackChunkONLINEGAMING_PORTRAIT"]=self["webpackChunkONLINEGAMING_PORTRAIT"]||[]).push([[13],{750:function(e,a,t){t.d(a,{H:function(){return d}});var o=t(5842);o.Z.state.config.volume;let i=[],l=0;function n(e){const a=o.Z.state.config.soundList,t="cn"==o.Z.state.config.$Type||"tw"==o.Z.state.config.$Type?"cn":"en";let i="";try{i=a[`${t}_${e}`],i=window.webkitURL.createObjectURL(i)||URL.createObjectURL(i)}catch(l){console.warn(l,e)}return i}let s=null;const r=document.getElementById("Audio"),c=document.getElementById("audioSourceAside");function d(e){const a=o.Z.state.config.effectsVolume;s.muted=!a,i=e;var t=new Object;return t.mp3List=e,t.auto_play=!1,t.loop=!1,t.Play=function(){this.mp3List[0]&&(c.src=n(this.mp3List[0]),c.type="audio/mpeg",s.pause(),s.load(),setTimeout((()=>{s.play().catch((e=>{console.log(e)}),200)})))},t.Pause=function(){s.pause()},t.Muted=function(){s.muted?s.muted=!1:s.muted=!0},t.volumeAdd=function(){s.volume.toFixed(1)>=1?s.volume=1:s.volume=s.volume+.1},t.volumeMinus=function(){s.volume.toFixed(1)<=0?s.volume=0:s.volume=s.volume-.1},t}function u(e,a){l+=1,i&&l<i.length?(a.src=n(i[l]),a.type="audio/mpeg",e.load(),setTimeout((()=>{e.play().catch((e=>{console.log(e)}),500)}))):(e.pause(),e.currentTime=0,l=0,e.removeEventListener("ended",(()=>{})))}s=r,s.addEventListener("ended",(()=>{u(s,c)}))},4711:function(e,a,t){t.d(a,{D1:function(){return d},Sc:function(){return l},VU:function(){return B},Zt:function(){return x},_6:function(){return n},co:function(){return $},e7:function(){return r},rU:function(){return c},yK:function(){return A}});t(7658);var o=t(5842),i=null;function l(e){const a={BbigEyeRoadisshow:!1,BbigEyeRoadcolor:"",Bpathwayisshow:!1,Bpathwaycolor:"",Broachisshow:!1,Broachcolor:"",PbigEyeRoadisshow:!1,PbigEyeRoadcolor:"",Ppathwayisshow:!1,Ppathwaycolor:"",Proachisshow:!1,Proachcolor:""};if(e.ludan_banker){if(e.ludan_banker.waybill){const t=e.ludan_banker.waybill.bigEyeRoad,o=e.ludan_banker.waybill.pathway,i=e.ludan_banker.waybill.roach;t[0]?(1==t[t.length-1].result?a.BbigEyeRoadcolor="red":a.BbigEyeRoadcolor="blue",a.BbigEyeRoadisshow=!0):a.BbigEyeRoadisshow=!1,o[0]?(1==o[o.length-1].result?a.Bpathwaycolor="red":a.Bpathwaycolor="blue",a.Bpathwayisshow=!0):a.Bpathwayisshow=!1,i[0]?(1==i[i.length-1].result?a.Broachcolor="red":a.Broachcolor="blue",a.Broachisshow=!0):a.Broachisshow=!1}if(e.ludan_player.waybill){const t=e.ludan_player.waybill.bigEyeRoad,o=e.ludan_player.waybill.pathway,i=e.ludan_player.waybill.roach;t[0]?(1==t[t.length-1].result?a.PbigEyeRoadcolor="red":a.PbigEyeRoadcolor="blue",a.PbigEyeRoadisshow=!0):a.PbigEyeRoadisshow=!1,o[0]?(1==o[o.length-1].result?a.Ppathwaycolor="red":a.Ppathwaycolor="blue",a.Ppathwayisshow=!0):a.Ppathwayisshow=!1,i[0]?(1==i[i.length-1].result?a.Proachcolor="red":a.Proachcolor="blue",a.Proachisshow=!0):a.Proachisshow=!1}}return a}function n(e,a,t,o){null!=i&&clearInterval(i),"banker"==a?t.ludan_banker&&t.ludan_banker.waybill&&s(e,t.ludan_banker,t.ludan,o):"palyer"==a&&t.ludan_player&&t.ludan_player.waybill&&s(e,t.ludan_player,t.ludan,o)}function s(e,a,t,o){const l=a.waybill.showRoad||[],n=a.waybill.bigEyeRoad||[],s=a.waybill.bigRoad||[],c=a.waybill.pathway||[],d=a.waybill.roach||[],u=a.waybill.sanxingRoad||[],y=t.waybill.showRoad||[],g=t.waybill.bigEyeRoad||[],b=t.waybill.bigRoad||[],h=t.waybill.pathway||[],f=t.waybill.roach||[],p=t.waybill.sanxingRoad||[];if(l.length>0)var w=l[l.length-1].show_x;else w=0;if(n.length>0)var _=n[n.length-1].show_x;else _=0;if(s.length>0)var m=s[s.length-1].show_x;else m=0;if(c.length>0)var v=c[c.length-1].show_x;else v=0;if(d.length>0)var k=d[d.length-1].show_x;else k=0;if(u.length>0)var R=u[u.length-1].show_x;else R=0;if(y.length>0)var x=y[y.length-1].show_x;else x=0;if(g.length>0)var T=g[g.length-1].show_x;else T=0;if(b.length>0)var P=b[b.length-1].show_x;else P=0;if(h.length>0)var S=h[h.length-1].show_x;else S=0;if(f.length>0)var B=f[f.length-1].show_x;else B=0;if(p.length>0)var I=p[p.length-1].show_x;else I=0;var z={askshowroad:!1,askbigRoad:!1,askbigEyeRoad:!1,askpathway:!1,askroach:!1};z.askshowroad=w>x,z.askbigEyeRoad=_>T,z.askbigRoad=m>P,z.askpathway=v>S,z.askroach=k>B,z.asksanxing=R>I;var W=8;i=setInterval((function(){W--;var l=W%2;W<0?clearInterval(i):1==l?r(e,a,o,!0,z):r(e,t,o,!0)}),200)}function r(e,a,t,i,l){var n=e=>{var a=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/a};const s=e.getContext("2d"),r=n(s),d=e.clientHeight,u=e.clientWidth;let y,g,b,h,f,p;if(y=6,g=parseInt(d/y)*r,b=parseInt(u/(g/r)),h=!1,b%2!=0&&(b+=1),1==t||2==t)1!=i?a&&a.ludan&&a.ludan.waybill&&(h=a.ludan.waybill):a.waybill&&(h=a.waybill),e.setAttribute("width",g*b),e.setAttribute("height",g*y),c(s,g,y,b,h,t,i,l);else if(4==t||5==t)y=4,f=d/y*r,p=1.05*f,b=parseInt(u/(p/r)),e.setAttribute("width",p*b),e.setAttribute("height",f*y),a.ludan&&a.ludan.waybill&&(h=a.ludan.waybill),x(t,s,p,f,y,b,h);else if(6==t){e.setAttribute("width",g*b),e.setAttribute("height",g*y),a&&a.ludan&&a.ludan.waybill&&(h=a.ludan.waybill);const t=o.Z.state.config.toningShowBigWay;B(s,g,y,b,h,a.game_id,3,t)}else 7==t?(e.setAttribute("width",g*b),e.setAttribute("height",g*y),a&&a.ludan&&a.ludan.waybill&&(h=a.ludan.waybill),A(s,g,y,b,h,3)):8==t&&(e.setAttribute("width",g*b),e.setAttribute("height",g*y),a&&a.ludan&&a.ludan.waybill&&(h=a.ludan.waybill),$(s,g,y,b,h,3))}function c(e,a,t,o,i,l,n,s,r){n=n||!1,s=s||{askshowroad:!1,askbigRoad:!1,askbigEyeRoad:!1,askpathway:!1,askroach:!1,asksanxing:!1};e.clearRect(0,0,100*a,a*t);var c=i.showRoad,d=i.bigRoad,b=i.bigEyeRoad,h=i.pathway,f=i.roach,p=i.sanxingRoad;if(1==r){g(e,a,t,o);var w=4}else{y(e,a,t,o);w=5}if(i){if(c&&1!=r){var m="showWay";u(w,m,e,a,c,o,l,n,s.askshowroad)}if(d&&d.length>0)if(3==d[0].result&&1==d[0].show_x&&1==d[0].show_y)_(w,e,a,o,d[0].tie_num);else{m="bigWay";u(w,m,e,a,d,o,l,n,s.askbigRoad)}if(b&&b.length>0){m="bigeyeWay";u(w,m,e,a,b,o,l,n,s.askbigEyeRoad)}if(h&&h.length>0){m="littlWay";u(w,m,e,a,h,o,l,n,s.askpathway)}if(f&&f.length>0){m="roachWay";u(w,m,e,a,f,o,l,n,s.askroach)}if(p&&p.length>0){m="sanxingWay";u(w,m,e,a,p,o,l,n,s.asksanxing)}}}function d(e,a,t,o,i,l){e.clearRect(0,0,100*a,a*t),y(e,a,t,o,!0),i&&i.length>0&&(3==i[0].result&&1==i[0].show_x&&1==i[0].show_y?_(1,e,a,o,i[0].tie_num,!0):u(1,"bigWay",e,a,i,o,l,!1,!1))}function u(e,a,t,o,i,l,n,s,r){var c=i.length,d=[],u=0,y=0;if(u="showWay"==a||"bigWay"==a?"showWay"==a?s&&r?l/2:6==n&&3==e?parseInt(l/3)-1:l/2-1:s&&r?l:l-1:"sanxingWay"==a?s&&r?l/2:l/2-1:"toningBigWay"==a||"bigRoadBS"==a||"bigRoadSP"==a?3==e?parseInt(l/3)-1:2==e?parseInt(l/2)-1:l-1:s&&r?l-1:l-2,1==e?y=.25:2==e?("bigRoadSP"==a&&(y=.25),"bigRoadBS"==a&&(y=parseInt(l/2)+.25)):3==e?("toningBigWay"==a&&(y=.25),"bigRoadSP"==a&&(y=parseInt(l/3)+.25),"bigRoadBS"==a&&(y=2*parseInt(l/3)+.25)):4==e?(y=.25,"littlWay"==a&&(y=.55*l*o),o*=2):5==e&&(y=l/2+.25,"bigWay"==a&&(y=l/2),"littlWay"==a&&(y=.5*l*o+.25*o*(l+1)),"sanxingWay"==a&&(y=.5*l*o+.25*o*(l+1))),c>=1){var g=i[c-1].show_x;if(g>u){var b=g-u;i.forEach((function(e){e.show_x>b&&d.push(e)}))}else d=i,b=0}else d=i,b=0;d.forEach((function(i){"roachWay"==a?k(t,o,y,i.show_x-b,i.show_y,i.result):"littlWay"==a?v(t,o,y,i.show_x-b,i.show_y,i.result):"bigeyeWay"==a?m(t,o,y,i.show_x-b,i.show_y,i.result):"showWay"==a?h(n,t,o,i.show_x-b,i.show_y,i.result,i.pair):"bigWay"==a?p(t,o,y,i.show_x-b,i.show_y,i.result,i.tie_num,i.pair,e):"sanxingWay"==a?R(t,o,y,i.show_x-b,i.show_y,i.result,i.tie_num):"toningBigWay"!=a&&"bigRoadSP"!=a&&"bigRoadBS"!=a||I(t,o,y,i.show_x-b,i.show_y,i.result,i.tie_num,i.pair,e,a)}))}function y(e,a,t,o,i){var l=a*o,n=a*t;e.lineWidth=1,e.strokeStyle="#d9d9d9",e.beginPath(),e.moveTo(0,.5),e.lineTo(l,.5);for(var s=1;s<=t;s++)e.moveTo(0,a*s),e.lineTo(l,a*s);e.moveTo(.5,0),e.lineTo(.5,n);for(var r=1;r<=o;r++)e.moveTo(a*r,0),e.lineTo(a*r,n);if(1!=i){for(var c=0;c<=t;c++)e.moveTo(.5*l,(c+.5)*a),e.lineTo(l,(c+.5)*a);for(var d=0;d<=o-Math.floor(.5*o);d++)e.moveTo((Math.floor(.5*o)+d+.5)*a,0),e.lineTo((Math.floor(.5*o)+d+.5)*a,n)}e.closePath(),e.stroke()}function g(e,a,t,o){var i=a*o,l=a*t;e.lineWidth=1,e.strokeStyle="#d9d9d9",e.beginPath(),e.moveTo(0,.5),e.lineTo(i,.5);for(var n=1;n<=t;n++)e.moveTo(0,a*n),e.lineTo(i,a*n);e.moveTo(.5,0),e.lineTo(.5,l);for(var s=1;s<=o;s++)e.moveTo(a*s,0),e.lineTo(a*s,l);e.closePath(),e.stroke()}function b(e,a,t,o,i,l){void 0!==a&&(e.beginPath(),e.font=i,e.textAlign="center",e.textBaseline="middle",e.fillStyle=l||"#000",e.fillText(a,t,o),e.stroke())}function h(e,a,t,i,l,n,s){a.beginPath(),a.lineWidth=.02*t,a.strokeStyle="#fff";const r=t/2,c=o.Z.state.config.$Type,d=o.Z.state.config.$lang;let u,y;switch(e){case 1:1==n?(u="#cf0012",y="cn"==c||"tw"==c?d[c].banker:"B"):2==n?(u="#1c1f89",y="cn"==c||"tw"==c?d[c].player:"P"):3==n&&(u="#009944",y="cn"==c||"tw"==c?d[c].tie:"T");break;case 2:1==n?(u="#cf0012",y="cn"==c||"tw"==c?d[c].dragon:"D"):2==n?(u="#1c1f89",y="cn"==c||"tw"==c?d[c].tiger:"T"):3==n&&(u="#009944",y="cn"==c||"tw"==c?d[c].tie:"T");break;case 6:y=n,0==n?u="#2e2e2e":1==n?u="#1c1f89":2==n?u="#009944":3==n?u="#ffc107":4==n&&(u="#cf0012");break}a.arc(t*(i-.5),r+t*(l-1),.4*t,0,2*Math.PI),a.fillStyle=u,a.fill(),a.font="bold "+.54*t+"px Arial",a.fillStyle="#ddd",a.textAlign="center",a.textBaseline="middle",a.fillText(y,t*(i-.5),r+t*(l-1)),a.stroke();var g=t/3.5;1==s?f(a,t,i,l,g,"#cf0012"):2==s?f(a,t,i,l,-g,"#1c1f89"):3==s&&(f(a,t,i,l,g,"#cf0012"),f(a,t,i,l,-g,"#1c1f89"))}function f(e,a,t,o,i,l){var n=a/2;e.beginPath(),e.lineWidth=.02*a,e.strokeStyle="#fff",e.arc(a*(t-.5)-i,n+a*(o-1)-i,.13*a,0,2*Math.PI),e.fillStyle=l,e.fill(),e.stroke()}function p(e,a,t,o,i,l,n,s,r){if(e.beginPath(),1==r){e.lineWidth=.12*a;var c=a,d=.75}else{e.lineWidth=.065*a;c=a/2,d=.5}if(2==l)var u="#1c1f89";else if(1==l)u="#cf0012";if(e.strokeStyle=u,e.arc(c*(o-d)+t*a,c*(i-.5),.38*c,0,2*Math.PI),e.closePath(),e.stroke(),0!=n){e.beginPath();var y=.15*a;e.lineWidth=.14*c,e.lineCap="round",e.strokeStyle="#009944",e.moveTo(c*(o-d)+t*a-y,c*(i-.5)+y),e.lineTo(c*(o-d)+t*a+y,c*(i-.5)-y),e.stroke(),0!=n&&b(e,n,c*(o-d)+t*a,c*(i-.5),"bold "+.65*c+"px Arial")}var g=c/3.5;1==s?w(e,a,t,o,i,g,"#cf0012",r):2==s?w(e,a,t,o,i,-g,"#1c1f89",r):3==s&&(w(e,a,t,o,i,g,"#cf0012",r),w(e,a,t,o,i,-g,"#1c1f89",r))}function w(e,a,t,o,i,l,n,s){if(1==s)var r=a,c=.75,d=.16*r;else r=a/2,c=.55,d=.18*r;e.beginPath(),e.lineWidth=.015*a,e.strokeStyle="#fff",e.arc(r*(o-c)+t*a-l,r*(i-.5)-l,d,0,2*Math.PI),e.arc(r*(o-c)+t*a-l,r*(i-.5)-l,d,0,2*Math.PI),e.fillStyle=n,e.fill(),e.stroke()}function _(e,a,t,o,i){if(1==e||4==e)var l=t,n=0;else l=t/2,n=t*o*.5;a.beginPath(),a.lineWidth=3,a.strokeStyle="#3EA542",a.lineCap="round",a.moveTo(.15*l+n,l/2),a.lineTo(.85*l+n,l/2),a.stroke(),b(a,i,.5*l+n,l/2,.8*l+"px Arial")}function m(e,a,t,o,i,l){e.beginPath(),e.lineWidth=.06*a;var n=a/4;if(2==l)var s="#1c1f89";else if(1==l)s="#cf0012";e.strokeStyle=s,e.arc(n/2+n*(o-2)+t*a,3.25*a+n*(i-1.5),.09*a,0,2*Math.PI),e.closePath(),e.stroke()}function v(e,a,t,o,i,l){e.beginPath(),e.lineWidth=0;var n=a/4;if(2==l)var s="#1c1f89";else if(1==l)s="#cf0012";e.strokeStyle=s,e.fillStyle=s,e.arc(n/2+n*(o-2)+t,3.25*a+n*(i-1.5),.28*n,0,2*Math.PI),e.closePath(),e.stroke(),e.fill()}function k(e,a,t,o,i,l){var n=a/4,s=.3*n;if(e.beginPath(),e.lineCap="round",e.lineWidth=.3*n,2==l)var r="#1c1f89";else if(1==l)r="#cf0012";e.strokeStyle=r,e.moveTo(t*a+n*(o-1.5)-s,n/2+n*(i-1)+s+4.5*a),e.lineTo(t*a+n*(o-1.5)+s,n/2+n*(i-1)-s+4.5*a),e.stroke()}function R(e,a,t,o,i,l,n){e.beginPath();var s=a/2;if(e.lineWidth=.15*s,2==l)var r="#1c1f89";else if(1==l)r="#cf0012";if(e.strokeStyle=r,e.arc(t+s*(o-1),4.75*a+s*(i-1),.38*s,0,2*Math.PI),e.closePath(),e.stroke(),0!=n){e.beginPath();var c=.12*a;e.lineWidth=.08*a,e.lineCap="round",e.strokeStyle="#009944",e.moveTo(t+s*(o-1)-c,4.5*a+s*(i-.5)+c),e.lineTo(t+s*(o-1)+c,4.5*a+s*(i-.5)-c),e.stroke(),n>0&&b(e,n,t+s*(o-1),4.5*a+s*(i-.5),.7*s+"px Arial")}}function x(e,a,t,o,i,l,n){if(n&&void 0!=n){var s=n.length,r=[],c=l-2;if(s>=1){var d=n[s-1].show_x;if(d>c){var u=d-c;n.forEach((function(e){e.show_x>u&&r.push(e)}))}else r=n,u=0}else r=n,u=0;n.forEach((function(i){T(e,a,t,o,i.show_x-u,i.show_y,i.type,i.result,i.is_win)}))}P(a,t,o,o),S(a,t,o,i,l)}function T(e,a,t,i,l,n,s,r,c){var d="",u="#000",y=.28*t;"cn"==o.Z.state.config.$Type?0==r?d="无牛":1==r?d="牛1":2==r?d="牛2":3==r?d="牛3":4==r?d="牛4":5==r?d="牛5":6==r?d="牛6":7==r?d="牛7":8==r?d="牛8":9==r?d="牛9":10==r?d="牛牛":11==r&&4==e?d="五公":11==r&&5==e?d="豹子":12==r?d="同花顺":13==r&&(d="皇家同花顺"):"tw"==o.Z.state.config.$Type?0==r?d="無牛":1==r?d="牛1":2==r?d="牛2":3==r?d="牛3":4==r?d="牛4":5==r?d="牛5":6==r?d="牛6":7==r?d="牛7":8==r?d="牛8":9==r?d="牛9":10==r?d="牛牛":11==r&&4==e?d="五公":11==r&&5==e?d="豹子":12==r?d="同花順":13==r&&(d="皇家同花順"):(0==r?d="No Bull":1==r?d="B 1":2==r?d="B 2":3==r?d="B 3":4==r?d="B 4":5==r?d="B 5":6==r?d="B 6":7==r?d="B 7":8==r?d="B 8":9==r?d="B 9":10==r?d="Super B ":11==r&&4==e?d="Five P ":11==r&&5==e?d="Leopard":12==r?d="Flush":13==r&&(d="SuperFlush"),y=.22*t),1==s?(u="#ce2837",1==c&&(a.fillStyle=u,a.fillRect(t*l,i*(n-.3),t,.3*i),b(a,"WIN",t*(.5+l),i*(n-.14),"bold "+.15*t+"px Arial","#fff"))):2==s&&(u="#1d4999 ",1==c&&(a.fillStyle=u,a.fillRect(t*l,i*(n-.3),t,.3*i),b(a,"WIN",t*(.5+l),i*(n-.14),"bold "+.15*t+"px Arial","#fff"))),b(a,d,t*(.5+l),i*(n-.5),"bold "+y+"px Arial",u)}function P(e,a,t){for(var i=0;i<=4;i++){var l=e.createLinearGradient(0,a,0,0),n=.32*a;if(0==i){if("cn"==o.Z.state.config.$Type)var s="#fff",r="庄家";else if("tw"==o.Z.state.config.$Type)s="#fff",r="莊家";else if("tl"==o.Z.state.config.$Type)s="#fff",r="เจ้ามือ";else s="#fff",r="Banker",n=.25*a;l.addColorStop(0,"#ae0b1a"),l.addColorStop(.5,"#ff0017"),l.addColorStop(1,"#ae0b1a")}else{if("cn"==o.Z.state.config.$Type)s="#fff",r="闲"+i;else if("tw"==o.Z.state.config.$Type)s="#fff",r="閒"+i;else if("yn"==o.Z.state.config.$Type)s="#fff",r="Palyer"+i,n=.25*a;else if("tl"==o.Z.state.config.$Type)s="#fff",r="ผู้เล่น"+i,n=.25*a;else s="#fff",r="Palyer"+i,n=.25*a;l.addColorStop(0,"#0321a2"),l.addColorStop(.5,"#002ffb"),l.addColorStop(1,"#092679")}e.fillStyle=l,e.fillRect(0,i*t,a,t),b(e,r,a/2,i*t+t/2,"bold "+n+"px Arial",s)}}function S(e,a,t,o,i){const l=a*i,n=t*o;e.lineWidth=1,e.strokeStyle="#deded9",e.beginPath();for(let s=0;s<=o;s++)e.moveTo(0,t*s),e.lineTo(l,t*s);for(let s=1;s<=i;s++)e.moveTo(a*s,0),e.lineTo(a*s,n);e.closePath(),e.stroke()}function B(e,a,t,o,i,l,n,s){e.clearRect(0,0,100*a,a*t);const r=i.showRoad,c=i.bigRoad,d=i.bigRoadBS,g=i.bigRoadSP;let b=null;y(e,a,t,o,!0),i&&(2!=n&&(r&&r.length>0&&!s&&1!=n&&(b="showWay",u(n,b,e,a,r,o,l)),c&&c.length>0&&s&&(b="toningBigWay",u(n,b,e,a,c,o,l))),1!=n&&(g&&g.length>0&&(b="bigRoadSP",u(n,b,e,a,g,o,l)),d&&d.length>0&&(b="bigRoadBS",u(n,b,e,a,d,o,l))))}function I(e,a,t,i,l,n,s,r,c,d){const u=o.Z.state.config.$Type,y=o.Z.state.config.$lang;e.beginPath();let g,b,h=a;"toningBigWay"==d?(b=n,0==n?g="#2e2e2e":1==n?g="#1c1f89":2==n?g="#009944":3==n?g="#ffc107":4==n&&(g="#cf0012")):"bigRoadBS"==d?1==n?(g="#cf0012",b="cn"==u||"tw"==u?y[u].big:"B"):2==n&&(g="#1c1f89",b="cn"==u||"tw"==u?y[u].small:"S"):"bigRoadSP"==d&&(1==n?(g="#cf0012",b="cn"==u||"tw"==u?y[u].even:"E"):2==n&&(g="#1c1f89",b="cn"==u||"tw"==u?y[u].odd:"O")),e.arc(h*(i-.75)+t*h,h*(l-.5),.38*h,0,2*Math.PI),e.fillStyle=g,e.fill(),e.font="bold "+.54*a+"px Arial",e.fillStyle="#fff",e.textAlign="center",e.textBaseline="middle",e.fillText(b,h*(i-.75)+t*a,h*(l-.5)),e.closePath(),e.stroke();const p=h/3.5;1==r?w(e,a,t,i,l,p,"#cf0012",c):2==r?w(e,a,t,i,l,-p,"#1c1f89",c):3==r&&(w(e,a,t,i,l,p,"#cf0012",c),w(e,a,t,i,l,-p,"#1c1f89",c)),s&&"bigRoadBS"==d&&f(e,a,t+i-.25,l,-p,"#009944")}const z=t(4706),W=t(8898);function A(e,a,t,i,l,n){const s=o.Z.state.config.$Type;e.clearRect(0,0,a*(i+1),a*(t+1));const r=new Image;r.crossOrigin="anonymous",r.src="cn"==s||"tw"==s?z:W;let c=0,d=0,u=[];function y(e,a){let t=[];const o=e.length;let l=i-1;3==n&&(l=parseInt(i/3)-1);let s=0;o<=l?t=e:"showRoad"==a?t=e.slice(o-l,o):(t=e.filter((a=>a.show_x>e[o-1].show_x-l)),t.length>0&&(s=t[0].show_x)),"showRoad"==a?t.forEach(((e,a)=>{const t=e[0]+e[1]+e[2];g(a,0,"icon",e[0]),g(a,1,"icon",e[1]),g(a,2,"icon",e[2]),g(a,3,"num",t),e[0]==e[1]&&e[1]==e[2]?(g(a,4,"icon","triplet"),g(a,5,"icon","triplet")):(g(a,4,"icon",t>=11?"big":"small"),g(a,5,"icon",t%2==0?"even":"odd"))})):"bigRoadBS"==a?t.forEach((e=>{const a=1==e.result?"big":2==e.result?"small":"triplet";g(e.show_x-s+l+1,e.show_y-1,"icon",a)})):"bigRoadSP"==a&&t.forEach((e=>{const a=1==e.result?"even":2==e.result?"odd":"triplet";g(e.show_x-s+2*l+2,e.show_y-1,"icon",a)}))}function g(t,o,i,l){if("icon"==i){const i=u[`dice_${l}`];e.drawImage(r,i[0]*c,i[1]*d,c,d,a*t+.05*a,a*o+a/c*d*.05,.9*a,a/c*d*.9)}else if("num"==i){const i=u["dice_num"];e.drawImage(r,i[0]*c,i[1]*d,c,d,a*t+.05*a,a*o+a/c*d*.05,.9*a,a/c*d*.9),e.font=`bold ${.58*a}px Arial`,e.fillStyle="#fff",e.textAlign="center",e.textBaseline="middle",e.fillText(l,a*(t+.45),a*(o+.55))}if(3==n&&"icon"==i){const i=u[`dice_${l}`];e.drawImage(r,i[0]*c,i[1]*d,c,d,a*t,a*o,.9*a,a/c*d*.9)}}function b(){const o=a*i,l=a*t;e.lineWidth=1,e.strokeStyle="#deded9",e.beginPath();for(let i=0;i<=t;i++)e.moveTo(0,a*i),e.lineTo(o,a*i);for(let t=0;t<=i;t++)e.moveTo(a*t,0),e.lineTo(a*t,l);e.closePath(),e.stroke()}r.onload=()=>{c=r.width/2,d=r.height/6,u={dice_1:[0,0],dice_2:[0,1],dice_3:[0,2],dice_odd:[0,3],dice_even:[0,4],dice_triplet:[0,5],dice_4:[1,0],dice_5:[1,1],dice_6:[1,2],dice_small:[1,3],dice_big:[1,4],dice_num:[1,5]},l&&(y(l.showRoad,"showRoad"),3==n&&(y(l.bigRoadBS,"bigRoadBS"),y(l.bigRoadSP,"bigRoadSP"))),b()}}const E=t(8587);function $(e,a,t,i,l,n){const s=o.Z.state.config.$Type,r=o.Z.state.config.$lang;e.clearRect(0,0,a*(i+1),a*(t+1));const c=new Image;c.crossOrigin="anonymous",c.src=E;let d=0,u=0,y=[];function g(e,a){let t=[];const o=e.length;let l=i-1;3==n&&(l=parseInt(i/3)-1);let s=0;o<=l?t=e:(t=e.filter((a=>a.show_x>e[o-1].show_x-l)),t.length>0&&(s=t[0].show_x)),"showRoad"==a?t.forEach(((e,t)=>{b(a,e.show_x-s-1,e.show_y-1,e.result)})):"bigRoadBS"==a?t.forEach((e=>{b(a,e.show_x-s+l+1,e.show_y-1,e.result)})):"bigRoadSP"==a&&t.forEach((e=>{b(a,e.show_x-s+2*l+2,e.show_y-1,e.result)}))}function b(t,o,i,l){let n=[0,0];if("showRoad"==t){const e=["2","4","6","8","10","11","13","15","17","20","22","24","26","28","29","31","33","35"].includes(l),a=["1","3","5","7","9","12","14","16","18","19","21","23","25","27","30","32","34","36"].includes(l);0==l?n=y.green:e?n=y.black:a&&(n=y.red)}else"bigRoadBS"==t?1==l?(l="cn"==s||"tw"==s?r[s].big:"B",n=y.red):2==l?(l="cn"==s||"tw"==s?r[s].small:"S",n=y.blue):3==l&&(l="cn"==s||"tw"==s?r[s].zero:"Z",n=y.green):"bigRoadSP"==t&&(1==l?(l="cn"==s||"tw"==s?r[s].even:"E",n=y.red):2==l?(l="cn"==s||"tw"==s?r[s].odd:"O",n=y.blue):3==l&&(l="cn"==s||"tw"==s?r[s].zero:"Z",n=y.green));e.drawImage(c,n[0]*d,n[1]*u,d,u,a*o+.05*a,a*i+a/d*u*.05,.9*a,a/d*u*.9),e.font=`bold ${.58*a}px Arial`,e.fillStyle="#fff",e.textAlign="center",e.textBaseline="middle",e.fillText(l,a*(o+.5),a*(i+.55))}function h(){const o=a*i,l=a*t;e.lineWidth=1,e.strokeStyle="#deded9",e.beginPath();for(let i=0;i<=t;i++)e.moveTo(0,a*i),e.lineTo(o,a*i);for(let t=0;t<=i;t++)e.moveTo(a*t,0),e.lineTo(a*t,l);e.closePath(),e.stroke()}c.onload=()=>{d=c.width/2,u=c.height/3,y={blue:[0,0],red:[0,1],green:[0,2],black:[1,2]},l&&(g(l.showRoad,"showRoad"),3==n&&(g(l.bigRoadBS,"bigRoadBS"),g(l.bigRoadSP,"bigRoadSP"))),h()}}},9704:function(e,a,t){t.d(a,{Z:function(){return Ee}});var o=t(6252),i=t(3577);const l=e=>((0,o.dD)("data-v-71b4346f"),e=e(),(0,o.Cn)(),e),n={class:"way-box"},s={key:0,class:"way"},r={class:"canvas",ref:"refItem"},c={key:1,class:"flex flex-1 flex-v"},d={class:"totle"},u={class:"lable"},y={class:"box"},g={key:0,class:"name"},b={key:1,class:"num"},h={key:2,class:"name"},f={key:3,class:"num"},p={class:"name"},w={class:"num"},_={key:0,class:"progress"},m={class:"box"},v={class:"type"},k={class:"num"},R={class:"bar"},x={class:"box"},T={class:"type"},P={class:"num"},S={class:"bar"},B={class:"box"},I={class:"type"},z={class:"num"},W={class:"bar"},A={key:1,class:"progress"},E={class:"box"},$={class:"type"},N={class:"num"},Z={class:"bar"},C={class:"box"},L={class:"type"},D={class:"num"},j={class:"bar"},M={class:"box"},q={class:"type"},O={class:"num"},U={class:"bar"},F={key:2,class:"progress"},H={class:"box"},G=l((()=>(0,o._)("span",{class:"type"},"0",-1))),Y={class:"num"},V={class:"bar"},K={class:"box"},J=l((()=>(0,o._)("span",{class:"type"},"1",-1))),Q={class:"num"},X={class:"bar"},ee={class:"box"},ae=l((()=>(0,o._)("span",{class:"type"},"2",-1))),te={class:"num"},oe={class:"bar"},ie={class:"box"},le=l((()=>(0,o._)("span",{class:"type"},"3",-1))),ne={class:"num"},se={class:"bar"},re={class:"box"},ce=l((()=>(0,o._)("span",{class:"type"},"4",-1))),de={class:"num"},ue={class:"bar"},ye={key:3,class:"progress"},ge={class:"box"},be={class:"type"},he={class:"num"},fe={class:"bar"},pe={class:"box"},we={class:"type"},_e={class:"num"},me={class:"bar"},ve={class:"box"},ke={class:"type"},Re={class:"num"},xe={class:"bar"},Te={key:4,class:"progress"};function Pe(e,a,t,l,Pe,Se){return(0,o.wg)(),(0,o.iD)("div",n,["totle"!=t.wayType?((0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("canvas",r,null,512)])):((0,o.wg)(),(0,o.iD)("div",c,[(0,o._)("div",d,[(0,o._)("div",u,(0,i.zw)(l.Lang[l.Type].totalGame),1),(0,o._)("div",y,[1==t.data.game_id?((0,o.wg)(),(0,o.iD)("span",g,(0,i.zw)(l.Lang[l.Type].p_banker)+": ",1)):(0,o.kq)("",!0),1==t.data.game_id?((0,o.wg)(),(0,o.iD)("span",b,(0,i.zw)(t.data.banker_pair_Count||0),1)):(0,o.kq)("",!0),1==t.data.game_id?((0,o.wg)(),(0,o.iD)("span",h,(0,i.zw)(l.Lang[l.Type].p_player)+": ",1)):(0,o.kq)("",!0),1==t.data.game_id?((0,o.wg)(),(0,o.iD)("span",f,(0,i.zw)(t.data.player_pair_Count||0),1)):(0,o.kq)("",!0),(0,o._)("span",p,(0,i.zw)(l.Lang[l.Type].game)+":",1),(0,o._)("span",w,(0,i.zw)(t.data.number_tab_number-1||0),1)])]),1==t.data.game_id||2==t.data.game_id?((0,o.wg)(),(0,o.iD)("div",_,[(0,o._)("div",{class:"item banker",style:(0,i.j5)({width:`${l.probability.banker}%`})},[(0,o._)("div",m,[(0,o._)("span",v,[1==t.data.game_id?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,i.zw)("cn"==l.Type?"庄":"tw"==l.Type?"莊":"B"),1)],64)):(0,o.kq)("",!0),2==t.data.game_id?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,i.zw)("cn"==l.Type?"龙":"tw"==l.Type?"龍":"D"),1)],64)):(0,o.kq)("",!0)]),(0,o._)("span",k,(0,i.zw)(t.data.bankerCount),1)]),(0,o._)("div",R,[(0,o._)("span",null,(0,i.zw)(l.probability.bankerNum)+"%",1)])],4),(0,o._)("div",{class:"item palyer",style:(0,i.j5)({width:`${l.probability.palyer}%`})},[(0,o._)("div",x,[(0,o._)("span",T,[1==t.data.game_id?((0,o.wg)(),(0,o.iD)(o.HY,{key:0},[(0,o.Uk)((0,i.zw)("cn"==l.Type?"闲":"tw"==l.Type?"閒":"P"),1)],64)):(0,o.kq)("",!0),2==t.data.game_id?((0,o.wg)(),(0,o.iD)(o.HY,{key:1},[(0,o.Uk)((0,i.zw)("cn"==l.Type||"tw"==l.Type?"虎":"T"),1)],64)):(0,o.kq)("",!0)]),(0,o._)("span",P,(0,i.zw)(t.data.playerCount),1)]),(0,o._)("div",S,[(0,o._)("span",null,(0,i.zw)(l.probability.palyerNum)+"%",1)])],4),(0,o._)("div",{class:"item tie",style:(0,i.j5)({width:`${l.probability.tie}%`})},[(0,o._)("div",B,[(0,o._)("span",I,(0,i.zw)("cn"==l.Type||"tw"==l.Type?"和":"T"),1),(0,o._)("span",z,(0,i.zw)(t.data.tieCount),1)]),(0,o._)("div",W,[(0,o._)("span",null,(0,i.zw)(l.probability.tieNum)+"%",1)])],4)])):(0,o.kq)("",!0),4==t.data.game_id||5==t.data.game_id?((0,o.wg)(),(0,o.iD)("div",A,[(0,o._)("div",{class:"item banker",style:(0,i.j5)({width:`${l.probability.player1}%`})},[(0,o._)("div",E,[(0,o._)("span",$,(0,i.zw)("cn"==l.Type?"闲1":"tw"==l.Type?"閒1":"P1"),1),(0,o._)("span",N,(0,i.zw)(t.data.player_1_count),1)]),(0,o._)("div",Z,[(0,o._)("span",null,(0,i.zw)(l.probability.player1Num)+"%",1)])],4),(0,o._)("div",{class:"item palyer",style:(0,i.j5)({width:`${l.probability.player2}%`})},[(0,o._)("div",C,[(0,o._)("span",L,(0,i.zw)("cn"==l.Type?"闲2":"tw"==l.Type?"閒2":"P2"),1),(0,o._)("span",D,(0,i.zw)(t.data.player_2_count),1)]),(0,o._)("div",j,[(0,o._)("span",null,(0,i.zw)(l.probability.player2Num)+"%",1)])],4),(0,o._)("div",{class:"item tie",style:(0,i.j5)({width:`${l.probability.player3}%`})},[(0,o._)("div",M,[(0,o._)("span",q,(0,i.zw)("cn"==l.Type?"闲3":"tw"==l.Type?"閒3":"P3"),1),(0,o._)("span",O,(0,i.zw)(t.data.player_3_count),1)]),(0,o._)("div",U,[(0,o._)("span",null,(0,i.zw)(l.probability.player3Num)+"%",1)])],4)])):(0,o.kq)("",!0),6==t.data.game_id?((0,o.wg)(),(0,o.iD)("div",F,[(0,o._)("div",{class:"item black",style:(0,i.j5)({width:`${l.probability.zero_count}%`})},[(0,o._)("div",H,[G,(0,o._)("span",Y,(0,i.zw)(t.data.count.zero_count),1)]),(0,o._)("div",V,[(0,o._)("span",null,(0,i.zw)(l.probability.zeroNum)+"%",1)])],4),(0,o._)("div",{class:"item palyer toning",style:(0,i.j5)({width:`${l.probability.one_count}%`})},[(0,o._)("div",K,[J,(0,o._)("span",Q,(0,i.zw)(t.data.count.one_count),1)]),(0,o._)("div",X,[(0,o._)("span",null,(0,i.zw)(l.probability.oneNum)+"%",1)])],4),(0,o._)("div",{class:"item tie",style:(0,i.j5)({width:`${l.probability.two_count}%`})},[(0,o._)("div",ee,[ae,(0,o._)("span",te,(0,i.zw)(t.data.count.two_count),1)]),(0,o._)("div",oe,[(0,o._)("span",null,(0,i.zw)(l.probability.twoNum)+"%",1)])],4),(0,o._)("div",{class:"item yellow",style:(0,i.j5)({width:`${l.probability.three_count}%`})},[(0,o._)("div",ie,[le,(0,o._)("span",ne,(0,i.zw)(t.data.count.three_count),1)]),(0,o._)("div",se,[(0,o._)("span",null,(0,i.zw)(l.probability.threeNum)+"%",1)])],4),(0,o._)("div",{class:"item banker",style:(0,i.j5)({width:`${l.probability.four_count}%`})},[(0,o._)("div",re,[ce,(0,o._)("span",de,(0,i.zw)(t.data.count.four_count),1)]),(0,o._)("div",ue,[(0,o._)("span",null,(0,i.zw)(l.probability.fourNum)+"%",1)])],4)])):(0,o.kq)("",!0),7==t.data.game_id?((0,o.wg)(),(0,o.iD)("div",ye,[(0,o._)("div",{class:"item banker",style:(0,i.j5)({width:`${l.probability.big_count}%`})},[(0,o._)("div",ge,[(0,o._)("span",be,(0,i.zw)(l.Lang[l.Type].big),1),(0,o._)("span",he,(0,i.zw)(t.data.count.big_count),1)]),(0,o._)("div",fe,[(0,o._)("span",null,(0,i.zw)(l.probability.bigNum)+"%",1)])],4),(0,o._)("div",{class:"item palyer",style:(0,i.j5)({width:`${l.probability.small_count}%`})},[(0,o._)("div",pe,[(0,o._)("span",we,(0,i.zw)(l.Lang[l.Type].small),1),(0,o._)("span",_e,(0,i.zw)(t.data.count.small_count),1)]),(0,o._)("div",me,[(0,o._)("span",null,(0,i.zw)(l.probability.smallNum)+"%",1)])],4),(0,o._)("div",{class:"item tie",style:(0,i.j5)({width:`${l.probability.leopard_count}%`})},[(0,o._)("div",ve,[(0,o._)("span",ke,(0,i.zw)(l.Lang[l.Type].wai),1),(0,o._)("span",Re,(0,i.zw)(t.data.count.leopard_count),1)]),(0,o._)("div",xe,[(0,o._)("span",null,(0,i.zw)(l.probability.leopardNum)+"%",1)])],4)])):(0,o.kq)("",!0),8==t.data.game_id?((0,o.wg)(),(0,o.iD)("div",Te)):(0,o.kq)("",!0)]))])}var Se=t(2262),Be=t(3907),Ie=t(4711),ze={components:{},props:{dutch:{type:Boolean,default:!0},wayType:{type:String,default:"allway"},data:{type:Object,default:()=>{}},index:{type:Number,default:0},routerName:{type:String,default:"allway"}},setup(e){const a=(0,Be.oR)(),t=(0,Se.iH)(null),i=(0,o.Fl)((()=>a.state.config.$Type)),l=(0,o.Fl)((()=>a.state.config.$lang)),n=(0,o.Fl)((()=>a.state.config.timeStamp)),s=(0,o.Fl)((()=>{const a=e.data,t=a.number_tab_number-1;let o={};if(1==a.game_id||2==a.game_id)o.banker=t?parseInt(a.bankerCount/t*100):0,o.tie=t?parseInt(a.tieCount/t*100):0,o.palyer=t?parseInt(a.playerCount/t*100):0,o.bankerNum=o.banker,o.tieNum=o.tie,o.palyerNum=o.palyer;else if(4==a.game_id||5==a.game_id)o.player1=t?parseInt(a.player_1_count/t*100):0,o.player2=t?parseInt(a.player_2_count/t*100):0,o.player3=t?parseInt(a.player_3_count/t*100):0,o.player1Num=o.player1,o.player2Num=o.player2,o.player3Num=o.player3;else if(6==a.game_id)try{o.zero_count=t?parseInt(a.count.zero_count/t*100):0,o.one_count=t?parseInt(a.count.one_count/t*100):0,o.two_count=t?parseInt(a.count.two_count/t*100):0,o.three_count=t?parseInt(a.count.three_count/t*100):0,o.four_count=t?parseInt(a.count.four_count/t*100):0,o.zeroNum=o.zero_count,o.oneNum=o.one_count,o.twoNum=o.two_count,o.threeNum=o.three_count,o.fourNum=o.four_count}catch(i){console.log(i)}else if(7==a.game_id)try{o.big_count=t?parseInt(a.count.big_count/t*100):0,o.leopard_count=t?parseInt(a.count.leopard_count/t*100):0,o.small_count=t?parseInt(a.count.small_count/t*100):0,o.bigNum=o.big_count,o.leopardNum=o.leopard_count,o.smallNum=o.small_count}catch(i){console.log(i)}return 0==o.player1&&0==o.player2&&0==o.player3&&(o.player1=33,o.player2=33,o.player3=33),0==o.banker&&0==o.tie&&0==o.palyer&&(o.banker=33,o.tie=33,o.palyer=33),0==o.big_count&&0==o.leopard_count&&0==o.small_count&&(o.big_count=33,o.leopard_count=33,o.small_count=33),0==o.zero_count&&0==o.one_count&&0==o.two_count&&0==o.four_count&&(o.zero_count=20,o.one_count=20,o.two_count=20,o.three_count=20,o.four_count=20),o}));(0,o.YP)((()=>[e.data.ludan,e.wayType,n.value,i.value]),(([a,i])=>{const l=a?.waybill||{showRoad:[],bigRoad:[],bigEyeRoad:[],pathway:[],roach:[],sanxingRoad:[],bigRoadBS:[],bigRoadSP:[]},{showRoad:n=[],bigRoad:s=[],bigEyeRoad:c=[],pathway:d=[],roach:u=[],sanxingRoad:y=[],bigRoadBS:g=[],bigRoadSP:b=[]}=l;let h=[];h=4==e.data.game_id||5==e.data.game_id?a||{waybill:[]}:{showRoad:n,bigRoad:s,bigEyeRoad:c,pathway:d,roach:u,sanxingRoad:y,bigRoadBS:g,bigRoadSP:b},(0,o.Y3)((()=>{switch(i){case"bigway":case"allway":r({game_id:e.data.game_id,ludan:h},t.value,i);break;case"totle":break}}))}),{immediate:!0,deep:!0});const r=(e,a,t)=>{const o=e=>{const a=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/a},i=a.getContext("2d"),l=o(i),n=a.clientHeight,s=a.clientWidth;let r,c,d,u;if(1==e.game_id||2==e.game_id){r=6,d=parseInt(n/r)*l,c=parseInt(s/(d/l)),c%2!=0&&(c-=1),u=!1;var y=!1,g=!1;a.setAttribute("width",d*c),a.setAttribute("height",d*r),"bigway"==t?(u=e.ludan?.bigRoad||[],(0,Ie.D1)(i,d,r,c,u,e.game_id,y,g)):(u=e.ludan,(0,Ie.rU)(i,d,r,c,u,e.game_id,y,g))}else if(4==e.game_id||5==e.game_id){r=4;const t=n/r*l,o=1.05*t;c=parseInt(s/(o/l)),u=!1,a.setAttribute("width",o*c),a.setAttribute("height",t*r),e.ludan.waybill&&(u=e.ludan.waybill),(0,Ie.Zt)(e.game_id,i,o,t,r,c,u)}else if(6==e.game_id){r=6,d=parseInt(n/r)*l,c=parseInt(s/(d/l)),c%2!=0&&(c-=1),u=!1,a.setAttribute("width",d*c),a.setAttribute("height",d*r),u=e.ludan;let o=2,y=!1;"bigway"==t&&(o=1,y=!0),u=e.ludan,(0,Ie.VU)(i,d,r,c,u,e.game_id,o,y)}else if(7==e.game_id){r=6;const t=n/r*l,o=parseInt(s/(t/l));u=!1,a.setAttribute("width",t*o),a.setAttribute("height",t*r),e.ludan&&(u=e.ludan),(0,Ie.yK)(i,t,r,o,u)}else if(8==e.game_id){r=6;const t=n/r*l,o=parseInt(s/(t/l));u=!1,a.setAttribute("width",t*o),a.setAttribute("height",t*r),e.ludan&&(u=e.ludan),(0,Ie.co)(i,t,r,o,u)}};return{Type:i,Lang:l,probability:s,refItem:t}}},We=t(3744);const Ae=(0,We.Z)(ze,[["render",Pe],["__scopeId","data-v-71b4346f"]]);var Ee=Ae},8898:function(e,a,t){e.exports=t.p+"img/en_sprite.992064dc.png"},4706:function(e,a,t){e.exports=t.p+"img/sprite.ce1427e4.png"},8587:function(e,a,t){e.exports=t.p+"img/sprite.aa5ebd3b.png"}}]); |