1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6342],{19062:(e,t,s)=>{s.d(t,{i:()=>a});let a=(0,s(25959).v)(e=>({notification:null,showNotification:t=>{e({notification:t}),setTimeout(()=>{e({notification:null})},4e3)},clearNotification:()=>{e({notification:null})}}))},19445:(e,t,s)=>{s.d(t,{NodeSwitcher:()=>m});var a=s(95155),n=s(12115),i=s(52619),r=s.n(i),l=s(74464),o=s(60004),c=s(23573),d=s(64269),u=s(37198),x=s(56467);function m(e){let{className:t}=e,{nodes:s,activeMembership:i,setActiveNodeId:m,isStaff:p}=(0,u.P)(),[h,g]=(0,n.useState)(!1),f=(0,n.useRef)(null);if((0,n.useEffect)(()=>{if(h)return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("keydown",t)};function e(e){var t;(null==(t=f.current)?void 0:t.contains(e.target))||g(!1)}function t(e){"Escape"===e.key&&g(!1)}},[h]),!i)return null;let{node:b}=i;return 1===s.length?(0,a.jsxs)("div",{className:(0,d.cn)("min-w-0",t),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h1",{className:"font-display text-[18px] md:text-[22px] font-bold text-text-primary truncate",children:b.name}),(0,a.jsx)(x.k,{status:b.status})]}),(0,a.jsx)("p",{className:"text-[13px] text-text-muted mt-0.5 truncate",children:b.address})]}):(0,a.jsxs)("div",{ref:f,className:(0,d.cn)("relative min-w-0",t),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>g(e=>!e),"aria-expanded":h,"aria-haspopup":"menu",className:"flex flex-col items-start text-left min-w-0 max-w-full group",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"font-display text-[18px] md:text-[22px] font-bold text-text-primary truncate",children:b.name}),(0,a.jsx)(l.D3,{size:16,className:(0,d.cn)("text-text-muted shrink-0 transition-transform duration-150",h&&"rotate-180")}),(0,a.jsx)(x.k,{status:b.status})]}),(0,a.jsx)("span",{className:"text-[13px] text-text-muted mt-0.5 truncate max-w-full",children:b.address})]}),h&&(0,a.jsxs)("div",{role:"menu",className:"absolute left-0 top-full mt-2 z-40 w-[min(320px,calc(100vw-2rem))] rounded-[14px] border border-border-default bg-bg-card shadow-[var(--shadow-raised)] overflow-hidden",children:[(0,a.jsx)("p",{className:"px-3 pt-3 pb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Your stations"}),s.map(e=>{let t=e.node.id===b.id;return(0,a.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{m(e.node.id),g(!1)},className:(0,d.cn)("w-full flex items-start gap-2.5 px-3 py-2.5 text-left transition-colors",t?"bg-status-info-bg":"hover:bg-bg-subtle"),children:[(0,a.jsx)("span",{className:"w-7 h-7 rounded-[9px] bg-bg-subtle text-text-muted flex items-center justify-center shrink-0 mt-0.5",children:(0,a.jsx)(l.Tb,{size:14})}),(0,a.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold text-text-primary truncate",children:e.node.name}),"staff"===e.roleAtNode&&(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted shrink-0",children:"Staff"})]}),(0,a.jsx)("span",{className:"block text-[11px] text-text-muted truncate",children:e.node.address}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5 mt-1",children:[(0,a.jsx)(x.k,{status:e.node.status}),!(0,c.bS)(e.node)&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-status-neutral",children:[(0,a.jsx)(l.aR,{size:10}),"Not public"]})]})]}),t&&(0,a.jsx)(l.C1,{size:15,className:"text-brand-blue shrink-0 mt-1"})]},e.profileId)}),(0,a.jsx)("div",{className:"h-px bg-border-default"}),(0,a.jsxs)(r(),{href:o.bw.nodeSetup,onClick:()=>g(!1),className:"flex items-center gap-2 px-3 py-3 text-[13px] font-semibold text-brand-blue hover:bg-bg-subtle transition-colors",children:[p?(0,a.jsx)(l.Tb,{size:15}):(0,a.jsx)(l.c1,{size:15}
1),p?"View stations":"Manage stations"]})]})]})}},28215:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(56479).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},44105:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(56479).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},49453:(e,t,s)=>{s.d(t,{NodeOnboardingForm:()=>d});var a=s(95155),n=s(12115),i=s(75100),r=s(52485),l=s(54067),o=s(74464),c=s(94806);function d(e){let{onSubmit:t,isSubmitting:s,error:d,variant:u}=e,[x,m]=(0,n.useState)(""),[p,h]=(0,n.useState)(""),[g,f]=(0,n.useState)(""),[b,j]=(0,n.useState)(""),[v,y]=(0,n.useState)(""),[N,w]=(0,n.useState)(""),[k,S]=(0,n.useState)(""),[C,A]=(0,n.useState)(""),E=x.trim()&&p.trim()&&g.trim()&&b.trim()&&v.trim()&&N.trim()&&k.trim();return(0,a.jsxs)("div",{className:"px-4 md:px-6 pt-4 pb-10 max-w-[480px] mx-auto",children:[(0,a.jsx)("h1",{className:"font-display text-[18px] font-bold text-text-primary mb-1",children:"first"===u?"Set up your Pickup Station":"Add another Pickup Station"}),(0,a.jsx)("p",{className:"text-[13px] text-text-secondary mb-6",children:"first"===u?"Tell us about the location you'll be operating. An admin reviews every new Pickup station before it goes live.":"Tell us about your new location. Every station is reviewed on its own â your existing ones keep running while this one waits."}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(i.Zp,{padding:"lg",className:"animate-locoomo-fade-up",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 mb-4",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-status-info-bg text-brand-blue flex items-center justify-center shrink-0",children:(0,a.jsx)(o.Tb,{size:17})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"font-semibold text-[15px] text-text-primary leading-tight",children:"Location Details"}),(0,a.jsx)("p",{className:"text-[12px] text-text-muted",children:"Where riders and customers will find you"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3.5",children:[(0,a.jsx)(i.pd,{label:"Station Name",placeholder:"e.g. Lekki Phase 1 Station",leftElement:(0,a.jsx)(o.fA,{size:16}),value:x,onChange:e=>m(e.target.value)}),(0,a.jsx)(i.pd,{label:"Address",placeholder:"12 Admiralty Way",leftElement:(0,a.jsx)(o.Tb,{size:16}),value:p,onChange:e=>h(e.target.value)}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)(i.pd,{label:"City",placeholder:"Lagos",value:g,onChange:e=>f(e.target.value)}),(0,a.jsx)(i.pd,{label:"State",placeholder:"Lagos",value:b,onChange:e=>j(e.target.value)})]}),(0,a.jsx)(l.f,{address:p,city:g,state:b,onResolved:(e,t)=>{w(String(e)),S(String(t))}}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)(i.pd,{label:"Latitude",type:"number",placeholder:"6.4500",leftElement:(0,a.jsx)(o._Z,{size:15}),value:N,onChange:e=>w(e.target.value)}),(0,a.jsx)(i.pd,{label:"Longitude",type:"number",placeholder:"3.4700",leftElement:(0,a.jsx)(o._Z,{size:15}),value:k,onChange:e=>S(e.target.value)})]})]})]}),(0,a.jsxs)(i.Zp,{padding:"lg",className:"animate-locoomo-fade-up",style:{animationDelay:"80ms"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 mb-4",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-status-info-bg text-brand-blue flex items-center justify-center shrink-0",children:(0,a.jsx)(o.qD,{size:17})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"font-semibold text-[15px] text-text-primary leading-tight",children:"Capacity & Hours"}),(0,a.jsx)("p",{className:"text-[12px] text-text-muted",children:"How much you can hold, and when"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3.5",children:[(0,a.jsx)(i.pd,{label:"Capacity (parcels)",type:"number",placeholder:"e.g. 100",leftElement:(0,a.jsx)(o.qD,{size:16}),value:v,onChange:e=>y(e.target.value)}),(0,a.jsx)(i.pd,{label:"Operating Hours (optional)",placeholder:"Mon-Sat 8am-7pm",leftElement:(0,a.jsx)(o.O4,{size:16}),value:C,onChange:e=>A(e.target.value)})]})]})]}),null!=d&&(()=>{let e=(0,c.kQ)(d);return(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(r.$,{title:e.title,message:e.message,action:e.action})})})(),(0,a.jsx)(i.$n,{fullWidth:!0,size:"lg",className:"mt-6",disabled:!E,isLoading:s,onClick:()=>{t({name:x,address:p,city:g,state:b,capacity:Number(v),latitude:Number(N),longitude:Number(k),operatingHours:C.trim()||void 0})},children:"Submit for Approval"})]})}},52485:(e,t,s)=>{s.d(t,{$:()=>l});var a=s(95155),n=s(44105),i=s(28215),r=s(59046);function l(e){let{title:t,message:s,action:l,success:o=!1}=e;return(0,a.jsx)("div",{className:"rounded-xl border p-4 mt-4 ".concat(o?"border-green-300 bg-green-50":"border-red-300 bg-red-50"),children:(0,a.jsxs)("div",{className:"flex gap-3",children:[o?(0,a.jsx)(n.A,{className:"text-green-600"}):(0,a.jsx)(i.A,{className:"text-red-600"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-sm ".concat(o?"text-green-700":"text-red-700"),children:t}),(0,a.jsx)("p",{className:"text-sm mt-1 text-gray-700",children:s}),l&&(0,a.jsxs)("p",{className:"text-xs mt-2 font-medium text-gray-600 flex items-center gap-1",children:[(0,a.jsx)(r.A,{className:"w-3 h-3 shrink-0"}),l]})]})]})})}},53313:(e,t,s)=>{s.d(t,{AddNodeScreen:()=>u});var a=s(95155),n=s(12115),i=s(20063),r=s(55928),l=s(60004),o=s(37198),c=s(62352),d=s(49453);function u(){let e=(0,i.useRouter)(),{setActiveNodeId:t}=(0,o.P)(),{createNode:s,isCreatingNode:u,createNodeError:x,createdNode:m,isNodeCreated:p}=(0,c.D)();return(0,n.useEffect)(()=>{p&&m&&(t(m.node.id),e.replace(l.bw.nodeDetail(m.node.id)))},[p,m,t,e]),(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(r.Vs,{title:"Add Station",showBack:!0}),(0,a.jsx)(d.NodeOnboardingForm,{variant:"additional",onSubmit:s,isSubmitting:u,error:x})]})}},54067:(e,t,s)=>{s.d(t,{f:()=>c});var a=s(95155),n=s(12115),i=s(75100),r=s(74464),l=s(94806),o=s(71540);function c(e){let{address:t,city:s,state:c,onResolved:d}
1=e,[u,x]=(0,n.useState)(!1),[m,p]=(0,n.useState)(null),[h,g]=(0,n.useState)(null);if(!o.t.isConfigured())return(0,a.jsxs)("p",{className:"text-[11px] text-text-muted mb-3 -mt-1",children:["Set"," ",(0,a.jsx)("code",{className:"text-[10px] bg-bg-subtle px-1 py-0.5 rounded",children:"NEXT_PUBLIC_GEOAPIFY_API_KEY"})," ","to auto-fill coordinates from the address below instead of typing them."]});let f=t.trim().length>0&&s.trim().length>0&&c.trim().length>0,b=async()=>{x(!0),p(null),g(null);try{let e=await o.t.geocodeAddress({address:t,city:s,state:c});d(e.lat,e.lng),g(e.formatted)}catch(e){p((0,l.u1)(e))}finally{x(!1)}};return(0,a.jsxs)("div",{className:"rounded-[14px] border border-border-default bg-status-info-bg/50 p-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2.5 mb-3",children:[(0,a.jsx)("span",{className:"w-7 h-7 rounded-full bg-bg-card text-brand-blue flex items-center justify-center shrink-0",children:(0,a.jsx)(r.V1,{size:14})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary leading-tight",children:"Not sure about the coordinates?"}),(0,a.jsx)("p",{className:"text-[12px] text-text-secondary mt-1 leading-relaxed",children:"Fill in the Address, City, and State above, then tap the button below, we'll look up the exact Latitude and Longitude for you and fill them in automatically, so customers and riders can find this station."})]})]}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",size:"sm",leftIcon:(0,a.jsx)(r._Z,{size:14}),disabled:!f,isLoading:u,onClick:b,className:"bg-bg-card",children:"Find Coordinates from Address"}),!f&&(0,a.jsx)("p",{className:"text-[11px] text-text-muted mt-2",children:"Enter the address, city, and state above first to enable this."}),h&&(0,a.jsxs)("p",{className:"flex items-start gap-1.5 text-[11px] mt-2.5",children:[(0,a.jsx)(r.C1,{size:13,className:"text-status-success shrink-0 mt-0.5"}),(0,a.jsxs)("span",{className:"text-text-secondary",children:["Matched ",(0,a.jsx)("span",{className:"font-medium text-status-warning",children:h})," â check this is the right place before saving."]})]}),m&&(0,a.jsxs)("p",{className:"flex items-start gap-1.5 text-[11px] text-status-danger mt-2.5",children:[(0,a.jsx)(r.eq,{size:13,className:"shrink-0 mt-0.5"}),m]})]})}},56467:(e,t,s)=>{s.d(t,{k:()=>r});var a=s(95155),n=s(64269);let i={pending:{label:"Pending review",color:"var(--status-warning)",bg:"var(--status-warning-bg)"},active:{label:"Active",color:"var(--status-success)",bg:"var(--status-success-bg)"},inactive:{label:"Inactive",color:"var(--status-neutral)",bg:"var(--status-neutral-bg)"},suspended:{label:"Suspended",color:"var(--status-danger)",bg:"var(--status-danger-bg)"}};function r(e){let{status:t,className:s}=e,r=i[t];return(0,a.jsxs)("span",{className:(0,n.cn)("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold whitespace-nowrap",s),style:{color:r.color,background:r.bg},children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:r.color},"aria-hidden":"true"}),r.label]})}},59046:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(56479).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},59441:(e,t,s)=>{s.d(t,{C:()=>r});var a=s(12115),n=s(74268),i=s(99776);function r(e,t){let s=(0,i.jE)(t),r=s.getQueryCache();return a.useSyncExternalStore(a.useCallback(e=>r.subscribe(n.jG.batchCalls(e)),[r]),()=>s.isFetching(e),()=>s.isFetching(e))}},62352:(e,t,s)=>{s.d(t,{D:()=>u});var a=s(99776),n=s(80549),i=s(14625),r=s(55432),l=s(60004),o=s(94806),c=s(19062),d=s(37198);function u(){var e,t;let s=(0,a.jE)(),u=(0,c.i)(e=>e.showNotification),{nodes:x,ownedNodes:m,notOnboarded:p,hasNoStationsYet:h,isLoading:g,error:f,isStaff:b}=(0,d.P)(),j=(0,n.n)({mutationFn:e=>0===x.length?r.Ww.onboardNode(e):r.Ww.addNode(e),onSuccess:e=>{s.invalidateQueries({queryKey:l.es.nodeOperatorNodes}),u({type:"success",title:"Pickup station submitted",message:"".concat(e.node.name," is now waiting for admin approval.")})}}),v=(0,i.I)({queryKey:l.es.payoutBanks,queryFn:()=>r.Ww.getPayoutBanks(),staleTime:1/0}),y=(0,n.n)({mutationFn:e=>{let{nodeId:t,payload:s}=e;return r.Ww.setPayoutAccount(t,s)},onSuccess:e=>{s.invalidateQueries({queryKey:l.es.nodeOperatorNodes}),u({type:"success",title:"Payout account saved",message:e.payoutAccountName?"Verified as ".concat(e.payoutAccountName,", for ").concat(e.node.name,"."):"".concat(e.node.name,"'s payout account is on file.")})},onError:e=>{u({type:"error",title:"Couldn't save payout account",message:(0,o.u1)(e)})}});return{nodes:x,ownedNodes:m,isLoadingNodes:g,notOnboarded:p,hasNoStationsYet:h,nodesError:f,isStaff:b,createNode:j.mutate,isCreatingNode:j.isPending,createNodeError:j.error,createdNode:j.data,isNodeCreated:j.isSuccess,banks:null!=(t=v.data)?t:[],isLoadingBanks:v.isLoading,setPayoutAccount:y.mutate,isSettingPayoutAccount:y.isPending,payoutAccountError:y.error,payoutAccountNodeId:null==(e=y.variables)?void 0:e.nodeId,payoutAccountSaved:y.isSuccess}}},63995:(e,t,s)=>{s.d(t,{NodeDetailScreen:()=>j});var a=s(95155),n=s(52619),i=s.n(n),r=s(20063),l=s(55928),o=s(75100),c=s(52485),d=s(74464),u=s(90401),x=s(94806),m=s(60004),p=s(37198),h=s(62352),g=s(80336),f=s(56467),b=s(80837);function j(){let e=(0,r.useParams)().nodeId,{nodes:t,isLoading:s,error:n,isStaff:j}=(0,p.P)(),{banks:v,isLoadingBanks:y,setPayoutAccount:N,isSettingPayoutAccount:w,payoutAccountError:k,payoutAccountNodeId:S,payoutAccountSaved:C}
1=(0,h.D)();if(s)return(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(l.Vs,{title:"Station",showBack:!0}),(0,a.jsx)("p",{className:"text-[13px] text-text-muted text-center py-10",children:"Loading this stationâ¦"})]});if(n){let e=(0,x.kQ)(n);return(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(l.Vs,{title:"Station",showBack:!0}),(0,a.jsx)("div",{className:"px-4 md:px-6 pt-4 max-w-[480px] mx-auto",children:(0,a.jsx)(c.$,{title:e.title,message:e.message,action:e.action})})]})}let A=t.find(t=>t.node.id===e);if(!A)return(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(l.Vs,{title:"Station",showBack:!0}),(0,a.jsx)(o.pp,{icon:(0,a.jsx)(d.Tb,{size:24}),title:"Station not found",description:j?"You're not on this station's team â your access may have been removed, or the link is out of date.":"This station isn't on your account â it may have been removed, or the link is out of date.",action:(0,a.jsx)(i(),{href:m.bw.nodeSetup,children:(0,a.jsx)(o.$n,{size:"md",variant:"outline",children:"Back to My Stations"})})})]});let{node:E,roleAtNode:z}=A,P="owner"===z;return(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(l.Vs,{title:E.name,showBack:!0}),(0,a.jsxs)("div",{className:"px-4 md:px-6 pt-4 pb-10 max-w-[480px] mx-auto flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-bg-subtle text-text-muted flex items-center justify-center shrink-0",children:(0,a.jsx)(d.Tb,{size:16})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("p",{className:"text-[15px] font-semibold text-text-primary",children:E.name}),(0,a.jsx)(f.k,{status:E.status})]}),(0,a.jsx)("p",{className:"text-[12px] text-text-muted mt-0.5",children:E.address}),(0,a.jsxs)("p",{className:"text-[12px] text-text-muted",children:[E.city,", ",E.state]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3 text-[12px] text-text-secondary",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(d.qD,{size:13}),E.capacity," parcels"]}),E.operatingHours&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(d.O4,{size:13}),E.operatingHours]})]})]})]}),"pending"===E.status&&(0,a.jsx)("p",{className:"text-[12px] text-status-warning font-medium mt-3",children:P?"An admin is reviewing this station. Your other stations keep running while it waits.":"An admin is reviewing this station. You'll be able to work the counter here once it's approved."})]}),!P&&(0,a.jsxs)(o.Zp,{padding:"md",className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-status-info-bg text-brand-blue flex items-center justify-center shrink-0",children:(0,a.jsx)(d.c2,{size:16})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary",children:"You're on this station's team"}),(0,a.jsx)("p",{className:"text-[12px] text-text-secondary leading-[1.5]",children:"You can take drop-offs, hand parcels to riders, check them in, and release them to receivers here â and send parcels from this station. Its payout account, listing and team are the owner's to manage."})]})]}),P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.NodeVisibilityCard,{node:E}),(0,a.jsx)(u.S,{configured:A.payoutAccountConfigured,bankName:A.payoutBankName,accountNumber:A.payoutAccountNumber,accountName:A.payoutAccountName,banks:v,isLoadingBanks:y,onSubmit:e=>N({nodeId:E.id,payload:e}),isSubmitting:w&&S===E.id,error:S===E.id?k:null,saved:C&&S===E.id}),(0,a.jsx)(g.NodeStaffCard,{nodeId:E.id,nodeName:E.name,nodeStatus:E.status})]})]})]})}},71540:(e,t,s)=>{s.d(t,{t:()=>o});var a=s(60886),n=s(94806);function i(e){let{address:t,city:s,state:a}=e;return[t,s,a].map(e=>e.trim()).filter(Boolean).join(", ")}async function r(e){var t,s,r,l;let o,c=new URLSearchParams({text:i(e),filter:"countrycode:".concat(null!=(r=e.countryCode)?r:"ng"),limit:"1",format:"geojson",apiKey:a._K.geoapifyApiKey});try{o=await fetch("https://api.geoapify.com/v1/geocode/search?".concat(c.toString()))}catch(e){throw new n.hD({message:"Couldn't reach the address lookup service. Check your connection and try again.",code:"NETWORK_E
1RROR",status:0})}if(!o.ok)throw new n.hD({message:401===o.status?"The address lookup key was rejected. Check NEXT_PUBLIC_GEOAPIFY_API_KEY.":"The address lookup service didn't respond properly. Enter coordinates manually.",code:"GEOCODING_FAILED",status:o.status});let d=await o.json().catch(()=>null),u=null==d||null==(s=d.features)||null==(t=s[0])?void 0:t.properties;if(!u||"number"!=typeof u.lat||"number"!=typeof u.lon)throw new n.hD({message:"We couldn't find that address. Check the spelling, or enter coordinates manually.",code:"ADDRESS_NOT_FOUND",status:404});return{lat:u.lat,lng:u.lon,formatted:null!=(l=u.formatted)?l:i(e)}}async function l(e){throw new n.hD({message:"Google geocoding isn't wired up yet â set NEXT_PUBLIC_MAPS_PROVIDER=geoapify, or implement geocodeWithGoogle().",code:"NOT_IMPLEMENTED"})}let o={isConfigured:()=>"google"===a._K.mapsProvider?!!a._K.googleMapsApiKey:!!a._K.geoapifyApiKey,async geocodeAddress(e){if(!o.isConfigured())throw new n.hD({message:"Address lookup isn't configured. Add an API key to .env.local.",code:"NOT_CONFIGURED",status:0});return"google"===a._K.mapsProvider?l(e):r(e)}}},80336:(e,t,s)=>{s.d(t,{NodeStaffCard:()=>g});var a=s(95155),n=s(12115),i=s(75100),r=s(52485),l=s(74464),o=s(94806),c=s(20467),d=s(99776),u=s(14625),x=s(80549),m=s(55432),p=s(60004),h=s(19062);function g(e){let{nodeId:t,nodeName:s,nodeStatus:n}=e,{staff:r,isLoadingStaff:c,staffError:g,inviteStaff:j,isInviting:v,inviteError:y,isInvited:N,resetInvite:w,removeStaff:k,isRemoving:S,removingUserId:C}=function(e,t){var s;let a=(0,d.jE)(),n=(0,h.i)(e=>e.showNotification),i=(0,u.I)({queryKey:p.es.nodeStaff(e),queryFn:()=>m.Ww.getNodeStaff(e),enabled:!0,retry:!1}),r=(0,x.n)({mutationFn:t=>m.Ww.inviteNodeStaff(e,t),onSuccess:t=>{a.invalidateQueries({queryKey:p.es.nodeStaff(e)}),n({type:"success",title:"Invite sent",message:"".concat(t.firstName," ").concat(t.lastName," will get an email to set a password. They'll appear in your team once they accept.")})},onError:e=>{n({type:"error",title:"Couldn't send invite",message:(0,o.u1)(e)})}}),l=(0,x.n)({mutationFn:t=>m.Ww.removeNodeStaff(e,t),onSuccess:(t,s)=>{var r;let l=null==(r=i.data)?void 0:r.find(e=>e.userId===s);a.invalidateQueries({queryKey:p.es.nodeStaff(e)}),n({type:"success",title:"Access removed",message:l?"".concat(l.firstName," ").concat(l.lastName," can no longer work this station."):"That team member can no longer work this station."})},onError:e=>{n({type:"error",title:"Couldn't remove that team member",message:(0,o.u1)(e)})}});return{staff:null!=(s=i.data)?s:[],isLoadingStaff:i.isLoading,staffError:i.error,inviteStaff:r.mutate,isInviting:r.isPending,inviteError:r.error,invitedStaff:r.data,isInvited:r.isSuccess,resetInvite:r.reset,removeStaff:l.mutate,isRemoving:l.isPending,removingUserId:l.variables}}(t);return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted mb-2",children:"Station Team"}),(0,a.jsxs)(i.Zp,{padding:"md",className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-status-info-bg text-brand-blue flex items-center justify-center shrink-0",children:(0,a.jsx)(l.c2,{size:16})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary",children:"Who can work this counter"}),(0,a.jsxs)("p",{className:"text-[12px] text-text-secondary leading-[1.5]",children:["Team members can scan, receive, hand off, and release parcels at ",s,". They can't change your payout account, manage the team, or see your earnings."]})]})]}),"active"===n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f,{staff:r,isLoading:c,error:g,onRemove:k,isRemoving:S,removingUserId:C}),(0,a.jsx)("div",{className:"h-px bg-border-default"}),N?(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-[12px] text-status-success font-medium flex items-center gap-1.5",children:[(0,a.jsx)(l.C1,{size:13}),"Invite sent. They'll appear above once they accept it and set a password."]}),(0,a.jsx)(i.$n,{size:"sm",variant:"ghost",onClick:w,children:"Invite someone else"})]}):(0,a.jsx)(b,{onSubmit:j,isSubmitting:v,error:y})]}):(0,a.jsx)("p",{className:"text-[12px] text-status-warning font-medium",children:"You can add your team once this station is approved."})]})]})}function f(e){let{staff:t,isLoading:s,error:d,onRemove:u,isRemoving:x,removingUserId:m}
1=e,[p,h]=(0,n.useState)(null);if(s)return(0,a.jsx)("p",{className:"text-[12px] text-text-muted",children:"Loading your teamâ¦"});if(d){let e=(0,o.kQ)(d);return(0,a.jsx)(r.$,{title:e.title,message:e.message,action:e.action})}return 0===t.length?(0,a.jsx)("p",{className:"text-[12px] text-text-muted",children:"No one else works this station yet. Invite someone below."}):(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:t.map(e=>{let t=x&&m===e.userId,s=p===e.userId;return(0,a.jsxs)("div",{className:"flex items-center gap-2.5 py-2 border-b border-border-default last:border-b-0",children:[(0,a.jsxs)("span",{className:"w-8 h-8 rounded-full bg-bg-subtle text-text-secondary flex items-center justify-center shrink-0 text-[11px] font-semibold",children:[e.firstName[0],e.lastName[0]]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("p",{className:"text-[13px] font-medium text-text-primary truncate",children:[e.firstName," ",e.lastName]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-muted truncate",children:[e.email," \xb7 joined ",(0,c.Yq)(e.joinedAt)]})]}),s?(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"danger",isLoading:t,onClick:()=>{u(e.userId),h(null)},children:"Remove"}),(0,a.jsx)("button",{type:"button","aria-label":"Cancel",onClick:()=>h(null),className:"w-8 h-8 rounded-full text-text-muted hover:text-text-primary flex items-center justify-center",children:(0,a.jsx)(l.uv,{size:15})})]}):(0,a.jsx)(i.$n,{size:"sm",variant:"ghost",disabled:x,isLoading:t,onClick:()=>h(e.userId),className:"shrink-0",children:"Remove"})]},e.userId)})})}function b(e){let{onSubmit:t,isSubmitting:s,error:c}
1=e,[d,u]=(0,n.useState)(""),[x,m]=(0,n.useState)(""),[p,h]=(0,n.useState)(""),[g,f]=(0,n.useState)(""),b=d.trim()&&x.trim()&&p.trim()&&g.trim();return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-[12px] font-semibold text-text-primary",children:"Invite a team member"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsx)(i.pd,{label:"First name",placeholder:"Chidi",value:d,onChange:e=>u(e.target.value)}),(0,a.jsx)(i.pd,{label:"Last name",placeholder:"Okafor",value:x,onChange:e=>m(e.target.value)})]}),(0,a.jsx)(i.pd,{label:"Email",type:"email",placeholder:"[email protected]",leftElement:(0,a.jsx)(l.r4,{size:16}),value:p,onChange:e=>h(e.target.value)}),(0,a.jsx)(i.pd,{label:"Phone",placeholder:"+2348012345678",inputMode:"tel",leftElement:(0,a.jsx)(l.Es,{size:16}),value:g,onChange:e=>f(e.target.value)}),null!=c&&(()=>{let e=(0,o.kQ)(c);return(0,a.jsx)(r.$,{title:e.title,message:e.message,action:e.action})})(),(0,a.jsx)(i.$n,{fullWidth:!0,leftIcon:(0,a.jsx)(l.r4,{size:16}),disabled:!b,isLoading:s,onClick:()=>t({firstName:d.trim(),lastName:x.trim(),email:p.trim(),phone:g.trim()}),children:"Send Invite"})]})}},80549:(e,t,s)=>{s.d(t,{n:()=>d});var a=s(12115),n=s(38559),i=s(74268),r=s(38445),l=s(34049),o=class extends r.Q{#e;#t=void 0;#s;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.EN)(t.mutationKey)!==(0,l.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#n(),this.#i()}mutate(e,t){return this.#a=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#n(){let e=this.#s?.state??(0,n.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){i.jG.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,s,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,s,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,s,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,s,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},c=s(99776);function d(e,t){let s=(0,c.jE)(t),[n]=a.useState(()=>new o(s,e));a.useEffect(()=>{n.setOptions(e)},[n,e]);let r=a.useSyncExternalStore(a.useCallback(e=>n.subscribe(i.jG.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),d=a.useCallback((e,t)=>{n.mutate(e,t).catch(l.lQ)},[n]);if(r.error&&(0,l.GU)(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:d,mutateAsync:r.mutate}}},80837:(e,t,s)=>{s.d(t,{NodeVisibilityCard:()=>p});var a=s(95155),n=s(75100),i=s(74464),r=s(64269),l=s(23573),o=s(99776),c=s(80549),d=s(55432),u=s(60004),x=s(94806),m=s(19062);function p(e){let{node:t}=e,{setVisibility:s,isSaving:p}=function(e){let t=(0,o.jE)(),s=(0,m.i)(e=>e.showNotification),a=(0,c.n)({mutationFn:t=>d.Ww.setNodeVisibility(e,t),onSuccess:e=>{t.invalidateQueries({queryKey:u.es.nodeOperatorNodes});let a=!1!==e.node.isPubliclyVisible;s({type:"success",title:a?"Public drop-offs are on":"Public drop-offs are off",message:a?"".concat(e.node.name," is listed again and customers can send parcels to it."):"".concat(e.node.name," is hidden from customers. Parcels already on their way still arrive, and you can still send your own.")})},onError:e=>{s({type:"error",title:"Couldn't change that",message:(0,x.u1)(e)})}});return{setVisibility:a.mutate,isSaving:a.isPending,error:a.error}}(t.id),h=(0,l.bS)(t),g="active"===t.status,f=!g||p;return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted mb-2",children:"Public Drop-offs"}),(0,a.jsxs)(n.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:(0,r.cn)("w-9 h-9 rounded-[10px] flex items-center justify-center shrink-0",h?"bg-status-success-bg text-status-success":"bg-status-neutral-bg text-status-neutral"),children:h?(0,a.jsx)(i.bM,{size:16}):(0,a.jsx)(i.aR,{size:16})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary",children:h?"Open to customers":"Closed to customers"}),(0,a.jsx)("p",{className:"text-[12px] text-text-secondary mt-0.5 leading-normal",children:h?"This station is listed for customers and they can send parcels to and from it.":"Customers can't find this station or send parcels to it. It still handles handoffs, still earns, and can still send and receive your own parcels."})]}),(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":h,"aria-label":"Public drop-offs",disabled:f,onClick:()=>s(!h),className:(0,r.cn)("relative shrink-0 w-11 h-6 rounded-full transition-colors duration-150 mt-0.5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-blue/40",h?"bg-brand-blue":"bg-border-strong",f&&"opacity-50 cursor-not-allowed"),children:(0,a.jsx)("span",{className:(0,r.cn)("absolute top-0.5 w-5 h-5 rounded-full bg-white shadow-sm transition-transform duration-150",h?"translate-x-[22px]":"translate-x-5")})})]}),!g&&(0,a.jsx)("p",{className:"text-[12px] text-status-warning font-medium mt
1-3",children:"You can change this once this station is approved."})]})]})}},87212:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(56479).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},89761:(e,t,s)=>{s.d(t,{MyNodesScreen:()=>f});var a=s(95155),n=s(52619),i=s.n(n),r=s(55928),l=s(75100),o=s(52485),c=s(74464),d=s(94806),u=s(23573),x=s(60004),m=s(62352),p=s(37198),h=s(49453),g=s(56467);function f(){let{nodes:e,isLoadingNodes:t,notOnboarded:s,hasNoStationsYet:n,nodesError:f,createNode:b,isCreatingNode:j,createNodeError:v}=(0,m.D)(),{activeNode:y,setActiveNodeId:N,isStaff:w}=(0,p.P)();if(t)return(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(r.Vs,{title:"My Stations",showBack:!0}),(0,a.jsx)("p",{className:"text-[13px] text-text-muted text-center py-10",children:"Checking your Pickup stationsâ¦"})]});if(f){let e=(0,d.kQ)(f);return(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(r.Vs,{title:"My Stations",showBack:!0}),(0,a.jsx)("div",{className:"px-4 md:px-6 pt-4 max-w-[480px] mx-auto",children:(0,a.jsx)(o.$,{title:e.title,message:e.message,action:e.action})})]})}return s?(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(r.Vs,{title:"Node Setup",showBack:!0}),(0,a.jsx)(h.NodeOnboardingForm,{variant:"first",onSubmit:b,isSubmitting:j,error:v})]}):n?(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(r.Vs,{title:"My Stations",showBack:!0}),(0,a.jsx)(l.pp,{icon:(0,a.jsx)(c.Tb,{size:24}),title:"No station yet",description:"Nothing to show yet â a station only appears here once it's handled at least one order. If you were invited a while ago and still see this, check with whoever added you."})]}):(0,a.jsxs)("div",{className:"min-h-screen bg-bg-canvas",children:[(0,a.jsx)(r.Vs,{title:"My Stations",showBack:!0}),(0,a.jsxs)("div",{className:"px-4 md:px-6 pt-4 pb-10 max-w-[480px] mx-auto",children:[(0,a.jsx)("p",{className:"text-[13px] text-text-secondary mb-4",children:w?"The stations you've been added to. Tap one to see its details, or switch to it from the dashboard.":"Each station is approved, paid out, and staffed on its own. Tap one to manage it."}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>{let{node:t}=e,s=t.id===(null==y?void 0:y.id);return(0,a.jsx)(i(),{href:x.bw.nodeDetail(t.id),onClick:()=>N(t.id),children:(0,a.jsxs)(l.Zp,{padding:"md",interactive:!0,className:"flex items-start gap-3 border-l-[3px] "+(s?"border-l-brand-blue":"border-l-transparent"),children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-bg-subtle text-text-muted flex items-center justify-center shrink-0",children:(0,a.jsx)(c.Tb,{size:16})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("p",{className:"text-[14px] font-semibold text-text-primary truncate",children:t.name}),"staff"===e.roleAtNode&&(0,a.jsx)("span",{className:"text-[10px] font-semibold text-text-muted shrink-0",children:"Staff"})]}),(0,a.jsx)("p",{className:"text-[12px] text-text-muted truncate",children:t.address}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mt-2",children:[(0,a.jsx)(g.k,{status:t.status}),!(0,u.bS)(t)&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-status-neutral",children:[(0,a.jsx)(c.aR,{size:11}),"Not public"]}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-text-muted",children:[(0,a.jsx)(c.qD,{size:11}),t.capacity," parcels"]}),"owner"===e.roleAtNode&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold",style:{color:e.payoutAccountConfigured?"var(--status-success)":"var(--status-warning)"},children:[(0,a.jsx)(c.lc,{size:11}),e.payoutAccountConfigured?"Payout set":"Payout needed"]})]})]}),(0,a.jsx)(c.vK,{size:16,className:"text-text-muted shrink-0 mt-1"})]})},e.profileId)})}),!w&&(0,a.jsx)(i(),{href:x.bw.nodeAddNode,className:"block mt-5",children:(0,a.jsx)(l.$n,{fullWidth:!0,size:"lg",variant:"outline",leftIcon:(0,a.jsx)(c.c1,{size:16}),children:"Add Another Station"})})]})]})}},90401:(e,t,s)=>{s.d(t,{S:()=>d,N:()=>p});var a=s(95155),n=s(12115),i=s(75100),r=s(52485),l=s(74464),o=s(94806),c=s(64269);
1function d(e){let{configured:t,bankName:s,accountNumber:r,accountName:o,banks:c,isLoadingBanks:d,onSubmit:x,isSubmitting:m,error:p,saved:h}=e,[g,f]=(0,n.useState)(!t),[b,j]=(0,n.useState)(h);return(h!==b&&(j(h),h&&f(!1)),t&&!g)?(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted mb-2",children:"Payout Account"}),h&&(0,a.jsxs)("p",{className:"text-[12px] text-status-success font-medium mb-2 flex items-center gap-1.5",children:[(0,a.jsx)(l.C1,{size:13}),"Saved, this is the account on file."]}),(0,a.jsxs)(i.Zp,{padding:"none",className:"overflow-hidden border-l-[3px] border-l-status-success",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-status-success-bg text-status-success flex items-center justify-center shrink-0",children:(0,a.jsx)(l.C1,{size:16})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary truncate",children:s}),(0,a.jsx)("p",{className:"text-[12px] text-text-muted truncate",children:r})]}),(0,a.jsx)(i.$n,{size:"sm",variant:"ghost",onClick:()=>f(!0),children:"Change"})]}),(0,a.jsx)("div",{className:"h-px bg-border-default"}),(0,a.jsxs)("div",{className:"px-4 py-3",children:[(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"Account Name (verified by Paystack)"}),(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary mt-0.5",children:o})]})]})]}):(0,a.jsx)(u,{banks:c,isLoadingBanks:d,onSubmit:x,isSubmitting:m,error:p,onCancel:t?()=>f(!1):void 0})}function u(e){let{banks:t,isLoadingBanks:s,onSubmit:d,isSubmitting:u,error:x,onCancel:m}=e,[p,h]=(0,n.useState)(""),[g,f]=(0,n.useState)(""),b=(0,n.useMemo)(()=>{let e=new Set;return t.filter(t=>!e.has(t.code)&&(e.add(t.code),!0))},[t]),j=b.find(e=>e.code===p),v=!!j&&/^\d{10}$/.test(g);return(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted mb-2",children:"Payout Account"}),(0,a.jsxs)(i.Zp,{padding:"md",className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-[12px] text-text-secondary -mt-1",children:"Admin pays your earnings into this account. Enter your bank and account number â we don't ask for the account name; it's verified and shown to you right after you save."}),(0,a.jsxs)("div",{className:"relative flex items-center",children:[(0,a.jsxs)("select",{value:p,onChange:e=>h(e.target.value),disabled:s,className:(0,c.cn)("w-full h-12 rounded-[12px] border border-border-default bg-bg-card text-text-primary text-[15px]","pl-4 pr-10 appearance-none outline-none focus:border-brand-blue focus:ring-2 focus:ring-brand-blue/15","transition-colors duration-150 disabled:opacity-60"),children:[(0,a.jsx)("option",{value:"",children:s?"Loading banksâ¦":"Select your bank"}),b.map(e=>(0,a.jsx)("option",{value:e.code,children:e.name},e.code))]}),(0,a.jsx)(l.D3,{size:16,className:"absolute right-4 text-text-muted pointer-events-none"})]}),(0,a.jsx)(i.pd,{placeholder:"10-digit account number",inputMode:"numeric",maxLength:10,value:g,onChange:e=>f(e.target.value.replace(/\D/g,""))}),null!=x&&(()=>{let e=(0,o.kQ)(x);return(0,a.jsx)(r.$,{title:e.title,message:e.message,action:e.action})})(),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)(i.$n,{fullWidth:!0,leftIcon:(0,a.jsx)(l.lc,{size:16}),disabled:!v,isLoading:u,onClick:()=>{j&&d({bankCode:j.code,bankName:j.name,accountNumber:g})},children:"Save Payout Account"}),m&&(0,a.jsx)(i.$n,{variant:"ghost",onClick:m,children:"Cancel"})]})]})]})}var x=s(52619),m=s.n(x);function p(e){let{href:t}=e;return(0,a.jsx)(m(),{href:t,className:"block",children:(0,a.jsxs)(i.Zp,{padding:"md",interactive:!0,className:"flex items-center gap-3 border-l-[3px] border-l-status-warning",children:[(0,a.jsx)("span",{className:"w-9 h-9 rounded-[10px] bg-status-warning-bg text-status-warning flex items-center justify-center shrink-0",children:(0,a.jsx)(l.lc,{size:16})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold text-text-primary",children:"Add your payout account"}),(0,a.jsx)("p",{className:"text-[12px] text-text-muted truncate",children:"We can't pay you until we know
1where to send it."})]}),(0,a.jsx)(l.vK,{size:16,className:"text-text-muted shrink-0"})]})})}}}]);
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.