1import{_ as Vs}from"./RZai_LEc.js";import{_ as Es}from"./DT5V_LGE.js";import{_ as Ts}from"./CYDxO6xh.js";import{e as Xs,u as $s,g as Is,v as zs,x as Ks,p as Ps,h as Ws,m as Fs,z as ps,w as qs,r as u,o as n,i as o,j as v,a as s,c as a,F as $,t as i,d,b as g,q as ms,n as z,E as K,J as Hs,D as Us,H as Ys,I as Gs,l as r,s as Js}from"./xtLeD7bE.js";import"./BwlEN8ii.js";const Zs={class:"ws"},Qs={key:0,class:"ws-card ws-denied"},se={key:0,class:"ws-card ws-done"},ee={class:"ws-done-s"},oe={class:"ws-done-rows"},te={class:"ws-done-row"},ne={class:"v"},ae=["src"],le={class:"ws-done-row"},ie={class:"v mono"},re={class:"ws-done-row"},de={class:"v mono"},ue={class:"ws-done-row"},ce={class:"v mono"},ve={key:0,class:"ws-done-row"},we={class:"ws-done-bal"},pe={class:"mono"},me={key:1,class:"ws-grid"},he={class:"ws-left"},ke={class:"ws-card"},fe={class:"ws-seg",role:"tablist"},ge=["aria-selected","onClick"],ye=["src"],be={class:"ws-seg-sub"},_e={key:0,class:"ws-card ws-unavail"},xe={style:{"min-width":"0"}},Me={class:"ws-unavail-t"},Ce={class:"ws-card",style:{overflow:"visible"}},Ne=["aria-expanded"],Se={key:0,class:"ws-dd-line"},Be={key:0,class:"ws-dd-name"},Re={key:1,class:"ws-dd-dot"},je={class:"ws-dd-num mono"},Le={key:1,class:"ws-dd-line"},Ae={key:2,class:"ws-dd-ph"},De={key:0,class:"ws-dd-panel",role:"listbox"},Oe={key:0,class:"ws-dd-empty"},Ve={key:1,class:"ws-dd-empty"},Ee=["onClick"],Te={class:"ws-dd-line"},Xe={key:0,class:"ws-dd-name"},$e={key:1,class:"ws-dd-dot"},Ie={class:"ws-dd-num mono"},ze={key:0,class:"ws-dd-check",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.6","stroke-linecap":"round","stroke-linejoin":"round"},Ke=["aria-label","onClick","onKeydown"],Pe={key:0,class:"ws-other"},We={class:"ws-infield"},Fe=["value"],qe={key:0,class:"ws-hint err"},He={class:"ws-card"},Ue={class:"ws-infield"},Ye={class:"ws-inpre"},Ge=["value"],Je={key:0,class:"ws-hint err"},Ze={class:"mono ws-hint-amt"},Qe={key:1,class:"ws-hint err"},so={class:"mono ws-hint-amt"},eo={key:2,class:"ws-math"},oo={class:"mono strong"},to={class:"ws-rateline"},no={width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round",style:{flex:"none"}},ao={class:"ws-sum"},lo={class:"ws-sum-body"},io={class:"ws-sum-row"},ro={class:"v"},uo=["src"],co={class:"ws-sum-row"},vo={class:"v mono"},wo={class:"ws-sum-row"},po={class:"v mono"},mo={class:"ws-sum-row"},ho={class:"v mono"},ko={class:"ws-sum-row"},fo={class:"k"},go={class:"v mono"},yo={class:"ws-sum-total"},bo={class:"mono"},_o=["disabled"],xo={class:"mono"},Mo={class:"ws-sum-bal"},Co={class:"ws-modal",role:"dialog","aria-modal":"true","aria-label":"Add number"},No={class:"ws-modal-form",style:{"margin-top":"16px"}},So={class:"ws-field"},Bo={class:"ws-infield"},Ro=["value"],jo={key:0,class:"ws-hint err",style:{"margin-top":"8px"}},Lo={class:"ws-field"},Ao={class:"ws-infield"},Do=["disabled"],Io=Xs({__name:"wholesale",setup(Oo){$s({title:"Wholesale â Faseyha Recharge"});const L=Is(),y=zs(),hs=r(()=>y.user?.kyc_status==="approved"),b=Ks(),c=u("dhiraagu"),ks=[{key:"dhiraagu",label:"Dhiraagu",sub:"Reload",mark:"/brand/ds-logo-dhiraagu-mark.svg"},{key:"ooredoo",label:"Ooredoo",sub:"Raastas",mark:"/brand/ds-logo-ooredoo-mark.svg"}],Z=r(()=>c.value==="ooredoo"?"Ooredoo":"Dhiraagu"),fs=r(()=>c.value==="ooredoo"?"/brand/ds-logo-ooredoo-mark.svg":"/brand/ds-logo-dhiraagu-mark.svg"),Q=u(null),P=u(!0),_=r(()=>Q.value?.[c.value]||{rate:.95,min_pay:c.value==="ooredoo"?500:510,min_face:510,max_face:5e5,gst_multiplier:1.08,stock_on:!0}),ss=r(()=>Number(_.value.rate)||.95),W=r(()=>Number(_.value.gst_multiplier)||1.08),gs=r(()=>Math.round((W.value-1)*1e3)/10),es=r(()=>_.value.stock_on!==!1),ys=r(()=>_.value.whole_mvr===!0||c.value==="ooredoo");async function bs(){P.value=!0;try{const t=await L.get("/wholesale/config");t?.data?.config&&(Q.value=t.data.config)}catch{}finally{P.value=!1}}const S=u({}),F=u(!1),A=r(()=>S.value[c.value]||[]);async function q(t=c.value){F.value=!0;try{const e=await L.get("/wholesale/numbers",{carrier:t});S.value={...S.value,[t]:e?.data?.numbers||[]}}catch{}finally{F.value=!1}}
1const w=u(!1),H=u(null),p=u(null),m=u(null),B=u(""),U=u(!1),I=r(()=>p.value==="saved"?m.value?.number||"":p.value==="other"?B.value:""),os=r(()=>/^\d{7}$/.test(I.value)),_s=r(()=>p.value==="other"&&!U.value&&B.value.length>0&&!/^\d{7}$/.test(B.value)),D=r(()=>p.value==="saved"&&m.value?m.value:null);function xs(){w.value=!w.value}function Ms(t){m.value=t,p.value="saved",w.value=!1}function Cs(){p.value="other",m.value=null,w.value=!1,Js(()=>ts.value?.focus())}const ts=u(null);function Ns(t){B.value=t.target.value.replace(/\D/g,"").slice(0,7)}function ns(t){w.value&&H.value&&!H.value.contains(t.target)&&(w.value=!1)}function as(t){t.key==="Escape"&&(w.value=!1,M.value||(O.value=!1))}async function ls(t,e){e.stopPropagation();try{await L.del(`/wholesale/numbers/${t.id}`),S.value={...S.value,[c.value]:A.value.filter(N=>N.id!==t.id)},m.value?.id===t.id&&(m.value=null,p.value=null),b.success("Number removed")}catch(N){b.error(N?.data?.message||"Could not remove the number")}}const O=u(!1),R=u(""),V=u(""),M=u(!1),Y=u(!1),is=r(()=>/^\d{7}$/.test(R.value));function Ss(){R.value=p.value==="other"?B.value:"",V.value="",Y.value=!1,O.value=!0,w.value=!1}function rs(){M.value||(O.value=!1)}function Bs(t){R.value=t.target.value.replace(/\D/g,"").slice(0,7)}async function G(){if(Y.value=!0,!(!is.value||M.value)){M.value=!0;try{const t=await L.post("/wholesale/numbers",{carrier:c.value,number:R.value,name:V.value.trim()});if(t?.status===!0){b.success("Number saved"),await q();const e=A.value.find(N=>N.number===R.value);e&&(m.value=e,p.value="saved"),O.value=!1}else b.error(t?.message||"Could not save the number")}catch(t){b.error(t?.data?.message||"Could not save the number")}finally{M.value=!1}}}const x=u("");function Rs(t){t=t.replace(/[^\d.]/g,"");const e=t.indexOf(".");
1return e!==-1&&(t=t.slice(0,e+1)+t.slice(e+1).replace(/\./g,"").slice(0,2)),t.slice(0,9)}function js(t){x.value=Rs(t.target.value)}const C=r(()=>{const t=Number(x.value)||0;if(t<=0)return 0;const e=t/(ss.value*W.value);return ys.value?Math.floor(Math.round(e*100)/100):Math.round(e*100)/100}),E=r(()=>C.value<=0?0:Math.round((Number(x.value)||0)*100)/100),Ls=r(()=>Math.round((E.value-Math.round(E.value/W.value*100)/100)*100)/100),ds=r(()=>Number(_.value.min_pay??_.value.min_face)),us=r(()=>(Number(x.value)||0)>0&&(Number(x.value)||0)<ds.value),cs=r(()=>C.value>Number(_.value.max_face)),j=r(()=>C.value>0&&!us.value&&!cs.value),J=r(()=>es.value&&os.value&&j.value&&!T.value),k=t=>(Number(t)||0).toLocaleString("en-US",{maximumFractionDigits:2}),vs=r(()=>{const t=Math.round((1-ss.value)*1e4)/100;return(t%1===0?t.toFixed(0):String(t))+"%"}),T=u(!1),h=u(null);async function ws(){if(J.value){T.value=!0;try{const t=await L.post("/recharge/wholesale",{carrier:c.value,number:I.value,amount:String(C.value),pay:String(Math.round((Number(x.value)||0)*100)/100)});t?.status===!0?(h.value={code:String(t?.data?.code||""),message:String(t?.message||""),number:I.value,face:C.value,charge:E.value,carrier:c.value},await y.refreshAccount()):b.error(t?.message||"Request failed")}catch(t){b.error(t?.data?.message||"Request failed")}finally{T.value=!1}}}function As(){h.value=null,x.value=""}function Ds(t){navigator.clipboard?.writeText(String(t||"")),b.success("Copied")}return Ps(c,t=>{m.value&&m.value.carrier!==t&&(m.value=null,p.value==="saved"&&(p.value=null)),w.value=!1,S.value[t]||q(t)}),Ws(async()=>{document.addEventListener("click",ns),document.addEventListener("keydown",as),y.user||await y.fetchMe(),y.isSeller&&(bs(),q())}),Fs(()=>{document.removeEventListener("click",ns),document.removeEventListener("keydown",as)}),(t,e)=>{const N=Vs,f=Es,Os=Ts;return n(),ps(Os,{active:"wholesale",eyebrow:"BUSINESS",heading:"Wholesale"},{default:qs(()=>[o(hs)?v("",!0):(n(),ps(N,{key:0})),s("div",Zs,[o(y).loaded&&!o(y).isSeller?(n(),a("div",Qs,[...e[5]||(e[5]=[s("span",{class:"ws-denied-ic"},[s("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("rect",{x:"3",y:"11",width:"18",height:"10",rx:"2"}),s("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})])],-1),s("div",{class:"ws-denied-t"},"Wholesale access is not enabled for your account.",-1),s("div",{class:"ws-denied-s"},"Wholesale reloads are available to approved resellers only. Contact us if you'd like to become one.",-1)])])):o(y).isSeller?(n(),a($,{key:1},[o(h)?(n(),a("div",se,[e[14]||(e[14]=s("span",{class:"ws-done-ic"},[s("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("circle",{cx:"12",cy:"12",r:"10"}),s("polyline",{points:"12 6 12 12 16 14"})])],-1)),e[15]||(e[15]=s("div",{class:"ws-done-t"},"Processing â usually under a minute",-1)),s("div",ee,i(o(h).message||"Your wholesale reload has been queued and will be delivered shortly."),1),s("div",oe,[s("div",te,[e[6]||(e[6]=s("span",{class:"k"},"Carrier",-1)),s("span",ne,[s("img",{src:o(h).carrier==="ooredoo"?"/brand/ds-logo-ooredoo-mark.svg":"/brand/ds-logo-dhiraagu-mark.svg",alt:"",class:"ws-mark-sm"},null,8,ae),d(i(o(h).carrier==="ooredoo"?"Ooredoo":"Dhiraagu"),1)])]),s("div",le,[e[7]||(e[7]=s("span",{class:"k"},"Receiver",-1)),s("span",ie,i(o(h).number),1)]),s("div",re,[e[8]||(e[8]=s("span",{class:"k"},"They receive",-1)),s("span",de,[g(f,{class:"ws-rf"}),d(i(k(o(h).face)),1)])]),s("div",ue,[e[9]||(e[9]=s("span",{class:"k"},"You paid",-1)),s("span",ce,[g(f,{class:"ws-rf"}),d(i(k(o(h).charge)),1)])]),o(h).code?(n(),a("div",ve,[e[11]||(e[11]=s("span",{class:"k"},"Reference",-1)),s("button",{type:"button",class:"ws-code",title:"Copy",onClick:e[0]||(e[0]=l=>Ds(o(h).code))},[d(i(o(h).code)+" ",1),e[10]||(e[10]=s("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),s("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})],-1))])])):v("",!0)]),s("div",we,[e[12]||(e[12]=d("Wallet balance: ",-1)),s("span",pe,[g(f,{class:"ws-rf"}),d(i(k(o(y).balance)),1)])]),s("button",{class:"ws-btn",type:"button",onClick:As},[...e[13]||(e[13]=[s("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M3 12a9 9 0 1 0 9-9"}),s("path",{d:"M3 3v5h5"})],-1),d(" New request ",-1)])])])):(n(),a("div",me,[s("div",he,[
1s("section",ke,[e[16]||(e[16]=s("div",{class:"ws-step"},[s("span",{class:"ws-step-n"},"1"),s("span",{class:"ws-step-t"},"Select Operator")],-1)),s("div",fe,[(n(),a($,null,ms(ks,l=>s("button",{key:l.key,type:"button",class:z(["ws-carrier-btn",{on:o(c)===l.key,dhi:o(c)===l.key&&l.key==="dhiraagu",oor:o(c)===l.key&&l.key==="ooredoo"}]),role:"tab","aria-selected":o(c)===l.key,onClick:X=>c.value=l.key},[s("img",{class:"ws-seg-logo",src:l.mark,alt:""},null,8,ye),d(i(l.label),1),s("span",be,i(l.sub),1)],10,ge)),64))])]),!o(P)&&!o(es)?(n(),a("section",_e,[e[18]||(e[18]=s("span",{class:"ws-unavail-ic"},[s("svg",{width:"21",height:"21",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s("path",{d:"M12 9v4M12 17h.01"})])],-1)),s("div",xe,[s("div",Me,i(o(Z))+" wholesale is temporarily unavailable",1),e[17]||(e[17]=s("div",{class:"ws-unavail-s"},"We're restocking. Please check back shortly, or switch carrier above.",-1))])])):(n(),a($,{key:1},[s("section",Ce,[e[28]||(e[28]=s("div",{class:"ws-step"},[s("span",{class:"ws-step-n"},"2"),s("span",{class:"ws-step-t"},"Receiver")],-1)),s("div",{ref_key:"ddRef",ref:H,class:"ws-dd"},[s("button",{type:"button",class:z(["ws-dd-btn",{open:o(w)}]),"aria-haspopup":"listbox","aria-expanded":o(w),onClick:xs},[o(D)?(n(),a("span",Se,[o(D).name?(n(),a("span",Be,i(o(D).name),1)):v("",!0),o(D).name?(n(),a("span",Re,"·")):v("",!0),s("span",je,i(o(D).number),1)])):o(p)==="other"?(n(),a("span",Le,[...e[19]||(e[19]=[s("span",{class:"ws-dd-name"},"Other number",-1),s("span",{class:"ws-dd-dot"},"·",-1),s("span",{class:"ws-dd-num"},"Type it below",-1)])])):(n(),a("span",Ae,"Choose a receiverâ¦")),(n(),a("svg",{class:z(["ws-dd-chev",{up:o(w)}]),width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[...e[20]||(e[20]=[s("path",{d:"m6 9 6 6 6-6"},null,-1)])],2))],10,Ne),o(w)?(n(),a("div",De,[o(F)&&!o(A).length?(n(),a("div",Oe,"Loadingâ¦")):o(A).length?v("",!0):(n(),a("div",Ve,"No saved numbers yet â add one below.")),(n(!0),a($,null,ms(o(A),l=>(n(),a("button",{key:l.id,type:"button",class:z(["ws-dd-item",{sel:o(m)?.id===l.id}]),role:"option",onClick:X=>Ms(l)},[s("span",Te,[l.name?(n(),a("span",Xe,i(l.name),1)):v("",!0),l.name?(n(),a("span",$e,"·")):v("",!0),s("span",Ie,i(l.number),1)]),o(m)?.id===l.id?(n(),a("svg",ze,[...e[21]||(e[21]=[s("path",{d:"M20 6 9 17l-5-5"},null,-1)])])):v("",!0),s("span",{class:"ws-dd-del",role:"button",tabindex:"0","aria-label":`Delete ${l.number}`,title:"Remove saved number",onClick:X=>ls(l,X),onKeydown:K(X=>ls(l,X),["enter"])},[...e[22]||(e[22]=[s("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M3 6h18"}),s("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),s("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),s("path",{d:"M10 11v6M14 11v6"})],-1)])],40,Ke)],10,Ee))),128)),e[25]||(e[25]=s("div",{class:"ws-dd-divider"},null,-1)),s("button",{type:"button",class:"ws-dd-item action",onClick:Cs},[...e[23]||(e[23]=[s("span",{class:"ws-dd-ic"},[s("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M12 20h9"}),s("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})])],-1),s("span",{class:"ws-dd-line"},[s("span",{class:"ws-dd-name"},"Other number"),s("span",{class:"ws-dd-dot"},"·"),s("span",{class:"ws-dd-num"},"Enter a 7-digit number once")],-1)])]),s("button",{type:"button",class:"ws-dd-item action add",onClick:Ss},[...e[24]||(e[24]=[s("span",{class:"ws-dd-ic add"},[s("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M12 5v14M5 12h14"})])],-1),s("span",{class:"ws-dd-line"},[s("span",{class:"ws-dd-name",style:{color:"var(--color-brand-strong)"}},"Add number"),s("span",{class:"ws-dd-dot"},"·"),s("span",{class:"ws-dd-num"},"Save with a nickname")],-1)])])])):v("",!0)],512),o(p)==="other"?(n(),a("div",Pe,[s("div",We,[e[26]||(e[26]=s("span",{class:"ws-inpre mono"},"+960",-1)),s("input",{ref_key:"otherInputRef",ref:ts,class:"ws-in mono",value:o(B),type:"tel",inputmode:"numeric",maxlength:"7",placeholder:"7XXXXXX",onInput:Ns,onFocus:e[1]||(e[1]=l=>U.value=!0),onBlur:e[2]||(e[2]=l=>U.value=!1)},null,40,Fe)]),o(_s)?(n(),a("div",qe,[...e[27]||(e[27]=[s("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s("path",{d:"M12 9v4M12 17h.01"})],-1),d(" Enter a valid 7-digit number ",-1)])])):v("",!0)])):v("",!0)]),s("section",He,[e[35]||(e[35]=s("div",{class:"ws-step"},[s("span",{class:"ws-step-n"},"3"),s("span",{class:"ws-step-t"},"Amount")],-1)),e[36]||(e[36]=s("label",{class:"ws-lbl",for:"ws-pay"},"Amount (MVR)",-1)),s("div",Ue,[s("span",Ye,[g(f,{style:{width:"16px",height:"11px",color:"var(--text-muted)"}})]),s("input",{id:"ws-pay",class:"ws-in mono",value:o(x),inputmode:"decimal",placeholder:"0",onInput:js,onKeyup:e[3]||(e[3]=K(l=>o(J)&&ws(),["enter"]))},null,40,Ge)]),o(us)?(n(),a("div",Je,[e[29]||(e[29]=s("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s("path",{d:"M12 9v4M12 17h.01"})],-1)),e[30]||(e[30]=s("span",null,"Minimum amount is",-1)),s("span",Ze,[g(f,{class:"ws-rf"}),d(i(k(o(ds))),1)])])):o(cs)?(n(),a("div",Qe,[e[31]||(e[31]=s("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s("path",{d:"M12 9v4M12 17h.01"})],-1)),e[32]||(e[32]=s("span",null,"Maximum they can receive is",-1)),s("span",so,[g(f,{class:"ws-rf"}),d(i(k(o(_).max_face)),1)])])):o(j)?(n(),a("div",eo,[e[33]||(e[33]=d(" They receive ",-1)),s("span",oo,[g(f,{class:"ws-rf"}),d(i(k(o(C))),1)])])):v("",!0),s("div",to,[(n(),a("svg",no,[...e[34]||(e[34]=[s("circle",{cx:"12",cy:"12",r:"10"},null,-1),s("path",{d:"M12 16v-4M12 8h.01"},null,-1)])])),d(" Discount Rate "+i(o(vs)),1)])])],64))]),s("aside",ao,[e[46]||(e[46]=s("div",{class:"ws-sum-head"},"Order summary",-1)),s("div",lo,[s("div",io,[e[37]||(e[37]=s("span",{class:"k"},"Carrier",-1)),s("span",ro,[s("img",{src:o(fs),alt:"",class:"ws-mark-sm"},null,8,uo),d(i(o(Z))+" Wholesale",1)])]),s("div",co,[e[38]||(e[38]=s("span",{class:"k"},"Receiver",-1)),s("span",vo,i(o(os)?o(I):"â"),1)]),s("div",wo,[e[39]||(e[39]=s("span",{class:"k"},"Discount Rate",-1)),s("span",po,i(o(vs)),1)]),e[44]||(e[44]=s("div",{class:"ws-sum-line"},null,-1)),s("div",mo,[e[40]||(e[40]=s("span",{class:"k"},"They receive",-1)),s("span",ho,[g(f,{class:"ws-rf"}),d(i(o(j)?k(o(C)):"â"),1)])]),s("div",ko,[s("span",fo,[d("GST "+i(o(gs))+"% ",1),e[41]||(e[41]=s("span",{style:{"font-size":"11px"}},"(included)",-1))]),s("span",go,[g(f,{class:"ws-rf"}),d(i(o(j)?k(o(Ls)):"â"),1)])]),e[45]||(e[45]=s("div",{class:"ws-sum-line"},null,-1)),s("div",yo,[e[42]||(e[42]=s("span",null,"Total to pay",-1)),s("span",bo,[g(f,{style:{width:"18px",height:"12px"}}),d(i(o(j)?k(o(E)):"â"),1)])]),s("button",{class:"ws-btn",type:"button",disabled:!o(J),style:{"margin-top":"4px"},onClick:ws},[e[43]||(e[43]=s("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.4","stroke-linecap":"round","stroke-linejoin":"round"},[s("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),s("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})],-1)),s("span",null,i(o(T)?"Processingâ¦":"Send"),1),o(j)&&!o(T)?(n(),a($,{key:0},[g(f,{style:{width:"15px",height:"11px"}}),s("span",xo,i(k(o(E))),1)],64)):v("",!0)],8,_o),s("p",Mo,"Wallet balance: "+i(k(o(y).balance)),1)])])]))],64)):v("",!0)]),o(O)?(n(),a("div",{key:1,class:"ws-modal-back",onClick:Hs(rs,["self"])},[s("div",Co,[s("div",{class:"ws-modal-head"},[e[48]||(e[48]=s("h3",{class:"ws-modal-title"},"Add number",-1)),s("button",{type:"button",class:"ws-modal-x","aria-label":"Close",onClick:rs},[...e[47]||(e[47]=[s("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M18 6 6 18M6 6l12 12"})],-1)])])]),s("div",No,[s("div",So,[e[51]||(e[51]=s("label",{class:"ws-lbl",for:"ws-add-num"},"Mobile number",-1)),s("div",Bo,[e[49]||(e[49]=s("span",{class:"ws-inpre mono"},"+960",-1)),s("input",{id:"ws-add-num",class:"ws-in mono",value:o(R),type:"tel",inputmode:"numeric",maxlength:"7",placeholder:"7XXXXXX",onInput:Bs,onKeyup:K(G,["enter"])},null,40,Ro)]),o(Y)&&!o(is)?(n(),a("div",jo,[...e[50]||(e[50]=[s("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s("path",{d:"M12 9v4M12 17h.01"})],-1),d(" Enter a valid 7-digit number ",-1)])])):v("",!0)]),s("div",Lo,[e[52]||(e[52]=s("label",{class:"ws-lbl",for:"ws-add-name"},[d("Nickname "),s("span",{style:{"text-transform":"none","font-weight":"600",color:"var(--text-subtle)"}},"(optional)")],-1)),s("div",Ao,[Us(s("input",{id:"ws-add-name",class:"ws-in","onUpdate:modelValue":e[4]||(e[4]=l=>Ys(V)?V.value=l:null),maxlength:"50",placeholder:"e.g. Corner Shop",onKeyup:K(G,["enter"])},null,544),[[Gs,o(V)]])])]),s("button",{class:"ws-btn",type:"button",disabled:o(M),onClick:G},i(o(M)?"Savingâ¦":"Save number"),9,Do)])])])):v("",!0)]),_:1})}}});
1export{Io 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.