PageSourceSearch

https://arabia365.com/assets/MyBetsView-DnTY8X2A.js

js arabia365.com collected 2026-09-25 12:45:12 UTC 15,053 bytes, 1 lines download raw bytes

1import{e as r,aQ as ae,aR as le,bo as ne,aT as oe,aU as _,bn as re,a as ce,bg as i,E as b,b7 as ie,aC as de,j as s,I as A,h as me,aS as ue,m as pe,bO as M,bR as I,bS as be,bT as he,bU as xe,bG as K,bV as k}from"./index-ePwWFRi3.js";import{C as ye}from"./CustomTableMob-CraAEZGM.js";import{D as F}from"./DateAndTimeTemplate-CtH7sUuf.js";import{r as Ne,R as ve}from"./UserRouter-CzzbX84q.js";import{S as w}from"./SelectTemplate-CwmZc9Ug.js";import{C as je}from"./CurrencyTypeFactor-BXiaQXLY.js";import{S as Te}from"./Spinner-BwmgTLx7.js";import{B as fe}from"./Button-DVnPiWzl.js";import{T as ke,a as Ce,b as Re,c as Y,d as o,e as Se}from"./TableRow-D7Hj_Eud.js";import{c as ge}from"./createSvgIcon-DkzKZIln.js";import"./DatePicker-CnJXYkNw.js";import"./Menu-DsTeI-26.js";import"./debounce-DtXjJkxj.js";import"./Grow-DKPC3MwN.js";import"./DialogActions-1l5OBIzS.js";import"./createStyles-yD3y8ldD.js";import"./TextField-BdyiJ5hV.js";import"./OutlinedInput-LZ_Jpgpq.js";import"./useFormControl-CPUvMcaJ.js";import"./Select-TBBud7HU.js";import"./useControlled-DDD53nha.js";import"./FormHelperText-CpMvdeQZ.js";import"./InputAdornment-CCi_MgXP.js";import"./___vite-browser-external_commonjs-proxy-DwoBiO5t.js";import"./CustomButton-BtaGzRdp.js";import"./trackApkDownload-PL4YyPKe.js";import"./MenuItem-2Pij2dXD.js";const Oe=ge(r.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}));var Ae=function(t){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:t.palette.text.secondary},"&:hover":{color:t.palette.text.secondary,"& $icon":{opacity:.5}},"&$active":{color:t.palette.text.primary,"&& $icon":{opacity:1,color:t.palette.text.secondary}}},active:{},icon:{fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}},Ie=r.forwardRef(function(t,e){var m=t.active,v=m===void 0?!1:m,C=t.children,h=t.classes,R=t.className,j=t.direction,S=j===void 0?"asc":j,n=t.hideSortIcon,d=n===void 0?!1:n,x=t.IconComponent,T=x===void 0?Oe:x,N=le(t,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return r.createElement(ne,oe({className:_(h.root,R,v&&h.active),component:"span",disableRipple:!0,ref:e},N),C,d&&!v?null:r.createElement(T,{className:_(h.icon,h["iconDirection".concat(re(S))])}))});const V=ae(Ae,{name:"MuiTableSortLabel"})(Ie),Pe=({title:c,titleId:t,...e},m)=>r.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:m,"aria-labelledby":t,...e},c?r.createElement("title",{id:t},c):null,r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.64644 0.646445C4.74021 0.55268 4.86739 0.5 5 0.5H9C9.82845 0.5 10.5 1.17157 10.5 2V10C10.5 10.8284 9.82845 11.5 9 11.5H3C2.17158 11.5 1.5 10.8284 1.5 10V4C1.5 3.86739 1.55268 3.74021 1.64645 3.64644L4.64644 0.646445ZM9 1.5H5.5V4C5.5 4.27614 5.27615 4.5 5 4.5H2.5V10C2.5 10.2761 2.72386 10.5 3 10.5H9C9.27615 10.5 9.5 10.2761 9.5 10V2C9.5 1.72386 9.27615 1.5 9 1.5ZM3.2071 3.5H4.5V2.2071L3.2071 3.5ZM3.5 6.5C3.5 6.22385 3.72386 6 4 6H8C8.27615 6 8.5 6.22385 8.5 6.5C8.5 6.77615 8.27615 7 8 7H4C3.72386 7 3.5 6.77615 3.5 6.5ZM3.5 8.5C3.5 8.22385 3.72386 8 4 8H8C8.27615 8 8.5 8.22385 8.5 8.5C8.5 8.77615 8.27615 9 8 9H4C3.72386 9 3.5 8.77615 3.5 8.5Z",fill:"currentColor"})),Be=r.forwardRef(Pe),Ee=c=>{const{allowedConfig:t,langData:e}=c,m=[{value:"All",name:e==null?void 0:e.all,allow:!0},{value:"SPORTS",name:e==null?void 0:e.sports,allow:(t&i.sports)!==0},{value:"SPORTS_BOOK",name:e==null?void 0:e.sports_book,allow:(t&i.sports)!==0},{value:"PREMIUM",name:e==null?void 0:e.premium,allow:!0},{value:"CASINO",name:e==null?void 0:e.casino,allow:(t&i.live_casino)!==0}],v=[{value:"All",name:e==null?void 0:e.all},{value:"Open",name:e==null?void 0:e.open},{value:"Settled",name:e==null?void 0:e.settled},{value:"Won",name:e==null?void 0:e.won},{value:"Lost",name:e==null?void 0:e.lost},{value:"Voided",name:e==null?void 0:e.void}],C=[{value:"All",name:"All",langKey:"all",allow:(t&i.sports)!==0}
1,{value:"4",name:"Cricket",langKey:"cricket",allow:(t&i.cricket)!==0},{value:"1",name:"Football",langKey:"football",allow:(t&i.football)!==0},{value:"2",name:"Tennis",langKey:"tennis",allow:(t&i.tennis)!==0},{value:"99990",name:"Binary",langKey:"binary",allow:(t&i.cricket)!==0},{value:"2378961",name:"Politics",langKey:"politics",allow:(t&i.cricket)!==0},{value:"99994",name:"Kabaddi",langKey:"kabaddi",allow:(t&i.cricket)!==0},{value:"other",name:"Other",langKey:"other",allow:(t&i.cricket)!==0}],h=[{label:"Event name",langKey:"event_name",param:"",widthInPercent:40},{label:"Winnings",langKey:"winnings",param:"",widthInPercent:20},{label:"Amount",langKey:"amount",param:"",widthInPercent:20},{label:"Odds",langKey:"odds",param:"",widthInPercent:20}],R=[{param:"",widthInPercent:40,cellRender:G},{param:"",widthInPercent:20,cellRender:$},{param:"",widthInPercent:20,cellRender:z},{param:"",widthInPercent:20,cellRender:U}],j=[{param:"",widthInPercent:40,cellRender:Z},{param:"",widthInPercent:60,cellRender:W}],S={selectedGame:"SPORTS",status:"Open",startDate:b().subtract(7,"d"),endDate:b(),pageToken:[],sport:"All"},[n,d]=r.useState(S),[x,T]=r.useState([]),[N,P]=r.useState(!0),[f,H]=r.useState(!0),L=25,g=je[ie()],[O,u]=r.useState(null);function G(l,a){return s.jsxs("div",{className:"mb-event-name-date",children:[s.jsx("div",{className:"b-700",children:a.eventName}),s.jsx("div",{className:"mb-bet-date",children:b(a.betPlacedTime).format("DD-MM-YY, h:mm:ss A")})]})}function $(l,a){return s.jsx("div",{className:a.payOutAmount>0?"profit-bet":a.payOutAmount<0?"loss-bet":"none-bet",children:a.outcomeResult==="Open"?"-":a.payOutAmount.toFixed(2)})}function z(l,a){return s.jsx("div",{className:"mb-amount-odd",children:a.stakeAmount})}function U(l,a){return s.jsx("div",{className:"mb-amount-odd",children:a.oddValue&&a.oddValue!==-1?a.marketType==="FANCY"||a.marketType==="BINARY"?Number(a.sessionRuns).toFixed(0):a.marketType==="BOOKMAKER"?K(a==null?void 0:a.marketName,a==null?void 0:a.oddType)?Number(a.oddValue).toFixed(2):Number(a.oddValue*100-100).toFixed(2):a.oddValue.toFixed(2):"-"})}function Z(l,a){var y;return s.jsxs("div",{children:[s.jsxs("div",{className:"display-flex",children:[s.jsx("div",{className:"b-500",children:"market:"})," ",s.jsx("div",{className:"b-400",children:a.marketName})]}),s.jsxs("div",{className:"display-flex",children:[s.jsx("div",{className:"b-500",children:"bet on:"}),s.jsxs("div",{className:"b-400",children:[a.marketType==="FANCY"?a.oddType==="ODD_EVEN"||(y=a.marketName)!=null&&y.includes("Odd Even Run Bhav")?a.marketName+" - "+(a.outcomeDesc||""):a.marketName+" @ "+Number(a.oddValue*100-100).toFixed(0):a.marketType==="BINARY"?a.outcomeDesc+" @ "+Number(a.sessionRuns).toFixed(0):a.outcomeDesc," ","- (",I(a==null?void 0:a.sportId),")"]})]})]})}function W(l,a){return s.jsxs("div",{children:[s.jsxs("div",{className:"display-flex",children:[s.jsxs("div",{className:"b-500",children:[e==null?void 0:e.results,":"]}),s.jsx("div",{className:"b-400",children:k(a.outcomeResult.toString())?k(a.outcomeResult.toString()):"Unsettled"})]}),s.jsxs("div",{className:"display-flex",children:[s.jsxs("div",{className:"b-500",children:[e==null?void 0:e.bet_type,":"]}),s.jsx("div",{className:"b-400 txt-bldin-mob",children:a.betType})]})]})}const Q=()=>{H(!f),d({...n,pageToken:[]}),u(null)},q=()=>{O&&d({...n,pageToken:[...n.pageToken,O]})},J=()=>{if(n.pageToken.length>0){let l=n.pageToken;l.pop(),d({...n,pageToken:[...l]})}u(null)},B=r.useCallback(async()=>{var l,a;P(!0);try{const y=await de.get("reports/v2/orders/:search",{headers:{Authorization:sessionStorage.getItem("jwt_token"),Accept:"application/json"},params:{reportType:"ORDER_LIST",categoryType:n.status==="unmatched"?"-":n.selectedGame==="All"?null:n.selectedGame,status:n.status==="unmatched"?"Unmatched":n.status==="All"?null:n.status,sportId:n.selectedGame==="SPORTS"?n.sport=="All"?null:n.sport:null,sortOrder:f?"DESC":"ASC",pageSize:L,pageToken:n.pageToken[n.pageToken.length-1],startDate:n.startDate.startOf("day").toISOString(),endDate:n.endDate.endOf("day").toISOString()}});let E=(l=y.data)==null?void 0:l.orders;for(const p of E)p.stakeAmount=p.stakeAmount/g,p.payOutAmount=p.payOutAmount/g,(p==null?void 0:p.betType)==="BACK"?p.rowClassName="mb-profit-amount":p.rowClassName="mb-loss-amount";T(E),u((a=y.data)==null?void 0:a.pageToken)}catch{T([]),u(null)}P(!1)},[n,g,f]);r.useEffect(()=>{B()},[B]);const X=l=>{d({...n,sport:l,pageToken:[]}),u(null)},D=l=>{d({...n,status:l.target.value,pageToken:[]}),u(null)},ee=l=>{d({...n,startDate:l,pageToken:[]}),u(null)},te=l=>{d({...n,endDate:l,pageToken:[]}),u(null)},se=l=>{let a=n.sport;l.target.value!=="SPORTS"&&(a=null),d({...n,selectedGame:l.target.value,sport:a,pageToken:[]}),u(null)};return s.jsxs("div",{className:"my-bets-page",children:[s.jsx(Ne,{back:e==null?void 0:e.back}),s.jsx(ve,{titleIcon:Be,reportName:e==null?void 0:e.my_bets,reportFilters:[{element:s.jsx(w,{label:e==null?void 0:e.bet_status,list:v,value:n.status,onChange:l=>D(l)})},{element:s.jsx(w,{label:e==null?void 0:e.select_games,list:m,value:n.selectedGame,onChange:se})},{element:s.jsx(F,{value:n.startDate,label:e==null?void 0:e.from,onChange:l=>
1ee(l),minDate:b().subtract(30,"days").calendar()})},{element:s.jsx(F,{value:n.endDate,label:e==null?void 0:e.to,onChange:l=>te(l),minDate:b().subtract(90,"days").calendar()})}]}),n.selectedGame==="SPORTS"?s.jsx(A,{children:s.jsx("div",{className:"sports-filters-row-ctn",children:s.jsx("div",{className:"ion-btns sports-filters-row",style:{overflow:"auto",scrollbarWidth:"none"},children:C.map(l=>l.allow&&s.jsx(fe,{variant:"outlined",className:n.sport===l.value?"primary":"secondary",onClick:()=>X(l.value),children:e==null?void 0:e[l.langKey]}))})})}):null,s.jsx(A,{children:s.jsx(me,{className:"mob-px-0 my-bets-ctn-col",children:s.jsx("div",{className:"reports-ctn my-bets-ctn",children:s.jsx("div",{className:"header-ctn",children:s.jsx("div",{className:"content-ctn light-bg my-bets-content",children:s.jsxs("div",{className:"myb-bets-div",children:[N?s.jsx(Te,{}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"tbl-ctn my-bets-tbl no-hov-style web-view",children:s.jsx(ke,{component:ue,children:s.jsxs(Ce,{className:"myb-table",children:[s.jsx(Re,{children:s.jsxs(Y,{children:[s.jsxs(o,{className:"th-date",children:[e==null?void 0:e.place_date,s.jsx(pe,{"aria-label":"Change Order",size:"medium",onClick:()=>Q(),children:f?s.jsx(V,{active:!0,direction:"desc"}):s.jsx(V,{active:!0,direction:"asc"})})]}),s.jsx(o,{align:"left",className:"th-match",children:e==null?void 0:e.event_name}),s.jsx(o,{align:"left",className:"th-market",children:e==null?void 0:e.market}),s.jsx(o,{align:"left",className:"th-bet-on",children:e==null?void 0:e.bet_on}),s.jsx(o,{align:"left",className:"th-bet-on",children:e==null?void 0:e.bet_type}),s.jsx(o,{align:"right",children:e==null?void 0:e.odds}),s.jsx(o,{align:"right",children:e==null?void 0:e.amount}),s.jsx(o,{align:"left",className:"th-outcome-cell mb-result",children:e==null?void 0:e.result}),s.jsx(o,{className:"th-returns",align:"right",children:e==null?void 0:e.winnings})]})}),x.length>0?s.jsx(Se,{className:"myb-table-body",children:x.map(l=>l.outcomeResult!="Abandoned"&&s.jsx(_e,{row:l},l.id))}):s.jsx(o,{className:"my-bets-no-data-row",colSpan:9,children:s.jsx("div",{className:"no-bets-msg",children:e==null?void 0:e.bet_not_found_txt})})]})})}),s.jsx(ye,{headerParams:h,bodyData:x,upperRow:R,lowerRow:j,noDataMessage:e==null?void 0:e.bet_not_found_txt,langData:e})]}),s.jsxs(A,{children:[n.pageToken.length>0&&!N&&s.jsxs(M,{className:"myb-btn-prev",onClick:l=>J(),children:["(",e==null?void 0:e.prev,")(",n.pageToken.length,")"]}),O&&!N?s.jsxs(M,{className:"myb-btn-next",onClick:l=>q(),children:["(",e==null?void 0:e.next,")(",n.pageToken.length+2,")"]}):null]})]})})})})})})]})};function _e(c){var e,m;const{row:t}=c;return s.jsxs(Y,{className:t.oddValue&&t.betType==="BACK"||t.eventName==="CASINO"?"myb-table-row back-odd-row":t.oddValue&&t.betType==="LAY"?"myb-table-row lay-odd-row":"myb-table-row",children:[s.jsx(o,{className:"td-date",component:"th",scope:"row",children:b(t.betPlacedTime).format("DD-MM-YY, h:mm:ss A")}),s.jsxs(o,{className:"myb-table-cell td-match second-cell",align:"left",children:[s.jsx("div",{className:"web-view",children:s.jsx("div",{className:"event-link",children:t.eventName})}),s.jsxs("div",{className:"mob-view",children:[s.jsx("div",{className:"game-label col-data-header mob-fs-13",children:t.eventName}),s.jsxs("div",{className:"market-label col-data-header",children:[" ",t.marketType==="FANCY"?t.oddType==="ODD_EVEN"||(e=t.marketName)!=null&&e.includes("Odd Even Run Bhav")?t.marketName+" - "+(t.outcomeDesc||""):t.marketName+" @ "+Number(t.oddValue*100-100).toFixed(0):t.marketType==="BINARY"?t.outcomeDesc+" @ "+Number(t.sessionRuns).toFixed(0):t.outcomeDesc]}),s.jsx("div",{className:"col-data-desc",children:b(t.betPlacedTime).format("DD-MM-YY, h:mm:ss A")}),s.jsxs("span",{className:"event-name",children:["(",I(t==null?void 0:t.sportId),")"]})]})]}),s.jsxs(o,{className:"myb-table-cell td-market",align:"left",children:[(t.marketType,t.marketName||be[t.marketType]),t.categoryType==="SPORTS_BOOK"?s.jsx(he,{class:"text-white bet-badge",children:"Sportsbook"}):null,s.jsxs("span",{className:"event-name",children:[" ","- ",I(t==null?void 0:t.sportId)]})]}),s.jsx(o,{className:"myb-table-cell td-bet-on",align:"left",children:t.marketType==="FANCY"?t.oddType==="ODD_EVEN"||(m=t.marketName)!=null&&m.includes("Odd Even Run Bhav")?t.marketName+" - "+(t.outcomeDesc||""):t.marketName+" @ "+Number(t.oddValue*100-100).toFixed(0):t.marketType==="BINARY"?t.outcomeDesc+" @ "+Number(t.sessionRuns).toFixed(0):t.outcomeDesc}),s.jsx(o,{className:"myb-table-cell td-bet-on",align:"left",children:xe(t.betType)}),s.jsx(o,{className:"myb-table-cell td-odd",align:"right",children:s.jsx("span",{className:"mob-fs-13",children:t.oddValue&&t.oddValue!==-1?t.marketType==="FANCY"||t.marketType==="BINARY"?Number(t.sessionRuns).toFixed(0):t.marketType==="BOOKMAKER"&&!K(t==null?void 0:t.marketName,t==null?void 0:t.oddType)?(t.oddValue*100-100).toFixed(2):t.oddValue.toFixed(2):"-"})}),s.jsx(o,{className:"myb-table-cell td-stake",align:"right",children:s.jsx("span",{className:"mob-fs-14",children:t.stakeAmount})}),s.jsx(o,{className:"myb-table-cell td-outcome",align:"left",children:k(t.outcomeResult.toString())?k(t.outcomeResult.toString()):"Unsettled"}),s.jsx(o,{className:t.payOutAmount>0?"myb-table-cell profit-bet":"myb-table-cell loss-bet",align:"right",children:s.jsx("span",{className:"mob-fs-14",children:t.outcomeResult==="Open"?"-":t.payOutAmount.toFixed(2)})})]})}const Me=c=>({allowedConfig:c.common.allowedConfig,langData:c.common.langData}),dt=ce(Me,null)(Ee);export{dt 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.