PageSourceSearch

https://www.bk8masd.com/assets/10.10.9/promotion.b6f1e8d3.1791468131499.js

js bk8masd.com collected 2026-10-10 01:08:14 UTC 24,018 bytes, 1 lines download raw bytes

1import{l as C,r as d,am as L,A as o,_ as O}from"./index.40d342e9.1791468131499.js";import{C as de}from"./ContentContainerMolecules.357db331.1791468131499.js";import{u as U,r as ue}from"./agentation.5bb278ab.1791468131499.js";import{m as D}from"./modal.action.ccb4b667.1791468131499.js";import{f as ee}from"./floatingNotification.action.ca05148f.1791468131499.js";import{T as Q,b as me,a as ge,P as fe,D as ye,B as Y}from"./PopupMolecules.e1fb1b71.1791468131499.js";import"./store.016afc78.1791468131499.js";import"./floatingNotification.constant.27687fe7.1791468131499.js";import"./dayjs.min.d5a1da16.1791468131499.js";import"./matchPredictionModules.59d916eb.1791468131499.js";import"./oddsFeedModules.090fa001.1791468131499.js";import"./promotionModules.50dc86d8.1791468131499.js";import"./index.d73faf44.1791468131499.js";import"./index.66ef353b.1791468131499.js";import"./warning.883c7a3c.1791468131499.js";import"./react-datepicker.min.de8ecdfc.1791468131499.js";import"./index.578a46aa.1791468131499.js";const v={NAME:{display:"Name",input:"name"},EMAIL:{display:"Email",input:"email"},PHONE:{display:"Phone",input:"phone"},CONTACT:{display:"Phone",input:"phone"},REMARK:{display:"Remark",input:"remark"},ADDRESS:{display:"Address",input:"address"},PROVIDER_WALLET:{display:"ProviderWallet",input:"providerWallet"},SCORE_PREDICTION:{display:"ScorePrediction",input:"scorePrediction"},SHIPPING_ADDRESS:{display:"ShippingAddress",input:"shippingAddress"},BET_TICKET_ID:{display:"BetTicketId",input:"betTicketId"},E_WALLET:{display:"EWallet",input:"eWallet"},IMAGE:{display:"ReceiptImage",input:"receiptImageFileToUpload"}},$=v;function he(e="",r=null){const c=new URLSearchParams(e).get("floatingNotificationId");if(!c)return r;const a=Number.parseInt(c,10);return Number.isNaN(a)?r:a}function Pe(e){return e?.phone?.substring(0,e?.country==="KH"?4:3)||""}async function Ie({account:e,languageCountry:r,supportedRegions:c=[]}){const a=new Promise(l=>{window.SPL_JsonSettings.getTelCodeSettings(l)}),[s,t,i]=await Promise.all([a,window.SPL_Content.getCountryInfo(),c.length?window.SPL_Register.getRegionSettingJson(c):Promise.resolve([])]),u=(i||[]).reduce((l,y)=>(l[y.countryCode]=y,l),{}),g=(t||[]).map(l=>{const y=u[l.country],h=String(y?.telCode||l.telCode||"").replace(/^\+/,"");return{...l,countryName:y?.name?.default||l.countryName||l.country,telCode:h?`+${h}`:"",telCodeFlag:y?.telCodeFlag||l.telCodeFlag||l.flagSrc||`/public/html/default_whitelabel/template/images/international-icon/${l.country?.toUpperCase()}.png`}}).filter(l=>l.telCode),I=e?.country||r,f=g.find(l=>l.country===I)||g[0]||null;return{telCodeSettings:s,telCodeOptions:g,selectedTelCode:f}}async function be(){return((await window.SPL_Provider.getAllProviderWalletList(null,!1))?.providerList||[]).filter(r=>r?.provider)}function Ee({promoApplyInput:e,field:r,value:c,acceptedFileTypes:a=[]}){if(r==="receiptImageFileToUpload"){const s=c?.type||"",t=c&&/^image\//.test(s)&&(!a.length||a.some(i=>s.includes(i)));return{promoApplyInput:{...e,[r]:t?c:null},errorKey:c&&!t?"transaction:transaction.deposit.receiptInvalid":null}}return{promoApplyInput:{...e,[r]:c},errorKey:null}}function Ae({formFields:e,account:r,providerWalletsList:c=[],disabledFields:a=[]}){const s=Object.values(v).reduce((i,{display:u})=>(i[`show${u}`]=!1,i),{}),t={};return e?(e.split(",").map(i=>i.trim()).filter(Boolean).forEach(i=>{const u=v[i];if(u)switch(s[`show${u.display}`]=!0,s[`disable${u.display}`]=a.includes(i),i){case"NAME":t.name=r?.name||"";break;case"EMAIL":t.email=r?.email||"";break;case"PHONE":case"CONTACT":{const g=r?.country==="KH"?4:3;t.phone=r?.phone?.substring(g)||"",t.telcode="";break}case"PROVIDER_WALLET":t.providerWallet=a.includes(i)&&c[0]?.name||"";break;case"IMAGE":t.receiptImagePath="",t.receiptImageFileToUpload=null;break;default:t[u.input]=""}}),{fieldsDisplay:s,promoApplyInput:t}):{fieldsDisplay:s,promoApplyInput:t}}function Se({fieldsDisplay:e={},promoApplyInput:r={},initialPromoApplyInput:c={}}){return Object.values(v).reduce((a,{display:s,input:t})=>e[`show${s}`]?e[`disable${s}`]||c[t]?(a[t]=c[t]||r[t],a):(a[t]=t==="receiptImageFileToUpload"?null:"",s==="ReceiptImage"&&(a.receiptImagePath=""),a):a,{})}function Ne({fieldsDisplay:e={},promoApplyInput:r={},acceptedFileTypes:c=[]}){return Object.values(v).filter(({display:s})=>e[`show${s}`]&&s!=="Remark").every(({display:s,input:t})=>{const i=r[t];if(s==="Phone")return!!(i&&/^\d+$/.test(i));if(s==="Email")return!!(i&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i));if(s==="ReceiptImage"){const u=i?.type||"";return!!(i&&/^image\//.test(u)&&(!c.length||c.some(g=>u.includes(g))))}return i!=null&&i!==""})}function Ce({promoApplyInput:e,account:r,promoContent:c,telCode:a="",floatingNotificationId:s}){const{name:t,phone:i,email:u,remark:g,address:I,providerWallet:f,scorePrediction:l,shippingAddress:y,betTicketId:h,eWallet:P,receiptImageFileToUpload:T}=e,b={providerWallet:f,scorePrediction:l,shippingAddress:y,betTicketId:h,eWallet:P};return Object.keys(b).forEach(E=>
1!b[E]&&delete b[E]),{createdDate:new Date,status:"P",memberId:r.id,promotionId:c.id,phone:a+(i||""),name:t,remark:g,address:I,email:u,language:c.language,optionalFieldsJson:JSON.stringify(b),floatingNotificationId:s,receiptImagePath:c.image,receiptImageFileToUpload:T}}function te(e){return e?.errorMsg==="Apply promotion content failed : promotion:promotion.exceeditLimit"?"promotion:promotion.exceeditLimit":e?.errorKey?`transaction:transaction.deposit.${e.errorKey}`:"global:error.internalServerError"}async function Te({promoContent:e,language:r,screenWidth:c=0}){let a=e.contactCSUrl;if(e.contactCSUrlType!=="N"&&(a=(await window.SPL_Content.getMerchantContentLiveChat({language:r}))?.data?.href),!a)return!1;if(e.isContactCSUrlNewPage)window.open(a);else{const s=Math.max(c-625,0);window.open(a,`${window.globMerchantName} 24/7 Live Chat - Pre-Chat Window`,`height=600, width=600, top=25, left=${s}`)}return!0}async function xe({promoContent:e,account:r,floatingNotificationId:c,onLoginRequired:a,onOpenForm:s,onApplyStart:t,onApplyEnd:i,onSuccess:u,onError:g,language:I,screenWidth:f}){if(!r)return a?.(),{action:"LOGIN_REQUIRED"};switch(e?.applyAction){case"FORM":return s?.(e),{action:"FORM"};case"DIRECT":{t?.(e);try{const l=await window.SPL_Member.applyPromotion({createdDate:new Date,status:"P",memberId:r.id,promotionId:e.id,phone:r.phone,name:r.name,remark:null,address:null,email:r.email,language:e.language,floatingNotificationId:c});return l?.success?u?.(l):g?.(te(l),l),{action:"DIRECT",result:l}}catch(l){return g?.("global:error.internalServerError",l),{action:"DIRECT",error:l}}finally{i?.(e)}}case"CONTACT_CS":try{return await Te({promoContent:e,language:I,screenWidth:f}),{action:"CONTACT_CS"}}catch(l){return g?.("global:error.internalServerError",l),{action:"CONTACT_CS",error:l}}default:return{action:e?.applyAction||"NONE"}}}async function Le(e){const r=await window.SPL_Member.applyPromotion(Ce(e));return{result:r,errorKey:r?.success?null:te(r)}}const _e={NAME:["global:global.form.fullname","Full Name"],PHONE:["global:global.form.phone","Telephone Number"],CONTACT:["global:global.form.contactNumber","Contact Number"],EMAIL:["global:global.form.email","Email Address"],ADDRESS:["global:global.form.address","Address"],REMARK:["global:global.form.remark","Remark"],PROVIDER_WALLET:["global:global.form.providerWallet","Provider Wallet"],SCORE_PREDICTION:["promotion:promotion.scorePrediction","Score Prediction"],SHIPPING_ADDRESS:["promotion:promotion.shippingAddress","Shipping Address"],BET_TICKET_ID:["promotion:promotion.betTicketId","Bet Ticket ID"],E_WALLET:["promotion:promotion.eWallet","E-Wallet"],IMAGE:["promotion:promotion.receiptImage","Receipt Image"]},Re={NAME:["global:global.form.fullname","Full Name"],PHONE:["global:global.form.contactNumber","Contact Number"],CONTACT:["global:global.form.contactNumber","Contact Number"],EMAIL:["global:global.form.email","Email Address"],ADDRESS:["global:global.form.address","Address"],REMARK:["global:global.form.remark","Remark"],PROVIDER_WALLET:["global:global.form.pleaseSelect4","Please Select"],SCORE_PREDICTION:["promotion:promotion.scorePrediction","Score Prediction"],SHIPPING_ADDRESS:["promotion:promotion.shippingAddress","Shipping Address"],BET_TICKET_ID:["promotion:promotion.betTicketId","Bet Ticket ID"],E_WALLET:["promotion:promotion.eWallet","E-Wallet"],IMAGE:["promotion:promotion.receiptImage","Upload receipt image"]},j=[],we=({accept:e,disabled:r,onChange:c,placeholder:a,resetKey:s,value:t})=>{const{t:i}=U("global"),[u,g]=d.useState(null),[I,f]=d.useState(t||""),l=e.length?e.map(h=>`.${h}`).join(","):"image/*,.pdf";d.useEffect(()=>{g(null),f(t||"")},[s,t]),d.useEffect(()=>()=>{I?.startsWith("blob:")&&URL.revokeObjectURL(I)},[I]);const y=h=>{const P=h.target.files?.[0]||null,T=P&&(!e.length||e.some(b=>P.type.includes(b)))&&/^image\//.test(P.type);g(T?P:null),f(T?URL.createObjectURL(P):""),c(P)};return o.jsxs("div",{className:"promotion-upload-image",children:[o.jsx("input",{className:"promotion-upload-image-input",type:"file",accept:l,disabled:r,onChange:y}),o.jsxs("div",{className:"upload-image-field d-flex standard-m-form-col-full standard-form-field",children:[I?o.jsx("div",{className:"promotion-upload-image-preview",children:o.jsx("img",{src:I,alt:u?.name||"receipt image"})}):o.jsx("input",{disabled:!0,readOnly:!0,className:"input-atoms-input form-control-inner promotion-upload-image-empty",type:"text",placeholder:a}),o.jsx("button",{type:"button",className:"standard-action-button",disabled:r,children:i("global.form.uploadImage","Upload Image")})]})]})},ve=({promoContent:e,providerWalletsList:r=j,floatingNotificationId:c,onClose:a})=>{const s=C.useDispatch(),{t}=U(["promotion","global","transaction"]),i=C.useSelector(n=>n?.user?.account),u=C.useSelector(n=>n.language),g=C.useSelector(n=>n.portal?.settings||n.portalSettingsReducer?.portalSettings),I=C.useSelector(n=>n.floatingNotification.storeNotificationId),f=g?.promotionDisabledField||j,l=g?.features?.promotionSettings?.uploadImageType||j,y=r.length?r:j,[h,P]=d.useState({}),[T,b]=d.useState({}),[E,M]=d.useState({}),[p,A]=d.useState(!1),[H,oe]=d.useState([]),[V,z]=d.useState(null),[W,G]=d.useState(y),[ne,ie]=d.useState(0),
1k=d.useMemo(()=>(e?.formFields||"").split(",").map(n=>n.trim()).filter(Boolean),[e?.formFields]);d.useEffect(()=>{if(!k.includes("PROVIDER_WALLET")||y.length){G(y);return}let n=!0;return be().then(m=>n&&G(m)).catch(()=>n&&L.showNotification("error",t("global:error.internalServerError"))),()=>{n=!1}},[y,k,t]),d.useEffect(()=>{const n=Ae({formFields:e?.formFields,account:i,providerWalletsList:y,disabledFields:f});P(n.promoApplyInput),b(n.promoApplyInput),M(n.fieldsDisplay)},[i,y,f,e?.formFields]),d.useEffect(()=>{const n=W[0]?.name;!n||!E.disableProviderWallet||(P(m=>m.providerWallet?m:{...m,providerWallet:n}),b(m=>m.providerWallet?m:{...m,providerWallet:n}))},[E.disableProviderWallet,W]),d.useEffect(()=>{const n=e?.formFields?.split(",")||[];if(!n.includes("PHONE")&&!n.includes("CONTACT"))return;const m=g?.registerConfiguration?.internationalFeature?.supportedRegion;Ie({account:i,languageCountry:u.country,supportedRegions:m?Object.keys(m):[]}).then(({telCodeOptions:S,selectedTelCode:N})=>{if(oe(S),z(N),N?.telCode&&i?.phone?.startsWith(N.telCode)){const R=i.phone.slice(N.telCode.length);P(w=>({...w,phone:R})),b(w=>({...w,phone:R}))}}).catch(()=>L.showNotification("error",t("global:error.internalServerError")))},[i,u.country,g?.registerConfiguration?.internationalFeature?.supportedRegion,e?.formFields,t]);const q=Ne({fieldsDisplay:E,promoApplyInput:h,acceptedFileTypes:l}),re=V?.telCode||Pe(i),F=(n,m)=>{const S=Ee({promoApplyInput:h,field:n,value:m,acceptedFileTypes:l});P(S.promoApplyInput),S.errorKey&&L.showNotification("error",t(S.errorKey))},le=k.filter((n,m,S)=>{const N=$[n]?.display;return N&&S.findIndex(R=>$[R]?.display===N)===m}).map(n=>{const m=$[n];if(!m||!E[`show${m.display}`])return null;const[S,N]=_e[n],[R,w]=Re[n],K=t(R,w),J={translation:S,default:N},_=E[`disable${m.display}`];return n==="PROVIDER_WALLET"?{type:"select",field:m.input,label:J,disabled:_,required:!0,placeholder:K,showPlaceholderOption:!0,dropdownList:W.map(x=>({value:x.name,display:x.name})),onChange:F}:n==="PHONE"||n==="CONTACT"?{type:"custom",field:m.input,render:()=>o.jsxs("div",{className:"input-text-field-atoms promotion-apply-field",children:[o.jsx("div",{className:"input-atoms-label",children:o.jsx(Q,{text:t(S,N),className:`text-atoms-light ${_?"input-atoms-label-disable-input":""}`,textSize:"md",type:"span",required:!0})}),o.jsxs("div",{className:"promotion-phone-field",children:[o.jsx(me,{data:{field:"country",disabled:_,showOptionImage:!0,dropdownList:H.map(x=>({value:x.country,display:x.telCode,image:x.telCodeFlag})),onChange:(x,ce)=>z(H.find(pe=>pe.country===ce)||null)},fields:{country:V?.country||""}}),o.jsx(ge,{data:{field:"phone",type:"text",disabled:_,placeholder:K},fields:h,hideLabel:!0,handleFieldChanged:F})]})]})}:n==="IMAGE"?{type:"custom",field:m.input,render:()=>o.jsxs("div",{className:"input-text-field-atoms promotion-apply-field",children:[o.jsx("div",{className:"input-atoms-label",children:o.jsx(Q,{text:t("global:global.form.uploadImage","Upload Image"),className:`text-atoms-light ${_?"input-atoms-label-disable-input":""}`,textSize:"md",type:"span",required:!0})}),o.jsx(we,{accept:l,disabled:_,value:h.receiptImagePath,placeholder:t("global:global.form.image","Image"),resetKey:ne,onChange:x=>F(m.input,x)})]})}:{type:n==="EMAIL"?"email":"text",field:m.input,label:J,disabled:_,required:n!=="REMARK",placeholder:K,onChange:F}}).filter(Boolean),ae=()=>{P(n=>Se({fieldsDisplay:E,promoApplyInput:n,initialPromoApplyInput:T})),ie(n=>n+1)},se=async()=>{if(!(!q||p||!i)){A(!0);try{const{result:n,errorKey:m}=await Le({promoApplyInput:h,account:i,promoContent:e,telCode:re,floatingNotificationId:c||I});n?.success?(L.showNotification("success",t("promotion:promotion.successMsg")),s(ee.storeFloatingNotificationId(null)),s(D.toggleModal("promotionApplyPopup",!1)),a?.()):L.showNotification("error",t(m))}catch{L.showNotification("error",t("global:error.internalServerError"))}finally{A(!1)}}};return o.jsx(fe,{className:"promotion-apply-popup-container",isOpen:"promotionApplyPopup",onClose:a,children:o.jsxs("div",{className:"promotion-apply-content",children:[o.jsx("div",{className:"popup-title",children:t("promotion:promotion.fillup","Please fill up the detail")}),o.jsx("div",{className:"promotion-title",children:e?.title}),o.jsx(ye,{data:le,fields:h}),o.jsxs("div",{className:"promotion-apply-actions",children:[o.jsx(Y,{buttonText:t("global:entity.action.clear","Clear"),className:"clear-button",disabledButton:p,onClick:ae}),o.jsx(Y,{buttonText:t("transaction:transaction.history.filter.submit","Submit"),className:"apply-button",disabledButton:!q||p,onClick:se})]})]})})};const X=d.lazy(()=>O(()=>import("./PopupMolecules.e1fb1b71.1791468131499.js").then(e=>e.f),["assets/10.10.9/PopupMolecules.e1fb1b71.1791468131499.js","assets/10.10.9/index.40d342e9.1791468131499.js","assets/10.10.9/index.66ef353b.1791468131499.js","assets/10.10.9/warning.883c7a3c.1791468131499.js","assets/10.10.9/modal.action.ccb4b667.1791468131499.js","assets/10.10.9/store.016afc78.1791468131499.js","assets/10.10.9/agentation.5bb278ab.1791468131499.js","assets/10.10.9/agentation.06ce37f5.1791468131499.css","assets/10.10.9/floatingNotification.constant.27687fe7.1791468131499.js","assets/10.10.9/dayjs.min.d5a1da16.1791468131499.js","assets/10.10.9/matchPredictionModules.59d916eb.1791468131499.js","assets/10.10.9/oddsFeedModules.090fa001.1791468131499.js","assets/10.10.9/promotionModules.50dc86d8.1791468131499.js","assets/10.10.9/index.d73faf44.1791468131499.js","assets/10.10.9/react-datepicker.min.de8ecdfc.1791468131499.js","assets/10.10.9/index.578a46aa.1791468131499.js","assets/10.10.9/PopupMolecules.a18ad1f6.1791468131499.css"])),B=d.lazy(()=>O(()=>import("./PopupMolecules.e1fb1b71.1791468131499.js").then(e=>e.d),["assets/10.10.9/PopupMolecules.e1fb1b71.1791468131499.js","assets/10.10.9/index.40d342e9.1791468131499.js","assets/10.10.9/index.66ef353b.1791468131499.js","assets/10.10.9/warning.883c7a3c.1791468131499.js","assets/10.10.9/modal.action.ccb4b667.1791468131499.js","assets/10.10.9/store.016afc78.1791468131499.js","assets/10.10.9/agentation.5bb278ab.1791468131499.js","assets/10.10.9/agentation.06ce37f5.1791468131499.css","assets/10.10.9/floatingNotification.constant.27687fe7.1791468131499.js","assets/10.10.9/dayjs.min.d5a1da16.1791468131499.js","assets/10.10.9/matchPredictionModules.59d916eb.1791468131499.js","assets/10.10.9/oddsFeedModules.090fa001.1791468131499.js","assets/10.10.9/promotionModules.50dc86d8.1791468131499.js","assets/10.10.9/index.d73faf44.1791468131499.js","assets/10.10.9/react-datepicker.min.de8ecdfc.1791468131499.js","assets/10.10.9/index.578a46aa.1791468131499.js","assets/10.10.9/PopupMolecules.a18ad1f6.1791468131499.css"])),Z=d.lazy(()=>O(()=>import("./PopupMolecules.e1fb1b71.1791468131499.js").then(e=>e.e),["assets/10.10.9/PopupMolecules.e1fb1b71.1791468131499.js","assets/10.10.9/index.40d342e9.1791468131499.js","assets/10.10.9/index.66ef353b.1791468131499.js","assets/10.10.9/warning.883c7a3c.1791468131499.js","assets/10.10.9/modal.action.ccb4b667.1791468131499.js","assets/10.10.9/store.016afc78.1791468131499.js","assets/10.10.9/agentation.5bb278ab.1791468131499.js","assets/10.10.9/agentation.06ce37f5.1791468131499.css","assets/10.10.9/floatingNotification.constant.27687fe7.1791468131499.js","assets/10.10.9/dayjs.min.d5a1da16.1791468131499.js","assets/10.10.9/matchPredictionModules.59d916eb.1791468131499.js","assets/10.10.9/oddsFeedModules.090fa001.1791468131499.js","assets/10.10.9/promotionModules.50dc86d8.1791468131499.js","assets/10.10.9/index.d73faf44.1791468131499.js","assets/10.10.9/react-datepicker.min.de8ecdfc.1791468131499.js","assets/10.10.9/index.578a46aa.1791468131499.js","assets/10.10.9/PopupMolecules.a18ad1f6.1791468131499.css"])),Oe=d.lazy(()=>O(()=>import("./PopupMolecules.e1fb1b71.1791468131499.js").then(e=>e.g),["assets/10.10.9/PopupMolecules.e1fb1b71.1791468131499.js","assets/10.10.9/index.40d342e9.1791468131499.js","assets/10.10.9/index.66ef353b.1791468131499.js","assets/10.10.9/warning.883c7a3c.1791468131499.js","assets/10.10.9/modal.action.ccb4b667.1791468131499.js","assets/10.10.9/store.016afc78.1791468131499.js","assets/10.10.9/agentation.5bb278ab.1791468131499.js","assets/10.10.9/agentation.06ce37f5.1791468131499.css","assets/10.10.9/floatingNotification.constant.27687fe7.1791468131499.js","assets/10.10.9/dayjs.min.d5a1da16.1791468131499.js","assets/10.10.9/matchPredictionModules.59d916eb.1791468131499.js","assets/10.10.9/oddsFeedModules.090fa001.1791468131499.js","assets/10.10.9/promotionModules.50dc86d8.1791468131499.js","assets/10.10.9/index.d73faf44.1791468131499.js","assets/10.10.9/react-datepicker.min.de8ecdfc.1791468131499.js","assets/10.10.9/index.578a46aa.1791468131499.js","assets/10.10.9/PopupMolecules.a18ad1f6.1791468131499.css"])),Fe=d.lazy(()=>O(()=>import("./wy789-route.2607ab04.1791468131499.js").then(e=>e.a),["assets/10.10.9/wy789-route.2607ab04.1791468131499.js","assets/10.10.9/index.40d342e9.1791468131499.js","assets/10.10.9/agentation.5bb278ab.1791468131499.js","assets/10.10.9/agentation.06ce37f5.1791468131499.css","assets/10.10.9/PopupMolecules.e1fb1b71.1791468131499.js","assets/10.10.9/index.66ef353b.1791468131499.js","assets/10.10.9/warning.883c7a3c.1791468131499.js","assets/10.10.9/modal.action.ccb4b667.1791468131499.js","assets/10.10.9/store.016afc78.1791468131499.js","assets/10.10.9/floatingNotification.constant.27687fe7.1791468131499.js","assets/10.10.9/dayjs.min.d5a1da16.1791468131499.js","assets/10.10.9/matchPredictionModules.59d916eb.1791468131499.js","assets/10.10.9/oddsFeedModules.090fa001.1791468131499.js","assets/10.10.9/promotionModules.50dc86d8.1791468131499.js","assets/10.10.9/index.d73faf44.1791468131499.js","assets/10.10.9/react-datepicker.min.de8ecdfc.1791468131499.js","assets/10.10.9/index.578a46aa.1791468131499.js","assets/10.10.9/PopupMolecules.a18ad1f6.1791468131499.css","assets/10.10.9/user-hook.9d5c3e5e.1791468131499.js","assets/10.10.9/password-hook.c7d33920.1791468131499.js","assets/10.10.9/register-hook.5e8a1040.1791468131499.js","assets/10.10.9/register-util.ac3b0e50.1791468131499.js","assets/10.10.9/phone-based-placeholder-email.e43e970f.1791468131499.js","assets/10.10.9/login-hook.9a0fc897.1791468131499.js","assets/10.10.9/general.71fff540.1791468131499.js","assets/10.10.9/selector.4b536653.1791468131499.js","assets/10.10.9/index-layout-1.a7428a20.1791468131499.js","assets/10.10.9/useDataTheme.97ff1686.1791468131499.js","assets/10.10.9/loading.selector.a4ca4cc7.1791468131499.js","assets/10.10.9/LoadingTopBar.ccaf02f9.1791468131499.js","assets/10.10.9/pwa-hook.9c0ec4dd.1791468131499.js","assets/10.10.9/fingerprint.2c49e62e.1791468131499.js","assets/10.10.9/tslib.es6.cad35048.1791468131499.js","assets/10.10.9/routerChangeHandler.df8276b1.1791468131499.js","assets/10.10.9/withTranslation.a6818040.1791468131499.js","assets/10.10.9/route.action.431afe58.1791468131499.js","assets/10.10.9/wy789-route.9e069efa.1791468131499.css"])),je=()=>{const e=C.useDispatch(),r=ue.useHistory(),c=C.useSelector(p=>p?.user?.account),a=C.useSelector(p=>p.language),s=C.useSelector(p=>p.screen),t=C.useSelector(p=>p.floatingNotification.storeNotificationId),i=he(r.location.search,t),{t:u}=U("promotion"),[g,I]=d.useState([]),[f,l]=d.useState(),[y,h]=d.useState(null),[P,T]=d.useState(null),[b,E]=d.use
1State(null),M=p=>{xe({promoContent:p,account:c,floatingNotificationId:i,onLoginRequired:()=>e(D.toggleModal("loginPopup")),onOpenForm:A=>{T(A),e(D.toggleModal("promotionApplyPopup",!0))},onApplyStart:A=>E(A.id),onApplyEnd:()=>E(null),onSuccess:()=>{L.showNotification("success",u("promotion:promotion.successMsg")),e(ee.storeFloatingNotificationId(null))},onError:A=>L.showNotification("error",u(A)),language:a.countryLanguageKey,screenWidth:s.width})};return d.useEffect(()=>{let p=!0;return window.SPL_Content.getPromotionContent(a.countryLanguageKey,"SHOW_ALL",s.viewType).then(A=>{p&&I(A?.allPromotionContents||[])}).catch(()=>p&&L.showNotification("error",u("global:error.internalServerError"))),()=>{p=!1}},[a.countryLanguageKey,s.viewType,u]),d.useEffect(()=>{if(!f){h(null);return}f.content?.endsWith?.(".txt")?window.SPL_JsonSettings.getTextFile(f.content,p=>{h(p?.data||"")}):h(f.content||"")},[f]),o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"promotion-wrapper",children:g.map(p=>o.jsxs("div",{className:"promotion-content-container",children:[o.jsx(X,{src:p.image,alt:p.title,className:"promotion-img",width:"100%",aspectRatio:"1/1"}),o.jsx(B,{text:p.title,className:"text-atoms-light promotion-title",textSize:"md"}),o.jsxs("div",{className:"promotion-button-container",children:[o.jsx(Z,{buttonText:u("promotion:promotion.button3"),className:"info-button",onClick:()=>{e(D.toggleModal("promotionPopup",!0)),l(p)}}),p?.isAllowApply&&p?.applyAction!=="DEPOSIT"&&o.jsx(Z,{buttonText:u("promotion:promotion.apply2"),className:"apply-button",disabledButton:b===p.id,onClick:()=>M(p)})]})]},p.id))}),f&&o.jsx(Oe,{className:"promotion-popup-modal-container",isOpen:"promotionPopup",onClose:()=>l(null),children:o.jsxs("div",{className:"promotion-popup-content-container",children:[o.jsx(X,{src:f.image,alt:f.title,className:"image-full-width",width:"100%",aspectRatio:"1/1"}),o.jsx(B,{text:f.title,className:"text-atoms-light promotion-popup-title",textSize:"md"}),o.jsx("div",{className:"promotion-popup-description-container",children:o.jsx(B,{text:f.description,className:"text-atoms-light",textSize:"md"})}),o.jsx("div",{className:"promotion-popup-description-content",dangerouslySetInnerHTML:{__html:y}}),o.jsx(Fe,{})]})}),P&&o.jsx(ve,{promoContent:P,floatingNotificationId:i,onClose:()=>T(null)})]})},Ze=()=>o.jsx("div",{children:o.jsx(de,{title:"wy7Template:promoTitle",type:"title",children:o.jsx(je,{})})});export{Ze 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.