PageSourceSearch

https://zara99.xyz/assets/CashbackView-4918e97b.js

js zara99.xyz collected 2026-10-09 22:56:24 UTC 7,823 bytes, 1 lines download raw bytes

1import{d as de,u as ge,p as fe,B as me,a0 as ve,aE as pe,r as n,a6 as x,g as B,y as ke,W as ye,e as he,w as k,s as y,o as l,c as h,a as I,v as f,k as M,j as m,F as A,h as be,i as Y}from"./index-0c2fc791.js";import{r as _e}from"./rules-2d0add82.js";import{D as E}from"./DynamicTitle-cbd8a593.js";import{C as G,f as we,l as Ce,s as Le,a as Te,t as Se,B as De,T as X,R as Re,L as xe,S as Be,M as Ie}from"./ButtonRefresh-cd7681cd.js";import{T as Me}from"./TableBase-c27347ec.js";import{_ as Ye}from"./ShowRules.vue_vue_type_script_setup_true_lang-73cab9ac.js";import{L as je}from"./LoadingComponent-f00ffbe6.js";import"./ChevronLeftIcon-c955d241.js";import"./InformationCircleIcon-933d8683.js";import"./percentBenefitRanking-b813a9aa.js";import"./InboxStackIcon-4c2cf3fb.js";const Oe={class:"wrapper-cashback flex flex-col justify-between gap-[0.5rem]"},Ae={class:"cashback sm:mx-2"},Ee={class:"deposit-header mb-2 md:mb-3 flex justify-between items-center"},Ge={key:0,class:"show-game"},Ne={key:1,class:"show-detail"},Fe={key:1},He={class:"show-history"},$e={class:"flex justify-between items-center"},aa=de({__name:"CashbackView",setup(Ue){const{t:d}=ge(),C=fe(),Z=_e(),N=me(),F=ve(),ee=pe(),H=n([{title:"CASINO",image:G},{title:"FISHING",image:we},{title:"LOTTO",image:Ce},{title:"MUAY",image:G},{title:"SLOT",image:Le},{title:"SPORT",image:Te},{title:"TABLE",image:Se},{title:"UFA",image:G}]),L=n([]),c=n(0),j=n(""),v=n(),s=n({isLoading:!1,isLoadingBtn:!1,loadingContent:!1,loadingIcon:!1}),b=n(!1),T=n(!1);n(!1);const ae=n(x().subtract(6,"month")),_=n({percent:0,current_rank:{},next_rank:{}}),te=n(!0),$=n(),U=n(""),V=n(""),W=n(""),se=B(()=>[{title:d("Date"),key:"datetime",fn:e=>x(e).format("DD/MM/YY HH:mm")},{title:d("Amount"),key:"kreditera"},{title:d("textStatus"),key:"status",type:"badge",fn:e=>d(e===1?"Status.success":"Status.unsuccess"),colorFn:e=>e===1?"!bg-green-500":"!bg-red-500"}]),S=B(()=>
1ee.data),O=B(()=>{var e;return((e=C.data)==null?void 0:e.cashback.ar_belonings_ranking)??!1}),D=B(()=>{var e;return((e=C.data)==null?void 0:e.cashback.config_game)??null});ke(c,()=>{c.value===0&&(j.value="")}),ye(async()=>{N.setWidth("750px")}),he(async()=>{await z()});const z=async()=>{try{await ne(),O.value&&await oe()}catch(e){console.error(`initialData : ${e}`)}},P=({procent:e,current_rank:a,next_rank:t})=>{_.value={percent:e,current_rank:a,next_rank:t},T.value=!0},oe=async()=>{var e,a;S.value&&((e=S.value)!=null&&e.rank_info)&&((a=S.value)==null?void 0:a.rank_info.length)>0?P(S.value):await q()},q=async()=>{try{const e=await k.getRankingInfo();e.code===200&&e.error_code===0?P(e.payload):(T.value=!0,y.error(e.message))}catch(e){console.error(`getNewRankingData : ${e}`)}},J=e=>{var t,i;const a=(i=(t=C.data)==null?void 0:t.cashback.config_game)==null?void 0:i[e];return a?W.value=a.beskrivning:"Default Description"},ne=async()=>{s.value.loadingContent=!0,L.value=[];try{const e=await k.getCashbackAll(),{cashback:a}=C.data||{},{config_game:t}=a||{},i=["UFA","MUAY"];e.code===200&&[0,1].includes(e.error_code)?H.value.forEach(g=>{const o=(e.payload.cashback_detalj||[]).find(r=>r.typ_spel===g.title),p=Object.entries(t||{}).map(([r,w])=>({title:r,...w,visible:w.status_berakna||!1,percent:o!=null&&o.procent?o.procent*100:0,amount:o!=null&&o.cashback?o.cashback:0,image:g.image})).filter(r=>!i.includes(r.title)).find(r=>r.title===g.title);p&&(L.value.push(p),s.value.loadingContent=!1)}):e.code===400&&[0,1].includes(e.error_code)?H.value.forEach(g=>{const o=(e.payload.cashback_detalj||[]).find(r=>r.typ_spel===g.title),p=Object.entries(t||{}).map(([r,w])=>({title:r,...w,visible:w.status_berakna||!1,percent:o!=null&&o.procent?o.procent*100:0,amount:o!=null&&o.cashback?o.cashback:0,image:g.image})).filter(r=>!i.includes(r.title)).find(r=>r.title===g.title);p&&(L.value.push(p),s.value.loadingContent=!1)}):(s.value.loadingContent=!1,y.error(e.message))}catch(e){s.value.loadingContent=!1,console.error("Error",e)}};async function le(e){const a=J(e);Z.setData(a||""),F.setCompo("RulesView"),F.setStyle("ModalSecondary")}async function ie(e){V.value=e,s.value.isLoading=!0;try{let a={spel:e.toLocaleLowerCase()};const t=await k.cashback(a);t.code!==200&&t.error_code!==0?(y.error(t.message),s.value.isLoading=!1):(v.value=t.payload,J(e),c.value===1&&(c.value=0),c.value++,re(e),j.value=d("Treasure.DetailReceiveCashback")+" : "+d(`${V.value.toLowerCase()}`),te.value=!1,setTimeout(()=>{s.value.isLoading=!1},600))}catch(a){s.value.isLoading=!1,console.error(a)}}async function re(e){try{let a={start_date:x(ae.value).format("YYYY-MM-DD"),end_date:x().format("YYYY-MM-DD"),handelse_name:"cashback",typ:e};const t=await k.getTreasureHistory(a);t.code!==200&&t.error_code!==0?y.error(t.message):$.value=t.payload.historia}catch(a){console.error(a)}}const K=async e=>{if(!s.value.isLoading){s.value.isLoading=!0;try{let a={spel:e.toLocaleLowerCase()};const t=await k.cashback(a);t.code===200&&t.error_code===0?(b.value=!0,v.value=t.payload,U.value=e):(y.error(t.message),b.value=!1),setTimeout(()=>{s.value.isLoading=!1},600)}catch(a){console.error(a)}}},ce=async(e,a)=>{s.value.isLoadingBtn=!0;let t={typ:e,spel:a};try{const i=await k.getCashback(t);i.code!==200&&i.error_code!==0?(y.error(i.message),s.value.isLoadingBtn=!1):(await k.amount(),K(a),b.value=!1,y.success(i.message),s.value.isLoadingBtn=!1)}catch(i){s.value.isLoadingBtn=!1,console.error("Error",i)}};async function ue(){s.value.loadingIcon=!0,q(),await z(),s.value.loadingIcon=!1}const Q=()=>{N.setCompo("RankingView")};return(e,a)=>{var t,i,g,R,o;return l(),h("div",Oe,[I("div",Ae,[I("div",Ee,[c.value==0?(l(),f(E,{key:0,title:M(d)("Cashback"),styling:"!block"},null,8,["title"])):m("",!0),c.value===1?(l(),f(E,{key:1,title:M(d)("Cashback"),subtitle:j.value,stepClick:c.value,onStepBack:a[0]||(a[0]=u=>c.value=u)},null,8,["title","subtitle","stepClick"])):m("",!0),c.value===0?(l(),f(De,{key:2,onRefresh:a[1]||(a[1]=u=>ue()),loadingIcon:s.value.loadingIcon,class:"w-[80px] flex justify-end"},null,8,["loadingIcon"])):m("",!0)]),c.value==0?(l(),h("div",Ge,[s.value.loadingContent?(l(),f(je,{key:0})):(l(),h(A,{key:1},[O.value&&_.value&&D.value&&T.value?(l(),f(X,{key:0,"ranking-info":_.value,"treasure-config-game":D.value,type:"cashback","open-modal":Q},null,8,["ranking-info","treasure-config-game"])):m("",!0),(l(!0),h(A,null,be(L.value,(u,p)=>(l(),h(A,{key:p},[u.visible?(l(),f(Re,{key:0,SelectedType:ie,showRule:le,title:u.title,subtitle:M(d)("Cashback"),percent:u.percent,onClicked:K,image:u.image,isLoading:s.value.isLoading,amount:u.amount},null,8,["title","subtitle","percent","image","isLoading","amount"])):m("",!0)],64))),128))],64))])):m("",!0),c.value==1?(l(),h("div",Ne,[s.value.isLoading?(l(),f(xe,{key:0})):(l(),h("div",Fe,[Y(Be,{total:(t=v.value)==null?void 0:t.cashback_total,current:(i=v.value)==null?void 0:i.cashback_nuvarande,stack:(g=v.value)==null?void 0:g.cashback_foregaende,"is-cashback":!0},null,8,["total","current","stack"]),O.value&&_.value&&D.value&&T.value?(l(),f(X,{key:0,"ranking-info":_.value,"treasure-config-game":D.value,type:"cashback","open-modal":Q},null,8,["ranking-info","treasure-config-game"])):m("",!0),I("div",He,[I("div",$e,[Y(E,{title:M(d)("Treasure.HistoryCashback"),"md-size":"xl"}
1,null,8,["title"])]),Y(Me,{"header-data":se.value,data:$.value},null,8,["header-data","data"])]),Y(Ye,{"rules-data":W.value},null,8,["rules-data"])]))])):m("",!0)]),b.value?(l(),f(Ie,{key:0,"is-open":b.value,data:v.value,image:"info",width:"320px",onOnClose:a[2]||(a[2]=u=>b.value=u),total:(R=v.value)==null?void 0:R.cashback_total,typeTreasure:"cashback",typeGame:U.value,handleTakeTreasure:ce,"check-deposit":(o=v.value)==null?void 0:o.cashback_total,"is-loading":s.value.isLoadingBtn},null,8,["is-open","data","total","typeGame","check-deposit","is-loading"])):m("",!0)])}}});export{aa 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.