1import{aS as Y,co as d,aC as Z,dM as V,aB as t,aE as f,d5 as _,aD as S,dQ as I,X as Q,dl as X,F as M,aO as w,df as s,bL as D,dN as E,dF as q,cD as J,b$ as P,cA as c,d4 as K,a6 as R,dz as B,dj as ee,ck as te,b6 as ae,dG as ne,aM as T,cf as se,av as A,cS as oe,cC as le,dr as re}from"./DOICQ4TL.js";import{_ as ie}from"./Cb852c-1.js";import{f as N}from"./Dek4LeFv.js";import{C as ue}from"./BgKsWBCj.js";import{g as ce}from"./Ca1Qgji0.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"1ed18b9e74a58c088aab0939d101d811254b9248"};var i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="cd8ef15b-971d-4b70-bcd0-57ff42a30528",o._sentryDebugIdIdentifier="sentry-dbid-cd8ef15b-971d-4b70-bcd0-57ff42a30528")}catch{}})();const de={class:"p-4"},me={key:0},fe={class:"mt-2"},pe={class:"flex items-center justify-between mt-8"},ve=Y({__name:"PauseAccountConfirmation",props:{show:{type:Boolean},close:{type:Function},until:{}},emits:["confirm","cancel"],setup(o,{emit:i}){const n=i;function p(){n("cancel")}function x(){n("confirm")}return($,l)=>{const m=Q;return d(),Z(m,{show:o.show,close:o.close,title:"Pause your account"},{default:V(()=>[t("div",de,[o.until?(d(),f("div",me,[l[0]||(l[0]=t("p",{class:"font-semibold"}," You are about to pause your account. ",-1)),t("p",fe," You'll still be able to log in and view your account, but you won't be able to enter or make payments until "+_(o.until.format("MMMM Do, YYYY"))+". ",1)])):S("",!0),t("footer",pe,[t("button",{class:"btn btn-secondary",onClick:I(p,["prevent"])}," Cancel "),t("button",{class:"btn btn-primary",onClick:I(x,["prevent"])}," Confirm account pause ")])])]),_:1},8,["show","close"])}}}),be=["value"],_e=Y({__name:"PauseAccountForm",setup(o){const i=X(),n=c(0),p=c(!1),x=[{label:"Select a time period",value:0},{label:"1 days",value:1},{label:"7 days",value:7},{label:"4 weeks",value:28},{label:"12 weeks",value:84},{label:"1 year",value:365}],$=async()=>{n.value>0&&(await K(i.user,D().add(n.value,"days").toDate()),await i.getMe(!0),m())},l=()=>{p.value=!0},m=()=>{p.value=!1};return(g,r)=>(d(),f(M,null,[w(ve,{show:s(p),close:m,until:s(D)().add(s(n),"days"),onCancel:m,onConfirm:$},null,8,["show","until"]),E(t("select",{"onUpdate:modelValue":r[0]||(r[0]=u=>P(n)?n.value=u:null),class:"bg-surface rounded-lg border w-full py-2 px-4"},[(d(),f(M,null,J(x,(u,C)=>t("option",{key:C,value:u.value},_(u.label),9,be)),64))],512),[[q,s(n)]]),t("button",{class:"btn btn-primary w-full",onClick:r[1]||(r[1]=u=>l())}," Pause my account ")],64))}}),ge={class:"ref-account-take-a-break ref-panel p-7 rounded-2xl bg-surface text-surface-on space-y-8"},ye=Y({__name:"TakeABreak",setup(o){return(i,n)=>(d(),f("div",ge,[n[0]||(n[0]=t("h1",{class:"font-bold text-xl"}," Take a break ",-1)),n[1]||(n[1]=t("p",{class:"text-sm leading-5"}," If you feel the need to take a short break from playing please choose from below. This will prevent you from being able to make payments for the duration selected. ",-1)),w(_e)]))}}),we={},he={width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe(o,i){return d(),f("svg",he,[...i[0]||(i[0]=[t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.5 24C19.1274 24 24.5 18.6274 24.5 12C24.5 5.37258 19.1274 0 12.5 0C5.87258 0 0.5 5.37258 0.5 12C0.5 18.6274 5.87258 24 12.5 24ZM13.6002 7.36361C13.2487 7.01213 12.6789 7.01213 12.3274 7.3636C11.976 7.71507 11.976 8.28492 12.3274 8.63639L14.791 11.1H7.89716C7.4001 11.1 6.99716 11.5029 6.99716 12C6.99716 12.4971 7.4001 12.9 7.89716 12.9H14.791L12.3274 15.3636C11.976 15.7151 11.976 16.2849 12.3274 16.6364C12.6789 16.9879 13.2487 16.9879 13.6002 16.6364L17.6002 12.6364C17.9517 12.2849 17.9517 11.7151 17.6002 11.3636L13.6002 7.36361Z",fill:"currentColor"},null,-1)])])}const Ce=R(we,[["render",xe]]),ke={class:"lg:col-span-2"},Ae={class:"space-y-6"},De={class:"relative w-full"},Ye={class:"space-y-6"},$e=["disabled"],Le={key:0,class:"lg:col-span-2"},Se={class:"flex justify-between mb-1"},Me={class:"font-medium"},Ie={class:"text-sm font-medium"},Be={class:"bg-surface-on-200 rounded-full h-2.5"},Te={key:0,class:"mt-6 flex items-start gap-3 rounded-2xl border border-surface-on-200 bg-surface-on-50 p-4 text-base-on-700"},Ne={class:"text-sm"},Ve={key:1,class:"lg:col-span-2 mt-6"},Ee=Y({__name:"SpendLimit",setup(o){B();const n=B().getBusiness.value,p=ce(n.raffle_label),x=A(()=>p?.firstCaps?`${p.small}s`:"raffles"),{maxSpendLimit:$}=ee(),l=c(null),m=c(0),g=c(0),r=c(),u=c("success"),C=c(null),h=c(),k=c(!1),L=c(!1),F=A(()=>g.value>0?!0:L.value&&k.value),j=A(()=>L.value&&!g.value&&k.value),H=A(()=>j.value?"Remove Limit":"Set Limit"),z=A(()=>!l.value||!m.value?0:m.value*100/(l.value*100));function v(e){return D(e).format("MMMM Do YYYY [at] h:mma")}function G(e){const{data:a,target:b}=e;if(!a)return;if(!a.match(/^[0-9]$/)){e.preventDefault();return}const{value:y}=b;if(parseInt(y+a,10)>$){e.preventDefault();return}}function O(e){const{target:a}=e,{value:b}=a;L.value=!0,g.value=b===""?0:parseInt(b,10)*100||0}async function U(){if(!g.value)return W();try{const{data:e}=await oe(g.value);l.value=e.amount/100,k.value=!0,C.value=e.nextIncreaseAllowedAt??null,u.value="success";const a=D(e.startDate).format("YYYY-MM-DD"),b=D().format("YYYY-MM-DD");a!==b?r.value=`New limit successfully saved. The new limit will start on ${v(e.pendingStartDate??e.startDate)}.`:e.nextIncreaseAllowedAt?r.value=`New limit successfully saved. You can increase your limit again on ${v(e.nextIncreaseAllowedAt)}.`:r.value="New limit successfully saved."}catch(e){u.value="error";
1const a=e?.data?.data?.nextIncreaseAllowedAt;r.value=a?`You can increase your spend limit again on ${v(a)}.`:e?.data?.message??"You are unable to increase your spend limit right now. Please try again later."}}async function W(){try{const{data:e}=await le();u.value="success",e?.removalDate?r.value=`Your spend limit will be removed on ${v(e.removalDate)}.`:(l.value=null,k.value=!1,C.value=null,h.value=void 0,r.value="Your spend limit has been removed."),g.value=0,L.value=!1}catch(e){u.value="error";const a=e?.data?.data?.nextIncreaseAllowedAt;r.value=a?`You can change your spend limit again on ${v(a)}.`:e?.data?.message??"You are unable to remove your spend limit right now. Please try again later."}}return te(async()=>{const{data:e}=await ae();m.value=e.currentSpending,e.amount&&(l.value=e.amount/100,k.value=!0),C.value=e.nextIncreaseAllowedAt??null,e.removalDate?h.value=`Your spend limit is scheduled to be removed on ${v(e.removalDate)}.`:e.pendingStartDate&&e.pendingAmount?h.value=`Your new limit of ${N(e.pendingAmount)} will start on ${v(e.pendingStartDate)}.`:e.canIncrease===!1&&e.nextIncreaseAllowedAt&&(h.value=`You can increase your limit again on ${v(e.nextIncreaseAllowedAt)}.`)}),(e,a)=>{const b=ie;return d(),f(M,null,[t("p",ke," Below you can set a monthly limit, eg £50. When the limit is reached, you will be unable to enter any "+_(s(x))+". To remove your limit, clear the field (or set it to £0) and save. ",1),t("div",Ae,[t("div",De,[a[3]||(a[3]=t("span",{class:"absolute left-0 top-1/2 transform -translate-y-1/2 pl-4"},"£",-1)),E(t("input",{"onUpdate:modelValue":a[0]||(a[0]=y=>P(l)?l.value=y:null),type:"number",max:"10000",class:"pl-8 pr-8 py-3 bg-surface border-2 border-surface-on-200 rounded-3xl w-full [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",placeholder:"No limit set",onBeforeinput:a[1]||(a[1]=y=>G(y)),onInput:a[2]||(a[2]=y=>O(y))},null,544),[[ne,s(l)]]),a[4]||(a[4]=t("span",{class:"absolute right-0 top-1/2 transform -translate-y-1/2 pr-4"},"per month",-1))])]),t("div",Ye,[t("button",{id:"set-limit-button",class:"btn btn-primary w-full",disabled:!s(F),onClick:U},[T(_(s(H))+" ",1),w(Ce)],8,$e)]),s(l)?(d(),f("div",Le,[t("div",Se,[t("span",Me,_(s(N)(s(m)))+" spent this month",1),t("span",Ie,"£"+_(s(l))+" limit",1)]),t("div",Be,[t("div",{class:"bg-blue-600 h-2.5 rounded-full",style:se({width:s(z)+"%",maxWidth:"100%"})},null,4)]),s(h)?(d(),f("div",Te,[w(ue,{class:"w-5 h-5 shrink-0 mt-0.5 text-base-on-500"}),t("span",Ne,_(s(h)),1)])):S("",!0)])):S("",!0),s(r)?(d(),f("div",Ve,[w(b,{background:!0,type:s(u)},{default:V(()=>[T(_(s(r)),1)]),_:1},8,["type"])])):S("",!0)],64)}}}),Pe=R(Ee,[["__scopeId","data-v-cec317fd"]]),Re={class:"m-4 space-y-12"},Fe={class:"ref-account-spend-limit ref-panel grid grid-cols-1 lg:grid-cols-2 gap-6 bg-surface text-surface-on rounded-2xl p-7"},We=Y({__name:"limit-spending",setup(o){return re({title:"Spend Limits"}),(i,n)=>(d(),f("div",Re,[t("div",Fe,[n[0]||(n[0]=t("h1",{class:"font-bold text-xl lg:col-span-2"}," Responsible Gaming ",-1)),w(Pe)]),w(ye)]))}});export{We 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.