PageSourceSearch

https://jdb777.com/_nuxt/D8wuAMkn.js

js jdb777.com collected 2026-10-05 18:26:55 UTC 8,429 bytes, 1 lines download raw bytes

1import{u as e}from"./DGn-UpSf.js";import{n as t}from"./Bdec1s0s.js";import{C as n,Ft as r,It as i,J as a,K as o,M as s,Nt as ee,S as c,T as l,U as u,Z as d,_t as f,at as te,ft as p,h as m,it as ne,lt as re,rt as h,tt as g,w as _,x as v}from"./C_MKi_jQ.js";import{b as ie,y as ae}from"./Chd42XL2.js";import{i as oe,t as se}from"#entry";import{i as ce,n as le,r as ue,s as de,t as y}from"./BQjoGjBQ.js";import{t as fe}from"./BQfnpt6T.js";import{t as pe}from"./L3ra0icX.js";var me={key:0,class:`page-title-strip trend-title`},he={key:2,class:`trend-controls`},ge=[`aria-label`],_e=[`onClick`],ve={key:4,class:`trend-panel trend-empty`},ye={key:5,class:`trend-chart-list`},be={class:`trend-chart-header`},xe=[`aria-label`],Se={class:`trend-bar-column`},Ce={key:1,class:`trend-donut-layout`},we={class:`trend-legend`},b=s({__name:`trend`,async setup(s){let b,x,{siteText:S}=de(),Te={red:`红波`,green:`绿波`,blue:`蓝波`},Ee={red:`#e00012`,green:`#43d83a`,blue:`#1437d8`},C=[`鼠`,`牛`,`虎`,`兔`,`龙`,`蛇`,`马`,`羊`,`猴`,`鸡`,`狗`,`猪`],De=[`#b91c1c`,`#8b5e34`,`#d99a22`,`#7c6cf2`,`#db7334`,`#7aa23a`,`#c21d22`,`#e1bf35`,`#e46f9b`,`#b59a2d`,`#80a8d9`,`#83c8c8`],Oe=[`1-10`,`11-20`,`21-30`,`31-40`,`41-49`],ke=[30,50,100],{siteCode:w}=se(),T=ae(),E=ie(),D=ue(),O=p(typeof T.query.lotteryId==`string`?T.query.lotteryId:void 0),k=p(100),A=v(()=>Ie(k.value)),j=p(A.value),{data:M}=([b,x]=h(()=>y(()=>`${D}/api/public/sites/${w.value}/config`,{key:()=>`trend:site:${w.value}`,watch:!1},`$e1KToNVmRk`)),b=await b,x(),b),{data:N}=([b,x]=h(()=>y(()=>`${D}/api/public/sites/${w.value}/lotteries`,{key:()=>`trend:lotteries:${w.value}`,watch:!1},`$v5945YTrtX`)),b=await b,x(),b),Ae=v(()=>new Set((N.value??[]).map(e=>e.id)));function P(e){return N.value?.length?e&&Ae.value.has(e)?e:N.value[0]?.id:e}let F=v(()=>P(O.value)),I=v(()=>N.value?.find(e=>e.id===F.value)),L=v(()=>{let e=new URLSearchParams({site:w.value,limit:String(j.value)});return F.value&&e.set(`lotteryId`,F.value),e.toString()}),{data:R,refresh:z,status:je,error:B}=([b,x]=h(async()=>le(()=>`trend:history:${L.value}`,async(e,{signal:t})=>{let n=L.value;return{query:n,draws:await oe(`${D}/api/public/draws/history?${n}`,{signal:t,timeout:15e3})}},{timeout:15e3,watch:[]})),b=await b,x(),b),V=v(()=>M.value?.kind===`official`),H=v(()=>j.value===A.value&&R.value?.query===L.value?R.value:void 0),U=v(()=>j.value!==A.value||!H.value&&(je.value===`pending`||!B.value)),Me=v(()=>[...H.value?.draws??[]].filter(e=>!F.value||e.lotteryId===F.value).sort((e,t)=>new Date(t.openTime).getTime()-new Date(e.openTime).getTime())),W=v(()=>Me.value.slice(0,A.value)),G=v(()=>W.value.flatMap(e=>e.balls).filter(e=>e.kind===`special`||e.position===7)),K=v(()=>W.value.flatMap(e=>e.balls).filter(e=>e.kind!==`special`&&e.position!==7)),Ne=v(()=>[Z(`special-number`,`特码出现次数`,Y(G.value,15)),Q(`special-wave`,`特码波色出现次数`,ze(G.value)),Z(`special-tail`,`特码尾出现次数`,Be(G.value)),Z(`special-range`,`特码波段次数`,Ve(G.value)),Q(`special-zodiac`,`特肖出现次数`,X(G.value)),Z(`normal-number`,`正码数字出现次数`,Y(K.value,15)),Q(`normal-wave`,`正码波色出现次数`,ze(K.value)),Z(`normal-tail`,`正码尾出现次数`,Be(K.value)),Z(`normal-range`,`正码波段次数`,Ve(K.value)),Q(`normal-zodiac`,`正码生肖出现次数`,X(K.value))]);function Pe(){let e=P(O.value);O.value!==e&&(O.value=e,e&&E.replace({query:{...T.query,lotteryId:e}}))}g(N,Pe),g(()=>T.query.lotteryId,e=>{let t=P(typeof e==`string`?e:void 0);O.value!==t&&(O.value=t)}),g(O,e=>{e&&T.query.lotteryId!==e&&E.replace({query:{...T.query,lotteryId:e}})}),t(()=>({title:S(`${I.value?.name??`开奖`}走势图 - ${M.value?.name??`开奖中心`}`)}));function Fe(){document.visibilityState===`visible`&&z({dedupe:`defer`}).catch(()=>void 0)}o(()=>{Pe(),document.addEventListener(`visibilitychange`,Fe)}),u(()=>{document.removeEventListener(`visibilitychange`,Fe),q&&clearTimeout(q)});let q;g(A,e=>{q&&clearTimeout(q),q=setTimeout(()=>{j.value=e},300)});function Ie(e){return Number.isFinite(e)?Math.min(500,Math.max(1,Math.round(e))):100}function Le(){k.value=Ie(k.value)}function Re(e,t){let n=new Map;
1return e.forEach(e=>{let r=t(e);n.set(r,(n.get(r)??0)+1)}),Array.from(n.entries()).map(([e,t])=>({label:e,count:t}))}function J(e,t=!1){return[...e].sort((e,n)=>n.count-e.count||(t?Number(e.label)-Number(n.label):e.label.localeCompare(n.label,`zh-Hans-CN`)))}function Y(e,t){return J(Re(e,e=>e.number),!0).slice(0,t)}function ze(e){return[`red`,`green`,`blue`].map(t=>({label:Te[t],count:e.filter(e=>e.wave===t).length,color:Ee[t]}))}function Be(e){return J(Array.from({length:10},(t,n)=>({label:`${n}`,count:e.filter(e=>e.tail===String(n)).length})),!0)}function Ve(e){return J(Oe.map(t=>({label:t,count:e.filter(e=>He(e.number)===t).length})))}function X(e){return C.map((t,n)=>({label:t,count:e.filter(e=>e.zodiac===t).length,color:De[n]})).filter(e=>e.count>0).sort((e,t)=>t.count-e.count||C.indexOf(e.label)-C.indexOf(t.label))}function He(e){let t=Number(e);return t<=10?`1-10`:t<=20?`11-20`:t<=30?`21-30`:t<=40?`31-40`:`41-49`}function Z(e,t,n){return{id:e,title:t,type:`bar`,stats:n,maxCount:Math.max(1,...n.map(e=>e.count)),total:n.reduce((e,t)=>e+t.count,0)}}function Q(e,t,n){let r=n.filter(e=>e.count>0);return{id:e,title:t,type:`donut`,stats:r,maxCount:Math.max(1,...r.map(e=>e.count)),total:r.reduce((e,t)=>e+t.count,0)}}function $(e,t){return e.color??(t%2==0?`#1f4aa5`:`#174084`)}function Ue(e,t){return e.count<=0?`2%`:`${Math.max(8,e.count/t.maxCount*100)}%`}function We(e){if(!e.total||e.stats.length===0)return{background:`#eef2f7`};let t=0;return{background:`conic-gradient(${e.stats.map((n,r)=>{let i=n.count/e.total*360,a=t;return t+=i,`${$(n,r)} ${a.toFixed(2)}deg ${t.toFixed(2)}deg`}).join(`, `)})`}}function Ge(e,t){return t.total?`${Math.round(e.count/t.total*100)}%`:`0%`}return(t,o)=>{let s=fe,u=pe,p=ce;return f(M)&&f(N)?(a(),n(p,{key:0,site:f(M)},{default:ne(()=>[f(V)?_(``,!0):(a(),l(`section`,me,[c(`h1`,null,i(f(S)(`走势图`)),1),c(`p`,null,i(f(S)(f(I)?.name??`开奖数据`))+i(f(S)(` · 最近 `))+i(f(S)(f(H)?f(W).length:`-`))+i(f(S)(` 期`)),1)])),f(V)?_(``,!0):(a(),n(s,{key:1,class:`compact`,"active-id":f(F),lotteries:f(N),"onUpdate:activeId":o[0]||=e=>O.value=e},null,8,[`active-id`,`lotteries`])),f(V)?_(``,!0):(a(),l(`div`,he,[c(`label`,null,[c(`span`,null,i(f(S)(`期数`)),1),te(c(`input`,{"onUpdate:modelValue":o[1]||=e=>re(k)?k.value=e:null,min:`1`,max:`500`,step:`1`,inputmode:`numeric`,type:`number`,onBlur:Le,onChange:Le},null,544),[[e,f(k),void 0,{number:!0}]])]),c(`div`,{class:`trend-periods`,"aria-label":f(S)(`常用期数`)},[(a(),l(m,null,d(ke,e=>c(`button`,{key:e,class:ee({active:f(A)===e}),type:`button`,onClick:t=>k.value=e},i(f(S)(e))+i(f(S)(`期 `)),11,_e)),64))],8,ge),c(`strong`,null,i(f(S)(`已纳入 `))+i(f(S)(f(H)?f(W).length:`-`))+i(f(S)(` 期`)),1)])),f(U)||f(B)?(a(),n(u,{key:3,pending:f(U),failed:!!f(B),onRetry:o[2]||=e=>f(z)({dedupe:`defer`})},null,8,[`pending`,`failed`])):f(W).length===0?(a(),l(`section`,ve,[c(`h2`,null,i(f(S)(`暂无走势数据`)),1),c(`p`,null,i(f(S)(`当前彩种还没有已发布开奖记录,发布后会自动生成号码、波色、尾数、波段和生肖统计。`)),1)])):(a(),l(`div`,ye,[(a(!0),l(m,null,d(f(Ne),e=>(a(),l(`section`,{key:e.id,class:`trend-panel trend-chart-panel`},[c(`header`,be,[c(`h2`,null,i(f(S)(e.title)),1),c(`span`,null,i(f(S)(`近`))+i(f(S)(f(W).length))+i(f(S)(`期`)),1)]),e.type===`bar`?(a(),l(`div`,{key:0,class:`trend-bar-chart`,style:r({"--bar-count":e.stats.length}),tabindex:`0`,role:`region`,"aria-label":f(S)(e.title)},[(a(!0),l(m,null,d(e.stats,(t,n)=>(a(),l(`div`,{key:`${e.id}-${t.label}`,class:`trend-bar-item`},[c(`em`,null,i(f(S)(t.count))+i(f(S)(`次`)),1),c(`span`,Se,[c(`b`,{style:r({height:Ue(t,e),background:`linear-gradient(180deg, #5f8fe8, ${$(t,n)})`})},null,4)]),c(`strong`,null,i(f(S)(t.label)),1)]))),128))],12,xe)):(a(),l(`div`,Ce,[c(`div`,{class:`trend-donut`,style:r(We(e))},[c(`span`,null,[c(`strong`,null,i(f(S)(e.total)),1),c(`small`,null,i(f(S)(`次`)),1)])],4),c(`ul`,we,[(a(!0),l(m,null,d(e.stats,(t,n)=>(a(),l(`li`,{key:`${e.id}-${t.label}`},[c(`i`,{style:r({background:$(t,n)})},null,4),c(`span`,null,i(f(S)(t.label)),1),c(`em`,null,i(f(S)(t.count))+i(f(S)(`次`)),1),c(`b`,null,i(f(S)(Ge(t,e))),1)]))),128))])]))]))),128))]))]),_:1},8,[`site`])):_(``,!0)}}});
1export{b 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.