1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[347],{8664:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ipo/[slug]/apply",function(){return a(85913)}])},25347:function(e,t,a){"use strict";a.d(t,{X:function(){return l}});var n=a(85893),i=a(68643);let s={pending:{label:"Pending review",dot:"bg-ink-200",ring:"ring-border",text:"text-muted-foreground"},verifying_nia:{label:"Verifying NIA",dot:"bg-warning-500",ring:"ring-warning-500/40",text:"text-warning-100"},submitted_to_csd:{label:"Submitted to CSD",dot:"bg-info-500",ring:"ring-info-500/40",text:"text-info-100"},active:{label:"CSD active",dot:"bg-accent",ring:"ring-accent/40",text:"text-foreground"},rejected:{label:"Rejected",dot:"bg-danger-500",ring:"ring-danger-500/40",text:"text-danger-100"}};function l(e){let{status:t,className:a,size:l="md",labelOverride:r}=e,o=s[t];return(0,n.jsxs)("span",{className:(0,i.cn)("inline-flex items-center gap-2 rounded-full bg-ink-700/60 ring-1 transition-colors duration-120",o.ring,o.text,"sm"===l?"pl-2 pr-2.5 py-0.5 text-sm":"pl-2 pr-3 py-1 text-sm",a),role:"status",children:[(0,n.jsx)("span",{"aria-hidden":!0,className:(0,i.cn)("inline-flex h-1.5 w-1.5 rounded-full",o.dot)}),(0,n.jsx)("span",{className:"font-medium",children:null!=r?r:o.label})]})}},98679:function(e,t,a){"use strict";a.d(t,{T:function(){return u}});var n=a(85893),i=a(23302),s=a(21328),l=a(67294),r=a(68643),o=a(17553),c=a(1504);let d={sm:"h-9 px-4 text-xs",default:"h-10 px-5 text-sm",lg:"h-12 px-7 text-[15px]"},u=l.forwardRef(function(e,t){let{className:a,children:l,disabled:u,transition:p,variant:m,size:x,...h}=e,f=(0,i.J)();return(0,n.jsx)(s.E.button,{"data-slot":"button",ref:t,disabled:u,whileTap:f||u?void 0:{scale:.97},transition:null!=p?p:f?{duration:0}:o.tR,className:function(e){let{className:t,variant:a,size:n}=e;if(!a||"default"===a){var i;return(0,r.cn)("inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium transition-colors duration-150 outline-none select-none","bg-foreground text-background hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-foreground disabled:hover:text-background","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",null!==(i=d[null!=n?n:"default"])&&void 0!==i?i:d.default,t)}return(0,r.cn)((0,c.d)({variant:a,size:n}),"active:translate-y-0",t)}({variant:m,size:x,className:a}),...h,children:l})})},23309:function(e,t,a){"use strict";a.d(t,{n:function(){return d}});var n=a(85893),i=a(87372),s=a(25875),l=a(45197),r=a(81593),o=a(98679),c=a(49948);function d(e){let{error:t,loading:a=!1,primaryDisabled:d=!1,primaryLabel:u="Save & continue",primaryLoadingLabel:p="Saving",hidePrimary:m=!1,caption:x,onBack:h,onPrimary:f}=e;return(0,n.jsxs)("div",{className:"space-y-4",children:[t&&(0,n.jsxs)("p",{className:"flex items-center gap-1.5 text-sm text-destructive",role:"alert",children:[(0,n.jsx)(i.Z,{className:"h-3.5 w-3.5"}),t]}),(0,n.jsxs)("div",{className:"mt-10 flex items-center justify-between gap-4",children:[x?(0,n.jsx)("p",{className:"text-sm font-bold text-white/50",children:x}):(0,n.jsx)("span",{"aria-hidden":!0}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[h&&(0,n.jsxs)(o.T,{type:"button",onClick:h,variant:"outline",size:"lg",className:"group",children:[(0,n.jsx)(s.Z,{className:"h-3.5 w-3.5 transition-transform duration-200 group-hover:-translate-x-0.5",strokeWidth:1.5}),"Back"]}),!m&&f&&(0,n.jsx)(c.a,{type:"button",onClick:f,disabled:a||d,size:"lg",className:"group",stateKey:a?"loading":"idle",children:a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Z,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:1.5}),p]}):(0,n.jsxs)(n.Fragment,{children:[u,(0,n.jsx)(r.Z,{className:"h-3.5 w-3.5 transition-transform duration-200 group-enabled:group-hover:translate-x-1",strokeWidth:1.5})]})})]})]})]})}},17183:function(e,t,a){"use strict";a.d(t,{Q:function(){return r},l:function(){return l}});var n=a(85893),i=a(25875),s=a(68643);function l(e){let{title:t,subtitle:a,secondary:l,className:r}=e;return(0,n.jsxs)("div",{className:(0,s.cn)("w-full",r),children:[(0,n.jsx)("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-medium leading-tight tracking-normal",children:t}),a&&(0,n.jsx)("p",{className:"mt-4 text-base text-white/70 leading-relaxed max-w-[52ch]",children:a}),l&&(0,n.jsxs)("button",{type:"button",onClick:l.onClick,className:"group mt-6 inline-flex items-center gap-2 text-sm font-medium text-white/60 hover:text-accent transition-colors duration-200",children:[(0,n.jsx)(i.Z,{className:"h-3 w-3 transition-transform duration-200 group-hover:-translate-x-0.5",strokeWidth:1.5}),l.label]})]})}function r(e){let{step:t,total:a,className:i}=e;return(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center gap-3 mb-5",i),children:[(0,n.jsx)("span",{className:"text-sm uppercase text-accent font-bold opacity-80",children:"IPO Portal"}
1),(0,n.jsx)("span",{"aria-hidden":!0,className:"h-px flex-1 bg-gradient-to-r from-accent/40 via-zinc-800 to-transparent"}),(0,n.jsxs)("span",{className:"text-sm text-white/40 tabular-nums font-medium",children:[String(t).padStart(2,"0")," / ",String(a).padStart(2,"0")]})]})}},74764:function(e,t,a){"use strict";a.d(t,{O:function(){return s}});var n=a(85893),i=a(68643);function s(e){let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,i.cn)("animate-pulse rounded-md bg-muted",t),...a})}},25875:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 2 * @license lucide-react v0.441.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */let n=(0,a(1462).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},17380:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 7 * @license lucide-react v0.441.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */let n=(0,a(1462).Z)("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]])},12923:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 12 * @license lucide-react v0.441.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */let n=(0,a(1462).Z)("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},3785:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 17 * @license lucide-react v0.441.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */let n=(0,a(1462).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},86451:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 22 * @license lucide-react v0.441.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */let n=(0,a(1462).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},12149:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 27 * @license lucide-react v0.441.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */let n=(0,a(1462).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},63696:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 32 * @license lucide-react v0.441.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */let n=(0,a(1462).Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},47963:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** 37 * @license lucide-react v0.441.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */let n=(0,a(1462).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},85913:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return ee}});var n=a(85893),i=a(11163),s=a(9008),l=a.n(s),r=a(45197),o=a(80665),c=a(99490),d=a(67294),u=a(5152),p=a.n(u),m=a(66073),x=a(23302),h=a(13114),f=a(21328),g=a(74833),b=a(17553),v=a(3785),y=a(68643),j=(0,d.memo)(function(e){var t;let{currentStep:a,completedStep:i,totalSteps:s=7,onStepClick:l,applicationType:r}=e,o=["Application type","CSD details","corporate"===r||"fund_manager"===r?"Company":"individual"===r?"Personal":"Personal \xb7 Company","Transaction","Refund instructions","Review","Declaration"].slice(0,s),c=null!==(t=o[a-1]
41)&&void 0!==t?t:"";return(0,n.jsxs)("nav",{role:"navigation","aria-label":"Application steps",className:"mb-12 select-none",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,n.jsx)("span",{className:"text-sm uppercase text-accent font-bold opacity-80",children:"Application"}),(0,n.jsx)("span",{"aria-hidden":!0,className:"h-px flex-1 bg-gradient-to-r from-accent/40 via-zinc-800 to-transparent"}),(0,n.jsxs)("span",{className:"text-sm text-white/40 tabular-nums font-medium",children:[String(a).padStart(2,"0")," /"," ",String(s).padStart(2,"0")]})]}),(0,n.jsx)("div",{className:"flex items-stretch gap-1.5",children:o.map((e,t)=>{let s=t+1,r=s===a,o=s<a||s<=i,c=s<=i+1;return(0,n.jsxs)("button",{type:"button",onClick:()=>c&&l(s),disabled:!c,"aria-current":r?"step":void 0,"aria-label":"Step ".concat(s,": ").concat(e),className:(0,y.cn)("group relative flex-1 pt-3 pb-1 text-left transition-colors duration-200",c?"cursor-pointer":"cursor-not-allowed"),children:[(0,n.jsx)("span",{"aria-hidden":!0,className:(0,y.cn)("absolute left-0 right-0 top-0 h-px transition-colors duration-300",r?"bg-accent shadow-[0_0_10px_rgba(190,154,43,0.55)]":o?"bg-white/55":"bg-zinc-800")}),(0,n.jsxs)("span",{className:(0,y.cn)("flex items-center gap-2 text-sm font-medium tabular-nums whitespace-nowrap transition-colors duration-200",r?"text-white":o?"text-white/65 group-hover:text-white":"text-white/30"),children:[(0,n.jsx)("span",{className:"tabular-nums",children:String(s).padStart(2,"0")}),o&&!r&&(0,n.jsx)(v.Z,{className:"h-2.5 w-2.5 text-accent",strokeWidth:2.5}),(0,n.jsx)("span",{className:"hidden md:inline truncate normal-case font-medium text-sm",children:e})]})]},s)})}),(0,n.jsx)("div",{className:"md:hidden mt-3 text-sm text-white/70 font-medium",children:c})]})}),w=(0,d.memo)(function(e){let{currentStep:t,completedStep:a,totalSteps:i=7,onStepClick:s,applicationType:l}=e,r=["Application type","CSD details","corporate"===l||"fund_manager"===l?"Company":"individual"===l?"Personal":"Personal \xb7 Company","Transaction","Refund instructions","Review","Declaration"].slice(0,i),o=(0,x.J)();return(0,n.jsxs)("nav",{role:"navigation","aria-label":"Application steps",className:"select-none",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-8",children:[(0,n.jsx)("span",{className:"text-sm uppercase text-accent font-bold opacity-80",children:"Application"}),(0,n.jsx)("span",{"aria-hidden":!0,className:"h-px flex-1 bg-gradient-to-r from-accent/40 via-zinc-800 to-transparent"}),(0,n.jsxs)("span",{className:"text-sm text-white/40 tabular-nums font-medium",children:[String(t).padStart(2,"0")," /"," ",String(i).padStart(2,"0")]})]}),(0,n.jsx)("ol",{className:"flex flex-col",children:r.map((e,i)=>{let l=i+1,r=l===t,c=l<t||l<=a,d=l<=a+1;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>d&&s(l),disabled:!d,"aria-current":r?"step":void 0,"aria-label":"Step ".concat(l,": ").concat(e),className:(0,y.cn)("group relative flex w-full items-start gap-4 py-4 pl-4 pr-3 text-left border-l border-zinc-900 transition-colors duration-200",c&&!r&&"border-zinc-700 hover:bg-white/[0.02]",d?"cursor-pointer":"cursor-not-allowed opacity-60"),children:[r&&(0,n.jsx)(f.E.span,{layoutId:o?void 0:"side-stepper-active","aria-hidden":!0,className:"absolute inset-0 bg-white/[0.02] border-l-2 border-accent pointer-events-none",transition:{type:"spring",stiffness:380,damping:34,mass:.9}}),(0,n.jsx)("span",{className:(0,y.cn)("relative shrink-0 mt-0.5 inline-flex items-center justify-center w-6 h-6 text-xs tabular-nums font-medium border transition-colors duration-200",r?"border-accent text-accent":c?"border-white/40 text-white/65 group-hover:border-white/60 group-hover:text-white":"border-zinc-800 text-white/30"),children:c&&!r?(0,n.jsx)(v.Z,{className:"h-3 w-3 text-accent",strokeWidth:2.5}):String(l).padStart(2,"0")}),(0,n.jsx)("span",{className:"relative flex-1 min-w-0 pt-0.5",children:(0,n.jsx)("span",{className:(0,y.cn)("block text-sm transition-colors duration-200",r?"text-white font-medium":c?"text-white/70 font-medium group-hover:text-white":"text-white/35 font-medium"),children:e})})]})},l)})})]})}),N=a(41664),k=a.n(N),S=a(60718),C=a(12923),_=a(81593),P=a(47963),Z=a(12149),A=a(25347),z=a(98679),O=a(82950),M=a(74764),T=a(17183),E=a(23309);let D=[{value:"individual",Icon:S.Z,index:"01",title:"Individual",meta:"Personal application",description:"Apply in your own name, with up to two applicants on a single application."},{value:"corporate",Icon:C.Z,index:"02",title:"Corporate",meta:"Company applicant",description:"Apply on behalf of a registered company. A board resolution may be required."}],I={pension_t2:"Pension Tier 2",pension_t3:"Pension Tier 3",provident:"Provident",mutual:"Mutual fund",unit_trust:"Unit trust",investment_club:"Investment club",other:"Other"};function R(e){let{onSelect:t,loading:a}=e,[i,s]=(0,d.useState)(null);return((0,d.useEffect)(()=>{var e,t;s(null!==(t=null===(e=(0,g.dl)())||void 0===e?void 0:e.accountType)&&void 0!==t?t:null)},[]),"fund_manager"===i)?(0,n.jsx)(B,{onSelect:t,loading:a}):(0,n.jsx)(F,{accountType:i,onSelect:t,loading:a})}function F(e){let{accountType:t,onSelect:a,loading:i}=e,s="individual"===t||"corporate"===t?t:null;return(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(T.l,{step:1,total:7,title:"Ap
41plication type",subtitle:s?"We've preselected ".concat("individual"===s?"Individual":"Corporate"," based on your account. Confirm to continue, or pick the other option."):"Are you applying in your own name, or on behalf of a company?"}),(0,n.jsxs)("div",{className:"mt-12",children:[(0,n.jsxs)("fieldset",{children:[(0,n.jsx)("legend",{className:"sr-only",children:"Application type"}),(0,n.jsx)("div",{className:"border-t border-zinc-800/80",children:D.map(e=>{let{value:t,Icon:l,index:r,title:o,meta:c,description:d}=e,u=s===t;return(0,n.jsxs)("button",{type:"button",onClick:()=>!i&&a(t),disabled:i,className:(0,y.cn)("group relative flex w-full text-left items-start gap-6 border-b border-zinc-800/80 py-6 pl-6 pr-4 transition-colors duration-200","hover:bg-white/[0.015] disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"),children:[(0,n.jsx)("span",{"aria-hidden":!0,className:(0,y.cn)("absolute left-0 top-0 bottom-0 w-px transition-all duration-300",u?"bg-accent shadow-[0_0_10px_rgba(190,154,43,0.4)]":"bg-transparent group-hover:bg-zinc-700 group-disabled:group-hover:bg-transparent")}),(0,n.jsx)("span",{className:(0,y.cn)("text-sm tabular-nums pt-1 transition-colors duration-200",u?"text-accent":"text-white/30 group-hover:text-accent"),children:r}),(0,n.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("span",{className:"flex items-baseline justify-between gap-4",children:[(0,n.jsxs)("span",{className:"flex items-center gap-3",children:[(0,n.jsx)(l,{className:(0,y.cn)("h-4 w-4 transition-colors duration-200",u?"text-accent":"text-white/40 group-hover:text-white/70"),strokeWidth:1.25}),(0,n.jsx)("span",{className:"block text-xl font-medium tracking-normal text-white/90 group-hover:text-white transition-colors duration-200",children:o})]}),(0,n.jsx)("span",{className:"text-sm text-white/45 shrink-0",children:u?"Suggested":c})]}),(0,n.jsx)("span",{className:"mt-2 block text-sm text-white/60 leading-relaxed",children:d})]}),(0,n.jsx)(_.Z,{className:"h-3.5 w-3.5 mt-1.5 text-white/25 group-hover:text-accent group-hover:translate-x-1 transition-all duration-200",strokeWidth:1.5})]},t)})})]}),(0,n.jsx)(E.n,{caption:i?"Creating applicationâ¦":"Choose to continue",hidePrimary:!0})]})]})}function B(e){let{onSelect:t,loading:a}=e,[i,s]=(0,d.useState)([]),[l,r]=(0,d.useState)(!1),[o,c]=(0,d.useState)(!0),[u,p]=(0,d.useState)(null);(0,d.useEffect)(()=>{c(!0),Promise.all([g.ZP.get("/schemes"),g.ZP.get("/fund-manager/signatures")]).then(e=>{var t,a,n,i;let[l,o]=e;s(null!==(n=l.data)&&void 0!==n?n:[]),r((null!==(i=null===(a=o.data)||void 0===a?void 0:null===(t=a.signatories)||void 0===t?void 0:t.length)&&void 0!==i?i:0)>0)}).catch(()=>{s([]),r(!1)}).finally(()=>c(!1))},[]);let m=i.filter(e=>"active"===e.csdVerificationStatus&&l),x=i.filter(e=>!("active"===e.csdVerificationStatus&&l));return(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(T.l,{step:1,total:7,title:"Pick a scheme",subtitle:"Select the scheme this subscription is for. Only schemes with an active CSD and captured signatures can apply."}),(0,n.jsxs)("div",{className:"mt-12 flex flex-col gap-6",children:[o?(0,n.jsx)("div",{className:"space-y-2",children:[0,1,2].map(e=>(0,n.jsx)(M.O,{className:"h-20 w-full rounded-md"},e))}):0===i.length?(0,n.jsxs)(O.Zb,{className:"p-8 text-center",children:[(0,n.jsx)("div",{className:"mx-auto h-12 w-12 rounded-full bg-zinc-900 grid place-items-center mb-3",children:(0,n.jsx)(P.Z,{className:"h-5 w-5 text-white/55"})}),(0,n.jsx)("div",{className:"text-base font-medium text-white",children:"No schemes set up"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-white/60 max-w-sm mx-auto leading-relaxed",children:"Add a scheme first, then come back and apply on its behalf."}),(0,n.jsx)(k(),{href:"/ipo/schemes/new",className:"inline-block mt-5",children:(0,n.jsxs)(z.T,{size:"lg",children:["Add a scheme",(0,n.jsx)(_.Z,{className:"h-3.5 w-3.5",strokeWidth:1.5})]})})]}):(0,n.jsxs)(n.Fragment,{children:[!l&&i.length>0&&(0,n.jsxs)("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/[0.04] p-4",children:[(0,n.jsx)("div",{className:"text-sm font-bold text-amber-200/90 mb-1",children:"Capture your firm signatories first"}),(0,n.jsxs)("p",{className:"text-sm text-white/60 leading-relaxed",children:["Signatories are captured once for your firm and applied to every scheme application."," ",(0,n.jsx)(k(),{href:"/ipo/schemes",className:"underline text-white/80 hover:text-white transition-colors duration-150",children:"Capture them on the Schemes page"}),", then come back to apply."]})]}),(0,n.jsx)("ul",{className:"space-y-2",children:m.map(e=>(0,n.jsx)(L,{scheme:e,selected:u===e.id,onClick:()=>p(e.id)},e.id))}),x.length>0&&(0,n.jsxs)("div",{className:"rounded-md border border-zinc-800 bg-zinc-900/40 p-4",children:[(0,n.jsx)("div",{className:"text-sm font-bold text-white/55 mb-2",children:"Not yet ready"}),(0,n.jsx)("ul",{className:"space-y-2",children:x.map(e=>(0,n.jsxs)("li",{className:"flex items-center justify-between gap-3 text-sm text-white/70",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("span",{className:"text-white/85",children:e.legalName})," ",(0,n.jsxs)("span",{className:"text-white/45",children:["\xb7 ",I[e.schemeType]]})]}),(0,n.jsxs)(k(),{href:"/ipo/schemes/".concat(e.id),className:"inline-flex items-center gap-1 text-sm text-white/60 hover:text-white transition-colors duration-150",children:["Open",(0,n.jsx)(Z.Z,{className:"h-3 w-3"})]})]},e.id))})]})]}),(0,n.jsx)(E.n,{loading:a,primaryDisabled:!u,primaryLabel:"Continue",primaryLoadingLabel:"Creating",hidePrimary:!i.length,onPrimary:()=>u&&t("fund_manager",u)})]})]})}function L(e){let{scheme:t,selected:a,onClick:i}=e;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:i,className:(0,y.cn)("w-full text-left flex items-center gap-4 px-4 py-4 rounded-md border transition-colors duration-150",a?"border-accent/60 bg-accent/5":"border-zinc-800 bg-zinc-900/40 hover:border-zinc-700"),children:[(0,n.jsx)("div",{className:"h-10 w-10 rounded-md bg-zinc-950 ring-1 ring-zinc-800 grid place-items-center shrink-0",children:(0,n.jsx)(C.Z,{className:"h-4 w-4 text-white/65",strokeWidth:1.5})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-base font-medium text-white truncate",children:t.legalName}),(0,n.jsxs)("div",{className:"text-sm text-white/60 mt-0.5",children:[I[t.schemeType],t.csdCode?" \xb7 ".concat(t.csdCode):""]})]}),(0,n.jsx)(A.X,{status:t.csdVerificationStatus,size:"sm"})]})})}let q=p()(()=>Promise.all([a.e(1371),a.e(3229),a.e(8580),a.e(7742),a.e(1935),a.e(7888),a.e(9566),a.e(3362)]).then(a.bind(a,73362)),{loadableGenerated:{webpack:()=>[73362]}}),W=p()(()=>Promise.all([a.e(1371),a.e(8580),a.e(6985)]).then(a.bind(a,6985)),{loadableGenerated:{webpack:()=>[6985]}}),G=p()(()=>a.e(3722).then(a.bind(a,33722)),{loadableGenerated:{webpack:()=>[33722]}}),V=p()(()=>Promise.all([a.e(1371),a.e(3229),a.e(5064),a.e(7853)]).then(a.bind(a,7853)),{loadableGenerated:{webpack:()=>[7853]}}),H=p()(()=>Promise.all([a.e(1371),a.e(3229),a.e(990)]).then(a.bind(a,90990)),{loadableGenerated:{webpack:()=>[90990]}}),Y=p()(()=>Promise.all([a.e(7061),a.e(1993)]).then(a.bind(a,51993)),{loadableGenerated:{webpack:()=>[51993]}}),U=p()(()=>Promise.all([a.e(1371),a.e(3229),a.e(7742),a.e(1935),a.e(5064),a.e(9566),a.e(9755)]).then(a.bind(a,61953)),{loadableGenerated:{webpack:()=>[61953]}}),X={enter:e=>({opacity:0,x:16*e}),center:{opacity:1,x:0,transition:{x:{duration:b.Gv,ease:b.mv},opacity:{duration:b.iC,ease:b.mv}}},exit:e=>({opacity:0,x:-12*e,transition:{x:{duration:b.ni,ease:b.mv},opacity:{duration:b.ni,ease:b.mv}}})};function J(e){var t,a,s,l,o,c,u,p;let{slug:b}=e,v=(0,i.useRouter)(),N=(0,x.J)(),[k,S]=(0,d.useState)(!1),[C,_]=(0,d.useState)(!0),[P,Z]=(0,d.useState)(null),[A,z]=(0,d.useState)(1),[O,M]=(0,d.useState)(1),E=(0,d.useRef)(null),D=(0,d.useRef)(!0),I=(0,d.useCallback)(e=>{z(t=>{let a="function"==typeof e?e(t):e;return M(a>=t?1:-1),a})},[]);(0,d.useEffect)(()=>
41{if(D.current){D.current=!1;return}let e=E.current;if(!e)return;let t=e.getBoundingClientRect().top+window.scrollY-96;window.scrollTo({top:Math.max(0,t),behavior:N?"auto":"smooth"})},[A,N]);let F=(0,d.useCallback)(()=>I(1),[I]),B=(0,d.useCallback)(()=>I(2),[I]),L=(0,d.useCallback)(()=>I(3),[I]),J=(0,d.useCallback)(()=>I(4),[I]),Q=(0,d.useCallback)(()=>I(5),[I]),$=(0,d.useCallback)(()=>I(6),[I]),ee=(0,d.useCallback)(()=>I(7),[I]),[et,ea]=(0,d.useState)(null),[en,ei]=(0,d.useState)(null),[es,el]=(0,d.useState)([{applicantNumber:1,title:"",surname:"",otherNames:"",telephoneNo:"",email:""}]),[er,eo]=(0,d.useState)({companyName:"",contactPerson:"",telephoneNo:"",email:""}),[ec,ed]=(0,d.useState)({numberOfShares:"",amountPaid:"",sourceOfFunds:""}),[eu,ep]=(0,d.useState)({bankName:"",branch:"",accountName:"",accountNumber:""}),[em,ex]=(0,d.useState)({signature1:null,signature2:null,date1:"",date2:"",agreed:!1}),[eh,ef]=(0,d.useState)(!1);!function(e){let t=(0,i.useRouter)();(0,d.useEffect)(()=>{if(!e)return;let t=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)},[e]),(0,d.useEffect)(()=>{if(!e)return;let a=()=>{if(!window.confirm("You have unsaved changes. Leave anyway?"))throw t.events.emit("routeChangeError"),"Route change aborted by user (unsaved changes)."};return t.events.on("routeChangeStart",a),()=>t.events.off("routeChangeStart",a)},[e,t])}(eh);let eg=(0,d.useCallback)(()=>ef(!0),[]),eb=(null==et?void 0:et.status)==="locked",ev="string"==typeof v.query.app?v.query.app:null;async function ey(e,t){var a,n;try{let n=(await g.ZP.get("/applications/".concat(e),{signal:t})).data;if(null==t?void 0:t.aborted)return;ea(n),I("draft"===n.status?Math.min(Math.max(n.currentStep||1,2),7):2),n.csdAccountDetail&&ei(n.csdAccountDetail),(null===(a=n.individualApplicants)||void 0===a?void 0:a.length)>0&&el(n.individualApplicants.map(e=>({applicantNumber:e.applicantNumber,title:e.title,surname:e.surname,otherNames:e.otherNames,telephoneNo:e.telephoneNo,email:e.email}))),n.corporateDetail&&eo({companyName:n.corporateDetail.companyName,contactPerson:n.corporateDetail.contactPerson,telephoneNo:n.corporateDetail.telephoneNo,email:n.corporateDetail.email}),n.transactionDetail&&ed({numberOfShares:String(n.transactionDetail.numberOfShares),amountPaid:String(n.transactionDetail.amountPaid),sourceOfFunds:n.transactionDetail.sourceOfFunds||""}),n.refundInstruction&&ep({bankName:n.refundInstruction.bankName,branch:n.refundInstruction.branch,accountName:n.refundInstruction.accountName,accountNumber:n.refundInstruction.accountNumber}),n.declaration&&ex({signature1:n.declaration.signature1,signature2:n.declaration.signature2,date1:n.declaration.date1,date2:n.declaration.date2||"",agreed:n.declaration.agreed})}catch(e){if((null==e?void 0:e.name)==="CanceledError"||(null==e?void 0:e.code)==="ERR_CANCELED")return;(null==e?void 0:null===(n=e.response)||void 0===n?void 0:n.status)>=500&&Z("Could not load your application. You can start fresh or try again.")}finally{(null==t?void 0:t.aborted)||_(!1)}}async function ej(e,t){S(!0);try{let a=await g.ZP.post("/applications",{ipoSlug:b,type:e,schemeId:null!=t?t:void 0});ea(a.data),I(2),v.replace("/ipo/".concat(b,"/apply?app=").concat(a.data.id),void 0,{shallow:!0}),m.A.success("Application created")}catch(e){var a,n;m.A.error((null===(n=e.response)||void 0===n?void 0:null===(a=n.data)||void 0===a?void 0:a.message)||"Failed to create application")}finally{S(!1)}}async function ew(){S(!0);try{"individual"===et.type?await g.ZP.put("/applications/".concat(et.id,"/personal"),{applicants:es}):await g.ZP.put("/applications/".concat(et.id,"/personal"),er),ef(!1),I(4),m.A.success("Details saved")}catch(a){var e,t;m.A.error((null===(t=a.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||"Failed to save")}finally{S(!1)}}async function eN(){S(!0);try{await g.ZP.put("/applications/".concat(et.id,"/transaction"),{numberOfShares:parseInt(ec.numberOfShares),amountPaid:parseFloat(ec.amountPaid),sourceOfFunds:ec.sourceOfFunds||null}),ef(!1),I(5),m.A.success("Transaction details saved")}catch(a){var e,t;m.A.error((null===(t=a.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||"Failed to save")}finally{S(!1)}}async function ek(){S(!0);try{await g.ZP.put("/applications/".concat(et.id,"/refund"),eu),ef(!1),I(6),m.A.success("Refund instructions saved")}catch(a){var e,t;m.A.error((null===(t=a.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||"Failed to save")}finally{S(!1)}}async function eS(){S(!0);try{await g.ZP.put("/applications/".concat(et.id,"/declaration"),em),await g.ZP.post("/applications/".concat(et.id,"/submit")),ef(!1),m.A.success("Application submitted successfully!"),v.push("/ipo/".concat(b,"/dashboard?app=").concat(et.id))}catch(a){var e,t;m.A.error((null===(t=a.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||"Failed to submit")}finally{S(!1)}}return(0,d.useEffect)(()=>
41{if(!ev){_(!1);return}_(!0);let e=new AbortController,t=!0,a=setTimeout(()=>{t&&(e.abort(),_(!1),Z("Could not load your application. Please retry."))},8e3);return ey(ev,e.signal).finally(()=>clearTimeout(a)),()=>{t=!1,clearTimeout(a),e.abort()}},[b,ev]),C?(0,n.jsxs)("div",{className:"mx-auto max-w-xl border border-zinc-800 bg-white/[0.02] p-6 sm:p-8",children:[(0,n.jsx)(r.Z,{className:"h-5 w-5 animate-spin text-accent"}),(0,n.jsx)("h1",{className:"mt-5 text-2xl font-medium tracking-normal",children:"Loading application"}),(0,n.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-white/55",children:"We are checking for an existing draft before opening the form."})]}):P&&!et?(0,n.jsxs)("div",{className:"mx-auto max-w-xl border border-zinc-800 bg-white/[0.02] p-6 sm:p-8",children:[(0,n.jsx)("h1",{className:"text-2xl font-medium tracking-normal",children:"Something went wrong"}),(0,n.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-white/55",children:P}),(0,n.jsxs)("div",{className:"mt-5 flex gap-3",children:[(0,n.jsx)("button",{type:"button",onClick:()=>{Z(null),_(!0),ey()},className:"inline-flex h-10 items-center justify-center rounded-md bg-white px-5 text-sm font-medium text-black hover:bg-accent transition-colors duration-150",children:"Retry"}),P.includes("start fresh")&&(0,n.jsx)("button",{type:"button",onClick:()=>Z(null),className:"inline-flex h-10 items-center justify-center rounded-md border border-zinc-700 px-5 text-sm font-medium text-white/65 hover:text-white transition-colors duration-150",children:"Start fresh"})]})]}):(0,n.jsxs)("div",{className:(0,y.cn)("lg:items-start relative",et?"lg:grid lg:grid-cols-[260px_minmax(0,1fr)] lg:gap-x-16 xl:gap-x-24":"max-w-2xl mx-auto"),children:[(0,n.jsx)("div",{ref:E,"aria-hidden":!0,className:"pointer-events-none absolute -top-4 left-0 h-px w-px"}),et&&(0,n.jsx)("aside",{className:"hidden lg:block lg:sticky lg:top-28 lg:self-start",children:(0,n.jsx)(w,{currentStep:A,completedStep:null!==(s=null!==(a=et.highestStep)&&void 0!==a?a:et.currentStep)&&void 0!==s?s:1,totalSteps:7,onStepClick:I,applicationType:null==et?void 0:et.type})}),(0,n.jsxs)("div",{className:"min-w-0 lg:min-h-[720px]",children:[et&&(0,n.jsx)("div",{className:"lg:hidden",children:(0,n.jsx)(j,{currentStep:A,completedStep:null!==(o=null!==(l=et.highestStep)&&void 0!==l?l:et.currentStep)&&void 0!==o?o:1,totalSteps:7,onStepClick:I,applicationType:null==et?void 0:et.type})}),eb&&(0,n.jsx)("div",{className:"bg-amber-600/10 border border-amber-600/30 text-amber-500 text-sm rounded-lg p-3 mb-6",children:"This application is locked and cannot be edited."}),(0,n.jsx)(T.Q,{step:A,total:7}),(0,n.jsx)(h.M,{mode:"wait",initial:!1,custom:O,children:(0,n.jsxs)(f.E.div,{custom:O,variants:N?void 0:X,initial:!N&&"enter",animate:N?{opacity:1}:"center",exit:N?{opacity:0}:"exit",children:[1===A&&!et&&(0,n.jsx)(R,{onSelect:ej,loading:k}),1===A&&et&&(0,n.jsx)(K,{application:et,onContinue:B}),2===A&&(0,n.jsx)(q,{applicationId:null!==(c=null==et?void 0:et.id)&&void 0!==c?c:null,initial:null!=en?en:void 0,onSaved:()=>{ef(!1),L()},onBack:F,readOnly:eb}),3===A&&(null==et?void 0:et.type)==="individual"&&(0,n.jsx)(W,{data:es,onChange:e=>{el(e),eg()},onNext:ew,onBack:B,loading:k,readOnly:eb}),3===A&&((null==et?void 0:et.type)==="corporate"||(null==et?void 0:et.type)==="fund_manager")&&(0,n.jsx)(G,{data:er,onChange:e=>{eo(e),eg()},onNext:ew,onBack:B,loading:k,readOnly:eb}),4===A&&(0,n.jsx)(V,{data:ec,onChange:e=>{ed(e),eg()},onNext:eN,onBack:L,loading:k,readOnly:eb,showSourceOfFunds:(null==et?void 0:et.type)==="individual",ipo:null==et?void 0:et.ipo}),5===A&&(0,n.jsx)(H,{applicationId:null!==(u=null==et?void 0:et.id)&&void 0!==u?u:null,data:eu,onChange:e=>{ep(e),eg()},onNext:ek,onBack:J,loading:k,readOnly:eb}),6===A&&(0,n.jsx)(Y,{applicationId:null!==(p=null==et?void 0:et.id)&&void 0!==p?p:null,onContinue:ee,onEditStep:I,onBack:Q,readOnly:eb}),7===A&&(0,n.jsx)(U,{data:em,onChange:e=>{ex(e),eg()},onSubmit:eS,onBack:$,loading:k,readOnly:eb,applicationType:null==et?void 0:et.type,ipoSlug:b,prospectusUrl:null==et?void 0:null===(t=et.ipo)||void 0===t?void 0:t.prospectusUrl})]},A)})]})]})}let Q={individual:"Individual",corporate:"Corporate",fund_manager:"Fund manager"};function K(e){var t,a,i,s,l;let{application:r,onContinue:o}=e,c=null!==(i=Q[null==r?void 0:r.type])&&void 0!==i?i:"Application",d=null!==(l=null!==(s=null==r?void 0:null===(t=r.scheme)||void 0===t?void 0:t.legalName)&&void 0!==s?s:null==r?void 0:null===(a=r.scheme)||void 0===a?void 0:a.name)&&void 0!==l?l:null;return(0,n.jsxs)("div",{className:"space-y-10",children:[(0,n.jsx)(T.l,{step:1,total:7,title:"Ap
41plication type",subtitle:"You've already started this application. The type is locked once an application is created - continue editing the remaining steps below."}),(0,n.jsxs)("div",{className:"border border-zinc-800 bg-white/[0.02] p-6",children:[(0,n.jsx)("div",{className:"text-sm font-bold text-white/55",children:"Selected type"}),(0,n.jsx)("div",{className:"mt-2 text-2xl text-white font-medium",children:c}),d&&(0,n.jsxs)("div",{className:"mt-3 text-sm text-white/60",children:["Scheme: ",d]})]}),(0,n.jsx)(E.n,{primaryLabel:"Continue",onPrimary:o})]})}var $=a(38890);function ee(){let e=(0,i.useRouter)(),{slug:t}=e.query;return e.isReady&&"string"==typeof t?(0,n.jsx)($.Yg,{children:(0,n.jsxs)(o.M,{children:[(0,n.jsx)(l(),{children:(0,n.jsx)("title",{children:"Apply \xb7 Black Star IPO Portal"})}),(0,n.jsx)(c._,{}),(0,n.jsx)("main",{className:"min-h-[88vh] px-6 md:px-12 lg:px-20 xl:px-28 2xl:px-36 pt-10 pb-24 text-white",children:(0,n.jsx)("div",{className:"max-w-3xl lg:max-w-[1180px] mx-auto",children:(0,n.jsx)(J,{slug:t})})})]})}):(0,n.jsxs)(o.M,{children:[(0,n.jsx)(l(),{children:(0,n.jsx)("title",{children:"Apply \xb7 Black Star IPO Portal"})}),(0,n.jsx)(c._,{}),(0,n.jsx)("main",{className:"min-h-[80vh] px-6 md:px-12 lg:px-20 xl:px-28 2xl:px-36 pt-20 pb-24 text-white",children:(0,n.jsxs)("div",{className:"mx-auto max-w-xl border border-zinc-800 bg-white/[0.02] p-6 sm:p-8",children:[(0,n.jsx)(r.Z,{className:"h-5 w-5 animate-spin text-accent"}),(0,n.jsx)("h1",{className:"mt-5 text-2xl font-medium tracking-normal",children:"Loading application"}),(0,n.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-white/55",children:"This should only take a moment."})]})})]})}},24599:function(e){e.exports={style:{fontFamily:"'__Outfit_543835', '__Outfit_Fallback_543835'",fontStyle:"normal"},className:"__className_543835",variable:"__variable_543835"}}},function(e){e.O(0,[1664,1446,9821,2892,3968,2888,9774,179],function(){return e(e.s=8664)}),_N_E=e.O()}]);
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.